diff -Nru dosbox-staging-0.76.0/AUTHORS dosbox-staging-0.77.0/AUTHORS --- dosbox-staging-0.76.0/AUTHORS 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/AUTHORS 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ -The dosbox-staging team: +The DOSBox Staging Team: Patryk Obara kcgen +nemo93 The project is continuation of DOSBox project, authored by: diff -Nru dosbox-staging-0.76.0/autogen.sh dosbox-staging-0.77.0/autogen.sh --- dosbox-staging-0.76.0/autogen.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/autogen.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!/bin/sh - -echo "Generating build information using aclocal, autoheader, automake and autoconf" -echo "This may take a while ..." - -# Regenerate configuration files. - -aclocal -I m4 -autoheader -automake --include-deps --add-missing --copy -autoconf - -echo "Now you are ready to run ./configure." -echo "You can also run ./configure --help for extra features to enable/disable." diff -Nru dosbox-staging-0.76.0/BUILD.md dosbox-staging-0.77.0/BUILD.md --- dosbox-staging-0.76.0/BUILD.md 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/BUILD.md 2021-07-02 15:47:39.000000000 +0000 @@ -1,452 +1,157 @@ -# Build Script +## Minimum build requirements -## Introduction +- C/C++ compiler with support for C++14 +- SDL >= 2.0.2 +- Opusfile +- Meson >= 0.49.0 or Visual Studio Community Edition +- OS that is mostly POSIX-compliant or up-to-date Windows system -This script builds `dosbox-staging` with your choice of compiler, release -type, and additional options. It runs on MacOS, Linux, Windows, and possibly -other operating systems. +All other dependencies are optional and can be disabled while configuring the +build (in `meson setup` step). -If this is your first time building dosbox-staging, then you will need to -install its development tools and dependencies, which is covered in the -notes below. +## OS-specific instructions -- [Build Script](#build-script) - - [Introduction](#introduction) - - [Requirements](#requirements) - - [Windows Procedures](#windows-procedures) - - [Install MSYS2](#install-msys2) - - [Clone and Build a Windows Binary](#clone-and-build-a-windows-binary) - - [macOS Procedures](#macos-procedures) - - [Install Dependencies under macOS](#install-dependencies-under-macos) - - [Xcode Installation](#xcode-installation) - - [Brew Package Manager Installation](#brew-package-manager-installation) - - [MacPorts Package Manager Installation](#macports-package-manager-installation) - - [Clone and Build a macOS Binary](#clone-and-build-a-macos-binary) - - [Linux Procedures](#linux-procedures) - - [Install Dependencies under Linux](#install-dependencies-under-linux) - - [Build a Linux Binary](#build-a-linux-binary) - - [Haiku Procedures](#haiku-procedures) - - [Install Dependencies under Haiku](#install-dependencies-under-haiku) - - [Build a Haiku Binary](#build-a-haiku-binary) - - [Additional Tips](#additional-tips) - - [Compiler variations](#compiler-variations) - - [Release types](#release-types) - - [Build Results, Rebuilding, and Cleaning](#build-results-rebuilding-and-cleaning) - - [CCache](#ccache) - - [Optimization Modifiers](#optimization-modifiers) - - [AutoFDO Procedures](#autofdo-procedures) - - [Prerequisites for AutoFDO](#prerequisites-for-autofdo) - - [Record Data for AutoFDO Builds](#record-data-for-autofdo-builds) - - [Build Using AutoFDO Data](#build-using-autofdo-data) +Instructions in this article assume you're using Linux or BSD but will work +on any modern system. Documentation for programmers using other systems: +[Windows], [macOS], [Haiku]. -## Requirements +[Windows]: docs/build-windows.md +[macOS]: docs/build-macos.md +[Haiku]: docs/build-haiku.md -- **Windows newer than XP** - - **NTFS-based C:**, because msys2 doesn't work on FAT filesystems -- **MacOS** 10.x -- **Haiku** up-to-date -- **Ubuntu** 16.04 or newer -- **Fedora** up-to-date -- **RedHat or CentOS** 7 or newer -- **Arch-based distribution** up-to-date -- **OpenSUSE Leap** 15 or newer +## Meson build snippets -## Windows Procedures +### Make a debug build -### Install MSYS2 +Install dependencies listed in [README.md](README.md). Although `ccache` is +optional, we recommend installing it because Meson will use it to greatly speed +up builds. -1. Download and install Chocolatey: -1. Open a console and run Cholocatey's command line interface (CLI) - to install msys2 and git: +Build steps: - `choco install msys2 git --no-progress` +``` shell +meson setup build +ninja -C build +``` +Directory `build` will contain all compiled files. - ``` text - Chocolatey v0.10.15 - Installing the following packages: - msys2 git - By installing you accept licenses for the packages. +### Other build types - msys2 v20180531.0.0 [Approved] - msys2 package files install completed. Performing other installation steps. - Installing to: C:\tools\msys64 - Extracting 64-bit C:\ProgramData\chocolatey\lib\msys2\tools\msys2-base-x86_64.tar.xz - Extracting C:\tools\msys64\msys2-base-x86_64-20180531.tar to C:\tools\msys64... - Starting initialization via msys2_shell.cmd - PATH environment variable does not have C:\tools\msys64 in it. Adding... - ``` +Meson supports several build types, appropriate for various situations: +`release` for creating optimized release binaries, `debug` (default) for +for development or `plain` for packaging. -1. Launch a new MSYS2 terminal (not a CMD prompt or Powershell window): - 1. Start Menu > Run ... `c:\tools\msys64\msys2_shell.cmd` - 1. Run all subsequent steps within this terminal. +``` shell +meson setup -Dbuildtype=release build +``` +Detailed documentation: [Meson: Core options][meson-core] -### Clone and Build a Windows Binary +[meson-core]: https://mesonbuild.com/Builtin-options.html#core-options -1. Clone and enter the repository's directory: - 1. `git clone https://github.com/dosbox-staging/dosbox-staging.git` - 1. `cd dosbox-staging` +### Disabling unwanted dependencies - Be sure to run all subsequent steps below while inside the repo's directory. +The majority of dependencies are optional and can be disabled during build. -2. (🏁 first-time-only) Install the build tools and runtime dependencies: +For example, to compile without OpenGL dependency try: - `./scripts/list-build-dependencies.sh -m msys2 -c clang | xargs pacman -S - --noconfirm` +``` shell +meson setup -Duse_opengl=false build +ninja -C build +``` -3. Build an optimized binary with either compiler: +### List Meson's setup options -- GCC: `./scripts/build.sh -c gcc -t release --bin-path /mingw64/bin` -- Clang: `./scripts/build.sh -c clang -t release --bin-path /mingw64/bin` +Run `meson configure` to see the full list of Meson setup options as well +as project-specific options. Or, see the file +[`meson_options.txt`](meson_options.txt) for only the project-specific +options. -1. To build a debug binary, use `-t debug` in place of `-t release`. +To query the options set in an existing build directory, simply append +the build directory to the above command. For example: -## macOS Procedures +``` shell +meson configure build +``` -Builds on macOS can be performed with Clang or GCC. For general use, we -recommend building with `Clang` as it supports linking with Apple's CoreMidi -SDK. Developers interested in testing wider compiler coverage might also be -interested in building with GCC. The following sections describe how to install -and build with both compilers. +Options can be passed to the `meson setup` command using `-Doption=value` +notation or using comma-separated notation (ie: `-Doption=value1,value2,value3`) +when the option supports multiple values. -### Install Dependencies under macOS -Before installing either Brew or MacPorts, the Apple's Xcode tools need to be -installed and the license agreed to: +### Run unit tests -#### Xcode Installation +Prerequisites: -1. Install the command line tools: `xcode-select --install` -1. Accept the license agreement: `sudo xcodebuild -license` +``` shell +# Fedora +sudo dnf install gtest-devel +``` +``` shell +# Debian, Ubuntu +sudo apt install libgtest-dev +``` +If `gtest` is not available/installed on the OS, Meson will download it +automatically. -#### Install the Brew Package Manager and Dependencies +Build and run tests: -1. Download and install brew per the instructions here: -1. Update it with: `brew update` -1. Install git with: `brew install git` -1. Clone the repository: `git clone - https://github.com/dosbox-staging/dosbox-staging.git` -1. Change directories into the repo: `cd dosbox-staging` -1. Install dependencies: +``` shell +meson setup build +meson test -C build +``` - `brew install $(./scripts/list-build-dependencies.sh -m brew -c gcc)` +### Run unit tests (with user-supplied gtest sources) -#### Install the MacPorts Package Manager and Dependencies +*Appropriate during packaging or when user is behind a proxy or without +internet access.* -1. Build and install MacPorts along with dosbox-staging dependencies with the - following sequence: +Place files described in `subprojects/gtest.wrap` file in +`subprojects/packagecache/` directory, and then: - ``` shell - git clone --quiet --depth=1 https://github.com/macports/macports-base.git - cd macports-base - ./configure - make -j"$(sysctl -n hw.physicalcpu)" - sudo make install - PREFIX="/opt/local" - PATH="${PREFIX}/sbin:${PREFIX}/bin:${PATH}" - sudo port -q selfupdate - ``` -1. Clone the repository: `git clone - https://github.com/dosbox-staging/dosbox-staging.git` -1. Change directories into the repo: `cd dosbox-staging` -1. Install depedencies: +``` shell +meson setup --wrap-mode=nodownload build +meson test -C build +``` - `sudo port -q install $(./scripts/list-build-dependencies.sh -m macports -c gcc)` +### Build test coverage report -### Build a macOS Binary (common for Brew and MacPorts) +Prerequisites: -1. Build an optimized binary with various compilers: +``` shell +# Fedora +sudo dnf install gcovr lcov +``` -- Clang: `./scripts/build.sh -c clang -t release -p /usr/local/bin` -- GCC (brew): `./scripts/build.sh -c gcc -v 9 -t release -p /usr/local/bin` -- GCC (macports): `./scripts/build.sh -c gcc -v mp-9 -t release -p - /opt/local/bin` +Run tests and generate report: -1. To build a debug binary, use `-t debug` in place of `-t release`. +``` shell +meson setup -Db_coverage=true build +meson test -C build +ninja -C build coverage-html +``` -## Linux Procedures +Open the report with your browser: -### Install Dependencies under Linux +``` shell +firefox build/meson-logs/coveragereport/index.html" +``` -1. Install git: `sudo apt install -y git` -1. Clone the repository: `git clone - https://github.com/dosbox-staging/dosbox-staging.git` -1. Change directories into the repo: `cd dosbox-staging` -1. (🏁 first-time-only) Install dependencies based on your package manager. - In this example, we use Ubuntu 20.04: +### Static analysis report - `sudo apt install -y $(./scripts/list-build-dependencies.sh -m apt -c clang)` +Prerequisites: - For other supported package managers, run: - `./scripts/list-build-dependencies.sh` +``` shell +# Fedora +sudo dnf install clang-analyzer +``` +``` shell +# Debian, Ubuntu +sudo apt install clang-tools +``` -### Build a Linux Binary +Build and generate report: -1. Build an optimized binary using various compilers: - -- Clang: `./scripts/build.sh -c clang -t release -m lto` -- GCC (default version): `./scripts/build.sh -c gcc -t release -m lto` -- GCC (specific version, ie: 10): `./scripts/build.sh -c gcc -v 10 -t release -m - lto` - - :warning: Raspberry Pi 4 users should avoid link-time-optimized builds for - now. Simply drop the `-m lto` in your build line. - -1. To build a debug binary, use `-t debug` in place of `-t release -m lto`. - -## Haiku Procedures - -### Install Dependencies under Haiku - -1. Clone the repository: `git clone - https://github.com/dosbox-staging/dosbox-staging.git` -1. Change directories into the repo: `cd dosbox-staging` -1. (🏁 first-time-only) Install dependencies: - - `pkgman install -y $(./scripts/list-build-dependencies.sh -m haikuports -c - clang -v 9)` - -### Build a Haiku Binary - -1. Build an optimized binary using various compilers: - -- Clang: `./scripts/build.sh --compiler clang -t release -m lto - --prefix=$HOME/config/non-packaged` -- GCC: `./scripts/build.sh -c gcc -t release --prefix=$HOME/config/non-packaged` - -1. To build a debug binary, use `-t debug` in place of `-t release`. -1. Install the binary: `make install` -1. Edit your configuration file by running: `dosbox -editconf` and make the - following suggested changes (leave all other settings as-is): - - ``` ini - [sdl] - windowresolution = 800x600 - output = texturenb - texture_renderer = software - - [renderer] - scaler = none - glshader = none - - [cpu] - core = normal - ``` - - The state of Haiku's GPU Hardware-acceleration is being discussed here: - https://discuss.haiku-os.org/t/state-of-accelerated-opengl/4163 - -1. You may now run `dosbox` inside any directory in your Terminal. - -## Additional Tips - -### Compiler variations - -The compiler, version, and bit-depth can be selected by passing the following -common options to the **list-build-dependencies.sh** and **build.sh** scripts: - -- `--compiler clang` or `-c clang` to use CLang instead of GCC -- `--compiler-version 8` or `-v ` to specify a particular version of - compiler (if available in your package manager) -- `--bit-depth 32`, to build a 32-bit binary instead of 64-bit - -### Release types - -Build release types includes: - -- **release**, optimizes the binary and disables some checks, such as - assertions. -- **debug**, adds debug symbols and disables optimizations for ideal debugging. - - You can run the resulting binary in the GNU debugger: `gdb /path/to/ - dosbox`, followed by `run mygame.bat` -- **pgotrain** adds Profile Guided Optimization (PGO) tracking instrumentation - to the compiled binary. - - This allows the recording of profile statistics that can be used to compile a - PGO-optimized binary. Note that PGO optimization is different from - Automatic Feedback Directed Optimization (AutoFDO) mentioned below. - - After compiling your PGO binary, the build script presents instructions - describing how to generate and use the profiling data. - -- **warnmore**, displays additional helpful C and C++ warnings for developers. -- **fdotrain**, add tracing symbols used to generate AutoFDO sampling data. -- **$SANITIZER TYPE**, builds a binary instrumented with code to catch issues at - runtime that relate to the type of sanitizer being used. For example: memory - leaks, threading issues, and so on. This is for Linux and macOS only. - - - see `./scripts/build.sh --help` for a list of sanitizer-types that are - available. - - Run your binary like normal and it will generate output describing - problematic behavior - - Some sanitizers accept runtime options via an environment variables, - such as `ASAN_OPTIONS`, described here: - - -### Build Results, Rebuilding, and Cleaning - -After building, your `dosbox` or `dosbox.exe` binary will reside inside -`./dosbox-staging/src/`. - -The build script records the prior build type and will clean if needed between -builds. To manually remove all intermediate object files and ephemeral -auto-tools outputs, run `make distclean`. - -To additionally remove all files except for the repository files, use `git -clean -fdx`. - -### CCache - -The build script will make use of ccache, which saves compiled objects for -potential re-use in future builds (hence the name, "cache") to speed up build -times. If you performed the one-time installation step above, then you will -already have ccache installed. - -Simply having `ccache` in your path is sufficient to use it; you do not -need to invasively symlink `/usr/bin/gcc` -> `ccache`. - -The build script enables ccache's object compression, which significantly -reduces the size of the cache. It will also display cache statistics after each -build. To see more details, run `ccache -s`. - -To learn more about ccache run `ccache -h`, and read - - -### Optimization Modifiers - -The following modifier flags can be added when building a **release** type: - -- `-m lto`, optimize the entire object space instead of per-file (Only - available on Mac and Linux) - -- `-m fdo`, performs feedback directed optimizations (FDO) using an AutoFDO - data set. Export the `FDO_FILE` variable with the full path to your merged - FDO dataset. For example: - - - GCC: `export FDO_FILE=/full/path/to/current.afdo` and then build with: - - `./scripts/builds.sh -c gcc -t release -m fdo -m lto` - - - Clang: `export FDO_FILE=/full/path/to/current.profraw`, and then build - with: - - `./scripts/builds.sh -c clang -t release -m fdo -m lto` - - The section below describes how to collect an AutoFDO dataset for GCC and - Clang. - -## AutoFDO Procedures - -Feedback Directed Optimization (FDO) involves recording performance data from -the Linux kernel and using it to direct the compiler's optimizer. - -### Prerequisites for AutoFDO - -- An **Intel processor** that supports the last branch record (LBR) instruction. -- A Linux **kernel** built with Branch Profiling tracers enabled: - - ``` shell - CONFIG_PM_TRACE=y - CONFIG_TRACE_BRANCH_PROFILING=y - CONFIG_BRANCH_TRACER=y - ``` - - These can be enable directly in your kernel's `.config` file or using `make - menuconfig` via the following menu options: - 1. `Kernel hacking --->` - 1. `[*] Tracers --->` - 1. `Branch Profiling (Trace likely/unlikely profiler)` - 1. `(X) Trace likely/unlikely profiler` - -- The **AutoFDO** software package. It may be available via your package - manager or built from sources . - - - **Note about compiler versions** the autofdo binaries need to be compiled - with the exact version of the compiler that will later be used to compile - our final optimized version of dosbox-staging. - - So for example, if you install autofdo via package-manager, then it will be - valid for the default version of gcc and clang also installed by your - package manager. Where as if you plan to build with `gcc-`, then - you will need to compile autofdo from sources using `gcc-` by - pointing the `CC` and `CXX` environment variables to the newer gcc - binaries. - - - **Note about clang** If you plan to compile with a version of clang newer - than your package manager's default version, then you will need to compile - autofdo from source and configure it with the corresponding version of - `llvm-config`. For example, if I want to build with clang-10, then I would - configure autofdo with: `./configure --with-llvm=/usr/bin/llvm-config-10`. - - - The included `.github/scripts/build-autofdo.sh` script can be used to build - and install autofdo, for example: - - - default GCC: - - `sudo .github/scripts/build-autofdo.sh` - - newer GCC: - - ``` shell - export CC=/usr/bin/gcc-9 - export CXX=/usr/bin/g++-9 - sudo .github/scripts/build-autofdo.sh - ``` - - - Clang version 10: - - `sudo .github/scripts/build-autofdo.sh` - -- The **pmu-tools** software package, which can be downloaded from - This is a collection of python - scripts used to assist in capturing sampling data. - -### Record Data for AutoFDO Builds - -1. Ensure the custom Linux Kernel supporting LBR tracing is running. - -2. Build `dosbox-staging` from source using the `fdotrain` target: - `./scripts/build.h -c gcc -t fdotrain` - -3. Record kernel sample profiles while running dosbox-staging: - - `/path/to/pmu-tools/ocperf.py record -F max -o "samples-1.prof" -b -e - br_inst_retired.near_taken:pp -- /path/to/fdo-trained/dosbox ARGS` - - Where `samples-1.prof` is the file that will be filled with samples. - - Repeat this for multiple training runs, each time saving the output to a new - `-o samples-N.prof` file. Ideally you want to exercise all code paths in - dosbox-staging (core types, video cards, video modes, sound cards, and audio - codecs). - -4. Convert your sample profiles into compiler-specific records using tools - provided in the `autofdo` package: - - For GCC, run: - - `create_gcov --binary=/path/to/fdo-trained/dosbox - --profile=samples-1.prof -gcov=samples-1.afdo -gcov_version=1` - - ... for each `.prof` file, creating a corresponding `.afdo` file. - - - At this point, you now have an `.afdo` file for each `.prof` file. Merge - the `.afdo`s into a single `curren.afdo` file with: - - `profile_merger -gcov_version=1 -output_file=current.afdo *.afdo` - - For Clang, run: - - - `create_llvm_prof --binary=/path/to/fdo-trained/dosbox - --profile=samples-1.prof --out=samples-1.profraw` - - ... for each `*.prof` file, creating a corresponding `.profraw` file. - - - At this point, you now have a `.profraw` file for each `.prof` file. Merge - them into a single `current.profraw` file with: - - `llvm-profdata- merge -sample -output=current.profraw *.profraw` - -### Build Using AutoFDO Data - -You can now use your merged `.afdo` or `.profraw` file to build with the `-m -fdo` modifier by placing your `current.afdo/.profraw` file in the repo's root -directory, or point to it using the FDO_FILE environment variable, and launch -the build with `./scripts/build.sh -c -t release -m lto -m fdo`. +``` shell +meson setup build +ninja -C build scan-build +``` diff -Nru dosbox-staging-0.76.0/configure.ac dosbox-staging-0.77.0/configure.ac --- dosbox-staging-0.76.0/configure.ac 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/configure.ac 1970-01-01 00:00:00.000000000 +0000 @@ -1,732 +0,0 @@ -dnl Init. -AC_INIT(dosbox,[0.76.0]) -AC_DEFINE([CONF_BRAND],["staging"],[Suffix of the .conf file.]) -AC_PREREQ(2.50) -AC_CONFIG_SRCDIR(README) -AC_CONFIG_MACRO_DIR([m4]) - -dnl Turn on less verbose makefiles by default -dnl Change to 'no' or comment-out when debugging the buildsystem -AM_SILENT_RULES([yes]) - -dnl Check for pkg-config -PKG_PROG_PKG_CONFIG - -dnl Detect the canonical host and target build environment -AC_CANONICAL_HOST -AC_CANONICAL_BUILD - -dnl Setup for automake -AM_INIT_AUTOMAKE([foreign]) -AC_CONFIG_HEADER(config.h) - -dnl Checks for programs. -AM_PROG_AR -AC_PROG_MAKE_SET -AC_PROG_CC_C99 -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_INSTALL -AC_PROG_RANLIB - -dnl Prevent autoconf from leaking non-understood tokens into the configure script -m4_pattern_forbid([PKG_PROG_PKG_CONFIG]) -m4_pattern_forbid([PKG_CHECK_MODULES]) -m4_pattern_forbid([^AC_]) -m4_pattern_forbid([^AH_]) -m4_pattern_forbid([^AX_]) - -dnl Configure POSIX thread support -m4_pattern_allow(AX_PTHREAD_ZOS_MISSING) -m4_pattern_allow(AX_PTHREAD_CC_IS_CLANG) -AX_PTHREAD -LIBS="$PTHREAD_LIBS $LIBS" -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - -dnl Check for SDL -SDL_VERSION=2.0.2 -AM_PATH_SDL($SDL_VERSION, - :, - AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) -) -PRESDL_LIBS="$LIBS" -LIBS="$LIBS $SDL_LIBS" -CPPFLAGS="$CPPFLAGS $SDL_CFLAGS" - -AH_TEMPLATE(C_MODEM,[Define to 1 to enable internal modem support, requires SDL2_net]) -AH_TEMPLATE(C_IPX,[Define to 1 to enable IPX over Internet networking, requires SDL2_net]) -AC_ARG_ENABLE(network, - AS_HELP_STRING([--disable-network], - [Disable networking features (modem, ipx)]),, - enable_network=yes) -AC_CHECK_HEADER(SDL_net.h, have_sdl_net_h=yes,) -AC_CHECK_LIB(SDL2_net, SDLNet_Init, have_sdl_net_lib=yes, , ) -AC_MSG_CHECKING([whether networking features will be enabled]) -if test x$enable_network = xyes ; then - if test x$have_sdl_net_lib = xyes -a x$have_sdl_net_h = xyes ; then - libtype="" - if test x$enable_sdl_static = xyes ; then - libtype="(static)" - case "$host" in - *-*-darwin*) - LIBS="$PRESDL_LIBS /usr/local/lib/libSDL2_net.a $SDL_LIBS" - ;; - *) - AC_MSG_WARN(m4_normalize([Statically linking SDL2 is unreliable. - Please ensure that "libSDL2_net.a" is available.])) - LIBS="$PRESDL_LIBS -Wl,-Bstatic -lSDL2_net -Wl,-Bdynamic $SDL_LIBS" - ;; - esac - else - LIBS="$PRESDL_LIBS -lSDL2_net $SDL_LIBS" - fi - AC_DEFINE(C_MODEM,1) - AC_DEFINE(C_IPX,1) - AC_MSG_RESULT([yes $libtype]) - case "$host_os" in haiku*) - AC_CHECK_LIB(network, socket, [], - [AC_MSG_ERROR([Can't find a useable network libary])], - -l network) - ;; - esac - else - AC_MSG_WARN([Can't find SDL2_net, internal modem and ipx disabled]) - fi -else - AC_MSG_RESULT([no]) -fi - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_INLINE -AC_C_BIGENDIAN -AC_STRUCT_TM -AC_CHECK_SIZEOF(int *) - -dnl Require compiler with C++14 support. -dnl Allow GNU extensions to work around MinGW bugs around POSIX compatibility. -AC_LANG(C++) -AX_CXX_COMPILE_STDCXX_14(ext, mandatory) - -dnl Checks for header files. - -dnl some semi complex check for sys/socket so it works on darwin as well -AC_CHECK_HEADERS([stdlib.h sys/types.h]) -AC_CHECK_HEADERS([sys/socket.h netinet/in.h pwd.h], [], [], -[#include -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -]) - -dnl check for the socklen_t (darwin doesn't always have it) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -])],[],[AC_DEFINE([socklen_t],[int],[Define to `int` if you don't have socklen_t])]) - -AC_MSG_CHECKING(if environ can be included) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include -#include ]],[[*environ;]])], -[AC_MSG_RESULT(yes);AC_DEFINE(ENVIRON_INCLUDED,1,[environ can be included])],AC_MSG_RESULT(no)) - -AC_MSG_CHECKING(if environ can be linked) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern char ** environ;]],[[*environ;]])], -[AC_MSG_RESULT(yes);AC_DEFINE(ENVIRON_LINKED,1,[environ can be linked])],AC_MSG_RESULT(no)) - -AC_MSG_CHECKING([if dirent includes d_type]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include -#include -void blah(){ -struct dirent d_test; -d_test.d_type = 0; -}])],[AC_MSG_RESULT(yes);AC_DEFINE(DIRENT_HAS_D_TYPE,1,[struct dirent has d_type])],AC_MSG_RESULT(no)) - - -dnl Look for clock_gettime, a DB_HAVE_CLOCK_GETTIME is set when present -AH_TEMPLATE([DB_HAVE_CLOCK_GETTIME],[Determines if the function clock_gettime is available.]) -AC_SEARCH_LIBS([clock_gettime], [rt] , [found_clock_gettime=yes], [found_clock_gettime=no]) -if test x$found_clock_gettime = xyes; then - AC_DEFINE(DB_HAVE_CLOCK_GETTIME) -fi - -dnl Checks for libraries. - -#Check if the compiler support attributes -AH_TEMPLATE([C_HAS_ATTRIBUTE],[Determines if the compiler supports attributes for structures.]) -AC_MSG_CHECKING(if compiler allows __attribute__) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -typedef struct { } __attribute__((packed)) junk;]], -[[ ]])],[ AC_MSG_RESULT(yes);AC_DEFINE(C_HAS_ATTRIBUTE)],AC_MSG_RESULT(no)) - - -#Check if the compiler supports certain attributes -OLDCFLAGS="$CFLAGS" -CFLAGS="-Werror" - -AH_TEMPLATE([C_ATTRIBUTE_ALWAYS_INLINE],[Determines if the compiler supports always_inline attribute.]) -AC_MSG_CHECKING(if compiler allows __attribute__((always_inline)) ) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ inline void __attribute__((always_inline)) test(){} -])],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_ALWAYS_INLINE)],AC_MSG_RESULT(no)) - -CFLAGS="$OLDCFLAGS" - - -#Check if the compiler supports __builtin_expect -#Switch language to c++ -AC_LANG_PUSH(C++) -AH_TEMPLATE([C_HAS_BUILTIN_EXPECT],[Determines if the compilers supports __builtin_expect for branch prediction.]) -AC_MSG_CHECKING(if compiler allows __builtin_expect) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ -int x=10;if( __builtin_expect ((x==1),0) ) ; -]])], [ AC_MSG_RESULT(yes);AC_DEFINE(C_HAS_BUILTIN_EXPECT)],AC_MSG_RESULT(no)) -#switch language back -AC_LANG_POP(C++) - -dnl When on macOS, enable support for Apple's Core MIDI and/or Core Audio if our compiler can #include their headers -case "$host" in - *-*-darwin*) - AC_MSG_CHECKING(if compiler supports Apple's Core MIDI headers) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ - #include - int blah() { return 0; } - ]])], [AC_MSG_RESULT(yes);LIBS="$LIBS -framework CoreMIDI -framework CoreFoundation";AC_DEFINE([C_SUPPORTS_COREMIDI], [], - [Compiler supports Core MIDI headers])], - AC_MSG_RESULT(no);AC_MSG_WARN([Compiler can't compile Apple headers. CoreMIDI functionality disabled. Please use the Apple compiler!])) - - AC_MSG_CHECKING(if compiler supports Apple's Core Audio headers) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int blah() { return 0; } - ]])], [AC_MSG_RESULT(yes);LIBS="$LIBS -framework AudioUnit -framework AudioToolbox";AC_DEFINE([C_SUPPORTS_COREAUDIO], [], - [Compiler supports Core Audio headers])], - AC_MSG_RESULT(no);AC_MSG_WARN([Compiler can't compile Apple headers. CoreAudio functionality disabled. Please use the Apple compiler!])) - ;; -esac - -dnl enable disable alsa and pass it's cflags to CXXFLAGS -AC_ARG_ENABLE(alsa-midi, -AC_HELP_STRING([--enable-alsa-midi],[compile with alsa midi support (default yes)]), -[ case "${enableval}" in - yes) alsa_midi=true;; - no) alsa_midi=false;; -esac], -[alsa_midi=true]) -if test x$alsa_midi = xtrue ; then - AM_PATH_ALSA(0.9.0, AC_DEFINE(HAVE_ALSA,1,[Define to 1 to use ALSA for MIDI]) , : ) - CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS" -fi - -#Features to enable/disable -AH_TEMPLATE(C_DEBUG,[Define to 1 to enable internal debugger, requires ncurses or pdcurses]) -AH_TEMPLATE(C_HEAVY_DEBUG,[Define to 1 to enable heavy debugging, requires C_DEBUG]) -AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable internal debugger]),,) -AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug=heavy], [Enable internal debugger with heavy debugging]),,) -if test x$enable_debug = xyes -o x$enable_debug = xheavy; then - AC_MSG_NOTICE([debugger was requested, finding curses library ...]) - PKG_CHECK_MODULES(NCURSES, ncurses, [ - curses=ncurses - LIBS="$LIBS ${NCURSES_LIBS}" - CPPFLAGS="$CPPFLAGS ${NCURSES_CFLAGS}"], [ - PKG_CHECK_MODULES(NCURSESW, ncursesw, [ - curses=ncursesw - LIBS="$LIBS ${NCURSESW_LIBS}" - CPPFLAGS="$CPPFLAGS ${NCURSESW_CFLAGS}"], [ - PKG_CHECK_MODULES(PDCURSES, pdcurses, [ - curses=pdcurses - LIBS="$LIBS ${PDCURSES_LIBS}" - CPPFLAGS="$CPPFLAGS ${PDCURSES_CFLAGS}"],[]) ]) ]) - if test x$enable_debug = xyes; then - AC_DEFINE(C_DEBUG,1) - AC_MSG_NOTICE([debugger enabled using the $curses library]) - else - AC_DEFINE(C_DEBUG,1) - AC_DEFINE(C_HEAVY_DEBUG,1) - AC_MSG_NOTICE([debugger with heavy debugging enabled using the $curses library]) - fi -elif test empty$enable_debug != empty -a x$enable_debug != xno; then - AC_MSG_ERROR(--enable-debug=$enable_debug was requested but the value "$enable_debug" is invalid) -fi - -AH_TEMPLATE(C_CORE_INLINE,[Define to 1 to use inlined memory functions in cpu core]) -AC_ARG_ENABLE(core-inline,AC_HELP_STRING([--disable-core-inline],[Disable inlined memory handling in CPU Core]),,enable_core_inline=yes) -AC_MSG_CHECKING(whether memory handling in the CPU Core will be inlined) -if test x$enable_core_inline = xyes ; then - AC_MSG_RESULT(yes) - AC_DEFINE(C_CORE_INLINE,1) -else - AC_MSG_RESULT(no) -fi - -dnl The target cpu checks for dynamic cores -AH_TEMPLATE(C_TARGETCPU,[The type of cpu this target has]) -AC_MSG_CHECKING(for target cpu type) -case "$host_cpu" in - x86_64 | amd64) - AC_DEFINE(C_TARGETCPU,X86_64) - AC_MSG_RESULT(x86-64 bit compatible) - c_targetcpu="x86_64" - c_unalignedmemory=yes - ;; - i?86) - AC_DEFINE(C_TARGETCPU,X86) - AC_MSG_RESULT(x86 compatible) - c_targetcpu="x86" - c_unalignedmemory=yes - ;; - powerpc64le*) - AC_DEFINE(C_TARGETCPU,PPC64LE) - AC_DEFINE(PAGESIZE,65536,Non-4K page size; currently ppc64le only) - AC_MSG_RESULT(OpenPOWER) - c_targetcpu="ppc64le" - c_unalignedmemory=yes - ;; - powerpc*) - AC_DEFINE(C_TARGETCPU,POWERPC) - AC_MSG_RESULT(PowerPC) - c_targetcpu="powerpc" - c_unalignedmemory=yes - ;; - m68k*) - AC_DEFINE(C_TARGETCPU,M68K) - AC_MSG_RESULT(Motorola 68000) - c_targetcpu="m68k" - c_unalignedmemory=yes - ;; - armv7l) - AC_DEFINE(C_TARGETCPU,ARMV7LE) - AC_MSG_RESULT(ARMv7 Little Endian) - c_targetcpu="arm" - c_unalignedmemory=yes - ;; - armv6l) - AC_DEFINE(C_TARGETCPU,ARMV4LE) - AC_MSG_RESULT(ARMv6 Little Endian) - c_targetcpu="arm" - dnl c_unalignedmemory=yes - ;; - aarch64) - AC_DEFINE(C_TARGETCPU,ARMV8LE) - AC_MSG_RESULT(ARMv8 Little Endian 64-bit) - c_targetcpu="arm" - c_unalignedmemory=yes - ;; - *) - AC_DEFINE(C_TARGETCPU,UNKNOWN) - AC_MSG_RESULT(unknown) - c_unalignedmemory=no - ;; -esac - -dnl check for size of pointer being 4 -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#if SIZEOF_INT_P != 4 -#error size intp is not 4, this not something to worry about -#endif -void blah() {} -])],[c_sizep=4],[c_sizep=0]) - -dnl automake 1.14 and upwards rewrite the host to have always 64 bit unless i386 as host is passed -dnl this can make building a 32 bit executable a bit tricky, as dosbox relies on the host to select the -dnl dynamic/dynrec core -case "$host" in - *-*-darwin*) - AC_MSG_CHECKING([whether Apple user wants to override the build process to produce a 32 bit binary]) - if test x$c_targetcpu = xx86_64 -a x$c_sizep = x4 ; then - AC_MSG_RESULT(yes) - AC_DEFINE(C_TARGETCPU,X86) - c_targetcpu="x86" - else - AC_MSG_RESULT(no) - fi - ;; -esac - -AC_ARG_ENABLE(dynamic-core,AC_HELP_STRING([--disable-dynamic-core],[Disable all dynamic cores]),,enable_dynamic_core=yes) - -AH_TEMPLATE(C_DYNAMIC_X86,[Define to 1 to use x86/x64 dynamic cpu core]) -AC_ARG_ENABLE(dynamic-x86,AC_HELP_STRING([--disable-dynamic-x86],[Disable x86/x64 dynamic cpu core]),,enable_dynamic_x86=yes) -AC_MSG_CHECKING(whether x86 dynamic cpu core will be enabled) -if test x$enable_dynamic_x86 = xno -o x$enable_dynamic_core = xno; then - AC_MSG_RESULT(no) -else - if test x$c_targetcpu = xx86 -o x$c_targetcpu = xx86_64; then - AC_DEFINE(C_DYNAMIC_X86,1) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi -fi - -AH_TEMPLATE(C_DYNREC,[Define to 1 to use recompiling cpu core. Can not be used together with the dynamic-x86 core]) -AC_ARG_ENABLE(dynrec,AC_HELP_STRING([--disable-dynrec],[Disable recompiling cpu core]),,enable_dynrec=yes) -AC_MSG_CHECKING(whether recompiling cpu core will be enabled) -if test x$enable_dynrec = xno -o x$enable_dynamic_core = xno; then - AC_MSG_RESULT(no) -else -dnl x86 only enable it if dynamic-x86 is disabled. - if test x$c_targetcpu = xx86 -o x$c_targetcpu = xx86_64; then - if test x$enable_dynamic_x86 = xno ; then - AC_DEFINE(C_DYNREC,1) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT([no, using dynamic-x86]) - fi - else - if test x$c_targetcpu = xarm -o x$c_targetcpu = xppc64le -o x$c_targetcpu = xpowerpc ; then - AC_DEFINE(C_DYNREC,1) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - fi -fi - -AH_TEMPLATE(C_FPU,[Define to 1 to enable floating point emulation]) -AC_ARG_ENABLE(fpu,AC_HELP_STRING([--disable-fpu],[Disable fpu support]),,enable_fpu=yes) -AC_MSG_CHECKING(whether fpu emulation will be enabled) -if test x$enable_fpu = xyes ; then - AC_MSG_RESULT(yes) - AC_DEFINE(C_FPU,1) -else - AC_MSG_RESULT(no) -fi - -AH_TEMPLATE(C_FPU_X86,[Define to 1 to use a x86/x64 assembly fpu core]) -AC_ARG_ENABLE(fpu-x86,AC_HELP_STRING([--disable-fpu-x86],[Disable x86 assembly fpu core]),,enable_fpu_x86=yes) -AC_ARG_ENABLE(fpu-x64,AC_HELP_STRING([--disable-fpu-x64],[Disable x64 assembly fpu core]),,enable_fpu_x64=yes) -AC_MSG_CHECKING(whether the x86/x64 assembly fpu core will be enabled) -if test x$enable_fpu_x86 = xno -o x$enable_fpu_x64 = xno; then - AC_MSG_RESULT(no) -else - if test x$enable_fpu = xyes; then - if test x$c_targetcpu = xx86 -o x$c_targetcpu = xx86_64; then - AC_DEFINE(C_FPU_X86,1) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - else - AC_MSG_RESULT(no) - fi -fi - -AH_TEMPLATE(C_UNALIGNED_MEMORY,[Define to 1 to use a unaligned memory access]) -AC_ARG_ENABLE(unaligned_memory,AC_HELP_STRING([--disable-unaligned-memory],[Disable unaligned memory access]),,enable_unaligned_memory=yes) -AC_MSG_CHECKING(whether to enable unaligned memory access) -if test x$enable_unaligned_memory = xyes -a x$c_unalignedmemory = xyes; then - AC_DEFINE(C_UNALIGNED_MEMORY,1) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AH_TEMPLATE(C_SSHOT, [Define to 1 to enable screenshots, requires libpng]) -AC_ARG_ENABLE(screenshots, - AC_HELP_STRING([--disable-screenshots], - [Disable screenshots and movie recording]), - enable_screenshots=no, - enable_screenshots=yes) -AC_ARG_ENABLE(png_static, - AC_HELP_STRING([--enable-png-static], - [Link libpng statically (not recommended)]), - enable_png_static=yes, - enable_png_static=no) -if test x"$enable_screenshots" = x"yes"; then - if test x"$enable_png_static" = x"yes"; then - case "$host" in - *-*-darwin*) - libpng_LIBS="/usr/local/lib/libpng.a" - AC_MSG_NOTICE([checking for libpng... using macOS brew library]) - ;; - *) - PKG_CHECK_MODULES([libpng], [libpng], - [libpng_LIBS="-Wl,-Bstatic $libpng_LIBS -Wl,-Bdynamic"]) - ;; - esac - else - PKG_CHECK_MODULES([libpng], [libpng]) - fi - dnl If our libs are empty, then PNG wasn't found - if test x"$libpng_LIBS" = x""; then - AC_MSG_RESULT([screenshots disabled... can't find libpng!]) - else - AC_DEFINE(C_SSHOT, 1) - LIBS="$LIBS $libpng_LIBS -lz" - CXXFLAGS="$CXXFLAGS $libpng_CFLAGS" - AC_MSG_NOTICE([screenshots enabled... using $libpng_LIBS]) - fi -else - AC_MSG_RESULT([no]) -fi - -dnl Ogg Opus handling -dnl ----------------- -dnl We want Opus tracks supported by default, and we also want the user -dnl to be aware if there's a problem finding the Opus dependencies so -dnl they can either a) install the opusfile library or b) explicitly -dnl disable Opus. - -dnl To achieve this, we provide a --disable-opus-cdda configure option -dnl but by default we look for Opus and fail if we can't find it. -dnl We only skip supporting Opus if the user explicitly passes the -dnl --disable-opus-cdda argument. -AC_ARG_ENABLE(opus-cdda, - AS_HELP_STRING([--disable-opus-cdda], - [Disable Opus CD audio track support])) -AS_IF([test "x${enable_opus_cdda}" != "xno"], - AC_MSG_NOTICE([OPUSFILE dependency can be disabled with --disable-opus-cdda]) - [PKG_CHECK_MODULES([OPUSFILE], - [opusfile], - [LIBS="$LIBS $OPUSFILE_LIBS" HAVE_OPUS=yes])]) - -AM_CONDITIONAL(USE_OPUS, test "${HAVE_OPUS}" = "yes") - - -dnl FluidSynth software MIDI synthesiser -dnl ------------------------------------ -dnl -AH_TEMPLATE(C_FLUIDSYNTH, [Define to 1 to enable FluidSynth MIDI synthesiser]) -AC_ARG_ENABLE(fluidsynth, - AS_HELP_STRING([--disable-fluidsynth], - [Disable FluidSynth integration])) - -if test "${enable_fluidsynth}" != "no" ; then - AC_MSG_NOTICE([FLUIDSYNTH dependency can be disabled with --disable-fluidsynth]) - PKG_CHECK_MODULES(FLUIDSYNTH, - fluidsynth >= 2, - [LIBS="$LIBS $FLUIDSYNTH_LIBS $GLIB_LIBS" - CPPFLAGS="$CPPFLAGS $FLUIDSYNTH_CFLAGS" - USE_FLUIDSYNTH="yes"]) - AC_DEFINE(C_FLUIDSYNTH,1) -else - AC_DEFINE(C_FLUIDSYNTH,0) - AC_MSG_WARN([FluidSynth integration disabled]) -fi - - -dnl OpenGL support -dnl -------------- -AH_TEMPLATE(C_OPENGL,[Define to 1 to use opengl display output support]) -AC_CHECK_LIB(GL, main, have_gl_lib=yes, have_gl_lib=no , ) -AC_CHECK_LIB(opengl32, main, have_opengl32_lib=yes,have_opengl32_lib=no , ) -AC_CHECK_HEADER(GL/gl.h, have_gl_h=yes , have_gl_h=no , ) -AC_ARG_ENABLE(opengl,AC_HELP_STRING([--disable-opengl],[Disable opengl support]),,enable_opengl=yes) -AC_MSG_CHECKING(whether opengl display output will be enabled) -if test x$enable_opengl = xyes; then -case "$host" in - *-*-darwin*) - AC_MSG_RESULT(yes) - LIBS="$LIBS -framework OpenGL -framework CoreFoundation" - AC_DEFINE(C_OPENGL,1) - ;; - *) - if test x$have_gl_h = xyes -a x$have_gl_lib = xyes ; then - AC_MSG_RESULT(yes) - LIBS="$LIBS -lGL" - AC_DEFINE(C_OPENGL,1) - elif test x$have_gl_h = xyes -a x$have_opengl32_lib = xyes ; then - AC_MSG_RESULT(yes) - LIBS="$LIBS -lopengl32" - AC_DEFINE(C_OPENGL,1) - else - AC_MSG_RESULT(no) - fi - ;; -esac -else - AC_MSG_RESULT(no) -fi - -dnl Unit Tests -dnl ---------- -dnl -AC_ARG_ENABLE([tests], - AS_HELP_STRING([--enable-tests], - [Build Unit Tests (requires Google Test framework)])) - -if test "${enable_tests}" = "yes" ; then - PREGTEST_CXXFLAGS="$CXXFLAGS" - dnl Start with checking if gtest is available as a static lib - dnl this will work e.g. on Debian or Ubuntu - AC_MSG_CHECKING(for Google Test framework (static lib)) - CXXFLAGS="-Wl,-Bstatic -lgtest_main -lgtest -Wl,-Bdynamic" - AC_LINK_IFELSE( - [AC_LANG_SOURCE([ - #include - namespace { TEST(Foo, Bar) { ASSERT_TRUE(true); } } - ])], - [AC_MSG_RESULT(yes); HAVE_GTEST=yes; HAVE_GTEST_STATIC=yes], - [AC_MSG_RESULT(no)]) - dnl Also check if maybe it's available as a shared lib - dnl this will work e.g. on Fedora or Arch - AC_MSG_CHECKING(for Google Test framework (shared lib)) - CXXFLAGS="-lgtest_main -lgtest" - AC_LINK_IFELSE( - [AC_LANG_SOURCE([ - #include - namespace { TEST(Foo, Bar) { ASSERT_TRUE(true); } } - ])], - [AC_MSG_RESULT(yes); HAVE_GTEST=yes], - [AC_MSG_RESULT(no)]) - dnl Fail loudly if gtest is missing - AS_IF([test "${HAVE_GTEST}" != "yes"], - [AC_MSG_ERROR(Google Test framework not found!)]) - dnl Restore C++ compilation flags - CXXFLAGS="$PREGTEST_CXXFLAGS" -fi - -AM_CONDITIONAL(BUILD_TESTS, test "${HAVE_GTEST}" = "yes") -AM_CONDITIONAL(USE_GTEST_STATIC, test "${HAVE_GTEST_STATIC}" = "yes") - -dnl Check for mprotect. Needed for 64 bits linux -AH_TEMPLATE(C_HAVE_MPROTECT,[Define to 1 if you have the mprotect function]) -AC_CHECK_HEADER([sys/mman.h], [ -AC_CHECK_FUNC([mprotect],[AC_DEFINE(C_HAVE_MPROTECT,1)]) -]) - -dnl Check for realpath. Used on Linux -AC_CHECK_FUNCS([realpath]) - -dnl Setpriority -AH_TEMPLATE(C_SET_PRIORITY,[Define to 1 if you have setpriority support]) -AC_MSG_CHECKING(for setpriority support) -AC_LINK_IFELSE([AC_LANG_SOURCE([ -#include -int main(int argc,char * argv[]) { - return setpriority (PRIO_PROCESS, 0,PRIO_MIN+PRIO_MAX); -}; -])],AC_MSG_RESULT(yes);AC_DEFINE(C_SET_PRIORITY,1),AC_MSG_RESULT(no)) - - -dnl Some target detection and actions for them -case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-msys*) - LIBS="$LIBS -lwinmm" - AC_DEFINE(WIN32, 1, [Compiling on Windows]) - AC_DEFINE(NOMINMAX, 1, [Prevent from clobbering std::min and std::max]) - AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32 and Posix).]) - if test x$have_sdl_net_lib = xyes -a x$have_sdl_net_h = xyes ; then - LIBS="$LIBS -lws2_32" - if test x$enable_sdl_static = xyes ; then - LIBS="$LIBS -liphlpapi" - fi - fi - ;; - *-*-darwin*) - dnl We have a problem here: both Mac OS X and Darwin report - dnl the same signature "powerpc-apple-darwin*" - so we have - dnl to do more to distinguish them. - dnl For now I am lazy and do not add proper detection code. - AC_DEFINE(MACOSX, 1, [Compiling on Mac OS X]) - AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32 and Posix).]) - ;; - *-*-linux*) - AC_DEFINE(LINUX, 1, [Compiling on GNU/Linux]) - AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32 and Posix).]) - ;; - *-*-freebsd* | *-*-dragonfly* | *-*-netbsd* | *-*-openbsd*) - dnl Disabled directserial for now. It doesn't do anything without - dnl specifying an extra ifdef in directserial_posix.* - dnl directserial detection should be rewritten to test for the needed - dnl functions and headers. I currently do not know - dnl which ones are needed for BSD - AC_DEFINE(BSD, 1, [Compiling on BSD]) - AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32 and Posix).]) - ;; -esac - -dnl Some stuff for the icon. -case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-msys*) - dnl Some stuff for the ico - AC_CHECK_TOOL(WINDRES, windres, :) - ;; - *) - WINDRES=":" - ;; -esac - AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:") - AC_SUBST(WINDRES) - -AH_TOP([ -/* - * Copyright (C) 2019-2020 The dosbox-staging team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -]) - -AH_BOTTOM([#if C_ATTRIBUTE_ALWAYS_INLINE -#define INLINE inline __attribute__((always_inline)) -#else -#define INLINE inline -#endif]) - -AC_CONFIG_FILES([ -Makefile -docs/Makefile -include/Makefile -src/Makefile -src/cpu/Makefile -src/cpu/core_full/Makefile -src/cpu/core_normal/Makefile -src/cpu/core_dyn_x86/Makefile -src/cpu/core_dynrec/Makefile -src/debug/Makefile -src/dos/Makefile -src/fpu/Makefile -src/gui/Makefile -src/hardware/Makefile -src/hardware/mame/Makefile -src/hardware/serialport/Makefile -src/ints/Makefile -src/libs/Makefile -src/libs/zmbv/Makefile -src/libs/gui_tk/Makefile -src/libs/decoders/Makefile -src/libs/nuked/Makefile -src/libs/ppscale/Makefile -src/midi/Makefile -src/misc/Makefile -src/shell/Makefile -src/platform/Makefile -src/platform/visualc/Makefile -tests/Makefile -]) -AC_OUTPUT diff -Nru dosbox-staging-0.76.0/contrib/fedora/dosbox-staging.spec dosbox-staging-0.77.0/contrib/fedora/dosbox-staging.spec --- dosbox-staging-0.76.0/contrib/fedora/dosbox-staging.spec 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/fedora/dosbox-staging.spec 2021-07-02 15:47:39.000000000 +0000 @@ -1,27 +1,31 @@ Name: dosbox-staging -Version: 0.75.2 -Release: 1%{?dist} +Version: 0.76.0 +Release: 2%{?dist} Summary: DOS/x86 emulator focusing on ease of use License: GPLv2+ URL: https://dosbox-staging.github.io/ Source: https://github.com/dosbox-staging/dosbox-staging/archive/v%{version}/%{name}-%{version}.tar.gz # This package is a drop-in replacement for dosbox -Provides: dosbox +Provides: dosbox = %{version}-%{release} +Obsoletes: dosbox < 0.74.4 -BuildRequires: gcc-c++ -BuildRequires: gcc -BuildRequires: automake BuildRequires: alsa-lib-devel -BuildRequires: libpng-devel -BuildRequires: SDL2-devel -BuildRequires: SDL2_net-devel -BuildRequires: opusfile-devel -BuildRequires: librsvg2-tools +BuildRequires: automake BuildRequires: desktop-file-utils +BuildRequires: fluidsynth-devel >= 2.0 +BuildRequires: gcc +BuildRequires: gcc-c++ BuildRequires: libappstream-glib +BuildRequires: libpng-devel +BuildRequires: librsvg2-tools +BuildRequires: make +BuildRequires: opusfile-devel +BuildRequires: SDL2-devel >= 2.0.2 +BuildRequires: SDL2_net-devel Requires: hicolor-icon-theme +Requires: fluid-soundfont-gm %description @@ -41,23 +45,23 @@ %prep -%autosetup -n %{name}-%{version} +%autosetup %build ./autogen.sh -%configure \ +%{configure} \ CPPFLAGS="-DNDEBUG" \ CFLAGS="${CFLAGS/-O2/-O3}" \ CXXFLAGS="${CXXFLAGS/-O2/-O3}" # binary -%{__make} %{_smp_mflags} +%{make_build} # icons %{__make} -C contrib/icons hicolor %install -make install DESTDIR=%{buildroot} +%{make_install} pushd contrib/icons/hicolor install -p -m 0644 -Dt %{buildroot}%{_datadir}/icons/hicolor/16x16/apps 16x16/apps/%{name}.png @@ -88,6 +92,16 @@ %changelog +* Tue Jan 26 2021 Patryk Obara (pbo) +- 0.76.0-2 +- Tighten dependencies checks + +* Mon Jan 25 2021 Patryk Obara (pbo) +- 0.76.0-1 +- Update to 0.76.0 +- Add fluidsynth-devel build dependency (new feature) +- Add fluid-soundfont-gm runtime dependency (default soundfont) + * Tue Oct 27 2020 Patryk Obara (pbo) - 0.75.2-1 - Update to 0.75.2 diff -Nru dosbox-staging-0.76.0/contrib/fedora/RPMBUILD.md dosbox-staging-0.77.0/contrib/fedora/RPMBUILD.md --- dosbox-staging-0.76.0/contrib/fedora/RPMBUILD.md 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/fedora/RPMBUILD.md 2021-07-02 15:47:39.000000000 +0000 @@ -23,6 +23,6 @@ $ sudo dnf install -y fedora-packager $ echo "" > ~/.fedora.upn $ kinit @FEDORAPROJECT.ORG - $ koji build --scratch f33 ~/rpmbuild/SRPMS/dosbox-staging-0.75.2-* + $ koji build --scratch f33 ~/rpmbuild/SRPMS/dosbox-staging-0.76.0-* Koji will print build status and URL (Task info). diff -Nru dosbox-staging-0.76.0/contrib/icons/.gitignore dosbox-staging-0.77.0/contrib/icons/.gitignore --- dosbox-staging-0.76.0/contrib/icons/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/icons/.gitignore 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,4 @@ dosbox-staging.iconset -icon_*.png +./icon_*.png favicon*.png hicolor/ diff -Nru dosbox-staging-0.76.0/contrib/icons/icons.md dosbox-staging-0.77.0/contrib/icons/icons.md --- dosbox-staging-0.76.0/contrib/icons/icons.md 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/icons/icons.md 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,10 @@ This directory contains resources to re-build icon files for various operating systems. +# Install + +Run `make help` to see usage examples. + # Base design Base icon source file is `dosbox-staging.svg`. It contains scalable icon of @@ -39,7 +43,7 @@ ## Linux -Base design icon follows size and colour recommendations of Gnome HIG, so you +Base design icon follows size and colour recommendations of GNOME HIG, so you can use it directly, no pre-processing is needed. When packaging for Linux, copy and rename `dosbox-staging.svg` icon to distro diff -Nru dosbox-staging-0.76.0/contrib/icons/Makefile dosbox-staging-0.77.0/contrib/icons/Makefile --- dosbox-staging-0.76.0/contrib/icons/Makefile 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/icons/Makefile 2021-07-02 15:47:39.000000000 +0000 @@ -1,10 +1,15 @@ .PHONY: help clean favicons help: - @echo "Re-generate icons in platform specific formats." - @echo - @echo "Available targets:" - @echo " hicolor - Freedesktop icon directory structure" + @echo "Re-generate icons in platform specific formats or install pre-rendered png icons" + @echo "" + @echo "Usage:" + @echo " make install # install icons to \$${DESTDIR}/usr/local/share/icons/..." + @echo " make install prefix=/usr # install icons to \$${DESTDIR}/usr/share/icons/..." + @echo " make install datadir=foo # install icons to \$${DESTDIR}foo/icons/..." + @echo "" + @echo "Other available targets:" + @echo " hicolor - generate freedesktop.org icon directory structure" @echo " dosbox-staging.ico - Windows format" @echo " dosbox-staging.icns - macOS format" @echo " icon_.png - render icon in specific size, e.g. icon_24.png" @@ -133,6 +138,15 @@ favicon-96x96.png: icon_96.png cp $< $@ +prefix = /usr/local +datadir = $(prefix)/share +install: + install -p -m 0644 -Dt "$(DESTDIR)$(datadir)/icons/hicolor/16x16/apps" small-png/16x16/dosbox-staging.png + install -p -m 0644 -Dt "$(DESTDIR)$(datadir)/icons/hicolor/22x22/apps" small-png/22x22/dosbox-staging.png + install -p -m 0644 -Dt "$(DESTDIR)$(datadir)/icons/hicolor/24x24/apps" small-png/24x24/dosbox-staging.png + install -p -m 0644 -Dt "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps" small-png/32x32/dosbox-staging.png + install -p -m 0644 -Dt "$(DESTDIR)$(datadir)/icons/hicolor/scalable/apps" dosbox-staging.svg + clean: rm -rf dosbox-staging.iconset rm -rf hicolor diff -Nru dosbox-staging-0.76.0/contrib/icons/meson.build dosbox-staging-0.77.0/contrib/icons/meson.build --- dosbox-staging-0.76.0/contrib/icons/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/icons/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,13 @@ +icons_hicolor = data_dir / 'icons' / 'hicolor' + +# small pre-rendered raster icons +# +foreach size : ['16x16', '22x22', '24x24', '32x32'] + install_data('small-png' / size / 'dosbox-staging.png', + install_dir : icons_hicolor / size / 'apps') +endforeach + +# scalable vector icon +# +install_data('dosbox-staging.svg', + install_dir : icons_hicolor / 'scalable' / 'apps') Binary files /tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/icons/small-png/16x16/dosbox-staging.png and /tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/icons/small-png/16x16/dosbox-staging.png differ Binary files /tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/icons/small-png/22x22/dosbox-staging.png and /tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/icons/small-png/22x22/dosbox-staging.png differ Binary files /tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/icons/small-png/24x24/dosbox-staging.png and /tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/icons/small-png/24x24/dosbox-staging.png differ Binary files /tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/icons/small-png/32x32/dosbox-staging.png and /tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/icons/small-png/32x32/dosbox-staging.png differ diff -Nru dosbox-staging-0.76.0/contrib/linux/dosbox-staging.metainfo.xml dosbox-staging-0.77.0/contrib/linux/dosbox-staging.metainfo.xml --- dosbox-staging-0.76.0/contrib/linux/dosbox-staging.metainfo.xml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/linux/dosbox-staging.metainfo.xml 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ - + io.github.dosbox-staging CC0-1.0 diff -Nru dosbox-staging-0.76.0/contrib/linux/meson.build dosbox-staging-0.77.0/contrib/linux/meson.build --- dosbox-staging-0.76.0/contrib/linux/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/linux/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,5 @@ +install_data('dosbox-staging.desktop', + install_dir : data_dir / 'applications') + +install_data('dosbox-staging.metainfo.xml', + install_dir : data_dir / 'metainfo') diff -Nru dosbox-staging-0.76.0/contrib/macos/Info.plist.template dosbox-staging-0.77.0/contrib/macos/Info.plist.template --- dosbox-staging-0.76.0/contrib/macos/Info.plist.template 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/macos/Info.plist.template 2021-07-02 15:47:39.000000000 +0000 @@ -27,13 +27,13 @@ APPL CFBundleShortVersionString - 0.76.0 + 0.77.0 CFBundleVersion %VERSION% NSHumanReadableCopyright - Copyright 2020 The dosbox-staging team + Copyright 2021 The DOSBox Staging Team NSPrincipalClass NSApplication diff -Nru dosbox-staging-0.76.0/contrib/old-translations/cs/cestina.lng dosbox-staging-0.77.0/contrib/old-translations/cs/cestina.lng --- dosbox-staging-0.76.0/contrib/old-translations/cs/cestina.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/cs/cestina.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,727 @@ +<30.8.2007> S pouzitim prekladu od pitel.borec.cz upgradoval martin.sova@atlas.cz pro DOSBox O.7x + +:SDL_CONFIGFILE_HELP +fullscreen -- Spouštět DOSBox přímo přes celou obrazovku. +fulldouble -- Používat dvojité bufferování na celé obrazovce. +fullfixed -- Neměnit velikost obrazu když je přes celou obrazovku. +fullresolution -- Jeké rozlišení použít přes celou obrazovku, použití společně s fullfixed. +output -- Co použít jako výstup: surface, overlay, opengl, openglnb nebo ddraw. +hwscale -- Extra roztažení okna pokud výstupní zařízení podporuje hardwarové roztažení. +autolock -- Automaticky uzamknout myš, když se klikne na obrazovku. +sensitiviy -- Citlivost myši. +waitonerror -- Počkat před zavřením konzole pokud má DOSBox chybu. +priority -- Úrovně priority pro DOSBox: lower, normal, higher nebo highest. + Druhé zadání za čárkou se použije když DOSBox nemá focus/je minimalizován. +mapperfile -- Soubor použitý pro otevírání/ukládání událostí/mapování kláves. +usescancodes -- zakazuje používání diakritických znaků (pro neanglické klávesnice) + nefunguje se všemi operačními systémy! +. +:DOSBOX_CONFIGFILE_HELP +language -- Vybere jiný jazykový soubor. +memsize -- Množství paměti, které má DOSBox v megabytech. +machine -- Typ stroje pro emulaci: hercules, cga, tandy nebo vga. +captures -- Adresář, kam se zapisují věci jako wavy, midi a screenshoty. +. +:RENDER_CONFIGFILE_HELP +frameskip -- Kolik snímků DOSBox přeskočí, než jeden vykreslí. +aspect -- Dělat korekci poměru. +scaler -- Roztahovač použitý pro zvětšení/rozšíření nízkého rozlišení. + Podporovány jsou none, normal2x, advmame2x, advmame3x, advinterp2x, interp2x nebo tv2x. +. +:CPU_CONFIGFILE_HELP +core -- Jádro CPU použité při emulaci: simple, normal, full, dynamic. +cycles -- Množství instrukcí které se DOSBox snaží emulovat každou milisekundu. + Nastavit tohle výš než zvládne vᚠstroj je špatné! +cycleup/cycledown -- Množství cyklů, které se přidá/ubere při kombinaci kláves Ctrl-F11/Ctrl-F12. + Pokud je menší než 100, číselný údaj se interpretuje jako procenta. +. +:MIXER_CONFIGFILE_HELP +nosound -- Povolit tichý mód, zvuk byde ale stále emulován. +rate -- Vzorkovací frekvence mixéru, nastavení jakéhokoliv zařízení výš než tohle + pravděpodobně způsobí snížení kvality jeho zvuku. +blocksize -- Velikost bloku mixéru, větší bloky mouhou pomoct koktání zvuku + ale zvuk bude také zpožděnější. +prebuffer -- Kolik milisekund dat nechat na vrcholu blocksize. +. +:MIDI_CONFIGFILE_HELP +mpu401 -- Povolit MPU-401 Emulaci. +intelligent -- Operovat v Inteligentním módu. +device -- Zařízení které bude dostávat MIDI data z MPU-401. + Může to být default, alsa, oss, win32, coreaudio nebo none. +config -- Speciální volby konfigurace pro zařízení. +. +:SBLASTER_CONFIGFILE_HELP +type -- Jaký typ sblasteru emulovat: none, sb1, sb2, sbpro1, sbpro2 nebo sb16. +base, irq, dma, hdma -- IO/IRQ/DMA/Vysoká DMA adresa soundblasteru. +mixer -- Povolit soundblaster mixéru měnit DOSBox mixér. +oplmode -- Typ OPL emulace: auto, cms, opl2, dualopl2 nebo opl3. + Při auto se mód určuje podle typu soundblasteru. +oplrate -- Vzorkovací frekvence OPL hudební emulace. +. +:GUS_CONFIGFILE_HELP +gus -- Povolit emulaci Gravis Ultrasound. +base, irq1, irq2, dma1, dma2 -- IO/IRQ/DMA adresy + Gravis Ultrasound. (Stejné IRQ a DMA jsou v pořádku.) +rate -- Vzorkovací frekvence Ultrasound emulace. +ultradir -- Cesta do Ultrasound adresáře. V tomto adresáři + by měl být MIDI adresář který obsahuje + záplatové soubory pro GUS přehrávání. Sady záplat použité + s Timidity by měly dobře fungovat. +. +:SPEAKER_CONFIGFILE_HELP +pcspeaker -- Povolit PC-Speaker emulation. +pcrate -- Vzorkovací frekvence zvuku generovaného PC-Speakerem. +tandyrate -- Vzorokovací frkevence zvuku generovaného 3-Hlasým Tandy. + Tandysound emulace je přítomna když je stroj nastaven na tandy. +disney -- Povolit Disney Sound Source emulaci. +. +:JOYSTICK_CONFIGFILE_HELP +joysticktype -- Typ emulovaného joystiku: auto (podle připojeného zařízení), none (žádný), + 2axis (do 2 joystiků), 4axis, fcs (Thrustmaster), ch (CH Flightstick) +timed -- časování intrvalů k zapínání osy (výchozí je "false") +autofire -- Autofire zapnout? +swap34 -- prohodit třetí a čtvrtou osu: pro některé joystiky nutné +buttonwrap -- povolit wrapping tlačítek na čísla emulovaných tlačítek +. +:SERIAL_CONFIGFILE_HELP +serial1-4 -- specifikovat zařízení připojená na portech COM: + disabled, dummy, modem, nullmodem, directserial + Dodatečné parametry se zadávejí ve formátu "parametr:hodnota" na stejný řádek. + Parametr pro všechna zařízení: irq + pro "directserial": realport (vyžaduje-li), rxdelay (volitelný) + pro "modem": listenport (volitelný) + pro "nullmodem": server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (všechny volitelné) + Příklad: serial1=modem listenport:5000 +. +:DOS_CONFIGFILE_HELP +xms -- Povolit XMS podporu. +ems -- Povolit EMS podporu. +umb -- povolit UMB podporu. +keyboardlayout -- zadat zkratku řeči pro změnu klávesnice (nebo "none") +. +:MODEM_CONFIGFILE_HELP +modem -- Povolit emulaci virtuálního modemu. +comport -- COM Port ke kterému je modem připojen. +listenport -- TCP Port kde modem naslouchá příchozím spojením. +. +:DIRECTSERIAL_CONFIGFILE_HELP +directserial -- Povolit podporu sériového přesměrování. +comport -- COM Port uvnitř DOSBoxu. +realport -- COM Port na Hostovi. +defaultbps -- Základní BPS. +parity -- Parita paketů. Může být N, E nebo O. +bytesize -- Velikost každého paketu. Může být 5 nebo 8. +stopbit -- Počet stopbitů. Může být 1 nebo 2. +. +:IPX_CONFIGFILE_HELP +ipx -- Povolit ipx přes UDP/IP emulaci. +. +:AUTOEXEC_CONFIGFILE_HELP +Řádky v této sekci se spustí při startu. +. +:PROGRAM_CONFIG_FILE_ERROR +Nelze otevřít soubor %s +. +:PROGRAM_CONFIG_USAGE +Nastroj Config + +CONFIG -writeconf [jednotka:][cesta]jmeno_souboru +CONFIG -writelang [jednotka:][cesta]jmeno_souboru +CONFIG -set oddil promenna=hodnota +CONFIG -get oddil promenna + + -writeconf Ulozi aktualni konfiguraci. + -writelang Ulozi aktualni nastaveni jazyka. + -set meni konfiguracni promenne. + -get Ziska soucasnou hodnotu promenne a ulozi ji v + do CONFIG. +. +:PROGRAM_CONFIG_SECTION_ERROR +Oddil nenalezen: %s +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Oddil nebo promenna nenalezena +. +:PROGRAM_CONFIG_NO_PROPERTY +Promenna %s v oddilu %s nenalezena +. +:PROGRAM_CONFIG_GET_SYNTAX +Spravna syntaxe: CONFIG -get oddil promenna +. +:DISNEY_CONFIGFILE_HELP +Zatím není co nastavit! +. +:BIOS_CONFIGFILE_HELP +Zatím není co nastavit! +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMky nalezeny: %d +. +:PROGRAM_MOUNT_STATUS_2 +Jednotka %c je pripojena jako %s +. +:PROGRAM_MOUNT_STATUS_1 +Prave jsou pripojeny jednotky: +. +:PROGRAM_MOUNT_ERROR_1 +Adresar %s neexistuje. +. +:PROGRAM_MOUNT_ERROR_2 +%s neni adresar +. +:PROGRAM_MOUNT_ILL_TYPE +Neplatny typ %s +. +:PROGRAM_MOUNT_ALLREADY_MOUNTED +Jednotka %c je uz pripojena s %s +. +:PROGRAM_MOUNT_USAGE +Pripoji interni disk. + +MOUNT pismeno_disku "adresar_na_disku" + +Priklad: + MOUNT C D:\DOS prideli D:\DOS DOSboxovemu disku C: + +Viz take: INTRO MOUNT +. +:PROGRAM_MOUNT_UMOUNT_CURRENT +Nemuzete odpojit aktivni jednotku. +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Jednotka %c neni pripojena. +. +:PROGRAM_MOUNT_UMOUNT_SUCCES +Jednotka %c byla uspesne odstranena. +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Virtualni jednotky nemohou byt odpojeny. +. +:PROGRAM_MOUNT_WARNING_WIN +Neni doporuceno pripojovat C:\, +priste prosim zvolte (pod)adresar! +. +:PROGRAM_MOUNT_WARNING_OTHER +Neni doporuceno pripojovat /, +priste prosim zvolte (pod)adresar! +. +:PROGRAM_MEM_CONVEN +%10d Kb volnych konvencni pameti +. +:PROGRAM_MEM_EXTEND +%10d Kb volnych rozsirene pameti +. +:PROGRAM_MEM_EXPAND +%10d Kb volnych expandovane pameti +. +:PROGRAM_MEM_UPPER +%10dK volnych vyssi pameti v %d blocich (UMB: %dK) +. +:PROGRAM_LOADFIX_ALLOC +%d kb alokovano. +. +:PROGRAM_LOADFIX_DEALLOC +%d kb uvolneno. +. +:PROGRAM_LOADFIX_DEALLOCALL +Pouzita pamet uvolnena. +. +:PROGRAM_LOADFIX_ERROR +Chyba alokace pameti. +. +:MSCDEX_SUCCESS +MSCDEX instalovan. +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Chyba: Pismena jednotek vice CDRom jednotek musi byt postupna. +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Chyba: Neni dosud podporovano. +. +:MSCDEX_ERROR_PATH +MSCDEX: Chyba: Neplatna cesta. +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Chyba: Prilis mnoho CDRom jednotek (max: 5). Chyba MSCDEX Instalace. +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Pripojeny podadresar: omezena podpora. +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Chyba: Neplatny nebo chybny ISO/CUE-obraz +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Chyba: Neznama chyba. +. +:PROGRAM_RESCAN_SUCCESS +Cache jednotek vycistena. +. +:PROGRAM_INTRO + +Vitejte v DOSBoxu, x86 emulatoru se zvukem a grafikou +DOSBox pro vas vytvari shell, ktery vypada jako stary dobry DOS. + +Pro pomoc s nactenim disku zadejte INTRO MOUNT. +Pro pomoc s CD-ROM zadejte INTRO CDROM. +Pro pomoc s klavesovymi zkratkami zadejte INTRO SPECIAL. + +Vice informaci o DOSBoxu naleznete na: +http://dosbox.sourceforge.net/wiki + +Pokud dojde k chybe, DOSBox se muze bez varovani zastavit nebo vypnout! +. +:PROGRAM_INTRO_MOUNT_START + +DOSBox-rychly start: + +Aby DOSBox mohl spustit program, musi byt nejdriv adresar s programem zapojen +jako virtualni disk: + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş MOUNT C D:\DOS vytvori pro DOSBox virtualni disk C, ş +ş jehoz obsahem bude adresar C:\DOS ş +ş ş +ş D:\DOS je jen priklad, nahradte ho vlastnim adresarem. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş MOUNT C ~/DOS vytvori pro DOSBox virtualni disk C, ş +ş jehoz obsahem bude adresar ~/DOS ş +ş ş +ş ~/DOS je jen priklad, nahradte ho vlastnim adresarem. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_END + +Kdyz pripojeni uspesne skonci, muzete napsat c:, abyste sli do vasi cerstve +pripojene C jednotky. Napsanim dir zobrazite jeji obsah. cd vam umozni +vstoupit do adresare (rozpoznaneho podle [] v senzamu adresaru). +Muzete spoustet soubory, ktere konci .exe .bat a .com. + +Pro informace o podpore CD-ROM napiste intro cdrom + +. +:PROGRAM_INTRO_CDROM +Jak pripojit Skoutecnou/Virtualni CD-ROM Jednotku v DOSBoxu: +DOSBox poskytuje emulaci CD-ROM na nekolika urovnich. + +Zakladni uroven funguje na vsech CD-ROM jednotkach a normalnich adresarich. +Nainstaluje to MSCDEX a oznaci soubory pouze pro cteni. +To vetsinou staci pro vetsinu her: +mount d D:\ -t cdrom nebo mount d C:\priklad -t cdrom +Kdyz to nefunguje, meli byste DOSBoxu rict jmenovku CD-ROM: +mount d C:\priklad -t cdrom -label JMENOVKACD + +Dalsi uroven prida nejakou nizkourovnovou podporu. +Proto to funguje jen na CD-ROM jednotkach: +mount d D:\ -t cdrom -usecd 0 + +Posledni uroven podpory zavisi na vasem operacnim systemu: +Pro Windows 2000, Windows XP, Windows Vista a Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +Pro Windows 9x s nainstalovanou ASPI vrstvou: +mount d D:\ -t cdrom -usecd 0 -aspi + +Nahradte D:\ umistenim vasi CD-ROM. +Nahradte 0 v -usecd 0 cislem nahlasenym pro vasi CD-ROM kdyz napisete: +mount -cd. +. +:PROGRAM_INTRO_SPECIAL + +Specialni klavesy: +(Takto jsou standartne nastaveny, menit je muzete v keymapperu.) + +Alt-Enter Celoobrazovkovy mod on/off +Alt-Pause Prerusit emulaci +Ctrl-F1 Spustit keymapper +Strg-F4 Aktualizovat obraz disku; znovu nacist adresar +Ctrl-F5 Ulozit sreenshot jako soubor PNG +Ctrl-Alt-F5 Obrazovy vystup a zvuk nahravat jako videoklip on/off +Ctrl-F6 Zapisovat zvukovy vystup do WAV on/off +Ctrl-Alt-F7 Zaznamenavat data OPL on/off +Ctrl-Alt-F8 Zaznamenavat dat Raw-MIDI on/off +Ctrl-F7 Preskakovani framesu -1 +Ctrl-F8 Preskakovani framesu +1 +Ctrl-F9 Zavrit DOSBox +Ctrl-F10 Mys povolit/zakazat +Ctrl-F11 Zpomalit emulaci (DOSBox-Cycles snizit) +Ctrl-F12 Zrychlit emulaci (DOSBox-Cycles zvysit) +Alt-F12 Vypnout zpomalovani (tlacitko Turbo) +. +:PROGRAM_BOOT_NOT_EXIST +Soubor s bootovacim diskem neexistuje. Chyba. +. +:PROGRAM_BOOT_NOT_OPEN +Nelze otevrit soubor s bootovacim diskem. Chyba. +. +:PROGRAM_BOOT_PRINT_ERROR +Tento prikaz nabootuje DOSBox z obrazu diskety nebo pevneho disku. + +Pro tento prikaz lze specifikovat poradi prepinani disket stikem Ctrl-F4, +a -l specifikuje z jake pripojene jednotky bootovat. Pokud neni urceno zadne +pismeno, bootuje se standardne z jednotky A. Jedina bootovatelne pismena +jednotek jsou A, C a D. Pro bootovani z pevneho disku (C nebo D) by mel byt +obraz uz pripojen pouzitim prikazu IMGMOUNT. + +Syntaxe tohoto prikazu je: + +BOOT [obrazdisku1.img obrazdisku2.img] [-l pismenojednotky] +. +:PROGRAM_BOOT_UNABLE +Nelze bootovat z jednotky %c. +. +:PROGRAM_BOOT_IMAGE_OPEN +Otevoram obraz: %s +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Nelze otevrit %s. +. +:PROGRAM_BOOT_BOOT +Bootuji z jednotky %c... +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr-Cartridge: falsches Computersystem +. +:PROGRAM_BOOT_CART_LIST_CMDS +Prikazy pro PCjr-Cartridge k dispozici: %s +:PROGRAM_BOOT_CART_NO_CMDS +Zadne prikazy pro PCjr-Cartridge k dispozici +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Musite urcit pismeno jednotky kam pripojit obraz. +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Musite urcit cislo jednotky (0 az 3) kam pripojit obraz (0, 1=fda, fdb; 2, 3=hda, hdb). +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Pro obrazy CD-ROM: imgmount Pismeno-Jednotky umisteni-obrazu -t iso + +Pro obrazy pevneho disku: Musite urcit geometrie pro pevne disky: +bytu_na_sektor, sektoru_na_plotnu, hlavicek_na_plotnu, pocet_ploten. +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Neznamy typ nebo obraz disku: %s +Platne obrazy: hdd, floppy, iso +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" neni podporovan. Urcete "fat" nebo "iso" nebo "none". +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Musite urcit soubor-obrazu pro pripojeni. +. +:PROGRAM_IMGMOUNG_FILE_NOT_FOUND +Soubor obrazu nenalezen. +. +:PROGRAM_IMGMOUNG_MOUNT +Pro pripojeni adresaru pouzijte prikaz MOUNT, ne prikaz IMGMOUNT. +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Jednotka uz je na tomto pismene pripojena. +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Nelze vytvorit jednotku ze souboru. +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Jednotka cislo %d pripojena jako %s +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Obraz disku musi lezet na lokalnim nebo namountovanem disku. +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Pokud chcete pouzit vice obrazu disku, musi byt ve formatu CUE/ISO. +. +:PROGRAM_KEYB_INFO +Aktualni kodova stranka: %i +. +:PROGRAM_KEYB_SHOWHELP +KEYB [xx [yyy] [[disk:][cesta]jmeno_souboru]] + + xx Kod zeme sestavajici ze dvou pismen (napr. en). + yyy Kodova stranka s vybranym souborem znaku. + [disk:][cesta]jmeno_souboru Soubor obsahujici definice klavesnice. + +Priklady: + KEYB Ukaze aktualni kodovou stranku. + KEYB GR Nacist nemeckou (GR) klavesnici a odpovidajici kodovou stranku. + KEYB GR 850 Nacist nemeckou (GR) klavesnici a kodovou stranku 850. + KEYB GR 850 CPAGE.CPI Viz vyse, kodova stranka bude nactena z CPAGE.CPI +. +:PROGRAM_KEYB_NOERROR +Klavesnice %s a kodova stranka %i nactena +. +:PROGRAM_KEYB_FILENOTFOUND + +Neplatny kod klavesnice - soubor nenalezen: %s + +. +:PROGRAM_KEYB_INVALIDFILE + +Neplatny kod klavesnice - soubor chybi: %s + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Zadna klavesnice %s pro kodovou stranku %i +. +:PROGRAM_KEYB_INVCPFILE + +Chybny nebo chybejici soubor definice klavesnice: %s + +. +:SHELL_ILLEGAL_PATH +Neplatna cesta. +. +:SHELL_CMD_HELP +podporovane prikazy jsou: +. +:SHELL_CMD_ECHO_ON +ECHO je zapnuto. +. +:SHELL_CMD_ECHO_OFF +ECHO je vypnuto. +. +:SHELL_ILLEGAL_SWITCH +Neplatny prepinac: %s. +. +:SHELL_CMD_CHDIR_ERROR +Nelze zmenit na: %s. +. +:SHELL_CMD_CHDIR_HINT +Ke zmene disku pouzijte %c: +. +:SHELL_CMD_MKDIR_ERROR +Nelze vytvorit: %s. +. +:SHELL_CMD_RMDIR_ERROR +Neplatna cesta, zadny adresar +nebo neprazdny adresar: %s. +. +:SHELL_CMD_DEL_ERROR +Nelze smazat: %s. +. +:SHELL_SYNTAXERROR +Spatna syntaxe prikazu. +. +:SHELL_CMD_SET_NOT_SET +Promenna prostredi %s neni urcena. +. +:SHELL_CMD_SET_OUT_OF_SPACE +Nedostatek volneho prostoru prostredi. +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Chybejici nazev souboru. +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Chybejici cislo. +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Neplatne cislo. +. +:SHELL_CMD_GOTO_MISSING_LABEL +Zadne navesti pripojene na GOTO prikaz. +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Navesti %s nenalezeno. +. +:SHELL_CMD_FILE_NOT_FOUND +Soubor %s nenalezen. +. +:SHELL_CMD_FILE_EXISTS +Soubor %s neexistuje. +. +:SHELL_CMD_DIR_INTRO +Adresar %s. +. +:SHELL_CMD_DIR_BYTES_USED +%5d Soubor(u) %17s Bytu. +. +:SHELL_CMD_DIR_BYTES_FREE +%5d Adresar(u) %17s Bytu volnych. +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Jednotka %c neexistuje! +Musite ji nejdriv mount. Napiste intro pro vice informaci. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Neplatny prikaz: %s. +. +:SHELL_CMD_PAUSE +Pokracujte libovolnou klavesou... +. +:SHELL_CMD_PAUSE_HELP +Ceka na 1 stisk klavesy pro pokracovani. +. +:SHELL_CMD_COPY_FAILURE +Chyba kopirovani: %s. +. +:SHELL_CMD_COPY_SUCCESS + %d Soubor(u) zkopirovano. +. +:SHELL_CMD_SUBST_NO_REMOVE +Odstranovani jednotky neni podporovani. Nic nedelam. +. +:SHELL_CMD_SUBST_FAILURE +SUBST selhalo. Bud jste udelali chybu v prikazove radce nebo je cilova jednotka +pouzivana. +SUBST lze pouzit jen u Mistnich jednotek. +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Vitejte v DOSBoxu ş +ş ş +ş Prikazem HELP zobrazite seznam platnych prikazu. ş +ş Prikazem INTRO zobrazite kratky uvod do programu. ş +ş ş +ş Rychlost se zvysuje pomoci Ctrl-F8 a Ctrl-F12. ş +ş Pro zobrazeni mapy klaves stisknete Ctrl-F1. ş +ş Navod naleznete v souboru README v adresari DOSBox. ş +ş ş +. +:SHELL_STARTUP_CGA +ş DOSBox podporuje Composite-CGA-Modus. ş +ş Benutzen Sie Alt-F11, um in diesem Modus die Farben zu wechseln. ş +ş ş +. +:SHELL_STARTUP_DEBUG +ş Um den Debugger zu laden, drcken Sie entweder Alt-Pause oder ş +ş starten Sie die EXE mit DEBUG. ş +ş ş +. +:SHELL_STARTUP_END +ş Prijemnou zabavu preje DOSBox-Team! ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:SHELL_CMD_CHDIR_HELP +Zmeni adresar. +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [disk:][cesta] +CHDIR[..] +CD [disk:][cesta] +CD[..] + + .. Symbol pro prechod do nadrizeneho adresare. + +CD disk: Zobrazi aktualni adresar na nactenem disku. +CD Zobrazi aktualni disk a adresar. +. +:SHELL_CMD_CLS_HELP +Smaze obrazovku. +. +:SHELL_CMD_DIR_HELP +Zobrazi adresar, jeho podadresare a soubory. +. +:SHELL_CMD_DIR_HELP_LONG +DIR [disk:][cesta][jmeno_souboru] [/P] [/W] + + [disk:][cesta][jmeno_souboru] Nalistovany disk, adresar a/nebo soubory. + /P Zastavi se po kazde popsane obrazovce. + /W K listovani pouzit siroky format. +. +:SHELL_CMD_ECHO_HELP +Zobrazuje zpravy a zapina/vypina upozorneni. +. +:SHELL_CMD_EXIT_HELP +Ukonci prikazovy radek/DOSBox. +. +:SHELL_CMD_HELP_HELP +Zobrazi napovedu prikazu pro DOS. +. +:SHELL_CMD_MKDIR_HELP +Vytvori adresar. +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [disk:]cesta +MD [disk:]cesta +. +:SHELL_CMD_RMDIR_HELP +Smaze adresar. +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [disk:]cesta +RD [disk:]cesta +. +:SHELL_CMD_SET_HELP +Mění proměnné prostředí nebo je zobrazí. +. +:SHELL_CMD_IF_HELP +Zpracovava podminene procesy v davkovych souborech. +. +:SHELL_CMD_GOTO_HELP +Skoci v davkovem skriptu na oznaceny radek. +. +:SHELL_CMD_SHIFT_HELP +Meni pozici menitelneho parametru v souboru s nastavenim. +. +:SHELL_CMD_TYPE_HELP +Zobrazi obsah textoveho souboru. +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [disk:][cesta]jmeno_souboru +. +:SHELL_CMD_REM_HELP +Prida komentare do davkoveho souboru. +. +:SHELL_CMD_REM_HELP_LONG +REM [komentar] +. +:SHELL_CMD_NO_WILD +Toto je zjednodusena verze prikazu, zadne wildcardy nejsou povoleny! +. +:SHELL_CMD_RENAME_HELP +Prejmenovava soubory. +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [disk:][cesta]soubor1 soubor2 +REN [disk:][cesta]soubor1 soubor2 + +Pri prejmenovani souboru1 na soubor2 nemuzete zmenit disk nebo adresar souboru. +. +:SHELL_CMD_DELETE_HELP +Maze soubor nebo soubory. +. +:SHELL_CMD_COPY_HELP +Kopiruje soubor nebo soubory na jine umisteni. +. +:SHELL_CMD_CALL_HELP +Spusti davkovy soubor pomoci jineho davkoveho souboru. +. +:SHELL_CMD_SUBST_HELP +Priradi internimu adresari oznaceni virtualniho disku. +. +:SHELL_CMD_LOADHIGH_HELP +Spusti program ve vysoke pametove oblasti. (Vyzaduje XMS, UBS) +. +:SHELL_CMD_CHOICE_HELP +Ceka na stisk klavesy a vypise odpovidajici ERRORLEVEL. +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C[:]klavesa] [/N] [/S] [Text] + +/C[:]klavesa Oznameni povolene klavesy. Standartne je YN. +/N Zadne hlaseni povolenych klaves na konci hlaseni neni k dispozici. +/S Detekuje zapnuti CapsLocku. +Text Hlaseni, ktere bude zobrazeno. + +ERRORLEVEL se zobrzi na miste pro vypis +stisknute klavesy. +. +:SHELL_CMD_ATTRIB_HELP +Nic nedela. Jen pro ucely kompatibility. +. +:SHELL_CMD_PATH_HELP +Nic nedela. Jen pro ucely kompatibility. +. +:SHELL_CMD_VER_HELP +Zobrazi nebo zmeni cislo pouzivane verze DOSu. +. +:SHELL_CMD_VER_HELP_LONG +VER [SET hlavni_cislo_verze [vedlejsi_cislo_verze]] +. +:SHELL_CMD_VER_VER + +Verze DOSBoxu: %s, pouzivana verze DOSu: %d.%d + +. diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/cs/n\302\240vod.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/cs/n\302\240vod.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/cs/n\302\240vod.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/cs/n\302\240vod.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,14 @@ +Cestina pro DOSBox O.7x (prelozil Martin Sova >> martin.sova@atlas.cz) +========================================================== +Rozbalte tento archiv do domovskeho adresare DOSBox. +(We Windowsech to zpravidla byva C:\Program Files\DOSBox-O.7x) +Spuste DOSBox a do prikazoveho radku zadejte: + +config -set dosbox language=cestina.lng + +Potvrdte Enter a pak zadejte: + +config -writeconf dosbox.conf + +Opet potvrdte a pomoci Ctrl-F9 nebo prikazem exit ukoncete DOSBox. +Pri pristim spusteni programu vas jiz DOSBOx uvita v cestine. \ No newline at end of file diff -Nru dosbox-staging-0.76.0/contrib/old-translations/cs/version.txt dosbox-staging-0.77.0/contrib/old-translations/cs/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/cs/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/cs/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Czech 0.72 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/da/dosbox-0.74-3_DK.conf dosbox-staging-0.77.0/contrib/old-translations/da/dosbox-0.74-3_DK.conf --- dosbox-staging-0.76.0/contrib/old-translations/da/dosbox-0.74-3_DK.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/da/dosbox-0.74-3_DK.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,250 @@ +# Dette er config-filen til DOSBox 0.74. (Brug venligst seneste version af DOSBox) +# Linier som starter med # er kommentarlinier, og ignoreres af DosBox. +# De bruges til (kort) at dokumentere effekten af hver mulighed. + +[sdl] +# fullscreen: Starter DOSBox i helskćrm/fuldskćrm.(Tryk ALT-Enter for at gĺ tilbage) +# fulldouble: Helskćrm/fuldskćrm i Double Buffering mode. Kan reducére skćrm-flimmer, men kan ogsĺ slřve DOSBox. +# fullresolution: Hvilken oplřsning der skal anvendes i helskćrm/fuldskćrm: "original", "desktop" eller fixeret (F.eks. 1024x768). +# At bruge din monitors oprindelig oplřsning (desktop) med aspect=true, kunne give det bedste resultat. +# Prřv, et output som ikke er surface, hvis du fĺr et lille vindue pĺ en stor skćrm. +# Prřv pĺ Windows 10, med display skaléring (Skaléring og Layout) sat til en vćrdi over 100%, at bruge +# en lavere fuldskćrmsoplřsning, for at undgĺ vindue-skaléringsproblemer. +# windowresolution: Tilpasser vinduet til angivet format (kun hvis "hardwaren" er istand til det). +# (output=surface er ikke!) +# output: Hvilket video system der skal bruges til output. +# Mulige vćrdier: surface, overlay, opengl, openglnb, ddraw. +# autolock: Automatisk binding af musen ved klik pĺ skćrmen(Press CTRL-F10 for at frigřre). +# sensitivity: Mus'-fřlsomhed. +# waitonerror: Ventetid, inden nedlukning af konsollen, ved evt.fejl i DOSBox. +# priority: DOSBox-Prioriterings-niveauer. "Anden indtastning" efter kommaet er beregnet til nĺr DOSBOX ikke er i focus/minimeret. +# pause er kun gangbar for "anden indtastning"). +# Mulige vćrdier: lowest, lower, normal, higher, highest, pause. +# mapperfile: Fil brugt til at Keymapper-indstillinger.Resetmapper virker kun med standard vćrdi. +# usescancodes: Undgĺ brug af Symboltaster, virker mĺske ikke med alle systemer. + +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=1480x1110 +output=ddraw +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper-0.74.map +usescancodes=true + +[dosbox] +# language: Vćlg en anden sprogfil/language-file. +# machine: Hvilken type maskine DOSBox prřver at emulere. +# Mulige vćrdier: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe. +# captures: Directory(Mappen,Folderen,Biblioteket) hvor captured/indfangede Wave-, Midi-filer og Screenshots gemmes. +# memsize: DOSBox's hukommelseslager i MB. +# Det er bedst, for at undgĺ problemer med nogle spil, ikke at ćndre denne vćrdi, +# Selvom fĺ spil mĺske krćver en hřjere vćrdi. +# Der er generelt ingen hastighedsforřgelse ved at forhřje denne vćrdi. + +language= +machine=svga_s3 +captures=capture +memsize=16 + +[render] +# frameskip: Antal billeder/"frames" Dosbox dropper inden der tegnes 1. +# aspect: Aspekt-korrektion, kan hvis din output-metode ikke virker med skaléring, virke neddroslende. +# scaler: Filtermethode til at udvidde/forbedre lave oplřsningerer. Hvis 'forced' bliver tilfřjet, +# bliver scaleren brugt, selvom resutatet mĺske bliver uřnsket. +# Det kan krćve en ramme eller sidebjćlker, at tilpasse en scaler, i oplřsningen brugt ved fuldskćrm, +# for at udfylde skćrmen hélt. Afhćngigt af dit hardware, virker en anden scaler/fuldskćrmsoplřsning mĺské. +# Mulige vćrdier: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x. + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core: CPU Core brugt til emulering. 'auto' skifter til dynamic, hvis passende og til stede... +# Mulige vćrdier: auto, dynamic, normal, simple. +# cputype: CPU Type brugt til emulering. 'auto' er hurtigste valg.. +# Mulige vćrdier: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch. +# cycles: Antal udregninger DOSBOX vil emulere pr. milli-sekund. +# Er denne vćrdi sat for hřjt, resulterer det i udfald og hakken. +# Cycles kan indstilles pĺ 3 mĺder: +# 'auto' Prřver pĺ at "gćtte" hvad spillet/programmet har brug for, +# det virker som regel, men kan fejle for enkelte spil. +# 'fixed #ant.' Angiver et fast tal for antal 'cycles'. Dette er normalt hvad er nřdvendigt +# hvis 'auto' fejler. (Eksempel: fixed 4000) +# 'max' Tildeler sĺ mange 'cycles' som din computer kan klare. +# +# Mulige vćrdier: auto, fixed, max. +# cycleup: Antal 'cycles', der kan skiftes med tastekombinationer.(CTRL-F11/CTRL-F12) +# cycledown: Et tal lavere end 100 antages som vćrende i procent. + +core=auto +cputype=auto +cycles=auto +cycleup=10 +cycledown=20 + +[mixer] +# nosound: Stille/tavs, lyden bliver dog stadig emuleret. +# rate: Mixer-Sampling-Rate; en hřjere vćrdi vil sandsynligvis forringe lyd-kvaliteten. +# Mulige vćrdier: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# blocksize: Mixerens blokstřrrelse; střrre Blokke kan muligvis forhindre hak i lyden, men lyden fĺr mere 'lag'. +# Mulige vćrdier: 1024, 2048, 4096, 8192, 512, 256. +# prebuffer: Hvor mange millisekunders data der skal beholdes pĺ toppen af blokstřrrelsen + +nosound=false +rate=44100 +blocksize=1024 +prebuffer=20 + +[midi] +# mpu401: Type MPU-401 at emulere. +# Mulige vćrdier: intelligent, uart, none. +# mididevice: Enhed, til at behandle MIDI data fra MPU-401. +# Mulige vćrdier: default, win32, alsa, oss, coreaudio, coremidi, none. +# midiconfig: Specielle konfigurationsmuligheder for enhedsdriveren. Dette er sćdvanligvis id'et pĺ enheden du řnsker at bruge +# (Find id med "mixer /listmidi"). +# i tilfćlde med coreaudio, kan du specificere en soundfont her. +# Se README/Manual for flere detaljer. + +mpu401=intelligent +mididevice=default +midiconfig= + +[sblaster] +# sbtype: Type SoundBlaster at emulere. gb er Gameblaster. +# Mulige vćrdier: sb1, sb2, sbpro1, sbpro2, sb16, gb, none. +# sbbase: Soundblaster IO address. +# Mulige vćrdier: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300. +# irq: Soundblaster IRQ nummer. +# Mulige vćrdier: 7, 5, 3, 9, 10, 11, 12. +# dma: Soundblaster DMA nummer. +# Mulige vćrdier: 1, 5, 0, 3, 6, 7. +# hdma: Soundblaster High DMA nummer. +# Mulige vćrdier: 1, 5, 0, 3, 6, 7. +# sbmixer: Tillad SoundBlaster-Mixeren at indstille DOSBox-Mixeren. +# oplmode: Type OPL emulering. Pĺ 'auto' bestemmer sblaster-typen. Alle OPL modes er Adlib-kompatible, undtage. 'cms'. +# Mulige vćrdier: auto, cms, opl2, dualopl2, opl3, none. +# oplemu: Kilden for OPL emulering. compat eller old leverer mĺske bedre kvalitet (se ogsĺ oplrate). +# Mulige vćrdier: default, compat, fast. +# oplrate: OPL-Musik-Emulering Sampling-Rate. Brug 49716 for hřjeste kvalitet (sćt mixerens rate forholdsvis). +# Mulige vćrdier: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000. + +sbtype=sb16 +sbbase=220 +irq=7 +dma=1 +hdma=5 +sbmixer=true +oplmode=auto +oplemu=default +oplrate=44100 + +[gus] +# gus: Aktivere Gravis Ultrasound-Emulering. +# gusrate: Sampling-rate' for Ultrasound-Emulering. +# Mulige vćrdier: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# gusbase: Gravis Ultrasound IO base addresse. +# Mulige vćrdier: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300. +# gusirq: Gravis Ultrasound IRQ nummer. +# Mulige vćrdier: 5, 3, 7, 9, 10, 11, 12. +# gusdma: Gravis Ultrasound DMA channel. +# Mulige vćrdier: 3, 0, 1, 5, 6, 7. +# ultradir: Sti/path til Ultrasound-Directory. +# Der skal eksistere en MIDI-Mappe i denne Mappe +# med "patch-filer" til GUS-playback. +# Timidity-Patches skulle virke ok. + +gus=false +gusrate=44100 +gusbase=240 +gusirq=5 +gusdma=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker: Aktivér PC-hřjtaler-Emulering. +# pcrate: PC-hřjtaler-Emulerings Sampling-Rate. +# Mulige vćrdier: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# tandy: Tandy Sound System-Emulering. Hvis 'auto' kun emulering nĺr maskine er sat til 'tandy'. +# Mulige vćrdier: auto, on, off. +# tandyrate: Sampling-Rate for Tandy 3-Voice-Generering. +# Mulige vćrdier: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# disney: Aktiver Disney Sound Source-Emulering. (Covox Voice Master and Speech Thing compatible). + +pcspeaker=true +pcrate=44100 +tandy=auto +tandyrate=44100 +disney=true + +[joystick] +# joysticktype: Joysticks-type at emulere: auto (Standard), none (ingen), +# 2axis (op til 2 Joysticks), +# 4axis (1joystick, fřrste joystick der bruges), +# 4axis_2 (1joystick, andet joystick der bruges), +# fcs (Thrustmaster), +# ch (CH Flightstick), +# none deaktiverer joystick-emulering. +# auto vćlger emulering afhćgigt af rigtigt joystick(s). +# (Husk at resette DOSBox's mapperfil, hvis du har gemt den tidlgere). +# Mulige vćrdier: auto, 2axis, 4axis, 4axis_2, fcs, ch, none. +# timed: Aktiver timede intervaller for Axis. Eksperimentér med disse, hvis dit Joystick 'flyder' bort. +# autofire: Fortsat "skydning" medens knappen er trykket ned. +# swap34: Byt 3 og 4 Axis: kan vise sig brugbart for visse joysticks. +# buttonwrap: Aktiver "button wrapping" ved antallet af emulerede antal knapper. + +joysticktype=auto +timed=true +autofire=false +swap34=false +buttonwrap=false + +[serial] +# serial1: Angiv enheds-type tilsluttet com port. +# Kan vćre :disabled, dummy, modem, nullmodem, directserial. +# Yderligere parametre skal findes i samme linie i formatet +# "Parameter:vćrdi". Parameter for alle typer er irq. +# for directserial: realport (required), rxdelay (optional). +# (realport:COM1 realport:ttyS0). +# for modem: listenport (optional). +# for nullmodem: server, rxdelay, txdelay, telnet, usedtr, +# transparent, port, inhsocket (alle optional). +# Eksempel: serial1=modem listenport:5000. +# Mulige vćrdier: dummy, disabled, modem, nullmodem, directserial. +# serial2: Se serial1. +# Mulige vćrdier: dummy, disabled, modem, nullmodem, directserial. +# serial3: Se serial1. +# Mulige vćrdier: dummy, disabled, modem, nullmodem, directserial. +# serial4: Se serial1. +# Mulige vćrdier: dummy, disabled, modem, nullmodem, directserial. + +serial1=dummy +serial2=dummy +serial3=disabled +serial4=disabled + +[dos] +# xms: XMS aktiveret. +# ems: EMS aktiveret. +# umb: UMB aktiveret. +# keyboardlayout: keyboardlayout -- Sprogkode for Tastatur-Layout (eller 'none'). + +xms=true +ems=true +umb=true +keyboardlayout=auto + +[ipx] +# ipx: IPX over UDP/IP-Emulering aktiveret. + +ipx=false + +[autoexec] +# Linier i denne sektion eksekveres under DOSBOX's opstart. +# Du kan bla. indsćtte MOUNT(og IMGMOUNT) kommandoer her. + + diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/da/DOSBox 0.74-3-DK Manual.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/da/DOSBox 0.74-3-DK Manual.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/da/DOSBox 0.74-3-DK Manual.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/da/DOSBox 0.74-3-DK Manual.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1499 @@ +DOSBox v0.74-2 Manual (brug altid den sidste nye version fra www.dosbox.com) + + +====== +NOTAT: +====== + +Selvom Vi hĂĽber at DOSBOX en dag vil kunne køre alle programmer der +nogensinde er lavet til PCen, er vi der ikke endnu. +Lige nu er DOSBox, der kører pĂĽ en high-end maskine, nogenlunde lig med en +Pentium I PC. + DOSBox Kan indstilles til at køre en bred vifte af DOS spil, fra +CGA/Tandy/PCjr klassikere til spil fra Quake ĂŚraen. + + + +====== +INDEX: +====== +1. Hurtigstart +2. FAQ (Ofte Stillede SpørgsmĂĽl) +3. Kommandolinie Parametre +4. Interne Programmer +5. Specielle taster +6. Joystick/Gamepad +7. KeyMapper (Tastatur og joystick indstillinger) +8. Tastatur Layout +9. Serial Multiplayer feature +10. Hvordan du ĂŚndrer hastigheden pĂĽ DOSBox +11. Problemløsning +12. DOSBOX's statusvindue +13. Config-filen (indstillingsfilen) +14. Sprog-filen +15. Hvordan du bygger din egen version af DOSBox +16. Special thanks +17. Kontakt + + + +=============== +1. Hurtigstart: +=============== + + For en hurtig introduktion, skriv INTRO i DOSBox. +Det er vigtigt at du bliver dus med det at montere(mount-kommandoen), +DOSBox gør ikke selv automatisk drev(ene) (eller dele af drev(ene)), +tilgĂŚngelige for emuleringen. +Se FAQ : "Kom igang", og beskrivelsen af MOUNT kommandoen +og beskrivelsen af Mount kommandoen (sektion 4 "Interne Programmer"). Hvis du har +et spil pĂĽ cdrom, +kan du evt. prøve denne guide: https://www.vogons.org/viewtopic.php?t=8933 + + + + + +======= +2. FAQ: +======= + +KOM IGANG: Hvordan starter man? +AUTOMATISERING: Skal jeg altid skrive disse "mount" kommandoer? +FULDSKÆRM: Hvordan skifter jeg til fuldskĂŚrm? +FULDSKÆRM: FuldskĂŚrm-indstillingen er for stor. +CD-ROM: Min CD-ROM virker ikke. +CD-ROM: Spillet/Programmet kan ikke finde sin CD-ROM. +MUS: Musen Virker Ikke +LYD: Der er Ingen Lyd. +LYD: Hvilken Lyd-hardware understøtter DOSBox ikke/endnu? +LYD: Lyden hakker eller lyder forlĂŚnget/mĂŚrkelig. +TASTATUR: Jeg kan ikke skrive \ eller : i DOSBox. +TASTATUR: Højre skift og "\" Virker ikke i DOSBOx. +TASTATUR: Tastaturet hakker. +KONTROL: Figuren/cursoren bevĂŚger sig altid i een retning! +HASTIGHED: Spillet/Programmet kører for langsomt/for hurtigt! +NEDBRUD: Spillet/Programmet kører overhovedet ikke/bryder ned! +NEDBRUD: DOSBox bryder ned ved opstart! +SPIL: Mit Build spil(Duke3D/Blood/Shadow Warrior) har problemer. +SIKKERHED: Kan DOSBox skade min Computer? +Indstillinger: Jeg vil gerne ĂŚndre DOSBox's indstillinger. +HJÆLP: God manual, men jeg forstĂĽr det stadig ikke. + + + +START: Kom igang? + Til at begynde med har du et Z:\ istedet for C:\ ved prompten. + Du kan gøre dine mapper/directories/biblioteker brugbare som drev i DOSBox + ved hjĂŚlp af "mount" kommandoen. F. eks. vil, i Windows, kommandoen + "mount C D:\GAMES" give dig et C drev i DOSBox som peger mod din Windows + D:\GAMES Mappe (oprettet tidligere). + I Linux, vil "mount c /home/username" give dig et C drev i DOSBox som + peger mod /home/username i Linux. + Skriv "C:" for at skifte til det førnĂŚvnte monterede drev. Hvis Alting gik + godt, vil DOSBox vil vise prompten "C:\>". + + +AUTOMATISERING: Skal jeg altid udføre disse kommandoer? + Der er i DOSBox's config-fil en [autoexec] sektion. Kommandoerne som er + skrevet der køres nĂĽr DOSBox startes, sĂĽ du kan bruge denne sektion til at + montere. Se sektion 13. Config-filen (indstillingsfilen) + + + +FULDSKÆRM: Hvordan ĂŚndrer jeg til fuldskĂŚrm modus? + Pres alt-enter. Alternativt: Tilret DOSBox's config-fil og ĂŚndr indstillingen + fullscreen=false til fullscreen=true. Leg med indstilligen: fullresolution hvis + fuldskĂŚrms modus ser forkert ud efter din mening. Pres alt-enter igen for at + komme tilbage fra fuldskĂŚrms modus. + + +FULDSKÆRM: FuldskĂŚrms-indstillingen er for stor. + Dette kan vĂŚre et problem i Windows 10, hvis du har display skalĂŠring + sat til en vĂŚrdipĂĽ over 100%, windows vil isĂĽfald skalere yderligere, + udover DOSBox's skalering, hvilket kan ske for følgende output: ddraw, + opengl, openglnb, overlay. Du kan slĂĽ denne "Windows opførsel" fra, + ved at bruge en speciel compatibilitetsindstilling: + - Højreklik pĂĽ DOSBox ikonet, og vĂŚlg "Egenskaber". + - GĂĽ til "Kompatibilitet"-fanebladet. + - Klik pĂĽ "Ændr Høj DPI indstilling" + - MarkĂŠr "Ændr Høj DPI SkalĂŠrings Opførsel" Og sĂŚt vĂŚrdien til "Programmet". + - Tilføj ĂŚndringer, ved at klikke pĂĽ "OK". + + Denne kompatibilitetsindstilling, er desvĂŚrre skyld i nogle sideeffekter i + Vinduetilstand, hvor du bliver nødt til at ĂŚndre opløsningen for windowsresolution + i konfigurationsfilen-filen (f.eks. windowresolution=1024x768). + + Alternativt kan du slĂĽ displayskalĂŠring fra og eller bruge en lavere + fuldskĂŚrmsopløsnings-vĂŚrdi. + +CD-ROM: Min CD-ROM virker ikke. + For at montere din CD-ROM i DOSBox Skal du specificere yderligere nogle mulig- + heder nĂĽr du monterer. + For at muliggøre den mest grundlĂŚggende CD-ROM understøttelse (inkluderer + MSCDEX) : + - mount d f:\ -t cdrom (Windows) + - mount d /media/cdrom -t cdrom (Linux) + + MĂĽske ønsker du mĂĽske at bruge et andet CD-ROM interface, + f.eks hvis CD audio ikke virker: + For SDL-understøttelse(inkluderer ikke lav-niveau CD adgang) + - mount d f:\ -t cdrom -usecd 0 -noioctl + For understøttelse af ioctl med digital audio extraction for CD audio + (kun Windows, nyttigt for Vista): + - mount d f:\ -t cdrom -ioctl_dx + For understøttelse af ioctl med MCI for CD audio(kun Windows): + - mount d f:\ -t cdrom -ioctl_mci + For at tvinge brug af ioctl-only(kun Windows): + - mount d f:\ -t cdrom -ioctl_dio + For at muliggøre lav-niveau aspi-understøttelse(win98 med aspi-lag installeret) : + - mount d f:\ -t cdrom -aspi + + Kommandoerne : - d drevbogstav du fĂĽr i DOSBox + - f:\ placering af cdrom i din PC. + - 0 Nummeret af ´CD-ROM drevet, findes med mount -cd + (bemĂŚrk at denne vĂŚrdi er kun nødvendig nĂĽr du bruger + SDL til CD audio, ellers ignoreres den) + Se ogsĂĽ nĂŚste spørgsmĂĽl : Spillet/Programmet kan ikke finde sin CD-ROM. + + +CD-ROM: Spillet/programmetgamet kan ikke finde sin CD-ROM. + VĂŚr sikker pĂĽ at montere din CD-ROM med -t cdrom switchen, dette vil starte + MSCDEX fladen som DOS spil krĂŚver for at give adgang til CD-ROM. + Prøv ogsĂĽ at tilføje korrekt label/etikĂŠt (-label LABEL) til mount kommandoen. + Hvor LABEL er CD-ROMens CD-label(volume ID). + Under Windows kan du specificere -ioctl -aspi eller -noioctl. Se beskrivelse + i sektion 4: "Interne Programmer"om deres betydning og deres audio-relaterede + muligheder -ioctl_dx, ioctl_mci, ioctl_dio. + + Prøv at lave et CD-ROM billede/image(helst CUE/BIN), og brug DOSBox's interne + IMGMOUNT kommando til at montere billedet. Dette muliggør meget god lav-niveau + CD-ROM support pĂĽ alle operativ systemer. + + +MUS: Musen virker ikke. + Normalt finder DOSBox ud af om et spil bruger Mus.NĂĽr du klikker pĂĽ skĂŚrmen + (DOSBox vinduet)skulle den lĂĽse/bindes, og virke. + Ved nogle spil virker dette ikke, sĂĽ du mĂĽ selv lĂĽse/binde musen, ved at taste + CTRL-F10. + + +LYD: Der er ingen lyd. + VĂŚr sikker pĂĽ at lyden er korrekt indstillet i spillet. Dette gøres under + installationen eller med et setup/setsound program som følger med spillet. + Se først om der er auto-detektion. Hvis der ikker er det, sĂĽ prøv at vĂŚlge + soundblaster eller soundblaster 16 med default settings : "address=220 irq=7 + dma=1". Du ønsker mĂĽske ogsĂĽ at vĂŚlge + Sound Canvas/SCC/MPU-401/General MIDI/Wave Blaster pĂĽ address 330 IRQ=2 som + musik enhed. + Parametrene til de emulerede lydkort kan ĂŚndres i DOSBox's config-fil. + Hvis du stadig ikke fĂĽr nogen lyd kan du sĂŚtte core til normal og bruge nogle + lavere valgte cycles vĂŚrdier (F.eks. cycles=2000). VĂŚr ogsĂĽ sikker pĂĽ at din + lydenhed leverer lyd. + I visse tilfĂŚlde kan det vĂŚre godt at bruge en anden emuleret lydenhed + f.eks soundblaster pro(sbtype=sbpro1 i DOSBox's config fil) eller + gravis ultrasound(gus=true). + + +LYD: Hvilken Lyd-hardware emulerer DOSBox lige nu? + DOSBox emulerer adskillige lyd-enheder: + - Indbygget PC-højtaler/Buzzer + Denne emulering inkluderer bĂĽde tonegeneratoren og flere former for digital + lyd gennem den indbyggede højtaler. + - Creative CMS/Gameblaster + Dette er Creative Labs(R)'s første kort. Standard config sĂŚtter det pĂĽ + adressen 220. Det er slĂĽet fra som standard. + - Tandy 3 voice + Emuleringen mangler "støj-kanalen", som ikke er sĂŚrlig godt dokumenteret, og + er som sĂĽdan kun det "et bedre gĂŚt" pĂĽ lyd nøjagtigheden. Er slĂĽet fra + som standard. + - Tandy DAC + Nogle spil kan krĂŚve at sound blaster emuleringen slĂĽs fra(sbtype=none), for + at give bedre tandy DAC understøttelse(husk at sĂŚtte sbtype tilbage pĂĽ sb16 + efter brug). + - Adlib + Denne emulering er nĂŚsten perfekt og inkluderer Adlib's evne til nĂŚsten at + spille "digitized" lyd. Adressen er 220 (og 388). + - SoundBlaster 16 / SoundBlaster Pro I og II / SoundBlaster I og II. + Som standard leverer SoundBlaster 16 niveaus 16-bit stereo lyd . Du kan vĂŚlge + en anden SoundBlaster version i DOSBox's indstillinger. AWE32 musik er ikke + emuleret, da du kan bruge MPU-401 istedet(se nedenunder). + - Disney Sound source og Covox Speach Thing + Bruger printerporten, enheden sender kun digital lyd ud. Placeret pĂĽ LPT1. + - Gravis Ultrasound + Emuleringen af denne hardware er nĂŚsten komplet, selvom midi-funktionerne er + udeladt, da der er en MPU-401, emuleret i anden kode. For at fĂĽ Gravis + musik, kan det vĂŚre nødvendigt at installere Gravis Drivere i selve DOSBox. + Er slĂĽet fra som standard. + - MPU-401 + Et midi gennemgangs interface er ogsĂĽ emuleret. Denne form for lydudgang + virker kun med "udenoms" enhed/emulator. + Windows XP/Vista/7 og MAC OS har til standard en emulator der er kompatibel + med: Sound Canvas/SCC/General Standard/General MIDI/Wave Blaster. + Der skal bruges en anden enhed/emulator til Roland LAPC/CM-32L/MT-32 + kompatabilitet. + + + +LYD: Lyden hakker eller lyder mĂŚrkelig. + Du bruger mĂĽskĂŠ for meget cpu kraft til at holde DOSBox kørende ved den + aktuelle hastighed. Du kan nedsĂŚtte cycles, skippe frames reducere sampling + raten pĂĽ den pĂĽgĂŚldende lydenhed (se DOSBox's config-fil) eller mixer-enheden. + Du kan ogsĂĽ forøge prebufferen. Se sektion 13. "Config-filen (indstillingsfilen)" + Hvis du bruger cycles=max eller =auto , sĂĽ vĂŚr sikker pĂĽ at der ingen bag- + grundsprocesser kører, som forstyrrer! (sĂŚrligt hvis de bruger harddisken) + Se ogsĂĽ sektion 10. "Hvordan du ĂŚndrer hastigheden pĂĽ DOSBox" + + + +TASTSTUR: Jeg kan ikke skrive \ eller : i DOSBox. + Dette er et kendt problem. Det opstĂĽr hvis dit keyboard/tastatur layout + ikke er har et tilsvarende DOS layout (eller ikke blev genkendt korrekt), + eller tasterne er forkert tildelt. + Nogle mulige løsninger: + 1. Brug / istedet for, eller Alt-58 istedet for : og Alt-92 istedet for \. + 2. Lav om pĂĽ dit DOS tastatur layout (se sektion 8 : Tastatur layout). + 3. Tilføj de kommandoer(extra) som du vil køre i [autoexec]-sektionen + i DOSBox's "config-fil". + 4. Åbn config-filen og lav usescancodes=false om til usescancodes=true. + 5. Skift tastatur layout i dit operativsystem. + + BemĂŚrk at hvis vĂŚrtslayoutet ikke kan genkendes, eller tastaturlayout er + sat til none i DOSBox's config-fil, bruges standard US layout. + Prøv i sĂĽfald tasterne omkring "enter" for \ og prøv skift og tasterne + imellem "enter" og "L" for ":" . + + + +TASTATUR: Højre Skift og "\" virker ikke i DOSBox. (kun Windows) + Dette forekommer nĂĽr Windows "tror" at du har mere end ĂŠt tastatur tilsluttet, + fordi du bruger fjernstyrede enheder. tjek det med : + start cmd.exe + navigĂŠr til DOSBox's programfolder + skriv set sdl_videodriver=windib og tast enter + tast dosbox.exe og tast enter + Hvis det virker som det skal, er det bedre at bruge en af de to løsninger hĂŠr: + https://www.vogons.org/viewtopic.php?t=24072 + + + +TASTATUR: Keyboardet/tastaturet forsinkes. + SĂŚnk prioritetssindstillingen i DOSBox's config-fil, prøv f.eks. : + "priority=normal,normal". Du kan ogsĂĽ sĂŚtte et lavere antal cycles + (brug fast antal cycles under start f.eks cycles=10000). + + + +KONTROL: Figuren/markøren bevĂŚger sig altid i en retning! + Se om det stadig sker hvis du slĂĽr joystick emuleringen fra, + sĂŚt joysticktype=none i [joystick] sektionen i DOSBox's config-fil. + Du skal mĂĽskĂŠ ogsĂĽ prøve at trĂŚkke stik(ene) ud pĂĽ dit/dine joystick(s). + Hvis du ønsker at bruge joystick i spillet, prøv sĂĽ at sĂŚtte timed=false, + calibrĂŠr joysticket(bĂĽde dit OS og i spillet eller dit spil's setup). + + + +HASTIGHED: Spillet/Programmet kører for langsomt/for hurtigt! + Se i sektion 10. "Hvordan du ĂŚndrer hastigheden pĂĽ DOSBox". + + + +NEDBRUD: Spillet/Programmet kører overhovedet ikke/bryder ned! + Se sektion 11: "Problemløsning". + + + +NEDBRUD: DOSBox bryder ned ved opstart! + Se sektion 11: "Problemløsning". + + + +SPIL: Mit Build spil(Duke3D/Blood/Shadow Warrior)virker ikke som det skal. + Prøv først at finde en ĂŚndret udgave af spillet. disse giver en + en bedre spil-oplevelse. For at løse grafik-problemerne som forekommer med + DOSBox i højere opløsninger. Åbn DOSBox's config-fil find machine=svga_s3 + lav svga_s3 om til vesa_nolfb. + Ændr memsize=16 til memsize=63 + + + +SIKKERHED: Kan DOSBox skade min computer? + DOSBox kan ikke skade din computer mere et hvilket som helst andet resource + krĂŚvende program. forøgelse af cycles overclocker ikke din fysiske CPU. + for højt sat cycles har en negativ ydelseseffekt pĂĽ software der kører i + DOSBox. + + + +Indstillinger: Jeg vil gerne ĂŚndre DOSBox's indstillinger. + Se sektion 13. "Config-filen (indstillingsfilen)" + + + +HJÆLP: God manual, men jeg forstĂĽr det stadig ikke. + LĂŚs resten af denne Manual Tag ogsĂĽ et kig pĂĽ guider du kan finde pĂĽ: + https://www.vogons.org/viewforum.php?f=53 + DOSBox's wiki https://www.dosbox.com/wiki/ + Forumet: https://www.dosbox.com + + + +========================== +3. Kommandolinie Parametre +========================== + +Et overblik over kommandolinie options/mulighederne du kan bruge med DOSBox. +Selvom det, i de fleste tilfĂŚlde, er nemmere at bruge DOSBox's config-fil. +Se sektion 13. "Config-filen (indstillingsfilen)" + +For at kunne bruge kommando-parametre, skal du: +(windows) Åbne cmd.exe, eller command.com, eller rette i Genvej/shortcut til +DOSBox.exe. +(Linux) Brug konsollen. +(MAX OS X) start terminal.app og navigĂŠr til: + /applications/dosbox.app/contents/macos/dosbox + +Mulighederne er brugbare for alle operativ systemer medmindre der stĂĽr andet +i options beskrivelsen: + +dosbox [navn] [-exit] [-c command] [-fullscreen] [-userconf] [-conf congfig-fil] + [-lang sprog-fil] [-machine maskinetype] [-noconsole] + [-startmapper] [-noautoexec] [-securemode] + [-scaler scaler | -forcescaler scaler] + [-version] [-socket socket] + + +dosbox -version +dosbox -editconf program +dosbox -opencaptures program +dosbox -printconf +dosbox -eraseconf +dosbox -erasemapper + + name + Hvis "navn" er et directory/en mappe/et bibliotek, bliver det/den/det + monteret som C: drevet. + Hvis "navn" er en eksekverbar fil, bliver "navn"s + directory/mappe/bibliotek monteret som C: drevet og "navn" eksekveret. + + -exit + DOSBox lukker sig selv nĂĽr programmet "navn" afsluttes. + + -c command + Kører den specificerede kommando før "navn" køres. Der kan specificeres + flere kommandoer. Hver kommando starter dog med "-c". + En kommando kan vĂŚre et internt program, en DOS kommando eller en + eksekverbar fil pĂĽ et monteret drev. + + -fullscreen + Starter DOSBox i fuldskĂŚrm modus. + + -userconf + StartER DOSBox MED BRUGER-specifiK config-fil. kan bruges sammen med flere + -conf parametre, men -userconf indlĂŚses altid først. + + -conf config-fil + Starer DOSBox med options/muligheder specificeret i "config-fil"(KAN + vĂŚre nødvendig med fuld sti). + Der kan medtages flere -conf muligheder. + Se sektion 13 for flere detaljer. + + -lang sprog-fil + Start DOSBox med sproget specificeret i "sprog-fil". + Se sektion 14 for flere detaljer. + + -machine maskinetype + SĂŚt DOSBox til at emulere en speciel type maskine. brugbare valg er: + hercules, cga, ega, pcjr, tandy, svga_s3 (standard) som de andre + svga chipsets der er nĂŚvnt i DOSBox's config-fil. + bĂĽde grafikkort og tilgĂŚngelige lydkort. svga_s3 tilføjer ogsĂĽ vesa- + emulering. For nogle specielle vga-effekter, kan vĂŚlges machine typen + vgaonly, bemĂŚrk at dette fjerner svga muligheder og kan vĂŚre (betydelig) + langsommere pĂĽ grund af den meget større emuleringsprecission. + Valget af maskinetype anfĂŚgter bĂĽde grafikkort og tilgĂŚngelige lydkort. + + + -noconsole (Windows Only) + Start DOSBox uden at vise konsol-vinduet. Output bliver omstillet til + stdout.txt and stderr.txt + + -startmapper + FĂĽ direkte adgang til keymapperen ved opstart. Brugbart hvis du har + keyboard/tastatur problemer. + + -noautoexec + Skipper [autoexec] sektionen af den indlĂŚste config-fil. + + -securemode + Samme som -noautoexec, men tilføjer config.com -securemode i + bunden af AUTOEXEC.BAT (hvilket fjerner ĂŚndringer i forhold til hvordan + drevene monteres i selve DOSBox). + + -scaler scaler + Bruger scaleren angivet med "scaler". Se i DOSBox's config-fil + hvilke scalere du kan bruge. + + -forcescaler scaler + Ligesom -scaler parameteren, men prøver at tvinge brugen af + den specificerede scaler selvom den mĂĽskĂŠ ikke passer. + + -version + Skriver version information og afslutter. Brugbart for Frontends. + + -editconf program + Kalder program med config-filen som første parameter. + Man kan skrive denne kommando mere end en gang. Hvis man gør det + ĂĽbnes andet program, hvis det første fejler. + + -opencaptures program + Kalder program med captures folderen/directoryet/biblioteket som + første parameter. + + -printconf + Skriver placeringen af standard config-fil. + + -resetconf + Fjerner standard config-fil. + + -resetmapper + Fjerner mapperfilen der bliver brugt af standard config-fil. + + -socket + Sender sokkel nummer til nullmodem emulĂŠringen. See Section 9: + "Serial Multiplayer feature." + +Note: Hvis navn/kommando/configfil/sprog-fil indeholder mellemrum, skal du sĂŚtte + navn/kommando/configfil/sprog-fil i anførelsestegn("kommando eller filnavn"). + Hvis skal bruge anføreslsetegn inden i anføreslsetegn(sansynligvis med + -c og mount): + Windows og Os2 brugere kan bruge enkelt anførselstegn inden i almindelige + anførselstegn. Andre bør kunne bruge "escaped double quotes"(\") inden + i lamindelige anførselstegn. + Windows: -c "mount c 'c:\My folder with DOS games\'" + Linux: -c "mount c \"/tmp/name with space\"" + + +Et noget usĂŚdvanligt eksempel, til demonstration (windows): +dosbox.exe D:\folder\file.exe -c "MOUNT Y H:\MyFolder" + Dette monterer D:\folder as C:\ and runs file.exe. + men før den gør dette monteres H:\MyFolder som Y drevet. + +I Windows kan du ogsĂĽ trĂŚkke foldere/filer hen pĂĽ DOSBox.exe (ell. pĂĽ genvej til). + + + +======================= +4. Interne Programmmer: +======================= + +DOSBox understøtter de fleste DOS kommandoer der bruges i command.com. +Du kan skrive "HELP" ved prompten(efterfulgt af enter) for at fĂĽ en liste over +de interne kommandoer. + +Desuden er de følgende kommandoer tilgĂŚngelige: + +MOUNT "Emuleret Drev bogstav" "Rigtige Drev eller Folder" + [-t type] [-aspi] [-ioctl] [-noioctl] [-usecd nummer] [-size drevstørrelse] + [-label drevlabel] [-freesize størrelse_i_mb] + [-freesize størrelse_i_kb (floppies)] +MOUNT -cd +MOUNT -u "Emuleret Drev Bogstav" + + Program til at montere lokale directories/mapper/biblioteker som drev i DOSBox. + + "Emuleret Drev Bogstav" + Drev Bogstavet i DOSBox (f.eks. C). + + "Rigtige Drev bogstav (normalt for CD-ROMMer i Windows) eller Folder" + Det/den lokale directory/mappe/bibliotek du ønsker at tilgĂŚngeligt i DOSBox. + + -t type + Type af monteret directory. følgende kan bruges: dir (default), + floppy, cdrom. + + -size drevstørrelse + SĂŚtter størrelsen pĂĽ drevet, hvor drevstørrelse er angivet i : + "bps,spc,tcl,fcl": + bps: bytes pr sektor, default 512 for regulĂŚre drev og + 2048 for CD-ROM drev + spc: sektorer pr klynge, normalt mellem 1 and 127 + tcl: total klynger, mellem 1 and 65534 + fcl: total frie klynger, mellem 1 og tcl + + -freesize størrelse_i_mb | størrelse_i_kb + SĂŚtter mĂŚngden af fri plads pĂĽ drev i megabytes. + (regulĂŚre drev) eller kilobytes (floppy drev). + Dette er en simplere version af -size. + + -label drevlabel + SĂŚtter navnet pĂĽ drevet til "drevlabel". Er nødvendigt pĂĽ nogle systemer + hvis CD'ens label ikke bliver lĂŚst korrekt (VĂŚrdifuldt nĂĽr et program + ikke kan finde sin CDROM). Hvis du ikke specificerer en/et label og der + ikke er valgt lav-niveau understøttelse (-usecd # og/eller -ioctl/-aspi + /-noioctl): + Windows: label bliver hentet fra "Rigtige Drev". + Linux: label bliver sat til NO_LABEL. + + Hvis du specificerer en/et label, vil den/dette label vare lige sĂĽ lĂŚnge + som drevet er monteret. Det vil ikke blive opdateret !! + + -aspi + Tvinger brugen af aspi-lag. Kun brugbar hvis cdrom monteres under + Windows systemer med ASPI-Lag. + + -ioctl (automatisk valg af CD audio interface) + -ioctl_dx (der bruges digital audio extraction til CD audio) + -ioctl_dio (ioctl kald bruges til CD audio) + -ioctl_mci (MCI bruges til CD audio) + Tvinger brug af ioctl kommandoer, kan kun bruges til at montere CD-ROM + pĂĽ et Windows OS som understøtter dem (Win2000/XP/NT). + De forskellige valg er kun forskellige i mĂĽden CD-Audio hĂĽndtĂŠres, + bedste valg kan vĂŚre -ioctl_dio(mindst resourcekrĂŚvende), men virker + det ikke, kan -ioctl_dx (eller -ioctl_mci) bruges. + + -noioctl + Tvinger brug af SDL CD-ROM laget. Brugbart til alle systemer. + + -usecd nummer + Kan bruges pĂĽ alle systemer, under Windows skal -noioctl switchen vĂŚre + tilstede for at kunne bruge -usecd switchen. + Gør det muligt at vĂŚlge drevet, SDL skal bruge. Brug det hvis det forkerte + eller ingen CDROM-drev bliver monteret nĂĽr du bruger SDL CDROM interfacet. + "nummer" kan findes med kommandoen "MOUNT -cd". + + -cd + Viser alle SDL-fundne cdrom drev og deres numre Bruges sammen med -usecd. + Se informationen under -usecd ovenover. + -u + Fjerner monteringen. Virker ikke for Z:\. + + Note: Det er muligt at montere lokalt directory/mappe/bibliotek som cdrom drev. + i sĂĽ fald er der ingen Hardware Understøttelse. + + I bund og grund tillader MOUNT dig at montere reel hardware til DOSBox's emu- + leret PC. + SĂĽ MOUNT C C:\Dosspil fĂĽr DOSBox til at bruge din C:\Dosspil Folder som C: + i DOSBox. I DOSBox vil MOUNT C E:\EnFOlder lade DOSBox bruge E:\EnFolder som + drev C: i DOSBox. + + Det er ikke anbefalet at Montere hele C drevet med MOUNT C C:\ Det samme gĂŚlder + for at montere roden et andet drev, bortset fra CD-ROMer (grundet af deres ikke- + skrivebare natur). Eller du eller DOSBox kan lave fejl - sĂĽ du risikerer at + miste alle dine filer. Lad ogsĂĽ vĂŚre med at Montere "Windows" eller "Programmer" + eller deres under-foldere i Windows Vista/7 , da det kan forhindre DOSBox i at + virke korrekt, eller virke korrekt senere. Det anbefales at have alle spil/ + programmer i en simpel folder, f.eks c:\Dosspil(eller underfoldere til) og + sĂĽ montere den. + + + Du bør altid installere dit spil I DOSBox + SĂĽ hvis du har CD'en bør du altid(selv efter installation) montere bĂĽde + Folderen som harddisk og CDROMMEN. + Harddisk bør monteres som c + CDROM bør monteres som d + Floppy bør monteres som a (ell. b) + + Generelle MOUNT Eksempler (windows): + + 1. At montere Folder som Harddiskdrev : + mount c d:\Dosspil + + 3. At montere dit CDROM drev E som cdrom drev D i DOSBox: + mount d e:\ -t cdrom + + 2. At montere a: som diskette : + mount a a:\ -t floppy + + Avancerede monteringseksempler (windows): + + 4. At montere et drev med 870 mb fri diskplads (simpel version): + mount c d:\Dosspil -freesize 870 + + + 5. At montere et drev med 870 mb free diskspace (kun eksperter, fuld kontrol): + mount c d:\Dosspil -size 512,127,16513,13500 + + 1. At montere c:\Dosspil\floppy som diskette : + mount a c:\Dosspil\floppy -t floppy + + + Andre monteringseksempler: + + 3. At montere system cdrom drev pĂĽ mountpoint /media/cdrom som cdrom drev D + i DOSBox: + mount d /media/cdrom -t cdrom -usecd 0 + + 6. At montere /home/user/Dosspil som drev C in DOSBox: + mount c /home/user/Dosspil + + 7. At montere Mappe hvor DOSBox blev startet som D i DOSBox: + mount d . + (lĂŚg mĂŚrke til . som reprĂŚsenter mappen hvor DOSBox blev startet) + + Hvis du ønsker at montere et cd-billede/image, prøv IMGMOUNT. + Mount virker ogsĂĽ med cd-billeder/images, men kun hvis du bruger + eksterne programmer f.eks. (begge er gratis): + - Daemon Tools Lite (til CD billeder/images), + - Virtual Floppy Drive (til floppy images). + Selvom IMGMOUNT skulle give en bedre kompatabilitet. + + +MEM + Program til at vise størrelsen pĂĽ fri hukommelse. + + +VER +VER set hoved_version [under_version] + Viser nuvĂŚrende DOSBox version og raporteret DOS version + (uden parameter). + Ændrer den raporterede DOS version med "set" parameteren, + f.eks: "VER set 6 22" for at fĂĽ DOSBox til at raportere DOS 6.22 + som version nummer. + + +CONFIG -writeconf lokal-fil +CONFIG -writelang lokal-fil +CONFIG -securemode +CONFIG -set "sektion egenskab=vĂŚrdi" +CONFIG -get "sektion egenskab" + + CONFIG kan bruges til at ĂŚndre eller forespørge forskellige indstillinger i + DOSBox under brug. CONFIG kan gemme "nuvĂŚrende indstillinger" og "sprogstrenge" + til disken(f.eks generere en dansk dosbox.conf). CONFIG Information om alle + mulige sektioner kan findes i sektion 13: "Config-filen (indstillingsfilen)". + + -writeconf lokal-fil + Skriver de nuvĂŚrende indstillinger til fil. "lokal-fil" er lokaliseret pĂĽ + det lokale drev ikke pĂĽ et monteret drev i DOSBox. + CONFIG-filen kontrollerer forskellige DOSBox-indstillinger : + størrelsen pĂĽ emuleret hukommelse, de emulerede lydkortog mange andre ting + CONFIG-filen giver dig ogsĂĽ adgang til AUTOEXEC.BAT. + Se gerne sektion 13. "Config-filen (indstillingsfilen)". + + -writelang lokal-fil + Skriver de nuvĂŚrende sprog-indstillinger til fil. "lokal-fil" er lokali- + seret pĂĽ det lokale drev ikke pĂĽ et monteret drev i DOSBox. + Sprog-filen kontrolerer alle synlige output fra de interne kommandoer og + den interne DOS. + Se gerne sektion 14 "sprog-filen". + + -securemode + Skifter DOSBox til mere sikker modus. I dette modus virker de interne + kommandoer MOUNT, IMGMOUNT and BOOT ikke. Det er heller ikke muligt at + kreere en ny config-fil eller language-fil i dette modus. + (Advarsel: du kan kun afslutte dette modus ved at genstarte DOSBox.) + + -set "sektion egenskab=vĂŚrdi" + CONFIG vil prøve at sĂŚtte pĂĽgĂŚldende egenskab til en ny vĂŚrdi. Lige nu + kan CONFIG ikke fortĂŚlle om kommandoen lykkedes eller ikke. + + -get "sektion egenskab" + NuvĂŚrende vĂŚrdi af pĂŚgĂŚldende egenskab skrives og gemmes i miljø-variablen + %CONFIG%.Denne kan bruges til at gemme vĂŚrdien nĂĽr man bruger batch filer. + + BĂĽde "-set" og "-get" virker fra batch filer og kan bruges til at generere egne + indstillinger for hvert spil. Det er dog mĂĽske lettere at bruge forskellige + DOSBox config-filer. + + Eksempler: + 1. At lave en config-fil i nuvĂŚrende i din c:\Dosspil folder: + config -writeconf c:\dosspil\dosbox.conf + 2. At sĂŚtte cpu cycles til 10000: + config -set "cpu cycles=10000" + 3. At afbryde ems hukommelses emulering: + config -set "dos ems=off" + 4. At se hvilken cpu core/kerne der bruges. + config -get "cpu core" + + +LOADFIX [-størrelse] [program] [program-parameters] +LOADFIX -f + Program til at reducere mĂŚngden af fri hukommelse. Brugbar til gamle + programmer der ikke forventer meget fri hukommelse. + + -size + antal kilobytes at "ĂŚde op", default = 64kb + + -f + frigør alt tidligere allokeret hukommelse + + +Eksempler: + 1. At starte mm2.exe og allokere 64kb hukommelse + (mm2 will have 64 kb less available) : + loadfix mm2 + 2. At starte mm2.exe og allokere 32kb hukommelse : + loadfix -32 mm2 + 3. At frigøre tidligere allokeret hukommelse : + loadfix -f + + +RESCAN + FĂĽr DOSBox til at genindlĂŚse directory/mappe/biblioteks strukturen. Brugbar + hvis du har ĂŚndret noget, pĂĽ et monteret drev, udenfor DOSBox. (CTRL-F4 gør ogsĂĽ + dette!) + + +MIXER + FĂĽr DOSBox til at vise nuvĂŚrende lydindstillinger. + Her er mulighederne for at ĂŚndre dem: + + mixer channel left:right [/NOSHOW] [/LISTMIDI] + + channel + Kan vĂŚre : MASTER, DISNEY, SPKR, GUS, SB, FM, [, CDAUDIO]. + CDAUDIO er kun tilgĂŚngeligt hvis et CDROM interface med volume kontrol + er muliggjort (CD image, ioctl_dx). + + left:right + Lydniveauet i procent. Hvis du sĂŚtter D foran ĂŚndres det til + decibell (eksempel mixer gus d-10). + + /NOSHOW + Forhindrer DOSBox i at vise resultatet hvis du sĂŚtter et lydniveau. + + /LISTMIDI + Skriver en liste over tilgĂŚngelige midi enheder pĂĽ din pc (Windows). + Du kan vĂŚlge en anden enhed end Windows default midi-mapper, ved at ĂŚndre + linien 'midiconfig=' [midi] sektionen i Config-filen, til + 'midiconfig=id', hvor 'id' er nummeret pĂĽ enheden fra listen genereret af + LISTMIDI f.eks midiconfig=2. + + Dette virker ikke i Linux, men du kan nĂĽ tilsvarende resultat(er) ved at + bruge 'pmidi -l' i konsol. SĂĽ ĂŚndre linien 'midiconfig=' til + 'midiconfig=port', hvor 'port' er porten for enheden listet med 'pmidi -l'. + f.eks. midiconfig=128:0 + + +IMGMOUNT + Et program til at montere disk images og CD-ROM images i DOSBox (f.eks. en iso). + + IMGMOUNT DREV [imagefil] -t [image_type] -fs [image_format] + -size [sectorsbytesize, sectorsperhead, heads, cylinders] + IMGMOUNT DREV [imagefile1, .. ,imagefileN] -t iso -fs iso + + imagefil + Placering af image-fil der skal monteres i DOSBox. Placeringen kan vĂŚre pĂĽ + et monteret drev i DOSBox, eller pĂĽ din fysiske disk. Det er ogsĂĽ muligt at + montere CD-ROM-billeder (ISOer eller CUE/BIN), Hvis du har brug for at kunne + "skifte cd" skal du skrive alle images i rĂŚkkefølge + (se nĂŚste indgang) + + CUE/BIN sĂŚt, er de foretrukne CD-ROM images da de kan indeholde lydspor, + modsat ISOer (som kun kan indeholde data-spor). NĂĽr du skal + montere CUE/BIN, skal du altid bruge .CUE-filen + + imagefile1, .. ,imagefileN + Placeringen af image-filer der skal monteres i DOSBox. At specificere et + antal image-filer er kun tilladt for CD-ROM images. CD'erne kan + skiftes med CTRL-F4 til enhver tid. Dette er nødvendigt med spil som bruger + flere CD-ROMMER og krĂŚver at CD'en bliver skiftet undervejs i spillet. + + -t + Følgende er godkendte image typer: + floppy: Specificerer et eller flere floppy image(s). DOSBox finder selv + diskens geometri (360K, 1.2MB, 720K, 1.44MB, osv.). + cdrom: Specificerer et CD-ROM iso image. Geometrien bliver sat automa- + tisk. Kan vĂŚre en iso eller cue/bin. + hdd: Specificerer et harddisk image. Den brugelige CHS geometri skal + skrives for at det virker. + + -fs + Følgende er brugbare filsystem formater: + iso: Specificerer ISO 9660 CD-ROM formatet. + fat: Specificerer at billedet bruger FAT filsystemet. DOSBox vil forsøge + at montere dette image som et drev i DOSBox og gøre filerne tilgĂŚngelige + i DOSBox. + none: DOSBox Gør ikke noget forsøg pĂĽ at lĂŚse filsystemet pĂĽ disken. + Dette bruges hvis hvis du skal formatere den eller starte den med med + BOOT kommandoen. NĂĽr du bruger "none" filsystem, er det bedre at + specificere drevnummer (2 eller 3, + 2 = master, 3 = slave) end et drevbogstav. + For eksempel monteres et 70MB image som slave drev, + sĂĽdan(uden anførelsestegn): + "imgmount 3 d:\test.img -size 512,63,16,142 -fs none" + (uden anførelsestegn) sammenlignet med en montering for at lĂŚse + drevet i DOSBox, som ser sĂĽdan ud: + "imgmount e: d:\test.img -size 512,63,16,142" + + -size + Specificering af drevets Cylindre, Heads og Sektorer. + Er nødvendigt for at montere harddisk drev images. + + Et eksempel pĂĽ hvordan man monterer CD-ROM images (i Linux): + 1. imgmount d /tmp/cdimage1.cue /tmp/cdimage2.cue -t cdrom + eller(som ogsĂĽ virker) + 2a. mount c /tmp + 2b. imgmount d c:\cdimage1.cue cdimage2.cue -t iso + (i Windows): + imgmount d f:\img\CD1.cue f:\img\CD2.cue f:\img\CD3.cue -t cdrom + imgmount d "g:\img\7th Guest CD1.cue" "g:\img\7th Guest CD2.cue" -t cdrom + Glem ikke at du ogsĂĽ kan bruge MOUNT med image(s), men kun hvis du bruger externe + programmer(begge er gratis): + - Daemon Tools Lite (for CD images), + - Virtual Floppy Drive (for floppy images). + Selvom IMGMOUNT kan give bedre kompatabilitet. + + +BOOT + Boot starter floppy images eller harddisk images uafhĂŚngigt af operativ- + systemes emuleringen DOSBox tilbyder. Dette tillader dig at spille starter- + disketter eller starte andre operativsystemer. + Hvis det valgte emulerede system er PCjr (machine=pcjr) kan boot kommandoen + bruges til at indlĂŚse PCjr magasiner (.jrc). + + BOOT [diskimg1.img diskimg2.img .. diskimgN.img] [-l drevbogstav] + BOOT [cart.jrc] (PCjr only) + + diskimg1.img diskimg2.img .. diskimgN.img + Kan vĂŚre et relativt nummer pĂĽ diskette/floppy -images, der ønskes monteret + efter at DOSBox starter(booter) det specificerede drevbogstav. + du kan taste CTRL-F4 for at skifte fra nuvĂŚrende disk til nĂŚste disk + pĂĽ listen. Listen starter forfra efter sidst disk image. + + [-l drevbogstav] + Denne parameter tillader dig at specificere drevet du vil starte fra. + Default er A drevet, floppy drevet. Du kan ogsĂĽ starte et harddisk image + monteret som master ved at specificere "-l C" uden anførelsestegn, eller + starte drevet som slave ved at specificere "-l D" + + cart.jrc (PCjr only) + NĂĽr emulering af PCjr er slĂĽet til, kan man indlĂŚse magasiner med + BOOT kommandoen. Der er stadig begrĂŚnset understøttelse. + + +IPX + + For IPX, er det er nødvendigt at muliggøre IPX netvĂŚrk i DOSBox's Config-fil. + + Al IPX-netvĂŚrk bliver styret gennem det interne DOSBox program IPXNET. + For hjĂŚlp til IPX netvĂŚrk i DOSBox, tast "IPXNET HELP" (uden anførelsestegn), + sĂĽ fĂĽr du en liste over kommandoer og relevant dokumentation. + + Hvad angĂĽr at sĂŚtte et netvĂŚrk op, skal den ene PC vĂŚre server. Dette sker med + kommandoen : "IPXNET STARTSERVER" (uden anførelsestegn) i en kørende DOSBox. + Server DOSBox'en tilføjer automatisk sig selv til det virtuelle IPX netvĂŚrk. + Du skal taste "IPXNET CONNECT " for hver eneste + computer som tilføjes det virtuelle IPX netvĂŚrk, + For eksempel, hvis din server er pĂĽ bob.dosbox.com, skal du taste + "IPXNET CONNECT bob.dosbox.com" pĂĽ hver eneste ikke-server maskine. + + At spille spil der krĂŚver Netbios skal du bruge en fil som hedder NETBIOS.EXE + fra Novell. Opret IPX forbindelsen som forklaret ovenover og kør sĂĽ "netbios.exe". + + Følgende er en IPXNET kommando reference: + + IPXNET CONNECT + + IPXNET CONNECT ĂĽbner forbindelsen til en IPX kanaliseret server, som kører + pĂĽ en anden DOSBox maskine. "addresse" parameteren specificerer IP adressen + eller vĂŚrtsnavnet pĂĽ server-PC'en. Du kan ogsĂĽ specificere hvilken UDP port + du vil bruge. Default bruger IPXNET port 213 - den til IPX kanaliseret + tildelte IANA port - til sin forbindelse. + + Syntaxen for IPXNET CONNECT er: + IPXNET CONNECT addresse + + IPXNET DISCONNECT + + IPXNET DISCONNECT lukker forbindelsen til den IPX kanaliserende server. + + Syntaxen for IPXNET DISCONNECT er: + IPXNET DISCONNECT + + IPXNET STARTSERVER + + IPXNET STARTSERVER starter en IPX kanaliserende server pĂĽ den kørende DOSBox. + Standard, vil serveren acceptere forbindelser pĂĽ UDP port 213, selvom dette kan + ĂŚndres. DOSBox opretter automatisk en klient-forbindelse til IPX + kanaliseringsserveren nĂĽr denne er startet. + + Syntaxen for IPXNET STARTSERVER er: + IPXNET STARTSERVER + + Hvis serveren er bag en router skal UDP port viderestilles til den + computer. + + PĂĽ Linux/Unix-baserede systemer kan port numre lavere end 1023 kun bruges med + root privilegier. Brug porte højere end 1023 pĂĽ disse systemer. + + IPXNET STOPSERVER + + IPXNET STOPSERVER stopper IPX kanaliserings-serveren som er kører pĂĽ nuvĂŚrende + DOSBox. Man bør forsikre sig om at alle andre forbindelser til ogsĂĽ er af- + sluttet, da nedlukning af serveren kan vĂŚre skyld i lockups/frysninge pĂĽ andre + maskiner som stadig benytter IPX kanaliserings-serveren. + + Syntax for IPXNET STOPSERVER er: + IPXNET STOPSERVER + + IPXNET PING + + IPXNET PING rundsender en ping forespørgsel pĂĽ det IPX kanaliserede netvĂŚrk. + Til svar vil alle de tilsluttede computere rapportere tiden det tog at sende + og modtage ping forespørgslen. + + Syntaxen for IPXNET PING er: + IPXNET PING + + IPXNET STATUS + + IPXNET STATUS, rapporterer status pĂĽ nuvĂŚrende DOSBox's IPX kanaliserede + netvĂŚrk. Hvis du vil have en liste over alle computere tilsluttet netvĂŚrket, + skal du bruge IPXNET PING kommandoen. + + Syntaxen for IPXNET STATUS er: + IPXNET STATUS + + +KEYB [tastaturlayoutkode [kodeside [kodesidefil]]] + + Ændrer tastatur layoutet.VĂŚr venlig at se sektion 8 : "Tastatur Layout", hvis + du ønsker detaljeret information om tastatur layouts. + + [tastaturlayoutkode] er en streng bestĂĽende af fem eller fĂŚrre bogstaver, + nogle eksempler er : it141 itl42 (IT) (Italy) eller dk159 (DK) (Danmark). Den + specificerer hvilket keyboard/tastatur layout der skal bruges. + Listen over samtlige DOSBox layouts findes her: + https://www.vogons.org/viewtopic.php?t=21824 + + + [kodeside] er nummeret pĂĽ kodesiden der skal bruges. Keyboard/tastatur layoutet + skal give understøttelse for den specificerede kodeside, ellers kan layoutet ikke + indlĂŚses. Hvis der ikke er angivet nogen kodeside, bliver der automatisk valgt + en passende kodeside for det ønskede layout. + + [kodesidefil] kan bruges til at indlĂŚse kodesider som endnu ikke er indbyggede i + DOSBox. Det bruges kun nĂĽr DOSBox ikke kan finde kodesiden. + Hvis der ikke er specificeret en kodesidefil, men alle ti ega.cpx filer fra + FreeDOS er placeret i DOSBox-program folderen, vĂŚlges der en passende + kodesidefil for forespurgte layout/kodeside, automatisk. + + Eksempler: + 1) At indlĂŚse et polsk Keyboard/tastatur layout (bruger automatisk kodeside 852): + keyb pl214 + 2) At indlĂŚse et af de russiske Keyboard/tastatur layout med kodeside 866: + keyb ru441 866 + For at kunne skrive russiske bogstaver tast ALT+HØJRE-SKIFT. + 3) At indlĂŚse det franske Keyboard/tastatur layout med kodeside 850 (hvor kode- + siden er defineret i filen EGACPI.DAT): + keyb fr189 850 EGACPI.DAT + 4) At indlĂŚse kodeside 858 (uden keyboard/tastatur layout): + keyb none 858 + Dette kan bruges til at ĂŚndre kodesiden for FreeDos's keyb2 program. + 5) For at vise nuvĂŚrende kodeside og, hvis indlĂŚst, tastatur layoutet + keyb (efterfulgt af Enter/Return) + + + +Hvis du vil vide mere, brug /? efter program/kommandoen. + + + +==================== +5. Specielle taster: +==================== + +ALT-ENTER FuldskĂŚrm til/fra. +ALT-PAUSE Pause DOSBox. +CTRL-F1 Starter keymapper. +CTRL-F4 Skifter imellem monterede disk-images. Opdaterer + directory-/mappe-/bibliotek-lageret for alle drev! +CTRL-ALT-F5 Starter/Stopper optagelse af film af skĂŚrmbillede. (avi video optagelse) +CTRL-F5 Gemmer et skĂŚrmbillede. (png type) +CTRL-F6 Starter/Stopper optagelse af lyd til en wave file. +CTRL-ALT-F7 Starter/Stopper optagelse af OPL kommandoer (DRO format). +CTRL-ALT-F8 Starter/Stopper optagelse af rĂĽ MIDI kommandoer. +CTRL-F7 Formindske tab af frames/rammer. +CTRL-F8 Forstørre tab af frames/rammer. +CTRL-F9 Afslutte DOSBox. +CTRL-F10 Binde/frigøre musen. +CTRL-F11 Sløve emulĂŠringen (NedsĂŚtte DOSBox Cycles). +CTRL-F12 SĂŚtte mere fart pĂĽ emuleringen (Øge DOSBox Cycles).* +ALT-F12 Frigøre hastighed (turbo knap).** +F11, ALT-F11 (machine=cga) ĂŚndre farvetonen i NTSC mode*** +F11 (machine=hercules) bladre igennem farverne : ambra, grøn, hvid*** + +*NOTAT: Hvis du forøger DOSBox's cycles over din computers maximum ydeevne, + vil det give samme effekt som at sløve emuleringen. + Dette maximum vil variere fra computer til computer. + +**NOTAT: Du skal have frie resourcer for dette(jo flere du har, jo hurtigere gĂĽr + det), sĂĽ det virker overhovedet ikke med cycles=max eller et for højt + sat "fixed cycles". Du skal holde tasterne nedtrykket, for at det + virker! + +***NOTE: Disse taster virker ikke hvis du tidligere har gemt en mapperfil med en + anden machine type. SĂĽ enten skal du tildele dem igen eller nulstille + /resette mapper. + +SĂĽdan er default tastebindinger. De kan ĂŚndres med keymapper +(se Sektion 7: KeyMapper (Tastatur og joystick indstillinger)). + +I MAC OS kan du prøve at bruge cmd (ĂŚbletasten) sammen med ctrl hvis tasten ikke +virker f.eks. cmd-ctrl-F1, men nogle taster skal nok stadig "mappes om" +(ogsĂĽ i Linux). + +Gemte indspillede filer kan findes i: + (Windows) "Start/WinLogo Menu"->"All Programs"->"DOSBox-0.74-2"->Extras + (Linux) ~/.dosbox/capture + (MAC OS X) "~/Library/Preferences/capture" +dette kan ĂŚndres i DOSBox's Config-fil. + + + +==================== +6. Joystick/Gamepad: +==================== + +Dos's Standard Joystick port understøtter et max pĂĽ 4 akser og 4 knapper. +For flere, blev der brugt forskellige ĂŚndringer. + +Du kan bruge linien "joysticktype" i [joystick] sektionen i DOSBox's config-fil, +til at ĂŚndre type. + +none - slĂĽr controleren fra +auto - (standard) finder automatisk ud af om du har een eller to controlere + tilsluttet. + hvis du har een - bruges '4axis' , + hvis du har to - bruges '2axis'. +2axis - Hvis du har 2 controlere sat til, vil de hver isĂŚr, emulere et joystick + med 2 akser og 2 knapper. Hvis du kun har een controler sat til, emu- + lĂŠres der et joystick med med 2 akser og 2 knapper. +4axis - Understøtter kun første controler, og emulĂŠrer et joystick med 4 akser + og 4 knapper, eller et gamepad med 2 akser og 6 knapper. +4axis_2 - Understøtter kun anden controler. +fcs - Understøtter kun første controler, emulĂŠrer ThrustMaster + Flight Control System, med 3 akser, 4 knapper og en hat. +ch - Understøtter kun første controler, emulĂŠrer CH Flightstick, + med 4-akser, 6 knapper og en hat, men du kan ikke bruge mere end een + knap af gangen. + +Du skal ogsĂĽ konfiguĂŠre controleren rigtigt i selve spillet. + +Det er vigtigt at huske, at hvis du gemte mapperfilen uden joysticket tilsluttet, +eller med andre joystick indstillinger, virker de nye indstillinger ikke korrekt, +eller overhovedet ikke før du har nulstillet DOSBox's mapperfil. + + +Hvis controleren virker perfekt udenfor DOSBox, men ikke calibrĂŠrer ordentligt i +DOSBox, kan du prøve forskellige 'timed' indstillinger i DOSBox's config-fil. + + + +=============================================== +7. Mapper (Tastatur og joystick indstillinger): +=============================================== + +NĂĽr du starter DOSBox mapper (enten med CTRL-F1 eller med -startmapper +som kommandolinieargument) bliver du presenteret for et virtuelt +keyboard/tastatur og et virtualt joystick. + +Disse virtuelle enheder reagere pĂĽ tasterne/knapperne som DOSBox videresender til +DOS programmer. Hvis du klikker pĂĽ en tast/knap med din mus, kan du se nederst +i venstre hjørne, hvilken funktion den er bundet til (EVENT) og hvilke funktioner +der lige nu er bundet. + +Event: EVENT +BIND: BIND + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENT + Tasten eller joystick akse/knap/hat DOSBox videresender til DOS program/spil. + (den handling som bliver udført i spillet, (f.eks skydning/hop/bevĂŚgelse) +BIND + Knappen pĂĽ dit fyssike keyboard/tastatur eller akse/knap/hat pĂĽ dit/dine fy- + siske joystick(s) (som meddelt af SDL) som er bundet til EVENT(en). +mod1,2,3 + Modfiers. Dette er taster du skal have nedtrykkede imens du taster BIND. + mod1 = CTRL og mod2 = ALT. Disse bliver generelt kun brugt nĂĽr du ønsker at + ĂŚndre DOSBox's specielle taster. +Add + Tilføjer en ny BIND til denne EVENT. Tilføjer grundlĂŚggende en tast fra dit + keyboard/tastatur eller en funktion joysticket (trykket knap, akse/hat bevĂŚ- + gelse) dette skaber en EVENT(handling) i DOSBox. +Del + Sletter denne EVENT's BIND. Hvis en EVENT ingen BINDS har, er det ikke muligt + at udløse den i DOSBox (man kan ikke udløse tasten eller joystick-funktionen). +Next + GennemgĂĽ listen over bindinger som leder til denne EVENT. + + +Eksempel: +Q1. Du ønsker at X'et pĂĽ dit keyboard/tastatur skriver Z i DOSBox. + A. Klik pĂĽ Z'et i keyboard mapper. klik "Add". + tryk nu x tasten pĂĽ dit keyboard/tastatur. + +Q2. Hvis du klikker "Next" et par gange, vil du bemĂŚrke, at Z'et pĂĽ dit + keyboard/tastatur ogsĂĽ laver et Z i DOSBox. + A. Derfor skal du vĂŚlge Z igen, og vĂŚlge "Next" til du har Z pĂĽ dit + tastatur. VĂŚlg nu "Del". + +Q3. Hvis du prøver det i DOSBox, vil du bemĂŚrke at nĂĽr du taster X kommer ZX + frem. + A. X'et pĂĽ dit keyboard/tastatur er ogsĂĽ stadig kortlagt til X! Klik pĂĽ + X'et i keyboard mapper og søg med "Next" til du finder den kortlagte + X tast. Klik "Del". + + +Eksempler pĂĽ at omprogramere joysticket: + Du har et joystick tilsluttet, det virker fint i DOSBox og du ønsker at spille + et kun-for-keyboard/tastatur spil med joysticket (det formodes at spillet + kontrolleres med piletasterne pĂĽ keyboardet/tastaturet): + 1) Start mapper, klik sĂĽ pĂĽ en af pilene i midten af venstre side af skĂŚrmen + (lige over Mod1/Mod2 knapperne). + EVENT skal vĂŚre key_left. Klik nu pĂĽ Add og flyt dit joystick i samme ret- + ning(som pilen peger), dette skulle tilføje en handling til BIND. + 2) Gentag ovenstĂĽende for de sidste 3 retninger, i tilføjelse kan knapperne + pĂĽ joysticket ogsĂĽ omprogrameres (fire/jump). + 3) Klik pĂĽ Save, sĂĽ pĂĽ Exit og test det med et spil. + + Hvis du ønsker at ĂŚndre y-aksen pĂĽ joysticket fordi nogle flysimulatorer bruger + joystickens op/ned bevĂŚgelse pĂĽ en mĂĽde du ikke kan lide, og det ikke kan ind- + stilles i selve spillet: + 1) Start mapper og klik pĂĽ Y- i det øvre joystick felt + EVENT skulle vĂŚre jaxis_0_1-. + 2) Klik pĂĽ Del for at fjerne nuvĂŚrende binding, klik sĂĽ pĂĽ Add og flyt dit + joystick nedad. der skulle nu vĂŚre skabt et nyt bind. + 3) Gentag dette for Y+, gem layoutet, og test det til slut i et spil. + + Hvis du ønsker at omprogramere noget med din d-pad/hat er du nødt til ĂŚndre + 'joystick=auto' til 'joystick=fcs' i config-filen. Dette bliver mĂĽskĂŠ for- + bedret i nĂŚste DOSBox version. + + + +Hvis du ĂŚndrer standard mapping, kan du gemme dine ĂŚndringer ved at klikke pĂĽ +"Save". DOSBox gemmer din mapping til en lokalitet specificeret i config-filen +(mapperfile= linien). DOSBox indlĂŚser din mapper-fil, hvis den er tilstede i +config-filen. + + + +=================== +8. Tastatur Layout: +=================== + +For at skifte til et andet keyboard/tastatur layout, kan bruges enten punktet +"keyboardlayout" i [dos]-sektionen i dosbox.conf, eller det interne DOSBox +program keyb.com. Begge dele accepterer dos-afpassede sprog koder (se nedenunder), +men du kan kun indlĂŚse en tilpasset sprogkode-fil med keyb.com. + +Standard keyboardlayout=auto, som lige nu kun virker under Windows, layoutet +bliver valgt i forhold til OS'ets layout, men tastatur layoutet bliver ikke genkendt. + +Skiftning af Layout + DOSBox understøtter som standard et vist antal keyboard/tastatur layouts og kode- + sider,i disse tilfĂŚlde er det kun nødvendigt at specificere layoutkoden (som f.eks + tastaturlayout=dk159 i DOSBox's config-fil, eller "keyb dk159" ved DOSBox's komman- + doprompt). Listen over alle DOSBox's indbyggede layouts kan findes + hĂŠr: https://www.vogons.org/viewtopic.php?t=21824 + + Nogle keyboard/tastatur layouts (f.eks layout GK319 kodeside 869 og layout RU441 + kodeside 808) har understøttelse for dobbelt-layouts, som kan aktiveres med + tasterne VENSTRE-ALT+HØJRE-SKIFT for et layout og VENSTRE-ALT+VENSTRE-SKIFT for + det andet. + Nogle tastatur layouts (for eksempel LT456 kodeside 771) har understøttelse for + tre layouts, det tredje kan aktiveres med VENSTRE-ALT+VENSTRE-CTRL. + +Understøttede eksterne filer + FreeDos's .kl filer er understøttet (FreeDos keyb2 tastatur layoutfiler) + ligesom FreeDos's keyboard.sys/keybrd2.sys/keybrd3.sys biblioteker som + bestĂĽr af alle tilgĂŚngelige .kl filer. + Se pĂĽ http://www.freedos.org/ for prĂŚkompilerede tastatur/keyboard layouts + hvis de DOSBox-integrerede layouts, af en eller anden grund ikke virker, eller + efter opdaterede/nye tilgĂŚngelige layouts. + + BĂĽde .CPI (MSDOS/kompatible kodeside filer) og .CPX (FreeDos UPX-komprimerede + kodeside filer) kan bruges. Nogle kodesider er indbygget i DOSBox sĂĽ det for + det meste ikke er nødvendigt at tĂŚnke pĂĽ kodeside filer. Hvis du har brug for + en anden (eller en specielt tilpasset) kodeside fil, kan du kopiere den ind i + Directoriet/mappen/biblioteket hvor DOSBox config-fil er sĂĽ DOSBox kan finde den. + Hvis der ikke er specificeret en kodesidefil, men alle ti ega.cpx filer fra + FreeDOS er placeret i DOSBox-program folderen, vĂŚlges der en passende + kodesidefil for forespurgte layout/kodeside + + Yderligere layouts kan tilføjes ved at kopiere de tilsvarende .kl-filer til + dosbox.conf's directory/mappe/bibliotek og bruge første del af fil-navnet som + sprog-kode. + Eksempel: For filen UZ.KL (keyboard/tastatur layout for Uzbekistan) specificeres + "keyboardlayout=uz" i DOSBox's config-fil. + Integreringen af keyboard layout pakker (som keybrd2.sys) virker pĂĽ samme mĂĽde. + + +BemĂŚrk at keyboard/tastatur layoutet tillader udenlandske karaktĂŠrer at +blive skrevet, men der er ikke understøttelse for dem i filnavne. Prøv at undgĂĽ +dem (tegnene) bĂĽde i DOSBox og det vĂŚrts operativ system som er tilgĂŚngeligt +fra DOSBox. + + + +============================== +9. Serial Multiplayer feature: +============================== + +DOSBox kan emulere et serielt nullmodem kabel over netvĂŚrk og internet. +Dette kan konfigureres i [serialports] sektionen i DOSBox's Config-fil. + +For at oprette en nullmodem forbindelse, skal ĂŠn vĂŚre server og ĂŠn klient. + +Serveren skal sĂŚttes sĂĽdan op i DOSBox's config-fil: + serial1=nullmodem + +Klient: + serial1=nullmodem server: + +Start nu spillet og vĂŚlg nullmodem / serial cable / already connected +som multiplayer mĂĽde pĂĽ COM1. Set same baudrate pĂĽ begge computere. + +Desuden, kan der tilføjes yderligere parametreametre for at kontrollere opfør- +slen af nullmodem forbindelsen. Dette er alle parametrene: + + * port: - TCP port nummer. Default: 23 + * rxdelay: - hvor lĂŚnge (millisekunder) de modtagne data skal forsinkes hvis + enheden ikke er klar. Forøg denne vĂŚrdi hvis du oplever + overrun errors i DOSBox's Status vindue. Standard: 100 + * txdelay: - hvor lĂŚnge der skal samles data før der sendes en pakke. + Standard: 12 (reducerer NetvĂŚrk overhovede) + * server: - Dette nullmodem vil vĂŚre en klient som tilslutter til den spe- + cificerede server. (ingen server argument: VĂŚr en server.) + * transparent:1 - Sender kun de serielle data, ingen RTS/DTR handshake. Bruges + nĂĽr der tilsluttes til alt andet end et nullmodem. + * telnet:1 - OversĂŚtter Telnet data fra et andet sted(tilsluttet). SĂŚtter + automatisk transparent. + * usedtr:1 - Forbindelsen bliver ikke lavet før DTR bliver slĂĽet til af + DOS programmet. Bruges med modem terminaler. + SĂŚtter automatisk transparent. + * inhsocket:1 - Brug en socket sendt til DOSBox ad kommandolinien. SĂŚtter + automatisk transparent. (Socket Inheritance: Det bruges til at + spille gamle DOS door games pĂĽ ny BBS software.) + +Eksempel: VĂŚr en server der lytter pĂĽ TCP port 5000. + serial1=nullmodem server: port:5000 rxdelay:1000 + + + +=========================================== +10.Hvordan du ĂŚndrer hastigheden pĂĽ DOSBox: +=========================================== + +DOSBox emulerer CPUen, lyd- og grafik- kort , og andre dele af PCen, det hele +pĂĽ samme tid. Hastigheden pĂĽ den emulerede DOS applikation afhĂŚnger af hvor +mange instruktioner der kan emuleres, kan justeres (antal cycles). + +CPU Cycles + Standard prøver DOSBox (cycles=auto) at detektere om et spil har brug for, at + blive kørt med sĂĽ mange instruktioner emuleret per tids-interval som muligt + (cycles=max, fĂĽr til tider et spil til at køre for hurtigt eller ustabilt), + eller om der skal bruges et fiksĂŠret antal cycles (cycles=3000 , fĂĽr til tider + spillet til at arbejde for langsomt eller for hurtigt). Men du kan altid, + manuelt, indføre en anden indstilliong i DOSBox's config-fil. + + Man kan tvinge langsom eller hurtig opførsel igennem ved at sĂŚtte et fiksĂŠret antal + cycles i DOSBox's config-fil. Hvis du f.eks. sĂŚtter cycles=10000 viser DOSBox + øverst en linie "Cpu Speed: fixed 10000 cycles" . I dette modus kan du reducere + antal cycles endnu mere med tasterne CTRL-F11 (sĂĽ lavt som du ønsker), eller hĂŚve + antal cycles med tasterne CTRL-F12, sĂĽ meget som du ønsker (dog begrĂŚnset af een + kerne's styrke i din computers CPU). Du kan se hvor meget fritid din rigtige CPU's + kerner har i Taskmanager i Windows 2000/XP/VISTA/ og System Monitor i Windows + 95/98/ME. NĂĽr du har brugt 100% af din rigtige CPU's ene kerne's styrke, er der ikke + videre mulighed for at hĂŚve hastigheden pĂĽ DOSBox (DOSBox begynder faktisk at ar- + bejde langsommere), undtagen hvis du mindsker belastningen pĂĽ ikke-cpu delene af + DOSBox. DOSBox kan kun bruge een CPU-kerne, sĂĽ hvis du har en CPU med f.eks. 4 + kerner, kan DOSBox ikke bruge de andre 3 kerner. + + Man kan tvinge hurtig opførsel igennem ved at sĂŚtte cycles=max i DOSBox's config- + fil. DOSBox's vindue viser i sĂĽ fald linien "Cpu Speed: max 100% cycles", øverst. + I denne tilstand behøver du ikke bekymre dig over hvor meget fritid din rigtige + CPU har, for DOSBox vil altid bruge 100% af din rigtige CPU's ene kerne. I dette + modus kan du aflaste din rigtige CPU med tasterne CTRL-F11, eller øge belastningen + igen med CTRL-F12. + +CPU Kerner(Cores) + PĂĽ x86 arkitekturer kan du prøve at tvinge brugen af "dynamisk genindsamlings + kerne" (sĂŚt core=dynamic i DOSBox's config-fil). + Dette giver normalt bedre resultater, hvis auto genkendeklsen (core=auto) fejler. + Indstillingen fungerer bedst sammen med cycles=max. Men du kan ogdĂĽ prøve sammen + med et højt antal cycles (f.eks. 20000 eller mere).Der kan dog vĂŚre spil som + virker dĂĽrligere med "dynamisk genindsamlings kerne" indstillingen (gĂŠm dit + spil ofte), eller slet ikke!. + +Grafik emulering (hĂŚve hastigheden) + VGA emulering er en meget krĂŚvende del af DOSBox's reelle CPU forbrug. Du kan + forstørre tabet af antal rammer/frames der skippes (forøges med antallet et) ved + at nedtrykke tasterne CTRL-F8. Dit CPU forbrug skulle formindskes nĂĽr du bruger + en fast "cycles" indstilling, og du kan hĂŚve antallet af cycles med CTRL-F12. + Dette kan du gøre til spillet kører hurtigt nok. + LĂŚg dog mĂŚrke til at dette er et kompromis : du mister tilsvarende kvalitet i + billede som du vinder hastighed. + +Lyd emulering (hĂŚve hastigheden) + Du kan ogsĂĽ prøve at slĂĽ lyden fra i spillets setup program for at reducere + CPU forbruget yderligere. indstillingen nosound=true i DOSBox's config-fil slĂĽr + IKKE emuleringen af lydenheder fra, det er kun lyd-outputet der bliver slĂĽet fra. + +Prøv ogsĂĽ at lukke alle andre programmer for at reservere sĂĽ mange resourcer som +muligt til DOSBox. + + +Avanceret cycles indstillinger: +Cycles=auto og cycles=max indstillingerne kan sĂŚttes med andre parametre +for forskellige start standarder. Syntaksen er + cycles=auto ["realmode default"] ["protected mode default"%] + [limit "cycles begrĂŚnsning"] + cycles=max ["protected mode default"%] [limit "cycles begrĂŚnsning"] +Eksempel: + cycles=auto 1000 80% limit 20000 + bruger cycles=1000 for real mode spil, 80% cpu effekt for + protected mode spil sammen med en hĂĽrd cycle begrĂŚnsning pĂĽ 20000 + + + +==================== +11. Problemløsning: +==================== + +Generel tip: + Tjek meddelelser i DOSBox's Statusvindue. Se sektion 12 "DOSBox's statusvindue" + + +DOSBox dør lige efter start: + - brug andre vĂŚrdier i output= indstillingen i din DOSBox + config-fil + - prøv at opdatere grafikkort-driver og DirectX + - (Linux) sĂŚt miljøvariablen SDL_AUDIODRIVER til alsa eller oss. + +NĂĽr du kører et bestemt spil lukker DOSBox, med en/flere besked(er) eller hĂŚnger: + - se om det virker med Standard DOSBox installation + (uĂŚndret config-fil) + - prøv uden lyd (brug det lydindstillingsprogram som er med spillet, endvidere + kan du prøve sbtype=none og gus=false) + - lav om pĂĽ nogle af indstillingerne i DOSBox's config-fil, prøv specielt : + core=normal + faste cycles (for eksempel cycles=10000) + ems=false + xms=false + eller en kombination af ovenstĂĽende + machine indstilling der har samme chipset og funktion + funktionsmĂŚssigt: + machine=vesa_nolfb + eller + machine=vgaonly + - brug loadfix før du starter spillet + +Spillet gĂĽr tilbage til DOSBox's kommandoprompt med fejlmeddelelse: + - lĂŚs fejlmeddelelsen koncentreret og prøv at lokalisere fejlen + - prøv tipsene i ovennĂŚvnte sektioner + - monter anderledes da nogle spil er fintfølende med lokaliteterne, + prøv for eksempel hvis du har monteret d d:\Gamlespil\spil" + "mount c d:\Gamlespil\spil" istedet "mount c d:\Gamlespil" + - hvis spillet krĂŚver cdrom, vĂŚr sikker pĂĽ at du skrev "-t cdrom" da du + monterede og prøv forskellige andre yderligere parametre (ioctl, usecd og label + switchene, se den rette sektion) + - Tjek filerne til spillet's tilladelser (fjern read-only attributter, + tilføj skrivetilladelser og lignende.) + - prøv at geninstallere spillet i selve DOSBox + + + +========================= +12. DOSBox Status Window: +========================= + +DOSBox's Statusvindue indeholder meget nyttig information om dine nuvĂŚrende ind- +stillinger, hvad du gør i DOSBox, fejl der opstĂĽr og meget mere. +Tjek disse meddelelser, nĂĽr du oplever fejl. + +Hvordan du starter DOSBox's Statusvindue: + (Windows) Statusvinduet starter sammen med Hoved-DOSBox-vinduet. + (Linux) Det kan vĂŚre nødvendigt at starte DOSBox fra Konsollen, for at fĂĽ + et Statusvindue. + (MAC OS X) Højreklik pĂĽ DOSBox.app, vĂŚlg "Show Package Contents" -> + ->enter "Contents"->enter "MACOS"->run "DOSBox" + + + +===================================== +13. Config-filen (indstillingsfilen): +===================================== + +config-filen genereres automatisk første gang du starter DOSBox. +Filen kan findes i: (engelsk, den danske skal (som standard) vĂŚre i DOSBox's 0.74 +mappen, i de fleste tilfĂŚlde "c:\programmer\DOSBox-0.74", lav selv en genvej til +dosbox.conf i startmenuen) + (Windows) "Start/WinLogo Menu"->"All Programs"->"DOSBox-0.74-2"->Options + (Linux) ~/.dosbox/dosbox-0.74-2.conf + (MAC OS X) "~/Library/Preferences/DOSBox 0.74-2 Preferences" +Filen er indelt i adskillige sektioner. Hver sektion starter med en +[sektion navn] linie. Indstillingerne er beskrivelse=vĂŚrdi linier hvor vĂŚrdi kan +ĂŚndres for tilpasse DOSBox. +# og % viser komentarlinier + + +Der kan genereres en config-fil med CONFIG.COM, som kan findes pĂĽ det interne +DOSBox Z: drev hvor du starter DOSBox. Se i sektione 4 :"interne programmer" +af denne readme hvordan du bruger CONFIG.COM. Du kan tilpasse den genererede +config-fil til dit DOSBox behov. Du kan starte DOSBox med -conf "config-fil" +switchen og indlĂŚse den generĂŠrede fil og dens indstillinger + +DOSBox bruger config-filer der er angivet med -conf. Hvis der ikke er +angivet en fil, søges efter "dosbox.conf" i det lokale directory/mappe/bibliotek. +Hvis der ingen er, vil DOSBox hente brugerens config-fil. +Denne fil bliver skabt, hvis den ikke allerede eksisterer + +Vigtigt!: I Windows Vista/7 virker konfigurationsfilen ikke som den skal hvis +den er placeret i "Windows" eller "Program Files" i een af deres under-mapper, +eller direkte pĂĽ c:\, sĂĽ den bedste placering for ekstra konfig-filer er for +eksempel c:\oldgames + + + +================ +14. Sprog-filen: +================ + + +Der kan genereres en Sprog-fil med CONFIG.COM , som kan findes pĂĽ det interne Z: +drev, nĂĽr du starter DOSBox. Se i Sektion 4:"Interne programmer", hvordan man bruger +config.com +LĂŚs den, sĂĽ forstĂĽr du forhĂĽbentligt hvordan man ĂŚndrer den. +Start med DOSBox -lang "sprog-fil" switchen og indlĂŚs din sprog-fil. +Du kan alternativt indføre filenavnet i config-filen i [dosbox] Sektionen. +Der er en language= indstilling der kan ĂŚndres med et filnavn. + + + +================================================= +15. Hvordan du bygger din egen version af DOSBox: +================================================= + + +Hent/Download kildefilerne (source). +LĂŚs INSTALL i kilde-distributionen. + + + +=================== +14. Special thanks: +=================== + + +Se THANKS filen. + + + +============ +15. Kontakt: +============ + +See the site: +https://www.dosbox.com +for an email address (The Crew-page). +(email adresse pĂĽ : https://www.dosbox.com The Crew-siden) + + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/da/!Hvordan.txt dosbox-staging-0.77.0/contrib/old-translations/da/!Hvordan.txt --- dosbox-staging-0.76.0/contrib/old-translations/da/!Hvordan.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/da/!Hvordan.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,66 @@ + +WINDOWS +======= + + "DOSBox-0.74-3_Dansk_Language+README's.zip": mappens filer pakkes ud og filerne +kopieres til "DOSBox-program-folderen"(placeringen hvor DOSBox er +installeret, normalt "c:\Programmer\DOSBox-74-3" eller +"c:\Programmer (x86)\DOSBox-74-3") vĂŚlg ja for at overskrive!(hvis +du har specielle indstillinger i din"config-fil", sĂĽ gĂŠm den først). + + For at indlĂŚse Sprog/Language -filen som standard skal du indsĂŚtte den, med fuld sti, +i din config-fil, f.eks: language=C:\Program Files (x86)\DOSBox-0.74-3\lng.0.74-3.DK + Der er lidt hjĂŚlp ved at køre "!languagehlp.bat" (nemmere). + + Ønsker du kun en gĂŠnvej til "Dansk DOS" : OprĂŠt GĂŠnvej > højreklik og tilføj EFTER +......\dosbox.exe" -lang "sti til sprogfil" + kan f.eks vĂŚre -lang "c:\Programmer (x86)\DOSBox-0.74-3\lng.0.74-3.DK" + + + For at fĂĽ selve config-filen dansksproget, (gĂŠm kopi af din gamle config-fil..) +kopieres indholdet af "dosbox-0.74-3_DK.conf" over i config-filen (erstatter teksten). +Du kan ĂĽbne config-filen med "DOSBox 0.74-3 Options" genvejen i options folderen, +eller "DOSBox 0.74-3 Options.bat" i programmets folder. Eller.. + Der er lidt hjĂŚlp ved at køre "!languagehlp.bat" (nemmere). + +For at lave genveje genvej "Dansk Manual/README" i +Startmenuen/WinLogoMenuen, kan du: markĂŠr "DOSBox 0.74-2-DK Manual.txt", -> +hold CTRL-SKIFT nede og trĂŚk filen hen pĂĽ "Startmenuen/WinLogoMenuen" -> +"Programmer" -> +"DOSBox-74-3-folderen" -> +folderen ĂĽbner sig -> +trĂŚk ind i folderen og slip først Musetasten og sĂĽ CTRL-SKIFT tasterne +(CTRL-SKIFT hedder ogsĂĽ CONTROL-SHIFT) + +Afinstallering +-------------- + ENGELSK Sprog language linien erstattes af language= (i config-filen). + + ENGELSK config-fil er inkludĂŠret (dosbox-0.74-3.conf erstatter config-filen). + + +Linux +===== + +"DOSBox-0.74-3_Dansk_Language+README's.zip" pakkes ud og mappens filer kopieres til + ~/.dosbox/*.* . Der skiftes til ~/.dosbox/*.* . +"dosbox-0.74-3.conf" omdøbes (for Dansk config-fil) til "dosbox-0.74.conf.ENG" +eller slettes -> +"dosbox-0.74-3_DK.conf" omdøbes/kopiĂŠres til "dosbox-0.74-3.conf". + + Opret selv genveje til "dosbox-0.74.conf" og "Dansk Manual/README" + +Virker forhĂĽbentligt. (Hvis IKKE kan du f.eks tage et kig pĂĽ [hvis eksistĂŠrende] +~/.dosboxrc . For at bruge sprog-filen "lng.0.74-3.DK", indsĂŚttes med sti i +config.filens language= linie). + +Afinstallering +-------------- + Hvis der er en "dosbox-0.74-3.conf.ENG", omdøb eller slet "dosbox-0.74-3.conf" +og omdøb "dosbox-0.74-3.conf.ENG" til "dosbox-0.74-3.conf". For engelsk DOSBox, +sĂŚt linien language= uden noget til højre for lighedstegnet. + ~/.dosboxrc gendannes fra eventuelt oprettet kopi. + + Mor jer! + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/da/!languagehlp.bat dosbox-staging-0.77.0/contrib/old-translations/da/!languagehlp.bat --- dosbox-staging-0.76.0/contrib/old-translations/da/!languagehlp.bat 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/da/!languagehlp.bat 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,67 @@ +@echo off +chcp 1252>nul +color F0 +if exist "%~dp0\dosbox.exe" (GOTO :OK) +cls +echo. +echo. +echo. +echo Filerne du for sřger at installére skal +echo kopieres til din "DOSBox-Program-folder". +echo Og "%~nx0", +echo skal startes fra "DOSBox-Program-folderen". +echo. +echo. +pause +exit + +:OK +mode con cols=55 lines=35 + +cls +echo. +echo. +echo. +echo I. Ĺbner Config-fil og tekstfil med +echo. +echo ny language linie, til erstatning +echo. +echo af "language=" linien, (kopier og erstat +echo. +echo til config filen). Gém Config-filen. +echo. +echo. +echo C. Ĺbn ogsĺ den Danske config-fil. Hvis +echo. +echo du řnsker kan du kopiére indholdet af +echo. +echo dosbox-0.74-2_DK.conf til config filen +echo. +echo (Dansk tekstet config-fil)(gém den +echo. +echo originale fřr du erstatter den). Gém. +echo. +echo Hvis du udover dansk config-fil řnsker +echo. +echo "Dansk DOS", skal du ogsĺ erstatte linien +echo. +echo "language=", med linien fra "!delme.txt". + +echo. +echo. +echo. + +echo x. afslut +echo. +echo. +choice /C:CI2x /N +if errorlevel 3 (exit) +if errorlevel 2 (GOTO :LANG) +start "" "%WINDIR%\notepad.exe" "%~dp0dosbox-0.74-3_DK.conf" +:LANG +echo language=%~dp0lng.0.74-3.DK>"%temp%\!delme.txt" +start "" "DOSBox.exe" -editconf notepad.exe -editconf %SystemRoot%\system32\notepad.exe -editconf %WINDIR%\notepad.exe +start /W "" "%WINDIR%\notepad.exe" "%temp%\!delme.txt" + +del /Q "%temp%\!delme.txt" +exit diff -Nru dosbox-staging-0.76.0/contrib/old-translations/da/lng.0.74-3.DK dosbox-staging-0.77.0/contrib/old-translations/da/lng.0.74-3.DK --- dosbox-staging-0.76.0/contrib/old-translations/da/lng.0.74-3.DK 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/da/lng.0.74-3.DK 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1034 @@ +:CONFIG_FULLSCREEN +Starter DOSBox i helskćrm/fuldskćrm.(Tryk ALT-Enter for at gĺ tilbage) +. +:CONFIG_FULLDOUBLE +Helskćrm/fuldskćrm i Double Buffering mode. Kan reducére skćrm-flimmer, men kan ogsĺ slřve DOSBox. +. +:CONFIG_FULLRESOLUTION +Hvilken oplřsning der skal anvendes i helskćrm/fuldskćrm: "original", "desktop" eller fixeret (F.eks. 1024x768). + At bruge din monitors oprindelig oplřsning (desktop) med aspect=true, kunne give det bedste resultat. + Prřv, et output som ikke er surface, hvis du fĺr et lille vindue pĺ en stor skćrm. + Prřv pĺ Windows 10, med display skaléring (Skaléring og Layout) sat til en vćrdi over 100%, at bruge + en lavere fuldskćrmsoplřsning, for at undgĺ vindue-skaléringsproblemer. +. +:CONFIG_WINDOWRESOLUTION +Tilpasser vinduet til angivet format (kun hvis "hardwaren" er istand til det). + (output=surface er ikke!) +. +:CONFIG_OUTPUT +Hvilket video system der skal bruges til output. +. +:CONFIG_AUTOLOCK +Automatisk binding af musen ved klik pĺ skćrmen(Press CTRL-F10 for at frigřre). +. +:CONFIG_SENSITIVITY +Mus'-fřlsomhed. +. +:CONFIG_WAITONERROR +Ventetid, inden nedlukning af konsollen, ved evt.fejl i DOSBox. +. +:CONFIG_PRIORITY +DOSBox-Prioriterings-niveauer. "Anden indtastning" efter kommaet er beregnet til nĺr DOSBOX ikke er i focus/minimeret. + pause er kun gangbar for "anden indtastning"). +. +:CONFIG_MAPPERFILE +Fil brugt til at Keymapper-indstillinger.Resetmapper virker kun med standard vćrdi. +. +:CONFIG_USESCANCODES +Undgĺ brug af Symboltaster, virker mĺske ikke med alle systemer. +. +:CONFIG_LANGUAGE +Vćlg en anden sprogfil/language-file. +. +:CONFIG_MACHINE +Hvilken type maskine DOSBox prřver at emulere. +. +:CONFIG_CAPTURES +Directory(Mappen,Folderen,Biblioteket) hvor captured/indfangede Wave-, Midi-filer og Screenshots gemmes. +. +:CONFIG_MEMSIZE +DOSBox's hukommelseslager i MB. + Det er bedst, for at undgĺ problemer med nogle spil, ikke at ćndre denne vćrdi, + Selvom fĺ spil mĺske krćver en hřjere vćrdi. + Der er generelt ingen hastighedsforřgelse ved at forhřje denne vćrdi. +. +:CONFIG_FRAMESKIP +Antal billeder/"frames" Dosbox dropper inden der tegnes 1. +. +:CONFIG_ASPECT +Aspekt-korrektion, kan hvis din output-metode ikke virker med skaléring, virke neddroslende. +. +:CONFIG_SCALER +Filtermethode til at udvidde/forbedre lave oplřsningerer. Hvis 'forced' bliver tilfřjet, + bliver scaleren brugt, selvom resutatet mĺske bliver uřnsket. + Det kan krćve en ramme eller sidebjćlker, at tilpasse en scaler, i oplřsningen brugt ved fuldskćrm, + for at udfylde skćrmen hélt. Afhćngigt af dit hardware, virker en anden scaler/fuldskćrmsoplřsning mĺské. +. +:CONFIG_CORE +CPU Core brugt til emulering. 'auto' skifter til dynamic, hvis passende og til stede... +. +:CONFIG_CPUTYPE +CPU Type brugt til emulering. 'auto' er hurtigste valg.. +. +:CONFIG_CYCLES +Antal udregninger DOSBOX vil emulere pr. milli-sekund. +Er denne vćrdi sat for hřjt, resulterer det i udfald og hakken. +Cycles kan indstilles pĺ 3 mĺder: + 'auto' Prřver pĺ at "gćtte" hvad spillet/programmet har brug for, + det virker som regel, men kan fejle for enkelte spil. + 'fixed #ant.' Angiver et fast tal for antal 'cycles'. Dette er normalt hvad er nřdvendigt + hvis 'auto' fejler. (Eksempel: fixed 4000) + 'max' Tildeler sĺ mange 'cycles' som din computer kan klare. + +. +:CONFIG_CYCLEUP +Antal 'cycles', der kan skiftes med tastekombinationer.(CTRL-F11/CTRL-F12) +. +:CONFIG_CYCLEDOWN +Et tal lavere end 100 antages som vćrende i procent. +. +:CONFIG_NOSOUND +Stille/tavs, lyden bliver dog stadig emuleret. +. +:CONFIG_RATE +Mixer-Sampling-Rate; en hřjere vćrdi vil sandsynligvis forringe lyd-kvaliteten. +. +:CONFIG_BLOCKSIZE +Mixerens blokstřrrelse; střrre Blokke kan muligvis forhindre hak i lyden, men lyden fĺr mere 'lag'. +. +:CONFIG_PREBUFFER +Hvor mange millisekunders data der skal beholdes pĺ toppen af blokstřrrelsen +. +:CONFIG_MPU401 +Type MPU-401 at emulere. +. +:CONFIG_MIDIDEVICE +Enhed, til at behandle MIDI data fra MPU-401. +. +:CONFIG_MIDICONFIG +Specielle konfigurationsmuligheder for enhedsdriveren. Dette er sćdvanligvis id'et pĺ enheden du řnsker at bruge + (Find id med "mixer /listmidi"). + i tilfćlde med coreaudio, kan du specificere en soundfont her. + Se README/Manual for flere detaljer. +. +:CONFIG_SBTYPE +Type SoundBlaster at emulere. gb er Gameblaster. +. +:CONFIG_SBBASE +Soundblaster IO address. +. +:CONFIG_IRQ +Soundblaster IRQ nummer. +. +:CONFIG_DMA +Soundblaster DMA nummer. +. +:CONFIG_HDMA +Soundblaster High DMA nummer. +. +:CONFIG_SBMIXER +Tillad SoundBlaster-Mixeren at indstille DOSBox-Mixeren. +. +:CONFIG_OPLMODE +Type OPL emulering. Pĺ 'auto' bestemmer sblaster-typen. Alle OPL modes er Adlib-kompatible, undtage. 'cms'. +. +:CONFIG_OPLEMU +Kilden for OPL emulering. compat eller old leverer mĺske bedre kvalitet (se ogsĺ oplrate). +. +:CONFIG_OPLRATE +OPL-Musik-Emulering Sampling-Rate. Brug 49716 for hřjeste kvalitet (sćt mixerens rate forholdsvis). +. +:CONFIG_GUS +Aktivere Gravis Ultrasound-Emulering. +. +:CONFIG_GUSRATE +Sampling-rate' for Ultrasound-Emulering. +. +:CONFIG_GUSBASE +Gravis Ultrasound IO base addresse. +. +:CONFIG_GUSIRQ +Gravis Ultrasound IRQ nummer. +. +:CONFIG_GUSDMA +Gravis Ultrasound DMA channel. +. +:CONFIG_ULTRADIR +Sti/path til Ultrasound-Directory. +Der skal eksistere en MIDI-Mappe i denne Mappe + med "patch-filer" til GUS-playback. +Timidity-Patches skulle virke ok. +. +:CONFIG_PCSPEAKER +Aktivér PC-hřjtaler-Emulering. +. +:CONFIG_PCRATE +PC-hřjtaler-Emulerings Sampling-Rate. +. +:CONFIG_TANDY +Tandy Sound System-Emulering. Hvis 'auto' kun emulering nĺr maskine er sat til 'tandy'. +. +:CONFIG_TANDYRATE +Sampling-Rate for Tandy 3-Voice-Generering. +. +:CONFIG_DISNEY +Aktiver Disney Sound Source-Emulering. (Covox Voice Master and Speech Thing compatible). +. +:CONFIG_JOYSTICKTYPE +Joysticks-type at emulere: auto (Standard), none (ingen), +2axis (op til 2 Joysticks), +4axis (1joystick, fřrste joystick der bruges), +4axis_2 (1joystick, andet joystick der bruges), +fcs (Thrustmaster), +ch (CH Flightstick), +none deaktiverer joystick-emulering. +auto vćlger emulering afhćgigt af rigtigt joystick(s). +(Husk at resette DOSBox's mapperfil, hvis du har gemt den tidlgere). +. +:CONFIG_TIMED +Aktiver timede intervaller for Axis. Eksperimentér med disse, hvis dit Joystick 'flyder' bort. +. +:CONFIG_AUTOFIRE +Fortsat "skydning" medens knappen er trykket ned. +. +:CONFIG_SWAP34 +Byt 3 og 4 Axis: kan vise sig brugbart for visse joysticks. +. +:CONFIG_BUTTONWRAP +Aktiver "button wrapping" ved antallet af emulerede antal knapper. +. +:CONFIG_SERIAL1 +Angiv enheds-type tilsluttet com port. +Kan vćre :disabled, dummy, modem, nullmodem, directserial. +Yderligere parametre skal findes i samme linie i formatet + "Parameter:vćrdi". Parameter for alle typer er irq. +for directserial: realport (required), rxdelay (optional). + (realport:COM1 realport:ttyS0). +for modem: listenport (optional). +for nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (alle optional). +Eksempel: serial1=modem listenport:5000. +. +:CONFIG_SERIAL2 +Se serial1. +. +:CONFIG_SERIAL3 +Se serial1. +. +:CONFIG_SERIAL4 +Se serial1. +. +:CONFIG_XMS +XMS aktiveret. +. +:CONFIG_EMS +EMS aktiveret. +. +:CONFIG_UMB +UMB aktiveret. +. +:CONFIG_KEYBOARDLAYOUT +keyboardlayout -- Sprogkode for Tastatur-Layout (eller 'none'). +. +:CONFIG_IPX +IPX over UDP/IP-Emulering aktiveret. +. +:AUTOEXEC_CONFIGFILE_HELP +Linier i denne sektion eksekveres under DOSBOX's opstart. +Du kan bla. indsćtte MOUNT(og IMGMOUNT) kommandoer her. + +. +:CONFIGFILE_INTRO +# Dette er config-filen til DOSBox %s. (Brug venligst seneste version af DOSBox) +# Linier som starter med # er kommentarlinier, og ignoreres af DosBox. +# De bruges til (kort) at dokumentere effekten af hver mulighed. + +. +:CONFIG_SUGGESTED_VALUES +Mulige vćrdier +. +:PROGRAM_CONFIG_FILE_ERROR +Kan ikke †bne filen: %s + +. +:PROGRAM_CONFIG_USAGE +Konfigurations-muligheder: +CONFIG -writeconf Skriver den aktuelle konfiguration til disk. +CONFIG -writelang Skriver de aktuelle sprogstrenge til disk. + +. +:PROGRAM_CONFIG_SECURE_ON +Skiftede til 'sikker modus'. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Handling ikke tilladt i 'sikker modus'. + +. +:PROGRAM_CONFIG_SECTION_ERROR +Afsnit ikke fundet: %s + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Afsnit eller tilh›rsforhold ikke tilstede. + +. +:PROGRAM_CONFIG_NO_PROPERTY +Tilh›rsforhold %s i Afsnit %s eksisterer ikke. + +. +:PROGRAM_CONFIG_GET_SYNTAX +Korrekt Syntax: CONFIG -get Afsnit Egenskab + +. + +:PROGRAM_MOUNT_CDROMS_FOUND +Der blev fundet %d CD-ROM-Drev. +. + +:PROGRAM_MOUNT_STATUS_FORMAT +%-5s %-58s %-12s +. + +. +:PROGRAM_MOUNT_STATUS_2 +Drev %c Monteret som %s. + +. +:PROGRAM_MOUNT_STATUS_1 +Monterede Drev er: + +. +:PROGRAM_MOUNT_ERROR_1 +Directory %s eksisterer ikke! + +. +:PROGRAM_MOUNT_ERROR_2 + %s er ikke Directory(Mappe,Folder,Bibliotek)! + +. +:PROGRAM_MOUNT_ILL_TYPE +Ugyldig type %s. + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Drev %c er allerede monteret med %s. + +. +:PROGRAM_MOUNT_USAGE +Brug MOUNT Drev-Bogstav lokal Directory(Mappe,Folder,Bibliotek) +For eks. MOUNT c %s +F†r Mappen %s til at virke som C: drevet i DOSBox +Mappen skal eksistere. + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +%c Drev ikke monteret. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCES +Drev %c afmonteret. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Kan ikke afmontere virtuelt Drev. + +. +:PROGRAM_MOUNT_WARNING_WIN +Det anbefales IKKE at montere C:\ , brug venligst et under-Directory(under-Mappe,under-Folder,under-Bibliotek)! + +. +:PROGRAM_MOUNT_WARNING_OTHER +Det anbefales IKKE at montere / brug venligst et under-Directory(under-Mappe,under-Folder,under-Bibliotek)! + +. +:PROGRAM_MEM_CONVEN +%10d Kb Ledig konventionel hukommelse. + +. +:PROGRAM_MEM_EXTEND +%10d Kb Ledig udvidet hukommelse. (XMS). + +. +:PROGRAM_MEM_EXPAND +%10d Kb Ledig Expanded hukommelse. (EMS). + +. +:PROGRAM_MEM_UPPER +%10d Kb Ledig "Řvre" hukommelse. i %d blokke (st›rste UMB: %d Kb). + +. +:PROGRAM_LOADFIX_ALLOC +%d Kb allokeret. + +. +:PROGRAM_LOADFIX_DEALLOC +%d Kb frigjort. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Brugt hukommelse frigjort. + +. +:PROGRAM_LOADFIX_ERROR +Hukommelses-allokeringsfejl. + +. +:MSCDEX_SUCCESS +MSCDEX installeret. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX-fejl: CDDREV-bogstaver skal komme direkte efter hinanden! + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX-fejl: Endnu ikke underst›ttet. + +. +:MSCDEX_ERROR_OPEN +MSCDEX-fejl: Ukorrekt fil, eller umulig at †bne. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX-fejl: For mange CD-ROM-Drev (maximalt 5). MSCDEX ikke installeret. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: UnderDirectory(underMappe,under-Folder,under-Bibliotek) monteret - begr?nset brug. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX-fejl: Ugyldig eller fejlende ISO/CUE-Image. + +. +:MSCDEX_UNKNOWN_ERROR +Ukendt MSCDEX-Fejl. + +. +:PROGRAM_RESCAN_SUCCESS +Drev cache t›mt. + +. +:PROGRAM_INTRO +Velkommen til DOSBox, en x86-Emulator med Grafik og Lyd! +DOSBox laver en skal/shell til dig som ser ud som gammeldags DOS. + +Assistance til at montere et Drev med kommandoen : INTRO MOUNT. +Assistance til at montere et CD-ROM-Drev med kommandoen : INTRO CDROM. +Assistance til tastaturgenveje med kommandoen : INTRO SPECIAL. +Mere Informationen om DOSBox, bes›g http://www.dosbox.com/wiki. + +Ved fejl kan DOSBox lukke uden advarsel! + + + +. +:PROGRAM_INTRO_MOUNT_START +DOSBox-Hurtigstart: +For at bruge filer som er lokaliseret i dit eget filsystem, +skal du montere det Directory(Mappe,Folder,Bibliotek) som indeholder filerne. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ skaber et a C drev med c:\dosprog som indhold. ş +ş ş +ş c:\dosprog\ er et eksempel. erstat det med dit eget spil Directory.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ skaber et a C drev med ~/dosprog som indhold. ş +ş ş +ş ~/dosprog\ er et eksempel. erstat det med dit eget spil Directory .  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END + +Hvis monteringen er succes tastes c:(Enter) for at bruge det nu monterede C-drev. +dir (Enter) viser indholdet. cd (navn, Enter)skifter Directory (genkendt ved [] i outputtet fra en dir-kommando). +Programmer/Data med endelsen .exe .bat og .com kan startes med filnavnet efterfulgt af Enter. + +. +:PROGRAM_INTRO_CDROM +Hvordan man monterer et virtuelt eller fysisk CD-ROM-Drev i DOSBox: +DOSBox leverer emulering af CD-ROM-Drev i flere niveauer. + +Det basale niveau fungerer med alle CD-ROM-Drev og almindelige Directories. +MSCDEX installeres og alle data bliver markeret som skrivebeskyttet. +For de fleste spil bruges: +mount d D:\ -t cdrom eller mount d C:\example -t cdrom +hvis dette ikke virker, skal CDLabel evt. angives: +mount d C:\example -t cdrom -label CDLABEL + +Det n‘ste niveau tilf›jer noget lav-niveau support. +og virker derfor kun med rigtige CD-ROM-Drev: +mount d D:\ -t cdrom -usecd 0 + +Det sidste niveau er systembestemt: +For Windows 2000, Windows XP and Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +For Windows 9x med ASPI layer installeret : +mount d D:\ -t cdrom -usecd 0 -aspi + +Erstat D:\ med CD-ROM drevets adresse(f.eks d:\). +Erstat 0 i -usecd 0 med Nummeret for din CDROM, der findes med kommandoen +mount -cd + +. +:PROGRAM_INTRO_SPECIAL +Tastaurgenveje: +Standardindstillinger, +som kan laves om med keymapper. + +ALT-ENTER : Fuldsk‘rm Til/Fra +ALT-PAUSE : Pause DOSBox. +CTRL-F1 : Starte keymapper. +CTRL-F4 : Skifte Diskette-Image; genopfriske Directory-struktur +CTRL-ALT-F5 : Optage film Til/Fra +CTRL-F5 : Gemme Screenshot (PNG-type) +CTRL-F6 : Optage Lydoutput til Wave-fil Til/Fra +CTRL-ALT-F7 : Optage OPL-Data (DRO format) Til/Fra +CTRL-ALT-F8 : Optage Raw-MIDI-Data Til/Fra +CTRL-F7 : Formindske Frames-tab +CTRL-F8 : Forst›rre Frames-tab +CTRL-F9 : Afslutte DOSBox +CTRL-F10 : Binde/Frig›e mus +CTRL-F11 : Langsommere emulering (mindre antal DOSBox-Cycles) +CTRL-F12 : Hurtigere emulering (flere DOSBox-Cycles) +ALT-F12 : Frigiv hastighed (Turbo-Knap) + +. +:PROGRAM_BOOT_NOT_EXIST +Fejl: Bootdisk-Fil ikke fundet. + +. +:PROGRAM_BOOT_NOT_OPEN +Fejl: Kan ikke †bne Bootdisk-Fil. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Image-Fil er skrivebeskyttet(read-only)! Kan skabe problemer. + +. +:PROGRAM_BOOT_PRINT_ERROR +Denne kommando starter DOSBox fra enten floppy eller harddisk image. + +Med denne kommando, kan specificeres en liste af floppydiske som kan +skiftes med Ctrl-F4, -l specificerer det monterede drev der skal Bootes fra. +Hvis der ikke er opgivet et drevbogstav, vil der blive booted fra drev A. +De eneste boot(able) drev er A, C, og D. Hvis der skal bootes fra harddisk +(C eller D), er drevet monteret med kommandoen : +IMGMOUNT + +Syntaks for kommandoen er: + +BOOT [diskimg1.img diskimg2.img] [-l Drevbogstav] + +. +:PROGRAM_BOOT_UNABLE +Kan ikke boote fra drev %c. +. +:PROGRAM_BOOT_IMAGE_OPEN +†bner Image: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Kan ikke †bne %s +. +:PROGRAM_BOOT_BOOT +Booter fra drev %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr-Cartridge: Maskine er ikke PCjr. +. +:PROGRAM_BOOT_CART_LIST_CMDS +Tilg‘ngelige PCjr cartridge kommandoer:%s. +. +:PROGRAM_BOOT_CART_NO_CMDS +Der er ingen PCjr cartridge Kommandoer fundet. +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Der er ikke angivet Drev-bogstav for Image + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Opgiv drevnummer (0-3): 0=FDa, 1=FDb, 2=HDa, 3=HDb + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Syntaks for CD-ROM image: IMGMOUNT drev-bogstav placering-af-image -t iso + +Syntaks for harddisk image: specificer drev geometry for harddisk : +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT drev-bogstav placering-af-image -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Kunne ikke indl‘se image fil. +Unders›g om stien(path) er korrekt og at dit image er tilg‘geligt. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Kunne ikke hente drev geometri fra image. +Brug parametrene -size bps,spc,hpc,cyl til at specificere geometrien. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Image-Type %s kan ikke bruges. Specific‚r "hdd" , "floppy" ell. "iso". + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +%s Ukendt Format. Specific‚r "fat" , "iso" ell. "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Opgiv fil-image at montere. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Image ikke fundet + +. +:PROGRAM_IMGMOUNT_MOUNT +Brug kommandoen : MOUNT, ved montering af Mappe, ikke IMGMOUNT kommandoen. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Drev-bogstav allerede benyttet. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Kan ikke oprette drev ud fra fil. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Drev %d monteret som %s. + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Et Image skal ligge p† fysisk eller lokal drev. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Hvis der benyttes flere image(s) SKAL bruges CUE/ISO-filer. + +. +:PROGRAM_KEYB_INFO +Aktuel tastaturkode(codepage): %i + +. +:PROGRAM_KEYB_INFO_LAYOUT +Codepage %i valgt for %s layout + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [keyboard layout ID[ kodeside nummer[ tastaturkode-fil]]] + +Eksempler: + KEYB: viser aktuelle sidekode. + KEYB DK: aktiverer dansk (DK) layout, brug en passende sidekode. + KEYB DK 850: aktiverer Dansk (DK) layout, med sidekode 850. + KEYB DK 850 mycp.cpi: Samme som ovenover, men bruger filen mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Tastatur layout %s %i aktiveret. + +. +:PROGRAM_KEYB_FILENOTFOUND +Tastatur-fil: %s ikke fundet. + + +. +:PROGRAM_KEYB_INVALIDFILE +Tastatur-fil : %s i virker ikke. + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Intet layout i %s for Sidekode %i + +. +:PROGRAM_KEYB_INVCPFILE +Ingen eller ubrugelig sidekode-fil for layout: %s. + +. +:SHELL_ILLEGAL_PATH +ukorrekt sti/path + +. +:SHELL_CMD_HELP + +For liste over alle kommandoer : help /all . +En kort liste over de mest benyttede kommandoer: + +. +:SHELL_CMD_ECHO_ON +ECHO er sl†et til + +. +:SHELL_CMD_ECHO_OFF +ECHO er sl†et fra. + +. +:SHELL_ILLEGAL_SWITCH +Ugyldig Switch: %s. + +. +:SHELL_MISSING_PARAMETER +Manglende parameter. + +. +:SHELL_CMD_CHDIR_ERROR +Kan ikke skifte til: %s + +. +:SHELL_CMD_CHDIR_HINT +Skift drev med : %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +Directory-navn (Mappe-navn/Folder-navn/Biblioteks-navn) er mere end 8 tegn langt og/eller indeholder mellemrum. +Pr›v cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Du er stadig p† drev Z:, skift til et monteret drev med C:. + +. +:SHELL_CMD_MKDIR_ERROR +Kan ikke oprette %s + +. +:SHELL_CMD_RMDIR_ERROR +Kan ikke fjerne %s + +. +:SHELL_CMD_DEL_ERROR +Kan ikke slette %s + +. +:SHELL_SYNTAXERROR +Forkert kommando-syntax + +. +:SHELL_CMD_SET_NOT_SET +Milj›variabel %s ikke defineret + +. +:SHELL_CMD_SET_OUT_OF_SPACE +For lidt milj›-plads + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Manglende filnavn + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Tal mangler. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Ugyldigt tal + +. +:SHELL_CMD_GOTO_MISSING_LABEL +label mangler i GOTO kommando + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Label %s ikke fundet + +. +:SHELL_CMD_FILE_NOT_FOUND +Filen %s ikke fundet + +. +:SHELL_CMD_FILE_EXISTS +Filen %s eksisterer allerede + +. +:SHELL_CMD_DIR_INTRO +Indhold af %s. + +. +:SHELL_CMD_DIR_BYTES_USED +%5d Fil(er) %17s Byte + +. +:SHELL_CMD_DIR_BYTES_FREE +%5d Dir(s) {Mappe(r)} %17s Byte fri + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Ugyldig drev-angivelse: %c! +Der skal eksistere et drev som er monteret med kommandoen : mount. +Mere Information med intro eller intro mount. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Ugyldig kommando : %s + +. +:SHELL_CMD_PAUSE +Tryk en tast, for at forts?tte ... + +. +:SHELL_CMD_PAUSE_HELP +Afventer tastetryk ... + +. +:SHELL_CMD_COPY_FAILURE +Fejl under kopiering: %s + +. +:SHELL_CMD_COPY_SUCCESS + %d Fil(er) kopieret + +. +:SHELL_CMD_SUBST_NO_REMOVE +Sletning af SUBST-drev er ikke muligt. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST-fejl enten er der en fejl i kommandolinie, eller drevet er bruges: +SUBST virker kun med lokale drev. +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Velkommen til DOSBox v%-8s ş +ş ş +ş For en kort introduktion til nye brugere tast: INTRO ş +ş For brugbare skal/shell kommandoer tast: HELP ş +ş ş +ş Hvis du vil have mere fart, tast ctrl-F8 eller ctrl-F12. ş +ş For at aktivere "keymapper" ctrl-F1. ş +ş For mere information se README filen i DOSBox-mappen. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox underst?tter Composite CGA mode. ş +ş Brug (alt-)F11 til at skifte farver n†r du er i denne mode. ş +ş ş + +. +:SHELL_STARTUP_HERC +ş Brug F11 til at skifte farver n†r du er i denne mode. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Tast Alt-Pause for at starte debuggeren eller start exe-filen med DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş Mor jer! ş +ş DOSBox Teamet.http://www.dosbox.com ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:SHELL_CMD_CHDIR_HELP +Viser/skifter det aktuelle Directory(Mappe-Folder,Bibliotek). + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [Drev:][Sti] +CHDIR[..] +CD [Drev:][Sti] +CD[..] + + .. Specificerer at du vil skifte til "parent"-Directory. + +CD Drev: Skifter til det valgte Drev's aktuelle Directory. +CD Viser det aktuelle Drev og Directory. + +. +:SHELL_CMD_CLS_HELP +Renser sk‘rmen. + +. +:SHELL_CMD_DIR_HELP +Lister filer og under-dir(s)(under-mapper,under-foldere,under-biblioteker). + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [Drev:][Sti][Filnavn] [/P] [/W] + +Dir /w : output wide-format +Dir /p : output pages-format(sider) samme som Dir |more +. +:SHELL_CMD_ECHO_HELP +Viser meddelelser og sl†r kommando- Til/Fra. + +. +:SHELL_CMD_ECHO_HELP_LONG +ECHO efterfulgt af text viser tekst i batchfil. +ECHO efterfulgt af . (ECHO.) viser en tom linie i batchfil. +ECHO off sl†r ekko fra - ECHO on sl†r 'ekko' til. +. +:SHELL_CMD_EXIT_HELP +Slutter skallen/shellen og DOSBox. + +. +:SHELL_CMD_HELP_HELP +Viser assistance. + +. +:SHELL_CMD_MKDIR_HELP +Opretter Directory(Mappe,Folder,Bibliotek). + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [Drev:]Sti +MD [Drev:]Sti + +. +:SHELL_CMD_RMDIR_HELP +Fjerner Directory(Mappe,Folder,Bibliotek). + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [Drev:]Sti +RD [Drev:]Sti + +. +:SHELL_CMD_SET_HELP +Skriver/fjerner/viser indhold af DOS-milj›variablen. + +. +:SHELL_CMD_SET_HELP_LONG +SET viser milj›variabler. +SET navn=v‘rdi s‘tter milj›ariabel. +SET navn= sletter milj›variabel. +. +:SHELL_CMD_IF_HELP +Tillader betingede operationer i batch filer. + +. +:SHELL_CMD_GOTO_HELP +Flytter til Etiket/Label i batch-fil. + +. +:SHELL_CMD_GOTO_HELP_LONG +GOTO :Label/Etiket i batchfil flytter kommandoen til Labelen/Etiketen +. +:SHELL_CMD_SHIFT_HELP +Flytter udskiftelige parametre i batch-fil. + +. +:SHELL_CMD_TYPE_HELP +Viser indholdet af tekstfil. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [Drev:][Sti]Filnavn + +. +:SHELL_CMD_REM_HELP +Tillader Kommentarer i en batch-fil. + +. +:SHELL_CMD_REM_HELP_LONG +REM [Kommentar] + +. +:SHELL_CMD_NO_WILD +Dette er den simple version af kommando-fortolkeren, ingen wildcards. + +. +:SHELL_CMD_RENAME_HELP +Omd›ber en eller flere filer. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [Drev:][Sti]Filnavn1 Filnavn2. +REN [Drev:][Sti]Filnavn1 Filnavn2. + +Der kan ikke angives andet Drev eller Sti for destinationsfilen(Filnavn 2). + +. +:SHELL_CMD_DELETE_HELP +Sletter en eller flere filer. + +. +:SHELL_CMD_DELETE_HELP_LONG +DEL filnavn(e) +. +:SHELL_CMD_COPY_HELP +Kopierer en eller flere filer til andet sted. + +. +:SHELL_CMD_COPY_HELP_LONG +COPY fil(er)1 fil(er)2 + +. +:SHELL_CMD_CALL_HELP +Kalder en anden batch-fil fra batch-fil. + +. +:SHELL_CMD_CALL_HELP_LONG +CALL "Batchfil" + +. +:SHELL_CMD_SUBST_HELP +Tildeler Directory(Mappe,Folder,Bibliotek) Drevbogstav. + +. +:SHELL_CMD_SUBST_HELP_LONG +SUBST F: . (punktummet skal med) tildeler alle filer i mappen drevet F +. +:SHELL_CMD_LOADHIGH_HELP +Starter program i "upper" hukommelse (XMS, UMB betingelse). + +. +:SHELL_CMD_LOADHIGH_HELP_LONG +LOADHIGH "Program" +. +:SHELL_CMD_CHOICE_HELP +Afventer tastetryk og skriver ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C[:]Tast] [/N] [/S] [Text] + +/C[:]'Tasten' Angiver tilladte taster. Standard er YN. +/N Vis ikke tastetryk ved prompten. +/S Skelner mellem Store-/Lille bogstaver. +Text Teksten der skal vises ved prompten. + +ERRORLEVEL skrives som positionen af den trykkede tast i listen +af valgbare taster. +. +:SHELL_CMD_ATTRIB_HELP +Virker ikke, kun med for kompabillitet. + +. +:SHELL_CMD_PATH_HELP +Virker ikke, kun med for kompabillitet. + +. +:SHELL_CMD_VER_HELP +Viser og skriver dosver.(SET). + +. +:SHELL_CMD_VER_HELP_LONG +VER [SET HOVEDversionsnummer [UNDERversionsnummer]] +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Drive %c er afmonteret + +. +:SHELL_ILLEGAL_PATH +Illegal Path. + +. +:SHELL_CMD_VER_VER +DOSBox version %s. Reported DOS version %d.%02d. + +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/da/version.txt dosbox-staging-0.77.0/contrib/old-translations/da/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/da/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/da/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Danish 0.74 diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/da/Video Codec/Video Instructions-DK.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/da/Video Codec/Video Instructions-DK.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/da/Video Codec/Video Instructions-DK.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/da/Video Codec/Video Instructions-DK.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,35 @@ +Dosbox tillader, fra DOSBOX version0.65, at man laver film/movie bygget pĂĽ +skĂŚrm-output. + +For at optage film/movie, skal du taste CTRL-ALT-F5. +For at stoppe/afslutte optagelsen,kal du taste CTRL-ALT-F5 igen. + +For at afspille den indspillede film/movie, skal du bruge en afspiller som kan +hĂĽndtere ZMBV Codec. Ms Windows-brugere kan finde dette codec under DOSBOX's +Startmenupunkt. Brugere af Linux og andre OS'er bør lede efter en afspiller der +bruger ffmpeg-biblioteket (det kan vĂŚre nødvendigt at opgradere). + +FAQ: +Q: Lyden "lagger" under afspilning. +A: Check dine skĂŚrmegenskaber for at se om din skĂŚrm-opdateringsrate er sat til +mindst 70hz. Prøv at afspille filmen/movien i Virtual Dub (http://virtualdub.sf.net). + +Q: Hvorfor bestĂĽr filmen/movien af flere filer? +A: Hvergang spillet skifter opløsning, laver DOSBOX en ny film/movie, fordi en +film/movie kan kun indeholde opløsning. + +Q:Kan jeg sĂŚtte "cycles end min PC kan hĂĽndtere under indspilning? +A: Ja,mĂĽskĂŠ spillet virker langsomt og hakkende , under indspilning, men den +fĂŚrdige film/movie skulle kunne afspilles med den beregnede hastighed og uden +hakken. + +Q: CTRL-ALT-F5 skifter til konsollen under linux. +A: 1. Start DOSBOX sĂĽdan : dosbox -startmapper + 2. Klik pĂĽ video, klik pĂĽ Add + 3. tryk den tast du ønsker (for eksempel scroll lock eller printscreen) + 4. Klik exit + 5. Nu kan du optage film/movies ved at taste scroll lock eller en anden tast + du valgte. + +Q: Farverne er forkerte og jeg bruger 64 bit windows +A: Se her : http://vogons.zetafleet.com/viewtopic.php?t=12133 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/de/deutsch.txt dosbox-staging-0.77.0/contrib/old-translations/de/deutsch.txt --- dosbox-staging-0.76.0/contrib/old-translations/de/deutsch.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/de/deutsch.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,21 @@ +DOSBox v0.74 - Deutsche Lokalisierung +===================================== + +Dieses Archiv (DOSBox-german-lang-074.zip) enthält deutsche +Strings fĂźr DOSBox und Übersetzungen der README-Dateien. + + +Installation der Sprachdatei: + +DOSBox starten und die Dateien aus dem Archiv in folgenden Ordner speichern: +C:\Users\Benutzername\AppData\Local\DOSBox + + +====================================== + +Sollten Sie irgendwelche technischen Probleme mit DOSBox +haben, lesen Sie bitte erst die README_de aufmerksam durch, +bevor Sie den armen Übersetzer mit DAU-Fragen lĂśchern. +Vielen Dank. + +Anregungen und Kritik hierher: weapon.zero@gmx.net <11-03-02> diff -Nru dosbox-staging-0.76.0/contrib/old-translations/de/dosbox-0.74.conf dosbox-staging-0.77.0/contrib/old-translations/de/dosbox-0.74.conf --- dosbox-staging-0.76.0/contrib/old-translations/de/dosbox-0.74.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/de/dosbox-0.74.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,243 @@ +# This is the configurationfile for DOSBox 0.74. (Please use the latest version of DOSBox) +# Lines starting with a # are commentlines and are ignored by DOSBox. +# They are used to (briefly) document the effect of each option. + +[sdl] +# fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back) +# fulldouble: Use double buffering in fullscreen. It can reduce screen flickering, but it can also result in a slow DOSBox. +# fullresolution: What resolution to use for fullscreen: original or fixed size (e.g. 1024x768). +# Using your monitor's native resolution with aspect=true might give the best results. +# If you end up with small window on a large screen, try an output different from surface. +# windowresolution: Scale the window to this size IF the output device supports hardware scaling. +# (output=surface does not!) +# output: What video system to use for output. +# Possible values: surface, overlay, opengl, openglnb, ddraw. +# autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock) +# sensitivity: Mouse sensitivity. +# waitonerror: Wait before closing the console if dosbox has an error. +# priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized. +# pause is only valid for the second entry. +# Possible values: lowest, lower, normal, higher, highest, pause. +# mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the defaul value. +# usescancodes: Avoid usage of symkeys, might not work on all operating systems. + +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper-0.74.map +usescancodes=true + +[dosbox] +# language: Select another language file. +# machine: The type of machine tries to emulate. +# Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe. +# captures: Directory where things like wave, midi, screenshot get captured. +# memsize: Amount of memory DOSBox has in megabytes. +# This value is best left at its default to avoid problems with some games, +# though few games might require a higher value. +# There is generally no speed advantage when raising this value. + +language=german-0.74.lang +machine=svga_s3 +captures=capture +memsize=16 + +[render] +# frameskip: How many frames DOSBox skips before drawing one. +# aspect: Do aspect correction, if your output method doesn't support scaling this can slow things down!. +# scaler: Scaler used to enlarge/enhance low resolution modes. +# If 'forced' is appended, then the scaler will be used even if the result might not be desired. +# Possible values: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x. + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core: CPU Core used in emulation. auto will switch to dynamic if available and appropriate. +# Possible values: auto, dynamic, normal, simple. +# cputype: CPU Type used in emulation. auto is the fastest choice. +# Possible values: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch. +# cycles: Amount of instructions DOSBox tries to emulate each millisecond. +# Setting this value too high results in sound dropouts and lags. +# Cycles can be set in 3 ways: +# 'auto' tries to guess what a game needs. +# It usually works, but can fail for certain games. +# 'fixed #number' will set a fixed amount of cycles. This is what you usually need if 'auto' fails. +# (Example: fixed 4000). +# 'max' will allocate as much cycles as your computer is able to handle. +# +# Possible values: auto, fixed, max. +# cycleup: Amount of cycles to decrease/increase with keycombo.(CTRL-F11/CTRL-F12) +# cycledown: Setting it lower than 100 will be a percentage. + +core=auto +cputype=auto +cycles=auto +cycleup=10 +cycledown=20 + +[mixer] +# nosound: Enable silent mode, sound is still emulated though. +# rate: Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality. +# Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# blocksize: Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged. +# Possible values: 1024, 2048, 4096, 8192, 512, 256. +# prebuffer: How many milliseconds of data to keep on top of the blocksize. + +nosound=false +rate=44100 +blocksize=1024 +prebuffer=20 + +[midi] +# mpu401: Type of MPU-401 to emulate. +# Possible values: intelligent, uart, none. +# mididevice: Device that will receive the MIDI data from MPU-401. +# Possible values: default, win32, alsa, oss, coreaudio, coremidi, none. +# midiconfig: Special configuration options for the device driver. This is usually the id of the device you want to use. +# See the README/Manual for more details. + +mpu401=intelligent +mididevice=default +midiconfig= + +[sblaster] +# sbtype: Type of Soundblaster to emulate. gb is Gameblaster. +# Possible values: sb1, sb2, sbpro1, sbpro2, sb16, gb, none. +# sbbase: The IO address of the soundblaster. +# Possible values: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300. +# irq: The IRQ number of the soundblaster. +# Possible values: 7, 5, 3, 9, 10, 11, 12. +# dma: The DMA number of the soundblaster. +# Possible values: 1, 5, 0, 3, 6, 7. +# hdma: The High DMA number of the soundblaster. +# Possible values: 1, 5, 0, 3, 6, 7. +# sbmixer: Allow the soundblaster mixer to modify the DOSBox mixer. +# oplmode: Type of OPL emulation. On 'auto' the mode is determined by sblaster type. All OPL modes are Adlib-compatible, except for 'cms'. +# Possible values: auto, cms, opl2, dualopl2, opl3, none. +# oplemu: Provider for the OPL emulation. compat might provide better quality (see oplrate as well). +# Possible values: default, compat, fast. +# oplrate: Sample rate of OPL music emulation. Use 49716 for highest quality (set the mixer rate accordingly). +# Possible values: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000. + +sbtype=sb16 +sbbase=220 +irq=7 +dma=1 +hdma=5 +sbmixer=true +oplmode=auto +oplemu=default +oplrate=44100 + +[gus] +# gus: Enable the Gravis Ultrasound emulation. +# gusrate: Sample rate of Ultrasound emulation. +# Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# gusbase: The IO base address of the Gravis Ultrasound. +# Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300. +# gusirq: The IRQ number of the Gravis Ultrasound. +# Possible values: 5, 3, 7, 9, 10, 11, 12. +# gusdma: The DMA channel of the Gravis Ultrasound. +# Possible values: 3, 0, 1, 5, 6, 7. +# ultradir: Path to Ultrasound directory. In this directory +# there should be a MIDI directory that contains +# the patch files for GUS playback. Patch sets used +# with Timidity should work fine. + +gus=false +gusrate=44100 +gusbase=240 +gusirq=5 +gusdma=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker: Enable PC-Speaker emulation. +# pcrate: Sample rate of the PC-Speaker sound generation. +# Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# tandy: Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'. +# Possible values: auto, on, off. +# tandyrate: Sample rate of the Tandy 3-Voice generation. +# Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# disney: Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible). + +pcspeaker=true +pcrate=44100 +tandy=auto +tandyrate=44100 +disney=true + +[joystick] +# joysticktype: Type of joystick to emulate: auto (default), none, +# 2axis (supports two joysticks), +# 4axis (supports one joystick, first joystick used), +# 4axis_2 (supports one joystick, second joystick used), +# fcs (Thrustmaster), ch (CH Flightstick). +# none disables joystick emulation. +# auto chooses emulation depending on real joystick(s). +# (Remember to reset dosbox's mapperfile if you saved it earlier) +# Possible values: auto, 2axis, 4axis, 4axis_2, fcs, ch, none. +# timed: enable timed intervals for axis. Experiment with this option, if your joystick drifts (away). +# autofire: continuously fires as long as you keep the button pressed. +# swap34: swap the 3rd and the 4th axis. can be useful for certain joysticks. +# buttonwrap: enable button wrapping at the number of emulated buttons. + +joysticktype=auto +timed=true +autofire=false +swap34=false +buttonwrap=false + +[serial] +# serial1: set type of device connected to com port. +# Can be disabled, dummy, modem, nullmodem, directserial. +# Additional parameters must be in the same line in the form of +# parameter:value. Parameter for all types is irq (optional). +# for directserial: realport (required), rxdelay (optional). +# (realport:COM1 realport:ttyS0). +# for modem: listenport (optional). +# for nullmodem: server, rxdelay, txdelay, telnet, usedtr, +# transparent, port, inhsocket (all optional). +# Example: serial1=modem listenport:5000 +# Possible values: dummy, disabled, modem, nullmodem, directserial. +# serial2: see serial1 +# Possible values: dummy, disabled, modem, nullmodem, directserial. +# serial3: see serial1 +# Possible values: dummy, disabled, modem, nullmodem, directserial. +# serial4: see serial1 +# Possible values: dummy, disabled, modem, nullmodem, directserial. + +serial1=dummy +serial2=dummy +serial3=disabled +serial4=disabled + +[dos] +# xms: Enable XMS support. +# ems: Enable EMS support. +# umb: Enable UMB support. +# keyboardlayout: Language code of the keyboard layout (or none). + +xms=true +ems=true +umb=true +keyboardlayout=auto + +[ipx] +# ipx: Enable ipx over UDP/IP emulation. + +ipx=false + +[autoexec] +# Lines in this section will be run at startup. +# You can put your MOUNT lines here. + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/de/german-0.74.lang dosbox-staging-0.77.0/contrib/old-translations/de/german-0.74.lang --- dosbox-staging-0.76.0/contrib/old-translations/de/german-0.74.lang 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/de/german-0.74.lang 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1009 @@ +:CONFIG_FULLSCREEN +Startet DOSBox direkt im Vollbildmodus. +. +:CONFIG_FULLDOUBLE +Benutzt Doppel-Pufferung im Vollbildmodus. +. +:CONFIG_FULLRESOLUTION +Die Aufl”sung, die im Vollbildmodus benutzt werden soll: "original" oder eine +feste Gr”áe (z.B. 1024x768). + Die natrliche Aufl”sung des Monitors mit "aspect=true" bringt wahrscheinlich + die besten Ergebnisse. Wenn sich ein zu kleines Fenster auf einem groáen + Bildschirm ergibt, sollte fr "output" eine andere Einstellung als "surface" + gew„hlt werden. +. +:CONFIG_WINDOWRESOLUTION +Skaliere das Fenster auf diese Gr”áe, wenn das Ausgabeger„t Hardware-Skalierung +untersttzt (nicht fr "output=surface"). +. +:CONFIG_OUTPUT +Das Videosystem, das fr die Ausgabe benutzt werden soll. +. +:CONFIG_AUTOLOCK +Die Maus wird automatisch gesperrt, wenn man in das DOSBox-Fenster klickt (Tippe Strg-10 zum Entsperren). +. +:CONFIG_SENSITIVITY +Mausempfindlichkeit. +. +:CONFIG_WAITONERROR +Warte vor dem Schlieáen der Konsole, wenn DOSBox einen Fehler festgestellt hat. +. +:CONFIG_PRIORITY +Priorit„tsstufe von DOSBox. Der zweite Eintrag hinter dem Komma steht fr einen +nicht fokussierten oder minimierten Betrieb ("Pause" ist nur fr den zweiten Eintrag zul„ssig). +. +:CONFIG_MAPPERFILE +Datei, die zum Laden und Speichern fr Key/Event Mappings verwendet wird. + "Resetmapper" funktioniert nur mit dem Standardwert. +. +:CONFIG_USESCANCODES +Unterbindet die Benutzung von "Symkeys", funktioniert nicht auf allen Betriebssystemen. +. +:CONFIG_LANGUAGE +W„hle eine andere Sprachdatei. +. +:CONFIG_MACHINE +Der Typ der Maschine, die versucht wird zu emulieren. +. +:CONFIG_CAPTURES +Verzeichnis, in das Dateien fr Wave, Midi, Screenshots gespeichert werden. +. +:CONFIG_MEMSIZE +Gr”áe des Speichers in MB, den DOSBox verwendet. +Diese Gr”áe bleibt am besten auf dem Ursprungswert, um Probleme mit einigen +Spielen zu vermeiden, obwohl einige Spiele einen h”heren Wert ben”tigen. Hier +gibt es prinzipiell keinen Geschwindigkeitsvorteil, wenn der Wert erh”ht wird. +. +:CONFIG_FRAMESKIP +Die Anzahl von Bildern, die DOSBox auslassen soll, bevor eines dargestellt wird. +. +:CONFIG_ASPECT +Mache eine Darstellungskorrektur. Wenn die Ausgabemethode dies nicht +untersttzt, kann es eine Verlangsamung bewirken!. +. +:CONFIG_SCALER +Scaler wird verwendez, um niedrige Aufl”sungen zu vergr”áern oder zu verbessern. +Wenn "forced" angeh„ngt wird, wird der Scaler in jedem Fall verwendet. +. +:CONFIG_CORE +Bei der Emulation verwendeter CPU Core. "auto" schaltet auf dynamisch, wenn dies +m”glich und zweckm„áig ist. +. +:CONFIG_CPUTYPE +Bei der Emulation verwendeter CPU-Typ. "auto" ist die schnellste Wahl. +. +:CONFIG_CYCLES +Anzahl der Befehlszyklen, die von DOSBox pro Millisekunde emuliert werden. +Wenn dieser Wert zu hoch gesetzt wird, fhrt das zu Sound-Aussetzern und Aussetzern. +"Cycles" kann auf 3 Arten gesetzt werden: + "auto" versucht zu 'erraten' was ein Spiel braucht. + Meistens funktioniert es, aber einige Spiele k”nnen abstrzen. + "fixed #number" setzt einen festen Wert an Zyklen. Dies sollte verwendet werden, + wenn "auto" nicht funktioniert. (Beispiel: fixed 4000) + "max" verwendet so viele Zyklen, wie der Computer es zul„sst. +. +:CONFIG_CYCLEUP +Anzahl der Befehlszyklen, um die erh”ht bzw. erniedrigt werden soll (CTRL-F11/CTRL-F12). +. +:CONFIG_CYCLEDOWN +Wenn diese Zahl kleiner als 100 ist, wird sie als prozentuale Angabe interpretiert. +. +:CONFIG_NOSOUND +Stumme Betriebsart, der Sound wird trotzdem emuliert. +. +:CONFIG_RATE +Sample-Rate des Mixers. +Werden Ger„te auf einen h”heren Wert gesetzt, leidet wahrscheinlich die Soundqualit„t. +. +:CONFIG_BLOCKSIZE +Blockgr”áe des Mixers. +Gr”áere Bl”cke helfen gegen stockenden Sound, dafr kann es zu Aussetzern kommen. +. +:CONFIG_PREBUFFER +Anzahl der Millisekunden, fr die Daten am Anfang des Blocks behalten werden. +. +:CONFIG_MPU401 +Typ der MPU-401-Emulation. +. +:CONFIG_MIDIDEVICE +Ger„t, das die MIDI-Daten von MPU-401 empf„ngt. +. +:CONFIG_MIDICONFIG +Spezielle Einstellungen fr den Ger„tetreiber. Unter Windows ist dies meist die ID des Ger„ts, +das benutzt werden soll. + Weitere Einzelheiten findet man im README/Manual. +. +:CONFIG_SBTYPE +Zu emulierender SoundBlaster-Typ. "gb" ist der Gameblaster. +. +:CONFIG_SBBASE +Die IO Adresse fr den Soundblaster. +. +:CONFIG_IRQ +Die IRQ Nummer fr den Soundblaster. +. +:CONFIG_DMA +Der DMA Kanal fr den Soundblaster. +. +:CONFIG_HDMA +Der hohe DMA Kannal fr den Soundblaster. +. +:CONFIG_SBMIXER +Dem SoundBlaster-Mixer erlauben, den DOSBox-Mixer zu „ndern. +. +:CONFIG_OPLMODE +Typ der OPL-Emulation: Bei "auto" richtet sich der Modus nach dem SoundBlaster-Typ. +Alle OPL-Modi sind Adlib-kompatibel, auáer CMS. +. +:CONFIG_OPLEMU +OPL Emulation einstellen. +"compat" bewirkt eventuell eine bessere Qualit„t (Siehe auch OPL-Rate). +. +:CONFIG_OPLRATE +Sample-Rate der OPL-Musik-Emulation. +Benutze 49716 fr die h”chste Qualit„t (Stelle die Mixer-Rate "rate" passend ein). +. +:CONFIG_GUS +Gravis Ultrasound-Emulation aktivieren. +. +:CONFIG_GUSRATE +Sample-Rate der Ultrasound-Emulation. +. +:CONFIG_GUSBASE +Die IO-Adresse fr Gravis Ultrasound. +. +:CONFIG_GUSIRQ +Die IRQ Nummer fr Gravis Ultrasound. +. +:CONFIG_GUSDMA +Der DMA Kanal fr Gravis Ultrasound. +. +:CONFIG_ULTRADIR +Pfad zum Ultrasound-Verzeichnis. +In diesem Verzeichnis sollte es ein MIDI-Unterverzeichnis geben, in der sich die Patchdateien +fr die GUS-Wiedergabe befinden. Timidity-Patches sollten gut funktionieren. +. +:CONFIG_PCSPEAKER +PC-Lautsprecher-Emulation aktivieren. +. +:CONFIG_PCRATE +Sample-Rate der PC-Lautsprecher-Emulation. +. +:CONFIG_TANDY +Tandy Sound System-Emulation einschalten. +Wenn "auto" gesetzt ist, wird der Tandysound nur emuliert, wenn "machine=tandy" eingestellt ist. +. +:CONFIG_TANDYRATE +Sample-Rate der Tandy 3-Voice-Generierung. +. +:CONFIG_DISNEY +Disney-Soundquellen-Emulation aktivieren (kompatibel mit Covox Voice +Master und Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Typ des zu emulierenden Joysticks (Voreinstellung: "auto"): +"2axis" - untersttzt bis zu 2 Joysticks, +"4axis" - verwendet den ersten angeschlossene Joystick, +"4axis"_2 - verwendet den zweiten angeschlossene Joystick, +"fcs" - Thrustmaster, "ch" - CH Flightstick, +"none" deaktiviert die Joystick-Emulation. +Bei "auto" wird die Emulation abh„ngig von den realen Joysticks vorgenommen. +(Nicht vergessen, die DOSBox-Mapperdatei zurckzusetzen, wenn sie vorher +gespeichert wurde.) +. +:CONFIG_TIMED +Zeit-Intervalle fr die Achsen aktivieren. +Wenn der Joystick (weg)driftet, sollte mit dieser Option experimentiert werden. +. +:CONFIG_AUTOFIRE +Feuert kontinuierlich, solange der Knopf gedrckt wird. +. +:CONFIG_SWAP34 +Dritte und vierte Achse tauschen, ist bei manche Joysticks von Vorteil. +. +:CONFIG_BUTTONWRAP +Erm”gliche Knopf-Tausch mit der Anzahl der emulierten Kn”pfe. +. +:CONFIG_SERIAL1 +An die COM-Ports angeschlossene Ger„te festlegen. +Zus„tzliche Parameter mssen in derselben Zeile in der Art "Parameter:Wert" angegeben werden. +Ein Parameter, der fr alle Ger„te ben”tigt wird, ist " irq". +Bei "directserial": realport (ben”tigt), rxdelay (optional) +Bei "modem": listenport (optional) +Bei "nullmodem": server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (alle optional) +Beispiel: serial1=modem listenport:5000. +. +:CONFIG_SERIAL2 +Siehe "serial1". +. +:CONFIG_SERIAL3 +Siehe "serial1". +. +:CONFIG_SERIAL4 +Siehe "serial1". +. +:CONFIG_XMS +XMS-Untersttzung aktivieren. +. +:CONFIG_EMS +EMS-Untersttzung aktivieren. +. +:CONFIG_UMB +UMB-Untersttzung aktivieren. +. +:CONFIG_KEYBOARDLAYOUT +Angabe fr das Tastatur-Layout (z.B. GR oder "none"). +. +:CONFIG_IPX +"IPX over UDP/IP"-Emulation aktivieren. +. +:AUTOEXEC_CONFIGFILE_HELP +Die Zeilen in diesem Abschnitt werden beim Start von DOSBox als Befehle ausgefhrt. +An dieser Stelle k”nnen z.B. MOUNT-Befehle stehen. + +. +:CONFIGFILE_INTRO +# Konfigurationsdatei fr DOSBox-%s (Es sollte m”glichst die aktuellste Version benutzt werden). +# Zeilen, die mit "#" beginnen, sind Kommentarzeilen und werden von DOSBox ignoriert. +# Sie sind dazu gedacht, die einzelnen Optionen kurz zu erl„utern. + +. +:CONFIG_SUGGESTED_VALUES + Zul„ssige Angaben +. +:PROGRAM_CONFIG_FILE_ERROR +Die Konfigurationsdatei %s kann nicht ge”ffnet werden + +. +:PROGRAM_CONFIG_USAGE +Konfigurations-Werkzeug "CONFIG": + -writeconf Speichert die aktuelle Konfigurationsdatei. + -writelang Speichert die aktuelle Sprachdatei. + -set Žndert die Konfigurationsvariable. + -get Gibt den aktuellen Wert der Variable aus und speichert sie + in der Umgebungsvariable CONFIG. + +. +:PROGRAM_CONFIG_SECURE_ON +Wechselt in den abgesicherten Modus. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Diese Funktion ist im abgesicherten Modus nicht erlaubt. + +. +:PROGRAM_CONFIG_SECTION_ERROR +Der Abschnitt %s ist nicht vorhanden. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Abschnitt oder Variable wurde nicht gefunden. + +. +:PROGRAM_CONFIG_NO_PROPERTY +Variable %s in Abschnitt %s wurde nicht gefunden. + +. +:PROGRAM_CONFIG_GET_SYNTAX +Richtige Syntax: CONFIG -get "Abschnitt Variable". + +. +:PROGRAM_MOUNT_CDROMS_FOUND +Es wurden %d CD-ROM-Laufwerke gefunden. + +. +:PROGRAM_MOUNT_STATUS_2 +Das Laufwerk %c ist angebunden an %s. + +. +:PROGRAM_MOUNT_STATUS_1 +Aktuelle angebundene Laufwerke: + +. +:PROGRAM_MOUNT_ERROR_1 +Verzeichnis %s wurde nicht gefunden. + +. +:PROGRAM_MOUNT_ERROR_2 +%s ist kein Verzeichnis. + +. +:PROGRAM_MOUNT_ILL_TYPE +Ungltiger Datentr„gertyp: %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Das Laufwerk %c ist bereits angebunden an %s + +. +:PROGRAM_MOUNT_USAGE +Aufruf: MOUNT Laufwerksbuchstabe "anzubindendes Verzeichnis" +Beispiel: MOUNT C %s +Bindet das Verzeichnis %s als DOSBox-Laufwerk C: ein. + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Laufwerk %c wurde noch nicht angebunden. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Laufwerk %c wurde freigegeben. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Virtuelle Laufwerke k”nnen nicht freigegeben werden. + +. +:PROGRAM_MOUNT_WARNING_WIN +Es wird nicht empfohlen, C:\ einzubinden, +bitte w„hlen Sie besser ein (Unter)verzeichnis! + +. +:PROGRAM_MOUNT_WARNING_OTHER +Es wird nicht empfohlen, / einzubinden, +bitte w„hlen Sie besser ein (Unter)verzeichnis! + +. +:PROGRAM_MEM_CONVEN +%10d KiB freier konventioneller Speicher + +. +:PROGRAM_MEM_EXTEND +%10d KiB freier erweiterter Speicher (XMS) + +. +:PROGRAM_MEM_EXPAND +%10d KiB freier Expansionsspeicher (EMS) + +. +:PROGRAM_MEM_UPPER +%10d KiB freier oberer Speicher in %d Bl”cken (gr”áter UMB: %d KiB) + +. +:PROGRAM_LOADFIX_ALLOC +%d KiB zugewiesen + +. +:PROGRAM_LOADFIX_DEALLOC +%d KiB freigegeben. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Der verwendete Speicher wurde freigegeben. + +. +:PROGRAM_LOADFIX_ERROR +Fehler bei der Speicherzuweisung. + +. +:MSCDEX_SUCCESS +MSCDEX geladen. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX-Fehler: Buchstaben fr mehrere CD-Laufwerke mssen direkt aufeinander +folgen. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX-Fehler: Noch nicht untersttzt. + +. +:MSCDEX_ERROR_OPEN +MSCDEX-Fehler: Datei ist ungltig oder kann nicht ge”ffnet werden. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX-Fehler: Zu viele CD-ROM-Laufwerke (maximal 5) +MSCDEX nicht wurde nicht installiert. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Ein Unterverzeichnis wurde eingebunden - eingeschr„nkte Untersttzung. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX-Fehler: Ungltiges oder fehlerhaftes ISO/CUE-Image + +. +:MSCDEX_UNKNOWN_ERROR +Unbekannter MSCDEX-Fehler + +. +:PROGRAM_RESCAN_SUCCESS +Laufwerkscache geleert + +. +:PROGRAM_INTRO +Willkommen bei DOSBox, einem x86-Emulator mit Grafik und Sound! +DOSBox funktioniert wie das gute alte DOS und sieht auch so aus. + +Hilfe zum Einbinden von Laufwerken erhalten Sie mit INTRO MOUNT. +Hilfe zur CD-ROM-Untersttzung erhalten Sie mit INTRO CDROM. +Hilfe zu den Tastaturkrzeln erhalten Sie mit INTRO SPECIAL. + +Mehr Informationen zu DOSBox finden Sie im DOSBox-Wiki im Internet: +http://dosbox.sourceforge.net/wiki + +Im Falle eines Fehlers kann DOSBox ohne Vorwarnung beendet werden! + + + +. +:PROGRAM_INTRO_MOUNT_START +DOSBox-Schnellstart: +Um mit DOSBox Programme aufrufen zu k”nnen, die im bergeordneten Dateisystem +liegen, muss das Verzeichnis mit den Dateien als virtuelles Laufwerk +eingebunden werden. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş MOUNT C D:\DOS erstellt ein (virtuelles) DOSBox-Laufwerk C ş +ş mit dem Inhalt des Ordners C:\DOS ş +ş ş +ş D:\DOS ist nur ein Beispiel und muss durch das jeweils gewnschte ş +ş Spieleverzeichnis ersetzt werden. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş MOUNT C ~/DOS erstellt ein (virtuelles) DOSBox-Laufwerk C ş +ş mit dem Inhalt des Ordners ~/DOS ş +ş ş +ş ~/~/DOS ist nur ein Beispiel und muss durch das jeweils gewnschte ş +ş Spieleverzeichnis ersetzt werden. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +Wenn die Einbindung erfolgreich war, geben Sie C: ein, um zu Ihrem gerade +erstellten Laufwerk C zu gelangen. Wenn Sie jetzt DIR eingeben, sehen Sie +dessen Inhalt. Mit CD k”nnen Sie in eines der Unterverzeichnisse wechseln. + +Programme/Dateien mit den Endungen EXE, BAT und COM k”nnen durch +Eingabe des Namens aufgerufen werden. + +. +:PROGRAM_INTRO_CDROM +Ein virtuelles oder physisches CD-ROM-Laufwerk in DOSBox einbinden: +DOSBox bietet mehrere M”glichkeiten der Emulation von CD-ROM-Laufwerken. +Stufe 1 funktioniert mit allen CD-ROM-Laufwerken sowie normalen Verzeichnissen. +Es wird MSCDEX geladen und alle Dateien werden als schreibgeschtzt markiert. +Fr die meisten Spiele funktioniert dies: +MOUNT D D:\ -t cdrom oder MOUNT D C:\Verzeichnis -t cdrom +Wenn das nicht funktioniert, muss vermutlich noch das CD-Label angeben werden: +MOUNT D C:\Verzeichnis -t cdrom -label Bezeichnung + +Die Stufe 2 fgt eine Untersttzung auf unterer Ebene hinzu +und funktioniert daher aber nur mit echten CD-ROM-Laufwerken: +MOUNT d D:\ -t cdrom -usecd 0 + +Die Untersttzung der Stufe 3 h„ngt vom Betriebssystem ab: +Bei Windows 2000, Windows XP und Linux: +MOUNT d D:\ -t cdrom -usecd 0 -ioctl +Bei Windows 9x mit installiertem ASPI-Layer: +MOUNT d D:\ -t cdrom -usecd 0 -aspi + +Ersetzen Sie dabei D:\ durch den Namen ihres CD-ROM-Laufwerks. +Ersetzen Sie die 0 in -usecd 0 durch die Nummer, die sie nach Eingabe von +MOUNT -CD fr das betreffende CD-ROM-Laufwerk erhalten. + +. +:PROGRAM_INTRO_SPECIAL +Sondertasten: +Nachfolgend sind die Standardbelegungen angegeben, die im Keymapper ge„ndert +werden k”nnen. + +Alt-Enter Vollbildmodus an/aus +Alt-Pause DOSBox pausieren +Strg-F1 Keymapper starten +Strg-F4 Disketten-Image wechseln; Verzeichnisstruktur neu lesen +Strg-F5 Screenshot als PNG-Datei abspeichern +Strg-Alt-F5 Bildschirmausgabe und Sound als Videoclip speichern an/aus +Strg-F6 Soundausgabe in WAV-Datei schreiben an/aus +Strg-Alt-F7 OPL-Daten aufzeichnen an/aus +Strg-Alt-F8 Raw-MIDI-Daten aufzeichnen an/aus +Strg-F7 Frames berspringen -1 +Strg-F8 Frames berspringen +1 +Strg-F9 DOSBox schlieáen +Strg-F10 Maus einbinden/freigeben +Strg-F11 Emulation verlangsamen (DOSBox-Cycles verringern) +Strg-F12 Emulation beschleunigen (DOSBox-Cycles erh”hen) +Alt-F12 Drosselung aufheben (Turbo-Knopf) + +. +:PROGRAM_BOOT_NOT_EXIST +Fehler: Bootdisk-Image nicht gefunden. + +. +:PROGRAM_BOOT_NOT_OPEN +Fehler: Kann Bootdisk-Image nicht ”ffnen. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Die Image-Datei ist schreibgeschtzt. Dies kann zu Problemen fhren. + +. +:PROGRAM_BOOT_PRINT_ERROR +Bootet DOSBox von einem Disketten- oder Festplatten-Image. + +Fr diesen Befehl kann ein Diskettensatz geladen werden. Mit Strg-F4 +werden die geladenen Disketten gewechselt, der Parameter -L w„hlt das +Laufwerk aus, von dem gebootet werden soll. Wenn keines angebenen ist, +wird Laufwerk A verwendet. Es kann nur von den Laufwerken A, C und D +gebootet werden. Um von einer Festplatte (C oder D) zu booten, muss dieses +vorher mit dem Befehl IMGMOUNT eingebunden worden sein. + +Aufruf: +BOOT [Image1.img [Image2.img ... [ImageN.img]]] [-L Laufwerksbuchstabe] + +. +:PROGRAM_BOOT_UNABLE +Kann nicht von Laufwerk %c booten. + +. +:PROGRAM_BOOT_IMAGE_OPEN +Lade Image-Datei: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Kann Image-Datei nicht ”ffnen: %s + +. +:PROGRAM_BOOT_BOOT +Booten von Laufwerk %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr-Kassette gefunden: Falsches Computersystem + +. +:PROGRAM_BOOT_CART_LIST_CMDS +Verfgbare Befehle fr PCjr-Kassette: %s + +. +:PROGRAM_BOOT_CART_NO_CMDS +Keine Befehle fr PCjr-Kassette verfgbar. + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Fr das Image wurde kein Laufwerksbuchstabe angegeben. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Keine Laufwerksnummer (0 oder 3) angegeben: 0,1=fda,fdb;2,3=hda,hdb. + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Weist einem Festplatten- oder CD-ROM-Image ein internes Laufwerk zu. +Syntax fr CD-ROM-Images: + IMGMOUNT Laufwerksbuchstabe Imagedatei -T iso + +Syntax fr Festplatten-Images: + IMGMOUNT Laufwerksbuchstabe Imagedatei -size bps,spc,hpc,cyl +Fr Festplatten-Images muss die Festplattengeometrie angegeben werden: +Byte/Sektor, Sektoren/Kopf, K”pfe/Zylinder, Zylinderzahl. +N„here Informationen dazu in der README. + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Die Image-Datei konnte nicht geladen werden. +Prfen Sie, ob der Pfad korrekt angegeben wurde und auf die Datei zugegriffen +werden kann! + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Die Laufwerks-Geometrie wurde nicht erkannt. +Verwenden Sie den Parameter "-size bps,spc,hpc,cyl" zur Einstellung. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Unbekannter Image-Typ: %s +Gltige Werte sind "hdd", "floppy" oder"iso". + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Unbekanntes Format: %s +Gltige Wertesin "fat", "iso" oder "none" + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Keine Image-Datei angegeben. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Image-Datei nicht gefunden. + +. +:PROGRAM_IMGMOUNT_MOUNT +Zum Einbinden von Verzeichnissen muss der Befehl MOUNT und nicht der +Befehl IMGMOUNT verwendet werden. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Der Laufwerksbuchstabe ist schon vergeben. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Das Laufwerk kann nicht erstellt werden. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Laufwerk Nummer %d ist als %s eingebunden. + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Die Image-Datei muss auf einem bergeordneten oder lokalem Laufwerk liegen. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Wenn Sie mehrere Image-Dateien benutzen wollen, mssen diese vom Typ CUE/ISO sein + +. +:PROGRAM_KEYB_INFO +Die Codeseite %i wurde geladen. + +. +:PROGRAM_KEYB_INFO_LAYOUT +Die Codeseite %i wurde fr das Layout %s geladen + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [Tastaturlayout-ID[ Codeseiten-Nummer[ Codeseiten-Datei]]] + +Einige Beispiele: + KEYB: Aktuelle Codeseite anzeigen. + KEYB GR: Deutsches (GR) Layout und zugeh”rige Codeseite laden. + KEYB GR 850: Deutsches (GR) Layout und Codeseite 850 laden. + KEYB GR 850 CPAGE.CPI: Wie zuvor, aber die Codeseite wird aus CPAGE.CPI geladen. + +. +:PROGRAM_KEYB_NOERROR +Das Tastaturlayout %s wurde fr die Codeseite %i geladen. + +. +:PROGRAM_KEYB_FILENOTFOUND +Ungltiges Tastaturlayout - Datei nicht gefunden: %s + +. +:PROGRAM_KEYB_INVALIDFILE +Ungltiges Tastaturlayout - Datei fehlerhaft: %s + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Kein Tastaturlayout in %s fr Codeseite %i gefunden. + +. +:PROGRAM_KEYB_INVCPFILE +Fehlerhafte oder fehlende Codeseite fr Tastaturlayout %s. + + +. +:SHELL_ILLEGAL_PATH +Ungltiger Pfad. + +. +:SHELL_CMD_HELP +Um die vollst„ndige Liste der Befehle anzuzeigen, benutzen Sie HELP /all. +Es folgt eine Liste der wichtigsten Befehle: + +. +:SHELL_CMD_ECHO_ON +ECHO ist eingeschaltet. + +. +:SHELL_CMD_ECHO_OFF +ECHO ist ausgeschaltet. + +. +:SHELL_ILLEGAL_SWITCH +Ungltiger Parameter: %s + +. +:SHELL_MISSING_PARAMETER +Erforderlicher Parameter fehlt. + +. +:SHELL_CMD_CHDIR_ERROR +Es konnte nicht in das Verzeichnis %s gewechselt werden. + +. +:SHELL_CMD_CHDIR_HINT +Benutzen Sie %C:, um in ein anderes Laufwerk zu wechseln + +. +:SHELL_CMD_CHDIR_HINT_2 +Der angegebene Verzeichnisname ist l„nger als 8 Zeichen +und/oder enth„lt Leerzeichen. + +. +:SHELL_CMD_CHDIR_HINT_3 +Sie befinden sich noch auf Laufwerk Z:, um auf ein eingebundenes +Laufwerk zu wechseln, benutzen Sie den Befehl C:. + +. +:SHELL_CMD_MKDIR_ERROR +Das Verzeichnis %s kann nicht erstellt werden. + +. +:SHELL_CMD_RMDIR_ERROR +Das Verzeichnis %s kann nicht gel”scht werden. + +. +:SHELL_CMD_DEL_ERROR +Die Datei %s kann nicht gel”scht werden. + +. +:SHELL_SYNTAXERROR +Ungltige Befehlssyntax. + +. +:SHELL_CMD_SET_NOT_SET +Die Umgebungsvariable %s ist nicht definiert- + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Nicht genug Umgebungsspeicher brig. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Der Dateiname fehlt. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Die Bedingung fehlt. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Ungltige Zahl. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Bei GOTO wurde kein Sprungziel angegeben. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Kein gltiges Sprungziel. + +. +:SHELL_CMD_FILE_NOT_FOUND +Die Datei %s wurde nicht gefunden. + +. +:SHELL_CMD_FILE_EXISTS +Die Datei %s ist bereits vorhanden. + +. +:SHELL_CMD_DIR_INTRO +Verzeichnis von %s. + +. +:SHELL_CMD_DIR_BYTES_USED +%5d Datei(en) %17s Bytes. + +. +:SHELL_CMD_DIR_BYTES_FREE +%5d Verzeichnis(se) %17s Byte frei. + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Ungltige Laufwerksangabe: %c +Es muss zuerst ein Laufwerk mit MOUNT eingebunden werden. +Mehr Informationen mit INTRO oder INTRO MOUNT. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Ungltiger Befehl: %s + +. +:SHELL_CMD_PAUSE +Eine beliebige Taste drcken, um fortzusetzen. + +. +:SHELL_CMD_PAUSE_HELP +H„lt die Ausfhrung einer Stapeldatei an und wartet auf Benutzer. + +. +:SHELL_CMD_COPY_FAILURE +Fehler beim Kopieren: %s + +. +:SHELL_CMD_COPY_SUCCESS + %d Datei(en) kopiert + +. +:SHELL_CMD_SUBST_NO_REMOVE +Das Entfernen von mit SUBST erstellten Laufwerken wird nicht untersttzt. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST-Fehler: Entweder haben Sie eine fehklerhafte Eingabe gemacht oder das +Ziellaufwerk wird bereits benutzt. SUBST kann nur mit lokalen Laufwerken +verwendet werden. + +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Willkommen bei DOSBox v%-8s ş +ş ş +ş Mit dem Befehl HELP erhalten Sie eine Liste gltiger Befehle. ş +ş Mit dem Befehl INTRO erhalten Sie eine kleine Einfhrung. ş +ş ş +ş Die Geschwindigkeit l„sst sich mit Strg-F8 und Strg-F12 erh”hen. ş +ş Drcken Sie Strg-F1, um den Keymapper zu starten. ş +ş Eine genaue Anleitung finden Sie in der README im DOSBox-Ordner. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox untersttzt den Composite-CGA-Modus. ş +ş Benutzen Sie Alt-F11, um in diesem Modus die Farben zu wechseln. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Um den Debugger zu laden, drcken Sie entweder Alt-Pause oder ş +ş starten Sie die EXE mit DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş Viel Spaá! ş +ş Wnscht das DOSBox-Team: http://www.dosbox.com ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:SHELL_CMD_CHDIR_HELP +Zeigt das aktuelle Verzeichnis an oder wechselt dorthin. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [Laufwerk:][Pfad] +CHDIR [..] +CD [Laufwerkd:][Pfad] +CD [..] + + .. Symbol fr den Wechsel in das bergeordnete Verzeichnis. + +CD Laufwerk: zeigt das aktuelle Verzeichnis auf dem angegebenen Laufwerk. +CD zeigt das aktuelle Laufwerk und Verzeichnis. + +. +:SHELL_CMD_CLS_HELP +L”scht den Bildschirminhalt. + +. +:SHELL_CMD_DIR_HELP +Listet die Dateien und Unterverzeichnisse eines Verzeichnisses auf. + +. +:SHELL_CMD_ECHO_HELP +Zeigt Meldungen an oder schaltet die Befehlsanzeige ein oder aus. + +. +:SHELL_CMD_EXIT_HELP +Beendet die DOSBox. + +. +:SHELL_CMD_HELP_HELP +Zeigt die Hilfe fr DOSBox-Befehle an. + +. +:SHELL_CMD_MKDIR_HELP +Erstellt ein Verzeichnis. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [Laufwerk:][Pfad] +MD [Laufwerk:][Pfad] + +. +:SHELL_CMD_RMDIR_HELP +Entfernt (l”scht) ein Verzeichnis. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [Laufwerk:][Pfad] +RD [Laufwerk:][Pfad] + +. +:SHELL_CMD_SET_HELP +Setzt oder entfernt DOS-Umgebungsvariablen oder zeigt sie an. + +. +:SHELL_CMD_IF_HELP +Verarbeitet Ausdrcke mit Bedingungen in einer Stapeldatei. + +. +:SHELL_CMD_GOTO_HELP +Setzt die Ausfhrung einer Stapeldatei an einer Marke fort. + +. +:SHELL_CMD_SHIFT_HELP +Schiebt die Position ersetzbarer Parameter in einer Stapeldatei nach links. + +. +:SHELL_CMD_TYPE_HELP +Zeigt den Inhalt einer Textdatei an. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [Laufwerk:][Pfad][Dateiname] + +. +:SHELL_CMD_REM_HELP +Leitet Kommentare in einer Stapeldatei ein. + +. +:SHELL_CMD_REM_HELP_LONG +REM [Kommentar] + +. +:SHELL_CMD_NO_WILD +Dies ist eine einfache Version des Befehls, Platzhalter sind nicht erlaubt! + +. +:SHELL_CMD_RENAME_HELP +Benennt eine oder mehrere Dateien um. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [Laufwerk:][Pfad]Dateiname1 Dateiname2. +REN [Laufwerk:][Pfad]Dateiname1 Dateiname2. + +Sie k”nnen kein anderes Laufwerk oder Verzeichnis in Dateiname2 angeben. + +. +:SHELL_CMD_DELETE_HELP +L”scht eine oder mehrere Dateien. + +. +:SHELL_CMD_COPY_HELP +Kopiert eine oder mehrere Dateien an eine andere Position. + +. +:SHELL_CMD_CALL_HELP +Ruft eine Stapeldatei von einer anderen aus auf. + +. +:SHELL_CMD_SUBST_HELP +Weist einem internen Pfad eine Laufwerksbezeichnung zu. + +. +:SHELL_CMD_LOADHIGH_HELP +L„dt ein Programm in den hohen Speicherbereich (setzt "xms=true, umb=true" +voraus). + +. +:SHELL_CMD_CHOICE_HELP +Wartet auf das Tippen einer Taste und setzt den ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C[:]Tasten] [/N] [/S] Text +/C[:]Tasten Angabe der zul„ssigen Tasten. Standard ist YN (yes/no). +/N Keine Anzeige der zul„ssigen Tasten am Ende der Meldung. +/S Groá-/Kleinschreibung fr Tasten wird beachtet. +Text Text, der als Aufforderung angezeigt wird. + +. +:SHELL_CMD_ATTRIB_HELP +Ohne Funktion (vorhanden nur aus Kompatibilit„tsgrnden). + +. +:SHELL_CMD_PATH_HELP +Ohne Funktion (vorhanden nur aus Kompatibilit„tsgrnden). + +. +:SHELL_CMD_VER_HELP +Zeigt die Nummer der gemeldeten DOS-Version an oder „ndert sie. + +. +:SHELL_CMD_VER_VER +DOSBox Version %s, gemeldete DOS-Version: %d.%02d. + +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/de/README_de.txt dosbox-staging-0.77.0/contrib/old-translations/de/README_de.txt --- dosbox-staging-0.76.0/contrib/old-translations/de/README_de.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/de/README_de.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1335 @@ +DOSBox v0.74 | Deutsche Lokalisierung von Peter +unter Zuhilfenahme der deutschen Übersetzung 0.73 Andreas (weapon.zero@gmx.net) + + +========= +Anmerkung +========= + + +NatĂźrlich hoffen wir, dass sich irgendwann einmal wirklich jedes erdenkliche +PC-Programm unter DOSBox ausfĂźhren lässt, aber noch sind wir nicht ganz so +weit. Im Moment fĂźhlt sich DOSBox auf einem High-End-Rechner in etwa wie ein +guter 486er an. + +DOSBox kann so eingestellt werden, dass darauf eine große Bandbreite von IBM- +kompatiblen Spielen - von den Klassikern aus der Zeit von CGA, Tandy und PCjr +bis hin zu Titeln der Quake-Ära - läuft. + + + +====== +Inhalt +====== + + +1. Schnelleinstieg +2. FAQ +3. Syntax +4. Interne Befehle/Programme +5. TastaturkĂźrzel +6. Der Keymapper +7. Tastaturlayouts +8. Mehrspieler mittels Nullmodem-Emulation +9. Verbessern der Spielgeschwindigkeit +10. Fehlerbehebung +11. Die Konfigurationsdatei +12. Die Sprachdatei +13. Eine eigene Version von DOSBox erstellen +14. Danksagungen +15. Kontaktinformation + + + +================== +1. Schnelleinstieg +================== + + +Starten Sie DOSBox und tippen Sie "INTRO", um eine kurze EinfĂźhrung zu +erhalten. + +Sie sollten sich unbedingt mit dem Konzept des Einbindens ("mounten") von +Laufwerken und Verzeichnissen vertraut machen, da DOSBox nicht von sich aus +auf Laufwerke (oder Teile davon) zugreift und diese in der Emulation +bereitstellt. +Lesen Sie dazu den Eintrag "Mein C-Prompt sagt Z:\>!" in den FAQ und die +Beschreibung des Befehls "MOUNT" in Abschnitt 4. + + + +====== +2. FAQ +====== + + +Hier einige Fragen, Antworten, Quintessenzen: + +F: Mein C-Prompt sagt Z:\>! +F: Muss ich diese Befehle jedes Mal eingeben? Wie geht das automatisch? +F: Wie komme ich in den Vollbildmodus? +F: Mein CD-ROM-Laufwerk geht nicht! +F: Die Maus funktioniert nicht! +F: Es kommt kein Sound! +F: Der Sound stockt/stottert (oder klingt sonstwie seltsam)! +F: Ich kann keinen Backslash ("\") tippen! Und wo ist der Doppelpunkt? +F: Die Tastatur "hängt"! +F: Der Cursor bewegt sich nur in eine Richtung! +F: Das Spiel/Programm kann seine CD-ROM nicht finden! +F: Das Spiel/Programm läuft viel zu langsam! +F: Kann DOSBox meinen Computer beschädigen? +F: Wie ändere ich die Größe des Arbeitsspeichers/des EMS, die Prozessor- + Geschwindigkeit oder den Soundblaster-IRQ? +F: Welche Sound-Hardware emuliert DOSBox? +F: Auf meinem Linux läuft aRts und DOSBox stĂźrzt beim Start ab! +F: Tolle README, aber ich kapier's noch immer nicht... + + +F: Mein C-Prompt sagt Z:\>! + +A: DOSBox muss erst Ordner/Verzeichnisse freigegeben bekommen, um mit (bzw. + in) ihnen arbeiten zu kĂśnnen. DafĂźr gibt es den MOUNT-Befehl. + + Unter Windows wĂźrde der Befehl "MOUNT C D:\DOS" Ihnen innerhalb von DOSBox + ein C-Laufwerk einbinden, das auf den Windows-Ordner D:\DOS verweist. + Unter Linux wĂźrde "MOUNT C /home/username" Ihnen in DOSBox ein C-Laufwerk + anlegen, das auf das Linux-Verzeichnis /home/username verweist. + + Um auf das eben eingebundene Laufwerk zu wechseln, tippen Sie "C:". Jetzt + sollte DOSBox Ihnen die Eingabeaufforderung "C:\>" anzeigen. + + +F: Muss ich diese Befehle jedes Mal eingeben? Wie geht das automatisch? + +A: In der DOSBox-Konfigurationsdatei gibt es den Abschnitt [autoexec], wo Sie + Befehle eintragen kĂśnnen, die dann beim Start von DOSBox ausgefĂźhrt werden. + + +F: Wie komme ich in den Vollbildmodus? + +A: DrĂźcken Sie Alt-Enter. Alternativ kĂśnnen Sie auch die DOSBox- + Konfigurationsdatei bearbeiten und die Zeile "fullscreen=false" in + "fullscreen=true" ändern. Wenn Ihnen der Vollbildmodus irgendwie komisch + vorkommt, probieren Sie verschiedene Werte fĂźr die Variable + "fullresolution" aus. Um den Vollbildmodus wieder zu verlassen, drĂźcken Sie + erneut Alt-Enter. + + +F: Mein CD-ROM-Laufwerk geht nicht! + +A: Um in DOSBox ein CD-ROM-Laufwerk einbinden zu kĂśnnen, kĂśnnen Sie zwischen + verschiedenen MĂśglichkeiten wählen. + FĂźr einfachste CD-ROM-UnterstĂźtzung mit MSCDEX: + MOUNT D F:\ -T cdrom + FĂźr "low-level" CD-ROM-UnterstĂźtzung (wenn mĂśglich Ăźber IOCTL): + MOUNT D F:\ -T cdrom -USECD 0 + FĂźr "low-level" SDL-UnterstĂźtzung: + MOUNT D F:\ -T cdrom -USECD 0 -NOIOCTL + FĂźr "low-level" ASPI-UnterstĂźtzung (Windows 98/Me mit ASPI-Layer): + MOUNT D F:\ -T cdrom -USECD 0 -ASPI + + Wobei + "D" fĂźr den gewĂźnschten DOSBox-Laufwerksbuchstaben, + "F:\" fĂźr die Pfad des CD-ROM-Laufwerks und + "0" fĂźr die Nummer steht, die Sie nach Eingabe von "MOUNT -CD" fĂźr das + betreffende CD-ROM-Laufwerk erhalten haben. + + Siehe auch FAQ: Das Spiel/Programm kann seine CD-ROM nicht finden! + + +F: Die Maus funktioniert nicht! + +A: Normalerweise erkennt DOSBox die Maus, wenn ein Spiel sie benutzt. Durch + einmaliges Klicken innerhalb des DOSBox-Fensters sollte sie erfasst werden + und funktionieren. Bei bestimmten Spielen kommt es aber vor, dass die + Mauserkennung fehlschlägt. In diesem Fall mĂźssen Sie das Erfassen u.U. + erzwingen: drĂźcken Sie dazu Strg-F10. + + +F: Es kommt kein Sound! + +A: Stellen Sie zunächst sicher, dass der Sound fĂźr das Spiel richtig + eingestellt ist. MĂśglicherweise mĂźssen Sie dafĂźr ein zum Spiel gehĂśrendes + Programm namens SETUP, SETSOUND oder INSTALL ausfĂźhren. PrĂźfen Sie, ob es + dort eine "Autodetect"-Option gibt. Falls nicht, wählen Sie eine "Sound + Blaster"- oder "SoundBlaster 16"-Karte mit den Einstellungen "Adresse=220, + IRQ=7, DMA=1" aus. Wenn Sie ein MIDI-Gerät auswählen kĂśnnen/wollen, wählen + Sie die Einstellung "Adresse=330". In der DOSBox-Konfigurationsdatei kĂśnnen + Sie diese Werte auch ändern. + + Falls das Problem damit nicht behoben ist, setzen Sie den "core" in der + Konfigurationsdatei von "auto" auf "normal" und reduzieren Sie die Zahl der + Cycles auf einen niedrigen statischen Wert (zum Beispiel "cycles=2000"). + PrĂźfen Sie auch, ob ihr Wirtsbetriebssystem Ăźberhaupt Sound ausgibt. + + +F: Der Sound stockt/stottert (oder klingt sonstwie seltsam)! + +A: Sie benutzen zuviel Prozessorleistung, um die DOSBox-Geschwindigkeit zu + halten. Sie sollten entweder die Zahl der Cycles verringern, mehr Frames + Ăźberspringen oder die Abtastfrequenz (sampling rate) der verwendeten + Soundkartenemulation reduzieren (siehe Konfigurationsdatei). Oder Sie + schaffen sich einen schnelleren Rechner an. + Sie kĂśnnen auch versuchen, in der Konfigurationsdatei den "prebuffer" + fĂźr die Soundemulation zu erhĂśhen. + + Wenn die Cycles auf "max" oder "auto" eingestellt sind, stellen Sie sicher, + dass keine Hintergrundprozesse stĂśren (insbesondere, wenn diese auf die + Festplatte zugreifen). + + +F: Ich kann keinen Backslash ("\") tippen! Und wo ist der Doppelpunkt? + +A: Dieses Problem tritt auf, wenn Sie ein anderes als das US-amerikanische + Tastaturlayout benutzen. MĂśgliche Abhilfen: + 1. Das Tastaturlayout ändern (siehe Abschnitt "Tastaturlayouts") + 2. Im Wirtsbetriebssystem das US-Tastaturlayout einstellen. + 3. Statt Backslash den Schrägstrich ("/") benutzen. + 4. In der Konfigurationsdatei die Variable "usescancodes" von "false" + nach "true" setzen. + 5. Die gewĂźnschten Befehle in der Konfigurationsdatei eintragen. + 6. Die Kombinationen Alt-58 und Alt-92 fĂźr ":" und "\" verwenden. + 7. Auf der deutschen Tastatur liegt der Backslash auf der "#"-Taste, den + Doppelpunkt bekommt man mit Shift-Ö. + 8. Benutzen Sie das Programm KEYB (http://projects.freedos.net/keyb/), + am besten in der Version 2.0 pre4, weil neuere wie ältere Versionen + einen Programmfehler in den Laderoutinen aufweisen. + + +F: Die Tastatur "hängt"! + +A: Reduzieren Sie in der Konfigurationsdatei die Priorität von DOSBox im + System (z.B. "priority=normal,normal"). Eine andere MĂśglichkeit besteht + darin, die Zahl der Cycles zu verringern. + + +F: Der Cursor bewegt sich nur in eine Richtung! + +A: Schalten Sie die Joystick-Simulation ab und prĂźfen Sie, ob das Problem dann + immer noch besteht (setzen Sie "joysticktype=none" im Abschnitt [joysticks] + der DOSBox-Konfigurationsdatei. Sie kĂśnnen auch einfach den Joystick + abklemmen (Stecker ziehen). + Wenn Sie in dem Spiel einen Joystick verwenden mĂśchten, setzen Sie + versuchshalber "timed=false" und kalibrieren Sie den Joystick sowohl in + Ihrem Betriebssystem als auch im Setup-Programm des Spiels. + + +F: Das Spiel/Programm kann seine CD-ROM nicht finden! + +A: Stellen Sie sicher, dass Sie die CD-ROM mit dem Parameter "-T cdrom" + eingebunden haben, dadurch wird das MSCDEX-Interface geladen, mit dem + DOS-Spiele mit CD-ROM-Laufwerken kommunizieren. + + Sie kĂśnnen auch versuchen, das richtige CD-Label (Laufwerksbezeichnung) + anzugeben ("-LABEL Bezeichnung"). FĂźr "low-level" CD-ROM-UnterstĂźtzung + benutzen Sie alternativ den Parameter "-USECD x", wobei das "x" fĂźr die + Nummer des CD-Laufwerks steht. Diese erhalten Sie durch Eingabe von + "MOUNT -CD". Unter Windows kĂśnnen Sie auch noch "-IOCTL", "-ASPI" oder + "-NOIOCTL" angeben (dazu mehr bei der Beschreibung des MOUNT-Befehls). + Siehe auch FAQ: Mein CD-ROM-Laufwerk geht nicht! + + Versuchen Sie, ein CD-ROM-Image anzulegen (vorzugsweise im Format CUE/BIN) + und binden Sie dieses mit dem DOSBox-Befehl IMGMOUNT ein. Dadurch erhalten + Sie unter jedem Betriebssystem eine ausgezeichnete "low-level" CD-ROM- + UnterstĂźtzung. + + +F: Das Spiel/Programm läuft viel zu langsam! + +A: Siehe Abschnitt "Verbessern der Spielgeschwindigkeit" + + +F: Kann DOSBox meinen Computer beschädigen? + +A: DOSBox kann Ihren Computer nicht mehr beschädigen als jedes andere Programm + mit hohen Systemvoraussetzungen. Wenn Sie die Zahl der Cycles erhĂśhen, wird + nicht wirklich Ihr Prozessor Ăźbertaktet. Eine zu hoch eingestellte Cycles- + Zahl hat negative Auswirkungen auf die Geschwindigkeit, mit der innerhalb + von DOSBox Programme ausgefĂźhrt werden. + + +F: Wie ändere ich die Größe des Arbeitsspeichers/des EMS, die Prozessor- + Geschwindigkeit oder den Soundblaster-IRQ? + +A: Erstellen Sie eine Konfigurationsdatei: "CONFIG -WRITECONF dosbox.conf"; + Ăśffnen Sie diese in Ihrem Lieblings-Text-Editor und schauen Sie sich die + Einstellungen an. Um DOSBox mit den neuen Einstellungen zu laden, benutzen + Sie "dosbox -CONF dosbox.conf" (ändern Sie u.U. Ihre VerknĂźpfung + entsprechend). + + +F: Welche Sound-Hardware emuliert DOSBox? + +A: DOSBox emuliert verschiedene alte Soundwiedergabe-Geräte: + - PC-Lautsprecher + Die Emulation umfasst den Ton-Generator und verschiedene Formen von + digitaler Soundausgabe Ăźber den internen Lautsprecher. + - Creative CMS/Gameblaster + Die erste Karte von Creative Labs. In der Voreinstellung belegt sie + Port 0x220. Vorsicht: wenn Sie die Karte zusammen mit der Adlib-Emulation + aktivieren, kann es zu Problemen kommen. + - Tandy 3 Voice + Diese Hardware wird bis auf den Noise-Channel komplett emuliert. Dieser + ist nicht besonders gut dokumentiert und was die Sauberkeit des Sounds + angeht, half nur raten. + - Adlib + Diese Emulation wurde von MAME entliehen und ist fast perfekt. Sie umfasst + auch die Fähigkeit des Adlib, beinahe digitalisierten Sound wiederzugeben. + - SoundBlaster 16, SoundBlaster Pro I & II, SoundBlaster I & II + In der Voreinstellung bietet DOSBox 16-Level/16-bit Stereo-Sound. + Sie kĂśnnen in der Konfigurationsdatei auch ein anderes Modell einstellen. + - Disney Soundsource + Diese Soundkarte benutzt den Druckeranschluss und gibt nur Digital-Sound + aus. + - Gravis Ultrasound + Diese Hardware wird fast komplett emuliert, jedoch wurden die MIDI- + Funktionen weggelassen, da anderweitig ein MPU-401 emuliert wird. + - MPU-401 + Auch ein MIDI-Interface wird emuliert, allerdings nur, wenn sie Ăźber ein + General MIDI- oder MT-32-Gerät verfĂźgen. + + +F: Auf meinem Linux läuft aRts und DOSBox stĂźrzt beim Start ab! + +A: Auch wenn es sich hierbei nicht wirklich um ein DOSBox-Problem handelt, so + kann es beseitigt werden, indem Sie die Umgebungsvariable "SDL_AUDIODRIVER" + nach "alsa" oder "oss" ändern. + + +F: Tolle README, aber ich kapier's noch immer nicht... + +A: Vielleicht kann Ihnen "The Newbie's pictorial guide to DOSBox" unter + http://vogons.zetafleet.com/viewforum.php?f=39 weiterhelfen. + Alternativ kĂśnnen Sie es im DOSBox-Wiki probieren: + http://dosbox.sourceforge.net/wiki/ + Beide Angebote sind nur in englischer Sprache verfĂźgbar, es sollten sich + Ăźber die bekannten Suchmaschinen aber auch zahlreiche deutschsprachige + Tutorials und Anleitungen finden lassen. + + +Sollten Sie noch Fragen haben, lesen diese README aufmerksam durch und/oder +schauen Sie auf folgender Seite und dem dazugehĂśrigen Forum nach: +http://dosbox.sourceforge.net + + + +========= +3. Syntax +========= + + +Dieser Abschnitt gibt einen Überblick Ăźber die Kommandozeilenparameter, mit +denen DOSBox gestartet werden kann. Windows-Benutzer sollten dazu ihre DOSBox- +VerknĂźpfung entsprechend bearbeiten ("Ziel:") oder die Eingabeaufforderung +benutzen (CMD.EXE bzw. COMMAND.COM). + +Die Parameter gelten - wenn nicht anders angegeben - fĂźr alle verwendeten +Betriebssysteme. + +dosbox [Name] [-EXIT] [-C Befehl] [-FULLSCREEN] [-CONF Konfigurationsdatei] + [-LANG Sprachdatei] [-MACHINE System] [-NOCONSOLE] + [-STARTMAPPER] [-NOAUTOEXEC] [-SCALER Filter] [-FORCESCALER Filter] + +dosbox -VERSION + + + Name + Wenn "Name" ein Verzeichnis ist, wird es als C-Laufwerk eingebunden. + Wenn "Name" ein Programm ist, wird das Verzeichnis von "Name" + eingebunden und "Name" ausgefĂźhrt. + + -EXIT + DOSBox wird nach der AusfĂźhrung von "Name" beendet. + + -C Befehl + FĂźhrt vor dem Aufrufen von "Name" einen bezeichneten "Befehl" aus. + Es kĂśnnen mehrere Befehle angegeben werden, vor jedem sollte aber "-C" + stehen. + MĂśgliche "Befehle" sind: ein internes Programm, ein DOS-Befehl oder + ein Programm auf einem eingebundenen Laufwerk. + + -FULLSCREEN + FĂźhrt DOSBox im Vollbildmodus aus. + + -CONF Konfigurationsdatei + FĂźhrt DOSBox mit den in "Konfigurationsdatei" angegebenen Optionen + aus. Der Parameter "-CONF" kann mehrfach benutzt werden. + Siehe dazu den Abschnitt "Die Konfigurationsdatei". + + -LANG Sprachdatei + DOSBox benutzt die in "Sprachdatei" angegebenen Zeichenketten. + + -MACHINE System + DOSBox anweisen, ein bestimmtes Computermodell zu emulieren. MĂśgliche + Werte sind: hercules, cga, pcjr, tandy, vga (Voreinstellung). + Die Wahl des Systems hat Einfluss auf den Grafikmodus und verfĂźgbare + Soundkarten. + + -NOCONSOLE (nur unter Windows) + DOSBox ohne Status-Fenster laden. Meldungen werden in die Dateien + stdout.txt und stderr.txt umgeleitet. + + -STARTMAPPER + Ruft direkt beim Programmstart den Keymapper auf. Hilfreich bei + Tastaturproblemen. + + -NOAUTOEXEC + DOSBox ignoriert den Abschnitt [autoexec] der Konfigurationsdatei. + + -SCALER Filter + Benutzt den durch "Filter" angegebenen Scaling-Methode. Die + verfĂźgbaren Filter finden Sie in der DOSBox-Konfigurationsdatei. + + -FORCESCALER Filter + Ähnlich dem Parameter -SCALER; erzwingt die Anwendung des gewählten + Filters auch wenn dieser mĂśglicherweise nicht passt. + + -VERSION + Gibt Versions-Information aus und beendet DOSBox. Zur Verwendung durch + Frontends. + + +ANMERKUNG: Wenn Name/Befehl/Konfigurationsdatei/Sprachdatei ein Leerzeichen +enthält, setzen Sie Name/Befehl/Konfigurationsdatei/Sprachdatei komplett in +AnfĂźhrungszeichen ("hier ein Beispiel"). + +Wenn Sie innerhalb der AnfĂźhrungszeichen weitere AnfĂźhrungszeichen benutzen +mĂźssen (am wahrscheinlichsten bei den Parametern -C und -MOUNT), benutzen Sie +unter Windows und OS/2 einfache AnfĂźhrungszeichen (') innerhalb der doppelten +AnfĂźhrungszeichen, unter anderen Betriebssystemen versuchen Sie einen +vorangestellten umgekehrten Schrägstrich (\). + + Beispiel Windows: + -C "MOUNT C 'C:\Mein Ordner'" + Beispiel Linux: + -C "MOUNT C \"/tmp/mein spiel\"" + + +Beispiel: + +dosbox C:\ATLANTIS\ATLANTIS.EXE -C "MOUNT D C:\SAVES" + Bindet den Ordner C:\ATLANTIS als C-Laufwerk ein und fĂźhrt das Programm + ATLANTIS.EXE aus, nachdem C:\SAVES als D-Laufwerk eingebunden wurde. + + +Unter Windows kĂśnnen Verzeichnisse oder Dateien auch mittels Drag & Drop auf +die dosbox.exe gezogen werden. + + + +============================ +4. Interne Befehle/Programme +============================ + + +DOSBox unterstĂźtzt die meisten DOS-Befehle aus COMMAND.COM; eine Liste der +internen Kommandos erhalten Sie durch den Befehl HELP. + +Zusätzlich sind folgende Befehle verfĂźgbar: + + +MOUNT "Virtueller Laufwerksbuchstabe" "Laufwerk oder Ordner" + [-T Typ] [-ASPI] [-IOCTL] [-NOICTL] [-USECD Nummer] + [-SIZE Laufwerksgröße] [-LABEL Bezeichnung] [-FREESIZE Speicherplatz] +MOUNT -CD +MOUNT -U "Virtueller Laufwerksbuchstabe" + + Programm zum Einbinden lokaler Laufwerke bzw. Verzeichnisse/Ordner als + virtuelle Laufwerke innerhalb von DOSBox. + + "Virtueller Laufwerksbuchstabe" + Der Laufwerksbuchstabe innerhalb von DOSBox (z.B. C) + + "Laufwerk oder Ordner" + Das lokale Verzeichnis, das in DOSBox verfĂźgbar gemacht werden soll. + Es wird empfohlen, ganze Laufwerke nur dann einzubinden, wenn es sich + bei ihnen um CD-ROMs handelt. + + -T Typ + Typ des eingebundenen Verzeichisses. UnterstĂźtzt werden: + dir (Voreinstellung), floppy, cdrom. + + -SIZE Laufwerksgröße + Legt die Größe des Laufwerks fest. Format fĂźr Laufwerksgröße: + "BpS,SpK,ACg,ACf" + BpS: Bytes pro Sektor, in der Grundeinstellung 512 fĂźr normale und + 2048 fĂźr CD-ROM-Laufwerke + SpC: Sektoren pro Cluster, normalerweise zwischen 1 und 127 + ACg: Anzahl der Cluster (gesamt), zwischen 1 und 65534 + ACf: Anzahl der freien Cluster, zwischen 1 und ACg + + -FREESIZE Speicherplatz + Eine vereinfachte Version von -SIZE; legt die Größe des auf dem + Laufwerk verfĂźgbaren freien Speichers fest. + FĂźr normale Laufwerke wird der Wert in Megabytes interpretiert, fĂźr + Disketten in Kilobytes. + + -LABEL Bezeichnung + Laufwerksbezeichnung als "Bezeichnung" festlegen. Wird manchmal + benĂśtigt, wenn das CD-Label nicht richtig gelesen wird. Kann hilfreich + sein, wenn ein Programm seine CD-ROM nicht findet. Falls keine + Bezeichnung angegeben und keine "low-level" UnterstĂźtzung (-USECD + und/oder -ASPI bzw. -NOICTL) gewählt wird: + Windows: Bezeichnung wird Ăźbernommen von "Verzeichnis" + Linux: Bezeichnung lautet "NO_LABEL" + Wenn eine Bezeichnung angegeben wird, ist diese solange gĂźltig, wie + das Laufwerk eingebunden ist und wird nicht geupdatet (CD-Wechsel)! + + -ASPI + Immer ASPI-Layer benutzen. Nur gĂźltig, wenn eine CD-ROM auf einem + Windows-System mit ASPI-Layer eingebunden wird. + + -IOCTL + Immer IOCTL-Befehle benutzen. Nur gĂźltig, wenn eine CD-ROM auf einem + kompatiblen System eingebunden wird (Windows NT/2000/XP). + + -NOICTL + Immer SDL-CD-ROM-Layer benutzen. GĂźltig auf allen Systemen. + + -USECD Nummer + SDL-CD-ROM-UnterstĂźtzung fĂźr bestimmte Laufwerksnummer erzwingen. Die + Nummer erfahren sie mit -CD. GĂźltig auf allen Systemen. + + -CD + Zeigt alle erkannten CD-ROM-Laufwerke und ihre Nummern. Zur Benutzung + mit -USECD. + + -U + Laufwerk "entbinden". Nicht zu verwenden mit Z:\. + + ANMERKUNG: Ein lokales Verzeichnis kann auch als CD-ROM-Laufwerk eingebunden + werden, die Hardware-UnterstĂźtzung fehlt dann. + + Im Grunde kann mit MOUNT echte Hardware mit dem von DOSBox emulierten PC + verbunden werden. MOUNT C C:\GAMES weist DOSBox an, Ihren Ordner C:\GAMES + als C-Laufwerk innerhalb DOSBox zu verwenden. Es erlaubt Ihnen auch, die + Laufwerksbuchstaben fĂźr Programme zu ändern, die bestimmte + Laufwerksbuchstaben benĂśtigen. + + Das Spiel TouchĂŠ: Adventures of the Fifth Musketeer muss beispielsweise + vom C-Laufwerk gestartet werden. Mit DOSBox und dem MOUNT-Befehl kann man + dem Spiel vorgaukeln, es befände sich auf dem C-Laufwerk, während Sie es + ablegen kĂśnnen, wo Sie wollen. Wenn das Spiel also in D:\GAMES\TOUCHE wäre, + kĂśnnten Sie den Befehl "MOUNT C D:\GAMES" benutzen, um TouchĂŠ vom D-Laufwerk + auszufĂźhren. + + Es wird DRINGEND davon abgeraten, das gesamte C-Laufwerk mit "MOUNT C C:\" + einzubinden. Dasselbe gilt fĂźr die Urverzeichnisse egal welches Laufwerks, + mit Ausnahme von CD-ROMs (da diese schreibgeschĂźtzt sind). Falls Ihnen oder + DOSBox ein Fehler unterläuft, kĂśnnten alle Daten verloren gehen. + Es wird deshalb empfohlen, alle Programme/Spiele in einem Unterverzeichnis + abzulegen und dieses einzubinden. + + Allgemeine MOUNT-Beispiele: + + 1. C:\OrdnerX als Diskettenlaufwerk A einbinden: + MOUNT A C:\OrdnerX -T floppy + 2. Das CD-ROM-Laufwerk E als CD-ROM-Laufwerk D in DOSBox einbinden: + MOUNT D E:\ -T cdrom + 3. Das CD-ROM-Laufwerk bei /media/cdrom als Laufwerk D in DOSBox einbinden: + MOUNT D /media/cdrom -T cdrom -USECD 0 + 4. D:\ als Laufwerk mit ~870 MB freiem Speicher einbinden (einfach): + MOUNT C D:\ -FREESIZE 870 + 5. D:\ als Laufwerk mit ~870 MB freiem Speicher einbinden (komplex, nur fĂźr + Profis!): + MOUNT C D:\ -SIZE 512,127,16513,13500 + 6. Verzeichnis /home/user/OrdnerY als C-Laufwerk in DOSBox einbinden: + MOUNT C /home/user/OrdnerY + 7. Das DOSBox-Verzeichnis als Laufwerk D einbinden: + MOUNT D + + +MEM + + Zeigt die Größe des freien Arbeitsspeichers an. + + +CONFIG -WRITECONF Datei +CONFIG -WRITELANG Datei +CONFIG -SET Abschnitt Variable=Wert +CONFIG -GET Abschnitt Variable + + Mit CONFIG kĂśnnen verschiedene Einstellungen von DOSBox abgefragt oder + geändert werden, während das Programm läuft. Die gewählten Einstellungen + und Zeichenketten kĂśnnen direkt gespeichert werden. Informationen Ăźber + mĂśgliche Abschnitte und Variablen finden Sie im Abschnitt "Die + Konfigurationsdatei". + + -WRITECONF Datei + Die aktuelle Konfigurationsdatei in "Datei" abspeichern. "Datei" + befindet sich im lokalen DOSBox-Verzeichnis, nicht im eingebundenen + DOSBox-Laufwerk!). + + Die Konfigurationsdatei steuert verschiedene DOSBox-Einstellungen: die + Größe des emulierten Speichers, die emulierten Soundkarten und vieles + mehr. Sie beinhaltet auch die AUTOEXEC.BAT-Einstellungen. Mehr Infor- + mationen im Abschnitt "Die Konfigurationsdatei". + + -WRITELANG Datei + Die aktuellen Spracheinstellungen abspeichern, wobei "Datei" sich im + lokalen DOSBox-Verzeichnis befindet, nicht im eingebundenen DOSBox- + Laufwerk. Die Sprachdatei beinhaltet (fast) alle auf dem Bildschirm + sichtbaren Ausgaben der internen Befehle und des internen DOS. + + -SET Abschnitt Variable=Wert + CONFIG versucht, der Variablen einen neuen Wert zuzuordnen. CONFIG kann + zu diesem Zeitpunkt nicht ausgeben, ob der Versuch erfolgreich war. + + -GET Abschnitt Variable + Der aktuelle Wert der Variable wird ausgegeben und und in der Umge- + bungsvariable %CONFIG% gespeichert. Hilfreich, wenn mit Stapeldateien + gearbeitet wird. + + Sowohl "-SET" als auch "-GET" funktionieren aus Stapeldateien heraus und + kĂśnnen benutzt werden, um fĂźr einzelne Spiele eigene Einstellungen festzu- + legen. + + Beispiele: + + 1. Eine Konfigurationsdatei im DOSBox-Verzeichnis abspeichern: + CONFIG -WRITECONF dosbox.conf + 2. Die CPU-Cycles auf 10000 setzen: + CONFIG -SET cpu cycles=10000 + 3. EMS-Speicheremulation abschalten: + CONFIG -SET dos ems=off + 4. PrĂźfen, wieviel Prozessorleistung DOSBox im System nutzt: + CONFIG -GET cpu core + + +LOADFIX [-Größe] [Programm] [Programm-Parameter] +LOADFIX -F + + Programm zum Speicher-"Fressen". Hilfreich bei alten Programmen, die wenig + freien Speicher erwarten. + + -Größe + Größe des zu "fressenden" Speichers in KB, Voreinstellung: 64 KB + + -F + Vorher zugeteilten Speicher freigeben. + + Beispiele: + + 1. Programm MM2.EXE laden und 64 KB Speicher zuteilen (MM2 erhält 64 KB + weniger Speicher): + LOADFIX MM2.EXE + 2. Programm MM2.EXE laden und 32 KB Speicher zuteilen: + LOADFIX -32 MM2.EXE + 3. Vorher zugeteilten Speicher freisetzen: + LOADFIX -F + + +RESCAN + + DOSBox liest die Verzeichnisstruktur erneut ein. Hilfreich, wenn außerhalb + von DOSBox etwas in dem/den eingebundenen Verzeichnis/sen geändert wurde. + Alternativ kann auch Strg-F4 benutzt werden. + + +MIXER Kanal Links:Rechts [/NOSHOW] [/LISTMIDI] + + Zeigt die Lautstärkeeinstellungen an und ändert sie. + + Kanal + Einer der folgenden Werte: master, disney, spkr, gus, sb, fm. + + Links:Rechts + Eine Lautstärkeangabe in Prozent (fĂźr die jeweilige Seite). + Ein vorangestelltes D sorgt dafĂźr, dass die Zahl als Dezibelangabe + interpretiert wird (Beispiel: MIXER gus d-10). + + /NOSHOW + Die Lautstärkeänderung erfolgt stumm (keine Textmeldung). + + /LISTMIDI + Zeigt die auf Ihrem Rechner verfĂźgbaren MIDI-Geräte an (Windows). + Um ein anderes Gerät als den standardmäßigen MIDI-Mapper auszuwählen, + fĂźgen Sie eine Zeile "config=id" im Abschnitt [midi] der + Konfigurationsdatei hinzu, wobei "id" die Nummer ist, die Sie nach + Benutzung von /LISTMIDI fĂźr das betreffende Gerät erhalten. + + +IMGMOUNT + + Programm zum Einbinden von Disketten-, Festplatten- und CD-ROM-Images + in DOSBox. + + IMGMOUNT "Virtueller Laufwerksbuchstabe" Imagedatei -T Imagetyp + -FS Imageformat + -SIZE Sektorengröße, Sektoren pro Kopf, KĂśpfe, Zylinder + + Imagedatei + Adresse der in DOSBox einzubindenden Imagedatei. Diese befindet sich + entweder auf einem in DOSBox eingebundenen Laufwerk oder einem + physischen Gerät. Es kĂśnnen auch CD-ROM-Images (ISO oder CUE/BIN) + eingebunden werden. Wenn Sie mehrere CD-ROMs benĂśtigen, geben Sie + die Images hintereinander an. Diese kĂśnnen dann jederzeit mit Strg-F4 + gewechselt werden. + + -T Imagetyp + GĂźltige Imagetypen: + floppy: Gibt ein Disketten-Image bzw. -Images an. DOSBox erkennt das + Format automatisch (360 KB, 1,2 MB, 720 KB, 1,44 MB usw.) + iso: Gibt ein CD-ROM-Image an. Das Format wird automatisch erkannt. + Es kann ein ISO- oder CUE/BIN-Image benutzt werden. + hdd: Gibt ein Festplatten-Image an. Es muss die korrekte CHS- + Laufwerksgeometrie angegeben werden. + + -FS Imageformat + GĂźltige Dateisystem-Formate: + iso: ISO 9660 CD-ROM-Format. + fat: FAT-Dateisystem. DOSBox versucht, dieses Image als Laufwerk + in DOSBox einzubinden und die Dateien in DOSBox verfĂźgbar zu + machen. + none: DOSBox versucht nicht, das Dateisystem auf dem Image zu lesen. + Dies kann nĂźtzlich sein, wenn man es formatieren oder mit dem + BOOT-Befehl davon booten will. FĂźr das "none"-Dateisystem muss + statt einem Laufwerksbuchstaben eine Laufwerksnummer angegeben + werden (2 oder 3; wobei 2=Master, 3=Slave). + Um beispielsweise ein 70 MB-Image D:\TEST.IMG als Slave- + Laufwerk einzubinden, benutzen Sie: + IMGMOUNT 3 D:\TEST -SIZE 512,63,16,142 -FS none + Zum Vergleich der Befehl, um das Laufwerk in DOSBox zu lesen: + IMGMOUNT E D:\TEST.IMG -SIZE 512,63,16,142 + + -SIZE + Die Laufwerksgeometrie (Angaben zur Anzahl von Zylindern, KĂśpfen und + Sektoren) des Laufwerks. Wird benĂśtigt, um Festplatten-Images + einbinden zu kĂśnnen. + + Ein Beispiel zum Einbinden von CD-ROM-Images: + + 1a. MOUNT C /tmp + 1b. IMGMOUNT D C:\CDROM.ISO -T iso + oder alternativ: + 2. IMGMOUNT D /tmp/CDROM.ISO -T iso + + +BOOT + + BOOT startet Disketten- oder Festplatten-Images unabhängig von der DOS- + Emulation von DOSBox. Damit kĂśnnen sog. Booter-Spiele oder andere + Betriebssysteme innerhalb von DOSBox gebootet werden. + Wenn das emulierte System ein PCjr ist ("machine=pcjr"), kĂśnnen mit dem + BOOT-Befehl auch PCjr-Cartridges (.jrc) geladen werden. + + BOOT [Image1.img Image2.img ... ImageN.img] [-L Laufwerksbuchstabe] + BOOT Cartridge.jrc + (nur gĂźltig bei PCjr-Emulation) + + ImageN.img + Eine beliebige Anzahl von Disketten-Images, die eingebunden werden + sollen, nachdem DOSBox vom angegebenen Laufwerk gebootet hat. + Um zwischen den eingebundenen Disketten zu wechseln, benutzen Sie + Strg-F4. Dadurch wird die aktuelle Diskette "ausgeworfen" und die + nächste auf der Liste "eingelegt". Sobald die letzte Diskette auf der + Liste ausgeworfen wurde, wird wieder bei der ersten begonnen. + + -L Laufwerksbuchstabe + Gibt das Laufwerk an, von dem gebootet werden soll. + Die Voreinstellung ist A, also das Diskettenlaufwerk. Es kann auch von + einem als Master eingebundenen Festplatten-Image gebootet werden, + dazu muss "-L C" angegeben werden. Soll das Laufwerk als Slave + behandelt werden, lautet der Parameter: "-L D". + + Cartridge.jrc + Wenn das emulierte System ein PCjr ist, kĂśnnen auch PCjr-Cartridges + gebootet werden. Die Emulation ist aber noch nicht perfekt. + + +IPX + + Die IPX-NetzwerkunterstĂźtzung muss zunächst in der Konfigurationsdatei + aktiviert werden ("ipx=true"). + + Alles, was mit dem IPX-Netzwerk zusammenhängt, wird durch den internen + Befehl IPXNET gesteuert. Um Hilfe Ăźber das IPX-Netzwerk innerhalb von DOSBox + zu erhalten, benutzen Sie "IPXNET HELP" (ohne AnfĂźhrungszeichen). Das + Programm wird Ihnen eine Liste der gĂźltigen Parameter und dazugehĂśrige + Informationen ausgeben. + + Um das Netzwerk nun tatsächlich einrichten zu kĂśnnen, muss ein System als + Server fungieren. Um es einzurichten, geben Sie unter DOSBox den Befehl + "IPXNET STARTSERVER" ein. Es wird sich automatisch eine DOSBox- + Serversitzung zum virtuellen IPX-Netzwerk hinzufĂźgen. Auf den Rechnern, die + mit dem virtuellen IPX-Netzwerk verbunden werden sollen, geben Sie jeweils + den Befehl "IPXNET CONNECT Adresse" ein. + + Wenn der Server zum Beispiel horst.dosbox.com heißt, mĂźssen Sie folgenden + Befehl auf jedem Client eingeben: "IPXNET CONNECT horst.dosbox.com". + + FĂźr Spiele, die NetBIOS benutzen, wird ein Programm namens NETBIOS.EXE von + Novell benĂśtigt. Richten Sie die IPX-Verbindung wie oben beschrieben ein + und starten Sie NetBIOS. + + Es folgt die IPXNET-Syntax: + + IPXNET CONNECT Adresse Port + Ăśffnet eine Verbindung zu einem IPX-Tunnelserver innerhalb einer + anderen DOSBox-Sitzung. Der Parameter "Adresse" gibt die IP-Adresse + oder den Host-Namen des Servers an. Sie kĂśnnen auch einen UDP-Port + angeben, den Sie benutzen wollen. Standardmäßig benutzt IPXNET den + Port 213. Dies ist der Anschluss, der von IANA fĂźr den IPX- + Tunnelserver zugewiesen wird. + + IPXNET DISCONNECT + beendet die Verbindung mit dem IPX-Tunnelserver. + + IPXNET STARTSERVER Port + startet einen IPX-Tunnelserver innerhalb der aktuellen DOSBox-Sitzung. + Standardmäßig akzeptiert der Server Verbindungen auf UDP-Port 213, + Sie kĂśnnen diese Einstellung aber ändern. + Wenn dem Server ein Router vorgeschaltet ist, muss der Port angegeben + werden. + Auf Linux-/Unix-basierten Systemen kĂśnnen Ports unterhalb von 1023 nur + von Root-Accounts benutzt werden. Auf diesen Systemen sollten Sie + Ports oberhalb von 1023 benutzen. + + IPXNET STOPSERVER + beendet den IPX-Tunnelserver der aktuellen DOSBox-Sitzung. Sie sollten + vorsichtshalber sicherstellen, dass alle anderen Verbindungen + ebenfalls beendet wurden, ansonsten kĂśnnten sich die noch auf den + Tunnelrechner zugreifenden Rechner eventuell aufhängen. + + IPXNET PING + sendet einen Broadcast-Ping durch das Tunnelnetzwerk, auf den die + angeschlossenen Rechner antworten und die Zeit angeben, die benĂśtigt + wurde, um den Ping zu senden und zu empfangen. + + IPXNET STATUS + zeigt den Status des IPX-Tunnelnetzwerks der aktuellen DOSBox-Session + an. Um eine Liste aller an das Netzwerk angeschlossenen Rechner zu + erhalten, benutzen Sie den Befehl IPXNET PING. + + +KEYB [Tastaturcode [Codeseite [Tastaturdefinitionsdatei]]] + + Programm zum Ändern des Tastaturcodes (Tastaturlayouts). Mehr darĂźber im + Abschnitt "Tastaturlayouts". + + Tastaturcode + Der aus zwei (oder mehr) Buchstaben bestehende Tastaturcode fĂźr ein + Land, beispielsweise GK (Griechenland) oder IT (Italien). Damit wird + das zu verwendende Tastaturlayout ausgewählt. + + Codeseite + Die Nummer der zu verwendenden Codeseite (Codepage). Wenn der + Tastaturcode nicht mit der Codeseite kompatibel ist, kann diese nicht + geladen werden. + Wenn keine Codeseite angegeben wird, benutzt DOSBox automatisch das + entsprechende Standard-Layout. + + Tastaturdefinitionsdatei + Diese kann/muss angegeben werden, falls die gewĂźnschte Codeseite nicht + durch DOSBox zur VerfĂźgung gestellt wird und wird auch nur in solchen + Fällen benĂśtigt. + + Beispiele: + + 1) Standard-Tastaturlayout fĂźr Deutschland und Österreich (es wird + automatisch die Codeseite 858 verwendet): + KEYB GR + 2) Russisches Tastaturlayout mit Codeseite 866: + KEYB RU 866 + (Benutzen Sie LinksAlt-RechtsShift fĂźr kyrillische Zeichen) + 3) FranzĂśsisches Tastaturlayout mit Codeseite 850 aus der Datei EGACPI.DAT: + KEYB FR 850 EGACPI.DAT + 4) Codeseite 858 (ohne Tastaturlayout): + KEYN none 858 + + +Um Hilfe fĂźr einen internen Befehl oder ein bestimmtes Programm zu erhalten, +kann auch der Kommandozeilenparameter "/?" benutzt werden. + + + +================= +5. TastaturkĂźrzel +================= + + +Die folgende Auflistung erhalten Sie auch mit dem Befehl INTRO SPECIAL: + +Alt-Enter Vollbildmodus an/aus +Alt-Pause Emulation unterbrechen +Strg-F1 Keymapper starten +Strg-F4 Disketten-Image wechseln; Verzeichnisstruktur neu lesen +Strg-F5 Screenshot als PNG-Datei abspeichern +Strg-Alt-F5 Bildschirmausgabe und Sound als Videoclip speichern an/aus +Strg-F6 Soundausgabe in WAV-Datei schreiben an/aus +Strg-Alt-F7 OPL-Daten aufzeichnen an/aus +Strg-Alt-F8 Raw-MIDI-Daten aufzeichnen an/aus +Strg-F7 Frames Ăźberspringen -1 +Strg-F8 Frames Ăźberspringen +1 +Strg-F9 DOSBox schließen +Strg-F10 Maus erfassen/freigeben +Strg-F11 Emulation verlangsamen (DOSBox-Cycles verringern) +Strg-F12 Emulation beschleunigen (DOSBox-Cycles erhĂśhen) +Alt-F12 Drosselung aufheben (Turbo-Knopf) + +Diese Voreinstellungen kĂśnnen im Keymapper geändert werden. + +Gespeicherte/aufgenommene Dateien werden im Unterverzeichnis "capture" im +DOSBox-Ordner abgelegt (diese Einstellung kann in der Konfigurationsdatei +geändert werden). +Das Verzeichnis muss vor dem Start von DOSBox vorhanden sein, sonst kann +nichts gespeichert/aufgenommen werden! + +ANMERKUNG: Sobald die DOSBox-Cycles derart erhĂśht wurden, dass es das +Leistungsmaximum Ihres Rechners Ăźbersteigt, hat das denselben Effekt, als +wĂźrden Sie die Emulation verlangsamen. Dieses Maximum ist von Rechner zu +Rechner unterschiedlich, es gibt keinen allgemein gĂźltigen Wert. + + + +================ +6. Der Keymapper +================ + + +Wenn Sie den Keymapper starten (entweder mit Strg-F1 oder dem +Kommandozeilenparameter "-STARTMAPPER"), erhalten Sie eine virtuelle Tastatur +und einen virtuellen Joystick. + +Diese virtuellen Geräte entsprechen den Tasten, die DOSBox an die ausgefĂźhrten +Programme Ăźbergibt. Durch einen Mausklick auf die jeweilige Taste sehen Sie +links unten, mit welcher Taste/Funktion diese verknĂźpft ist (EVENT). + +EVENT: Taste/Funktion +BIND: Belegung + Add Del +mod1 hold Next +mod2 +mod3 + + EVENT + Die Taste/Joystick-Knopf bzw -Achse, die DOSBox den emulierten Programmen + meldet. + + BIND + Die Taste auf Ihrer Tastatur/Ihrem Joystick (bzw. die Joystick-Achse), die + dem EVENT (Taste/Funktion) durch SDL zugewiesen wird. + + mod1,2,3 + Zusatztasten: die Tasten, die zusammen mit BIND gedrĂźckt werden mĂźssen. + mod1=Strg, mod2=Alt. Diese werden i.A. nur gebraucht, wenn die DOSBox- + Sondertasten geändert werden sollen. + + Add + Dem EVENT ein neues BIND zuweisen, also: eine Taste (oder einen Joystick- + Knopf usw.) in DOSBox mit einem EVENT belegen. + + Del + Den BIND des EVENTs lĂśschen. Wenn ein EVENT keine BINDs hat, ist die Taste + in DOSBox nicht belegt. Die entsprechende Taste/der Knopf hat also keine + Funktion. + + Next + Den nächsten BIND eines EVENTs anzeigen. + + +Beispiele fĂźr die Tastaturbelegung: + + 1. Das X auf Ihrer Tastatur soll in DOSBox ein U ausgeben: + Mit der Maus auf das U im Keymapper klicken. "Add" anklicken. Die X-Taste + auf der Tastatur drĂźcken. + 2. Wenn Sie jetzt ein paarmal auf "Next" klicken, werden Sie bemerken, dass + das U auf Ihrer Tastatur auch in DOSBox ein U ausgibt. + Wählen Sie also erneut U aus und klicken sie solange auf "Next", bis Sie + das U auf Ihrer Tastatur haben. Klcken Sie jetzt auf "Del". + 3. Wenn Sie in der DOSBox-Shell jetzt probeweise X drĂźcken, wird ein "UX" + ausgegeben. + Das X auf Ihrer Tastatur ist noch immer mit X belegt. Klicken Sie im + Keymapper auf das X und suchen Sie mit "Next", bis Sie die Belegung X + gefunden haben. Klicken Sie auf "Del". + + +Beispiele fĂźr die Joystick-Tastenbelegung: + + Es ist ein Joystick angeschlossen, der durch DOSBox einwandfrei erkannt + wird, und Sie mĂśchten damit ein Spiel steuern, dass normalerweise nur die + Tastatur erkennt (wir nehmen an, das Spiel wird Ăźber die Richtungstasten + gesteuert): + 1. Starten Sie den Keymapper und klicken Sie auf eine der Pfeiltasten im + mittleren linken Bereich des Fensters (direkt Ăźber den Mod1/Mod2-Tasten). + Als EVENT sollte "key_left" angegeben sein. Klicken Sie auf "Add" und + bewegen Sie das Achsenkreuz des Joysticks nach links. Jetzt sollte dem + BIND der Event zugewiesen worden sein. + 2. Wiederholen Sie das Obengenannte fĂźr die drei anderen Richtungen; + zusätzlich kĂśnnen die Joystick-KnĂśpfe anderen Events zugewiesen werden, + etwa den Funktionen "springen" oder "schießen". + 3. Klicken Sie auf "Save", dann auf "Exit" und starten Sie das Spiel, um + auszuprobieren, ob die Einstellungen erfolgreich waren. + + Die Y-Achse soll so geändert werden, dass eine Bewegung nach oben der nach + unten entspricht - und umgekehrt -, weil Sie damit besser zurechtkommen und + sich das Spiel selbst nicht entsprechend konfigurieren lässt: + 1. Starten Sie den Keymapper und klicken Sie auf "Y-" im Joystick-Bereich + oben rechts (falls Sie zwei Joysticks angeschlossen haben, stellen Sie + damit den ersten Joystick ein), oder im Joystick-Bereich weiter unten + (zweiter Joystick, oder - falls Sie nur einen angeschlossen haben - das + zweite Achsenkreuz des ersten Joysticks). + Also EVENT sollte jetzt angegeben sein: "jaxis_0_1-" (bzw. "jaxis_1_1-). + 2. Klicken Sie auf "Del", um die aktuelle VerknĂźpfung zu lĂśschen, klicken + Sie danach auf "Add" und bewegen Sie das Achsenkreuz des Joysticks nach + unten. Es sollte ein neuer Bind angelegt worden sein. + 3. Gehen Sie entsprechend fĂźr "Y+" vor, speichern Sie die Belegung ab und + probieren Sie es aus. + + +Wenn Sie die Einstellungen bearbeitet haben, kĂśnnen Sie die Änderungen +abspeichern, indem Sie auf "Save" klicken. DOSBox speichert die Belegungen am +in der Konfigurationsdatei angegebenen Ort ab ("mapperfile=mapper.txt"). + +Beim Start von DOSBox wird die Tastenbelegung geladen, sofern die angegebene +Datei vorhanden ist. + + + +================== +7. Tastaturlayouts +================== + + +Um das verwendete Tastaturlayout (den Tastaturcode) zu ändern, kann entweder +die Variable "keyboardlayout" im Abschnitt [dos] der Konfigurationsdatei +bearbeitet werden, oder Sie benutzen das interne Programm KEYB unter DOSBox. +Bei beiden MĂśglichkeiten kĂśnnen Sie DOS-konforme Sprachcodes (siehe unten) +verwenden, eine benutzerdefinierte Codeseite kann jedoch nur mit KEYB +ausgewählt werden. + + +Einstellen des Tastaturcodes + + DOSBox bringt bereits eine ganze Anzahl von voreingestellten Tastaturlayouts + und Codeseiten mit. Wenn das gewĂźnschte Layout dabei ist, muss es nur noch + in der Konfigurationsdatei oder Ăźber das Programm KEYB angegeben werden (zum + Beispiel "keyboardlayout=sv" in der Konfigurationsdatei oder "KEYB SV" + an der DOSBox-Eingabeaufforderung). + + Voreingestellte Tastaturcodes: + BG (Bulgarien) NL (Niederlande) + CZ243 (Tschechien) NO (Norwegen) + FR (Frankreich) PL (Polen) + GK (Griechenland) RU (Russland) + GR (Deutschland/Österreich) SK (Slowakei) + HR (Kroatien) SP (Spanien) + HU (Ungarn) SU (Finnland) + IT (Italien) SV (Schweden) + + Bestimmte Layouts (z.B. GK mit Codeseite 869 und RU mit Codeseite 808) + unterstĂźtzen kombinierte Layouts mit lateinischen und länderspezifischen + Zeichen, die durch die Tastenkombination LinksAlt-RechtsShift aktiviert, und + mit LinksAlt-LinksShift deaktiviert werden. + + +UnterstĂźtze Tastaturdefinitionsdateien + + Es werden sowohl die FreeDOS-Tastaturdefinitionsdateien mit der Endung "KL" + ("FreeDOS Keyb2 Keyboard Layoutfiles") als auch die aus allen verfĂźgbaren + FreeDOS-Tastaturdefinitionsdateien bestehenden Bibliotheken Keyboard.sys, + Keybrd2.sys und Keybrd3.sys unterstĂźtzt. Falls die in DOSBox integrierten + Layouts aus irgendwelchen GrĂźnden nicht funktionieren oder neuere verfĂźgbar + werden, finden Sie diese unter http://projects.freedos.net/keyb/ + + Ebenfalls verwendet werden kĂśnnen Dateien mit den Endungen CPI (DOS- + kompatible Codeseiten-Spezifikationen) und CPX- (mit UPX komprimierte + FreeDOS-Codeseiten-Dateien). DOSBox beinhaltet schon einige Codeseiten, so + dass es selten erforderlich ist, externe Codeseiten-Dateien zu verwenden. + Falls Sie eine andere - oder eigene - Codeseiten-Datei benutzen mĂśchten, + kopieren Sie diese in denselben Ordner wie die Konfigurationsdatei, so dass + DOSBox auf sie zugreifen kann. + + Zusätzliche Layouts kĂśnnen verwendet werden, indem Sie die entsprechende KL- + Datei in denselben Ordner wie die Konfigurationsdatei kopieren und den + Dateinamen (ohne Endung) als Tastaturcode verwenden. + FĂźr die Datei UZ.KL (das Tastaturlayout fĂźr Usbekistan) wĂźrden Sie also in + der Konfigurationsdatei "keyboardlayout=uz" angeben. + Die Verwendung von Bibliotheken wie Keybrd2.sys funktioniert ähnlich. + + +ANMERKUNG: Zwar kĂśnnen mit einem eingestellten Tastaturlayout Sonderzeichen +an der Kommandozeile getippt werden, jedoch werden Dateinamen aus solchen +Zeichen (Umlaute usw.) nicht unterstĂźtzt. Versuchen Sie, diese in DOSBox und +fĂźr Dateien, auf die DOSBox zugreifen kann/soll, zu vermeiden. + + + +========================================== +8. Mehrspieler mittels Nullmodem-Emulation +========================================== + + +DOSBox kann ein serielles Nullmodem-Kabel Ăźber Ihr Netzwerk oder das Internet +emulieren. + +Dieses muss zunächst im Abschnitt [serialports] in der Konfigurationsdatei +eingerichtet werden. Hierbei fungiert ein Rechner als Server, der andere als +Client. + +In der Konfigurationsdatei des Servers tragen Sie unter [serialports] +folgendes ein: + serial1=nullmodem + +Die entsprechende Eintragung beim Client: + serial1=nullmodem server:Adresse + "Adresse" bezeichnet die IP-Adresse oder den Host-Namen des Servers. + +Starten Sie jetzt das Spiel und wählen Sie als Mehrspieler-Methode an COM1: + + "Nullmodem", "Serial Cable", "already connected" + +Stellen Sie auf beiden Rechnern dieselbe Baudrate ein. + + +Es kĂśnnen weitere Parameter angegeben werden, um die Nullmodem-Verbindung +einzurichten: + + port + TCP-Port. Voreinstellung: 23 + + rxdelay + Wie lange sollen empfangene Daten bereitgehalten werden, wenn das + Interface nicht bereit ist (in Millisekunden)? + ErhĂśhen Sie diesen Wert, wenn das DOSBox-Status-Fenster wiederholt + die Meldung "overrun error" ausgibt. Voreinstellung: 100 + + txdelay + Wie lange sollen Daten gesammelt werden, bis ein Paket versendet wird? + Voreinstellung: 12 (kann die Netzwerk-Belastung reduzieren) + + server:Adresse + Diese Seite des Nullmodems agiert als Client. Wenn der Parameter fehlt, + agiert diese Seite als Server. + + transparent:1 + Nur serielle Daten senden, keine RTS/DTR-Kontrolle. Benutzen Sie diesen + Parameter, wenn zu etwas anderem als einem Nullmodem verbunden wird. + + telnet:1 + Telnet-Daten des anderen Rechners auswerten. + Parameter "transparent" wird automatisch gesetzt. + + usedtr:1 + Die Verbindung wird erst eingerichtet, wenn DTR vom DOS-Programm auf + "an" gestellt ist. Zur Verwendung mit Modem-Terminals. + Parameter "transparent" wird automatisch gesetzt. + + inhsocket:1 + Einen Socket verwenden, der DOSBox durch die Kommandozeile angegeben + wurde (um alte DOS-Spiele Ăźber neue Mailboxen spielen zu kĂśnnen). + Parameter "transparent" wird automatisch gesetzt. + + +Beispiel: + + Einen Client einrichten, der TCP-Port 5000 abhĂśrt: + serial1=nullmodem server:Adresse port:5000 rxdelay:1000 + + + +====================================== +9. Verbessern der Spielgeschwindigkeit +====================================== + + +DOSBox emuliert den Prozessor, Sound- und Grafikkarten und einiges anderes +mehr - und das alles gleichzeitig. Die Geschwindigkeit, mit der ein DOS- +Programm emuliert werden kann, hängt davon ab, wie viele Maschinenbefehle +innerhalb einer gegebenen Zeit emuliert werden kĂśnnen. Diese Zahl von +Prozessorzyklen oder "Cycles" kann in der Konfigurationsdatei eingestellt +werden (Abschnitt [cpu]). + + +Cycles + + Die Voreinstellung ("cycles=auto") weist DOSBox an, automatisch zu erkennen, + ob das Spiel bei hĂśchstmĂśglicher Geschwindigkeit (so viele Maschinenbefehle + wie mĂśglich) ausgefĂźhrt werden muss. Durch die Einstellung "cycles=max" + kann dieses Maximum auch zum Standard gemacht werden. In der Titelleiste des + DOSBox-Fensters wird dann der Text "Cpu Cycles: max" angezeigt. In diesem + Modus kĂśnnen Sie die Zahl der Cycles relativ zum Maximum (also in Prozent) + reduzieren (Strg-F11) oder wieder erhĂśhen (Strg-F12). + + Manchmal werden bessere Ergebnisse erreicht, wenn die Zahl der Cycles + manuell eingestellt wird, beispielsweise indem Sie "cycles=30000" angeben. + Bei einigen DOS-Programmen kĂśnnen Sie vielleicht sogar einen noch hĂśheren + Wert einstellen (Strg-F12), die Geschwindigkeit ihres Prozessors wird Ihnen + aber irgendwann Grenzen setzen. + Die CPU-Auslastung kann im Task-Manager (unter Windows 2000/XP) bzw. im + System-Monitor (Windows 98/Me) abgelesen werden. Sobald diese Auslastung + 100% erreicht hat, kann DOSBox nicht noch schneller werden, es sei denn, die + Rechenleistung, die DOSBox fĂźr Peripheriegeräte aufbringen muss, wird + reduziert. + + +Cores + + Wenn Ihr Rechner mit einem Intel-kompatiblen CPU (x86-Architektur) läuft, + kĂśnnen Sie versuchen, die Benutzung eines sich dynamisch rekompilierendieren + Kerns zu erzwingen (setzen Sie in der Konfigurationsdatei die Einstellung + "core=dynamic"). Sollte die automatische Erkennung ("core=auto") scheitern, + werden damit oft bessere Ergebnisse erreicht. Am besten benutzen Sie diese + Einstellung zusammen mit "cycles=max". Bitte beachten Sie aber, dass manche + Spiele mit dem dynamischen Kern unter Umständen schlechter oder sogar + Ăźberhaupt nicht laufen. + + +Grafik-Emulation + + Die Emulation der VGA-Grafik ist - was die Prozessorleistung angeht - ein + sehr anspruchsvoller Teil von DOSBox. DrĂźcken Sie Strg-F8, um die Zahl der + Ăźbersprungenen Frames (in Einserschritten) zu erhĂśhen. Wenn sie einen + statischen Cycles-Wert benutzen, sollte sich jetzt die Prozessorbelastung + reduzieren und der Cycles-Wert kann erhĂśht werden (Strg-F12). + Wiederholen Sie dies so lange, bis das Spiel schnell genug läuft. Beachten + Sie bitte, dass Sie hier nur einen Kompromiss aushandeln kĂśnnen: zwar steigt + die Geschwindigkeit, dafĂźr ist das Bild aber nicht mehr so flĂźssig. + + +Sound-Emulation + + Sie kĂśnnen auch versuchen, den Sound abzustellen (im Setup-Programm des + Spiels), um dadurch die Prozessorbelastung zu verringern. Bitte beachten + Sie, dass die Einstellung "nosound=true" nicht die Emulation der + Soundkarten unterbindet, sondern lediglich die Soundausgabe. + + +Versuchen Sie grundsärtlich, nur so wenige Hintergrundprozesse (oder andere +Programme) wie nĂśtig am Laufen zu haben, damit DOSBox mĂśglichst viele +Systemressourcen zur VerfĂźgung stehen. + + +Erweiterte Cycles-Konfiguration: + + Die Einstellungen "cycles=auto" und "cycles=max" kĂśnnen parametriesiert + werden, um unterschiedliche Voreinstellungen zu setzen: + + cycles=auto "Realmode-Standard" "Protected Mode-Standard"% + limit "Cycles-HĂśchstzahl" + cycles=max "Protected Mode-Standard"% limit "Cycles-HĂśchstzahl" + + Beispiel: cycles=auto 1000 80% limit 20000 + Benutzt "cycles=10000" im Real Mode sowie 80% CPU-Leistung und hĂśchstens + 20000 Cycles im Protected Mode. + + + +================== +10. Fehlerbehebung +================== + + +Wenn DOSBox direkt nach dem Start abstĂźrzt: + + - bearbeiten Sie die Konfigurationsdatei und probieren Sie verschiedene + Werte fĂźr die Variable "output" + - prĂźfen Sie, ob das Problem mit einem Update des Grafikkartentreibers + oder von DirectX behoben werden kann. + + +Wenn DOSBox bei bestimmten Spielen abstĂźrzt, sich schließt, oder sich mit +irgendwelchen Fehlermeldungen aufhängt: + + - probieren Sie, ob das Spiel mit einer frischen DOSBox-Installation + funktioniert (unbearbeitete Konfigurationsdatei); + - deaktivieren Sie den Sound (entweder Ăźber das Setup-Programm des Spiels + oder mit den Einstellungen "sbtype=none" und/oder "gus=false" in der + Konfigurationsdatei; + - versuchen Sie unterschiedliche Einstellungen in der Konfigurationsdatei, + insbesondere folgende (u.U. auch eine Kombination davon): + core=normal + statischer Cylces-Wert (z.B. "cycles=10000") + ems=false + xms=false + - fĂźhren Sie vor dem Spiel das interne Programm LOADFIX aus. + + +Wenn DOSBox das Programm anscheinend lädt, dann aber mit einer Fehlermeldung +zur Eingabeaufforderung zurĂźckkehrt: + + - lesen Sie die Fehlermeldung und versuchen Sie, den Fehler abzustellen; + - gehen Sie wie beim o.g. Fehler vor; + - versuchen Sie, das Spieleverzeichnis in einen anderen Ordner oder ein + anderes Laufwerk einzubinden; manche Spiele lassen sich nur von bestimmten + Pfaden aus starten; versuchen Sie z.B. statt "MOUNT D D:\GAMES\EARTH" + den Befehl "MOUNT C D:\GAMES\EARTH" oder auch "MOUNT C D:\GAMES"; + - falls das Spiel eine eingelegte CD-ROM erwartet, stellen Sie sicher, dass + Sie diese mit dem Parameter "-T cdrom" eingebunden haben und versuchen Sie + auch zusätzliche Parameter (-IOCTL, -USECD, -LABEL; siehe den + entsprechenden Abschnitt); + - prĂźfen Sie, ob das Spiel auf alle Dateien zugreifen kann (Attribut + "schreibgeschĂźtzt" entfernen, andere Programme schließen, die eventuell + auf die Dateien zugreifen usw.); + - versuchen Sie, das Spiel innerhalb von DOSBox neu zu installieren. + + + +=========================== +11. Die Konfigurationsdatei +=========================== + + +Eine Konfigurationsdatei kann mithilfe von CONFIG.COM erstellt werden, das +beim Start von DOSBox auf dem internen Z-Laufwerk liegt. Nähere Informationen +zur Syntax von CONFIG finden Sie im Abschnitt "Interne Befehle/Programme" +dieser README. +Sie kĂśnnen die Konfigurationsdatei mit einem Text-Editor bearbeiten, um DOSBox +Ihren BedĂźrfnisse anzupassen. + +Die Datei besteht aus verschiedenen, durch eckige Klammern gekennzeichneten +Abschnitten. In einigen Abschnitten kĂśnnen Sie Optionen (Werte) setzen/ändern. +Kommentarzeilen sind durch die Zeichen "#" oder "%" gekennzeichnet. +Die generierte Konfigurationsdatei beinhaltet die aktuellen Einstellungen. Sie +kĂśnnen diese ändern und DOSBox mit dem Parameter "-CONF Datei" starten, um die +Datei zu laden und die neuen Einstellungen zu benutzen. + +Zuerst verarbeitet DOSBox die in "~/.dosboxrc" (Linux), bzw. "~\dosbox.conf" +(Windows) oder "~/Library/Preferences/DOSBox Preferences" (MacOS X) +gewählten Einstellungen. Danach verarbeitet DOSBox alle Konfigurationsdateien, +die durch den Parameter "-CONF" angegeben wurden. Falls keine angegeben wurde, +wird im aktuellen Verzeichnis nach dosbox.conf gesucht. + + + +=================== +12. Die Sprachdatei +=================== + + +Eine Sprachdatei kann mithilfe von CONFIG.COM erstellt werden. +Lesen Sie diese, und Sie werden mit hoher Wahrscheinlichkeit verstehen, wie +man Sie anpasst. + +Um Ihre neue Sprachdatei zu verwenden, starten Sie DOSBox mit dem Parameter +"-LANG Datei", alternativ kĂśnnen Sie den Dateinamen auch im entsprechenden +Abschnitt [dosbox] in der Konfigurationsdatei eintragen ("language=Datei"). + + + +============================================ +13. Eine eigene Version von DOSBox erstellen +============================================ + + +Laden Sie sich den Source-Code herunter und folgen Sie den Anweisungen in der +im Paket enthaltenen Datei INSTALL. + + + +================ +14. Danksagungen +================ + + +Danksagungen der Entwickler finden Sie in der Datei THANKS. + + + +====================== +15. Kontaktinformation +====================== + + +E-Mail-Adressen der Entwickler finden Sie unter auf der Crew-Page unter: +http://dosbox.sourceforge.net diff -Nru dosbox-staging-0.76.0/contrib/old-translations/de/version.txt dosbox-staging-0.77.0/contrib/old-translations/de/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/de/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/de/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +German 0.74 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/es/MANUAL.txt dosbox-staging-0.77.0/contrib/old-translations/es/MANUAL.txt --- dosbox-staging-0.76.0/contrib/old-translations/es/MANUAL.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/es/MANUAL.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1542 @@ +ďťżManual de DOSBox v0.74 (siempre use la Ăşltima versiĂłn en www.dosbox.com) + + + +===== +NOTA: +===== + +Aunque esperamos que algĂşn dĂ­a DOSBox ejecute todos los programas hechos para +Computadoras Personales, todavĂ­a no estamos en ese punto. +Actualmente, DOSBox corriendo en una mĂĄquina de gama alta serĂĄ aproximadamente +el equivalente a una computadora Pentium I. DOSBox se puede configurar para +correr un amplio rango de juegos DOS, desde clĂĄsicos CGA/Tandy/PCjr hasta los +juegos de la era del Quake. + + + +======= +ÍNDICE: +======= + +1. Inicio rĂĄpido +2. Inicio (Preguntas Frecuentes) +3. ParĂĄmetros de la LĂ­nea de Comandos +4. Programas Internos +5. Teclas Especiales +6. Joystick/Gamepad +7. Asignador de Teclas +8. DisposiciĂłn del Teclado +9. FunciĂłn Multijugador por Serie +10. CĂłmo acelerar/ralentizar DOSBox +11. SoluciĂłn de problemas +12. Ventana de Estado de DOSBox +13. El archivo de configuraciĂłn (opciones) +14. El archivo de idioma +15. Compilando su propia versiĂłn de DOSBox +16. Agradecimientos especiales +17. Contacto + + + +================= +1. Inicio rĂĄpido: +================= + +Escriba INTRO en DOSBox para una guĂ­a rĂĄpida. +Es fundamental que se familiarice con la idea de montar, DOSBox no hace +cualquier unidad (o parte de ella) accesible a la emulaciĂłn automĂĄticamente. +Vea la entrada "ÂżCĂłmo empezar?" de las Preguntas Frecuentes, asĂ­ como la +descripciĂłn del comando MOUNT (SecciĂłn 4: "Programas Internos"). Si tiene su +juego en un cdrom puede probar esta guĂ­a: +http://vogons.zetafleet.com/viewtopic.php?t=8933 + + + +================================= +2. Inicio (Preguntas Frecuentes): +================================= + +INICIO: ÂżCĂłmo empezar? +AUTOMATIZACIÓN: ÂżTengo que escribir siempre estos comandos "mount"? +PANTALLA: ÂżCĂłmo cambio a pantalla completa? +CD-ROM: Mi CD-ROM no funciona. +CD-ROM: El juego/aplicaciĂłn no puede encontrar su CD-ROM. +RATÓN: El ratĂłn no funciona. +SONIDO: No hay sonido. +SONIDO: ÂżQuĂŠ hardware de sonido emula DOSBox actualmente? +SONIDO: El sonido se entrecorta o suena deformado/raro. +TECLADO: No puedo escribir \ o : DOSBox. +TECLADO: No funcionan las teclas MayĂşsculas Derecho ni "\" en DOSBox. + (sĂłlo Windows) +TECLADO: El teclado se retrasa. +CONTROL: ÂĄEl personaje/cursor/puntero siempre se mueve en una direcciĂłn! +VELOCIDAD: ÂĄEl juego/aplicaciĂłn funciona muy lento/muy rĂĄpido! +ERROR: ÂĄEl juego/aplicaciĂłn no funciona/falla! +ERROR: ÂĄDOSBox falla al iniciarse! +JUEGO: Mi juego con motor Build (Duke3D/Blood/Shadow Warrior) tiene + problemas. +SEGURIDAD: ÂżPuede DOSBox daĂąar mi computadora? +OPCIONES: Me gustarĂ­a cambiar las opciones de DOSBox. +AYUDA: Gran manual, pero aĂşn no lo entiendo. + + + +INICIO: ÂżCĂłmo empezar? + Al principio tiene una Z:\> en lugar de una C:\> como sĂ­mbolo del sistema. + Tiene que hacer que sus directorios estĂŠn disponibles como unidades en + DOSBox usando el comando "mount". Por ejemplo, en Windows "mount C + D:\JUEGOS" le darĂĄ una unidad C en DOSBox que apunta a su directorio + D:\JUEGOS de Windows (que fue creado anteriormente). En Linux, "mount c + /home/usuario" le darĂĄ una unidad C dentro de DOSBox que apunta a + /home/usuario en Linux. + Para cambiar a la unidad montada en el ejemplo, escriba "C:". Si todo saliĂł + bien, DOSBox mostrarĂĄ el sĂ­mbolo del sistema "C:\>". + + +AUTOMATIZACIÓN: ÂżTengo que escribir siempre estos comandos? + En el archivo de configuraciĂłn de DOSBox hay una secciĂłn [autoexec]. Los + comandos que estĂĄn ahĂ­ son ejecutados cuando DOSBox arranca, asĂ­ que puede + usar esta secciĂłn para el montado. Vea SecciĂłn 13: "El archivo de + configuraciĂłn (opciones)". + + +PANTALLA: ÂżCĂłmo cambio a pantalla completa? + Pulse alt-intro. Alternativamente: Edite el archivo de configuraciĂłn de + DOSBox y cambie la opciĂłn fullscreen=false por fullscreen=true. Si el modo + a pantalla completa se ve mal para usted: Juegue con las opciones: + fullresolution, output y aspect en el archivo de configuraciĂłn de DOSBox. + Para regresar del modo a pantalla completa: Pulse alt-intro de nuevo. + + +CD-ROM: Mi CD-ROM no funciona. + Para montar su CD-ROM en DOSBox debe especificar algunas opciones + adicionales al montarlo. + Para habilitar el soporte de CD-ROM (incluye MSCDEX) en Windows: + - mount d f:\ -t cdrom + en Linux: + - mount d /media/cdrom -t cdrom + + En algunos casos querrĂĄ usar una interfaz de CD-ROM diferente, por ejemplo + si su CD de audio no funciona: + Para habilitar soporte de SDL (ÂĄno incluye acceso a CD de bajo nivel!): + - mount d f:\ -t cdrom -usecd 0 -noioctl + Para habilitar acceso ioctl usando extracciĂłn digital de audio para CD de + audio (sĂłlo Windows, Ăştil para Vista): + - mount d f:\ -t cdrom -ioctl_dx + Para habilitar acceso ioctl usando MCI para CD de audio (sĂłlo Windows): + - mount d f:\ -t cdrom -ioctl_mci + Para forzar acceso sĂłlo por ioctl (sĂłlo Windows): + - mount d f:\ -t cdrom -ioctl_dio + Para habilitar soporte de bajo nivel ASPI (Win98 con capa ASPI instalada): + - mount d f:\ -t cdrom -aspi + + explicaciĂłn: - d letra de unidad que obtendrĂĄ en DOSBox (ÂĄd es la mejor, + no la cambie!) + - f:\ ubicaciĂłn del CD-ROM en su computadora. En la mayorĂ­a de + los casos serĂĄ d:\ o e:\ + - 0 el nĂşmero de la unidad de CD-ROM, devuelto por + "mount -cd" (observe que este valor sĂłlo es necesario + si usa SDL para CD de audio, en caso contrario es + ignorado) + Mire tambiĂŠn la siguiente pregunta: El juego/aplicaciĂłn no puede encontrar + su CD-ROM. + + +CD-ROM: El juego/aplicaciĂłn no puede encontrar su CD-ROM. + AsegĂşrese de montar el CD-ROM con el argumento -t cdrom, esto habilitarĂĄ + la interfaz MSCDEX requerida por los juegos de DOS que usan CD-ROM. Pruebe + tambiĂŠn aĂąadiendo la etiqueta correcta (-label ETIQUETA) al comando mount, + donde ETIQUETA es el nombre (ID del volumen) del CD-ROM. + Bajo Windows puede especificar -ioctl, -aspi o -noioctl. Mire la + descripciĂłn del comando mount en la SecciĂłn 4: "Programas Internos" para + ver sus significados y las opciones adicionales relacionadas a los CD de + audio -ioctl_dx, -ioctl_mci, -ioctl_dio. + + Pruebe crear una imagen de CD-ROM (preferentemente par CUE/BIN) y use la + herramienta interna de DOSBox IMGMOUNT para montar la imagen (la hoja CUE). + Esto habilita un muy buen soporte de CD-ROM de bajo nivel en cualquier + sistema operativo. + + +RATÓN: El ratĂłn no funciona. + Normalmente, DOSBox detecta cuando un juego usa el ratĂłn. Al pulsar sobre + la pantalla deberĂ­a ser capturado (confinado a la ventana de DOSBox) y + funcionar. Con ciertos juegos la detecciĂłn de ratĂłn de DOSBox no funciona. + En ese caso deberĂĄ capturar el ratĂłn manualmente pulsando CTRL-F10. + + +SONIDO: No hay sonido. + AsegĂşrese de que el sonido estĂĄ configurado correctamente en el juego. Esto + puede hacerse durante la instalaciĂłn o con una utilidad que lo acompaĂąe. + Primero vea si provee una opciĂłn de auto-detecciĂłn. Si no hay ninguna + pruebe seleccionar SoundBlaster o SoundBlaster 16 con la configuraciĂłn por + defecto siendo "address=220 irq=7 dma=1" (a veces highdma=5). TambiĂŠn + podrĂ­a querer seleccionar Sound Canvas/SCC/MPU-401/General MIDI/Wave + Blaster con la configuraciĂłn "address=330 IRQ=2" como dispositivo de + sonido. + Los parĂĄmetros de las tarjetas de sonido emuladas se pueden cambiar en el + archivo de configuraciĂłn de DOSBox. + Si aĂşn no obtiene ningĂşn sonido establezca core en normal en la + configuraciĂłn de DOSBox y use un valor de ciclos fijos mĂĄs bajo (como + cycles=2000). TambiĂŠn asegĂşrese de que el sonido funcione correctamente en + su sistema operativo. + En ciertos casos puede ser Ăştil cambiar de dispositivo de sonido emulado a + alguno como una SoundBlaster Pro (sbtype=sbpro1 en el archivo de + configuraciĂłn de DOSBox) o la Gravis Ultrasound (gus=true). + + +SONIDO: ÂżQuĂŠ hardware de sonido emula DOSBox actualmente? + DOSBox emula varios dispositivos de sonido antiguos: + - Altavoz interno de la computadora + Esta emulaciĂłn incluye el generador de tonos y tambiĂŠn varias formas de + salida de sonido digital a travĂŠs del altavoz interno. + - Creative CMS/Gameblaster + La primera tarjeta lanzada por Creative Labs(R). La configuraciĂłn por + defecto la sitĂşa en el puerto 0x220. EstĂĄ deshabilitada por defecto. + - Voz Tandy 3 + La emulaciĂłn de este hardware de sonido es completa con la excepciĂłn del + canal de ruido. El canal de ruido no estĂĄ muy bien documentado, por lo + que la precisiĂłn del sonido es solo una aproximaciĂłn. EstĂĄ deshabilitada + por defecto. + - Tandy DAC + Algunos juegos pueden requerir desactivar la emulaciĂłn de SoundBlaster + (sbtype=none) para mejor soporte de sonido de Tandy DAC. No olvide dejar + sbtype como sb16 otra vez si no usa el sonido Tandy. + - Adlib + Esta emulaciĂłn es casi perfecta e incluye la capacidad de la Adlib de + reproducir sonido digitalizado casi por completo. Situada en el puerto + 220 (tambiĂŠn en el 388) + - SoundBlaster 16 / SoundBlaster Pro I y II / SoundBlaster I y II + Por defecto DOSBox provee sonido estĂŠreo de 16-bit para la SoundBlaster + 16. Puede seleccionar una versiĂłn distinta de SoundBlaster en la + configuraciĂłn de DOSBox. La mĂşsica AWE32 no es emulada ya que puede usar + MPU-401 en su lugar (vea a continuaciĂłn) + - Disney Sound Source y Covox Speech Thing + Usando el puerto de la impresora, este dispositivo de sonido solo produce + sonido digital. Situado en LPT1. + - Gravis Ultrasound + La emulaciĂłn de este dispositivo estĂĄ casi completa, a pesar de que se + han dejado de lado las capacidades MIDI, ya que un MPU-401 ha sido + emulado en otro cĂłdigo. Para la mĂşsica Gravis tambiĂŠn debe instalar los + controladores Gravis dentro de DOSBox. EstĂĄ deshabilitada por defecto. + - MPU-401 + TambiĂŠn es emulada una interfaz de pasarela MIDI. Este mĂŠtodo de salida + de sonido sĂłlo funcionarĂĄ cuando sea usado con un dispositivo/emulador + externo. Windows XP/Vista/7 y Mac OS tienen por defecto un emulador + compatible con: Sound Canvas/SCC/General Standard/General MIDI/Wave + Blaster. Un dispositivo/emulador distinto es necesario para la + compatibilidad con Roland LAPC/CM-32L/MT-32. + + +SONIDO: El sonido se entrecorta o suena deformado/raro. + Puede estar usando demasiada potencia de procesador para mantener a DOSBox + funcionando a la velocidad actual. Puede disminuir los ciclos, saltear + cuadros, reducir la frecuencia de muestreo del dispositivo de sonido + correspondiente o incrementar el pre-bĂşfer. Vea SecciĂłn 13: "El archivo de + configuraciĂłn (opciones)". + ÂĄSi estĂĄ usando 'cycles=max' o 'cycles=auto', asegĂşrese que no haya + procesos en segundo plano interfiriendo! (especialmente si acceden al disco + duro). TambiĂŠn mire la SecciĂłn 10: "CĂłmo acelerar/ralentizar DOSBox", asĂ­ + como la SecciĂłn 11: "SoluciĂłn de problemas". + + +TECLADO: No puedo escribir \ o : en DOSBox. + Esto puede suceder en varios casos, por ejemplo si la disposiciĂłn del + teclado de su sistema operativo anfitriĂłn no tiene una disposiciĂłn DOS que + le corresponda (o no fue detectada correctamente), o la asignaciĂłn de teclas + es incorrecta. + Algunas soluciones posibles: + 1. Use / en lugar de \, o ALT-58 para : y ALT-92 para \. + 2. Cambie la disposiciĂłn del teclado de DOS (vea SecciĂłn 8: "DisposiciĂłn + del Teclado"). + 3. AĂąada los comandos que quiera ejecutar a la secciĂłn [autoexec] del + archivo de configuraciĂłn de DOSBox. + 4. Abra el archivo de configuraciĂłn de DOSBox y cambie la entrada + usescancodes. + 5. Cambie la disposiciĂłn del teclado de su sistema operativo. + + Observe que si la disposiciĂłn del anfitriĂłn no se puede identificar, o + keyboardlayout estĂĄ establecido en none en el archivo de configuraciĂłn de + DOSBox, la disposiciĂłn estĂĄndar de Estados Unidos es usada. En esta + configuraciĂłn pruebe las teclas alrededor de "intro" para la \ (barra + invertida), y para : (dos puntos) use la tecla mayĂşsculas y las teclas + entre "intro" y "L". En el caso de la disposiciĂłn espaĂąola la "\" se forma + pulsando "Ç", y ":" pulsando MAY+"Ñ". + + +TECLADO: No funcionan las teclas MayĂşsculas Derecho ni "\" en DOSBox. (sĂłlo +Windows) + Esto puede suceder si Windows piensa que tiene mĂĄs de un teclado conectado + a su PC cuando usa algunos dispositivos de control remoto. Para verificar + este problema ejecute cmd.exe, navegue hasta la carpeta del programa DOSBox + y escriba: + set sdl_videodriver=windib + dosbox.exe + Verifique si el teclado comenzĂł a andar correctamente. Como windib es mĂĄs + lento lo mejor es usar una de las dos soluciones provistas acĂĄ: + http://vogons.zetafleet.com/viewtopic.php?t=24072 + + +TECLADO: El teclado se retrasa. + Disminuya la prioridad en el archivo de configuraciĂłn de DOSBox, por + ejemplo dĂŠjela en "priority=normal,normal". TambiĂŠn querrĂĄ probar bajar los + ciclos (use una cantidad fija de ciclos para empezar, como cycles=10000). + + +CONTROL: ÂĄEl personaje/cursor/puntero siempre se mueve en una direcciĂłn! + Vea si esto aĂşn sucede si deshabilita la emulaciĂłn de joystick, establezca + joysticktype=none en la secciĂłn [joystick] en su archivo de configuraciĂłn + de DOSBox. TambiĂŠn quizĂĄs deba probar desconectando cualquier + joystick/gamepad. Si quiere usar el joystick en el juego, pruebe poniendo + timed=false y asegĂşrese de calibrar el joystick (en su SO asĂ­ como en el + juego o el programa de instalaciĂłn del juego). + + +VELOCIDAD: ÂĄEl juego/aplicaciĂłn funciona muy lento/muy rĂĄpido! + Vea SecciĂłn 10: "CĂłmo acelerar/ralentizar DOSBox" para mĂĄs informaciĂłn. + + +ERROR: ÂĄEl juego/aplicaciĂłn no funciona/falla! + Vea SecciĂłn 11: "SoluciĂłn de problemas". + + +ERROR: ÂĄDOSBox falla al iniciarse! + Vea SecciĂłn 11: "SoluciĂłn de problemas". + + +JUEGO: Mi juego con motor Build (Duke3D/Blood/Shadow Warrior) tiene problemas. + Antes que nada, intente ver si el juego ha sido portado. Esto le ofrecerĂĄ + una mejor experiencia. Para solucionar el problema de grĂĄficos que ocurre + en DOSBox en resoluciones mĂĄs altas: Abra el archivo de configuraciĂłn de + DOSBox y busque machine=svga_s3. Cambie svga_s3 por vesa_nolfb. Cambie + memsize=16 por memsize=63 + + +SEGURIDAD: ÂżPuede DOSBox daĂąar mi computadora? + DOSBox no puede daĂąar mĂĄs su computadora que cualquier otro programa que + demande recursos. El incrementar los ciclos de DOSBox no lo hace en su + procesador real. Establecer los ciclos muy altos tiene un efecto negativo + en el rendimiento del software que corre dentro de DOSBox. + + +OPCIONES: Me gustarĂ­a cambiar las opciones de DOSBox. + Vea SecciĂłn 13: "El archivo de configuraciĂłn (opciones)". + + +AYUDA: Gran manual, pero aĂşn no lo entiendo. + Para mĂĄs preguntas lea el resto de este Manual. TambiĂŠn puede mirar: + las guĂ­as situadas en http://vogons.zetafleet.com/viewforum.php?f=39 + la wiki de DOSBox: http://www.dosbox.com/wiki/ + el sitio/foro: http://www.dosbox.com + + + +======================================= +3. ParĂĄmetros de la LĂ­nea de Comandos: +======================================= + +Un vistazo a las opciones de la lĂ­nea de comandos que puede dar a DOSBox. +Aunque en la mayorĂ­a de los casos en su lugar es mĂĄs fĂĄcil usar el archivo de +configuraciĂłn de DOSBox. +Vea SecciĂłn 13: "El archivo de configuraciĂłn (opciones)". + +Para poder usar los ParĂĄmetros de la LĂ­nea de Comandos: +(Windows) abra cmd.exe o command.com o edite el acceso directo a dosbox.exe +(Linux) use la consola +(Mac OS X) inicie terminal.app y navegue a: + /applications/dosbox.app/contents/macos/dosbox + +Las opciones son vĂĄlidas para todos los sistemas operativos a no ser que se +diga lo contrario en la descripciĂłn de la opciĂłn: + +dosbox [nombre] [-exit] [-c comando] [-fullscreen] [-userconf] + [-conf archivo-configuraciĂłn] [-lang archivo-lenguaje] + [-machine tipo-de-mĂĄquina] [-noconsole] [-startmapper] [-noautoexec] + [-securemode] [-scaler escalador | -forcescaler escalador] [-version] + [-socket zĂłcalo] + +dosbox -version +dosbox -editconf programa +dosbox -opencaptures programa +dosbox -printconf +dosbox -eraseconf +dosbox -erasemapper + + nombre + Si "nombre" es un directorio se montarĂĄ como la unidad C:. + Si "nombre" es un ejecutable se montarĂĄ su directorio como la unidad C: + y se ejecutarĂĄ "nombre". + + -exit + DOSBox se cerrarĂĄ cuando la aplicaciĂłn "nombre" finalice. + + -c comando + Ejecuta el comando especificado antes de ejecutar "nombre". Pueden ser + especificados varios comandos, aunque cada uno deberĂ­a empezar con + "-c". Un comando puede ser: un Programa Interno, un comando DOS o un + ejecutable en una unidad montada. + + -fullscreen + Inicia DOSBox en modo de pantalla completa. + + -userconf + Iniciar DOSBox con el archivo de configuraciĂłn del usuario especĂ­fico. + Se puede usar junto a mĂşltiples parĂĄmetros -conf, pero -userconf + siempre serĂĄ cargado antes que ellos. + + -conf archivo-configuraciĂłn + Iniciar DOSBox con las opciones definidas en + "archivo-configuraciĂłn". Puede haber mĂşltiples opciones -conf. + Vea SecciĂłn 13: "El archivo de configuraciĂłn (opciones)" para mĂĄs + detalles. + + -lang archivo-lenguaje + Inicia DOSBox usando el lenguaje especificado en "archivo-lenguaje". + Vea SecciĂłn 14: "El archivo de idioma" para mĂĄs detalles. + + -machine tipo-de-mĂĄquina + Configura a DOSBox para emular un tipo especĂ­fico de mĂĄquina. Opciones + vĂĄlidas son: hercules, cga, ega, pcjr, tandy, svga_s3 (por defecto) asĂ­ + como los chipsets SVGA adicionales listados en el archivo de + configuraciĂłn de DOSBox. svga_s3 tambiĂŠn habilita la emulaciĂłn VESA. + Se puede usar el tipo de mĂĄquina vgaonly para algunos efectos + especiales VGA, pero eso deshabilita las capacidades de SVGA y puede + ser mĂĄs lento debido a la mayor precisiĂłn de emulaciĂłn. + El tipo de mĂĄquina afecta a la tarjeta de video y a las tarjetas de + sonido disponibles. + + -noconsole (SĂłlo Windows) + Inicia DOSBox sin mostrar la Ventana de Estado de DOSBox (consola). La + salida serĂĄ redirigida a stdout.txt y stderr.txt. + + -startmapper + Entra al asignador de teclas directamente al iniciar. Útil para la + gente con problemas con el teclado. + + -noautoexec + Ignora la secciĂłn [autoexec] del archivo de configuraciĂłn cargado. + + -securemode + Lo mismo que -noautoexec, pero agrega config.com -securemode al final + de AUTOEXEC.BAT (lo cual deshabilita cualquier cambio de cĂłmo son + montadas las unidades dentro de DOSBox). + + -scaler escalador + Usa el escalador especificado por "escalador". Vea en el archivo de + configuraciĂłn de DOSBox los escaladores disponibles. + + -forcescaler escalador + Similar al parĂĄmetro -scaler, pero intenta forzar el uso del escalador + especificado aĂşn si pudiera no ser adecuado. + + -version + muestra informaciĂłn de la versiĂłn y sale. Útil para los front-ends. + + -editconf programa + llama al programa con el archivo de configuraciĂłn como primer + parĂĄmetro. En este caso llamarĂĄ al segundo programa si el primero + no logra iniciarse. + + -opencaptures programa + llama al programa con la ubicaciĂłn de la carpeta de capturas como + primer parĂĄmetro. + + -printconf + imprime la ubicaciĂłn del archivo de configuraciĂłn por defecto. + + -resetconf + borra el archivo de configuraciĂłn por defecto. + + -resetmapper + borra el archivo de asignaciĂłn de teclas usado por el archivo de + configuraciĂłn limpio por defecto. + + -socket + le pasa el nĂşmero de zĂłcalo a la emulaciĂłn de nullmodem. Vea SecciĂłn 9: + "CaracterĂ­stica Multijugador por Serie." + +Nota: Si un nombre/comando/archivo-configuraciĂłn/archivo-idioma contiene un + espacio, escrĂ­balo entre comillas ("comando o nombre de archivo"). Si + Si necesita usar comillas dentro de comillas (lo mĂĄs probable que lo + necesite con -c y mount): + Los usuarios de Windows y OS/2 pueden usar comillas simples dentro de + comillas dobles. + El resto deberĂ­a poder escapar de las comillas dobles dentro de comillas + dobles. + Windows: -c "mount c 'c:\Mi carpeta con juegos de DOS'" + Linux: -c "mount c \"/tmp/nombre con espacio\"" + +Un ejemplo medio inusual, sĂłlo para demostrar lo que puede hacer (en Windows): +dosbox D:\carpeta\archivo.exe -c "MOUNT Y H:\MiCarpeta" + Esto monta D:\carpeta como C:\ y ejecuta archivo.exe. + Antes de hacerlo monta H:\MyFolder como la unidad Y. + +En Windows tambiĂŠn puede arrastrar directorios/archivos sobre el ejecutable de +DOSBox. + + + +====================== +4. Programas Internos: +====================== + +DOSBox soporta la mayorĂ­a de los comandos de DOS que se encuentran en +command.com. Para obtener una lista de los comandos internos escriba "HELP" +en la lĂ­nea de comandos. + +AdemĂĄs, estĂĄn disponibles los siguientes comandos: + +MOUNT "Letra de la Unidad Emulada" "Unidad o Directorio Real" + [-t tipo] [-aspi] [-ioctl] [-noioctl] [-usecd nĂşmero] [-size tamaĂąo] + [-label etiqueta] [-freesize tamaĂąo_en_mb] + [-freesize tamaĂąo_en_kb (disquetes)] +MOUNT -cd +MOUNT -u "Letra de la Unidad Emulada" + + Programa para montar directorios locales como unidades dentro de DOSBox. + + "Letra de la Unidad Emulada" + La letra de la unidad dentro de DOSBox (por ejemplo, C). + + "Letra de Unidad (generalmente para CD-ROM en Windows) o Directorio Real" + El directorio local al que quiere tener acceso dentro de DOSBox. + + -t tipo + Tipo del directorio montado. + Los soportados son: dir (por defecto), floppy, cdrom. + + -size tamaĂąo + (sĂłlo para expertos) + Establece el tamaĂąo de la unidad, donde tamaĂąo es de la forma + "bps, spc, clt, cll": + bps: bytes por sector, por defecto 512 para discos comunes y 2048 + para unidades de CD-ROM + spc: sectores por clĂşster, generalmente entre 1 y 127 + clt: clĂşsteres totales, entre 1 y 65534 + cll: clĂşsteres libres totales, entre 1 y clt + + -freesize tamaĂąo_en_mb | tamaĂąo_en_kb + Establece la cantidad de espacio libre disponible en la unidad en + megabytes (discos comunes) o kilobytes (disquetes). + Es una versiĂłn mĂĄs simple de -size. + + -label etiqueta + Establece el nombre de la unidad a "etiqueta". Es necesario en algunos + sistemas si la etiqueta del CD-ROM no es leĂ­da correctamente (Ăştil cuando + un programa no puede encontrar su CD-ROM). Si no especifica una + etiqueta y no se selecciona ningĂşn soporte de bajo nivel (o sea si se + omite el parĂĄmetro -usecd # y/o -aspi, o si se especifica -noiotcl): + En Windows: la etiqueta es extraĂ­da de "Unidad Real". + En Linux: la etiqueta se establece en NO_LABEL. + + Si especifica una etiqueta, ĂŠsta se mantendrĂĄ mientras la unidad estĂŠ + montada. ÂĄNo se actualizarĂĄ! + + -aspi + Fuerza el uso de la capa ASPI. SĂłlo es vĂĄlido al montar un CD-ROM bajo + sistemas Windows con una capa ASPI. + + -ioctl (selecciĂłn automĂĄtica de la interfaz de CD de audio) + -ioctl_dx (extracciĂłn digital de audio usada para CD de audio) + -ioctl_dio (llamadas ioctl usadas para CD de audio) + -ioctl_mci (MCI usado para CD de audio) + Fuerza el uso de comandos IOCTL. SĂłlo es vĂĄlido al montar un CD-ROM + bajo un SO Windows que los soporte (Win2000/XP/NT). + Las opciones sĂłlo difieren entre sĂ­ por el modo en el que se maneja el + CD de audio, preferentemente es usado -ioctl_dio (tiene la carga de + trabajo mĂĄs baja), pero esto puede no funcionar en todos los + sistemas, asĂ­ que se puede usar -ioctl_dx (o -ioctk_mci). + + -noioctl + Fuerza el uso de una capa de CD-ROM SDL. VĂĄlido en todos los sistemas. + + -usecd nĂşmero + VĂĄlido en todos los sistemas, bajo Windows el argumento -noioctl tiene + que estar presente para poder usar el argumento -usecd. + Permite seleccionar la unidad que deberĂ­a ser usada por SDL. Use esto + si se monta la unidad de CD-ROM incorrecta cuando usa la interfaz de + CD-ROM SDL. "nĂşmero" es devuelto por "MOUNT -cd" + + -cd + Muestra todas las unidades de CD-ROM detectadas por SDL y sus nĂşmeros. + Vea la informaciĂłn de la entrada -usecd arriba. + + -u + Desmonta la unidad. No funciona con Z:\. + + Nota: Es posible montar un directorio local como unidad de CD-ROM, pero en + ese caso no hay soporte de hardware. + + BĂĄsicamente, MOUNT le permite conectar hardware real a la PC emulada en + DOSBox. AsĂ­, MOUNT C C:\JUEGOS le dice a DOSBox que use el directorio + C:\JUEGOS como unidad C: en DOSBox. MOUNT C E:\AlgunaCarpeta le dice a DOSBox + que use el directorio E:\AlgunaCarpeta como unidad C: en DOSBox. + + ÂĄNO es recomendable montar la unidad C: entera con MOUNT C C:\! Lo mismo se + aplica a la raĂ­z de cualquier otra unidad, excepto CD-ROM (debido a su + naturaleza de sĂłlo-lectura). + En caso contrario, si usted o DOSBox comete un error puede perder todos sus + archivos. Tampoco monte nunca una carpeta "Windows" o "Archivos de Programa" + o sus subcarpetas en Windows Vista/7 ya que DOSBox puede no funcionar + correctamente, o dejarĂĄ de hacerlo luego. Es recomendable que mantenga todas + sus aplicaciones/juegos de dos en una carpeta sencilla (por ejemplo + c:\juegosdos) y montarla. + + Siempre deberĂ­a instalar su juego dentro de DOSBox. + De este modo si tiene el juego en CD siempre tendrĂĄ que montar ambos: la + carpeta como disco duro y el CD-ROM (ÂĄincluso despuĂŠs de la instalaciĂłn!) + Disco Duro siempre se deberĂ­a montar como c + CD-ROM siempre se deberĂ­a montar como d + Disquete siempre se deberĂ­a montar como a (o b) + + + Ejemplos bĂĄsicos de MOUNT para uso normal (Windows): + + 1. Para montar una carpeta como una unidad de disco duro: + mount c d:\juegosdos + + 3. Para montar su unidad de CD-ROM E como unidad de CD-ROM D en DOSBox: + mount d e:\ -t cdrom + + 2. Para montar su unidad a: como disquete: + mount a a:\ -t floppy + + Ejemplos avanzados de MOUNT (Windows): + + 4. Para montar una unidad de disco duro con ~870 MB de espacio libre + (versiĂłn simple): + mount c d:\juegosdos -freesize 870 + + 5. Para montar una unidad con ~870 MB de espacio libre (sĂłlo expertos, + control total) + mount c d:\juegosdos -size 512,127,16513,13500 + + 1. Para montar c:\juegosdos\floppy como un disquete: + mount a c:\juegosdos\floppy -t floppy + + + Otros ejemplos de MOUNT: + + 3. Para montar la unidad de CD-ROM del sistema en el punto de montaje + /media/cdrom como unidad de CD-ROM D en DOSBox: + mount d /media/cdrom -t cdrom -usecd 0 + + 6. Para montar /home/usuario/juegosdos como unidad C en DOSBox: + mount c /home/usuario/juegosdos + + 7. Para montar el directorio donde DOSBox fue iniciado como C en DOSBox: + mount c . + (observe el . que representa el directorio donde DOSBox fue iniciado, + en Windows Vista/7 no use esto si instalĂł DOSBox en la carpeta + "Archivos de Programa") + + Si tambiĂŠn quiere montar una imagen de CD o disquete, vea IMGMOUNT. MOUNT + tambiĂŠn funciona con imĂĄgenes pero sĂłlo si usa programas externos, por + ejemplo (ambos son gratuitos): + - Daemon Tools Lite (para imĂĄgenes de CD), + - Virtual Floppy Drive (para imĂĄgenes de disquete) + Aunque IMGMOUNT puede brindar mejor compatibilidad + + +MEM + Programa para mostrar la cantidad y tipo de memoria libre. + + +VER +VER set versiĂłn_principal [subversiĂłn] + Muestra la versiĂłn actual de DOSBox y la versiĂłn de DOS reportada (uso sin + parĂĄmetros) + Cambie la versiĂłn de DOS reportada con el parĂĄmetro "set", por ejemplo: + "VER set 6 22" para hacer que DOSBox reporte DOS 6.22 como nĂşmero de versiĂłn. + + +CONFIG -writeconf ubicaciĂłn-archivo +CONFIG -writelang ubicaciĂłn-archivo +CONFIG -securemode +CONFIG -set "secciĂłn propiedad=valor" +CONFIG -get "secciĂłn propiedad" + + Se puede usar CONFIG para cambiar o averiguar varias opciones de DOSBox + durante su ejecuciĂłn. Puede guardar la configuraciĂłn actual y el texto del + idioma en disco. Se puede encontrar informaciĂłn de todas las secciones y + propiedades posibles en la SecciĂłn 13: "El archivo de configuraciĂłn + (opciones)". + + -writeconf ubicaciĂłn-archivo + Escribe la configuraciĂłn actual en un archivo en una ubicaciĂłn + especificada relativa al directorio de configuraciĂłn de DOSBox. Se pueden + indicar rutas relativas o absolutas. "ubicaciĂłn-archivo" estĂĄ situado en + el disco local, no una unidad montada en DOSBox. + + El archivo de configuraciĂłn controla diversas opciones de DOSBox: + la cantidad de memoria emulada, las tarjetas de sonido emuladas y muchas + otras cosas. TambiĂŠn permite el acceso a AUTOEXEC.BAT. Vea SecciĂłn13: "El + archivo de configuraciĂłn (opciones)" para mĂĄs informaciĂłn. + + -writelang ubicaciĂłn-archivo + Escribe el texto del idioma actual en un archivo en una ubicaciĂłn + especificada. "ubicaciĂłn-archivo" estĂĄ situado en el disco local, no en + una unidad montada en DOSBox. El archivo de idioma controla toda la salida + visible de los comandos internos y del DOS interno. + Vea SecciĂłn 14: "El archivo de idioma" para mĂĄs informaciĂłn. + + -securemode + Cambia DOSBox a un modo mĂĄs seguro. En este modo los comandos internos + MOUNT, IMGMOUNT y BOOT no funcionarĂĄn. Tampoco es posible crear un nuevo + archivo de configuraciĂłn o de idioma en este modo. + (Advertencia: sĂłlo puede deshacer este modo reiniciando DOSBox.) + + -set "secciĂłn propiedad=valor" + CONFIG tratarĂĄ de establecer la propiedad en un nuevo valor. + + -get "secciĂłn propiedad" + El valor actual de la propiedad es devuelto y almacenado en la variable + de entorno %CONFIG%. Puede usarse para almacenar el valor al usar con + archivos por lotes. + + Tanto "-set" como "-get" funcionan en archivos por lotes y se pueden usar + para establecer sus propias preferencias para cada juego, aunque en lugar de + eso puede ser mĂĄs fĂĄcil usar archivos de configuraciĂłn de DOSBox separados + por cada juego + + Ejemplos: + 1. Para crear un archivo de configuraciĂłn en su directorio c:\juegosdos: + config -writeconf c:\juegosdos\dosbox.conf + 2. Para establecer los ciclos del procesador en 10000: + config -set "cpu cycles=10000" + 3. Para desactivar la emulaciĂłn de memoria EMS: + config -set "dos ems=false" + 4. Para comprobar quĂŠ nĂşcleo de procesador se estĂĄ usando: + config -get "cpu core" + + +LOADFIX [-tamaĂąo] [programa] [parĂĄmetros-del-programa] +LOADFIX -f + Programa para reducir la cantidad de memoria convencional disponible. + Útil para programas viejos que no esperan que haya mucha memoria libre. + + -tamaĂąo + nĂşmero de kilobytes a "comerse", por defecto = 64kb + + -f + libera toda la memoria reservada anteriormente + + Ejemplos: + 1. Para iniciar mm2.exe y reservar 64kb de memoria + (mm2 tendrĂĄ 64 kb menos de memoria disponible): + loadfix mm2 + 2. Para iniciar mm2.exe y reservar 32kb de memoria: + loadfix -32 mm2 + 3. Para liberar la memoria reservada anteriormente: + loadfix -f + + +RESCAN + Hace que DOSBox relea la estructura de directorios. Útil si cambiĂł algo en + una unidad montada desde fuera de DOSBox. (ÂĄCTRL - F4 tambiĂŠn hace esto!). + + +MIXER + Hace que DOSBox muestre su configuraciĂłn actual de volumen. + AsĂ­ es como puede cambiarla: + + mixer canal izquierda:derecha [/NOSHOW] [/LISTMIDI] + + canal + Puede ser uno de los siguientes: MASTER, DISNEY, SPKR, GUS, SB, FM + [, CDAUDIO]. CDAUDIO sĂłlo estĂĄ disponible si estĂĄ habilitada alguna + interfaz de CD-ROM con control de volumen (imagen de CD, ioctl_dx). + + izquierda:derecha + Los niveles de volumen en porcentajes. Si pone una D delante serĂĄ en + decibeles (Ejemplo: mixer gus d-10). + + /NOSHOW + Evita que DOSBox muestre el resultado si cambia uno de los niveles de + volumen. + + /LISTMIDI + En Windows lista los dispositivos MIDI disponibles en su PC. Para + seleccionar un dispositivo distinto al asignador de MIDI por defecto de + Windows, cambie la lĂ­nea 'midiconfig=' a 'midiconfig=id' en la secciĂłn + [midi] del archivo de configuraciĂłn, donde 'id' es el nĂşmero del + dispositivo listado por LISTMIDI. Por ejemplo: midiconfig=2 + + En Linux esta opciĂłn no funciona, pero obtiene resultados similares + usando 'pmidi -l' en la consola. Luego cambie la lĂ­nea 'midiconfig=' a + 'midiconfig=puerto', donde 'puerto' es el puerto del dispositivo listado + por 'pmidi -l'. Por ejemplo: midiconfig=128:0 + + +IMGMOUNT + Una utilidad para montar imĂĄgenes de disco y de CD-ROM en DOSBox. + + IMGMOUNT UNIDAD [archivo_imagen] -t [tipo_imagen] -fs [formato_imagen] + -size [bytes_por_sector, sectores_por_cabezal, cabezales, cilindros] + + archivo_imagen + UbicaciĂłn del archivo de imagen a montar en DOSBox. La ubicaciĂłn puede + ser en una unidad montada dentro de DOSBox, o en su disco real. TambiĂŠn + es posible montar imĂĄgenes de CD-ROM (ISOs, CUE/BIN o CUE/IMG). + Si necesita poder intercambiar de CD especifique todas las imĂĄgenes + sucesivamente (vea la entrada siguiente). + Los pares CUE/BIN y CUE/IMG son el tipo de imagen de CD-ROM preferidos, + ya que pueden almacenar pistas de audio a diferencia de las ISOs (que son + de sĂłlo datos). Para montar CUE/BIN siempre especifique la hoja CUE. + + archivo_imagen1 archivo_imagen2 .. archivo_imagenN + UbicaciĂłn de los archivos de imagen a montar en DOSBox. SĂłlo estĂĄ + permitido especificar un nĂşmero de archivos de imagen para imĂĄgenes de + CD-ROM. + Los CD pueden ser intercambiados con CTRL-F4 en cualquier momento. + Esto es requerido por los juegos que usan mĂşltiples CD-ROM y requieren + que el CD sea cambiado durante el juego en algĂşn punto- + + -t + Los siguientes son tipos de imagen vĂĄlidos: + floppy: Especifica una imagen de disquete. DOSBox identificarĂĄ + automĂĄticamente la geometrĂ­a del disco (360K, 1.2MB, 720K, + 1.44MB, etc.) + cdrom: Especifica una imagen de CD-ROM. La geometrĂ­a se establece + automĂĄticamente para este tamaĂąo. Puede ser una ISO o un par + CUE/BIN o CUE/IMG. + hdd: Especifica una imagen de disco duro. Es necesario aĂąadir la + geometrĂ­a correcta (cilindros, cabezales y sectores) para que + funcione. + + -fs + Los siguientes son formatos vĂĄlidos de sistemas de archivos: + iso: Especifica el formato de CD-ROM ISO-9660. + fat: Especifica que la imagen usa el sistema de archivos FAT. DOSBox + tratarĂĄ de montar esta imagen como una unidad en DOSBox y hacer + los ficheros disponibles desde dentro de DOSBox. + none: DOSBox no intentarĂĄ leer el sistema de archivos del disco. Esto + es Ăştil si necesita formatearlo o si quieres arrancar desde el + disco usando el comando BOOT. Al usar el sistema de archivos + "none" debe especificar el nĂşmero de unidad (2 o 3, donde 2 = + maestro, 3 = esclavo) en lugar de una letra de unidad. + Por ejemplo, para montar una imagen de 70MB como la unidad + esclava, se escribirĂ­a (sin las comillas): + "imgmount 3 d:\prueba.img -size 512,63,16,142 -fs none" + Compare esto con un mount para poder acceder a la unidad desde + DOSBox, que serĂ­a: + "imgmount e: d:\prueba.img -size 512,63,16,142" + + -size + Los Cilindros, Cabezales y Sectores de la unidad. + Necesarios para montar imĂĄgenes de disco duro. + + Un ejemplo de cĂłmo montar imĂĄgenes de CD-ROM (en Linux): + 1. imgmount d /tmp/imagencd1.cue /tmp/imagencd2.cue -t cdrom + o (que tambiĂŠn funciona) + 2a. mount c /tmp + 2b. imgmount d c:\imagencd1.cue c:\imagencd2.cue -t cdrom + (en Windows): + imgmount d f:\img\CD1.cue f:\img\CD2.cue f:\img\CD3.cue -t cdrom + imgmount d "g:\img\7th Guest CD1.cue" "g:\img\7th Guest CD2.cue" -t cdrom + No se olvide que tambiĂŠn puede usar MOUNT con imĂĄgenes, pero sĂłlo si usa + un programa externo, por ejemplo (ambos son gratuitos): + - Daemon Tools Lite (para imĂĄgenes de CD), + - Virtual Floppy Drive (para imĂĄgenes de disquete). + Aunque IMGMOUNT puede brindar mejor compatibilidad. + + +BOOT + Boot arrancarĂĄ imĂĄgenes de disquete o disco duro independientemente de la + emulaciĂłn del sistema operativo ofrecida por DOSBox. Esto le permitirĂĄ jugar + a juegos en disquetes auto arrancables o arrancar otros sistemas operativos + dentro de DOSBox. Si el sistema emulado es PCjr (machine=pcjr) el comando + boot puede ser usado para cargar cartuchos PCjr (.jrc). + + BOOT [imagen1.img imagen2.img .. imagenN.img] [-l letra_unidad] + BOOT [cart.jrc] (sĂłlo PCjr) + + imagen1 imagen2 .. imagenN.img + Esto puede ser cualquier nĂşmero de imĂĄgenes de disquete que se quieran + tener montadas despuĂŠs de que DOSBox arranque desde la letra de unidad + especificada. + Para cambiar entre las imĂĄgenes, pulse CTRL-F4 para pasar a la siguiente + de la lista. La lista se repetirĂĄ desde el principio al alcanzar la Ăşltima + imagen. + + [-l letra_unidad] + Este parĂĄmetro le permite especificar la unidad desde la que arrancar. + La unidad por defecto es A, la disquetera. TambiĂŠn puede arrancar una + imagen de disco duro montada como maestra especificando "-l C", sin las + comillas, o como esclava con "-l D". + + cart.jrc (sĂłlo PCjr) + Cuando la emulaciĂłn de una PCjr estĂĄ habilitada, los cartuchos se pueden + cargar con el comando BOOT. El soporte aĂşn estĂĄ limitado. + + +IPX + + Debe habilitar el protocolo de red IPX en el archivo de configuraciĂłn de + DOSBox. + + Todo el sistema de red por IPX es gestionado por el programa interno de + DOSBox IPXNET. Para ver la ayuda sobre IPX dentro de DOSBox, escriba + "IPXNET HELP" (sin las comillas) y el programa listarĂĄ los comandos y + documentaciĂłn relevante. + + Con respecto a poner en funcionamiento una red, un sistema debe ser el + servidor. Para ello, escriba "IPXNET STARTSERVER" (sin las comillas) en una + sesiĂłn de DOSBox. El servidor se aĂąadirĂĄ automĂĄticamente a la red IPX + virtual. Para cada computadora adicional que deberĂ­a formar parte de la red + virtual IPX, necesitarĂĄ escribir "IPXNET CONNECT ". + Por ejemplo, si servidor se encuentra en bob.dosbox.com, deberĂ­a escribir + "IPXNET CONNECT bob.dosbox.com" en cada equipo cliente. + + Para jugar juegos que necesiten NetBIOS se necesita un archivo llamado + NETBIOS.EXE de Novell. Establezca la conexiĂłn IPX como se explicĂł arriba, + luego ejecute "netbios.exe". + + La siguiente es una referencia de comandos de IPXNET: + + IPXNET CONNECT + + IPXNET CONNECT abre una conexiĂłn a un servidor IPX encapsulado + ejecutĂĄndose en otra sesiĂłn de DOSBox. El parĂĄmetro "direcciĂłn" especifica + la direcciĂłn IP o nombre de la computadora servidor. TambiĂŠn puede + especificar el puerto UDP a usar. Por defecto IPXNET usa el puerto 213 - + el puerto asignado por la IANA para el encapsulado de IPX - para la + conexiĂłn. + + La sintaxis de IPXNET CONNECT es: + IPXNET CONNECT direcciĂłn + + IPXNET DISCONNECT + + IPXNET DISCONNECT cierra la conexiĂłn al servidor IPX. + + La sintaxis de IPXNET DISCONNECT es: + IPXNET DISCONNECT + + IPXNET STARTSERVER + + IPXNET STARTSERVER inicia un servidor IPX encapsulado en la sesiĂłn actual + de DOSBox. Por defecto, el servidor aceptarĂĄ conexiones en el puerto UDP + 213, aunque esto se puede cambiar. Una vez iniciado el servidor, DOSBox + iniciarĂĄ automĂĄticamente una conexiĂłn cliente al servidor IPX. + + La sintaxis de IPXNET STARTSERVER es: + IPXNET STARTSERVER + + IPXNET STOPSERVER + + IPXNET STOPSERVER detiene el servidor IPX que estĂŠ ejecutĂĄndose en la + sesiĂłn actual de DOSBox. DeberĂ­a tener cuidado y asegurarse de que todas + las demĂĄs conexiones tambiĂŠn hayan finalizado, ya que detener el servidor + puede causar bloqueos en las mĂĄquinas que todavĂ­a lo estĂŠn usando. + + La sintaxis de IPXNET STOPSERVER es: + IPXNET STOPSERVER + + IPXNET PING + + IPXNET PING transmite una peticiĂłn de ping a travĂŠs de la red IPX + encapsulada. Todas las otras computadoras conectadas a la red responderĂĄn + a la peticiĂłn e informarĂĄn el tiempo que llevĂł recibir y enviar el mensaje + de ping. + + La sintaxis de IPXNET PING es: + IPXNET PING + + IPXNET STATUS + + IPXNET STATUS informa el estado actual de la red IPX encapsulada de la + sesiĂłn actual de DOSBox. Para ver una lista de todas las computadoras + conectadas a la red use el comando IPXNET PING. + + La sintaxis de IPXNET STATUS es: + IPXNET STATUS + + +KEYB [cĂłdigo_disposiciĂłn_teclado [pĂĄgina_de_cĂłdigos [archivo_pĂĄgina_de_cĂłdigos]]] + + Cambia la disposiciĂłn del teclado. Para informaciĂłn detallada de las + disposiciones del teclado por favor vea SecciĂłn 8: "DisposiciĂłn del Teclado". + + [cĂłdigo_disposiciĂłn_teclado] es una cadena que consiste en cinco o menos + caracteres, por ejemplo PL214 (mecanĂłgrafos polacos) o PL457 + (programadores polacos). + La lista de todas las disposiciones incluidas en DOSBox estĂĄ acĂĄ: + http://vogons.zetafleet.com/viewtopic.php?t=21824 + + [pĂĄgina_de_cĂłdigos] es el nĂşmero de pĂĄgina de cĂłdigos a usar. La disposiciĂłn + del teclado tiene que proveer soporte para la pĂĄgina de cĂłdigos + especificada, de lo contrario la carga de la disposiciĂłn fallarĂĄ. + Si no se especifica ninguna pĂĄgina de cĂłdigos, se elige automĂĄticamente + una apropiada para la disposiciĂłn requerida. + + [archivo_pĂĄgina_de_cĂłdigos] puede usarse para cargar pĂĄginas de cĂłdigos que + aĂşn no han sido compiladas en DOSBox. Esto sĂłlo es necesario cuando DOSBox + no encuentra la pĂĄgina de cĂłdigos. Si no se especifica ningĂşn archivo de + pĂĄgina de cĂłdigos pero sitĂşa los diez archivos ega.cpx (de FreeDOS) en la + carpeta de programa de DOSBox, se elige automĂĄticamente un archivo de + pĂĄgina de cĂłdigos para la disposiciĂłn/pĂĄgina de cĂłdigos requerida. + + Ejemplos: + 1. Para cargar la disposiciĂłn de teclas para mecanĂłgrafos polacos (usa + automĂĄticamente la pĂĄgina de cĂłdigos 852): + keyb p1214 + 2. Para cargar una de las disposiciones de teclado rusas con pĂĄgina de + cĂłdigos 866: + keyb ru441 886 + Para escribir caracteres rusos pulse ALT+DERECHA-MAY. + 3. Para cargar una de las disposiciones de teclado francesas con pĂĄgina de + cĂłdigos 850 (donde la pĂĄgina de cĂłdigos estĂĄ definida en EGACPI.DAT): + keyb fr189 850 EGACPI.DAT + 4. Para cargar la pĂĄgina de cĂłdigos 858 (sin una disposiciĂłn de teclado): + keyb none 858 + Esto se puede usar para cambiar la pĂĄgina de cĂłdigos para la utilidad + keyb2 de FreeDOS. + 5. Para mostrar la pĂĄgina de cĂłdigos actual y, si estĂĄ cargada, la + disposiciĂłn de teclado: + keyb + + + +Para mĂĄs informaciĂłn use el argumento /? con los programas. + + + +===================== +5. Teclas Especiales: +===================== + +ALT-INTRO Cambiar entre el modo pantalla completa y ventana. +ALT-PAUSA Pausar la emulaciĂłn (pulse ALT-PAUSA de nuevo para continuar). +CTRL-F1 Iniciar el asignador de teclas. +CTRL-F4 Cambiar entre imĂĄgenes de disquete/CD montadas. Actualizar la + cachĂŠ de directorio de todas las unidades. +CTRL-ALT-F5 Comenzar/Detener grabaciĂłn de un video de la pantalla. (captura + de video AVI) +CTRL-F5 Guardar una captura de pantalla. (formato PNG) +CTRL-F6 Comenzar/Detener grabaciĂłn de la salida de sonido a un archivo + wave. +CTRL-ALT-F7 Comenzar/Detener grabaciĂłn de los comandos OPL. (formato DRO) +CTRL-ALT-F8 Comenzar/Detener la grabaciĂłn de comandos MIDI sin procesar. +CTRL-F7 Disminuir el salteo de cuadros. +CTRL-F8 Incrementar el salteo de cuadros. +CTRL-F9 Cerrar DOSBox. +CTRL-F10 Capturar/Liberar el ratĂłn. +CTRL-F11 Ralentizar la emulaciĂłn (Disminuye los ciclos de DOSBox). +CTRL-F12 Acelerar la emulaciĂłn (Incrementa los ciclos de DOSBox)*. +ALT-F12 Desbloquea velocidad (botĂłn turbo/avance rĂĄpido)**. +F11, ALT-F11 (machine=cga) cambiar el tinte en modos de salida NTCS*** +F11 (machine=hercules) cambia entre el color ĂĄmbar, verde y + blanco*** + +*NOTA: Si establece los ciclos de DOSBox mĂĄs altos que los recursos de + procesador de su computadora, se producirĂĄ el mismo efecto que si + ralentizara la emulaciĂłn. El mĂĄximo variarĂĄ dependiendo de la + computadora. + +**NOTA: Necesita recursos de procesador libres para esto (cuanto mĂĄs tenga + mĂĄs rĂĄpido irĂĄ), asĂ­ que no funcionarĂĄ con cycles=max o con una + cantidad fija de ciclos muy alta. ÂĄTiene que mantener las teclas + pulsadas para que funcione! + +***NOTA: Estas teclas no funcionarĂĄn si antes guardĂł un archivo de asignaciĂłn + de teclas con un tipo de mĂĄquina diferente. ReasĂ­gnelas o reinicie el + asignador. + +Estas son las asignaciones de teclas por defecto. Pueden cambiarse en el +asignador de teclas (vea SecciĂłn 7: "Asignador de Teclas"). + +En MAC OS puede probar usando Cmd (tecla Apple) junto a Ctrl si la tecla no +funciona (por ej. cmd-ctrl-F1), pero algunas teclas aĂşn puede que necesiten +reasignarse (en Linux tambiĂŠn). + +Los archivos guardados/grabados pueden encontrarse en: + (Windows) "MenĂş Inicio"->"Todos los programas"->DOSBox-0.74->Extras + (Linux) ~/.dosbox/capture + (Mac OS X) "~/Library/Preferences/capture" +Esto se puede cambiar en el archivo de configuraciĂłn de DOSBox. + + + +==================== +6. Joystick/Gamepad: +==================== + +El puerto de joystick estĂĄndar en DOS soporta un mĂĄximo de 4 ejes y 4 botones. +Para usar mĂĄs, se usaron diferentes modificaciones de esa configuraciĂłn. + +Para forzar a DOSBox a usar un tipo diferente de joystick/gamepad emulado, +puede usarse la entrada "joysticktype" en la secciĂłn [joystick] del archivo +de configuraciĂłn de DOSBox. + +none - deshabilita el soporte de controles. +auto - (por defecto) auto detecta si hay uno o dos controles conectados: + si hay uno - se usa la opciĂłn '4axis', + si hay dos - se usa la opciĂłn '2axis'. +2axis - si hay dos controles conectados, cada uno emularĂĄ a un joystick con + 2 ejes y 2 botones. Si sĂłlo hay un control conectado, emularĂĄ a un + joystick con sĂłlo 2 ejes y 2 botones. +4axis - soporta sĂłlo al primer control, emula a un joystick con 4 ejes y 4 + botones o a un gamepad con 2 ejes y 6 botones. +4axis_2 - soporta sĂłlo al segundo control. +fcs - soporta sĂłlo al primer control, emula al Sistema de Control de Vuelo + ThrustMaster, con 3 ejes, 4 botones y 1 hat, pero no puede pulsar + mĂĄs de un botĂłn al mismo tiempo. + +TambiĂŠn tiene que configurar el control correctamente dentro del juego. +Es importante recordar que si guardĂł el archivo de asignaciĂłn sin un joystick +conectado, o con una configuraciĂłn de joystick diferente, su nueva +configuraciĂłn no funcionarĂĄ correctamente, o directamente no funcionarĂĄ hasta +que reinicie el archivo de asignaciĂłn de DOSBox. + +Si el control estĂĄ funcionando correctamente fuera de DOSBox, pero no se +calibra correctamente dentro de DOSBox, pruebe una opciĂłn diferente en 'timed' +en el archivo de configuraciĂłn de DOSBox. + + + +======================= +7. Asignador de Teclas: +======================= + +Se inicia el asignador de teclas de DOSBox con CTRL-F1 (vea SecciĂłn 5: "Teclas +Especiales") o con -startmapper (vea SecciĂłn 3: "ParĂĄmetros de la LĂ­nea de +Comandos"). +Aparece un teclado y un joystick virtual. + +Estos dispositivos virtuales corresponden a las teclas y eventos que DOSBox +enviarĂĄ a las aplicaciones de DOS. Si hace clic en un botĂłn puede ver en la +esquina inferior izquierda a quĂŠ evento estĂĄ asociado (EVENT) y a quĂŠ eventos +estĂĄ asignado actualmente. + +Event: EVENTO +BIND: ASIGNACIÓN (la tecla real/botĂłn/eje que aprieta con el dedo/mano) + + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENTO + La tecla o eje/botĂłn/hat del joystick que DOSBox enviarĂĄ a las + aplicaciones de DOS. (el evento que ocurrirĂĄ durante el juego, por ej. + disparar/saltar/caminar) +ASIGNACIÓN + La tecla de su teclado real o el eje/botĂłn/hat en su joystick(s) + real(es) (tal como informe SDL) que estĂĄ conectada al EVENTO. +mod1,2,3 + Modificadores. Son teclas que necesita tener pulsadas mientras pulsa + ASIGNACIÓN. mod1 = CTRL y mod2 = ALT. Normalmente sĂłlo se usan si quiere + cambiar las teclas especiales de DOSBox. +Add + Agrega una nueva ASIGNACIÓN a este EVENTO. BĂĄsicamente hace que una tecla + de su teclado o un evento del joystick (presionado de botĂłn, movimiento de + eje/hat) produzca el EVENTO en DOSBox. +Del + Elimina la ASIGNACIÓN a este EVENTO. Si un EVENTO no tiene ASIGNACIONES, + no se podrĂĄ desencadenar este evento en DOSBox (o sea que no habrĂĄ forma + de pulsar la tecla o usar la acciĂłn respectiva del joystick). +Next + Recorrer la lista de asignaciones que corresponden a este EVENTO. + + +Ejemplo: +P1. Quiere que la X de su teclado escriba una Z en DOSBox. + R. Haga clic sobre la Z en el teclado virtual. Haga clic en "Add". + Ahora pulse la tecla X en su teclado. + +P2. Si hace clic en "Next" un par de veces, verĂĄ que la Z de su teclado + tambiĂŠn produce una Z en DOSBox. + R. Por lo tanto, seleccione la Z de nuevo, haga clic en "Next" hasta que + tenga la Z en su teclado. Ahora haga clic en "Del". + +P3. Si lo quiere probar en DOSBox se darĂĄ cuenta que pulsar la X hace que en la + pantalla aparezca ZX. + R. ÂĄLa X de su teclado todavĂ­a estĂĄ asignada a la X tambiĂŠn! Haz clic en + la X del teclado virtual y busque con "Next" hasta que encuentre la tecla + asignada a la X. Pulsa en "Del". + + +Ejemplos de cĂłmo reasignar el joystick: + Tiene un joystick conectado, estĂĄ funcionando bien en DOSBox y quiere jugar a + algĂşn juego que sĂłlo usa el teclado con el joystick (se asume que se controla + al juego con las flechas en el teclado): + 1. Inicie el asignador, luego haga clic en una de las flechas izquierdas + del teclado. EVENTO deberĂ­a ser key_left. Ahora haga clic en Add y + mueva el joystick en la direcciĂłn respectiva, esto deberĂ­a agregar un + evento a la ASIGNACIÓN. + 2. Repita lo anterior para las tres direcciones restantes. Los botones del + joystick tambiĂŠn pueden ser reasignados (disparar/saltar). + 3. Haga clic en Save, luego en Exit y pruĂŠbelo con algĂşn juego. + + Quiere intercambiar el eje y del joystick porque algunos simuladores de vuelo + usan el movimiento del joystick arriba/abajo de un modo que no le agrada, y + no puede ser configurado en el juego: + 1. Inicie el asignador y haga clic en Y- en el campo del primer joystick. + EVENTO deberĂ­a ser jaxis_0_1-. + 2. Haga clic en Del para quitar la asignaciĂłn actual, luego en Add y mueva + el joystick hacia abajo. DeberĂ­a crearse una nueva asignaciĂłn. + 3. Repita esto para Y+, guarde la disposiciĂłn y finalmente pruĂŠbelo con + algĂşn juego. + + Si quiere reasignar algo a su mando de direcciĂłn/hat tendrĂĄ que cambiar + 'joysticktype=auto' por 'joysticktype=fcs' en el archivo de configuraciĂłn. + Probablemente esto se mejore en la prĂłxima versiĂłn de DOSBox. + + +Si modifica las asignaciones por defecto puede guardar sus cambios haciendo +clic en "Save". DOSBox guardarĂĄ las asignaciones en la ubicaciĂłn especificada +en el archivo de configuraciĂłn (la entrada mapperfile=). Al inicio, DOSBox +cargarĂĄ su archivo de asignaciones si estĂĄ presente en el archivo de +configuraciĂłn de DOSBox. + + + +=========================== +8. DisposiciĂłn del Teclado: +=========================== + +Para cambiar a una disposiciĂłn de teclado diferente se puede usar la entrada +"keyboardlayout" en la secciĂłn [dos] del archivo de configuraciĂłn de DOSBox, o +el programa interno de DOSBox keyb.com (vea SecciĂłn 4: "Programas Internos"). +Ambas maneras aceptan los cĂłdigos de lenguaje conformes a DOS (vea a +continuaciĂłn), pero sĂłlo se puede especificar una pĂĄgina de cĂłdigos +personalizada usando keyb.com. + +Actualmente la opciĂłn por defecto keyboardlayout=auto sĂłlo funciona bajo +Windows. El lenguaje se elige de acuerdo al lenguaje del SO, pero la +disposiciĂłn del teclado es detectada. + +Cambiando de disposiciĂłn + DOSBox soporta un nĂşmero de disposiciones de teclado y pĂĄginas de cĂłdigos por + defecto, en este caso sĂłlo se necesita especificar el identificador de la + disposiciĂłn (ej. keyboardlayout=PL214 en el archivo de configuraciĂłn de + DOSBox, o usando "keyb PL214" en la lĂ­nea de comandos de DOSBox). La lista + de todas las disposiciones incluidas en DOSBox se encuentra acĂĄ: + http://vogons.zetafleet.com/viewtopic.php?t=21824 + + Algunas disposiciones de teclado (por ejemplo la disposiciĂłn GK319 pĂĄgina de + cĂłdigos 869 y la disposiciĂłn RU441 pĂĄgina de cĂłdigos 808) tienen soporte para + dos disposiciones que pueden accederse pulsando ALT Izquierdo+MAY Derecho + para una disposiciĂłn y ALT Izquierdo+MAY Izquierdo para la otra. + Algunas disposiciones de teclado (por ejemplo la disposiciĂłn LT456 pĂĄgina de + cĂłdigos 771) tienen soporte para tres disposiciones, la tercera puede + accederse pulsando ALT Izquierdo+CTRL Izquierdo. + +Archivos externos soportados + Los archivos .kl de FreeDOS son soportados (archivos de disposiciĂłn de + teclado de keyb2 de FreeDOS) asĂ­ como las librerĂ­as keyboard.sys/keybrd2.sys/ + keybrd3.sys de FreeDOS que consisten de todos los archivos .kl disponibles. + Visite http://www.freedos.org/ para descargar disposiciones de teclado + pre-compiladas si las integradas en DOSBox no funcionan por alguna razĂłn, o + si hay disponibles disposiciones actualizadas o nuevas. + + Se pueden usar los archivos .CPI (pĂĄgina de cĂłdigos de MS-DOS y compatibles) + y .CPX (pĂĄgina de cĂłdigos comprimidas como UPX de FreeDOS). Algunas pĂĄginas + de cĂłdigos estĂĄn integradas en DOSBox, asĂ­ que en la mayorĂ­a de los casos no + es necesario preocuparse por los archivos de pĂĄginas de cĂłdigos externos. + Si necesita un archivo de pĂĄgina de cĂłdigos diferente (o personalizado), + cĂłpielo en el directorio de DOSBox para que sea accesible desde DOSBox. + Si ubica los diez archivos ega.cpx (de FreeDOS) en la carpeta de DOSBox, se + elige automĂĄticamente un archivo de pĂĄgina de cĂłdigos apropiado para la + disposiciĂłn/pĂĄgina de cĂłdigos requerida. + + Se pueden agregar disposiciones adicionales copiando el archivo .kl + correspondiente en el directorio del archivo de configuraciĂłn de DOSBox y + usando la primera parte del nombre de archivo como cĂłdigo de lenguaje. + Ejemplo: Para el archivo UZ.KL (disposiciĂłn de teclado para UzbekistĂĄn) + especifique "keyboardlayout=uz" en el archivo de configuraciĂłn de + DOSBox. + La integraciĂłn de los paquetes de disposiciĂłn de teclado (como keybrd2.sys) + funcionan parecido. + +Observe que la disposiciĂłn de teclado permite introducir caracteres +extranjeros, pero NO hay soporte para los mismos en los nombres de archivos. +Intente evitarlos dentro de DOSBox asĂ­ como en los archivos en su sistema +operativo que son accesibles por DOSBox. + + + +================================== +9. FunciĂłn Multijugador por Serie: +================================== + +DOSBox puede emular una conexiĂłn "nullmodem" en red e internet. Se puede +configurar en la secciĂłn [serialports] en el archivo de configuraciĂłn de +DOSBox. + +Para crear una conexiĂłn nullmodem, un lado debe actuar como el servidor y +el otro como cliente. + +El servidor se debe configurar en el archivo de configuraciĂłn de DOSBox asĂ­: + serial1=nullmodem + +El cliente: + serial1=nullmodem server: + +Ahora inicie su juego y elija nullmodem / cable serie / ya conectado como el +mĂŠtodo multijugador en COM1. Establezca la misma velocidad de transmisiĂłn en +ambas computadoras. + +AdemĂĄs, se pueden especificar parĂĄmetros adicionales para controlar el +comportamiento de la conexiĂłn nullmodem. Estos son todos los parĂĄmetros: + + * port: - NĂşmero de puerto TCP. Por defecto: 23 + * rxdelay: - CuĂĄnto tiempo (en milisegundos) retrasar los datos recibidos + si la interfaz no estĂĄ lista. Incremente este valor si + encuentra errores de rebasamiento en la Ventana de Estado de + DOSBox. Por defecto: 100 + * txdelay: - CuĂĄnto tiempo reunir datos antes de enviar un paquete. Por + defecto: 12 (reduce sobrecarga de red) + * server: - Este nullmodem serĂĄ un cliente que se conectarĂĄ al servidor + especificado. (Sin argumento server: ser un servidor.) + * transparent:1 - SĂłlo enviar los datos serie, no el saludo inicial RTS/DTR. + Use esto al conectarse a cualquier cosa que no sea un + nullmodem. + * telnet:1 - Interpretar los datos de Telnet desde el sitio remoto. + Establece automĂĄticamente transparent. + * usedtr:1 - La conexiĂłn no se establecerĂĄ hasta que el DTR sea + habilitado por el programa de DOS. Útil para terminales de + mĂłdem. Establece automĂĄticamente transparent. + * inhsocket:1 - Usa un zĂłcalo pasado a DOSBox por lĂ­nea de comandos. + Establece automĂĄticamente transparent. (Herencia de ZĂłcalo: + Se usa para jugar juegos door viejos de DOS en software + BBS nuevo.) + +Ejemplo: Ser un servidor escuchando en el puerto TCP 5000. + serial1=nullmodem server: port:5000 rxdelay:1000 + + + + +================================================ +10. CĂłmo acelerar/ralentizar DOSBox +================================================ + +DOSBox emula el procesador, las tarjetas de sonido y grĂĄficas y otros +perifĂŠricos de una computadora, todo al mismo tiempo. La velocidad de una +aplicaciĂłn de DOS emulada depende de cuĂĄntas instrucciones se puedan emular, lo +cual es ajustable (nĂşmero de ciclos). + +Ciclos de procesador (acelerar/ralentizar) + Por defecto (cycles=auto) DOSBox intenta detectar si un juego necesita correr + con tantas instrucciones emuladas por intervalo de tiempo como sea posible + (cycles=max, a veces esto hace que el juego funcione muy rĂĄpido o inestable), + o si usar una cantidad de ciclos fija (cycles=3000, a veces esto hace que el + juego funcione muy lento o muy rĂĄpido). Pero siempre puede forzar manualmente + un ajuste diferente en el archivo de configuraciĂłn de DOSBox. + + Puede forzar el comportamiento lento o rĂĄpido estableciendo una cantidad fija + de ciclos en el archivo de configuraciĂłn de DOSBox. Si por ejemplo establece + cycles=10000, la ventana de DOSBox mostrarĂĄ una lĂ­nea "CPU speed: fixed 10000 + cycles" arriba. En este modo puede reducir la cantidad de ciclos aĂşn mĂĄs + pulsando CTRL-F11 (puede reducir cuantos ciclos quiera) o incrementarla + pulsando CTRL-F12 cuanto quiera, pero estarĂĄ limitado por la potencia de un + nĂşcleo del procesador de su computadora. Puede ver el uso de sus nĂşcleos de + procesador reales en el Administrador de Tareas en Windows 2000/XP/Vista/7 o + el Monitor del Sistema en Windows 95/98/ME. Una vez que se use el 100% de la + potencia de un nĂşcleo del procesador real de su computadora, no hay manera de + acelerar mĂĄs DOSBox (en realidad comenzarĂĄ a ralentizarse), a no ser que + reduzca la carga generada por las partes no relacionadas al procesador de + DOSBox. DOSBox sĂłlo puede usar un nĂşcleo de su procesador, por lo que si tiene + por ejemplo un procesador con 4 nĂşcleos, DOSBox no serĂĄ capaz de usar la + potencia de los otros tres nĂşcleos. + + TambiĂŠn puede forzar el comportamiento rĂĄpido estableciendo cycles=max en el + archivo de configuraciĂłn de DOSBox. En este caso, la ventana de DOSBox + mostrarĂĄ arriba una lĂ­nea "CPU speed: max 100% cycles". Esta vez no tiene que + preocuparse por el uso de los nĂşcleos de su procesador real, porque DOSBox + siempre usarĂĄ el 100% de un nĂşcleo. En este modo puede reducir la cantidad de + uso del nĂşcleo de procesador real pulsando CTRL-F11 o incrementarlo con + CTRL-F12. + +NĂşcleo de procesador (acelerar) + En arquitecturas x86 puede intentar forzar el uso de un nĂşcleo de + recompilaciĂłn dinĂĄmica (establezca core=dynamic en el archivo de + configuraciĂłn de DOSBox). Esto generalmente da mejores resultados si la + auto detecciĂłn (core=auto) falla. Es mejor acompaĂąarlo con cycles=max, pero + tambiĂŠn puede probar usarlo con grandes cantidades de ciclos (por ejemplo + 20000 o mĂĄs). ÂĄMire que puede haber juegos que funcionen peor/fallen con el + nĂşcleo dinĂĄmico (asĂ­ que guarde su juego frecuentemente), o directamente que + no funcionen! + +EmulaciĂłn de grĂĄficos (acelerar) + La emulaciĂłn VGA es una parte demandante de DOSBox en tĂŠrminos de uso real de + procesador. Incremente el nĂşmero de cuadros salteados (de uno en uno) pulsando + CTRL-F8. El uso de su procesador deberĂ­a disminuir al usar una configuraciĂłn + de ciclos fijos, y podrĂĄ incrementar los ciclos con CTRL-F12. + Puede repetir esto hasta que el juego corra lo suficientemente rĂĄpido para + usted. + Observe que esto tiene su contra: lo que gane en velocidad lo perderĂĄ en + fluidez de video. + +EmulaciĂłn de sonido (acelerar) + TambiĂŠn puede intentar deshabilitar el sonido mediante la utilidad de + configuraciĂłn del juego para reducir aĂşn mĂĄs la carga de su procesador. + Establecer nosound=true en el archivo de configuraciĂłn de DOSBox NO + deshabilita la emulaciĂłn de los dispositivos de sonido, solamente se + deshabilitarĂĄ la salida de sonido. + +TambiĂŠn pruebe cerrar todos los programas excepto DOSBox para reservar cuantos +recursos sea posible para DOSBox. + + +ConfiguraciĂłn avanzada de ciclos: +A las configuraciones cycles=auto y cycles=max se le pueden agregar parĂĄmetros +para que sean diferentes por defecto. La sintaxis es + cycles=auto ["modo real por defecto"] ["modo protegido por defecto"%] + [limit "lĂ­mite de ciclos"] + cycles=max ["modo protegido por defecto"%] [limit "lĂ­mite de ciclos"] +Ejemplo: + cycles=auto 5000 80% limit 20000 + usarĂĄ 5000 ciclos para los juegos en modo real, 80% de aceleraciĂłn de + procesador para los juegos en modo protegido junto a un lĂ­mite fĂ­sico de + ciclos de 20000 + + + +========================== +11. SoluciĂłn de problemas: +========================== + +Consejo general: + Verifique los mensajes en la Ventana de Estado de DOSBox. Vea SecciĂłn 12: + "Ventana de Estado de DOSBox". + +DOSBox falla justo despuĂŠs de iniciarlo: + - use diferentes valores para la entrada output= en su archivo de + configuraciĂłn de DOSBox + - intente actualizar su controlador de la tarjeta grĂĄfica y DirectX + - (Linux) establezca la variable de entorno SDL_AUDIODRIVER a alsa u oss. + +El ejecutar cierto juego cierra DOSBox, falla con algĂşn mensaje o se tilda: + - vea si funciona con una instalaciĂłn por defecto de DOSBox (con un archivo + de configuraciĂłn sin modificar) + - intente con el sonido deshabilitado (use el programa de configuraciĂłn de + sonido que venga con el juego, adicionalmente puede establecer sbtype=none + y gus=false en el archivo de configuraciĂłn de DOSBox) + - cambie algunas entradas en el archivo de configuraciĂłn de DOSBox, mĂĄs que + nada intente: + core=normal + nĂşmero fijo de ciclos (por ejemplo cycles=10000) + ems=false + xms=false + o una combinaciĂłn de dichas configuraciones, al igual que las + configuraciones de mĂĄquina que controlan el chipset emulado y la + funcionalidad: + machine=vesa_nolfb + o + machine=vgaonly + - use loadfix antes de iniciar el juego + +El juego sale a la lĂ­nea de comandos de DOSBox con cierto mensaje de error: + - lea el mensaje de error detenidamente e intente localizar el fallo + - pruebe las sugerencias de las secciones anteriores + - monte de manera diferente, ya que algunos juegos son exigentes con las + ubicaciones, por ejemplo si usĂł "mount d d:\juegosdos\juego" intente con + "mount c d:\juegosdos\juego" y "mount c d:\juegosdos" + - si el juego requiere un CD-ROMS asegĂşrese de haber usado "-t cdrom" al + montar e intente diferentes argumentos adicionales (ioctl, usecd y label, + vea la secciĂłn apropiada) + - verifique los permisos de los archivos del juego (borre los atributos + sĂłlo-lectura, agregue permisos de escritura, etc.) + - intente reinstalando el juego dentro de DOSBox + + + +================================ +12. Ventana de Estado de DOSBox: +================================ + +La ventana de estado de DOSBox contiene mucha informaciĂłn Ăştil acerca de su +configuraciĂłn actual, sus acciones en DOSBox, errores ocurridos y mĂĄs. +Cuando tenga cualquier problema con DOSBox verifique estos mensajes. + +Para iniciar la Ventana de Estado de DOSBox: + (Windows) La Ventana de Estado se inicia junto a la ventana principal de + DOSBox. + (Linux) Puede tener que iniciar DOSBox desde una consola para ver la + Ventana de Estado. + (Mac OS X) Clic derecho en DOSBox.app, elija "Mostrar Contenidos del + Paquete"->entre a "Contents"->entre a "MacOS"->ejecute "DOSBox" + + + +==================== +13. El archivo de configuraciĂłn (opciones) +==================== + +El archivo de configuraciĂłn es creado automĂĄticamente la primera vez que inicia +DOSBox. Se puede encontrar en: + (Windows) "MenĂş Inicio/Logo Windows"->"Todos los programas"->DOSBox-0.74-> + Opciones + (Linux) ~/.dosbox/dosbox-0.74.conf + (Mac OS X) "~/Library/Preferences/DOSBox 0.74 Preferences" +El archivo estĂĄ dividido en varias secciones. Cada una comienza con una lĂ­nea +[nombre de secciĂłn]. Las configuraciones son las lĂ­neas propiedad=valor en +donde valor puede ser alterado para personalizar DOSBox. +# y % indican lĂ­neas de comentarios. + + +Se puede generar un archivo de configuraciĂłn extra mediante CONFIG.COM, que se +puede encontrar en la unidad interna de DOSBox Z: al iniciarlo. Vea en la +SecciĂłn 4: "Programas Internos" para conocer el uso de CONFIG.COM. Puede iniciar +DOSBox con el argumento -conf para cargar el archivo generado y usar sus +configuraciones. + +DOSBox cargarĂĄ los archivos de configuraciĂłn que sean especificados con -conf. +Si no se especificĂł ninguno, tratarĂĄ de cargar "dosbox.conf" del directorio +local. +Si no se encuentra, cargarĂĄ el archivo de configuraciĂłn del usuario. +Este archivo se crearĂĄ si no existe. + + +ÂĄImportante!: En Windows Vista/7 el archivo de configuraciĂłn no funcionarĂĄ +correctamente si estĂĄ ubicado en la carpeta "Windows" o "Archivos de Programa" +o en sus subcarpetas, o simplemente en c:\, asĂ­ que el mejor lugar para +almacenar archivos de configuraciĂłn extras, es por ejemplo en: c:\juegosdos + + + +========================= +14. El archivo de idioma: +========================= + +Se puede generar un archivo de idioma con CONFIG.COM, que se puede encontrar en +la unidad interna de DOSBox Z: al iniciarlo. Vea SecciĂłn 4: "Programas Internos" +para conocer el uso de CONFIG.COM. +Lea el archivo de idioma, y seguramente entenderĂĄ como cambiarlo. +Inicie DOSBox con el argumento -lang para usar su nuevo archivo de idioma. +Alternativamente, puede configurar la ubicaciĂłn y el nombre del archivo en la +entrada language= en la secciĂłn [dosbox] del archivo de configuraciĂłn. + + + +=========================================== +15. Compilando su propia versiĂłn de DOSBox: +=========================================== + +Descargue los archivos fuente. +Compruebe el archivo INSTALL incluido. + + + +=============================== +16. Agradecimientos especiales: +=============================== + +Vea el archivo GRACIAS + + + +============= +17. Contacto: +============= + +Visite el sitio: +http://www.dosbox.com +para ver una direcciĂłn de correo electrĂłnico (la pĂĄgina "Crew"). + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/es/version.txt dosbox-staging-0.77.0/contrib/old-translations/es/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/es/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/es/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Spanish 0.74 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/es/Video.txt dosbox-staging-0.77.0/contrib/old-translations/es/Video.txt --- dosbox-staging-0.76.0/contrib/old-translations/es/Video.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/es/Video.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,35 @@ +Desde la versiĂłn 0.65, DOSBox le permite crear videos de la salida por pantalla. + +Para grabar un video debe pulsar CTRL-ALT-F5. +Para detener/finalizar la grabaciĂłn, debe volver a pulsar CTRL-ALT-F5. + +Para ver el video grabado necesita un reproductor multimedia que pueda +manejar el cĂłdec ZMBV. Los usuarios de MS Windows pueden encontrar dicho cĂłdec +en la entrada del menĂş inicio de DOSBox. Los usuarios de Linux y otros SOs +deberĂ­an buscar un reproductor multimedia que use la biblioteca ffmpeg +(puede necesitar actualizar o pedirle a la distribuciĂłn que lo haga). + +Preguntas frecuentes: +P: Durante la reproducciĂłn de los videos el sonido se retrasa. +R: Compruebe las propiedades de su pantalla para ver si su frecuencia de +refresco estĂĄ establecida en al menos 70Hz. Pruebe reproducir el video en +virtualdub (http://virtualdub.sf.net). + +P: ÂżPor quĂŠ el video resultante consiste de varios archivos? +R: Cada vez que el juego cambia de resoluciĂłn DOSBox crea un nuevo archivo de +video, porque cada uno sĂłlo puede contener una resoluciĂłn. + +P: ÂżPuedo establecer los ciclos por encima de lo que mi ordenador pueda manejar +durante la grabaciĂłn? +R: Si. Durante la grabaciĂłn, puede que el juego vaya despacio y a tirones, pero +el video resultante se deberĂ­a reproducir a la velocidad esperada y sin tirones. + +P: CTRL-ALT-F5 cambia a la consola en Linux. +R: 1. Inicie DOSBox asĂ­: dosbox -startmapper + 2. Haga click en Video, luego en Add + 3. Pulse la tecla que quiera (por ejemplo bloqueo de desplazamiento o imprimir pantalla) + 4. Haga click en exit. + 5. Puede hacer videos pulsando bloq. despl. o la tecla que haya seleccionado. + +P: Los colores se ven mal y estoy usando Windows de 64 bits. +R: Mire acĂĄ: http://vogons.zetafleet.com/viewtopic.php?t=12133 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/fa/Readme_Persian.txt dosbox-staging-0.77.0/contrib/old-translations/fa/Readme_Persian.txt --- dosbox-staging-0.76.0/contrib/old-translations/fa/Readme_Persian.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/fa/Readme_Persian.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,757 @@ +DOSBox v0.72 + + +===== +توجه: +===== +اميدواريم که يک عوز اين برنامه تمام نرم افزارهاي ŘŞŘ­ŘŞ داس عا ا؏عا کند .اما ما هنوز به آنجا نرسيده ايم. ŘŻŘą حال حا؜ع داس باڊس روي يک سيستم پيشرفته تقريبا همانند يک سيستم 486 ميباشد.داس باڊس ميتواند با تنظيماتي که داعد دايره وسيعي از بازيهايي عا +که ŘŻŘą داس ساخته شده ا؏عا کند. از بازيهايي که داراي سيستمهاي گرافيک قديمي هستند گرفته تا بازيهاي جديدتر سيستم عامل داس. + +===== +عناوين: +===== +1.اجراي سريع +2.سوالات رايج +3.نحوه استفاده +4.برنامه هاي داخلي +5.دکمه هاي مخصوص +6.ماپر +7.ءعح بندي کيبورد +8.حالت بازي شبکه اي +9.چگونه بازيهاي سختگير عا ا؏عا کنيم +10.مشکلات ا؏عا +11.فايل تنظيم +12.فايل زبان +13.ساختن يک نسخه از داس باڊس مخصوص خودتان +14.تشڊعات مخصوص +15.تماس با ما + +====== +1.اجرای سریع +====== +کلمه intro راجهت یک گعدش سریع تایپ کنید. +بسیار مهم است که شما با نحوه ڊاع با سوارکردن یک درایو آشنا شوید تا داس باڊس بتواند مسیر بازی شما عا تشخیص دهد.ŘŻŘą سوالات متداول و همچنین عنوان 4 نحوه سواع کردن توضیح داده شده است. + +====== +2.سؤالات رايج: +====== +برخي سؤالات معمول ŘŻŘą زير آمده است : +Řł: چرا هنگام وعود به برنامه بجاي درايو C برنامه با درايو Z بالا مي آيد؟ +Řł: چرا هنگام وعود به برنامه بجاي درايو C برنامه با درايو Z بالا مي آيد؟ +Řł: آيا بايد همواره اين كاع عا ŘŻŘą هر باع اجراي برنامه انجام دهم ؟ ( چگونگي اتوماتيك كردن) +Řł: چگونه Full Screen كنم؟ +Řł: CD-ROM كاع نمي كند. چرا؟ +Řł: موس كاع نمي كند. چرا؟ +Řł: ؾدا ٞ؎ش نمي شود . چرا؟ +Řł: ؾدا قطع و وصل مي شود. ( يا ؾدا تكعاع مي شود) +Řł: نمي توانم كاعاكتع هاي "\" يا ":" عا ŘŻŘą DOSBox تايپ كنم؟ +Řł: كيبورد كند عمل مي كند . +Řł: نشانگر همواره به يك جهت حعكت مي كند. +Řł: بازي/برنامه نميتواند CD-ROM عا پيدا كند. +Řł: بازي / برنامه بسيار كند كاع مي كند. +Řł: آيا DOS Box ممكن است به كامپيوتر صدمه واعد كند ؟ +Řł: چگونه مي توان بع روي پارامترهايي چون سايز حافظه , سعؚت CPU , EMS يا IRQ ŘŻŘą سوندبلاستر تغييراتي اعمال نمود ؟ +Řł: DOS Box چه نوع كارتهاي صوتي عا شبيه سازي مي كند ؟ +Řł: اعصابم ؎وعد شده است , چرا كه همواره DOSBox ŘŻŘą هنگام ا؏عا ناكار مي شود. +Řł: مرجع حا؜ع بسيار ؎وب است , امّا من آنرا نمي فهمم. + +Řł: چرا هنگام وعود به برنامه بجاي درايو C برنامه با درايو Z بالا مي آيد؟ +ŘŹ: شما بايد دايركتوري هاي دلخواه ؎ود عا توسء فرمان Mount به درايوي با نام دلخواه نسبت دهيد . براي مثال اگع از سيستم عامل ويندوز استفاده مي كنيد براي انجام اين كاع بايد تايپ كنيد : +mount C D:\GAMES +حال دايركتوري D:\GAMES ŘŻŘą درايو مجازي C , ŘŻŘą برنامه DOS Box قرار مي گيرد. +و اگع از سيستم عامل Linux استفاده مي كنيد , با فرمان : +mount c /home/username +دايركتوري /home/username ŘŻŘą درايو مجازي C, ŘŻŘą برنامه DOS Box قرار مي گيرد. +حال براي وعود به درايو مجازي C ŘŻŘą DOS Box تايپ كنيد : +C: +اگع همه چيز به درستي پيش عود , به اين درايو ( كه درحقيقت دايركتوري مشخص شده از قبل مي باشد) واعد مي شويد و ŘŻŘą ŘŻŘą ؎ء فرمان "C:\>" عا مي بينيد. + +Řł: آيا بايد همواره اين كاع عا ŘŻŘą هر باع اجراي برنامه انجام دهم ؟ ( چگونگي اتوماتيك كردن) +ŘŹ: ŘŻŘą DOS Box فايلي تنظيماتي ((dosbox.conf و؏ود داعد كه ŘŻŘą ؾوعت نياز مي توانيد ŘŻŘą قسمت [Autoexec] آن فرمانهاي لازم عا ŘŻŘą هر باع ا؏عا شدن برنامه , تايپ كنيد. ( فايل داخل دايركتوري برنامه Dos Box است) + +Řł: چگونه Full Screen كنم؟ +ŘŹ: براي اينكار 3 راه و؏ود داعد: +1- استفاده از كليد Alt + Enter , +2- استفاده از فايل ((dosbox.conf و تغيير fullscreen=false به fullscreen=true, +3- استفاده از فايل ((dosbox.conf و تغيير fullresolution. +براي بازگشت به حالت عادي دوباره كليد Alt + Enter عا بفشاريد. + +Řł: CD-ROM كاع نمي كند. چرا؟ +ŘŹ: براي بارگذاري CD-ROM ŘŻŘą DOS Box نياز به تنظيمات بيشتري است . براي اين كاع 4 سءح و؏ود داعد: +1- براي بارگذاري CD-ROM ŘŻŘą حالت MSCDEX: +mount d f:\ -t cdrom +2- براي بارگذاري CD-ROM ŘŻŘą سءح 2 ( ŘŻŘą ؾوعت امكان از IOCTL استفاده مي كند ): +mount d f:\ -t cdrom -usecd 0 +3- براي بارگذاري CD-ROM ŘŻŘą سءح 2 و حمايت SDL : +mount d f:\ -t cdrom -usecd 0 –noioctl +4- براي بارگذاري CD-ROM ŘŻŘą سءح 2 و حمايت ASPI : +mount d f:\ -t cdrom -usecd 0 –aspi +توضيحات : +d: نام درايو دلخواه شما كه مي خواهيد CD-ROM ŘŻŘą آن بارگذاري شود. +f : نام درايو CD-ROM كامپيوتر شما. +0 : شماره درايو CD .( ŘŻŘą ؾوعت عدم اطلاع از اين شماره مي توانيد از فرمان mount –cd استفاده كنيد.) +براي اطلاعات بيشتر عا؏ؚ به اين موضوع به سؤال : بازي/برنامه نميتواند CD-ROM عا پيدا كند , ع؏وؚ كنيد. + +Řł: موس كاع نمي كند. چرا؟ +ŘŹ: معمولاً DOS Box نياز يك بازي به موس عا تشخيص مي دهد. به اين ؾوعت كه با كليك بع روي پنجره DOS-Box موس به فضاي داخل پنجره محدود مي شود و كاع مي كند. ŘŻŘą برخي بازيها اين تشخيص از كاع مي افتد. و شما براي نگه داشتن موس ŘŻŘą داخل پنجره و كاع با موس مجبور هستيد از كليد CTRL + F10 استفاده كنيد. + +Řł: ؾدا ٞ؎ش نمي شود . چرا؟ +ŘŹ: ابتدا مطمئن شويد كه ؾدا ŘŻŘą تنظيمات بازي به درستي تنظيم شده است . اين تنظيمات ممكن است ŘŻŘą خلال نصب بازي يا ŘŻŘą يك فايل اجرايي با نام Set Sound/Setup انجام گيرد . +بررسي كنيد كه آيا يك سيستم تشخيص اتوماتيك بع روي بازي و؏ود داعد . ŘŻŘą ؾوعت عدم وحود اين سيستم , سعي كنيد اين كاع عا با انتخاب SoundBlaster يا SoundBlaster16 و تنظيمات پيش فع؜ "address=220 irq=7 dma=1" انجام دهيد. ŘŻŘą ؾوعت نياز مي توانيد تنظيمات MIDI براي ٞ؎ش موزيك عا با آدعس 330 انجام دهيد. +شما مي توانيد پارامترهاي پيش فع؜ مذكور براي كاعت صوتي مجازي عا ŘŻŘą فايل (dosbox.conf) تغيير دهيد. +اگع بازهم ؾدا نداريد , هسته عا عو حالت نرمال تنظيم كرده ,سيكل عا بع روي مقادير پائينتر تنظيم كنيد ( براي مثال سيكل 2000 ) . + +Řł: ؾدا قطع و وصل مي شود. ( يا ؾدا تكعاع مي شود) +ŘŹ: حتماً شما سيكل بسيار بالايي عا براي برنامه تنظيم كرده ايد و CPU شما قوي است. +براي حل اين مشكل , سيكل و Frame Rate عا كاهش دهيد و يا از داخل فايل (dosbox.conf) Sampling Rate مربوط به كاعت ؾدا يا تجهيز ميكسر عا كمتر كنيد. +همچنين مي توانيد از داخل فايل كنفيگ Prebuffer بيشتري عا تنظيم كنيد. +اگع از سيكل ماكزيمم يا اتوماتيك استفاده مي كنيد , مطمئن شويد كه عمليات ديگري ŘŻŘą ويندوز ( ب؎ؾوؾ عملياتي كه به هارد ديسك نياز داعد) انجام نمي شود. + +Řł: نمي توانم كاعاكتع هاي "\" يا ":" عا ŘŻŘą DOSBox تايپ كنم؟ +ŘŹ: اين مشكل معمولاً پيش مي آيد و تنها هنگامي ع؎ مي دهد كه ءعح بندي صفحه كليد شما روي U.S تنظيم نشده باشد. +راه حلهاي موجود: +1- ءعح بندي صفحه كليد سيستم عامل ؎ود عا تغيير دهيد. +2- از "/" بجاي "\" استفاده كنيد. +3- ŘŻŘą فايل (dosbox.conf) , usescancodes=false عا به usescancodes=true تغيير دهيد. +4- فرمانهايي عا كه داراي اين كاراكترها هستند عا از قبل ŘŻŘą قسمت اجراي اتوماتيك فايل usescancodes=false تايپ كنيد. +5- ءعح بندي صفحه كليد عا تغيير دهيد. ( قسمت 7 مربوط به ءعح بندي صفحه كليد عا مشاهده كنيد.) +6- براي كاعاكتع ":" از (Alt-58) و براي كاعاكتع "\" از (Alt-92) استفاده كنيد. +7- براي كاعاكتع "\" كليدهاي اءعاف Enter و براي كاعاكتع ":" از كليد Shift همراه با كليد بين Enter و"l" استفاده كنيد. +8- ŘŻŘą سايت () برنامه Keyb2.0 عا دريافت كنيد. توجه كنيد كه نسخه هاي ديگر اين نرم افعاع ŘŻŘą قسمت لودينگ اشكالاتي دارند. + +Řł: كيبورد كند عمل مي كند . +ŘŹ: ŘŻŘą فايل (dosbox.conf) Priority عا كاهش دهيد .براي اينكار مي توانيد Priority عا به نوع "priority=normal,normal" تغيير دهيد. +همچنين مي توانيد سيكل عا كاهش دهيد. + +Řł: نشانگر همواره به يك جهت حعكت مي كند. +ŘŹ: ببينيد كه آيا ٞس از غيرفعال كردن جويستيك اين اتفاق ع؎ مي دهد. براي اينكار ŘŻŘą فايل nv (dosbox.conf) ŘŻŘą قسمت [joystick] تنظيم كنيد joysticktype=none . همچنين همه جويستيكهاي متصل به سيستم عا از كامپيوتر ؏دا كنيد. البته اگع مي خواهيد كه از جويستيك ŘŻŘą بازي استفاده كنيد تنظيم كنيد timed=false . همچنين مطمئن شويد كه جويستيك شما بدرستي كاليبره شده باشد . ( چه ŘŻŘą سيستم عامل و چه ŘŻŘą تنظيمات بازي مربوطه) +Řł: بازي/برنامه نميتواند CD-ROM عا پيدا كند. +ŘŹ: مطمئن شويد كه CD-ROM عا ŘŻŘą با پارامتر -t , بارگذاري كرده باشيد. اين كاع باؚ؍ مي شود كه اينترفيس MSCDEX كه مورد نياز بازيهاي ŘŞŘ­ŘŞ DOS است , فعال شود. همچنين سعي كنيد كه ليبل (-label LABEL) عا بدرستي ٞس از فرمان اضافه كرده باشيد. براي فعال كردن سءح دوم از پارامتر -usecd # ٞس از فرمان Mount استفاده كنيد كه ŘŻŘą آن # ؚدد درايو سي دي شما مي باشد كه توسء فرمان mount –cd بدست مي آيد. +ŘŞŘ­ŘŞ Windows شما مي توانيد از پارامترهايي چون -ioctl , -aspi , -noioctاستفاده كنيد. ( براي اطلاعات بيشتر عا؏ؚ به معني اين پارامتر به قسمتهاي ديگر اين دفترچه مراجعه كنيد. +به عنوان راه ديگري براي حل مشكل CD-ROM مي توانيد از تصوير CD-ROM ( ترجيحاً با پسوند CUE/BIN) استفاده كنيد. براي بارگذاري Image ŘŻŘą داسباكس از فرمان imgmount استفاده كنيد. اين كاع حمايت از CD-ROM عا به نحو احسن انجام مي دهد. + +Řł: بازي / برنامه بسيار كند كاع مي كند. +ŘŹ: براي حل اين مشكل به قسمت " چگونه بازيهاي وابسته به منابع عا ا؏عا كنيم ؟ " ع؏وؚ كنيد. + +Řł: آيا DOS Box ممكن است به كامپيوتر صدمه واعد كند ؟ +ŘŹ: DOS Box به مانند يك برنامه وابسته به منابع عمل مي كند و ضرري ؏ز اين نخواهد داشت. افزايش سيكل ŘŻŘą اين برنامه باؚ؍ نمي شود كه CPU اوركلاك شود ولي اگع سيكل بسيار زياد شود روي روند كاري برنامه هاي داخل ؎ود DOS Box تأثير منفي مي گذاعد. + +Řł: چگونه مي توان بع روي پارامترهايي چون سايز حافظه , سعؚت CPU , EMS يا IRQ ŘŻŘą سوندبلاستر تغييراتي اعمال نمود ؟ +ŘŹ: اين كاع شدنيست. براي اين كاع كافيست يك فايل Config بسازيد. به اين ؾوعت كه تايپ كنيد: +Config -writeconf (نام فايل كنفيگ) +ٞس از اينكار با يك اديتور فايل كنفيگ ساخته شده عا تنظيم كنيد . سٞس براي اجراي DOS Box با تنظيمات انجام شده ,براي اجراي DOS Box ŘŻŘą ويندوز تايپ كنيد: +dosbox –conf (نام فايل كنفيگ) +] البته بهتر است كه اين تغييرات عا از داخل همان فايل كنفيگ موجود ŘŻŘą داخل دايركتوري DOS Box ؾوعت دهيد [ + +Řł: DOS Box چه نوع كارتهاي صوتي عا شبيه سازي مي كند ؟ +ŘŹ: +- بلندگوي داخلي سيستم : اين شبيه ساز شامل ژنراتور تن و انواع مختلف صداهاي ديجيتالي از داخل بلندگوي داخلي سيستم مي شود . +- Creative CMS/GameBlaster : + اين كاعت ؾدا اولين كاعت صوتي ارائه شده توسء شعكت Creative بوده است. ŘŻŘą تنظيمات پيش فع؜ براي اين كاعت صوتي , ٞوعت 0x220 ŘŻŘą نظر گرفته شده است. بايد توجه كعد كه ŘŻŘą ؾوعت فعال بودن اين كاعت به همراه نوع Adlib , تداخل بو؏ود مي آيد. +- Tandy 3 Voice: + اين نوع كاعت صوتي بهترين كاعت صوتي براي كاهش كانال نويز مي باشد.كانال نويز يك كانال براي تشخيص دقت ؾدا مي باشد. +- Tandy DAC : + اين كاعت صوتي از شبيه ساز SoundBlaster استفاده مي كند , بنابراين هنگام استفاده از آن مطمون شويد كه ŘŻŘą فايل كنفيگ DOSBox , اپشن SoundBlaster غير فعال نباشد. اين كاعت ؾدا فقط ŘŻŘą سءح بايوس شبيه سازي مي شود. +- Adlib: + اين كاعت از MAME نشئت گرفته است و تقريباَ قابليت ٞ؎ش كامل صداهاي ديجيتال عا داعد. +- SoundBlaster 16/ SoundBlaster Pro I & II /SoundBlaster I & II : + تنظيمات پيش فع؜ DOSBox روي كاعت صوتي SoundBlaster 16 ŘŻŘą سءح 16 بيت استريو , قرار داعد. شما مي توانيد تنظيمات عا روي كاعت صوتي ديگري ( از طيق فايل كنفيگ ) تنظيم كنيد . ( همچنين مي توانيد از فرمان Config استفاده كنيد.) +- Disney Soundsource: + اين كاعت صوتي ٞوعت پرينتر عا ŘŻŘą اختيار ميگيرد و قابليت ٞ؎ش صداهاي ديجيتال عا داعد. +- Gravis Ultrasound : +شبيه سازي اين كاعت صوتي تقريباً كامل ؾوعت مي گيرد , هر چند كه قابليتهاي MIDI ŘŻŘą آن ŘŻŘą نظر گرفته نشده است , چرا كه يك MPU-401 ŘŻŘą كد ديگري (كاعت صوتي مجازي) شبيه سازي شده است. +- MPU-401 : +يك شبيه ساز كه اعتباء با MIDI عا شبيه سازي مي كند. اين عوش شبيه ساز تنها هنگامي كاع مي كند كه نياز به General MIDI يا MT-32 باشد. + +Řł: اعصابم ؎وعد شده است , چرا كه همواره DOSBox ŘŻŘą هنگام ا؏عا ناكار مي شود. +ŘŹ: اين مشكل از DOSBox نيست. امّا راه حل آن تنظيم متغير محيطي (environment variables) SDL_AUDIODRIVER به alsa يا oss است. + +Řł: مرجع حا؜ع بسيار ؎وب ؎وب است , امّا من آنرا نمي فهمم. +ŘŹ: با نگاهي به سايت , قسمت "The Newbie's pictorial guide to DOSBox" احتمالاً مشكل شما عفؚ خواهد Ř´ŘŻ.همچنين قسمت Wiki از سايت DOS Box عا نگاهي بياندازيد: +براي اطلاعات بيشتر به ادامه اين دفترچه توجه كنيد و يا از سايت ديدن فرمائيد. + + + + +====== +3.نحوه استفاده: +====== +کاربران ویندوز برای استفاده از فرامین داس باڊس باید cmd.exe یا command.comعا باز کنند یا میانبر مربوط به برنامه عا ویرایش کنند. +تمامی اختیارات برای همه سیستمهای عامل قابل استفاده بوده مگر اینکه درآن مورد خاصی قید شده باشد. نحوه استفاده: +dosbox [name] [-exit] [-c command] [-fullscreen] [-conf congfigfile] + [-lang languagefile] [-machine machinetype] [-noconsole] + [-startmapper] [-noautoexec] [-scaler scaler | -forcescaler scaler] +dosbox –version + +name: +اگع این پارامتر نام یک دایرکتوری باشد آن دایرکتوری بعنوان درایوC سواع میشود.اگع یک فایل اجرایی باشد دایرکتوری name بعنوان درایوcسواع خواهد شدوآن فایل اجرایی ا؏عا خواهدشد. + +-exit: +داس باڊس ؎ودب؎ود؎اع؏ میشود البته اگع برنامه name پایان پذیرفته باشد. + +-c command: +فرمان command عا قبل از اجرای nameا؏عا میکند. میتوانید چند فرمان ٞشت سع هم بیاورید. هر فرمان باید با –c شعوؚ شود. این فرمان هر چیزی از قبیل یک برنامه یا یک فرمان داس یا از این قبیل میتواند باشد. + +-fullscreen: +داس باڊس عا بؾوعت تمام صفحه ا؏عا میکند. + +-conf configfile: +داس باڊس عا ŘŻŘą حالت تنظیم شده ŘŻŘą فایل config ا؏عا میکند. چندین –conf میتوانید بگذارید. جهت اطلاعات بیشتر به قسمت 10 مراجعه نمایید. + +-lang languagefile: +داس باڊس عا با زبان تعریف شده ŘŻŘą فایل زبان مربوطه ا؏عا میکند. + +-machine machinetype: +داس باڊس عا برای شبیه سازی یک سیستم معین راه اندازی میکند.انتخابات قابل استفاده عبارتند از: hercules,cga,pcjr,tandy,vga(default) + +(فقط ویندوز)nOconsole: +داس باڊس عا بدون و؏ود یک پنجره اضافی ا؏عا میکند. خروجی به فایلهایstdout.txt وstderr.txt منتقل میشود. + +sTartmapper: +از ابتداواعد قسمت تنظیم کلیدها میشود. این برای اشخاصی که با صفحه کلید مشکل دارند مفید است. + +-nOautoexec: +قسمت مربوط به autoexec عا که مربوط به فایل تنظیمات است عا عد میکند. + +-sCaler scaler: +سایز صفحه مربوطه عا استفاده میکند. جهت دیدن سایزها موجود، فایل تنظیمات عا مشاهده نمایید. + +-forcescaler: +شبیه به دستوع قبلی است اما این دستوع سعی میکند که به هر ؾوعت سایز صفحه انتخابی عا ا؏عا کند حتی اگع ŘŻŘą صفحه نگنجد. + +-version: +اطلاعات مربوط به شماره نسخه برنامه عا میدهد. + +اگع هریک از name/command/configfile/languagefile دارای فاصله میباشد آنرا بءوع کامل ŘŻŘą"" قرار دهید. اگع حتی داخل "" هم نیاز به " باشد از '' استفاده نمایید. +مثال: "mount c 'c:\program files\'" + +برای مثال: +dosbox c:\atlantis\atlantis.exe -c "MOUNT D C:\SAVES" +این دستوع مسیر c:\atlantis عا بعنوان درایو c شناخته و atlantis.exe عا ا؏عا میکند البته قبل از آن مسیر C:\SAVES عا بعنوان درایو D سواع میکند. ŘŻŘą ویندوز شما همچنین میتوانید فایل یا یک مسیر عا با ماوس به داخل پنجره داس باڊس بکشیدتا ا؏عا شود. + +====== +4.برنامه هاي داخلي +====== +DOSBox بسياري از فرمانهاي داس موجود ŘŻŘą command.com عا پشتيباني مي كند. جهت اطلاع از ليست كاملي از اين فرمانها , HELP عا تايپ كنيد. + +همچنين فرمانهاي زير قابل استفاده هستند : +Mount "Emulated Drive Letter" "Real Drive or Directory" +[t type][-aspi][-ioctl][-noioctl][-usecd number][-size drivesize] +[-label drivelabel][-freesize size_in_mb][-freesize size_in_kb(floppies)] + +Mount –cd +Mount –u "Emulated Drive Letter" + +اين فرمان دايركتوري ها محلي عا بعنوان يك درايو ŘŻŘą DOSBox معرفي مي كند: + +- "Emulated Drive Letter": +حعف درايوي ŘŻŘą داخل DOSBox (مثل C) + +- "Real Drive (usually for CD-ROMs in Windows)": +دايركتوري اي كه مي خواهيد ŘŻŘą DOSBox قابل دسترسي باشد. + +--t type : +نوع دايركتوري معرفي شده . (پيش فع؜dir(و floppyو CDROM قابل استفاده هستند. +--size drive size : +سايز درايو عا تعيين مي كند و به يكي از صورتهاي "bps,spc,tcl,fcl" مي باشد: +bps: بايت ŘŻŘą هر سكتوع . بءوع پيش فع؜ 512 براي درايوهاي معمولي و 2048 براي درايوهاي سي دي +spc: سكتوع ŘŻŘą هر كلاستر, معمولا بين 1 تا 127 +bcl:مجموع كلاسترها, بين 1 تا 65534 +fcl: كل كلاسترهاي آزاد, بين 1 تا tcl. + +--free size_in_mb : +مقدار فضاي خالي موجود بع روي درايو عا بع حسب مگابايت (درايوهاي معمولي) يا كيلوبايت (درايو ديسك نرم) تعيين مي كند.اين پارامتر نسبت به پارامتر –size ساده ŘŞŘą است. + +--Label drivelabel : +نام درايو عا براي آن مشخص مي كند.براي برخي سيستم ها كه نام CD بدرستي خوانده نشده است يا برنامه نمي تواند CD-ROM عا پيدا كند مفيد است. +ŘŻŘą صورتيكه شما هيچ نامي تعيين نكنيدو هيچگونه ساٞوعت سءح پاييني هم انتخاب نشده باشد (اين به معناي استفاده از –noioctl و يا عدم استفاده از –usecd # يا –aspi است .): +اگع سيستم عامل شما ويندوز باشد , نام از داخل درايو واقعي است؎عا؏ مي شود , اما اگع از لينوكس استفاده مي كنيد, NO_LABEL بعنوان نام ؍بت مي گعدد. +اگع نامي تعيين شود, اين نام تا زمانيكه درايو شبيه سازي (Mount) شده است , نگه داري مي شود و بعوز نخواهد Ř´ŘŻ. + +--aspi : +ا؏باع به استفاده از لايه ASPI مي كند . تنها زماني مقدور است كه يك CD_ROM ŘŞŘ­ŘŞ سيستم عامل ويندوز (داراي لايه ASPI ) شبيه سازي شود. + + +- -ioctl: +ا؏باع به استفاده از فرمانهاي ioctl مي كند. تنها زماني مقدور است كه يك CD-ROM ŘŞŘ­ŘŞ سيستم عامل ويندوز (با پشتيباني از آنها) شبيه سازي شود.(WIN2000/XP/NT) + +- -noioctl: +ا؏باع به استفاده از لايه CD-ROM از نوع SDL مي كند . ŘŻŘą همه سيستمها عمليست. + +- -usecd number: +ا؏باع به استفاده از لايه SDL براي CD-ROM با شماره درايو معين مي كند.اين شماره عا مي توان توسء –cd يافت. ( مقدور براي همه سيستمها) + +- -cd: +شبيه سازي عا از كاع مي اندازد . براي Z:\ كاع نمي كند. + +توجه: مي توان يك دايركتوري محلي عا بعنوان CD-ROM شبيه سازي كعد . به اين ترتيب حمايت س؎ت افزاري از بين مي عود. + +اساسا Mount به شما اجازه مي دهد تا س؎ت افزاع واقعي عا به كامپيوتر مجازي DOSBox معرفي كنيد . لذا فرمان Mount C C:\Games به DOSBox دستوع ميدهد تا فولدر C:\Games عا به عنوان درايو C بشناسد. همچنين Mount به شما اجازه مي دهد تا حعف درايو معيني عا جهت استفاده از برنامه هايي كه به درايو با حعف خاصي احتياج دارند , به حعف مطلوب تغيير دهيد. + +براي مثال بازي Touch : Adventure of the Fifth Musketeer حتما بايد از روي درايو C ا؏عا شود . با استفاده از DOSBox و فرمان Mount شما مي توانيد به بازي بنمايانيد كه بازي ŘŻŘą درايو C نصب شده است . ŘŻŘą حاليكه شما آنرا هر حا كه دوست داشته ايد نصب كرده ايد. اگع بازي ŘŻŘą D:\OldGames\Touche قرار داشته باشد فرمان Mount C D:\OldGames به شما اجازه خواهد داد كه بازي عا از داخل درايو D ا؏عا كنيد. + +توجه كنيد كه شبيه سازي درايو C بءوع كامل با فرمان Mount C C:\ توصيه نمي شود .اين امر براي ريشه درايوهاي ديگر نيز صادق است ( ب؏ز CD-ROM بدليل خاصيت فقط خواندني كه داعد.) چرا كه ŘŻŘą اين ؾوعت ممكن است كل هر آنجه ŘŻŘą ريشه درايو داريد از بين بعود. +توصيه مي شود تمام بازيها و برنامه ها عا ŘŻŘą يك فولدر ؎اؾ قرار داده , آنرا شبيه سازي كنيد. + +مثالهايي كلي براي فرمان Mount: +1- شبيه سازي C:\dirX به عنوام يك فلاپي: +Mount a c:\dirx –t floppy +2- شبيه سازي درايو CD سيستم (E) بعنوان يك درايو CD ŘŻŘą DOSBox : +Mount d e:\ -t cdrom +3- شبيه سازي درايو CD ŘŻŘą موقعيت /media/cdrom , بعنوان درايو CD (D) ŘŻŘą DOSBox : +Mount d /media/cdrom –t cdrom –usecd +4- شبيه سازي يك درايو با حدود 870 مگابايت فضاي خالي (حالت ساده): +Mouunt c d:\ -freesize 870 +6- شبيه سازي يك درايو با حدود 870 مگابايت فضاي خالي ( فقط مخصوص كارشناسان , كنترل كامل) +Mount c d:\ -size 512,127,16513,13500 +7- شبيه سازي دايركتوري ايكه برنامه DOSBox ŘŻŘą آن نصب شده بعنوان درايو D ŘŻŘą DOSBox: +Mount d +. + +MEM +برنامه اي جهت نمايش مقدار فضاي خالي حافظه. + +CONFIG -writeconf localfile +CONFIG -writelang localfile +CONFIG -set "section property=value" +CONFIG -get "section property" + +اين برنامه داخلي جهت اعمال تغييرات و دسترسي به تنظيمات DOSBox استفاده مي شود.اين فرمان مي تواند تنظيمات جاري و زبان عا داخل ديسك ذخيره مي كند. +جهت اطلاع از همه بخشها و ؎واؾ موجود به قسمت 11 ( فايل تنظيم ) مراجعه كنيد. + +- -writeconf localfile: +تنظيمات جاري عا ŘŻŘą داخل فايل مي ريزد . "Local file" ŘŻŘą داخل درايو محلي قرار داعد و يك فايل شبيه سازي شده ŘŻŘą DOSBox نمي باشد. اين فايل تنظيمات مختلفي عا ŘŻŘą داخل DOSBox انجام مي دهد از قبيل مقدار حافظه شبيه سازي شده , كاعت صوتي شبيه سازي شده و بسياري موارد ديگر . همچنين اين فايل دسترسي به AUTOEXEC.BAT عا ممكن مي سازد. +اطلاعات كامل ŘŻŘą قسمت 11 (فايل تنظيم) . + +- -writelang localfile: +تنظيمات زبان جاري عا ŘŻŘą داخل فايل مي ريزد. . "Local file" ŘŻŘą داخل درايو محلي قرار داعد و يك فايل شبيه سازي شده ŘŻŘą DOSBox نمي باشد. فايل زبان همه خروجي هاي فرمانهاي داخلي و DOS داخلي زل كنترل مي كند. + +- -set "section property=value": +CONFIG سعي مي كند تا به يك خاصيت مقدار جديدي ا؎تؾاؾ دهد. ŘŻŘą نسخه حا؜ع DOSBox پيغامي عا ŘŹŘš به موفقيت يا عدم موفقيت اعمال مقدار جديد, ازسال نمي شود. + +- -get "section property"" : +اعزش خاصيت مربوطه عا گزاعش داده آنرا بعنوان يك متغير محيطي ŘŻŘą متغير %CONFIG% ذخيره مي كند.اين متغير عا مي توان ŘŻŘą هنگام كاع با فايلهاي BAT استفاده كعد. + +هر دوي "-set" و "-get" از داخل فايلهاي BAT قابل ا؏عا هستند و مي توانند جهت اعمال تنظيمات روي بازيها استفاده شوند. + +مثال : +1- ساختن يك فايل تنظيم ŘŻŘą داخل دايركتوري شما : +Config –writeconf dosbox.conf +2- تنظيم سيكل ٞعدازشگع روي 10000: +Config –set "cpu cycles=10000" +3- خاموش كردن شبيه سازي حافظه ems : +Config –set "dos ems=off" +4- چك كردن اينكه كدام هسته CPU ŘŻŘą حال استفاده است : +Config –get "Cpu core" + + +LOADFIX [-size][program][program-parameters] +LOADFIX –f + +جهت كاهش حافظه قابل دسترسي استفاده مي شود.مناسب براي برنامه هاي قديمي كه نيازي به حافظه خالي زياد ندارند. + +- -size: +تؚداد كيلوبايت جهت "eat up" . بءوع پيش فع؜ , 64 كيلوبايت. + +- -f: +تمام حافظه مورد استفاده پيشين عا آزاد مي كند. + +مثال: +1- اجراي mm2.exe و ا؎تؾاؾ 64 كيلوبايت به آن( mm2 كمتر از 64 كيلوبايت ŘŻŘą اختيار خواهد داشت: +Loadfix mm2 +2- اجراي mm2.exe و ا؎تؾاؾ 32 كيلوبايت به آن: +loadfix -32 mm2 +3- آزاد كردن حافظه: +Loadfix –f + +RESCAN +DOSBox عا واداع به بازخواني سا؎تاع دايركتوري مي كند.(با كليد CTRL+F4 نيز عمليست) +MIXER +جهت تنظيمات ولوم ,مورد استفاده قرار مي گيرد. +ŘŻŘą اينجا شما سا؎تاع فرمان عا مي بينيد: +Mixer channel left:right [/NOSHOW][/LISTMIDI] + +- channel: +مي تواند يكي از موارد مقابل باشد: MASTER,DISNEY,SPKR,GUS,SB,FM. + +- left:right: +سءح ولوم به دعؾد. ŘŻŘą صورتيكه يك حعف D جلوي اين فرمان قرار دهيد واحد آن برروي دسي بل تنظيم مي شود. (مثال mixer gus d-10) + +- /NOSHOW: +از نمايش نتايج ٞس از تنظيم ولوم جلوگيري مي كند. + +- /LISTMIDI: +همه ابزارهاي MIDI نصب شده بع روي ويندوز شما عا ليست مي كند.جهت انتخاب ابزاع MIDI غير از ابزاع پيش فع؜ ويندوز (midi-mapper) , ŘŻŘą قسمت [midi] فايل تنظيمات يك ؎ء با فرمان "config=id" اضافه كنيد."id" نشان دهنده شماره ابزاع مربوط است كه با فرمان LISTMIDI شماره آن نمايش داده مي شود . + +IMGMOUNT +يك برنامه كمكي جهت شبيه سازي تصاوير ديسك و CD-ROM ŘŻŘą DOSBox . + +IMGMOUNT DRIVE [imagefile] -t [image_type] -fs [image_format] + -size [sectorsbytesize, sectorsperhead, heads, cylinders] + +- imagefile: +محل فايل تصوير جهت شبيه سازي ŘŻŘą DOSBox مي باشد . اين محل مي تواند بع روي درايو شبيه سازي شده ŘŻŘą DOSBox يا واقعي باشد. امكان شبيه سازي چند تصوير CD-ROM با پسوند هاي ISO,CUE/BIN نيز و؏ود داعد. اگع نياز به تعويض مكرر CD داريد مي توانيد آنها عا بءوع متوالي تعريف كنيد و از كليد تركيبي CTRL+F4 جهت تعويض آنها استفاده كنيد. + +- -t: +ŘŻŘą زير انواع قابل استفاده جهت اين پارامتر (كه مربوط به نوع تصاوير است عا مي بينيد: + +<- floppy: نوع تصوير عا بع روي نوع فلاپي تنظيم مي كند. DOSBox بءوع ؎ودكاع هندسه ديسك عا تشخيص مي دهد ( 360KB,1.2MB,720KB,1.44MBو...) +-< iso: تصوير عا روي نوع iso تعيين مي كند . هندسه اتوماتيك بوده بع حسب سايز تنظيم مي شود. اين تصوير مي تواند يك فايل iso يا cue/bin باشد. +-< hdd: نوع تصوير عا بع روي نوع هارد ديسك تنظيم مي كند. ŘŻŘą اين مورد لازمست تا هندسه CHS مناسب تعيين گعدد. + + +--fs: +انواع زير قابل قبولند: +-< iso: فرمت عا روي ISO 9660 CD-ROM تعيين مي كند. +-< Fat: سيستم فايل عا از نوع FAT قرار مي دهد. DOSBox سعي مي كند تا تصوير عا بعنوان يك درايو ŘŻŘą DOSBox شبيه سازي كند. فايل ها از داخل DOSBox قابل دسترسي خواهند بود. +-< none: DOSBox هيچ اقدامي جهت خواندن سيستم فايل روي ديسك نمي كند. اين براي زمانيكه قصد فرمت كردن يا بوت كردن با استفاده از فرمان BOOT داريد, مفيد خواهد بود. +ŘŻŘą هنگام استفاده از سيستم فايل "none" شما بايد بجاي استفاده از حعف ,از اؚداد ( 2و3, 2= Master و 3=Slave) براي تعيين ترتيب درايوها استفاده كنيد. + +بعنوان مثال براي تعيين يك تصوير 70 مگابايتي بعنوان درايو Slave بايد تايپ كنيد: +imgmount 3 d:\test.img -size 512,63,16,142 -fs none +اينرا با حالتيكه يك شبيه سازي ŘŻŘą DOSBox براي خواندن درايو تعيين مي شود مقايسه كنيد كه بؾوعت زيرواهد بود: +imgmount e: d:\test.img -size 512,63,16,142 + +- -size: +تعيين سيلندرها , سرها(Heads)و سكتورهاي درايو كه ŘŻŘą هنگام تعيين تصويرها نياز مي شود عا بعهده داعد. + +يك مثال جهت نشان دادن چگونگي شبيه سازي تصويرهاي CD-ROM: + +1- الف:(پله 1) +mount c /tmp +1- ب :(پله 2) +imgmount d c:\myiso.iso -t iso +يا ( بعوش زير نيز عمليست): +2- +imgmount d /tmp/myiso.iso -t iso + +BOOT +اين فرمان تصوير فلاپي يا هاردديسك عا بسته به شبيه سازي سيستم عامل پيشنهادي توسء DOSBox , استاعت مي كند.اين به شما اجازه ميدهد تا با فلاپي هاي بوتي بازي كنيد يا اينكه سيستم عامل داخل DOSBox عا BOOT كنيد. +اگع سيستم شبيه سازي شده مورد نظر PCjr (ماشين=PCjr) باشد, فرمان BOOT جهت بارگذاري كارتريجهاي PCjr (.jrc) مورد استفاده قرار مي گيرد. + + +BOOT [diskimg1.img diskimg2.img .. diskimgN.img] [-l driveletter] +BOOT [cart.jrc] (PCjr only) +- - diskimgN.img: +مي تواند هر تؚداد فلاپي ديسك باشد كه قرار است ٞس از بوت شدن درايو معين شده , شيبه سازي (Mount) شود. جهت جايگزيني تصوير بعدي با تصوي حا؜ع , از كليد CTRL+F4 استفاده كنيد. ٞس از رسيدن به انتهاي ليست , بءوع ؎ودكاع از ابتدا آغاز مي شود. + +- -l driveletter: +اين پارامتر به شما اجازه مي دهد تا درايوي عا كه قرار است بوت روي آن ؾوعت گيرد , تعيين كنيد. بءوع پيش فع؜ اين درايو فلاپي درايو (A) مي باشد. همچنين شما مي توانيد تصوير هارد شبيه سازي شده عا با تايپ كردن "-1 C" بعنوان Master و با تايپ كردن ؚباعت "-1 D" بعنوان Slave , Boot كنيد. + +- cart.jrc: +هنگاميكه شبيه سازي يك PCjr فعال شده باشد , كارتريجها مي توانند توسء فرمان Boot بارگذاري شوند .ŘŻŘą حال حا؜ع اين قابليت پشتيباني محدودي داعد. + + +IPX +شما نياز به فعال كردن شبكه IPX ŘŻŘą فايل تنظيمات DOSBox دايد . +همه قسمتهاي شبكه IPX از طريق برنامه داخلي DOSBox به نام IPXNET مديريت مي شود.جهت يافتن اطلاعات بيشتر عا؏ؚ به IPX ŘŻŘą DOSBox تايپ كنيد: +IPXNET HELP +بدين ترتيب فرمانها و مطالب مربوط ليست خواهد Ř´ŘŻ. + +با توجه به اينكه ŘŻŘą هنگام راه اندازي يك شبكه نياز به يك سعوع مي باشد, بايد يك سيستم اين عمل عا بعهده بگيرد.براين انجام اينكار تايپ كنيد : +IPXNET STARTSERVER +ŘŻŘą اين زمان DOSBox session بءوع ؎ودكاع , ؎ود عا به شبكه IPX مجازي اضافه مي كند. حال هر كامپيوتر ديگري كه به اين شبكه IPX متصل شود , بايد تايپ كند: +IPXNET CONNECT +بعنوان مثال اگع سعوع شما ŘŻŘą آدعس bob.dosbox.com قرار داعد, شما بايد بع روي كامپيوتريكه سعوع نيست تايپ كنيد: +IPXNET CONNECT bob.dosbox.com + +جهت اجراي بازيهايي كهنياز به NetBios دارند , نياز به يك فايل اجرايي NETBIOS.EXE از ءعف نول (Novell) داريد.بنابراين شما ابتدا اعتباء عا طبق مطالب مذكور ايجاد نماييد, سٞس NETBIOS عا ا؏عا كنيد. + +ŘŻŘą زير مرجعي عا؏ؚ به فرمان IPXNET آورده شده است: +IPXNET CONNECT +IPXNET CONNECT يك اعتباء به سمت سعوع IPX ŘŻŘą حال اجرايي كه ŘŻŘą DOSBox session ديگري قرار داعد , ايجاد مي كند. پارامتر "address" آدعس IP يا نام كامپيوتر سعوع خواهد بود. بجاي آن از شماره ٞوعت UDP نيز مي توان استفاده كعد.بءوع پيش فع؜ IPXNET از شماره ٞوعت 213 (ٞوعت منسوب به IANA براي گذرگاه IPX ) جهت ايجاد اعتباء استفاده مي كند. + +نحوه صحيح نوشتن فرمان IPXNET CONNECT بؾوعت زير خواهد بود: +IPXNET CONNECT address + + +IPXNET DISCONNECT +IPXNET DISCONNECT اعتباء گذرگاه IPX به سعوع عا قطع مي كند, نحوه صحيح نوشتن آن بؾوعت زير است: +IPXNET DISCONNECT + +IPX STARTSERVER + +IPXNET STARTSERVER يك سعوع IPX ŘŻŘą DOSBox session ايجاد مي كند. بءوع پيش فع؜ همه اتصالهاي روي ٞوعت شماره 213 قابل پذيرش خواهند بود هرچند كه اين ؚدد قابل تغيير است.زمانيكه سعوع استاعت شده باشد , DOSBox بءوع اتوماتيك يك اعتباء مشتري به گذرگاه سعوع IPX ايجاد مي كند. + +طريقه صحيح نوشتن براي IPXNET STARTSERVER بؾوعت زير خواهد بود : +IPXNET STARTSERVER +اگع سعوع ŘŻŘą ٞشت يك دستگاه مسيردهي (router) قرار داشته باشد, نياز است كه شماره ٞوعت UDP () به آن كامپيوتر ارسال شود. + +بع روي سيستمهايي كه بع اساس Unix/Linux پايه گذاري شده اند, استفاده از شماره پورتهاي زير 1023 تنها با داشتن اجازه از ريشه قابل استفاده خواهند بود.ŘŻŘą اين سيستمها از شماره هاي بالاي 1023 استفاده كنيد. + +IPXNET STOPSERVER +IPXNET STOPSERVER گذرگاه سعوع IPX ŘŻŘą حال ا؏عا بع روي DOSBox session عا غيرفعال مي كند.بايد توجه شود كه همه كانكشنهاي ديگر از قبل منقطع شده باشند, چرا كه توقف سعوع ممكن است ŘŻŘą سيستمهايي كه ŘŻŘą حال استفاده از گذرگاه IPX هستند مشكل ايجاد كرده , آنها عا قفل كند. + +نحوه صحيح نوشتن اين فرمان بؾوعت زير است: +IPXNET STOPSERVER + +IPXNET PING +IPXNET PING يك دع؎واست ping ŘŻŘą گذرگاه IPX ارسال ميكند.ŘŻŘą ٞاس؎ همه كامپيوترهاي ديگر به اين دع؎واست ؏واب داده , مدت زمان عفت و بعگشت اين دع؎واست عا گزاعش ميدهند. + +نحوه صحيح نوشتن اين فرمان بؾوعت زير است: +IPXNET PING + +IPXNET STATUS +IPXNET STATUS وضعيت شبكه IPX جاري عا ŘŻŘą DOSBox session گزاعش ميدهد.جهت اطلاع از همه كامپيوتر هاي اتصال يافته به شبكه از فرمان IPXNET PING استفاده كنيد. + +نحوه صحيح نوشتن اين فرمان بؾوعت زير است: +IPXNET STATUS + + +KEYB [languagecode [codepage [codepagefile]]] +طرحبندي صفحه كليد عا تغيير مي دهد. اطلاعات كاملتر ŘŻŘą قسمت 7 عا؏ؚ به ءعح بندي صفحه كليد موجود است. + +[languagecode] +يك رشته تشكيل شده از 2 (و ŘŻŘą موارد ؎اؾ بيشتر از 2)كاعاكتع مي باشد .مثلا GK (يونان) يا IT (ايتاليا).اين پارامتر ءعح بندي مورد استفاده براي كيبورد عا مشخص مي كند. + +[codepage] +شماره صفحه كد (Codepage) عا تعيين مي كند.ءعح بندي كيبورد تعيين شده بايد از كدپيچ انتخاب شده پشتيباني كند , ŘŻŘą غير اينصورت بارگذاري طرحبندي كيبورد با مشكل مواجه خواهد Ř´ŘŻ.درصورتيكه هيچ كدپيجي انتخاب نشده باشد , يك كدپيج مناسب بءوع اتوماتيك براي طرحبندي تعيين شده , انتخاب ميشود. + +[codepagefile] +جهت بارگذاري كدپيج هايي كه هنوز ŘŻŘą DOSBox كمپايل نشده اند استفاده مي شود.اين تنها ŘŻŘą موارديكه DOSBox نمي تواند كدپيج عا بيابد مورد استفاده قرار مي گيرد. + +مثال: + +1) بارگذاري ءعح بندي آلماني ( بءوع اتوماتيك از كدپيج 858 استفاده مي كند): +Keyb gr +2) بارگذاري ءعح بندي روسي با كدپيج 866 : +Keyb ru 866 +به منظور تايپ كاراكترهاي روسي كليدتركيبي ALT+RIGHT-SHIFT عا فشاع دهيد. + +3) بارگذاري ءعح بندي فرانسوي با كدپيج 850 ( كدپيج ŘŻŘą EGACPI.DAT تعيين شده است): +keyb fr 850 EGACPI.DAT +4) بارگذاري كدپيج 858 (بدون طرحبندي صفحه كليد): +Keyb none 858 +اين ممكن است براي تغيير كدپيج, ŘŻŘą زمان استفاده از برنامه كمكي freedos keyb2 مفيد باشد. + +جهت كسب اطلاعات بيشتر ŘŻŘą مورد اين برنامه ها از /? ŘŻŘą ؎ء فرمان ٞس از نوشتن نام برنامه داخلي استفاده كنيد. + + + + +====== +5.كليدهاي مخصوص +====== +Alt-Enter: تمام صفحه نمايش +Alt-Pause: توقف(ايست) شبيه ساز +Ctrl-F1: نقشه صفحه كليد +Ctrl-F4: تغيير بين درايوهاي سواع شده +Ctrl-Alt-F5: شعوؚ/پايان ساختن يك فيلم از محتويات صفحه +Ctrl-F5: ؚكس گرفتن از صفحه +Ctrl-F6: شعوؚ/پايان ؜بء ؾدا +Ctrl-Alt-F7: شعوؚ/پايان ؜بء فرامين opl +Ctrl-Alt-F8: شعوؚ/پايان ؜بء فرامين raw midi +Ctrl-F7: كاهش سعؚت ؚبوع فريم ها +Ctrl-F8: افزايش سعؚت ؚبوع فريم ها +Ctrl-F9: ؎عو؏ از داس باكس +Ctrl-F10: گرفتن و رها كردن ماوس +Ctrl-F11: كاهش سعؚت كاع داس باكس +Ctrl-F12: افزايش سعؚت كاع داس باكس +Alt-F12: باز كردن قفل سعؚت +اين كليد هاي فوق ŘŻŘą نقشه صفحه كليد قابل تغيير هستند. +فايل هاي ذخيره شده(ؚكس يا ؾدا يا فيلم) عا ميتوانيد ŘŻŘą مسير current_directory/capture پيدا كنيد كه البته اين مسير ŘŻŘą فايل تنظيمات قابل تغيير است. +البته مسير شما بايد قبل از اجراي داس باكس موجود باشد ŘŻŘą غير اين ؾوعت چيزي ذخيره نميشود. +توجه: اولين باع كه شما سعؚت كاع داس باكس عا افزايش ميدهيد باؚ؍ كاهش سعؚت ميشود كه البته اين موضوع از يك كامپيوتر به كامپيوتر ديگر متفاوت است. + +====== +6. ءعاح كيبورد +====== +هنگاميكه ءعاح ا؏عا مي شود ( چه توسء كليد CTRL-F1 و چه با استفاده از پارامتر داسي –startmapper ٞس از نام فايل اجرايي DOSBOX ) يك كيبورد و جويستيك مجازي براي شما حا؜ع مي شود. +اين ورودي هاي مجازي همانهايي هستند كه DOSBOX به برنامه هاي داسي معرفي مي كند.با كليك بع روي هر كليد دكمه مربوط به آن و كليد(هاي) نسبت داده شده آن ŘŻŘą گوشه پايين چپ نمايان مي شود. + +Event :EVENT +BIND : BIND + + Add Del + Next +Mod1 hold +Mod2 +Mod3 + +EVENT: + دكمه كيبورد يا جويستيك كه ŘŻŘą داسباكس به برنامه ها ارسال مي شود. +BIND: + كليد هاي روي كيبورد يا جويستيك ( فرستاده شده توسء SDL) كه به رويداد (EVENT) فوق نسبت داده شده اند و با فشردن آنها رويداد (EVENT) ارسال مي شود. + +Mod1,Mod2,Mod3:(پيراينده ها) +با انتخاي اين حالات شما مجبور هستيد همزمان با فشردن كليد BIND آن ها عا فشاع دهيد تا رويداد (EVENT) ارسال شود. بءوع پيش فع؜ ŘŻŘą برنامه mod1=CTRL و mod2=ALT نسبت داده شده اند. اين پيراينده ها عموماً ŘŻŘą جاييكه نياز به تغيير كليدهاي مخصوص باشد استفاده مي شوند. + +Add: +يك كليد به رويداد (EVENT) اضافه مي كند.اين كليد مي تواند يكي از كليدهاي كيبورد يا يك دكمه (جهت يا كليد) ŘŻŘą جويستيك باشد. + +Del: +كليد (BIND) اضافه شده عا ٞاك مي كند.اگع رويدادي (EVENT) به هيچ كليدي (BIND) منسوب نشده باشد , هيچ راهي براي انحام دادن آن رويداد و؏ود ندارد.( بعبارتي نمي توانيد آن كاعاكتع ؎اؾ مربوط به رويداد عا تايپ , يا از عملكرد ؎اؾ آن رويداد ŘŻŘą برنامه استفاده كنيد.) + +NEXT: +كليد (BIND) بعدي نسبت داده شده به رويداد (EVENT) عا نشان ميدهد. + +مثال: + +سوال 1 : مي خواهيم با فشردن كليد X بع روي كيبورد حعف Z تايپ شود. + +؏واب : بع روي صفحه كيبورد نشان داده شده روي خانه Z كليك كنيد , سٞس كليد X عا فشاع دهيد. + +سوال 2 : حال با دو باع كليك بع روي NEXT مي بينيم كه حعف Z بازهم ŘŻŘą كليد ها (BIND ها ) قرار داعد كه اين باؚ؍ مي شود تا بتوانيم با فشردن كليد Z نيز حعف Z عا ŘŻŘą DOSBOX تايپ كنيم ] ŘŻŘą حاليكه مطلوب ما اينست كه تنها با X اين كاع عملي باشد[. + +؏واب : خانه Z عا انتخاب كنيد و تا هنگاميه كليد Z ŘŻŘą قسمت BIND ها نمايان شده NEXT عا كليك كنيد , ٞس از مشاهده Z بع روي Del كليك كنيد. + +سوال 3 : ]حال بازهم مشكلي و؏ود داعد [ اگع ŘŻŘą DOSBOX كليد X عا فشاع دهيم نه تنها حعف Z بلكه حعف X هم تايپ مي شود (ZX). + +؏واب: كليد X دو رويداد عا ا؏عا مي كند هم Z و هم X . روي خانه X كليك كرده با كمك NEXT , X عا ŘŻŘą كليدها (BIND ها ) پيدا كنيد , سٞس روي Del كليك كنيد. + +مثالهايي عا؏ؚ به تغيير ءعح دكمه هاي جويستيك : + +مثال1 : +شما يك جويستيك متصل به كامپيوتر داريد كه به درستي كاع مي كند و قصد داريد تا بازيهايي عا كه تنها با كيبورد قابل ا؏عا هستند عا توسء جويستيك انجام دهيد ( فع؜ مي كنيم كه يك بازي تنها با كليد هاي جهت ( چپ و عاستو بالا و پايين) قابل كنترل است.): + +1- ءعاح صفحه كليد عا ا؏عا كنيد , روي يكي از خانه هاي مربوط به جهت (بالاي خانه هاي MOD ) كليك كنيد. +رويداد نشان داده شده بايد key_left باشد. حال بع روي Add كليك كنيد و جهت مربوطه عا روي جويستيك فشاع دهيد. حال يك كليد به كليدهاي قبلي (BIND هاي قبلي( اضافه مي شود. + +2- اينكار عا براي 3 جهت ديگر نيز انجام دهيد , همجنين اين تغييرات براي ساير دكمه هاي جويستيك قابل انجام است . (ٞعش – شليك) + +3- بع روي Save كليك كرده , با كليك بع روي Exit از ءعاح ؎اع؏ شويد و نتيجه عا ŘŻŘą يك بازي امتحان كنيد. + +مثال2 : +شما مي خواهيد كه محور عمودي جويستيك ؎ود عا ؏اب؏ا كنيد چرا كه برخي شبيه سازهاي ٞعواز از اين محور (بالا و پايين ) به روشي كه شما دوست نداريد استفاده مي كنند و انجام تغييرات ŘŻŘą بازي غير ممكن است. + +1- ءعاح عا ا؏عا كنيد و بع روي -Y ŘŻŘą خانه هاي جويستكي بالايي ( براي جويستكي اول اگع 2 جويستيك داريد) و بع روي خانه هاي جويستيك پاييني ( براي جويستكي دوم اگع 2 جويستيك داريد) كليك كنيد . رويداد نسبت داده شده بايد به اين ؾوعت باشد : jaxis_0_1- ( يا jaxis_1_1-). + +2- بع روي Del كليك كنيد تا رويداد مذكور ٞاك شود , حال بع روي Add كليك كرده و جويستيك عا به پايين فشاع دهيد. يك كليد (BIND) جديد ساخته مي شود. + +3- اينكار عا براي Y+ نيز انجام دهيد , كاع عا ذخيره (Save) كنيد و نتيجه عا ŘŻŘą يك بازي تست كنيد. + +ŘŻŘą صورتيكه شما ءعح پيش فع؜ عا تغيير دهيد, شما مي توانيد تغييرات عا باكليك بع روي Save ذخيره كنيد.DOSBOX ءعح جديد عا ŘŻŘą مكانيكه ŘŻŘą فايل تنظيمات (configfile) مشخص شده است , ذخيره مي كند (mapperfile=mapper.txt). هنگاميكه DOSBOX ا؏عا مي شود اين فايل ءعح ŘŻŘą صورتيكه ŘŻŘą فايل تنظيمات تعيين شده باشد, بازخواني مي شود. + +====== +7.ءعح بندي صفحه كليد +====== +براي تغيير ءعح بندي صفحه كليد يكي از روشهاي زير قابل انجام است: +1- استفاده از عباري "Keyboadlayout" ŘŻŘą قسمت [dos] فيال dosbox.conf. +2- استفاده از برنامه داخلي keyb.com. + +ŘŻŘą هر دوي اين عوش ها كدهاي زبان مطابق با داس قابل پذيرش است( شعح ŘŻŘą زير). اما تنها بااستفاده از عوش دوم است كه مي توان يك صفحه كد سفارشي تعيين كعد. + +تغيير ءعح بندي : +DOSBox تعدادي ءعح بندي (layout) و صفحه كد (codepage) از پيش تعييد شده داعد. به منظور استفاده از آنها كافيست كه شناسه ءعح بندي تعيين شود .( مثلا ŘŻŘą فايل تنظيمات قرار مي دهيم keyboardlayout=sv و يا ŘŻŘą ؎ء فرمان DOSBox مي كنيم keyb sv.) + +برخي ءعح بندي ها ( براي مثال ءعح بندي GK Codepage 869 و RU Codepage 808 )از ءعح بندي دوگانه پشتيباني ميكنند كه جهت فعالسازي و يا از كارانداختن ءعح ديگر به ترتيب بايد كليدهاي Left-Alt+Right-Shift و يا Left-Alt+Left-Shift فشرده شوند. + +فايل هاي خارجي مورد پذيرش : +فايلهاي freedos.kl به مانند فايلهاي مجموعه اي freedos , keyboard.sys يا keybrd2.sys يا keybrd3.sys كه شامل همه فايلهاي .kl موجود مي باشد, پشتيباني مي شوند. +جهت مشاهده ءعح بندي هاي كمپايل نشده از سايت ديدن كنيد . چرا كه ممكن است ءعح بندي جاسازي شده ŘŻŘą DOSBox به دلائلي كاع نكند يا بعوز شده باشد و يا ءعح بندي هاي جديدي قابل استفاده باشد. + +جهت فايلهاي صفحه كد (codepage) هر دو نوع فايل .CPI(MSDOS/compatible codepage files) و فايل .CPX(freedos UPX-compressed codepage files) قابل استفاده مي باشند. برخي كدپيجها ŘŻŘą DOSBox كمپايل شده اند و نيازي به نگراني جهت اين فايلهاي خارجي نيست . اما اگع احتياج به استفاده از يك كدپيج متفاوت يا سفارشي داريد ميتوانيد آنرا ŘŻŘą دايركتوري شامل فايل تنظيمات DOSBox كپي كنيد تا براي DOSBox قابل دسترسي باشد. + +جهت فايلهاي ءعح بندي (layout) مي توان آنها عا با كپي كردن فايل .kl مربوطه ŘŻŘą دايركتوري شامل فايل تنظيمات DOSBox و استفاده قسمت اول نام فايل بعنوان زبان كد , به برنامه اضافه كعد. + +مثال: براي فايل UZ.kl ( ءعح بندي مربوط به زبان كشوع ازبكستان) ] ٞس از كپي كردن فايل[ مي توانيد آنرا با نوشتن "keboardlayout=uz" ŘŻŘą dosbox.conf معرفي كنيد. +باقي بسته هاي ءعح بندي كيبورد (مانند keybrd2.sys) نيز بءوع مشابه كاع مي كنند. + +توجه : دعست است كه ءعح بنديهاي كيبورد به شما اجازه تايپ كاراكترهاي خارجي عا ميدهد , ليكن اين ŘŻŘą مورد نام فايلها صادق نيست. سعي كنيد حتي الامكان از انجام اين كاع چه ŘŻŘą مورد نام فايلها ŘŻŘą محيط DOSBox و چه ŘŻŘą مورد نام فايلهايي كه DOSBox به آنها دسترسي داعد , ŘŻŘą محيط سيستم عامليكه با آن كاع مي كنيد , دوري كنيد. + + +====== +8.اتصال شبكه +====== +داس باكس همچنين قابليت شبيه سازي يك شبكه عا داعا ميباشد كه ŘŻŘą قالب [serialports] ŘŻŘą فايل تنظيمات موجود ميباشد. +جهت ساختن يك اتصال مودم يك ءعف بايد سعوع شده و ديگري ميهمان. +سعوع عا بايد به اين ؾوع تنظيم نمود: +Serial1=nullmodem +و ميهمان: +Serial1=nullmodem server: +حالا بازي عا ا؏عا نموده و nullmodem/serial cable/ عا كه تنظيم نموده ايد عا بعنوان اتصال روي com1انتخاب نماييد. مقدار baudrate عا روي هر دو سيستم يكسان انتخاب نماييد. +بعلاوه پارامترهاي اضافي ديگري عا نيز ميتوانيد تنظيم نماييد كه از اين قرار هستند: +Port: شماره ٞوعت tcp ميباشد كه پيش فع؜ آن 23 است +Rxdelay: ميزان تاخير ŘŻŘą دريافت داده ها اگع ورودي آماده نباشد.اگع با خطاهايي مواجه شديد اين مقدار عا افزايش دهيد. پيش فع؜ آن 100 است. +Txdelay: ميزان تاخير براي جمع آوري داده ها قبل از ارسال آنها. پيش فع؜ آن 12 است. +Server: اين مودم يك ميهمان خواهد بود براي سعوع معرفي شده بدون معرفي آن، مودم سعوع ميشود. +Transparent:1 فقط داده هاي سريال عا ارسال ميكند و نه rts/dtr عا.اين عا وقتي كه با چيزي ؏ز nullmodem وصل ميشويد استفاده نماييد. +telnet:1 داده هاي شبكه عا از سايت كنترل تفسير ميكند. بءوع ؎ودكاع نوع transparent عا تنظيم ميكند. +Usedtr:1 اتصال وصل نميشود تا اينكه dtr بوسيله برنامه ŘŞŘ­ŘŞ داس انتخاب شود. براي درگاههاي مودم مفيد است. +Inhsocket:1 يك ورودي عا بوسيله ؎ء فرمان استفاده ميكند. بؾوعت ؎ودكاع transparent است. +مثال: +ميخواهيم يك سعوع روي ٞوعت 5000 باشيم. +Rxdelay:1000 Serial1=nullmodem server: port:5000 +====== +9.اجراي بازيهايي كه كند هستند +====== +داس باكس سي پي يو،كارت ؾدا و كاعت گرافيك و ديگر قسمتهاي يك كامپيوتررا همه عا ŘŻŘą يك آن شبيه سازي ميكند. سعؚت اجراي يك برنامه ŘŞŘ­ŘŞ داس بستگي به اين داعد كه چه تؚداد عملكرد شبيه سازي بشوند(تؚداد چرخه ها). + +-چرخه هاي سي پي يو: +بءوع پيش فع؜ تؚداد چرخه ها بعابع با auto تنظيم شده است.داس باكس سعي ميكند تا تشخيص دهد كه يك بازي به چه ميزان عملكرد ممكن نياز داعد.شما ميتوانيد اين رويه عا بوسيله تنظيم cycles=max ŘŻŘą فايل تنظيمات مجبور به حداك؍ع نماييد.پنجره داس باكس ŘŻŘą يك سءع ؚباعت cpu cycles:max عا نمايش خواهد داد. ŘŻŘą اين حالت شما ميتوانيد بوسيله تركيب كليدهاي ctrl-F11 كاهش داده يا بوسيله ctrl-F12 افزايش دهيد. +بعضي وقتها تنظيم دستي آن نتيجه بهتري عا ميدهد مثلا ŘŻŘą فايل تنظيمات تؚداد چرخه عا بعابع 30000 قرار دهيد.هنگام اجراي بعضي برنامه هاي ŘŞŘ­ŘŞ داس بوسيله همان كليدهاي فوق ميتوانيد حتي بيشتر هم آنرا افزايش دهيد اما ŘŻŘą اينجا ممكن است توان سي پي يو واقعي شما عا محدود كند. براي اين منظور جهت اطلاع از ميزان توان سي پي يو ؎ود ميتوانيد به قسمت task manager ŘŻŘą ويندوز ايكس پي و يا system monitor ŘŻŘą ويندوز 98/me مراجعه نماييد.وقتي از حداك؍ع توان cpu ؎ود بهره برديد ديگر نميتوانيد سعؚت عا بيشتر نماييد مگر اينكه ديگر تنظيماتي عا كه مربوط به cpu نميشوند عا ŘŻŘą داس باكس كاهش دهيد. + +هسته هاي cpu +ŘŻŘą ٞعدازش گرهاي x86 شما ميتوانيد سيستم عا مجبور به استفاده از حافظه پويا نماييد(بوسيله تنظيم core=dynamic ŘŻŘą فايل تنظيمات). غالبا اين كاع نتيجه بهتري عا نسبت به حالت تنظيم ؎ودكاع ميدهد. اگع اين كاع عا همراه با cycles=max انجام دهيد ديگر بهتر ميشود. البته توجه كنيد كه ŘŻŘą بعضي بازيها ممكن است بدتع شود يا اصلا كاع ندهد. + +شبيه سازي گرافيك: +شبيه سازي گرافيك يك قسمت بسيار مهم ŘŻŘą داس باكس است كه از cpu استفاده زيادي ميكند. تؚداد فريم عا ميتوانيد با كليدهاي ctrl-F8 افزايش دهيد. اگع از يك cycle ؍ابت استغاده نماييد ميزان استفاده از cpu هم كاهش مي يابد. يك قدم به عقب برويد و اين كاع عا تكعاع نماييد تا سعؚت مناسب حاصل شود. + +شبيه سازي كاعت ؾدا: +شما ميتوانيد ؾدا عا قطع كنيد تا بازدهي cpu بالا ŘŞŘą عود. با تنظيم nosound=true شبيه سازي ؾدا انجام نمي شود و فقط خروجي ؾدا قطع ميشود. +همچنين سعي كنيد كه از برنامه هاي اضافي ؎اع؏ شويد. + +تنظيمات پيشرفته چرخه ها: +تنظيمات cycles=auto و cycles=max ميتوانند نتايج متفاوتي عا داشته باشند.نحوه كاع به اين ؾوعت است: +cycles=auto ["realmode default"] ["protected mode default %"] + [limit "cycle limit"] +cycles=max ["protected mode default"%] [limit "cycle limit"] +مثال: +Cycles=auto 1000 80% limit 20000 +اين دستوع cycles=1000 عا براي بازيهاي واقعي استفاده ميكند بعلاوه 80 دعؾد از كنترل cpu و حداك؍ع چرخه 20000 + +====== +10.مشکلات ا؏عا +====== +داس باڊس بؚد از ا؏عا و شعوؚ ڊاع ؎عاب میشود: +- مقادیر متفاوتی عا برای output=entry ŘŻŘą فایل تنظیمات داس باڊس +- درایور ڊاعت گرافیک ؎ود عا جدید کنید. +هنگام اجرای بازی داس باڊس یک پیغام ؎ءا میدهد یا قفل میکند: +- امتحان کنید که آیا با یک فایل تنظیماتی که هیچ تغییری ŘŻŘą آن نداده این ڊاع میکند؟ +- ؾوت عا غیر فعال سازید.که یا ŘŻŘą تنظیمات بازی میتوانید این ڊاع عا انجام دهید یا با ؎ود داس باڊس به این ؾوعت: sbtype=none و gus=false انجام دهید. +- بعضی از قسمتهای فایل تنظیم عا تغییر دهید مخصوصا قسمتهای زیر: + Core=normal یا cycles=10000 یا ems=false یا xms=false + یا ترکیبی از آنها +- از loadfix پیش از اجرای بازی استفاده کنید. +از بازی ؎ودب؎ود ؎اع؏ میشود و پیغام ؎ءا میدهد: +- پیغام ؎ءا عا خوانده و سعی کنید بفهمید مربوط به چه قسمتی است. +- اسم درایوی عا که سواع کرده اید تغییر دهید. برای مثال اگع درایوی که سواع کرده اید به این ؾوعت است: mount d:\oldgames\game آنرا به این ؾوعت تغییر دهید: mount c d:\oldgames\game و یا به این ؾوعت: mount c d:\oldgames +- اگع بازی نیاز به سی دی ŘŻŘą هنگام ا؏عا داعد حتما از t cdrom- برای سواع کردن استفاده نمایید. +- اجازه های بازی عا چک کنید یعنی read only نباشد یا مخفی و غیره نباشد. +- سعی کنید که بازی عا دوباره نصب کنید آنهم از داخل ؎ود داس باڊس +====== +11.فایل تنظیمات +====== +این فایل بوسیله دستوع config.com میتواند ساخته شود که ŘŻŘą درایو Z موجود است.برای اطلاعات ŘŻŘą این مورد به قسمت برنامه های داخلی ŘŻŘą این راهنما مراجعه کنید.شما همچنین میتوانید فایل ساخته شده تنظیمات عا نیز ویرایش کنید.این فایل به چندین قسمت تقسیم شده است. هر قسمت با علامت [] مشخص گردیده.بعضی قسمتهای این فایل عا شما میتوانید به سلیقه ؎ود تغییر دهید. علامات #و% نشان دهنده توضیحات میباشد. این فایل ساخته شده شامل تنظیمات داس باڊس ŘŻŘą حال حا؜ع میباشد. شعوؚ داس باڊس همراه با سوییچ –conf تعیین میکند که کدام فایل تنظیمات عا برمیگزینید.داس باڊس ابتدا ŘŻŘą مسیر ~/.doxboxrc (ŘŻŘą لینوکس) رفته و یا ŘŻŘą ویندوز به مسیر~/doxbox.conf و فایل تنظیمات عا تجزیه میکند. سٞس فایل تنظیماتی عا که بؚد از سوییچ –conf آورده اید چک میکند. اگع چیزی پیدا نکرد فایل تنظیماتی عا که ŘŻŘą دایرکتوری جاری موجود میباشد عا انتخاب میکند. + +====== +12.فایل زبان +====== +یک فایل زبان بوسیله CONFIG.COM قابل تولید است CONFIG -writelang langfile))آنرا بخوانید. وبه این ؾوعت خواهید توانست که چطور آنرا تغییر دهید. اگع داس باڊس عا به فرمان –lang ا؏عا کنید میتوانید زبان جدیدی عا تعیین کنید. و سٞس شما میتوانید ŘŻŘą فایل تنظیمات نام فایلی عا ŘŻŘą قسمت [doxbox] به آن ا؎تؾاؾ دهید. درآنجا قسمتی است به عنوان language= که خالی است که میتوانید نام فایل زبان عا جلوی آن واعد کنید. + +====== +13. ساختن يک نسخه از داس باڊس مخصوص خودتان +====== +فایل ÚŠŘŻ برنامه نویسی داس باڊس عا دانلود کرده +و این ڊاع عا انجام دهید. + +====== +14.ŘŞŘ´ÚŠŘą مخصوص +====== +فایل مربوطه عا مشاهده نمایید + +====== +15.تماس با ما +====== +به آدعس زیر مراجعه کنید: +http://dosbox.sourceforge.net +جهت مشاهده آدعس ایمیل به آدعس بالا رفته و سٞس به صفحه Crew-page مراجعه نمایید. + + +Translated By Ali Jafary - Mehdi Jafari +E-mail:rester_sabt@yahoo.com +Web-Site:rester.blogfa.com + Resterkits.blogfa.com + +]ترجمه شده توسء : علي جعفري – مهدي جعفري[ + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/fa/version.txt dosbox-staging-0.77.0/contrib/old-translations/fa/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/fa/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/fa/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Persian 0.72 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/fi/dosbox.conf dosbox-staging-0.77.0/contrib/old-translations/fi/dosbox.conf --- dosbox-staging-0.76.0/contrib/old-translations/fi/dosbox.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/fi/dosbox.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,193 @@ +[sdl] +# fullscreen -- K„ynnist„ Dosbox heti koko n„yt”n tilassa. +# fulldouble -- K„yt„ kaksoispuskurointia koko n„yt”n tilassa. +# fullresolution -- Mit„ tarkkuutta k„ytet„„n koko n„yt”n tilassa: alkuper„ist„ vai kiinte„t„ kokoa (esim. 1024x768). +# windowresolution -- Porrasta ikkuna t„h„n kokoon, mik„li n„ytt”laite tukee laitteistoporrastusta. +# output -- Mit„ tulostelaitetta k„ytet„„n: surface,overlay,opengl,openglnb,ddraw. +# autolock -- Hiiri lukittuu itsest„„n kuvaruutua napsauttaessa. +# sensitiviy -- Hiiren herkkyys. +# waitonerror -- Odottaa, ennen konsolin sulkemista, mik„li Dosbox on kohdannut virheen. +# priority -- Dosboxin prioriteettitasot: lowest,lower,normal,higher,highest,pause (mik„li ei p„„llimm„isen„). +# Pilkun per„ss„ olevaa toista kohtaa k„ytet„„n silloin kun Dosbox ei ole p„„llimm„isen„ tai on pienennetty. +# mapperfile -- N„pp„in- ja tapahtumakartoitusten lataamiseen ja tallentamiseen k„ytett„v„ tiedosto +# usescancodes -- V„lt„ symkeys-n„pp„inten k„ytt”„, ei v„ltt„m„tt„ toimi kaikilla k„ytt”j„rjestelmill„. + +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper.txt +usescancodes=true + +[dosbox] +# language -- Valitse muu kielitiedosto. +# memsize -- Dosboxin muistin m„„r„ megatavuina. +# machine -- Emuloitavan koneen tyyppi:hercules,cga,tandy,pcjr,vga. +# captures -- Hakemisto, jonne aalto„„ni-, midi- ja n„ytt”kuvatiedostot kaapataan. + +language=Finnish.lng +machine=vga +captures=capture +memsize=16 + +[render] +# frameskip -- Kuinka monta kehyst„ Dosbox ohittaa ennen kehyksen piirt„mist„. +# aspect -- Suorita suhteen oikaisu. Jos tulostemenetelm„si ei tue porrastusta, t„m„ saattaa hidastaa emulointia! +# scaler -- Pientarkkuuksisten tilojen suurentamiseen ja parantamiseen k„ytett„v„ porrastin +# Tuetut valinnat ovat: none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x, +# 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x, +# tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x. + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core -- emuloinnissa k„ytetty suoritinydin: normal,simple,dynamic,auto. +# auto switches from normal to dynamic if appropriate. +# cycles -- M„„r„„, kuinka monta k„sky„ Dosbox pyrkii millisekunnissa emuloida. +# T„m„n arvon asettaminen liian suureksi aiheuttaa „„nen katkoilua ja viiv„stymisi„. +# Dosboxin voi my”s panna arvaamaan sopiva arvo k„ytt„m„ll„ asetusta max. +# Oletusasetus (auto) vaihtuu tarpeen vaatien arvoksi max. +# cycleup -- M„„r„„, kuinka paljon n„pp„inyhdistelm„ nostaa tai laskee suoritinjaksojen m„„r„„. +# cycledown Arvon asettaminen lukua 100 pienemm„ksi kertoo prosenttiosuudesta. + +core=auto +cycles=auto +cycleup=500 +cycledown=20 + +[mixer] +# nosound -- K„ytt„„ hiljaista tilaa, „„ni emuloidaan kuitenkin. +# rate -- Mikserin n„ytteenottotaajuus, laitteiden asettaminen t„t„ suuremmaksi +# saattaa laskea laitteiden „„nenlaatua. +# blocksize -- Mikserin lohkokoko, suuremmat lohkot saattavat auttaa „„nen katkoilua, +# mutta „„ni samalla viiv„styy. +# prebuffer -- How many milliseconds of data to keep on top of the blocksize. + +nosound=false +rate=22050 +blocksize=2048 +prebuffer=10 + +[midi] +# mpu401 -- Emuloitavan MPU-401-laitteen tyyppi: none, uart vai intelligent. +# device -- Laite, joka vastaanottaa MIDI-tietoa MPU-401-laitteelta. +# T„m„ voi olla default,alsa,oss,win32,coreaudio,none. +# config -- Laitteen erityisasetukset. Windowsissa pane haluamasi laitteen +# id-tunniste. Katso lis„tietoja README-tiedostosta. + +mpu401=intelligent +device=default +config= + +[sblaster] +# sbtype -- Emuloitavan SoundBlasterin tyyppi:none,sb1,sb2,sbpro1,sbpro2,sb16. +# sbbase,irq,dma,hdma -- SoundBlasterin IO/IRQ/DMA/High DMA-osoitteet. +# mixer -- Anna SoundBlasterin mikserin muokata Dosboxin mikseri„. +# oplmode -- OPL-emuloinnin tyyppi: auto,cms,opl2,dualopl2,opl3. +# Auto-tilassa tila m„„ritet„„n sblaster-tyypin mukaan. +# Kaikki OPL-tilat ovat 'Adlib'-tyyppisi„ paitsi CMS. +# oplrate -- OPL-musiikkiemuloinnin n„ytteenottotaajuus. + +sbtype=sb16 +sbbase=220 +irq=7 +dma=1 +hdma=5 +mixer=true +oplmode=auto +oplrate=22050 + +[gus] +# gus -- Ota k„ytt””n Gravis Ultrasound -emulointi +# gusbase,irq1,irq2,dma1,dma2 -- Gravis Ultrasoundin IO-, IRQ- ja DMA-osoitteet. +# (Sama IRQ ja DMA kelpaa.) +# gusrate -- Ultrasound-emuloinnin n„ytteenottotaajuus. +# ultradir -- Ultrasound-hakemistopolku. T„ss„ hakemistossa +# pit„isi olla MIDI-hakemisto, joka sis„lt„„ +# GUS-toiston paikkaustiedostot. Timidityn yhteydess„ +# k„ytett„vien paikkausasetelmien pit„isi toimia mainiosti. + +gus=true +gusrate=22050 +gusbase=240 +irq1=5 +irq2=5 +dma1=3 +dma2=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker -- K„yt„ PC-speaker-kaiuttimen emulointia. +# pcrate -- PC-speaker-kaiuttimen „„nentuoton n„ytteenottotaajuus. +# tandy -- K„yt„ Tandy Sound System -emulointia (off,on,auto). +# Auto-tilassa Tandy Sound System -emulointi on saatavilla vain, jos machine-arvolle on asetettu arvo tandy. +# tandyrate -- Tandy 3-Voice -perheen n„ytteenottotaajuus. +# disney -- K„yt„ Disney Sound Source -emulointia. + +pcspeaker=true +pcrate=22050 +tandy=auto +tandyrate=22050 +disney=true + +[joystick] +# joysticktype -- Emuloitavan peliohjaimen tyyppi: auto (default), none, +# 2axis (tukee kahta peliohjainta), 4axis, +# fcs (Thrustmaster), ch (CH Flightstick). +# none poistaa k„yt”st„ peliohjaimen emuloinnin. +# auto valitsee emuloinnin todellisten peliohjainten mukaan. +# timed -- k„ytt„„ akselissa ajastettuja intervalleja. (false on vanhanmallinen tapa). +# autofire -- ampuu jatkuvasti niin kauan kuin painiketta pidet„„n painettuna. +# swap34 -- vaihtaa 3. ja 4. akseleiden paikkaa. voi olla hy”dyllinen tietyill„ peliohjaimilla. +# buttonwrap -- k„ytt„„ painikkeen vaihtoa tietyll„ m„„r„ll„ emuloituja painikkeita. + +joysticktype=auto +timed=true +autofire=false +swap34=false +buttonwrap=true + +[serial] +# serial1-4 -- Aseta com-porttiin kytketyn laitteen tyyppi. +# Voi olla: disabled, dummy, modem, nullmodem, directserial. +# Lis„parametrien on oltava samalla rivill„ parametri:arvo- +# muodossa. Kaikkien tyyppien parametrina on irq. +# tyypille directserial: realport (pakollinen), rxdelay (valinnainen). +# tyypille modem: listenport (valinnainen). +# tyypille nullmodem: server, rxdelay, txdelay, telnet, usedtr, +# transparent, port, inhsocket (kaikki valinnaisia). +# Esimerkki: serial1=modem listenport:5000 + +serial1=dummy +serial2=dummy +serial3=disabled +serial4=disabled + +[dos] +# xms -- K„yt„ XMS-tukea. +# ems -- K„yt„ EMS-tukea. +# umb -- K„yt„ UMB-tukea. +# keyboardlayout -- N„pp„imist”asettelun kielikoodi (tai none) + +xms=true +ems=true +umb=true +keyboardlayout=none + +[ipx] +# ipx -- K„yt„ ipx:„„ UDP/IP-emuloinnin p„„ll„. + +ipx=false + +[autoexec] +# T„m„n lohkon rivit ajetaan k„ynnistyksen yhteydess„. +keyb su +#mount c C:\Pelit\ +#C: diff -Nru dosbox-staging-0.76.0/contrib/old-translations/fi/Finnish.lng dosbox-staging-0.77.0/contrib/old-translations/fi/Finnish.lng --- dosbox-staging-0.76.0/contrib/old-translations/fi/Finnish.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/fi/Finnish.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,661 @@ +:SDL_CONFIGFILE_HELP +fullscreen -- K„ynnist„ Dosbox heti koko n„yt”n tilassa. +fulldouble -- K„yt„ kaksoispuskurointia koko n„yt”n tilassa. +fullresolution -- Mit„ tarkkuutta k„ytet„„n koko n„yt”n tilassa: alkuper„ist„ vai kiinte„t„ kokoa (esim. 1024x768). +windowresolution -- Porrasta ikkuna t„h„n kokoon, mik„li n„ytt”laite tukee laitteistoporrastusta. +output -- Mit„ tulostelaitetta k„ytet„„n: surface,overlay,opengl,openglnb,ddraw. +autolock -- Hiiri lukittuu itsest„„n kuvaruutua napsauttaessa. +sensitiviy -- Hiiren herkkyys. +waitonerror -- Odottaa, ennen konsolin sulkemista, mik„li Dosbox on kohdannut virheen. +priority -- Dosboxin prioriteettitasot: lowest,lower,normal,higher,highest,pause (mik„li ei p„„llimm„isen„). + Pilkun per„ss„ olevaa toista kohtaa k„ytet„„n silloin kun Dosbox ei ole p„„llimm„isen„ tai on pienennetty. +mapperfile -- N„pp„in- ja tapahtumakartoitusten lataamiseen ja tallentamiseen k„ytett„v„ tiedosto +usescancodes -- V„lt„ symkeys-n„pp„inten k„ytt”„, ei v„ltt„m„tt„ toimi kaikilla k„ytt”j„rjestelmill„. +. +:DOSBOX_CONFIGFILE_HELP +language -- Valitse muu kielitiedosto. +memsize -- Dosboxin muistin m„„r„ megatavuina. +machine -- Emuloitavan koneen tyyppi:hercules,cga,tandy,pcjr,vga. +captures -- Hakemisto, jonne aalto„„ni-, midi- ja n„ytt”kuvatiedostot kaapataan. +. +:RENDER_CONFIGFILE_HELP +frameskip -- Kuinka monta kehyst„ Dosbox ohittaa ennen kehyksen piirt„mist„. +aspect -- Suorita suhteen oikaisu. Jos tulostemenetelm„si ei tue porrastusta, t„m„ saattaa hidastaa emulointia! +scaler -- Pientarkkuuksisten tilojen suurentamiseen ja parantamiseen k„ytett„v„ porrastin + Tuetut valinnat ovat: none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x, + 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x, + tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x. +. +:CPU_CONFIGFILE_HELP +core -- emuloinnissa k„ytetty suoritinydin: normal,simple,dynamic,auto. + auto switches from normal to dynamic if appropriate. +cycles -- M„„r„„, kuinka monta k„sky„ Dosbox pyrkii millisekunnissa emuloida. + T„m„n arvon asettaminen liian suureksi aiheuttaa „„nen katkoilua ja viiv„stymisi„. + Dosboxin voi my”s panna arvaamaan sopiva arvo k„ytt„m„ll„ asetusta max. + Oletusasetus (auto) vaihtuu tarpeen vaatien arvoksi max. +cycleup -- M„„r„„, kuinka paljon n„pp„inyhdistelm„ nostaa tai laskee suoritinjaksojen m„„r„„. +cycledown Arvon asettaminen lukua 100 pienemm„ksi kertoo prosenttiosuudesta. +. +:MIXER_CONFIGFILE_HELP +nosound -- K„ytt„„ hiljaista tilaa, „„ni emuloidaan kuitenkin. +rate -- Mikserin n„ytteenottotaajuus, laitteiden asettaminen t„t„ suuremmaksi + saattaa laskea laitteiden „„nenlaatua. +blocksize -- Mikserin lohkokoko, suuremmat lohkot saattavat auttaa „„nen katkoilua, + mutta „„ni samalla viiv„styy. +prebuffer -- How many milliseconds of data to keep on top of the blocksize. +. +:MIDI_CONFIGFILE_HELP +mpu401 -- Emuloitavan MPU-401-laitteen tyyppi: none, uart vai intelligent. +device -- Laite, joka vastaanottaa MIDI-tietoa MPU-401-laitteelta. + T„m„ voi olla default,alsa,oss,win32,coreaudio,none. +config -- Laitteen erityisasetukset. Windowsissa pane haluamasi laitteen + id-tunniste. Katso lis„tietoja README-tiedostosta. +. +:SBLASTER_CONFIGFILE_HELP +sbtype -- Emuloitavan SoundBlasterin tyyppi:none,sb1,sb2,sbpro1,sbpro2,sb16. +sbbase,irq,dma,hdma -- SoundBlasterin IO/IRQ/DMA/High DMA-osoitteet. +mixer -- Anna SoundBlasterin mikserin muokata Dosboxin mikseri„. +oplmode -- OPL-emuloinnin tyyppi: auto,cms,opl2,dualopl2,opl3. + Auto-tilassa tila m„„ritet„„n sblaster-tyypin mukaan. + Kaikki OPL-tilat ovat 'Adlib'-tyyppisi„ paitsi CMS. +oplrate -- OPL-musiikkiemuloinnin n„ytteenottotaajuus. +. +:GUS_CONFIGFILE_HELP +gus -- Ota k„ytt””n Gravis Ultrasound -emulointi +gusbase,irq1,irq2,dma1,dma2 -- Gravis Ultrasoundin IO-, IRQ- ja DMA-osoitteet. + (Sama IRQ ja DMA kelpaa.) +gusrate -- Ultrasound-emuloinnin n„ytteenottotaajuus. +ultradir -- Ultrasound-hakemistopolku. T„ss„ hakemistossa + pit„isi olla MIDI-hakemisto, joka sis„lt„„ + GUS-toiston paikkaustiedostot. Timidityn yhteydess„ + k„ytett„vien paikkausasetelmien pit„isi toimia mainiosti. +. +:SPEAKER_CONFIGFILE_HELP +pcspeaker -- K„yt„ PC-speaker-kaiuttimen emulointia. +pcrate -- PC-speaker-kaiuttimen „„nentuoton n„ytteenottotaajuus. +tandy -- K„yt„ Tandy Sound System -emulointia (off,on,auto). + Auto-tilassa Tandy Sound System -emulointi on saatavilla vain, jos machine-arvolle on asetettu arvo tandy. +tandyrate -- Tandy 3-Voice -perheen n„ytteenottotaajuus. +disney -- K„yt„ Disney Sound Source -emulointia. +. +:JOYSTICK_CONFIGFILE_HELP +joysticktype -- Emuloitavan peliohjaimen tyyppi: auto (default), none, + 2axis (tukee kahta peliohjainta), 4axis, + fcs (Thrustmaster), ch (CH Flightstick). + none poistaa k„yt”st„ peliohjaimen emuloinnin. + auto valitsee emuloinnin todellisten peliohjainten mukaan. +timed -- k„ytt„„ akselissa ajastettuja intervalleja. (false on vanhanmallinen tapa). +autofire -- ampuu jatkuvasti niin kauan kuin painiketta pidet„„n painettuna. +swap34 -- vaihtaa 3. ja 4. akseleiden paikkaa. voi olla hy”dyllinen tietyill„ peliohjaimilla. +buttonwrap -- k„ytt„„ painikkeen vaihtoa tietyll„ m„„r„ll„ emuloituja painikkeita. +. +:SERIAL_CONFIGFILE_HELP +serial1-4 -- Aseta com-porttiin kytketyn laitteen tyyppi. + Voi olla: disabled, dummy, modem, nullmodem, directserial. + Lis„parametrien on oltava samalla rivill„ parametri:arvo- + muodossa. Kaikkien tyyppien parametrina on irq. + tyypille directserial: realport (pakollinen), rxdelay (valinnainen). + tyypille modem: listenport (valinnainen). + tyypille nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (kaikki valinnaisia). + Esimerkki: serial1=modem listenport:5000 +. +:DOS_CONFIGFILE_HELP +xms -- K„yt„ XMS-tukea. +ems -- K„yt„ EMS-tukea. +umb -- K„yt„ UMB-tukea. +keyboardlayout -- N„pp„imist”asettelun kielikoodi (tai none) +. +:IPX_CONFIGFILE_HELP +ipx -- K„yt„ ipx:„„ UDP/IP-emuloinnin p„„ll„. +. +:AUTOEXEC_CONFIGFILE_HELP +T„m„n lohkon rivit ajetaan k„ynnistyksen yhteydess„. +. +:PROGRAM_CONFIG_FILE_ERROR +Tiedostoa %s ei voitu avata +. +:PROGRAM_CONFIG_USAGE +Asetusty”kalu: +K„yt„ komentoa -writeconf tiednimi kirjoittaaksesi nykyiset asetukset. +K„yt„ komentoa -writelang tiednimi kirjoittaaksesi nykyiset kielimerkkijonot. +. +:PROGRAM_CONFIG_SECTION_ERROR +Lohkoa %s ei ole olemassa. +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Kyseist„ lohkoa tai ominaisuutta ei ole. +. +:PROGRAM_CONFIG_NO_PROPERTY +Ominaisuutta %s ei ole lohkossa %s. +. +:PROGRAM_CONFIG_GET_SYNTAX +Oikea syntaksi: config -get "lohkon ominaisuus". +. +:PROGRAM_MOUNT_CDROMS_FOUND +CD-ROM-asemia l”ytyi: %d +. +:PROGRAM_MOUNT_STATUS_2 +Asema %c liitetty kohteeseen %s +. +:PROGRAM_MOUNT_STATUS_1 +T„ll„ hetkell„ seuraavat asemat on liitetty: +. +:PROGRAM_MOUNT_ERROR_1 +Hakemistoa %s ei ole olemassa. +. +:PROGRAM_MOUNT_ERROR_2 +%s ei ole hakemisto +. +:PROGRAM_MOUNT_ILL_TYPE +Laiton tyyppi %s +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Asema %c on jo liitetty kohteeseen %s +. +:PROGRAM_MOUNT_USAGE +K„ytt” MOUNT Asematunnus Paikallishakemisto +Eli MOUNT c c:\windows liitt„„ windows-hakemiston Dosboxin c-asematunnukseen. +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Asemaa %c ei ole liitetty. +. +:PROGRAM_MOUNT_UMOUNT_SUCCES +Aseman %c poisto onnistui. +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +N„enn„isasemia ei voida irrottaa. +. +:PROGRAM_MOUNT_WARNING_WIN +Aseman c:\ liitt„mist„ ei suositella. Liit„ ensi kerralla (ali)hakemisto. +. +:PROGRAM_MOUNT_WARNING_OTHER +Hakemiston / liitt„mist„ ei suositella. Liit„ ensi kerralla (ali)hakemisto. +. +:PROGRAM_MEM_CONVEN +%10d kt perusmuistia vapaana +. +:PROGRAM_MEM_EXTEND +%10d kt jatkomuistia vapaana +. +:PROGRAM_MEM_EXPAND +%10d kt laajennusmuistia vapaana +. +:PROGRAM_MEM_UPPER +%10d kt yl„muistia vapaana %d lohkossa (suurin UMB-lohko %d kt) +. +:PROGRAM_LOADFIX_ALLOC +%d kt varattu. +. +:PROGRAM_LOADFIX_DEALLOC +%d kt vapautettuna. +. +:PROGRAM_LOADFIX_DEALLOCALL +K„yt”ss„ ollut muisti vapautettu. +. +:PROGRAM_LOADFIX_ERROR +Muistinvarausvirhe. +. +:MSCDEX_SUCCESS +MSCDEX asennettu. +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: H„iri”: Usean CD-ROM-aseman asematunnusten on oltava yht„jaksoiset. +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: H„iri”: Toimintoa ei viel„ tueta. +. +:MSCDEX_ERROR_PATH +MSCDEX: H„iri”: Virheellinen polku. +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: H„iri”: Liikaa CD-ROM-asemia (enimm. 5). MSCDEXin asennus ep„onnistui. +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Alihakemisto liitetty: rajoitettu tuki. +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: H„iri”: Tiedosto ei ole iso- tai cue-levykuva tai se on virheellinen. +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: H„iri”: Tuntematon virhe. +. +:PROGRAM_RESCAN_SUCCESS +Aseman v„limuisti tyhjennetty. +. +:PROGRAM_INTRO +Tervetuloa, toivottaa Dosbox, „„nin ja grafiikoin varustettu x86-emulaattori. +Dosbox luo vanhaa Dosia muistuttavan komentorivin. + +Perustietoja liitt„misest„ saa kirjoittamalla intro mount +Tietoja CD-ROM-tuesta saa kirjoittamalla intro cdrom +Tietoja erityisn„pp„imist„ saa kirjoittamalla intro special +Lis„tietoja Dosboxista saa sivulta http://dosbox.sourceforge.net/wiki + +Dosbox keskeytyy ja sulkeutuu virheen sattuessa varoituksitta! + + +. +:PROGRAM_INTRO_MOUNT_START +T„ss„ on muutamia komentoja, joilla p„„see alkuun: +Jotta oman tiedostoj„rjestelm„n tiedostoja voisi k„ytt„„ on +hakemisto, jossa tiedostot ovat, liitett„v„ johonkin asemaan. + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ luo C-aseman sis„lt„en hakemiston c:\dosprog sis„ll”n. ş +ş ş +ş c:\dosprog\ on esimerkki. Vaihda sen tilalle oma pelihakemistosi.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprog luo C-aseman sis„lt„en hakemiston ~/dosprog sis„ll”n. ş +ş ş +ş ~/dosprog on esimerkki. Vaihda sen tilalle oma pelihakemistosi.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_END +Liitetty„si aseman oikein kirjoita c: siirty„ksesi „skett„in liitettyyn +C-asemaan. Komento dir n„ytt„„ aseman sis„ll”n. Komennolla cd p„„set +hakemistoon sis„„n (ilmaistu hakemistolistauksessa merkinn„ll„ []). +Ohjelmia tai tiedostoja, joiden p„„tteen„ on .exe, .bat tai .com, voi ajaa. +. +:PROGRAM_INTRO_CDROM +Kuinka Dosboxissa liitet„„n todellinen tai n„enn„inen CD-ROM-asema: +Dosboxissa on usean eri tason CD-ROM-emulaattoreita. + +Perustaso toimii kaikissa CD-ROM-asemissa ja tavallisin hakemistoin. +T„m„ asentaa MSCDEX-ajurin ja merkitsee tiedostot Vain luku -merkinn”in. +Melkein kaikkia pelej„ varten riitt„„ t„m„: +mount d D:\ -t cdrom tai mount d C:\esimerkki -t cdrom +Mik„li se ei toimi, Dosboxille t„ytynee kertoa CD-ROM-aseman nimi: +mount d C:\esimerkki -t cdrom -label CDNIMI + +Seuraava taso lis„„ tuen alatasolle. +Siten se toimii vain CD-ROM-asemien yhteydess„: +mount d D:\ -t cdrom -usecd 0 + +Viimeinen taso on riippuvainen k„ytt”j„rjestelm„st„: +J„rjestelmiss„ Windows 2000, Windows XP ja Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +Windows 9x -j„rjestelmiss„, joihin on asennettu ASPI-kerros: +mount d D:\ -t cdrom -usecd 0 -aspi + +Korvaa D:\ CD-ROM-asemasi sijainnilla. +Korvaa "-usecd 0" -asetuksen 0 CD-ROM-aseman numerolla, joka on n„ht„viss„, +kun kirjoitat komennon: +mount -cd +. +:PROGRAM_INTRO_SPECIAL +Erikoisn„pp„imet: +N„m„ ovat oletusarvoiset pikan„pp„imet. +Niit„ voi muuttaa n„pp„inkartoittimella. + +ALT-ENTER : Siirry koko n„yt”n tilaan ja takaisin. +ALT-PAUSE : Keskeyt„ Dosbox. +CTRL-F1 : K„ynnist„ n„pp„inkartoitin. +CTRL-F4 : P„ivit„ kaikkien asemien hakemistov„limuisti. + Vaihda liitetty„ levykuvaa. +CTRL-ALT-F5 : K„ynnist„ tai lopeta elokuvan luominen ruudusta. +CTRL-F5 : Tallenna kuvakaappaus. +CTRL-F6 : K„ynnist„ tai lopeta „„nen nauhoitus wav-tiedostoon. +CTRL-ALT-F7 : K„ynnist„ tai lopeta OPL-komentojen nauhoitus. +CTRL-ALT-F8 : K„ynnist„ tai lopeta k„sittelem„tt”mien MIDI-komentojen nauhoitus +CTRL-F7 : V„henn„ ohitettavien kehysten m„„r„„ (frameskip). +CTRL-F8 : Lis„„ ohitettavien kehysten m„„r„„ (frameskip). +CTRL-F9 : Pakota Dosbox lopettamaan. +CTRL-F10 : Sieppaa tai vapauta hiiri. +CTRL-F11 : Hidasta emulointia (V„henn„ Dosboxin jaksoja). +CTRL-F12 : Nopeuta emulointia (Lis„„ Dosboxin jaksoja). +ALT-F12 : K„yt„ nopeaa tilaa (Turbo-nappi). +. +:PROGRAM_BOOT_NOT_EXIST +K„ynnistyslevytiedostoa ei ole olemassa. Ei onnistu. +. +:PROGRAM_BOOT_NOT_OPEN +K„ynnistyslevytiedostoa ei voitu avata. Ei onnistu. +. +:PROGRAM_BOOT_PRINT_ERROR +T„m„ komento k„ynnist„„ Dosboxin joko levyke- tai kiintolevykuvalta. + +T„t„ komentoa varten voidaan m„„ritt„„ levykkeiden sarja, joiden v„lill„ +vaihdellaan painamalla Ctrl-F4. Valinta -l m„„ritt„„ liitetyn aseman, jolta +j„rjestelm„ k„ynnistet„„n. Jos asematunnusta ei m„„ritet„, k„ynnistet„„n +oletusarvoisesti asemalta A. K„ynnistett„vi„ asematunnuksia ovat ainoastaan +A, C ja D. Kiintolevylt„ (C tai D) k„ynnist„mist„ varten levykuvan on oltava +jo valmiiksi liitettyn„ IMGMOUNT-komentoa k„ytt„en. + +T„m„n komennon syntaksi on: + +BOOT [diskimg1.img diskimg2.img] [-l asematunnus] +. +:PROGRAM_BOOT_UNABLE +K„ynnistys asemalta %c ei onnistu. +:PROGRAM_BOOT_IMAGE_OPEN +Avataan levykuvatiedostoa: %s +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Tiedostoa %s ei voitu avata. +:PROGRAM_BOOT_BOOT +K„ynnistett„„n asemalta %c... +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr-kasetti l”ytyi, mutta kone ei ole PCjr. +:PROGRAM_BOOT_CART_LIST_CMDS +K„ytett„viss„ olevat PCjr-kasetin komennot:%s. +:PROGRAM_BOOT_CART_NO_CMDS +PCjr-kasetin komentoja ei l”ytynyt. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Asematunnus, johon levykuva halutaan liitt„„, on m„„ritett„v„. +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Asemanumero (0 tai 3), johon levykuva liitet„„n (0,1=fda,fdb;2,3=hda,hdb), on m„„ritett„v„. +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +CD-ROM-levykuvia varten: IMGMOUNT asematunnus levykuvan-sijainti -t iso + +Kiintolevykuvia varten: Kiintolevyille on m„„ritett„v„ aseman geometria: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT asematunnus levykuvan-sijainti -size bps,spc,hpc,cyl +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Tyyppi„ "%s" ei tueta. M„„rit„ hdd", "floppy" tai "iso". +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Muotoa "%s" ei tueta. M„„rit„ "fat", "iso" tai "none". +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Liitett„v„ levykuva on m„„ritett„v„. +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Levykuvatiedostoa ei l”ydy. +. +:PROGRAM_IMGMOUNT_MOUNT +Liitt„„ksesi hakemistoja k„yt„ MOUNT-komentoa, „l„ IMGMOUNT-komentoa. +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Kyseiseen tunnukseen on jo liitetty asema. +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Asemaa ei voida luoda tiedostosta. +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Asenanumero %d liitetty kohteeseen %s +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Levykuvan on sijaittava is„nt„- tai paikallisasemalla. +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Useiden tiedostojen k„ytt”„ tuetaan vain cue- ja iso-levykuvissa. +. +:PROGRAM_KEYB_INFO +Koodisivu %i on ladattu +. +:PROGRAM_KEYB_SHOWHELP +KEYB [n„pp„imist”asettelun tunnus[ koodisivun numero[ koodisivun tiedosto]]] + +Muutama esimerkki: + KEYB: N„yt„ t„ll„ hetkell„ ladattuna oleva koodisivu. + KEYB sp: Lataa espanjalainen (SP) asettelu, k„yt„ haluamaasi koodisivua. + KEYB sp 850: Lataa espanjalainen (SP) asettelu, k„yt„ koodisivua 850. + KEYB sp 850 mycp.cpi: Sama kuin yll„, mutta k„yt„ tiedostoa mycp.cpi. +. +:PROGRAM_KEYB_NOERROR +N„pp„imist”asettelu %s ladattu koodisivulle %i +. +:PROGRAM_KEYB_FILENOTFOUND +N„pp„imist”tiedostoa %s ei l”ydy + +. +:PROGRAM_KEYB_INVALIDFILE +N„pp„imist”tiedosto %s virheellinen +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Ei asettelua kohteessa %s koodisivulle %i +. +:PROGRAM_KEYB_INVCPFILE +Ei koodisivutiedostoa asettelu %s tai se on virheellinen + +. +:SHELL_ILLEGAL_PATH +Laiton polku. +. +:SHELL_CMD_HELP +Saat luettelon kaikista tuetuista komennoista kirjoittamalla help /all . +Pikaluettelo k„ytetyimmist„ komennoista: +. +:SHELL_CMD_ECHO_ON +ECHO on p„„ll„. +. +:SHELL_CMD_ECHO_OFF +ECHO on pois p„„lt„. +. +:SHELL_ILLEGAL_SWITCH +Laiton valinta: %s. +. +:SHELL_MISSING_PARAMETER +Tarvittava parametri puuttuu. +. +:SHELL_CMD_CHDIR_ERROR +En voi siirty„ hakemistoon: %s. +. +:SHELL_CMD_CHDIR_HINT +Siirty„ksesi eri asemaan kirjoita %c: +. +:SHELL_CMD_MKDIR_ERROR +En voi luoda hakemistoa: %s. +. +:SHELL_CMD_RMDIR_ERROR +En voi poistaa hakemistoa: %s. +. +:SHELL_CMD_DEL_ERROR +En voi poistaa tiedostoa: %s. +. +:SHELL_SYNTAXERROR +Komennon syntaksi on v„„r„. +. +:SHELL_CMD_SET_NOT_SET +Ymp„rist”muuttujaa %s ei ole m„„ritelty. +. +:SHELL_CMD_SET_OUT_OF_SPACE +Ymp„rist”tilaa ei ole tarpeeksi j„ljell„. +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Tiedostonimi puuttuu. +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Numero puuttuu. +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Virheellinen numero. +. +:SHELL_CMD_GOTO_MISSING_LABEL +Nime„ ei annettu GOTO-komentoon. +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Nime„ %s ei l”ydy. +. +:SHELL_CMD_FILE_NOT_FOUND +Tiedostoa %s ei l”ydy. +. +:SHELL_CMD_FILE_EXISTS +Tiedosto %s on jo olemassa. +. +:SHELL_CMD_DIR_INTRO +Hakemisto %s. +. +:SHELL_CMD_DIR_BYTES_USED +%5d tiedosto(a) %17s tavua. +. +:SHELL_CMD_DIR_BYTES_FREE +%5d kansio(ta) %17s tavua vapaana. +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Asemaa %c ei ole olemassa! +Se on ensin liitett„v„. Kirjoita intro tai intro mount saadaksesi lis„tietoja. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Laiton komento: %s. +. +:SHELL_CMD_PAUSE +Jatka painamalla mit„ tahansa n„pp„int„. +. +:SHELL_CMD_PAUSE_HELP +Jatkaa yhden n„pp„inpainalluksen j„lkeen. +. +:SHELL_CMD_COPY_FAILURE +Kopiointih„iri” : %s. +. +:SHELL_CMD_COPY_SUCCESS + %d tiedosto(a) kopioitu. +. +:SHELL_CMD_SUBST_NO_REMOVE +Aseman poistoa ei tueta. Mit„„n ei tehd„. +. +:SHELL_CMD_SUBST_FAILURE +SUBST ep„onnistui. Komentorivill„ on tehty virhe tai kohdeasema on jo k„yt”ss„. +SUBST-komentoa voidaan k„ytt„„ vain paikallisiin asemiin. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Tervetuloa, toivottaa Dosbox v%-8s ş +ş ş +ş Uusien k„ytt„jien pikaopas aukeaa komennolla: INTRO ş +ş N„yt„ tuetut komennot kirjoittamalla: HELP ş +ş ş +ş Saat s„„detty„ suoritustehoa n„pp„inyhdistelmin ctrl-F8 ja ctrl-F12. ş +ş Avataksesi n„pp„inkartottimen paina ctrl-F1. ş +ş Lue lis„tietoja Dosbox-hakemiston README-tiedostosta. ş +ş ş +. +:SHELL_STARTUP_CGA +ş Dosbox tukee Composite CGA -tilaa. ş +ş T„m„n tilan ollessa p„„ll„ paina (alt-)F11 vaihtaaksesi v„rej„. ş +ş ş +. +:SHELL_STARTUP_DEBUG +ş Paina alt-Pause siirty„ksesi virheenkorjaussovellukseen ş +ş k„ynnist„ sovellus parametrill„ DEBUG. ş +. +:SHELL_STARTUP_END +ş Pid„ hauskaa! ş +ş Dosbox-tiimi ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:SHELL_CMD_CHDIR_HELP +N„ytt„„ tai vaihtaa nykyisen hakemiston. +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [asema:][polku] +CHDIR [..] +CD [asema:][polku] +CD [..] + + .. M„„ritt„„, ett„ haluat siirty„ yl„hakemistoon. + +Sy”t„ CD asema: n„ytt„„ksesi m„„ritetyn aseman nykyisen hakemiston. +Sy”t„ CD parametreitta n„ytt„„ksesi nykyisen aseman ja hekemiston. +. +:SHELL_CMD_CLS_HELP +Tyhjenn„ kuvaruutu. +. +:SHELL_CMD_DIR_HELP +Hakemiston„kym„. +. +:SHELL_CMD_ECHO_HELP +N„ytt„„ sanomat, aloittaa tai lopettaa komentokaiutuksen. +. +:SHELL_CMD_EXIT_HELP +Poistuu komentorivilt„. +. +:SHELL_CMD_HELP_HELP +N„yt„ ohje. +. +:SHELL_CMD_MKDIR_HELP +Luo hakemiston. +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [asema:][polku] +MD [asema:][polku] +. +:SHELL_CMD_RMDIR_HELP +Poistaa hakemiston. +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [asema:][polku] +RD [asema:][polku] +. +:SHELL_CMD_SET_HELP +Muuttaa ymp„rist”muuttujia. +. +:SHELL_CMD_IF_HELP +Aiheuttaa ehdollisen suorituksen komentojono-ohjelmassa. +. +:SHELL_CMD_GOTO_HELP +Siirtyy nimetylle riville komentojono-ohjelmassa. +. +:SHELL_CMD_SHIFT_HELP +Siirt„„ parametrien paikkaa komentojono-ohjelmassa vasemmalle. +. +:SHELL_CMD_TYPE_HELP +N„ytt„„ tekstitiedoston sis„ll”n. +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [asema:][polku][tiedostonimi] +. +:SHELL_CMD_REM_HELP +Lis„„ kommentteja komentojonotiedostoon. +. +:SHELL_CMD_REM_HELP_LONG +REM [kommentti] +. +:SHELL_CMD_NO_WILD +T„m„ on yksinkertainen versio komennosta, jokerimerkkej„ ei voi k„ytt„„! +. +:SHELL_CMD_RENAME_HELP +Nime„„ uudelleen yhden tai useamman tiedoston. +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [asema:][polku]tiedostonimi1 tiedostonimi2. +REN [asema:][polku]tiedostonimi1 tiedostonimi2. + +Huomaa, ett„ kohdetiedostolle ei voi m„„ritt„„ uutta asemaa tai polkua. +. +:SHELL_CMD_DELETE_HELP +Poistaa yhden tai useamman tiedoston. +. +:SHELL_CMD_COPY_HELP +Kopioi tiedostoja. +. +:SHELL_CMD_CALL_HELP +K„ynnist„„ komentojonotiedoston toisesta komentojonotiedostosta k„sin. +. +:SHELL_CMD_SUBST_HELP +Kytkee sis„isen polun aseman kirjaimeen. +. +:SHELL_CMD_LOADHIGH_HELP +Lataa ohjelman yl„muistiin (vaatii asetuksen xms=true,umb=true). +. +:SHELL_CMD_CHOICE_HELP +Odottaa n„pp„inpainallusta ja asettaa ERRORLEVEL-muuttujan. +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:vaihtoehdot] [/N] [/S] teksti + /C[:]vaihtoehdot - M„„ritt„„ sallittavat n„pp„imet. Oletusarvo on: yn. + /N - Žl„ n„yt„ vaihtoehtoja kehotteen alalaidassa. + /S - Piittaa vaihtoehtojen kirjainkoosta. + text - Kehotteella n„ytett„v„ teksti +. +:SHELL_CMD_ATTRIB_HELP +Ei tee mit„„n. Mukana yhteensopivuuden vuoksi. +. +:SHELL_CMD_PATH_HELP +Mukana yhteensopivuuden vuoksi. +. +:SHELL_CMD_VER_HELP +N„ytt„„ ja asettaa ilmoitettavan DOS-version. +. +:SHELL_CMD_VER_VER +Dosbox [versio %s]. Ilmoitettava DOS-versio %d.%d. +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/fi/version.txt dosbox-staging-0.77.0/contrib/old-translations/fi/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/fi/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/fi/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Finnish 0.70 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/hu/magyar.lng dosbox-staging-0.77.0/contrib/old-translations/hu/magyar.lng --- dosbox-staging-0.76.0/contrib/old-translations/hu/magyar.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/hu/magyar.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,689 @@ +:SDL_CONFIGFILE_HELP +fullscreen -- Teljes k‚perny”n indĄtja a DOSBoxot. +fulldouble -- K‚tszeres pufferel‚st haszn l teljes k‚perny” alatt. +fullresolution -- A teljes k‚perny” felbont sa: eredeti, vagy r”gzĄtett (pl. 1024x768) +windowresolution -- ľtm‚retezi az ablakot ebbe a m‚retbe, + ha a kimeneti eszk”z t mogatja a hardware-s  tm‚retez‚st. +output -- Mi a kimeneti eszk”z: surface, overlay, opengl, openglnb, ddraw. +autolock -- Az eg‚r automatikusan lez r˘dik, ha a k‚perny”re kattintasz. +sensitiviy -- Az eg‚r ‚rz‚kenys‚ge. +waitonerror -- V r, miel”tt bez rja a konzolt, ha a DOSBox hib t okoz. +priority -- A DOSBox priorit sa: lowest, lower, normal, higher, highest, pause (amikor nincs f˘kuszban). + A m sodik bejegyz‚s a vessz” m”g”tt arra vonatkozik, + amikor a DOSBox nincs f˘kusz lva/minimaliz lva. +mapperfile -- A billentyzetkioszt s elment‚s‚re/bet”lt‚s‚re haszn lt f jl megad sa. +usescancodes -- A szimbolikus billentyzetek elkerl‚se, + lehet, hogy nem mk”dik minden oper ci˘s rendszeren. +. +:DOSBOX_CONFIGFILE_HELP +language -- M sik nyelvi f jl kiv laszt sa. +memsize -- A DOSBox  ltal haszn lhat˘ mem˘ria nagys ga megab jtokban megadva. +machine -- Az emul lni kĄv nt g‚p tĄpusa: hercules, cga, tandy, pcjr, vga. +captures -- Az a k”nyvt r ahova a kimentett hangok, midik ‚s k‚pek kerlnek. +. +:RENDER_CONFIGFILE_HELP +frameskip -- H ny k‚pkock t hagy ki a DOSBox, miel”tt egyet kihagy. +aspect -- K‚pkorrekci˘, ami - ha a kimeneti m˘d nem t mogatja - lelassĄthatja a fut st. +scaler -- Az alacsony felbont sok kinagyĄt s ra, javĄt s ra haszn lt  tm‚retez”. + A k”vetkez”k lehetnek: none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x, + 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x, + tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x. + Ha "forced" param is van (pl scaler=hq2x forced), akkor a scaler lesz, + akkor is, ha az eredm‚ny rossz lesz. +. +:CPU_CONFIGFILE_HELP +core -- A haszn lt processzor magtĄpus: normal, simple, full, dynamic, auto. + Az auto  tkapcsol normal-r˘l dynamic-ra, ha szks‚ges. +cycles -- Az egy ezredm sodperc alatt v‚grehajtott utasĄt sok sz ma. + Ha magasabbra  llĄtod, mint amit a g‚p kezelni tud, az kifagy shoz vezethet. + Ha "auto"-ra  llĄtod, akkor a DOSBox pr˘b lja meg meg llapĄtani, hogy mennyi az ide lis. + Ez a kieg‚szĄt” csak kĄs‚rleti st diumban van. +cycleup/cycledown -- A billentykomb˘val ennyit n”/cs”kken a ciklussz m. 100 alatti ‚rt‚k sz zal‚kot jelez. +. +:MIXER_CONFIGFILE_HELP +nosound -- Cs”ndes m˘d enged‚lyez‚se. A hang emul l s t ez nem kapcsolja ki. +rate -- A kever” mintav‚telez‚si frekvenci ja. 22050 Hz-n‚l magasabb ‚rt‚kn‚l val˘szĄnleg cs”kken a hangmin”s‚g. +blocksize -- A kever” blokkm‚rete. A nagyob blokkm‚ret val˘szĄnleg segĄt a sisterg‚sen, de a hang jobban fog akadni. +prebuffer -- H ny ezredm sodpercnyi adatot tart a blokkm‚ret tetej‚n. +. +:MIDI_CONFIGFILE_HELP +mpu401 -- Az MPU-401 emul ci˘ tĄpusa: none, uart, intelligent. +device -- Az eszk”z ami a midi adatokat fogadja az MPU-401-t”l: + default, alsa, oss, win32, coreaudio, none. +config -- Az eszk”z speci lis be llĄt sai. Windows alatt az eszk”z azonosĄt˘j t Ąrd be ide + L sd a README.txt-t a r‚szletek‚rt. +. +:SBLASTER_CONFIGFILE_HELP +sbtype -- Emul lt SoundBlaster tĄpus: none, sb1, sb2, sbpro1, sbpro2, sb16. +sbbase,irq,dma,hdma -- IO/IRQ/DMA/High DMA cĄmz‚sek a SoundBlasternek. +mixer -- Enged‚lyezi a SoundBlaster kever”nek, hogy m˘dosĄtsa a DOSBox kever”t. + true, false. +oplmode -- OPL emul ci˘ tĄpusa: auto, cms, opl2, dualopl2, opl3. + Auto m˘dban a SoundBlaster fogja meg llapĄtani. Minden OPL m˘d AdLib, + kiv‚ve a CMS-t. +oplrate -- Az OPL zeneemul ci˘ mintav‚telez‚si frekvenci ja. +. +:GUS_CONFIGFILE_HELP +gus -- Gravis Ultrasound emul ci˘ bekapcsol sa. +gusbase, irq1, irq2, dma1, dma2 -- A Gravis Ultrasound IO/IRQ/DMA cĄmei (IRQ=DMA). +gusrate -- A Gravis Ultrasound emul ci˘ mintav‚telez‚si frekvenci ja. +ultradir -- A Gravis Ultrasound k”nyvt ra, ahol egy MIDI k”nyvt rnak is lennie k‚ne, ami a GUS visszaj tsz s javĄt sait tartalmazza. +. +:SPEAKER_CONFIGFILE_HELP +pcspeaker -- PC-Speaker emul ci˘ bekapcsol sa. +pcrate -- A PC-Speaker mintav‚telez‚si frekvenci ja. +tandy -- A Tandy Sound System emul ci˘j nak a bekapcsol sa: off, on, auto. + Auto be llĄt s eset‚n, csak akkor kapcsol be, ha a g‚p Tandy m˘dban van. +tandyrate -- A Tandy 3 Mintav‚telez‚si frekvenci ja. +disney -- Disney Sound Source emul ci˘ bekapcsol sa. Covox Voice Master ‚s Speech Thing kompatibilis. +. +:JOYSTICK_CONFIGFILE_HELP +joysticktype -- A Joystick tĄpusa: auto (alap), none, + 2axis (k‚t joystickot t mogat), + 4axis (egy joystickot t mogat, az els” van haszn latban), + 4axis_2 (egy joystickot t mogat, a m sodik van haszn latban), + fcs (Thrustmaster), ch (CH Flightstick). + none Josytick emul ci˘ kikapcsolva. + auto A val˘di joysticknak megfelel”en v lasztja ki a mk”d‚st. +timed -- Bekapcsolja az id”zĄtett id”intervallumokat a tengelyre. (false a r‚gi m˘d). +autofire -- Folyamatosan l”, amĄg a gombot nyomvatartod. +swap34 -- Felcser‚li a 3. ‚s a 4. tengelyt. N‚melyik jostickn l hasznos lehet. +buttonwrap -- enged‚lyezi a gombt”rdel‚st az emul lt gombok sz m ra. +. +:SERIAL_CONFIGFILE_HELP +serial1-4 -- A COM-port-ra csatlakoztatott eszk”z: disabled, dummy, modem, nullmodem, directserial. + Egy‚b param‚tereket ugyanabban a sorban adhatsz meg a "value" param‚terrel. + A param‚terek a k”vetkez”ek: irq, startbps, bytesize, stopbits, parity (nem k”telez”ek). + A directserial-hoz: realport (szks‚ges), rxdelay (nem k”telez”). + modem: listenport (nem k”telez”). + nullmodem: server, rxdelay, txdelay, telnet, usedtr + transparent, port, inhsocket (mind opcion lis). + P‚lda: serial1=modem listenport:5000 +. +:DOS_CONFIGFILE_HELP +xms -- XMS t mogat s bekapcsolva. +ems -- EMS t mogat s bekapcsolva. +umb -- UMB t mogat s bekapcsolva. +keyboardlayout -- A billentyzet kioszt s nak nyelvi k˘dja (vagy none). +. +:IPX_CONFIGFILE_HELP +ipx -- Bakapcsolja az "IPX over UDP/IP" emul ci˘t. +. +:AUTOEXEC_CONFIGFILE_HELP +Az ebben a szekci˘ban l‚v” sorokat indĄt skor mag t˘l v‚grehajtja a DOSBox. +. +:CONFIGFILE_INTRO +# Ez a konfigur ci˘s f jlja a DOSBox %s sz m ra. +# Azok a sorok melyek elej‚n # van, azok megjegyz‚sek. +# Az‚rt vannak, hogy minden funkci˘t (r”viden) dokument lhatni lehessen. +. +:PROGRAM_CONFIG_FILE_ERROR +Nem tudom megnyitni a %s f jlt. +. +:PROGRAM_CONFIG_USAGE +DOSBox konfigur ci˘s eszk”z: +CONFIG -writeconf [f jl] kiĄrja a jelenlegi konfigur ci˘t a megadott f jlba. +CONFIG -writelang [f jl] kiĄrja a jelenlegi nyelv sz”vegeit a f jlba. +. +:PROGRAM_CONFIG_SECTION_ERROR +A(z) %s szekci˘ nem l‚tezik. +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Nincs ilyen szekci˘ vagy tulajdons g. +. +:PROGRAM_CONFIG_NO_PROPERTY +Nincs %s tulajdons g a(z) %s szekci˘ban. +. +:PROGRAM_CONFIG_GET_SYNTAX +Helyes szintaxis: config -get "szekci˘ tulajdons g". +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROM-ok sz ma: %d +. +:PROGRAM_MOUNT_STATUS_2 +A(z) %c meghajt˘ most %s alatt el‚rhet”. +. +:PROGRAM_MOUNT_STATUS_1 +Jelenleg el‚rhet” meghajt˘k: +. +:PROGRAM_MOUNT_ERROR_1 +A(z) %s k”nyvt r nem l‚tezik. +. +:PROGRAM_MOUNT_ERROR_2 +%s nem k”nyvt r. +. +:PROGRAM_MOUNT_ILL_TYPE +Nem megengedett tĄpus: %s +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +A(z) %c meghajt˘ m r hozz  van rendelve a(z) %s meghajt˘hoz. +. +:PROGRAM_MOUNT_USAGE +Haszn lat MOUNT [meghajt˘] [k”nyvt r] +Pl a MOUNT C: C:\WINNT parancs csatolja a C: meghajt˘hoz az C:\WINNT k”nyvt rat. +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +A(z) %c meghajt˘ nincs hozz rendelve semmihez. +. +:PROGRAM_MOUNT_UMOUNT_SUCCES +A(z) %c meghajt˘ sikeresen le lett v lasztva. +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Virtu lis meghajt˘kat nem lehet lev lasztani. +. +:PROGRAM_MOUNT_WARNING_WIN +A c:\ meghajt˘ csatol sa nem javasolt. Legk”zelebb egy k”nyvt rat adj meg. +. +:PROGRAM_MOUNT_WARNING_OTHER +A / csatol sa nem javasolt. Legk”zelebb egy k”nyvt rat adj meg. +. +:PROGRAM_MEM_CONVEN +%10d KByte szabad hagyom nyos mem˘ria. +. +:PROGRAM_MEM_EXTEND +%10d KByte szabad b”vĄtett mem˘riar. (XMS) +. +:PROGRAM_MEM_EXPAND +%10d KByte szabad kiterjesztett mem˘ria. (EMS) +. +:PROGRAM_MEM_UPPER +%10d KByte szabad fels” mem˘ria %d blockban (legnagyobb UMB %d KByte) +. +:PROGRAM_LOADFIX_ALLOC +%d KByte lefoglalva. +. +:PROGRAM_LOADFIX_DEALLOC +%d KByte felszabadĄtva. +. +:PROGRAM_LOADFIX_DEALLOCALL +Haszn lt mem˘ria felszabadĄtva. +. +:PROGRAM_LOADFIX_ERROR +Mem˘riafoglal si hiba. +. +:MSCDEX_SUCCESS +MSCDEX telepĄtve. +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Hiba: T”bb CDROM eset‚n a betknek folytat˘lagosoknak kell lennik. +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Hiba: M‚g nincs t mogatva. +. +:MSCDEX_ERROR_PATH +MSCDEX: Hiba: Hib s el‚r‚si Łt. +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Hiba: TŁl sok CDROM meghajt˘: (max: 5) Sikertelen telepĄt‚s. +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Csatolt k”nyvt r: korl tozott t mogat s. +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Hiba: A f jl nem iso/cue lemezk‚p vagy hib kat tartalmaz. +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Hiba: Ismeretlen hiba. +. +:PROGRAM_RESCAN_SUCCESS +A meghajt˘ gyorsĄt˘t ra kirĄtve. +. +:PROGRAM_INTRO +šdv. Ez itt a DOSBox, egy x86 emul tor hanggal ‚s grafik val. +A DOSBox egy h‚jat biztosĄt neked, ami olyan mint a r‚gi DOS. + +Az alap csatol si tipusok leĄr s hoz Ąrd be: INTRO MOUNT. +A CDROM-ok csatol si inform ci˘i‚rt Ąrd be: INTRO CDROM. +Speci lis billentytipusok‚rt Ąrd be: INTRO SPECIAL. +Tov bbi inform ci˘kat a DOSBox weboldal n tal lsz: +http://dosbox.sourceforge.net/wiki + +A DOSBox figyelmeztet‚s n‚lkl kil‚p, ha valami hiba t”rt‚nik! + +. +:PROGRAM_INTRO_MOUNT_START +N‚h ny parancs az indul shoz: +Miel”tt haszn lni tudn d a meghajt˘idon tal lhat˘ f jlokat, +csatolnod kell a k”nyvt rat ami a f jlokat tartalmazza. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ l‚trehozza a C meghajt˘t a c:\dosprog k”tet alatt. ş +ş ş +ş c:\dosprog\ egy p‚lda. HelyettesĄtsd be a saj t j t‚kk”nyvt raddal.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprog l‚trehozza a C meghajt˘t a ~/dosprog k”tet alatt. ş +ş ş +ş ~/dosprog egy p‚lda. HelyettesĄtsd be a saj t j t‚kk”nyvt raddal.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_END +Amikor a csatol s k‚szen van beĄrhatod c: +hogy  tv lts a frissen l‚trehozott C meghajt˘dra. +A dir parancs beg‚pel‚se megmutatja a tartalm t. +A cd paranccsal v lthatsz k”nyvt rat (a [] jelek jelzik a k”nyvt rlist ban.). +A .exe .bat ‚s .com v‚g f jlokat tudod futtatni. +. +:PROGRAM_INTRO_CDROM +How to mount a Real/Virtual CD-ROM Drive in DOSBox: +DOSBox provides CD-ROM emulation on several levels. + +Az alap szint minden CDROM meghajt˘val ‚s k”nyvt rral mk”dik. +TelepĄti a MSCDEX-et ‚s Ąr sv‚dettnek jel”li meg a f jokat. +A legt”bb j t‚knak el‚g ennyi: +mount d D:\ -t cdrom vagy mount d C:\pelda -t cdrom +Ha nem mk”dik, lehet, hogy meg kell mondanod a CD cĄmk‚j‚t a DOSBoxnak: +mount d C:\pelda -t cdrom -label CIMKE + +A k”vetkez” szint ad n‚mi alacsonyszint t mogat st. +Vagyis csak CDROM meghajt˘kon mk”dik: +mount d D:\ -t cdrom -usecd 0 + +Az utols˘ szintje a t mogat snak az oper ci˘s rendszeredt”l fgg: +Windows 2000, Windows XP ‚s Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +Windows 9x telepĄtett ASPI r‚teggel: +mount d D:\ -t cdrom -usecd 0 -aspi + +HelyettesĄtsd be a D:\-t a saj t CDROM-od betjel‚vel. +HelyettesĄtsd be a 0- t az -usecd 0 param‚terben a CDROM-od sz m t, +amit megkapsz, ha beĄrod: mount -cd +. +:PROGRAM_INTRO_SPECIAL +Speci lis billentykomb˘k: +Ezek az alap be llĄt sok. +Le lehet ”ket cser‚lni a billentyt‚rk‚pben-ben. + +ALT-ENTER : Teljesk‚perny” be/ki. +ALT-PAUSE : DOSBox pillanatstop. +CTRL-F1 : ElindĄtja a billentyt‚rk‚pet. +CTRL-F4 : FrissĄti a k”tetek gyorsĄt˘t r t. Cser‚li a csatolt lemezk‚peket. +CTRL-ALT-F5 : ElindĄtja/Meg llĄtja a filmfelv‚telt a k‚perny”r”l. +CTRL-F5 : Kimenti egy k‚pbe a jelenlegi k‚perny”t. +CTRL-F6 : ElindĄtja/Meg llĄtja a hangfelv‚telt. +CTRL-ALT-F7 : ElindĄtja/Meg llĄtja az OPL parancsok felv‚tel‚t. +CTRL-ALT-F8 : ElindĄtja/Meg llĄtja a nyers MIDI parancsok felv‚tel‚t. +CTRL-F7 : Cs”kkenti a k‚pkockakihagy st. +CTRL-F8 : N”veli a k‚pkockakihagy st. +CTRL-F9 : Meg llĄtja a DOSBox. +CTRL-F10 : Megfogja/Elengedi az egeret. +CTRL-F11 : LelassĄtja az emul ci˘t (Cs”kkenti a DOSBox ciklusokat). +CTRL-F12 : FelgyorsĄtja az emul ci˘t (N”veli DOSBox Ciklusokat). +ALT-F12 : kikapcsolja sebess‚gr”gzĄt‚st (turbo gomb). +. +:PROGRAM_BOOT_NOT_EXIST +Az indĄt˘lemezf jl nem l‚tezik. Kihagyva. +. +:PROGRAM_BOOT_NOT_OPEN +A program nem tudja megnyitni az indĄt˘lemezf jlt. Kihagyva. +. +:PROGRAM_BOOT_WRITE_PROTECTED +A lemezk‚p Ąr sv‚dett! Lehet, hogy probl‚m t okozhat. +. +:PROGRAM_BOOT_PRINT_ERROR +Ez a parancs elindĄtja a DOSBox-ot ak r floppy ak r merevlemezk‚pr”l. + +Erre a parancsra defini lhatsz ”r”kl‚st a floppyk cser‚lhet”s‚g‚r”l +a CRL+F4 gombok lenyom s val ‚s -l jel”li ki a csatolt meghajt˘t ahonnan +indulni fog. Ha nincs meghajt˘jel defini lva, akkor az alapb˘l +az A meghajt˘r˘l akar indulni. Az indĄthat˘ meghajt˘k: A, C, D. +Merevlemezr”l val˘ indĄt skor a k‚pnek m r csatolva kell lennie. IMGMOUNT. + +A parancs haszn lata: + +BOOT [diskimg1.img diskimg2.img] [-l meghajt˘bet] +. +:PROGRAM_BOOT_UNABLE +A program nem tud indzlni a(z) %c meghajt˘r˘l. +:PROGRAM_BOOT_IMAGE_OPEN +%s lemezk‚p nyit sa. +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Nem tudom megnyitni a(z) %s lemezk‚pf jlt. +:PROGRAM_BOOT_BOOT +Indul s a(z) %c meghajt˘r˘l... +. +:PROGRAM_BOOT_CART_WO_PCJR +PCJr k rty t ‚szlelt a program, de a g‚p nem PCJr. +. +:PROGRAM_BOOT_CART_LIST_CMDS +PCJr cartridge commando-k:%s. +. +:PROGRAM_BOOT_CART_NO_CMDS +Nincsenek PCjr cartridge commando-k. +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Egy k‚pcsatol shoz meg kell adnod a meghajt˘ betjel‚t. +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Musz j kijel”lni egy meghajt˘sz mot, +(0 vagy 3) hogy csatolni lehessen (0,1=fda,fdb;2,3=hda,hdb). +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +CD-ROM lemezk‚phez: imgmount meghajt˘bet a-lemezk‚p-neve -t iso + +harddrive lemezk‚phez: meg kell hat rozni a lemezt‚rk‚p geometri j t: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT meghajt˘bet a-lemezk‚p-neve -size bps,spc,hpc,cyl +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Nem tudom bet”lteni a lemezk‚pet. +Ellen‹rizd, hogy az Łtvonal helyes ‚s a lemezk‚p hozz f‚rhet‹-e. +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Nem tudom kitolvasni a meghajt˘ geometri j t a lemezk‚pb‹l. +Haszn ld a -size bps,spc,hpc,cyl param‚tereket, hogy meghat rozd a geometri t. +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +A(z) "%s" typus nincs t mogatva. Lehet: "hdd" vagy "floppy" vagy "iso". +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +A(z) "%s" form tum nincs t mogatva. Lehet: "fat" vagy "iso" vagy "none". +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Musz j kijel”lni a csatolni kĄv nt lemezk‚pet. +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +A lemezk‚p nem tal lhat˘. +. +:PROGRAM_IMGMOUNT_MOUNT +K”nyvt rak csatol s hoz haszn ld a MOUNT parancsot, ne a IMGMOUNT parancsot. +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Ehhez a beth”z m r van csatolt meghajt˘ rendelve. +. +:PROGRAM_IMGMOUNT_CANT_CREATE +A program nem tudja l‚trehozni a meghajt˘t a lemezk‚pb”l. +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +A %d sz mŁ meghajt˘ csatolva lett mint %s. +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +A lemezk‚pnek hl˘zati, vagy helyi meghajt˘n kell lennie. +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +A t”bbf jlos t mogat s csak cue/iso f jlokra vonatkozik. +. +:PROGRAM_KEYB_INFO +A %i sz mŁ k˘dlap bet”ltve +. +:PROGRAM_KEYB_SHOWHELP +KEYB [kioszt s azonosĄt˘ja[ k˘dlap sz ma[ k˘dlap f jl]]] + +Some examples: + KEYB: Jelenleg bet”lt”tt k˘dlap mutat sa. + KEYB sp: Bet”lti a Spanyol (SP) kioszt st ‚s egy alkalmas k˘dlapot haszn l. + KEYB sp 850: Bet”lti a Spanyol (SP) kioszt st ‚s a 850-es k˘dlapot haszn lja. + KEYB sp 850 mycp.cpi: Ugyanaz, de a mycp.cpi f jlt haszn lja. +. +:PROGRAM_KEYB_NOERROR +%s billentyzetkioszt s bet”ltve a %i sz mŁ k˘dlaphoz +. +:PROGRAM_KEYB_FILENOTFOUND +%s: Nincs ilyen billentyzetf jl + +. +:PROGRAM_KEYB_INVALIDFILE +%s: rv‚nytelen billentyzetf jl +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +A %i sz mŁ k˘dlap sz m ra nincs %s billentyzetkioszt s. +. +:PROGRAM_KEYB_INVCPFILE +%s: Hib s vagy nem l‚tez” kioszt s. + +. +:SHELL_ILLEGAL_PATH +Hib s el‚r‚si Łt. +. +:SHELL_CMD_HELP +A t mogatott parancsok list j hoz Ąrd be: help /all . +Egy r”vid lista a leggyakrabban haszn lt parancsokr˘l: +. +:SHELL_CMD_ECHO_ON +ECHO bekapcsolva. +. +:SHELL_CMD_ECHO_OFF +ECHO kikapcsolva. +. +:SHELL_ILLEGAL_SWITCH +Nem megengedett kapcsol˘: %s. +. +:SHELL_MISSING_PARAMETER +Hi nyz˘ param‚ter, +. +:SHELL_CMD_CHDIR_ERROR +Nem lehet  tv ltani: %s. +. +:SHELL_CMD_CHDIR_HINT +M sik meghajt˘ra val˘ v lt shoz Ąrd be: %c: +. +:SHELL_CMD_CHDIR_HINT_2 +A k”nyvt rn‚v hosszabb mint 8 karakter ‚s/vagy sz˘k”z”ket tartalmaz. +Pr˘b ld Ągy: cd %s +. +:SHELL_CMD_CHDIR_HINT_3 +M‚g mindig a Z: meghajt˘n vagy, v lts  t egy csatolt meghajt˘ra: C:. +. +:SHELL_CMD_MKDIR_ERROR +A k”nyvt rat nem lehet l‚trehozni: %s. +. +:SHELL_CMD_RMDIR_ERROR +A k”nyvt rat nem lehet let”r”lni: %s. +. +:SHELL_CMD_DEL_ERROR +A f jlt nem lehet let”r”lni: %s. +. +:SHELL_SYNTAXERROR +Hib s szintaxis. +. +:SHELL_CMD_SET_NOT_SET +A(z) %s k”rnyezeti v ltoz˘ nincs defini lva. +. +:SHELL_CMD_SET_OUT_OF_SPACE +Elfogyott a k”rnyezeti v ltoz˘khoz szks‚ges hely. +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Hi nyz˘ f jln‚v. +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Hi nyz˘ sz m. +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Hib s sz m. +. +:SHELL_CMD_GOTO_MISSING_LABEL +Nincs cĄmk‚vel ell tva a GOTO parancs. +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: A(z) %s cĄmke nem tal lhat˘. +. +:SHELL_CMD_FILE_NOT_FOUND +A(z) %s f jl nem l‚tezik. +. +:SHELL_CMD_FILE_EXISTS +A(z) %s f jl m r l‚tezik. +. +:SHELL_CMD_DIR_INTRO +%s k”nyvt r. +. +:SHELL_CMD_DIR_BYTES_USED +%5d F jl %17s Byte. +. +:SHELL_CMD_DIR_BYTES_FREE +%5d K”nyvt r %17s Byte szabad. +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +A(z) %c meghajt˘ nem l‚tezik. +Haszn ld a mount parancsot. +Örd be intro vagy intro mount ha t”bb inform ci˘t szeretn‚l. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Rossz parancs: %s. +. +:SHELL_CMD_PAUSE +šss egy billentyt a folytat shoz. +. +:SHELL_CMD_PAUSE_HELP +Egy billentyt‚sre v r a folytat shoz. +. +:SHELL_CMD_COPY_FAILURE +Hiba a m sol s sor n: %s. +. +:SHELL_CMD_COPY_SUCCESS + %d F jl m sol sa megt”rt‚nt. +. +:SHELL_CMD_SUBST_NO_REMOVE +A meghajt˘ elt volĄt sa nem t mogatott. Nem csin l semmit. +. +:SHELL_CMD_SUBST_FAILURE +SUBST sikertelen. Hib s a parancssor vagy a meghajt˘ m r haszn latban van. +Csak Ągy lehet haszn lni a SUBST-ot a helyi meghajt˘kon. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş DOSBox v%-8s  ş +ş ş +ş T mogatott shell-parancsok‚rt Ąrd be: HELP ş +ş Egy r”vid ismertet”r‚rt Ąrd be: INTRO ş +ş ş +ş Ha t”bb sebss‚get akarsz: ctrl-F8 ‚s ctrl-F12. ş +ş Billentyzett‚rk‚p: ctrl-F1. ş +ş T”bb inform ci˘‚rt olvasd el a README f jlt a DOSBox k”nyvt rban. ş +ş ş +. +:SHELL_STARTUP_CGA +ş DOSBox t mogatja a kompozit CGA m˘dot. ş +ş šss (alt-)F11-et a szĄnek lecser‚l‚s‚hez ebben a m˘dban. ş +ş ş +. +:SHELL_STARTUP_DEBUG +ş šss alt-Pause-t a debughoz, vagy indĄts  DEBUG parammal. ş +ş ş +. +:SHELL_STARTUP_END +ş J˘ sz˘rakoz st! ş +ş A DOSBox Csapat ş +ş (Magyar fordĄt s: TCH http://bgafc.t-hosting.hu http://oscomp.hu) ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:SHELL_CMD_CHDIR_HELP +K”nyvt rv lt s. +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [meghajt˘:][Łtvonal] +CHDIR [..] +CD [meghajt˘:][Łtvonal] +CD [..] + + .. Szl” k”nyvt r + +Örd be: CD meghajt˘: a jelenlegi k”nyvt r megmutat s hoz a kijel”lt meghajt˘n. +Örd be: CD param‚terek n‚lkl, a jelenlegi meghajt˘ ‚s k”nyvt r megmutat s hoz. +. +:SHELL_CMD_CLS_HELP +K‚perny”t”rl‚s. +. +:SHELL_CMD_DIR_HELP +K”nyvt r kilist z sa. +. +:SHELL_CMD_ECHO_HELP +šzeneteket jelenĄt meg, vagy bekapcsolja/kikapcsolja az zeneteket. +. +:SHELL_CMD_EXIT_HELP +Kisz ll a parancssorb˘l. +. +:SHELL_CMD_HELP_HELP +Megmutatja a sŁg˘t. +. +:SHELL_CMD_MKDIR_HELP +L‚trehoz egy k”nyvt rat. +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [meghajt˘:][Łtvonal] +MD [meghajt˘:][Łtvonal] +. +:SHELL_CMD_RMDIR_HELP +Let”r”l egy k”nyvt rat. +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [meghajt˘:][Łtvonal] +RD [meghajt˘:][Łtvonal] +. +:SHELL_CMD_SET_HELP +Megv ltoztatja a k”rnyezeti v ltoz˘kat. +. +:SHELL_CMD_IF_HELP +A felt‚teles feladatok kezel‚s‚t biztosĄtja a batch f jlokon bell. +. +:SHELL_CMD_GOTO_HELP +A megcĄmzett sorra ugrik a batchf jlon bell. +. +:SHELL_CMD_SHIFT_HELP +Bal shift parancssori param‚ter egy batch scripten bell. +. +:SHELL_CMD_TYPE_HELP +Megmutatja egy sz”vegf jl tartalm t. +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [meghajt˘:][Łtvonal][f jln‚v] +. +:SHELL_CMD_REM_HELP +Megjegyz‚s a batch f jlon bell. +. +:SHELL_CMD_REM_HELP_LONG +REM [megjegyz‚s] +. +:SHELL_CMD_NO_WILD +A parancs egyszer v ltozata. HelyettesĄt” karakterek itt nem enged‚lyezettek. +. +:SHELL_CMD_RENAME_HELP +ľtnevez egy vagy t”bb f jlt. +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [meghajt˘:][Łtvonal]f jln‚v1 f jln‚v2. +REN [meghajt˘:][Łtvonal]f jln‚v1 f jln‚v2. + +Nem adhatsz meg Łj meghajt˘t vagy k”nyvt rat az Łj f jln‚vhez. +. +:SHELL_CMD_DELETE_HELP +Let”r”l egy vagy t”bb f jlt. +. +:SHELL_CMD_COPY_HELP +F jlokat m sol. +. +:SHELL_CMD_CALL_HELP +ElindĄt egy batch f jlt egy m sik batch f jlb˘l. +. +:SHELL_CMD_SUBST_HELP +Egy bels” k”nyvt rat egy meghajt˘hoz rendel. +. +:SHELL_CMD_LOADHIGH_HELP +Bet”lt egy programot a fels” mem˘ri ba (szks‚ges: xms=true,umb=true). +. +:SHELL_CMD_CHOICE_HELP +Egy billentyt‚sre v r ‚s be llĄtja az ERRORLEVEL v ltoz˘t. +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:lehet”s‚gek] [/N] [/S] sz”veg + /C[:]lehet”s‚gek - Be llĄtja a lehets‚ges billentyket. alap: yn. + /N - Ne mutassa a lehet”s‚geket a v‚g‚n. + /S - Kisbet-nagybet ‚rz‚keny v laszt s enged‚lyez‚se. + text - A sz”veg megjelenĄt‚se. +. +:SHELL_CMD_ATTRIB_HELP +Kompatibilit s miatt kerlt be. +. +:SHELL_CMD_PATH_HELP +Kompatibilit s miatt kerlt be. +. +:SHELL_CMD_VER_HELP +Megn‚zi ‚s be llĄtja a bejelentett DOS verzi˘t. +. +:SHELL_CMD_VER_VER +DOSBox verzi˘ %s. Bejelentett DOS verzi˘ %d.%d. +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/hu/version.txt dosbox-staging-0.77.0/contrib/old-translations/hu/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/hu/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/hu/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Hungarian 0.72 diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/it/DOSBox 0.74 Manual ITA.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/it/DOSBox 0.74 Manual ITA.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/it/DOSBox 0.74 Manual ITA.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/it/DOSBox 0.74 Manual ITA.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1398 @@ +DOSBox v0.74 (utilizzare sempre l'ultima versione da www.dosbox.com) + + +===== +NOTA: +===== + +La nostra speranza è che un giorno DOSBox possa fare girare tutti i +programmi mai fatti per PC, ma ancora non siamo a quel punto. Attualmente +DOSBox in esecuzione su un computer potente è piĂš o meno l'equivalente +di un PC Pentium 1. DOSBox può essere configurato in modo da far girare +un certo numero di giochi DOS, dai classici in CGA/Tandy/PCjr fino +ai giochi dell'era di Quake. + + + +======= +INDICE: +======= +1. Iniziare subito +2. Iniziare (FAQ) +3. Parametri Riga di Comando +4. Programmi Interni +5. Tasti Speciali +6. Joystick/Gamepad +7. Mappa dei Tasti +8. Layout della Tastiera +9. Funzione Multiplayer Seriale +10. Come velocizzare/rallentare DOSBox +11. Risoluzione dei problemi +12. Finestra di Stato DOSBOX +13. Il file di configurazione (opzioni) +14. Il file linguaggio +15. Costruire la tua versione di DOSBox +16. Ringraziamenti speciali +17. Contatti + + + +=================== +1. Iniziare subito: +=================== + +Digita INTRO in DOSBox per una rapida occhiata alle opzioni. +È importantissimo che impari velocemente concetti come "montare drive", +DOSBox non crea automaticamente nessun drive (o sue parti) accessibili +dall'interno dell'emulazione. +Per maggiori informazioni vedi la FAQ "Come Iniziare?" +e anche la descrizione del comando MOUNT (sezione 4: "Programmi Interni"). +Se hai il tuo gioco su in cdrom puoi provare questa guida: +http://vogons.zetafleet.com/viewtopic.php?t=8933 + + + +================== +2. Iniziare (FAQ): +================== + +START: Come iniziare? +AUTOMATION: Devo sempre digitare questi comandi "mount"? +FULLSCREEN: Come passo a schermo intero ? +CD-ROM: Il mio CD-ROM non funziona. +CD-ROM: Il gioco/applicazione non riesce a trovare il suo CD-ROM. +MOUSE: Il mouse non funziona. +SOUND: Non c'è il suono. +SOUND: Attualmente, quali dispositivi sonori DOSBOx emula? +SOUND: Il suono è a singhiozzo, rallentato o comunque strano. +KEYBOARD: Non posso digitare \ o : in DOSBox. +KEYBOARD: Lo Shift Destro e "\" non funzionano in DOSBox. (Windows Soltanto) +KEYBOARD: L'input da tastiera soffre di rallentamenti. +CONTROL: I carattere/cursore/puntatore del mouse si muove sempre nella stessa direzione! +SPEED: Il gioco/applicazione gira troppo lentamente/troppo velocemente! +CRASH: Il gioco/applicazione non gira per niente, o va in crash! +CRASH: DOSBox va in crash all'avvio! +GAME: Il mio gioco Build (Duke3D/Blood/Shadow Warrior) ha problemi. +SAFETY: DOSBox può danneggiare il mio computer? +OPTIONS: Vorrei cambiare le opzioni di DOSBox. +HELP: Ottimo Manuale, ma ancora non capisco. + + + + +START: Come Iniziare? + Devi fare in modo che le tue directory diventino disponibili sottoforma di + drive in DOSBox usando il comando "mount". Per esempio, sotto Windows, il + comando "mount C D:\GAMES" creerĂ  un drive C in DOSBox, che punta alla tua + directory reale D:\GAMES(che è stata creata in precedenza). + Sotto Linux, "mount c /home/nomeutente" creerĂ  + un drive C in DOSBox, che punta alla directory /home/nomeutente di Linux. + Per spostarti nel drive appena montato digita "C:". Se tutto è andato bene, + DOSBox mostrerĂ  il prompt "C:\>". + + +AUTOMATION: Devo sempre digitare questi comandi? Nessuna automazione? + Nel file di configurazione di DOSBox c'è una sezione chiamata [autoexec]. + I comandi presenti in questa sezione vengono eseguiti ad ogni avvio di + DOSBox, quindi puoi usarla per montare i drive. Guarda la sezione 13: + Il file di configurazione (opzioni). + + +FULLSCREEN: Come passo a schermo intero? + Premi alt-invio. In alternativa: Modifica il file di configurazione di + DOSBox e cambia l'opzione fullscreen=false in fullscreen=true. Se la + modalitĂ  a schermo intero non ti va bene, gioca con l'opzioni: fullresolution, + output and aspect nel file di configurazione di DOSBox. + Per tornare indietro dalla modalitĂ  schermo intero: Premi alt-invio di nuovo. + + +CD-ROM: Il mio CD-ROM non funziona. + Per montare il tuo CD-ROM in DOSBox devi specificare qualche opzione addizionale + all'atto del montaggio. + in Linux: - mount d /media/cdrom -t cdrom + Per abilitare il supporto CD-ROM (include MSCDEX) in Windows: + - mount d f:\ -t cdrom + Per abilitare il supporto CD-ROM di basso livello (usa ioctl se possibile): + - mount d f:\ -t cdrom -usecd 0 + Per abilitare il supporto SDL di basso livello: + - mount d f:\ -t cdrom -usecd 0 -noioctl + Per abilitare il supporto aspi di basso livello (win98 con l'aspi-layer installato): + - mount d f:\ -t cdrom -usecd 0 -aspi + + Nei comandi: - d lettera di drive che avrai nel DOSBox + - f:\ percorso del CD-ROM nel tuo PC. + - 0 Il numero del drive CD-ROM, ottenuto tramite mount -cd + (nota che questo valore è necessario solo quando si usa SDL per i + CD audio, altrimenti viene ignorato) + Vedi anche la domanda: Il gioco/applicazione non riesce a trovare il suo CD-ROM. + + +CD-ROM: Il gioco/applicazione non riesce a trovare il suo CD-ROM. + Assicurati di montare il CD-ROM col parametro -t cdrom, ciò abiliterĂ  + l'interfaccia MSCDEX richiesta dai giochi DOS per interfacciarsi con i + CD-ROM. Prova anche ad aggiungere la giusta etichetta (-label ETICHETTA) + al comando mount, dove ETICHETTA è l'etichetta CD (volume ID) del CD-ROM. + Sotto Windows puoi specificare -ioctl, -aspi o -noioctl. Leggi la descrizione + del comando mount nella Sezione 4: "Programmi Interni" per capirne il significato + e per vedere le altre opzioni legate ai CD audio -ioctl_dx, -ioctl_mci, -ioctl_dio. + + Prova a creare una immagine CD-ROM (preferibilmente di tipo CUE/BIN) e usa + lo strumento interno di DOSBox IMGMOUNT per montarla (il file CUE). + Questo permette un supporto di basso livello del CD molto buono su qualsiasi + sistema operativo. + + +MOUSE: Il mouse non funziona. + Solitamente, DOSBox capisce quando un gioco usa il controllo via mouse. + Quando clicchi sullo schermo dovrebe essere catturato (cioè confinato alla + finestra di DOSBox) e funzionare. Con certi giochi, la rilevazione del mouse + da parte di DOSBox non funziona. In questo caso dovrai catturare il mouse + manualmente premendo CTRL-F10. + + +SOUND: Non c'è il suono. + Assicurati che il suono sia correttamente configurato nel gioco. Ciò può + di solito essere fatto durante l'installazione o con un setup/setsound + allegato al gioco. Prima controlla che sia possibile fare l'autorilevazione. + Se non è disponibile prova a scegliere la Soundblaster o Soundblaster16 + con le impostazioni di default "address=220 irq=7 dma=1"(o anche highdma=5). + Potresti anche dover impostare Sound Canvas/SCC/MPU-401/General MIDI/Wave Blaster + a "adressess=330 IRW=2" come dispositivo musicale. + Questi parametri delle schede audio emulate possono essere cambiati nel + file di configurazione di DOSBox. + Se ancora non senti niente imposta il core su normal in DOSBox + e usa valori piĂš bassi per cycles (come cycles=2000). + Assicurati inoltre che la tua scheda audio reale funzioni correttamente. + In certi casi potrebbe essere utile usare una scheda audio emulata differente + come una soundblaster pro (sbtype=sbpro1 nel file di configurazione DOSBox) o + la gravis ultrasound (gus=true). + + +SOUND: Attualmente, quali dispositivi sonori DOSBox emula? + DOSBox emula diversi dispositivi sonori: + - Altoparlante interno PC/Buzzer + Questa emulazione include sia il generatore di note che diverse forme + di output audio digitale attraverso l'altoparlante interno. + - Creative CMS/Gameblaster + E' la prima scheda rilasciata da Creative Labs(R). La configurazione + di default la piazza nell' address 220. Questa è disabilitata di serie. + - Tandy 3 voice + L'emulazione di questo hardware audio è completa ad eccezione del + noise channel. Il noise channel non è ben documentato e di conseguenza + vi si può andare solo per immaginazione, cercando l'accuratezza sonora. + Questa è disabilitata di serie. + - Tandy DAC + Alcuni giochi ridhiedono di spegnere l'emulazione della della soundblaster + (sbtype=none) per una migliore supporto del suono Tandy DAC. Non dimenticate di riportare indietro sbtype come sb16 se non si utilizza il suono Tandy. + - Adlib + Questa emulazione è quasi perfetta e comprende la capacitĂ  di Adlib di + riprodurre quasi suono digitalizzato. Piazzare a address 220 (anche su 388). + - SoundBlaster 16/ SoundBlaster Pro I & II /SoundBlaster I & II + Per default DOSBox fornisce suono a 16-bit Soundblaster 16. + Puoi selezionare una versione diversa di SoundBlaster nel file di + configurazione di DOSBox. + AWE32 music non è emulata, invece si può usare MPU-401(vedi sotto). + - Disney Sound source e Covox Speech Thing + Usando la porta stampante, questo dispositivo sonoro produce soltanto + audio digitale. Piazzare su LPT1. + - Gravis Ultrasound + L'emulazione di questo hardware è quasi completa, anche se le funzioni + MIDI sono state lasciate fuori, dato che è giĂ  stato emulato MPU-401 + in altro codice. Per Gravis music si devono installare anche i driver + Gravis all'interno DOSBox. Questa è disabilitata di serie. + - MPU-401 + Una interfaccia MIDI è anch'essa emulata. Questo metodo di output + sonoro funzionerĂ  soltanto se usato con un dispositivo/emulatore esterno. + I sistemi operativi Windows XP/Vista/7 e MAC hanno si serie un emulatore + compatibile con: Sound Canvas/SCC/General Standard/General MIDI/Wave Blaster. + Un altro dispositivo/emulatore è necessario per la compatibilitĂ  con + Roland LAPC/CM-32L/MT-32 . + + +SOUND: Il suono è a singhiozzo, rallentato o comunque strano. + Stai sfruttando troppa potenza CPU per mantenere DOSBox a quella velocitĂ . + Puoi abbassare i cicli, saltare dei fotogrammi, ridurre la frequenza di campionamento + del dispositivo audio, aumenta il prebuffer. Guarda la sezione 13: "Il file di configurazione (opzioni)". Se stai usando cycles=max o =auto, assicurati che non ci siano processi in background che interferiscano! (specialmente se accedono al + disco rigido). Si veda anche Sezione 10: "Come velocizzare/rallentare DOSBox" + + +KEYBOARD: Non posso digitare \ o : in DOSBox. + Può capitare in vari casi, come se la il layout della tua tastiera non ha una + corrispondente rappresentazione DOS (o non è stata correttamente rilevata), + o le assegnazioni dei tasti sono errate. + Alcune possibili soluzioni: + 1. Usa piuttosto / , o ALT-58 per : e ALT-92 per \. + 2. Cambia il layout tastiera DOS (vedi la Sezione 7: Layout Tastiera). + 3. Aggiungi i comandi che vuoi eseguire alla sezione [autoexec] del file + di configurazione DOSBox. + 4. Apri il file di configurazione e cambia la voce usescancodes. + 5. Cambia il layout tastiera del tuo sistema operativo. + + Nota che se è impossibile identificare il layout del tuo sistema, o keyboardlayout + è impostato a none nel file di configurazione DOSBox, viene usato il layout standard + americano (US). In questa configurazione, prova i tasti vicino a "invio" per il + tasto \ (backslash), + e per il tasto : (due punti) usa maiuscolo e i tasti tra "invio" e "L". + + +KEYBOARD: Lo Shift Destro e "\" non funzionano in DOSBox. (Windows Soltanto) + Ciò può verificarsi se Windows crede che avete piĂš di una tastiera + collegata al PC, quando si utilizzano alcuni dispositivi di controllo remoto. + Per verificare questo problema eseguire cmd.exe, andare nella cartella C:\Programmi\DOSBox e digitare: set SDL_VIDEODRIVER=windib dosbox.exe + controllare se la tastiera ha iniziato a funzionare correttamente. + Se windib è piĂš lento è possibile utilizzare al meglio una delle due soluzioni fornite qui: http://vogons.zetafleet.com/viewtopic.php?t=24072 + + +KEYBOARD: L'input da tastiera soffre di rallentamenti. + Abbassa il livello di prioritĂ  nel file di configurazione di DOSBox + come ad esempio "priority=normal,normal". Puoi anche provare + a diminuire i cicli. + (usa un numero fisso di cicli da cui partire, come cycles=10000). + + +CONTROL: I carattere/cursore/puntatore del mouse si muove sempre nella stessa direzione! + Vedi se succede ancora quando disattivi l'emulazione joystick, + imposta joysticktype=none nella sezione [joystick] del tuo file + di configurazione di DOSBox. Puoi anche provare a scollegare ogni + joystick. Se vuoi usare il joystick nei giochi, prova a impostare + timed=false e assicurati di calibrare il joystick (sia nel tuo + SO come anche nel gioco, o nel setup del gioco). + + +SPEED: Il gioco/applicazione gira troppo lentamente/troppo velocemente! + Guarda nella sezione 10: "Come velocizzare/rallentare DOSBox" per ulteriori informazioni. + + +CRASH: Il gioco/applicazione non gira per niente, o va in crash! + Guarda la Sezione 11: Risoluzione dei problemi + + +CRASH: DOSBox va in crash all'avvio! + Guarda la Sezione 11: Risoluzione dei problemi + + +GAME: Il mio gioco Build (Duke3D/Blood/Shadow Warrior) ha problemi. + Prima di tutto, prova a trovare un port del gioco. Con quelli ti troverai + certamente meglio. Per sistemare i problemi grafici che avvengono in + DOSBox alle risoluzioni piĂš alte: apri il file di configurazione DOSBox e cerca machine=svga_s3. Cambia svga_s3 in vesa_nolfb ,cambia memsize=16 in memsize=63 + + +SAFETY: DOSBox può danneggiare il mio computer? + Non piĂš di qualsiasi altro programma che richieda molte risorse. L'incremento + dei cicli non è un overclock della tua CPU reale. Impostare un valore troppo + alto ha un effetto negativo sulle prestazioni del software che gira all'interno + di DOSBox. + + +OPTIONS: Vorrei cambiare le opzioni di DOSBox. + Guarda la sezione 13: "Il file di configurazione (opzioni)". + + +HELP: Ottimo Manuale, ma ancora non capisco. + Per ulteriori domande leggere il resto di questo Manuale. Si può anche vedere: + la guida situata a http://vogons.zetafleet.com/viewforum.php?f=39 + il wiki di DOSBOx http://www.dosbox.com/wiki/ + il sito/forum: http://www.dosbox.com + (documentazione in inglese) + + + +============================= +3. Parametri Riga di Comando: +============================= + +Una panoramica sui parametri di linea di comando da passare a DOSBox. Anche se nella maggior parte dei casi è invece piĂš facile da usare il file di configurazione di DOSBox. +Guarda la sezione 13: "Il file di configurazione (opzioni)". + +Per poter utilizzare parametri della riga di comando: +(Windows) aprire cmd.exe o command.com o modificare il collegamento a DOSBox.exe +(Linux) usare la consolle +(MAC OSX) avviare termila.app e andate a: + /applications/dosbox.app/contents/macos/dosbox + +Le opzioni sono valide per tutti i sistemi operativi tranne quando +espressamente specificato nelle descrizioni: + +dosbox [name] [-exit] [-c command] [-fullscreen] [-userconf] + [-conf congfigfilelocation] [-lang languagefilelocation] + [-machine machine type] [-noconsole] [-startmapper] [-noautoexec] + [-securemode] [-scaler scaler | -forcescaler scaler] [-version] + [-socket socket] + +dosbox -version +dosbox -editconf programma +dosbox -opencaptures programma +dosbox -printconf +dosbox -eraseconf +dosbox -erasemapper + + name + Se "name" è una directory verrĂ  montata come drive C:. + Se "name" è un eseguibile, verrĂ  montata la directory in cui "name" si trova + come drive C: e verrĂ  eseguito "name". + + -exit + DOSBox si chiuderĂ  quando l'applicazione DOS "nome" sarĂ  terminata. + + -c command + Esegue il comando specificato prima di avviare "name". Possono essere + specificati comandi multipli. Ogni comando dovrebbe partire con "-c". + Un comando può essere: un Programma Interno, un comando DOS o un + eseguibile su un drive montato. + + -fullscreen + Avvia DOSBox in modalitĂ  a schermo intero. + + -userconf + Avvia DOSBox con le impostazioni speficicate dall'utente. + Possono essere specificate diverse opzioni -conf + ma -userconf è sempre caricato prima di loro. + + -conf configfilelocation + Avvia DOSBox con le impostazioni speficicate in "configfilelocation". + Possono essere specificate diverse opzioni -conf. + Vedi la Sezione 13 per maggiori dettagli. + + -lang languagefilelocation + Avvia DOSBox usando la lingua specificata in "languagefilelocation". + Vedi la Sezione 14 per maggiori dettagli. + + -machine machinetype + Imposta DOSBox per emulare un tipo specifico di macchina. Scelte valide + sono: hercules, cga, ega, pcjr, tandy, svga_s3 (default) oltre agli altri + chipset svga elencati nella guida del file di configurazione DOSBox. + svga_s3 abilita anche l'emulazione vesa. + Per alcuni effetti speciali vga, può essere usato solo il tipomacchina + vgaonly, nota che ciò disattiva le funzionalitĂ  svga e potrebbe + essere (considerevolmente) piĂš lento a causa della maggiore precisione + di emulazione richiesta. + Il tipo di macchina influenza sia la scheda video che le schede + audio disponibili. + + -noconsole (Solo Windows) + Avvia DOSBox senza mostrare DOSBOx Finestra di Stato(consolle). + L'output sarĂ  ridirezionato verso stdout.txt e stderr.txt + + -startmapper + Avvia il keymapper immediatamente. Utile per gli utenti con + problemi di tastiera. + + -noautoexec + Salta la sezione [autoexec] del file di configurazione caricato. + + -securemode + Uguale a -noautoexec, ma aggiunge config.com -securemode alla fine + di AUTOEXEC.BAT (che, a sua volta, disabilita qualsiasi cambiamento + su come i drive vengono montati dentro DOSBox). + + -scaler scaler + Usa lo scaler specificato da "scaler". Vedi il file di configurazione DOSBox + per conoscere che scaler sono disponibili. + + -forcescaler scaler + Simile al parametro -scaler, ma prova a forzare l'uso dello scaler + specificato anche qualora non fosse adatto. + + -version + mostra le informazioni di versione ed esce. Utile per i frontend. + + -editconf programma + avvia "programma" e gli passa come parametro il file di configurazione. + Puoi specificare questo comando piĂš volte. In questo caso, avvierĂ  + il secondo programma se il primo dovesse non avviarsi. + + -opencaptures programma + avvia "programma" e gli passa come parametro la cartella degli + screenshot. + + -printconf + stampa la posizione del file di configurazione di default. + + -resetconf + rimuove il file di configurazione. + + + -resetmapper + rimuove il file mapper usando di serie il file diconfigurazione pulito. + + -socket + passa il numero del socket all'emulazione nullmodem . + Guarda la sezione 9: "Funzione Multiplayer Seriale". + + +Nota: Se un name/command/configfilelocation/languagefilelocation contiene uno + spazio, metti l'intero name/command/configfilelocation/languagefilelocation + tra doppi apici ("comando o nome di file"). Se hai bisogno, ecco come + usare doppi apici all'interno di altri doppi apici (succede spesso + con -c e mount): + Gli utenti Windows e OS/2 possono usare apici singoli all'interno di + doppi apici. Gli altri dovrebbero essere in grado di usare doppi apici + preceduti dal carattere di escape, all'interno di altri doppi apici. + Windows: -c "mount c 'c:\mia cartella con i giochi DOS\'" + Linux: -c "mount c \"/tmp/nome con spazio\"" + +Un esempio piuttosto singolare, proprio per dimostrare cosa si può fare (Windows): +dosbox D:\cartella\file.exe -c "MOUNT Y H:\MiaCartella" + Questo monta D:\cartella come C:\ ed esegue file.exe. + Prima di fare questo, monta H:\MiaCartella come drive Y. + +Sotto Windows, puoi anche trascinare directory/file sull'eseguibile di DOSBox. + + + +===================== +4. Programmi Interni: +===================== + +DOSBox supporta la maggior parte dei comandi DOS trovati in command.com. +Per avere una lista dei comandi interni digita "HELP" al prompt. + +Inoltre sono disponibili i seguenti comandi: + +MOUNT "Lettera Drive Emulato" "Drive o directory reale" + [-t type] [-aspi] [-ioctl] [-noioctl] [-usecd number] [-size drivesize] + [-label drivelabel] [-freesize size_in_mb] + [-freesize size_in_kb (floppies)] +MOUNT -cd +MOUNT -u "Lettera Drive Emulato" + + Programma per montare le directory locali come drive dentro DOSBox. + + "Lettera Drive Emulato" + La lettera di drive dentro DOSBox (per esempio C). + + "Lettera Drive Reale (solitamente per i CD-ROM in Windows) o Directory" + La directory locale cui vuoi accedere da dentro DOSBox. + + -t tipo + Tipo di directory montata. Valori supportati: dir (default), + floppy, cdrom. + + -size driversize + (solo esperti) + Imposta la dimensione del drive, dove dimensionedrive è nella forma + "bps,spc,tcl,fcl": + bps: byte per settore, di default 512 per i drive regolari e + 2048 per i drive CD-ROM + spc: settori per cluster, di solito tra 1 e 127 + tcl: cluster totali, tra 1 e 65534 + fcl: cluster totali disponibili, tra 1 e tcl + + -freesize dimensione_in_mb | dimensione_in_kb + Imposta la quantitĂ  di spazio libero disponibile sul drive in + megabyte (drive regolari) o kilobyte (drive floppy). + Si tratta di una versione semplificata di -size. + + -label etichettadrive + Imposta il nome del drive a "etichettadrive". Richiesto da + alcuni sistemi se l'etichetta del cd non è letta correttamente. + Utile quando un programma non riesce a trovare il proprio CD-ROM. + Se non specifichi un'etichetta e non è selezionato nessun supporto + di basso livello (ciò avviene quando ometti -usecd # e/o -aspi o + quando specifichi -noioctl): + Per Windows: l'etichetta è estratta dal "Drive Reale". + Per Linux: l'etichetta è impostata su NO_LABEL. + + Se specifichi un'etichetta, questa verrĂ  mantenuta fin quando il drive + rimarrĂ  montato. Non verrĂ  modificata !! + + -aspi + Forza l'uso del layer aspi. Valido soltanto se si sta montando un + CD-ROM sotto sistemi Windows con un layer ASPI installato. + + -ioctl (selezione automatica dell'interfaccia CD audio) + -ioctl_dx (estrazione dell'audio digitale usata per i CD audio) + -ioctl_dio (chiamate ioctl usate per i CD audio) + -ioctl_mci (MCI usato per i CD audio) + Forza l'uso dei comandi ioctl. Valido solo se si monta un CD-ROM sotto + un SO Windows che li supporti (Win2000/XP/NT). + Le varie scelte variano solo nel modo in cui il CD audio è gestito, + preferibilmente viene usato -ioctl_dio (il piĂš leggero), ma potrebbe non + funzionare su tutti i sistemo, quindi si può anche provare con -ioctl_dx + (o -ioctl_mci). + + -noioctl + Forza l'uso di un layer CD-ROM SDL. Valido su tutti i sistemi. + + -usecd numero + Valido su tutti i sistemi, ma sotto windows va abbinato a -noioctl. + Permette di scegliere il drive che deve essere usato da SDL. Usalo + quando l'interfaccia SDL CD-ROM monta il drive sbagliato o non ne monta + nessuno. "numero" può essere ricavato digitando "MOUNT -cd". + + -cd + Mostra tutti i drive CD-ROM rilevati da SDL, e i rispettivi numeri. + Vedi le informazioni alla voce -usecd, qui sopra. + + -u + Rimuove il mount. Non funziona per Z:\. + + Nota: E' possibile montare una directory locale come drive CD-ROM, + ma In questo caso però mancherĂ  il supporto hardware. + + In pratica MOUNT ti permette di connettere l'hardware reale al PC emulato da + DOSBox. Quindi MOUNT C C:\GIOCHI dice a DOSBox di usare la tua directory + C:\GIOCHI come drive C: in DOSBox. MOUNT C E:\QualsiasiCartella dice a DOSBox di utilizzare E:\QualsiasiCartella come drive C: in DOSBox. + + Montare l'intero drive C con MOUNT C C:\ è ALTAMENTE sconsigliato! Stesso + discorso vale per il montare la directory radice di qualsiasi altro drive, + eccetto che per i CD-ROM (a causa della loro natura a sola lettura). + In caso contrario, se fai errori all'interno del DOSBox potresti perdere + tutti i tuoi file. + Inoltre non montare mai le cartelle "Windows" o "Programmi" o loro sottocartelle + in Windows Vista/7, DOSBox non può funzionare correttamente, o smetterĂ  di funzionare + correttamente dopo. Si raccomanda di tenere tutte le vostre applicazioni dos/giochi + in una cartella semplice (ad esempio c:\dosgames) e montare quella. + + È sempre necessario installare il tuo gioco all'interno di DOSBox. + Quindi sempre anche se avete il gioco su CD (anche dopo l'installazione!) + per il mount di entrambi: cartella come unitĂ  disco rigido e un CD-ROM. + HardDisk dovrebbe sempre essere montato come c + CD-ROM dovrebbe sempre essere montato come d + Floppy dovrebbe sempre essere montato come a (o b) + + Esempi base di MOUNT per utenti normali (Windows): + 1. Per montare una cartella come harddisk: + mount c d:dosgame + 2. Per montare il cdrom di sistema E come cdrom sul drive D in DOSBox: + mount d e:\ -t cdrom + 3. Per montare il drive a: come floppy: + mount a :\ -t floppy + + Esempi avanzati di MOUNT (Windows): + 4. Per montare un hardisk con ~870 mb di spazio disponibile (versione semplice): + mount c d:\dosgame -freesize 870 + 5. Per montare un drive con ~870 mb di spazio disponibile + (solo esperti, pieno controllo): + mount c d:\dosgame -size 512,127,16513,13500 + + Altri esempi di MOUNT: + 1. Per montare c:\dosgame\floppy come floppy: + mount a c:\dosgame\floppy\ - t floppy + 2. Per montare mount il CD-ROM al mountpoint /media/cdrom comes CD-ROM D in DOSBox: + mount d /media/cdrom -t cdrom -usecd 0 + 3. Per montare /home/user/dosgames come drive C in DOSBox: + mount c /home/user/dosgames + 4. Per montare la directory da cui DOSBox è stato eseguito come D in DOSBox: + mount c . + (nota che . rappresenta la directory da cui DOSBox è avviato, + in Windows Vista/7 non usare questo se avete installato DOSBox + nella cartella "Programmi) + + Se si desidera montare l'immagine del CD o un'immagine floppy, usare IMGMOUNT. + MOUNT funziona anche con le immagini, ma solo se si utilizza un programma esterno, + per esempio, (entrambi sono gratuiti): + - Daemon Tools Lite (per le immagini CD), + - Virtual Floppy Drive (per le immagini floppy). + Anche se IMGMOUNT può dare una migliore compatibilitĂ . + + +MEM + Programma per visualizzare la quantitĂ  e tipo di memoria disponibile. + + +VER +VER set versione_maggiore [versione_minore] + Mostra la versione attuale di DOSBox, e la versione di DOS riportata + (utilizzo senza parametri). + Cambia la versione di DOS riportata col parametro "set", + per esempio: "VER set 6 22" per far sĂŹ che DOSBox riporti DOS 6.22 + come versione DOS. + + +CONFIG -writeconf filelocation +CONFIG -writelang filelocation +CONFIG -securemode +CONFIG -set "section property=value" +CONFIG -get "section property" + + CONFIG può essere usato per cambiare o visualizzare varie impostazioni di + DOSBox durante la sua esecuzione. Può salvare le impostazioni correnti o + le stringhe di linguaggio su disco. Informazioni a riguardo di tutte le + possibili sezioni e proprietĂ  possono essere trovate nella sezione 11 + (Il File di Configurazione). + + -writeconf filelocale + Scrive la configurazione attuale su un file. "filelocale" è + localizzato sul drive locale, non su un drive montato in DOSBox. + Il file di configurazione controlla varie impostazioni di DOSBox: + la quantitĂ  di memoria emulata, le schede audio emulate e tante + altre cose. Permette anche l'accesso ad AUTOEXEC.BAT. + Vedi la Sezione 11 (Il File di Configurazione) per ulteriori + informazioni. + + -writelang filelocale + Scrive le impostazioni di linguaggio attuali su un file. "filelocale" + è localizzato sul drive locale, non su un drive montato in DOSBox. + Il file di linguaggio controlla tutto l'output dei comandi interni + visibile nel dosbox e il dos interno. + + -securemode + Imposta DOSBox su una modalitĂ  piĂš sicura. In questa modalitĂ  i + comandi interni MOUNT, IMGMOUNT e BOOT non funzionano. Non è inoltre + possibile creare un nuovo file di configurazione o di linguaggio. + (Attenzione: puoi annullare questa modalitĂ  solo riavviando DOSBox.) + + -set "sezione proprietĂ =valore" + CONFIG proverĂ  a impostare la proprietĂ  al nuovo valore. Attualmente + CONFIG non è ancora in grado di riportare se il comando ha avuto + successo o meno. + + -get "sezione proprietĂ " + Il valore attuale della proprietĂ  è riportato e memorizzato nella + variabile di ambiente %CONFIG%. Questo è utile per memorizzarne il + valore all'interno di file batch. + + Sia "-set" che "-get" funzionano dai file batch e possono essere usati per + impostare i tuoi settaggi preferiti per ogni gioco. + + Esempi: + 1. Per creare un file di configurazione nella tua directory corrente: + config -writeconf dosbox.conf + 2. Per impostare i cicli cpu a 10000: + config -set "cpu cycles=10000" + 3. Per disattivare l'emulazione ems: + config -set "dos ems=off" + 4. Per controllare che cpu core si sta utilizzando: + config -get "cpu core" + + +LOADFIX [-size] [programma] [parametri-programma] +LOADFIX -f + Programma per ridurre la quantitĂ  di memoria disponibile. Utile per i vecchi + programmi che non si aspettano di avere molta memoria disponibile. + + -size + numero di kilobyte da "mangiare", default = 64 kb + + -f + libera tutta la memoria precedentemente allocata + + Esempi: + 1. Per avviare mm2.exe e allocare 64kb di memoria + (mm2 avrĂ  64 kb in meno disponibili) : + loadfix mm2 + 2. Per avviare mm2.exe e allocare 32kb di memoria : + loadfix -32 mm2 + 3. Per liberare la memoria precedentemente allocata : + loadfix -f + + +RESCAN + Fa sĂŹ che DOSBox rilegga la struttura delle directory. Utile se hai fatto + qualche cambiamento sui drive montati da fuori DOSBox. (CTRL - F4 fa la stessa + cosa!) + + +MIXER + Fa sĂŹ che DOSBox visualizzi i correnti settaggi di volume. + Ecco come cambiarli: + + mixer canale sinistra:destra [/NOSHOW] [/LISTMIDI] + + canale + Può essere uno dei seguenti: MASTER, DISNEY, SPKR, GUS, SB, FM [, CDAUDIO]. + CDAUDIO è disponibile solo se è disponibile una interfaccia CD-ROM con + controllo del volume (Immagine CD, ioctl_dx). + + sinistra:destra + I livelli di volume in percentuale. Se preceduti da una D, sono + espressi in decibel (esempio mixer gus d-10). + + /NOSHOW + Evita che DOSBox mostri i risultati se imposti uno dei + livelli di volume. + + /LISTMIDI + Lista i dispositivi midi disponibili sul tuo PC (Windows). Per + selezionare un dispositivo diverso dal midi-mapper standard di + Windows, aggiungi una riga 'midiconfig=id' alla sezione [midi] del + file di configurazione, dove 'id' è il numero del dispositivo + cosĂŹ come elencato da LISTMIDI. + + +IMGMOUNT + Una utilitĂ  per montare immagini disco e immagini CD-ROM in DOSBox. + + IMGMOUNT DRIVE [fileimmagine] -t [tipo_immagine] -fs [formato_immagine] + -size [dimensionesettoreinbyte, settoripertestina, testine, cilindri] + IMGMOUNT DRIVE [fileimmag1, .. ,fileimmagN] -t iso -fs iso + + fileimmagine + Locazione dei file immagine da montare in DOSBox. La locazione può + essere su un drive montato dentro DOSBox, o sul tuo disco reale. + E' anche possibile montare immagini CD-ROM (ISO o CUE/BIN), se ti + serve cambiare le immagini "in corsa" specificale tutte in successione. + (vedi la successiva voce). + CUE/BIN è il formato preferito per le immagini CD-ROM perchĂŠ possono + immagazzinare tracce audio, mentre le ISO soltanto dati. Quando monti + un CUE/BIN, riferisciti sempre al CUE. + + fileimmag1, .. ,fileimmagN + Posizione dei file immagine da montare in DOSBox. E' permesso specificare + piĂš file immagine solo per le immagini CD-ROM. I CD possono poi essere + cambiati con CTRL-F4 in qualsiasi momento. Ciò è richiesto dai giochi + che usano piĂš CD-ROM e richiedono che il CD venga sostituito nel bel + mezzo della partita. + + -t + I seguenti sono tipi di immagine validi: + floppy: Specifica una immagine floppy. DOSBox rileverĂ  automaticamente la + geometria del disco ( 360K, 1.2MB, 720K, 1.44MB, ecc). + iso: Specifica un'immagine iso CD-ROM. La geometria è settata + automaticamente per la dimensione. Può essere in formato iso o cue/bin. + hdd: Specifica un'immagine disco rigido. Va impostata la corretta geometria + del drive perchè essa funzioni. + + -fs + I seguenti sono formati di file system validi: + iso: Specifica il formato CD-ROM ISO 9660. + fat: Specifica che l'immagine usa il file system FAT. DOSBox proverĂ  a + montare questa immagine come un drive in DOSBox e a rendere i file + disponibili da dentro DOSBox. + none: DOSBox non proverĂ  a leggere il file system del disco. Questo è + utile se ti serve formattarlo o se vuoi avviare il disco usando + il comando BOOT. Quando usi il filesystem "none", devi specificare + il numero del drive (2 o 3, dove 2 = master, 3 = slave) piuttosto + che una lettera di drive. + Per esempio, per montare una immagine da 70MB come drive slave, + dovresti digitare (senza le virgolette): + "imgmount 3 d:\test.img -size 512,63,16,142 -fs none" + Confrontalo con un mount per leggere il drive + in DOSBox, che sarebbe qualcosa del genere: + "imgmount e: d:\test.img -size 512,63,16,142" + + -size + Le specifiche in Cilindri, Testine e Settori del drive. + Richiesto per montare immagini disco rigido. + + Esempio su come montare immagini CD-ROM: + 1a. mount c /tmp + 1b. imgmount d c:\mia_iso.iso -t iso + o (funziona ugualmente): + 2. imgmount d /tmp/mia_iso.iso -t iso + + +BOOT + Boot avvia immagini floppy o immagini disco rigido indipendentemente dal + sistema operativo emulato da DOSBox. Questo ti permetterĂ  di avviare + i dischetti di avvio o altri sistemi operativi dentro DOSBox. + Se il sistema emulato è PCjr (machine=pcjr) il comando boot può essere + usato per caricare cartucce PCjr (.jrc). + + BOOT [imgdisco1.img imgdisco2.img .. imgdiscoN.img] [-l letteradrive] + BOOT [cart.jrc] (solo PCjr) + + imgdiscoN.img + Questo può essere qualsiasi numero di immagini floppy disk che si + vuole montare dopo che DOSBox abbia avviato la lettera di drive + specificata. + Per cambiare tra le varie immagini, premi CTRL-F4 per passare al + successivo disco nella lista. La lista ricomincerĂ  da capo quando + raggiunta la fine. + + [-l letteradrive] + Questo parametro ti permette di specificare il drive da cui effettuare + il boot. Per default è il drive A, il floppy. Puoi anche avviare + una immagine disco rigido montata come master specificando "-l C" + senza i doppi apici, o come slave specificando "-l D" + + cart.jrc (solo PCjr) + Quando l'emulazione di PCjr è attivata, le cartucce possono essere + caricate col comando BOOT. Il supporto, tuttavia, è ancora limitato. + + +IPX + + Devi abilitare il networking IPX nel file di configurazione di DOSBox. + + Tutto il networking IPX è gestito attraverso il programma interno DOSBox + IPXNET. Per aiuto riguardo il networking IPX da dentro DOSBox, digita + "IPXNET HELP" (senza doppi apici) e il programma mostrerĂ  i comandi + e la documentazione. + + Al fine di impostare una rete vera e propria, un sistema deve essere il + server. Per impostarlo, digita "IPXNET STARTSERVER" (senza doppi apici) + all'interno di una sessione DOSBox. La sessione server DOSBox si aggiungerĂ  + automaticamente alla rete IPX virtuale. Per ogni computer aggiuntivo che + dovrĂ  far parte della rete IPX virtuale, dovrai digitare + "IPXNET CONNECT ". + Per esempio, se il tuo server è bob.dosbox.com, dovrai digitare + "IPXNET CONNECT bob.dosbox.com" su ogni sistema che non sia il server. + + Per giocare a giochi che necessitano di Netbios, serve un file chiamato + NETBIOS.EXE fornito da Novell. Stabilisci la connessione IPX come spiegato + sopra, quindi avvia "netbios.exe". + + Segue una lista di comandi IPXNET come riferimento: + + IPXNET CONNECT + + IPXNET CONNECT apre una connessione a un tunneling server IPX in + esecuzione su un'altra sessione DOSBox. Il parametro "indirizzo" + specifica l'indirizzo IP o il nome host del computer server. Puoi + anche specificare la porta UDP da usare. Per default IPXNET usa la + porta 213 - assegnata da IANA per il tunneling IPX - per le connessioni. + + La sintassi di IPXNET CONNECT è: + IPXNET CONNECT indirizzo + + IPXNET DISCONNECT + + IPXNET DISCONNECT chiude la connessione col tunneling server IPX. + + La sintassi di IPXNET DISCONNECT è: + IPXNET DISCONNECT + + IPXNET STARTSERVER + + IPXNET STARTSERVER avvia un tunneling server IPX in questa sessione DOSBox. + Per default, il server accetterĂ  le connessioni sulla porta UDP 213, + anche se questo può essere cambiato. Quando il server è avviato, DOSBox + avvierĂ  automaticamente una connessione client al server stesso. + + La sintassi di IPXNET STARTSERVER è: + IPXNET STARTSERVER + + Se il server è dietro ad un router, la porta UDP deve essere + inoltrata a quel computer. + + Sui sistemi basati su Linux/Unix i numeri di porta minori di 1023 possono + essere usati soltanto con i privilegi di amministratori. Su questi sistemi + usare porte maggiori di 1023. + + IPXNET STOPSERVER + + IPXNET STOPSERVER ferma il tunneling server IPX in esecuzione in questa + sessione DOSBox. Bisogna però assicurarsi che tutte le altre connessioni + siano anch'esse terminate, dato che fermare il server può causare blocchi + sulle altre macchine che ancora lo stanno utilizzando. + + La sintassi di IPXNET STOPSERVER è: + IPXNET STOPSERVER + + IPXNET PING + + IPXNET PING manda in broadcast una richiesta di ping attraverso il + network IPX. In risposta, tutti gli altri computer connessi risponderanno + al ping e sarĂ  riportato il tempo necessario a ricevere ed inviare il + messaggio di ping. + + La sintassi di IPXNET PING è: + IPXNET PING + + IPXNET STATUS + + IPXNET STATUS visualizza lo stato del network IPX sulla sessione corrente + di DOSBox. Per una lista di tutti i computer connessi alla rete usa il + comando IPXNET PING. + + La sintassi di IPXNET STATUS è: + IPXNET STATUS + + +KEYB [codicelinguaggio [codepage [filecodepage]]] + Cambia il layout della tastiera. Per informazioni dettagliate riguardo + i layout della tastiera, guarda la Sezione 7. + + [codicelinguaggio] è una stringa che consiste di due caratteri (o in casi + speciali anche di piĂš), ad esempio GK (Grecia) o IT (Italia). Specifica + il layout di tastiera da utilizzare. + + [codepage] è il numero del codepage da utilizzare. Il layout tastiera deve + fornire supporto per il codepage specificato, altrimenti il caricamento + del layout non andrĂ  a buon fine. + Se non viene specificato nessun codepage, verrĂ  caricato un codepage + opportuno per il layout che è stato scelto. + + [filecodepage] può essere usato per caricare codepage che non sono ancora inclusi + dentro DOSBox. E' necessario soltanto quando DOSBox non trova il codepage. + + + Esempi: + 1. Per caricare il layout tastiera tedesco (che usa automaticamente il codepage 858): + keyb gr + 2. Per caricare il layout russo con codepage 866: + keyb ru 866 + Per potere usare i caratteri russi premi ALT+MAIUSC-DI-DESTRA. + 3. Per caricare il layout francese con codepage 850 (dove il codepage + è definito in EGACPI.DAT): + keyb fr 850 EGACPI.DAT + 4. Per caricare il codepage 858 (senza un layout di tastiera): + keyb none 858 + Questo può essere usato per cambiare il codepage per l'utility keyb2 del FreeDOS. + 5. Per visualizzare il codepage attuale e, se caricato, il layout tastiera: + keyb + + + +Per ulteriori informazioni usa il parametro /? dopo i vari comandi. + + + +================== +5. Tasti Speciali: +================== + +ALT-ENTER Attiva e disattiva la visualizzazione a schermo intero. +ALT-PAUSE Mette in pausa l'emulazione (premi nuovamente ALT-PAUSE per riprenderla). +CTRL-F1 Avvia il keymapper. +CTRL-F4 Cambia l'immagine disco montata. Aggiorna la cache directory per tutti i drive! +CTRL-ALT-F5 Avvia/Ferma la registrazione dell'output video su un filmato. (cattura video avi) +CTRL-F5 Salva uno screenshot. (formato PNG) +CTRL-F6 Avvia/Ferma la registrazione dell'output audio su un file wave. +CTRL-ALT-F7 Avvia/Ferma la registrazione dei comandi OPL. (formato DRO) +CTRL-ALT-F8 Avvia/Ferma la registrazione dei comandi grezzi MIDI. +CTRL-F7 Diminuisce il frameskip. +CTRL-F8 Aumenta il frameskip. +CTRL-F9 Chiude istantaneamente DOSBox. +CTRL-F10 Cattura/Rilascia l'uso del mouse. +CTRL-F11 Rallenta l'emulazione (diminuisce i cicli DOSBox). +CTRL-F12 Accelera l'emulazione (aumenta i cicli DOSBox). +ALT-F12 Sblocca la velocitĂ  (bottone turbo). + +NOTA: Quando aumenti i cicli di DOSBox oltre le capacitĂ  che il tuo computer +può gestire, avrai l'effetto opposto, cioè quello di rallentare l'emulazione. +Questa capacitĂ  varia da computer a computer. + + +Questi sono i tasti di default. Possono essere cambiati col keymapper. +(vedi la Sezione 6: Mapper) + +I file salvati/registrati possono essere trovati in directory_corrente/capture +(può essere modificata nel file di configurazione). +La directory deve esistere prima di avviare DOSBox, altrimenti non verrĂ  +salvato/registrato niente ! + + +==================== +6. Joystick/Gamepad: +==================== + +La porta joystick in standard DOS supporta un massimo di 4 assi e 4 pulsanti. + Per di piĂš, diverse modifiche di configurazione che sono stati utilizzati. + + Per forzare DOSBox di utilizzare un diverso tipo di joystick emulato / gamepad, la voce + "joysticktype" nella sezione [joystick] del file di configurazione può DOSBox + essere utilizzato. + + Nessuno - disabilita il supporto del controller. + auto - (default) rileva automaticamente se si dispone di uno o due controller collegati: + se ne avete uno - l'impostazione ÂŤ4 assi 'è usata, + se si hanno due - impostando '2 'asse'è usato. + 2axis - Se si dispone di due controller collegati, ognuno avrĂ  emulare un joystick + con 2 assi e 2 pulsanti. Se si dispone di un solo controller collegato, + SarĂ  emulare un joystick con solo 2 assi e 2 pulsanti. + 4axis - supporta solo primo controller, emula un joystick + con 4 assi e 4 pulsanti o un gamepad con 2axis e 6 pulsanti. + 4axis_2 - supporta solo secondo controller. + FCS - supporta solo primo controller, emula ThrustMaster + Flight Control System, con 3 assi, 4 pulsanti e 1 cappello. + ch - supporta solo primo controller, emula CH Flightstick, + con 4 assi, 6 pulsanti e 1 cappello, ma non si può premere piĂš + di un pulsante, allo stesso tempo. + + È inoltre necessario configurare il controller correttamente all'interno del gioco. + + E 'importante ricordare che se si è salvato il mapperfile senza joystick + + collegato, o con una diversa impostazione di joystick, la nuova impostazione sarĂ  + non funziona + correttamente, + o non funzionano affatto, finchĂŠ non si reimposta mapperfile DOSBox's. + + + Se il controller funziona correttamente fuori DOSBox, ma non calibrare correttamente + all'interno di DOSBox, provare diverse 'a tempo' impostazione nel file di configurazione di DOSBox. + +================== +7. Mappa dei Tasti +================== + +Quando avvii il mapper del DOSBox (con CTRL-F1 o col parametro -startmapper +quando avvii l'eseguibile di DOSBox) ti viene presentata una tastiera virtuale +e un joystick virtuale. + +Questi dispositivi virtuali corrispondono ai tasti che DOSBox riporterĂ  +alle applicazioni DOS. Se clicchi su un tasto col tuo mouse, potrai vedere +nell'angolo in basso a sinistra quale evento vi è associato (EVENT) e a +quali eventi è attualmente collegato. + +Event: EVENT +BIND: BIND + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENT + Il tasto o bottone/asse del joystick che DOSBox riporterĂ  alle applicazioni DOS. +BIND + Il tasto sulla tua tastiera reale o il bottone/asse/stick sul tuo joystick + reale (come riportato da SDL) che è connesso all'EVENT. +mod1,2,3 + Modfiers. Questi sono tasti che devono essere premuti durante la pressione del + tasto BIND. mod1 = CTRL e mod2 = ALT. Vengono in genere usati soltanto quando + vuoi cambiare i tasti speciali del DOSBox. +Add + Aggiunge un nuovo BIND per questo EVENT. In pratica aggiunge un tasto dalla + tua tastiera o un evento dal joystick (pressione di un tasto, movimento di + un asse) che produrrĂ  un EVENT in DOSBox. +Del + Elimina il BIND a questo EVENT. Se un EVENT non ha BIND, allora non è + possibile far partire questo evento in DOSBox (cioè non vi è modo di usare + quel tasto o quel bottone del joystick). +Next + Scorre la lista di collegamenti che si riferiscono a questo EVENT. + + +Esempio: +D1. Vuoi che la X della tua tastiera produca una Z nel DOSBox. + R. Clicca sulla Z del mapper. Clicca su "Add". + Ora premi il tasto X sulla tua tastiera. + +D2. Se clicchi su "Next" un paio di volte, noterai che anche la Z sulla tua + tastiera produce una Z in DOSBox. + R. Quindi scegli la Z di nuovo, e clicca su "Next" fin quando non avrai la + Z sulla tastiera. Ora clicca "Del". + +D3. Provando in DOSBox, noti che la pressione di X fa apparire ZX. + R. La X sulla tua tastiera è ancora mappata alla X! Clicca sulla X della + tastiera del mapper e scorri con "Next" fin quando non trovi il tasto X. + A questo punto clicca su "Del". + + +Esempi riguardanti il rimappare il joystick: + Hai un joystick collegato, funziona bene sotto DOSBox e vuoi giocare + ad un gioco che funziona solo con la tastiera, col tuo joystick (assumeremo + che il gioco è controllato attraverso le frecce direzionali sulla + tastiera): + 1. Avvia il mapper, quindi clicca su una delle frecce al centro + della parte sinistra dello schermo (proprio sopra i bottoni mod1 + e mod2). EVENT dovrebbe essere key_left. Orra clicca su Add e + muovi il joystick nella relativa direzione, questo dovrebbe aggiungere + un evento al BIND. + 2. Ripeti il punto precedente per le altre tre direzioni. E' anche + possibile rimappare anche i bottoni del joystick (fuoco/salto). + 3. Clicca su Save, quindi su Exit e prova con qualche gioco. + + Vuoi invertire l'asse y del joystick perchè un gioco di simulazione aerea + usa il movimento sopra/sotto in un modo che non ti va, e non è configurabile + nel gioco stesso: + 1. Avvia il mapper e clicca su Y- nello spazio del joystick in alto (questo + si riferisce al primo joystick se ne hai due attaccati) o nello spazio in + basso (secondo joystick o, se ne hai solo uno attaccato, l'altra croce + di assi). + EVENT dovrebbe essere jaxis_0_1- (o jaxis_1_1-). + 2. Clicca su Del per eliminare i collegamenti correnti, quindi clicca Add e muovi + il tuo joystick in basso. Dovrebbe essere creato un nuovo collegamento. + 3. Ripeti per Y+, salva il layout e prova qualche gioco. + + + +Se cambi le associazioni di default, puoi salvare i tuoi cambiamenti cliccando +su "Save". DOSBox salverĂ  le nuove associazioni su una locazione specificata +nel file di configurazione (la voce mapperfile= ). All'avvio, DOSBox caricherĂ  +il suddetto file, se è presente nel file di configurazione. + + +========================= +8. Layout della Tastiera: +========================= + +Per passare ad un diverso layout di tastiera, puoi usare sia la voce +"keyboardlayout" nella sezione [dos] di dosbox.conf, oppure il comando +keyb.com interno di DOSBox. Entrambi accettano codici linguaggio conformi +al DOS (vedere in basso), ma solo usando keyb.com è possibile specificare +dei codepage personalizzati. + +L'impostazione di default, keyboardlayout=auto attualmente funziona solo +sotto windows, il layout è scelto in accordo a quello del SO. + +Cambiare layout + DOSBox supporta un certo numero di layout di tastiera e di codepage per + default, in questo caso è necessario speficicare solo l'identificativo + del layout (come keyboardlayout=it nel file di configurazione di DOSBox, + o l'uso di "keyb it" al prompt dei comandi di DOSBox). + The list of all layouts built into DOSBox is + here: http://vogons.zetafleet.com/viewtopic.php?t=21824 + + Certi layout di tastiera (ad esempio il layout GK codepage 869 e il layout + RU codepage 808) hanno il supporto per i layout doppi che possono essere + attivati premento ALT-DI-SINISTRA+SHIFT-DI-DESTRA e disattivati premendo + ALT-DI-SINISTRA+SHIFT-DI-SINISTRA + +File esterni supportati + I file .kl del FreeDOS sono supportati (FreeDOS keyb2 keyboard layoutfiles) + come anche le librerie del FreeDOS keyboard.sys/keybrd2.sys/keybrd3.sys che + consistono in tutti i file .kl disponibili. + Vedi http://projects.freedos.net/keyb/ per layout di tastiera precompilati + nel caso che quelli integrati in DOSBox non dovessero funzionare, o nel caso + che vengano rilasciati layout nuovi/piĂš aggiornati. + + Possono essere usati sia i file .CPI (file codepage compatibili con MSDOS) + che .CPX (file codepage FreeDOS compressi con UPX). Alcuni codepage sono + inclusi in DOSBox in modo che nella maggior parte dei casi non sia necessario + andare a cercare file codepage esterni. Se ti serve un file codepage diverso + (o presonalizzato), copialo nella directory del file di configurazione di + DOSBox in modo che sia accessibile da DOSBox. + + Layout aggiuntivi possono essere aggiunti copiando il corrispondente file + .kl dentro la directory di dosbox.conf e usando la prima parte del nome del + file come codice linguaggio. + Esempio: Per il file UZ.KL (layout tastiera per l'Uzbekistan) specifica + "keyboardlayout=uz" in dosbox.conf. + L'integrazione dei pacchetti di layout tastiera (come keybrd2.sys) funziona + in modo simile. + + +Nota che il layout di tastiera permette di immettere caratteri stranieri, +ma NON è possibile usarli nei nomi dei file. Cerca di evitarli sia dentro +DOSBox che nel tuo sistema operativo, in quei file/directory che saranno +poi accessibili da DOSBox. + + + +================================ +9. Funzione Multiplayer Seriale: +================================ + +DOSBox può emulare un cavo nullmodem seriale attraverso una rete e +internet. Può essere configurato attraverso la sezione [serialports] +nel file di configurazione di DOSBox. + +Per creare una connessione nullmodem, uno dei lati deve agire da server e +uno da client. + +Il server deve essere impostato nel file di configurazione di DOSBox cosĂŹ: + serial1=nullmodem + +Il client: + serial1=nullmodem server: + +Ora avvia il tuo gioco e scegli nullmodem / serial cable / already connected +come metodo multiplayer su COM1. Imposta lo stesso baudrate su entrambi i +computer. + +Inoltre possono essere specificati parametri aggiuntivi per controllare il +comportamento della connessione nullmodem. Questi sono tutti i parametri: + + * port: - Numero porta TCP. Default: 23 + * rxdelay: - quanto a lungo (millisecondi) mettere in attesa i dati ricevuti + se l'interfaccia non è pronta. Aumenta questo valore se + incontri molti errori di overrun nella Status Window di DOSBox. + Default: 100 + * txdelay: - quanto a lungo trattenere i dati prima di inviare un pacchetto. + Default: 12 + (riduce l'overhead della rete) + * server: - Questo nullmodem sarĂ  una connessione client al server specificato. + (Se non viene specificato un server: sii un server.) + * transparent:1 - Invia solo i dati seriali, nessun handshake RTS/DTR. Usa questo + parametro se ti connetti a qualsiasi altra cosa che non sia un + nullmodem. + * telnet:1 - Interperta dati Telnet dal sistema remoto. Imposta transparent + automaticamente. + * usedtr:1 - La connessione non sarĂ  stabilita fun quando DTR non è attivato + dal programma DOS. Utile per i terminali modem. + Imposta transparent automaticamente. + * inhsocket:1 - Usa un socket passato a DOSBox da linea di comando. Imposta + transparent automaticamente. (EreditĂ  dei Socket: Viene usato + per giocare vecchi giochi DOS sui nuovi software BBS.) + +Esempio: Essere server in ascolto sulla porta TCP 5000. + serial1=nullmodem server: port:5000 rxdelay:1000 + + + +======================================= +10. Come velocizzare/rallentare DOSBox: +======================================= + +DOSBox emula la CPU, il suono e le schede video, e altre periferiche di un +PC, tutte allo stesso tempo. La velocitĂ  di una applicazione DOS emulata +dipende da quante istruzioni possono essere emulate, che è impostabile +(numero di cicli). + +Cicli CPU + Per default (cycles=auto) DOSBox prova a rilevare se un gioco ha bisogno + di tutti i cicli possibili per essere eseguito. Puoi forzare questo + comportamento impostando cycles=max nel file di configurazione di DOSBox. + Allora la finestra di DOSBox mostrerĂ  una riga "Cpu Cycles: max" in alto. + In questa modalitĂ  puoi ridurre la quantitĂ  di cicli su base percentuale + (premi CTRL-F11) o aumentarla nuovamente (CTRL-F12). + + A volte impostare in maniera manuale il numero di cicli porta a risultati + migliori, ad esempio specificando nel file di configurazione cycles=30000. + Durante l'esecuzione delle applicazioni DOS puoi aumentare i cicli con + CTRL-F12 anche di piĂš, ma avrai comunque il limite della potenza del tuo + processore reale. Puoi vedere in che misura è impegnato andando sul Task + Manager di Windows 2000/XP o nel Monitor di Sistema in Windows 95/98/ME. + Quando la CPU sarĂ  usata al 100%, non vi è piĂš modo di velocizzare DOSBox, + a meno che tu non riduca la quantitĂ  di CPU occupata dalle parti di DOSBox + non strettamente legate alla CPU. + +Core CPU + Sulle architetture x86 puoi provare a forzare l'uso di un core ricompilato + dinamicamente (imposta core=dynamic nel file di configurazione di DOSBox). + Di solito questo fornisce migliori risultati se l'autorilevazione (core=auto) + fallisce. E' bene accoppiarvi cycles=max. Nota che potrebbero esserci dei + giochi che funzionano peggio col core dinamico, o che non funzionino affatto! + +Emulazione grafica + L'emulazione VGA è una parte molto esigente di DOSBox in termini di uso + della CPU. Aumenta il numero di fotogrammi saltati (in passi di uno) + premendo CTRL-F8. L'uso della CPU dovrebbe scendere quando si usa un + numero di cicli fisso. + Vai indietro di un passo e ripeti questo fin quando il gioco gira + abbastanza velocemente per i tuoi gusti. Nota che questo è un baratto: + perdi in fluiditĂ  video ciò che guadagni in velocitĂ . + +Emulazione sonora + Puoi anche provare a disattivare il suono attraverso l'utilitĂ  di setup dei + giochi per ridurre ulteriormente il carico sulla CPU. Impostando nosound=true + NON disabiliti l'emulazione sonora, ma semplicemente la riproduzione dell'output. + +Inoltre cerca di chiudere tutti i programmi eccetto DOSBox per riservargli +la quantitĂ  massima possibile di risorse. + + +Configurazione avanzata dei cicli: +I settaggi cycles=auto e cycles=max possono avere dei parametri per ottenere +diversi standard quando si avviano i programmi. La sintassi è + cycles=auto ["default modalitĂ  reale"] ["default modalitĂ  protetta"%] + [limit "limite cicli"] + cycles=max ["default modalitĂ  protetta"%] [limit "limite cicli"] +Esempio: + cycles=auto 1000 80% limit 20000 + userĂ  cycles=1000 per i giochi in modalitĂ  reale, 80% CPU variabile per i giochi + in modalitĂ  protetta con un limite superiore di 20000 + + + +============================ +11. Risoluzione dei problemi +============================ + +Trucco Generico: + Controlla i messaggi nella Finestra di Stato DOSBox. Guarda la sezione 12. "Finestra di Stato DOSBOx" + +DOSBox crasha proprio dopo averlo avviato: + - usa diversi valori per l'opzione output= nel file di + configurazione + - prova ad aggiornare i driver video e le DirectX + - (Linux) set the environment variable SDL_AUDIODRIVER to alsa or oss + +L'avvio di un certo gioco chiude DOSBox, causa un crash con qualche messaggio o blocca tutto: + - vedi se funziona con una installazione incontaminata di DOSBox + (file di configurazione non modificato) + - provalo col sonoro disattivato (usa il programma di configurazione + del suono incluso nel gioco, oppure imposta sbtype=none e gus=false nel + file di configurazione di DOSBox) + - cambia alcune opzioni nel file di configurazione di DOSBox, in particolare: + core=normal + un numero fisso di cicli (ad esempio cycles=10000) + ems=false + xms=false + oppure combinazioni dei settaggi sopra, + aggiusta i settaggi della macchina che controllano il chipset e le + funzionalitĂ  emulate: + machine=vesa_nolfb + o + machine=vgaonly + - usa loadfix prima di avviare il gioco + +Il gioco esce al prompt di DOSBox con qualche strano messaggio di errore: + - leggi il messaggio di errore attentamente e prova a localizzarne la causa + - prova i suggerimenti delle sezioni sopra + - monta in modo diverso i drive, dato che alcuni giochi sono schizzinosi + riguardo i percorsi, per esempio se hai usato "mount d d:\giochi\abc" prova + "mount c d:\giochi\abc" e "mount c d:\giochi" + - se il gioco richiede un CD-ROM assicurati di usare "-t cdrom" quando + monti, e prova altri parametri diversi (come ioctl, usecd e label, vedi + la sezione appropriata) + - controlla i permessi sui file del gioco (togli gli attributi di sola lettura, + aggiungi i permessi in scrittura ecc.) + - prova a reinstallare il gioco da dentro DOSBox + + +============================ +12. Finestra di Stato DOSBOX +============================ + +La finestra Stato DOSBox contiene molte informazioni utili sul tuo ribes + configurazione, le vostre azioni in DOSBox, errori che è successo e di piĂš. + Ogni volta che avete qualche problema con DOSBox verificare i messaggi. + +Per avviare la finestra di stato DOSBox: + (Windows) Status Window is being started together with main DOSBox window. + (Linux) You may have to start DOSBox from a console to see Status Window. + (MAC OS X) Right click on DOSBox.app, choose "Show Package Contents"-> + ->enter "Contents"->enter "MacOS"->run "DOSBox" + + +======================================= +13. Il file di configurazione(opzioni): +======================================= + +Un file di configurazione può essere generato quando avvii DOSBox. +Il file si trova in: + (Windows) "Start/WinLogo Menu"->"All Programs"->DOSBox-0.74->Options + (Linux) ~/.dosbox/dosbox-0.74.conf + (MAC OS X) "~/Library/Preferences/DOSBox 0.74 Preferences" +Puoi modificare il file di configurazione generato, per personalizzare +DOSBox. + +Il file è diviso in varie sezioni (i cui nomi sono racchiusi tra [] ). +Alcune sezioni hanno opzioni che puoi impostare. +# and % indicate comment-lines. +# e % indicano righe commentate. +Il file di configurazione generato contiene i settaggi attuali. Puoi modificarli +e avviare DOSBox col parametro -conf per caricare il file e usare i nuovi settaggi. + +DOSBox caricherĂ  i file di configurazione che sono specificati da -conf. +Se non ve n'è nessuno, proverĂ  a caricare "dosbox.conf" dalla directory +locale. Se non c'è, DOSBox caricherĂ  il file di configurazione utente. +Questo file, se inesistente, verrĂ  creato. Il file può essere trovato +in ~/.dosbox (Linux) o "~/Library/Preferences" (MAC OS X in inglese). +Gli utenti Windows dovrebbero usare la scorciatoia nel menu Start per +trovarlo. + + +======================= +14. Il file linguaggio: +======================= + +CONFIG.COM può generare un file linguaggio (CONFIG -writelang filelinguaggio). +Leggilo e, si spera, capirai come modificarlo. +Guarda la seczione 4:"Programmi Intern" per usare CONFIG.COM. +Avvia DOSBox col parametro -lang per usare il tuo nuovo file linguaggio. +In alternativa, puoi impostarne il nome nel file di configurazione nella +sezione [dosbox]. Troverai un'opzione language= che puoi cambiare come piĂš +ti aggrada. + + + +======================================== +15. Costruire la tua versione di DOSBox: +======================================== + +Scarica i sorgenti. +Guarda l'INSTALL che sta al loro interno. + + + +============================ +16. Ringraziamenti speciali: +============================ + +Vedi il file THANKS. + + +============= +17. Contatti: +============= + +Vai nel sito: +http://www.dosbox.com +per gli indirizzi email (pagina Crew). diff -Nru dosbox-staging-0.76.0/contrib/old-translations/it/LEGGIMI.txt dosbox-staging-0.77.0/contrib/old-translations/it/LEGGIMI.txt --- dosbox-staging-0.76.0/contrib/old-translations/it/LEGGIMI.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/it/LEGGIMI.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,39 @@ +DOSBox 0.74 +=========== +Pacchetto Traduzione italiana di comandi e messaggi +e il file di configurazione che viene usato sotto dosbox 0.74. +Questo pacchetto non è compatibile con le precedenti versioni di DOSBox, +scarica la versione appropriata! + + +by Gas + + +============================ +Come applicare la traduzione +============================ + +NOTA: La traduzione va usata UNICAMENTE con la versione 0.74 di DOSBox! + +- Estrarre i file dosbox074ita.lng e dosbox-0.74.conf nella directory dove risiede + il file di configurazione di DOSBox. Questa directory, solitamente, è: + + C:\Documents and Settings\[nome utente]\Impostazioni locali\Dati applicazioni\DOSBox + (su Windows XP) + + C:\Users\[nome utente]\AppData\Local\DOSBox + (su Windows Vista) + + Sugli altri sistemi operativi... non ne ho idea. Ma se usate un sistema operativo + diverso dai due sopra citati, non penso proprio che avrete problemi a trovarla :P + +- A questo punto la traduzione dovrebbe giĂ  essere applicata, perchĂŠ ho incluso + un file di configurazione tradotto, che richiama giĂ  il file di traduzione. + +- Avviare DOSBox e controllare che le scritte siano in italiano. + +----------------------------------------------------------------------------------- + +Il file di configurazione è giĂ  modificato per tener conto del file di traduzione. +Aprire con un editor di testo o notepad il file "dosbox-074.conf" o fare clic +sul collegamento "DOSBox 0,74 opzioni" nel gruppo "Opzioni" programma "DOSBox-0,74" diff -Nru dosbox-staging-0.76.0/contrib/old-translations/it/version.txt dosbox-staging-0.77.0/contrib/old-translations/it/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/it/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/it/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Italian 0.74 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/it/Video.txt dosbox-staging-0.77.0/contrib/old-translations/it/Video.txt --- dosbox-staging-0.76.0/contrib/old-translations/it/Video.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/it/Video.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,39 @@ +A partire dalla versione 0.65, DOSBox ti permette di creare filmati a partire +dall'output video. + +Per registrare un filmato, devi premere CTRL-ALT-F5. +Per fermare/terminare la registrazione, devi premere nuovamente CTRL-ALT-F5. + +Per riprodurre il filmato registrato, ti serve un player video che possa +gestire il codec ZMBV. Gli utenti Windows possono trovare questo codec nel +menu avvio, dentro il gruppo di DOSBox. Gli utenti di Linux e di altri sistemi +operativi dovrebbero procurarsi un player video che usi la libreria ffmpeg +(potresti aver bisogno di aggiornare o chiedere alla distribuzione di +aggiornarsi). + +FAQ: +D: Durante la riproduzione video il suono è in ritardo. +R: Controlla i tuoi settaggi video per assicurarti che la frequenza video sia +impostata almeno sui 70 hz. Prova a riprodurre il video con virtualdub +(http://virtualdub.sf.net) + +D: Perchè il filmato finale è suddiviso in tanti file? +R: Ogni volta che il gioco cambia risoluzione, DOSBox crea un nuovo file video, +poichè un file video può contenere soltanto una risoluzione. + +D: Posso impostare i cicli ad un valore piĂš alto di quello che il mio PC può +gestire durante la registrazione? +R: SĂŹ. Durante la registrazione il gioco potrebbe risultare lento e scattoso, ma +il filmato riprodotto avrĂ  la velocitĂ  giusta e nessuno scatto. + +D: CTRL-ALT-F5, sotto linux, passa alla console. +R: 1. Avvia DOSBox in questo modo: dosbox -startmapper + 2. Clicca su Video, clicca su Add + 3. Premi il tasto che preferisci (ad esempio bloc scorr o stamp) + 4. Clicca exit. + 5. Ora puoi fare i filmati premendo bloc scorr o qualsiasi tasto tu abbia + scelto al passaggio 3. + +D: I colori sono sballati, e sto usando Windows a 64 bit. +R: Dai un'occhiata qui: http://vogons.zetafleet.com/viewtopic.php?t=12133 + (in inglese) diff -Nru dosbox-staging-0.76.0/contrib/old-translations/ko/korean-0.72.lang dosbox-staging-0.77.0/contrib/old-translations/ko/korean-0.72.lang --- dosbox-staging-0.76.0/contrib/old-translations/ko/korean-0.72.lang 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/ko/korean-0.72.lang 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,684 @@ +:SDL_CONFIGFILE_HELP +fullscreen -- DOSBox¸Ś ŔüĂź Č­¸éŔ¸ˇÎ ˝ÇÇŕÇŐ´Ď´Ů. +fulldouble -- ŔüĂź Č­¸éŔĎ ś§ ŔĚÁß šöĆ۸Ś ťçżëÇŐ´Ď´Ů. +fullresolution -- ŔüĂź Č­¸éŔÇ ÇŘťóľľ: original śÇ´Â °íÁ¤ ĹŠąâ (ş¸ąâ: 1024x768). +windowresolution -- ĂâˇÂ ŔĺÄĄ°Ą ÇĎľĺżţžî ˝şÄÉŔϸľŔť ÁöżřÇŇ ś§ ťçżëÇŇ Ă˘ŔÇ ĹŠąâ. +output -- Č­¸é ĂâˇÂ: surface,overlay,opengl,openglnb,ddraw. +autolock -- Č­¸éŔť ĹŹ¸ŻÇĎ¸é ¸śżě˝ş´Â ŔÚľżŔ¸ˇÎ Ŕáąé´Ď´Ů. +sensitiviy -- ¸śżě˝ş šÝŔŔ źÓľľ. +waitonerror -- DOSBoxżĄ żŔˇů°Ą ŔÖŔ¸¸é ÄÜźÖŔĚ ´ÝČú ś§ ąîÁö ąâ´Ů¸ł´Ď´Ů. +priority -- DOSBoxŔÇ żěźą źřŔ§: lowest,lower,normal,higher,highest,pause (âŔĚ Č°źşČ­ľÇžî ŔÖÁö žĘŔť ś§). + ˝°ÇĽ ľÚŔÇ ľÎ šř° Ç׸ńŔş DOSBox°Ą Č°źşČ­ľÇžî ŔÖÁö žĘ°ĹłŞ ĂÖźŇČ­ľÇžî ŔÖŔť ś§ŔÇ ťóĹÂŔÔ´Ď´Ů. +mapperfile -- Ĺ° śÇ´Â ŔĚşĽĆŽ ¸ĹÇÎŔť şŇˇŻżŔ°ĹłŞ ŔúŔĺÇŇ ś§ ž˛ŔĚ´Â ĆÄŔĎ. +usescancodes -- ĆŻźö Ĺ°¸Ś ťçżëÇĎÁö ¸řÇĎ°Ô ÇŐ´Ď´Ů. ¸đľç żîżľĂźÁŚżĄź­ ÁöżřľÇ´Â °ÍŔş žĆ´Ő´Ď´Ů. +. +:DOSBOX_CONFIGFILE_HELP +language -- ´Ů¸Ľ žđžî ĆÄŔĎ źąĹĂ. +memsize -- DOSBoxŔÇ ¸Ţ¸đ¸Ž ĹŠąâ (MB). +machine -- °ĄťóŔ¸ˇÎ ą¸ÇöÇŇ ąâąâŔÇ Ážˇů:hercules,cga,tandy,pcjr,vga. +captures -- żţŔĚşę, šĚľđ, ą×¸˛ŔĚ Ä¸ĂłľÇ´Â ľđˇşĹ͸Ž. +. +:RENDER_CONFIGFILE_HELP +frameskip -- ÇŃ šř ą×¸Žąâ žŐź­ DOSBox°Ą žó¸śłŞ ¸šŔş ÇÁˇšŔÓŔť šŤ˝ĂÇŇ °ÍŔÎÁö Á¤ÇŐ´Ď´Ů. +aspect -- şńŔ˛Ŕť źöÁ¤ÇŇ źö ŔÖ°Ô ÇŐ´Ď´Ů. ĂâˇÂŔĚ ˝şÄÉŔϸľŔť ÁöżřÇĎÁö žĘŔ¸¸é ´ŔˇÁÁú źö ŔÖ˝Ŕ´Ď´Ů!. +scaler -- łˇŔş Ç؝󾾸Ś ČŽ´ëÇĎ°ĹłŞ °­Č­ÇĎ´Â ˝şÄÉŔϡŻ. + ÁöżřÇĎ´Â Ç׸ńŔş none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x, + 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x, + tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3xŔÔ´Ď´Ů. + forced°Ą ľÚżĄ şŮŔ¸¸é (scaler=hq2x forcedĂłˇł), ˝şÄÉŔϡŻ´Â žîś°ÇŃ °á°úżĄź­ľľ + ťçżëľË´Ď´Ů. +. +:CPU_CONFIGFILE_HELP +core -- °Ąťó ą¸ÇöżĄ ž˛ŔĚ´Â CPU ÄÚžî: normal,simple,dynamic,auto. + auto´Â °ćżěżĄ ľűśó normalŔť dynamicŔ¸ˇÎ šŮ˛ß´Ď´Ů. +cycles -- šĐ¸ŽĂʸś´Ů DOSBox°Ą °ĄťóŔ¸ˇÎ ą¸ÇöÇŇ ÇÔźöŔÇ žç. + ŔĚ °ŞŔť łĘšŤ łô°Ô ŔâŔ¸¸é źŇ¸Ž°Ą łŞżŔÁö žĘ°ĹłŞ ˇşŔĚ °É¸ą źö ŔÖ˝Ŕ´Ď´Ů. + maxˇÎ źłÁ¤ÇĎżŠ DOSBox°Ą żĂšŮ¸Ľ °ŞŔť ĂŁžĆłťľľˇĎ ÇŇ źöľľ ŔÖ˝Ŕ´Ď´Ů. + ąâşť°Ş (auto)Ŕş ŔűŔýÇŃ °ćżě maxˇÎ šŮ˛ß´Ď´Ů. +cycleup -- ´ÜĂŕĹ°ˇÎ łôŔĚ°í łˇĂâ ťçŔĚĹŹŔÇ šüŔ§. +cycledown 100ş¸´Ů łˇŔ¸¸é ĆŰźžĹ×ŔĚÁö°Ą ľË´Ď´Ů. +. +:MIXER_CONFIGFILE_HELP +nosound -- źŇ¸Ž¸¸ źŇ°ĹÇŐ´Ď´Ů. ťçżîľĺ´Â °čźÓ °ĄťóŔ¸ˇÎ ą¸ÇöľË´Ď´Ů. +rate -- šÍź­ ťůÇĂ źÓľľ, žĆšŤ ŔĺÄĄłŞ ŔĚ ş¸´Ů ´ő łô°Ô ŔâŔ¸¸é + Ŕ˝ÁúŔĚ śłžîÁú źö ŔÖ˝Ŕ´Ď´Ů. +blocksize -- ŔâŔ˝Ŕş ťçśóÁö´Â ľĽ ľľżňŔĚ ľÇÁö¸¸ żŔČ÷ˇÁ šöš÷ŔĎ źöľľ ŔÖ˝Ŕ´Ď´Ů +prebuffer -- şíˇĎ ĹŠąâ Ŕ§żĄ žó¸¸Ĺ­ŔÇ ľĽŔĚĹ͸Ś ťçżëÇŇ Áö ÁöÁ¤ÇŇ źö ŔÖ˝Ŕ´Ď´Ů. (´ÜŔ§ : ms) +. +:MIDI_CONFIGFILE_HELP +mpu401 -- °ĄťóŔ¸ˇÎ ą¸ÇöÇŇ MPU-401ŔÇ Ážˇů: none, uart śÇ´Â intelligent. +device -- MPU-401 ˇÎşÎĹÍ MIDI ľĽŔĚĹ͸Ś źö˝ĹÇŃ ŔĺÄĄ¸Ś źąĹĂÇŐ´Ď´Ů. + default,alsa,oss,win32,coreaudio,none°Ą ľÉ źö ŔÖ˝Ŕ´Ď´Ů. +config -- ŔĺÄĄ¸Ś Ŕ§ÇŃ ĆŻş°ÇŃ ą¸źş żÉźÇ. WindowsżĄź­´Â ťçżëÇĎ°íŔÚ ÇĎ´Â ŔĺÄĄŔÇ + ID¸Ś łÖŔ¸˝Ę˝ĂżŔ. ŔÚźźČ÷ ş¸ˇÁ¸é README¸Ś ŔĐžî ş¸˝Ę˝ĂżŔ. +. +:SBLASTER_CONFIGFILE_HELP +sbtype -- °ĄťóŔ¸ˇÎ ą¸ÇöÇŇ ťçżîľĺ şíśó˝şĹÍŔÇ Ážˇů:none,sb1,sb2,sbpro1,sbpro2,sb16. +sbbase,irq,dma,hdma -- ťçżîľĺ şíśó˝şĹÍŔÇ IO/IRQ/DMA/High DMA ÁÖźŇ +mixer -- SoundBlaste°Ą DOSBoxŔÇ źŇ¸Ž ĹŠąâ¸Ś ÁśŔýÇŇ źö ŔÖ°Ô ÇŐ´Ď´Ů. +oplmode -- OPL °Ąťó ą¸ÇöŔÇ Ážˇů: auto,cms,opl2,dualopl2,opl3. + autoŔÇ °ćżě Sound BlasterŔÇ Çü˝ÄżĄ ľűśó žËžĆź­ °áÁ¤ľË´Ď´Ů. + ¸đľç OPL ¸đľĺ´Â CMS¸Ś ÁŚżÜÇĎ°í AdlibŔÔ´Ď´Ů. +oplrate -- OPL Ŕ˝žÇ °Ąťó ą¸ÇöŔÇ ťůÇĂ źÓľľ. +. +:GUS_CONFIGFILE_HELP +gus -- Gravis UltrasoundŔť °Ąťó ą¸ÇöÇŐ´Ď´Ů. +gusbase,irq1,irq2,dma1,dma2 -- Gravis UltrasoundŔÇ IO/IRQ/DMA ÁÖźŇ + (IRQżÍ DMA°Ą °°žĆľľ ąŚÂú˝Ŕ´Ď´Ů) +gusrate -- Ultrasound °Ąťó ą¸ÇöŔÇ ťůÇĂ źÓľľ +ultradir -- Gravis UltraSound ľđˇşĹ与ŔÇ °ćˇÎ. GUS ŔçťýżĄ ÇĘżäÇŃ + ĆĐÄĄ ĆÄŔĎŔĚ ľéžîŔÖ´Â Ćú´ő¸Ś ÁöÁ¤ÇĎ˝Ă¸é ľË´Ď´Ů. + TimidityˇÎ ťçżëľČ ĆĐÄĄ°Ą ÁŚ´ëˇÎ ľżŔŰÇŐ´Ď´Ů. +. +:SPEAKER_CONFIGFILE_HELP +pcspeaker -- PC ˝şÇÇÄż¸Ś °Ąťó ą¸ÇöÇŐ´Ď´Ů. +pcrate -- PC ˝şÇÇÄż ťçżîľĺ šßťýŔÇ ťůÇĂ źÓľľ +tandy -- Tandy ťçżîľĺ ˝Ă˝şĹŰŔť °Ąťó ą¸ÇöÇŐ´Ď´Ů. (off,on,auto). + autoŔÇ °ćżě machineŔĚ tandyˇÎ źłÁ¤ľÇžî ŔÖŔť ś§żĄ¸¸ Tandysound¸Ś °Ąťó ą¸ÇöÇŐ´Ď´Ů. +tandyrate -- Tandy 3-Voice šßťýŔÇ ťůÇĂ źÓľľ. +disney -- Disney Source °Ąťó ą¸ÇöŔť ťçżëÇŐ´Ď´Ů. Covox Voice MasterżÍ Speech Thing ČŁČŻ. +. +:JOYSTICK_CONFIGFILE_HELP +joysticktype -- °Ąťó ą¸ÇöÇŇ ÁśŔĚ˝şĆ˝ŔÇ Ážˇů: auto (ąâşť°Ş), none, + 2axis (ľÎ °łŔÇ ÁśŔĚ˝şĆ˝ Áöżř), + 4axis (ÇŃ °łŔÇ ÁśŔĚ˝şĆ˝Ŕť ÁöżřÇϸç Ăš šř° ÁśŔĚ˝şĆ˝ ťçżë), + 4axis_2 (ÇŃ °łŔÇ ÁśŔĚ˝şĆ˝Ŕť ÁöżřÇĎ¸ç ľÎ šř° ÁśŔĚ˝şĆ˝ ťçżë), + fcs (Thrustmaster), ch (CH Flightstick). + noneŔş ÁśŔĚ˝şĆ˝Ŕť °ĄťóŔ¸ˇÎ ą¸ÇöÇĎÁö žĘ˝Ŕ´Ď´Ů. + auto´Â ˝ÇÁŚ ÁśŔĚ˝şĆ˝żĄ ľűśó °Ąťó ą¸ÇöŔť Á¤ÇŐ´Ď´Ů. +timed -- Ă࿥ ´ëÇŃ ˝Ă°Ł Áֹ⸌ ťçżëÇŐ´Ď´Ů. falseˇÎ ľÎ¸é żžłŻ šć˝ÄŔť ťçżëÇĎ°Ô ľË´Ď´Ů. +autofire -- ´ÜĂ߸Ś ´Š¸Ł¸é °čźÓ šßťçÇŐ´Ď´Ů. (ŔÚľż šßťç) +swap34 -- 3´ÜĂßżÍ 4´ÜĂ߸Ś šŮ˛ß´Ď´Ů. ŔϺΠÁśŔĚ˝şĆ˝żĄ ŔŻżëÇŐ´Ď´Ů. +buttonwrap -- °ĄťóŔ¸ˇÎ ą¸ÇöľÇ´Â ´ÜĂßľéŔÇ źöżĄ button wrappingŔť ťçżëÇŐ´Ď´Ů. +. +:SERIAL_CONFIGFILE_HELP +serial1-4 -- COM Ć÷ĆŽżĄ żŹ°áľČ ŔĺÄĄŔÇ Ážˇů¸Ś źłÁ¤ÇŐ´Ď´Ů. + disabled, dummy, modem, nullmodem, directserial°Ą ľÉ źö ŔÖ˝Ŕ´Ď´Ů. + şÎ°ĄľÇ´Â ¸Ĺ°ł şŻźö´Â ¸Ĺ°ł şŻźöŔÇ Çü˝ÄŔĚ ŔÖ´Â ÁŮ°ú °°Ŕş ÁŮżĄ ŔÖžîžß ÇŐ´Ď´Ů. + ¸đľç ÁžˇůżĄ ž˛ŔĎ źö ŔÖ´Â ¸Ĺ°ł şŻźö´Â IRQˇÎ Ŕ̡çžîÁý´Ď´Ů. + DirectSerialŔÇ °ćżě: realport (ÇĘźö), rxdelay (źąĹĂ ťçÇ×). + ¸đľŠŔÇ °ćżě: listenport (źąĹĂ ťçÇ×). + łÎ ¸đľŠŔÇ °ćżě: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (¸đľÎ źąĹĂ ťçÇ×). + ş¸ąâ: serial1=modem listenport:5000 +. +:DOS_CONFIGFILE_HELP +xms -- XMS ÁöżřŔť ťçżëÇŐ´Ď´Ů. +ems -- EMS ÁöżřŔť ťçżëÇŐ´Ď´Ů. +umb -- UMB ÁöżřŔť ťçżëÇŐ´Ď´Ů. +keyboardlayout -- Ĺ°ş¸ľĺ ˇšŔ̞ƿôŔÇ žđžî ÄÚľĺ (śÇ´Â none). +. +:IPX_CONFIGFILE_HELP +ipx -- UDP/IP °Ąťó ą¸ÇöŔť °ĹĂÄ IPX¸Ś ťçżëÇŐ´Ď´Ů. +. +:AUTOEXEC_CONFIGFILE_HELP +ŔĚ ź˝źÇŔÇ ÁŮľéŔş ĂłŔ˝żĄ ˝ĂŔŰÇĎŔÚ¸śŔÚ ˝ÇÇŕľË´Ď´Ů. +. +:CONFIGFILE_INTRO +# DOSBox %s¸Ś Ŕ§ÇŃ ą¸źş ĆÄŔĎŔÔ´Ď´Ů. +# #ˇÎ ˝ĂŔ۾Ǵ ÁŮľéŔş ÁÖźŽŔ̸ç +# °˘ żÉźÇŔÇ °á°ú¸Ś °ŁˇŤÇĎ°Ô šŽź­Č­ÇĎ´Â ľĽ ž˛ŔÔ´Ď´Ů. +. +:PROGRAM_CONFIG_FILE_ERROR +%s ĆÄŔĎŔť ż­ źö žř˝Ŕ´Ď´Ů +. +:PROGRAM_CONFIG_USAGE +Config ľľą¸: +ÇöŔçŔÇ ą¸źşŔť ŔúŔĺÇϡÁ¸é "-writeconf ĆÄŔĎ Ŕ̸§"Ŕť ťçżëÇϽʽÿŔ. +ÇöŔçŔÇ žđžî šŽŔÚż­Ŕť ŔúŔĺÇϡÁ¸é "-writelang ĆÄŔĎ Ŕ̸§"Ŕť ťçżëÇϽʽÿŔ. +. +:PROGRAM_CONFIG_SECTION_ERROR +%s ź˝źÇŔĚ Á¸ŔçÇĎÁö žĘ˝Ŕ´Ď´Ů. +. +:PROGRAM_CONFIG_PROPERTY_ERROR +ÁöÁ¤ľČ ź˝źÇŔĚłŞ źÓźşŔť ĂŁŔť źö žř˝Ŕ´Ď´Ů. +. +:PROGRAM_CONFIG_NO_PROPERTY +%s źÓźşŔĚ ź˝źÇ %sżĄ žř˝Ŕ´Ď´Ů. +. +:PROGRAM_CONFIG_GET_SYNTAX +żĂšŮ¸Ľ ą¸šŽ: config -get "ź˝źÇ" "źÓźş". +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMŔť ĂŁžŇ˝Ŕ´Ď´Ů: %d +. +:PROGRAM_MOUNT_STATUS_2 +%c ľĺśóŔĚşę°Ą %sˇÎ ¸śżîĆŽľÇžú˝Ŕ´Ď´Ů +. +:PROGRAM_MOUNT_STATUS_1 +ÇöŔç ¸śżîĆŽľÇžî ŔÖ´Â ľĺśóŔĚşę: +. +:PROGRAM_MOUNT_ERROR_1 +%s ľđˇşĹ͸Ž°Ą Á¸ŔçÇĎÁö žĘ˝Ŕ´Ď´Ů. +. +:PROGRAM_MOUNT_ERROR_2 +%sŔş(´Â) ľđˇşĹ͸Ž°Ą žĆ´Ő´Ď´Ů +. +:PROGRAM_MOUNT_ILL_TYPE +Ŕ߸řľČ ŔŻÇü %s +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +%c ľĺśóŔĚşę°Ą ŔĚšĚ %sˇÎ ¸śżîĆŽľÇžî ŔÖ˝Ŕ´Ď´Ů +. +:PROGRAM_MOUNT_USAGE +ťçżëšý MOUNT 'ľĺśóŔĚşę šŽŔÚż­' 'ˇÎÄĂ ľđˇşĹ͸Ž' +MOUNT c c:\windows´Â Windows ľđˇşĹ͸Ž¸Ś DOSBoxŔÇ C ľĺśóŔĚşęˇÎ ¸śżîĆŽÇŐ´Ď´Ů +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +%c ľĺśóŔĚşę°Ą ¸śżîĆŽľÇžî ŔÖÁö žĘ˝Ŕ´Ď´Ů. +. +:PROGRAM_MOUNT_UMOUNT_SUCCES +%c ľĺśóŔĚşę°Ą ÁŚ°ĹľÇžú˝Ŕ´Ď´Ů. +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +°Ąťó ľĺśóŔ̺긌 ¸śżîĆŽÇŇ źö žř˝Ŕ´Ď´Ů. +. +:PROGRAM_MOUNT_WARNING_WIN +c:\ˇÎ ¸śżîĆŽÇĎÁö žĘ´Â °ÍŔĚ ÁÁ˝Ŕ´Ď´Ů. ´ŮŔ˝żĄ´Â ÇĎŔ§ ľđˇşĹ͸Ž¸Ś ¸śżîĆŽÇŘ ÁֽʽÿŔ. +. +:PROGRAM_MOUNT_WARNING_OTHER +/ˇÎ ¸śżîĆŽÇĎÁö žĘ´Â °ÍŔĚ ÁÁ˝Ŕ´Ď´Ů. ´ŮŔ˝żĄ´Â ÇĎŔ§ ľđˇşĹ͸Ž¸Ś ¸śżîĆŽÇŘ ÁֽʽÿŔ. +. +:PROGRAM_MEM_CONVEN +ąâşť ¸Ţ¸đ¸Ž %10d Kb ł˛Ŕ˝ +. +:PROGRAM_MEM_EXTEND +ČŽŔĺ(EMS) ¸Ţ¸đ¸Ž %10d Kb ł˛Ŕ˝ +. +:PROGRAM_MEM_EXPAND +żŹźÓ ČŽŔĺ(XMS) ¸Ţ¸đ¸Ž %10d Kb ł˛Ŕ˝ +. +:PROGRAM_MEM_UPPER +ťóŔ§ ¸Ţ¸đ¸Ž %10d Kb ł˛Ŕ˝ - %d şíˇ° (ĂÖ´ë UMB %d Kb) +. +:PROGRAM_LOADFIX_ALLOC +%d kb°Ą ÇŇ´çľÇžú˝Ŕ´Ď´Ů. +. +:PROGRAM_LOADFIX_DEALLOC +%d kb°Ą ÇҴ翥ź­ šţžîłŞ żŠŔŻ ¸Ţ¸đ¸Ž°Ą ťý°ĺ˝Ŕ´Ď´Ů. +. +:PROGRAM_LOADFIX_DEALLOCALL +ťçżëÇß´ř ¸đľç ¸Ţ¸đ¸ŽŔÇ ÇҴ翥ź­ šţžîłŞ żŠŔŻ ¸Ţ¸đ¸Ž°Ą ťý°ĺ˝Ŕ´Ď´Ů. +. +:PROGRAM_LOADFIX_ERROR +¸Ţ¸đ¸Ž ÇŇ´ç żŔˇů. +. +:MSCDEX_SUCCESS +MSCDEX°Ą źłÄĄľÇžú˝Ŕ´Ď´Ů. +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: ˝ÇĆĐ: żŠˇŻ °łŔÇ CD-ROM ľĺśóŔĚşęŔÇ šŽŔÚż­Ŕş żŹźÓŔ¸ˇÎ ŔĚžîÁŽžß ÇŐ´Ď´Ů. +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: ˝ÇĆĐ: žĆÁ÷ ÁöżřľÇÁö žĘ˝Ŕ´Ď´Ů. +. +:MSCDEX_ERROR_PATH +MSCDEX: ˝ÇĆĐ: °ćˇÎ°Ą żĂšŮ¸ŁÁö žĘ˝Ŕ´Ď´Ů. +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: ˝ÇĆĐ: CD-ROM ľĺśóŔĚşę°Ą łĘšŤ ¸š˝Ŕ´Ď´Ů. ĂÖ´ë 5°łŔÔ´Ď´Ů. MSCDEX źłÄĄ°Ą ˝ÇĆоǞú˝Ŕ´Ď´Ů. +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: ¸śżîĆŽľČ ÇĎŔ§ ľđˇşĹ͸Ž: ÁŚÇŃľČ Áöżř. +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: ˝ÇĆĐ: ĆÄŔĎŔĚ ISO/CUE ŔĚšĚÁö°Ą žĆ´Ď°ĹłŞ Ŕ߸řľČ Á¤ş¸°Ą Ć÷ÇԾǞî ŔÖ˝Ŕ´Ď´Ů. +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: ˝ÇĆĐ: žË źö žř´Â żŔˇů. +. +:PROGRAM_RESCAN_SUCCESS +ľĺśóŔĚşę Äł˝Ă¸Ś °ť˝ĹÇß˝Ŕ´Ď´Ů. +. +:PROGRAM_INTRO +DOSBox´Â źŇ¸ŽżÍ ą×ˇĄÇČŔť ÁŚ°řÇĎ´Â x86 żĄšÄˇšŔĚĹÍŔÔ´Ď´Ů. +DOSBox´Â żž ˝ĂŔýŔÇ DOSżÍ °°Ŕş źĐŔť ÁŚ°řÇŐ´Ď´Ů. + +ąâşť ¸śżîĆŽżĄ ´ëÇŃ Á¤ş¸¸Ś ş¸ˇÁ¸é ´ŮŔ˝°ú °°ŔĚ ŔÔˇÂÇϽʽÿŔ: intro mount +CD-ROM ÁöżřżĄ ´ëÇŃ Á¤ş¸¸Ś ş¸ˇÁ¸é ´ŮŔ˝°ú °°ŔĚ ŔÔˇÂÇϽʽÿŔ: intro cdrom +´ÜĂŕ Ĺ°żĄ ´ëÇŃ Á¤ş¸¸Ś ş¸ˇÁ¸é ´ŮŔ˝°ú °°ŔĚ ŔÔˇÂÇϽʽÿŔ: intro special +DOSBoxżĄ ´ëÇŃ ´ő ¸šŔş Á¤ş¸¸Ś ş¸ˇÁ¸é: http://dosbox.sourceforge.net/wiki + +DOSBox´Â żŔˇů°Ą ŔÖŔ¸¸é žĆšŤˇą °ć°í žřŔĚ ¸ŘĂß°í ÁžˇáÇŐ´Ď´Ů! + + +. +:PROGRAM_INTRO_MOUNT_START +ĂłŔ˝ ˝ĂŔŰÇŇ ś§ ťçżëÇŇ ¸íˇÉžîľé ¸î °ĄÁö°Ą żŠąâżĄ łŞżÍ ŔÖ˝Ŕ´Ď´Ů: +ĆÄŔĎ ˝Ă˝şĹŰżĄ Ŕ§ÄĄÇŃ ĆÄŔĎľéŔť ťçżëÇĎąâ žŐź­, +¸ŐŔú ĆÄŔĎľéŔĚ ľéžî ŔÖ´Â ľđˇşĹ͸Ž¸Ś ¸śżîĆŽÇŘžß ÇŐ´Ď´Ů. + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ŚŁŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚ¤ +Ś˘mount c c:\dosprog\´Â c:\dosprog¸Ś C ľĺśóŔĚşęˇÎ ¸¸ľě´Ď´Ů. Ś˘ +Ś˘ Ś˘ +Ś˘c:\dosprog\°Ą żšÁŚŔÔ´Ď´Ů. ŔĚ°ÍŔť żŠˇŻşĐŔÇ °ÔŔÓ ľđˇşĹ͸ŽˇÎ šŮ˛Ů˝Ę˝ĂżŔ. Ś˘ +ŚŚŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĽ +. +:PROGRAM_INTRO_MOUNT_OTHER +ŚŁŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚ¤ +Ś˘mount c ~/dosprog´Â ~/dosprog¸Ś C ľĺśóŔĚşęˇÎ ¸¸ľě´Ď´Ů. Ś˘ +Ś˘ Ś˘ +Ś˘~/dosprog°Ą żšÁŚŔÔ´Ď´Ů. ŔĚ°ÍŔť żŠˇŻşĐŔÇ °ÔŔÓ ľđˇşĹ͸ŽˇÎ šŮ˛Ů˝Ę˝ĂżŔ.  Ś˘ +ŚŚŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĽ +. +:PROGRAM_INTRO_MOUNT_END +¸śżîĆŽ°Ą ÁŚ´ëˇÎ ľÇ¸é c:śó°í ŔÔˇÂÇĎżŠ ťőˇÎ ¸¸ľéžîÁř C ľĺśóŔĚşęˇÎ ŔĚľżÇŇ źö +ŔÖ˝Ŕ´Ď´Ů. dirśó°í ŔÔˇÂÇĎ¸é ą× ľĺśóŔĚşęŔÇ łťżëŔť ş¸żŠÁÝ´Ď´Ů. cdˇÎ ľđˇşĹ͸Ž¸Ś +ľéžî°Ľ źö ŔÖ˝Ŕ´Ď´Ů. (ľđˇşĹ与 łŞż­ ą¸šŽ []Ŕ¸ˇÎ ľđˇşĹ͸Ž¸Ś žËžĆşź źö ŔÖŔ˝). +´ŮŔ˝ŔÇ šŽŔÚż­ˇÎ łĄłŞ´Â ÇÁˇÎą×ˇĽŔĚłŞ ĆÄŔĎŔť ˝ÇÇŕÇŇ źö ŔÖ˝Ŕ´Ď´Ů: .exe .bat .com. +. +:PROGRAM_INTRO_CDROM +˝ÇÁŚ/°Ąťó CD-ROM ľĺśóŔ̺긌 DOSBoxżĄź­ ¸śżîĆŽÇĎ´Â šćšý: +DOSBox´Â żŠˇŻ źöÁŘżĄ °ÉĂÄ CD-ROM °Ąťó ą¸ÇöŔť ÁŚ°řÇŐ´Ď´Ů. + +ąâşť źöÁŘŔş ¸đľç CD-ROM ľĺśóŔĚşężÍ ŔĎšÝ ľđˇşĹ͸ŽżĄź­ ľżŔŰÇŐ´Ď´Ů. +MSCDEX¸Ś źłÄĄÇĎ°í ĆÄŔĎŔť ŔĐąâ ŔüżëŔ¸ˇÎ ¸¸ľě´Ď´Ů. +žĆˇĄŔÇ šćšýŔş ´ëşÎşĐŔÇ °ÔŔÓżĄź­ ž˛ŔĎ źö ŔÖ˝Ŕ´Ď´Ů: +mount d D:\ -t cdrom śÇ´Â mount d C:\example -t cdrom +ľżŔŰÇĎÁö žĘŔ¸¸é CD-ROMŔÇ ˇšŔĚşíŔť ÁöÁ¤ÇŘ ş¸˝Ę˝ĂżŔ: +mount d C:\example -t cdrom -label CDˇšŔĚşí + +´ŮŔ˝ źöÁŘŔş ¸î °ĄÁö łˇŔş źöÁŘŔÇ ÁöżřŔť ÁŚ°řÇŐ´Ď´Ů. +ą×ˇŻšÇˇÎ CD-ROM ľĺśóŔ̺꿥ź­¸¸ ľżŔŰÇŐ´Ď´Ů: +mount d D:\ -t cdrom -usecd 0 + +¸śÁö¸ˇ źöÁŘŔÇ ÁöżřŔş żîżľ ĂźÁŚżĄ ľűśó ´ŢśóÁý´Ď´Ů: +Windows 2000, Windows XP ą×¸Ž°í Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +ASPI ˇšŔĚžî°Ą źłÄĄľČ Windows 9x: +mount d D:\ -t cdrom -usecd 0 -aspi + +CD-ROMŔÇ Ŕ§ÄĄ¸Ś šŮ˛ŮˇÁ¸é Ŕ§ŔÇ D:\¸Ś ´Ů¸Ľ °ÍŔ¸ˇÎ šŮ˛Ů˝Ę˝ĂżŔ. +0 in -usecd 0ŔÇ źýŔÚ¸Ś šŮ˛ŮˇÁ¸é ´ŮŔ˝°ú °°ŔĚ CD-ROM ş¸°í źýŔÚ¸Ś ČŽŔÎÇϽʽÿŔ: +mount -cd +. +:PROGRAM_INTRO_SPECIAL +´ÜĂŕ Ĺ°: +ąâşťŔűŔÎ Ĺ°ş¸ľĺ ÁśÇŐŔş ´ŮŔ˝°ú °°˝Ŕ´Ď´Ů. +ŔĚ Ĺ°ľéŔş ¸ĹÇÎ ÇÁˇÎą×ˇĽżĄź­ šŮ˛Ü źö ŔÖ˝Ŕ´Ď´Ů. + +ALT-ENTER : ŔüĂź Č­¸éżĄź­ â / ⿥ź­ ŔüĂź Č­¸é +ALT-PAUSE : Ŕáąń ¸ŘĂă +CTRL-F1 : ¸ĹÇÎ ÇÁˇÎą×ˇĽ ˝ÇÇŕ. +CTRL-F4 : ľĺśóŔĚşę Äł˝Ă °ť˝Ĺ, ¸śżîĆŽľČ żŠˇŻ °łŔÇ ľđ˝şĹŠ ŔĚšĚÁöľé źřČŻ +CTRL-ALT-F5 : Č­¸éŔÇ ľżżľťó łěČ­ ˝ÇÇŕ / ÁßÁö +CTRL-F5 : ˝şĹŠ¸°źŚ ŔúŔĺ +CTRL-F6 : źŇ¸Ž ĂâˇÂŔť żţŔĚşę(WAV) ĆÄŔϡΠąâˇĎ / ÁßÁö +CTRL-ALT-F7 : OPL łěŔ˝ ¸íˇÉ ˝ÇÇŕ / ÁßÁö +CTRL-ALT-F8 : MIDI łěŔ˝ ¸íˇÉ ˝ÇÇŕ / ÁßÁö +CTRL-F7 : ÇÁˇšŔÓ šŤ˝Ă ÁŮŔÓ +CTRL-F8 : ÇÁˇšŔÓ šŤ˝Ă łôŔÓ +CTRL-F9 : DOSBox łĄłťąâ +CTRL-F10 : ¸śżě˝ş ŔáąÝ / ŔáąÝ ÇŽąâ +CTRL-F11 : °Ąťó ą¸Çö ´Ŕ¸Ž°Ô (ťçŔĚĹŹ ÁŮŔÓ) +CTRL-F12 : °Ąťó ą¸Çö şü¸Ł°Ô (ťçŔĚĹŹ ´Ă¸˛) +ALT-F12 : źÓľľ ÁŚÇŃ ÇŘÁŚ (ĹÍş¸ ´ÜĂß) +. +:PROGRAM_BOOT_NOT_EXIST +˝ÇĆĐ - ˝Ăľż ľđ˝şĹŠ ĆÄŔĎŔĚ Á¸ŔçÇĎÁö žĘ˝Ŕ´Ď´Ů. +. +:PROGRAM_BOOT_NOT_OPEN +˝ÇĆĐ - ˝Ăľż ľđ˝şĹŠ ĆÄŔĎŔť ż­ źö žř˝Ŕ´Ď´Ů. +. +:PROGRAM_BOOT_WRITE_PROTECTED +ŔĚšĚÁö ĆÄŔĎŔĚ ŔĐąâ ŔüżëŔÔ´Ď´Ů! šŽÁŚ°Ą ŔϞ źö ŔÖ˝Ŕ´Ď´Ů. +. +:PROGRAM_BOOT_PRINT_ERROR +ŔĚ ¸íˇÉžî´Â ÇáÎÇÇ śÇ´Â ÇĎľĺ ľĺśóŔĚşę ŔĚšĚÁöˇÎ DOSBox¸Ś ˝ĂľżÇŐ´Ď´Ů. + +ŔĚ ¸íˇÉžîˇÎ Ctrl-F4¸Ś ´­ˇŻź­ ÇáÎÇÇ ľđ˝şĹŠľéŔť ´ŮŔ˝ ľđ˝şĹŠˇÎ łŃąć źö ŔÖŔ¸¸ç +-lŔş ˝ĂľżÇŇ ¸śżîĆŽľČ ľĺśóŔ̺긌 ÁöÁ¤ÇŐ´Ď´Ů. ľĺśóŔĚşę šŽŔÚż­ŔĚ ÁöÁ¤ľÇÁö +žĘŔ¸¸é ˝ĂľżľÇ´Â ąâşť°ŞŔş A ľĺśóŔĚşę°Ą ľË´Ď´Ů. +˝ĂľżÇŇ źö ŔÖ´Â ľĺśóŔĚşę šŽŔÚż­Ŕş A, C, ą×¸Ž°í DŔÔ´Ď´Ů. ÇĎľĺ ľĺśóŔĚşę(C śÇ´Â D)ˇÎşÎĹÍ +˝ĂľżÇŇ ś§´Â, ŔĚšĚÁö°Ą IMGMOUNT ¸íˇÉžî¸Ś ĹëÇŘ ¸śżîĆŽľÇžî ŔÖžîžß +ÇŐ´Ď´Ů. + +ŔĚ ¸íˇÉžî ą¸šŽŔş ´ŮŔ˝°ú °°˝Ŕ´Ď´Ů: + +BOOT [ľđ˝şĹŠŔĚšĚÁö1.img ľđ˝şĹŠŔĚšĚÁö2.img ĄŚ ľđ˝şĹŠŔĚšĚÁöN.img] [-l ľĺśóŔĚşę šŽŔÚż­] +. +:PROGRAM_BOOT_UNABLE +ľĺśóŔĚşę %cˇÎ ˝ĂľżÇŇ źö žř˝Ŕ´Ď´Ů. +:PROGRAM_BOOT_IMAGE_OPEN +ŔĚšĚÁö ĆÄŔĎŔť ż­°í ŔÖ˝Ŕ´Ď´Ů: %s +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +%sŔť(¸Ś) ż­ źö žř˝Ŕ´Ď´Ů. +:PROGRAM_BOOT_BOOT +ľĺśóŔĚşę %cˇÎ ˝Ăľż Áß... +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr ÄŤĆŽ¸ŽÁö¸Ś ĂŁžŇŔ¸łŞ ąâąâ°Ą PCjrŔĚ žĆ´Ő´Ď´Ů. +:PROGRAM_BOOT_CART_LIST_CMDS +ťçżëÇŇ źö ŔÖ´Â PCjr ÄŤĆŽ¸ŽÁö Äż¸Ç´őľé:%s. +:PROGRAM_BOOT_CART_NO_CMDS +PCjr ÄŤĆŽ¸ŽÁö Äż¸Ç´ő¸Ś ĂŁŔť źö žř˝Ŕ´Ď´Ů. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +ŔĚšĚÁö¸Ś ¸śżîĆŽÇŇ ľĺśóŔĚşę šŽŔÚż­Ŕť ÁöÁ¤ÇŘ ÁֽʽÿŔ. +. +:PROGRAM_IMGMOUNT_SPECIFY2 +ĆŻÁ¤ Ŕ§ÄĄ(0,1=fda,fdb;2,3=hda,hdb)żĄź­ ŔĚšĚÁö¸Ś ¸śżîĆŽÇŇ ľĺśóŔĚşę šřČŁ(0 śÇ´Â 3)¸Ś ÁöÁ¤ÇŘ ÁֽʽÿŔ. +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +CD-ROM ŔĚšĚÁöŔÇ °ćżě: IMGMOUNT 'ľĺśóŔĚşę šŽŔÚż­' 'ŔĚšĚÁö Ŕ§ÄĄ' -t iso + +ÇĎľĺ ľĺśóŔĚşę ŔĚšĚÁöŔÇ °ćżě: ÇĎľĺ ľĺśóŔĚşęŔÇ ĹŠąâ¸Ś ÁöÁ¤ÇϽʽÿŔ: +ź˝ĹÍ ´ç šŮŔĚĆŽ, ˝Ç¸°´ő ´ç ź˝ĹÍ, ˝Ç¸°´ő ´ç Çěľĺ, ˝Ç¸°´ő źö +IMGMOUNT 'ľĺśóŔĚşę šŽŔÚż­' 'ŔĚšĚÁö Ŕ§ÄĄ' -size bps,spc,hpc,cyl +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +ŔĚšĚÁö¸Ś şŇˇŻżĂ źö žř˝Ŕ´Ď´Ů. +°ćˇÎ°Ą żĂšŮ¸ĽÁö, ą×¸Ž°í ŔĚšĚÁö¸Ś ťçżëÇŇ źö ŔÖ´ÂÁö ČŽŔÎÇϽʽÿŔ. +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +ŔĚšĚÁöżĄź­ ľĺśóŔĚşę ĹŠąâ¸Ś žË źö žř˝Ŕ´Ď´Ů. +şŻźö -size bps,spc,hpc,cyl¸Ś ťçżëÇĎżŠ ĹŠąâ¸Ś ÁöÁ¤ÇϽʽÿŔ. +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +"%s"Ŕş(´Â) ÁöżřÇĎÁö žĘ´Â ŔŻÇüŔÔ´Ď´Ů. "hdd", "floppy", śÇ´Â "iso"ˇÎ ÁöÁ¤ÇϽʽÿŔ. +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +"%s"Ŕş(´Â) ÁöŸnÇĎÁö žĘ´Â Ć÷¸ËŔÔ´Ď´Ů. "fat", "iso", śÇ´Â "none"Ŕ¸ˇÎ ÁöÁ¤ÇϽʽÿŔ. +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +¸śżîĆŽÇŇ ĆÄŔĎ ŔĚšĚÁö¸Ś ÁöÁ¤ÇŘžß ÇŐ´Ď´Ů. +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +ŔĚšĚÁö ĆÄŔĎŔť ĂŁŔť źö žř˝Ŕ´Ď´Ů. +. +:PROGRAM_IMGMOUNT_MOUNT +ľđˇşĹ͸Ž¸Ś ¸śżîĆŽÇϡÁ¸é, IMGMOUNT ¸íˇÉžî°Ą žĆ´Ń MOUNT ¸íˇÉžî¸Ś ťçżëÇϽʽÿŔ. +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +ÁöÁ¤ľČ šŽŔÚż­ˇÎ ŔĚšĚ ľĺśóŔĚşę°Ą ¸śżîĆŽľÇžî ŔÖ˝Ŕ´Ď´Ů. +. +:PROGRAM_IMGMOUNT_CANT_CREATE +ľĺśóŔ̺긌 ĆÄŔϡκÎĹÍ ¸¸ľéžîłž źö žř˝Ŕ´Ď´Ů. +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +ľĺśóŔĚşę źýŔÚ %dŔĚ(°Ą) %sˇÎ ¸śżîĆŽľÇžú˝Ŕ´Ď´Ů +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +ŔĚšĚÁö´Â ČŁ˝şĆŽ śÇ´Â ťçżëŔÚŔÇ ľĺśóŔ̺꿥 Á¸ŔçÇŘžß ÇŐ´Ď´Ů. +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +CUE/ISO ŔĚšĚÁö¸¸ żŠˇŻ °łŔÇ ĆÄŔĎ ťçżëŔť ÁöżřÇŐ´Ď´Ů. +. +:PROGRAM_KEYB_INFO +%i ÄÚľĺĆäŔĚÁö¸Ś ťçżëÇŐ´Ď´Ů +. +:PROGRAM_KEYB_SHOWHELP +KEYB [Ĺ°ş¸ľĺ ˇšŔ̞ƿô ID[ ÄÚľĺĆäŔĚÁö šřČŁ[ ÄÚľĺĆäŔĚÁö ĆÄŔĎ]]] + +Some examples: + KEYB: ÇöŔç ťçżëÇĎ°í ŔÖ´Â ÄÚľĺ ĆäŔĚÁö¸Ś ş¸żŠ ÁÝ´Ď´Ů. + KEYB sp: ˝şĆäŔΞî (SP) ˇšŔ̞ƿôŔť şŇˇŻżŔ°í ą×żĄ ¸Â´Â ÄÚľĺĆäŔĚÁö¸Ś ťçżëÇŐ´Ď´Ů. + KEYB sp 850: ˝şĆäŔΞî (SP) ˇšŔ̞ƿôŔť şŇˇŻżŔ°í ÄÚľĺĆäŔĚÁö 850Ŕť ťçżëÇŐ´Ď´Ů. + KEYB sp 850 mycp.cpi: Ŕ§żÍ °°Áö¸¸ mycp.cpi ĆÄŔĎŔť ťçżëÇŐ´Ď´Ů. +. +:PROGRAM_KEYB_NOERROR +%s Ĺ°ş¸ľĺ ˇšŔ̞ƿôŔť ÄÚľĺĆäŔĚÁö %iˇÎ şŇˇŻľéż´˝Ŕ´Ď´Ů +. +:PROGRAM_KEYB_FILENOTFOUND +%s Ĺ°ş¸ľĺ ĆÄŔĎŔť ĂŁŔť źö žř˝Ŕ´Ď´Ů + +. +:PROGRAM_KEYB_INVALIDFILE +%s Ĺ°ş¸ľĺ ĆÄŔĎŔĚ żĂšŮ¸ŁÁö žĘ˝Ŕ´Ď´Ů +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +ˇšŔ̞ƿôŔť ĂŁŔť źö žř˝Ŕ´Ď´Ů - %s, ÄÚľĺ ĆäŔĚÁö %i +. +:PROGRAM_KEYB_INVCPFILE +ˇšŔ̞ƿô %sżĄ ´ëÇŃ ÄÚľĺ ĆäŔĚÁö ĆÄŔĎŔĚ žř°ĹłŞ żĂšŮ¸ŁÁö žĘ˝Ŕ´Ď´Ů + +. +:SHELL_ILLEGAL_PATH +Ŕ߸řľČ °ćˇÎŔÔ´Ď´Ů. +. +:SHELL_CMD_HELP +ÁöżřľÇ´Â ¸đľç ¸íˇÉžî¸Ś łŞż­ÇϡÁ¸é help /allśó°í ŔÔˇÂÇϽʽÿŔ. +ŔÚÁÖ ž˛ŔĚ´Â ¸íˇÉžî´Â ´ŮŔ˝°ú °°˝Ŕ´Ď´Ů: +. +:SHELL_CMD_ECHO_ON +ECHO°Ą źłÁ¤ľÇžî ŔÖ˝Ŕ´Ď´Ů. +. +:SHELL_CMD_ECHO_OFF +ECHO°Ą źłÁ¤ľÇžî ŔÖÁö žĘ˝Ŕ´Ď´Ů. +. +:SHELL_ILLEGAL_SWITCH +żĂšŮ¸ŁÁö žĘŔş ˝şŔ§ÄĄ: %s. +. +:SHELL_MISSING_PARAMETER +¸Ĺ°ł şŻźö¸Ś ĂŁŔť źö žř˝Ŕ´Ď´Ů. +. +:SHELL_CMD_CHDIR_ERROR +ÁöÁ¤ľČ °ćˇÎˇÎ šŮ˛Ü źö žř˝Ŕ´Ď´Ů: %s. +. +:SHELL_CMD_CHDIR_HINT +´Ů¸Ľ ľĺśóŔĚşęˇÎ šŮ˛ŮˇÁ¸é %c:śó°í ŔÔˇÂÇϽʽÿŔ +. +:SHELL_CMD_CHDIR_HINT_2 +ľđˇşĹ͸Ž Ŕ̸§ŔĚ 8ŔÚ°Ą łŃ°ĹłŞ °řšéŔĚ ľéžî ŔÖ˝Ŕ´Ď´Ů. +cd %sśó°í ŔÔˇÂÇŘ ş¸˝Ę˝ĂżŔ. +. +:SHELL_CMD_CHDIR_HINT_3 +ľĺśóŔĚşę°Ą żŠŔüČ÷ Z:żĄ ŔÖ˝Ŕ´Ď´Ů. C:żÍ °°ŔĚ ŔÔˇÂÇĎżŠ ¸śżîĆŽľČ ľĺśóŔĚşęˇÎ ŔĚľżÇϽʽÿŔ. +. +:SHELL_CMD_MKDIR_ERROR +¸¸ľé źö žř˝Ŕ´Ď´Ů: %s. +. +:SHELL_CMD_RMDIR_ERROR +Áöżď źö žř˝Ŕ´Ď´Ů: %s. +. +:SHELL_CMD_DEL_ERROR +Áöżď źö žř˝Ŕ´Ď´Ů: %s. +. +:SHELL_SYNTAXERROR +¸íˇÉžî ą¸šŽŔĚ żĂšŮ¸ŁÁö žĘ˝Ŕ´Ď´Ů. +. +:SHELL_CMD_SET_NOT_SET +ČŻ°ć şŻźö %sŔĚ(°Ą) Á¤ŔÇľÇÁö žĘžŇ˝Ŕ´Ď´Ů. +. +:SHELL_CMD_SET_OUT_OF_SPACE +ČŻ°ć °ř°ŁŔĚ ĂćşĐÇĎÁö žĘ˝Ŕ´Ď´Ů. +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: ĆÄŔĎ Ŕ̸§Ŕť ĂŁŔť źö žř˝Ŕ´Ď´Ů. +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: źýŔÚ°Ą ÁöÁ¤ľÇÁö žĘžŇ˝Ŕ´Ď´Ů. +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: żĂšŮ¸ŁÁö žĘŔş źýŔÚ. +. +:SHELL_CMD_GOTO_MISSING_LABEL +GOTO ¸íˇÉžîżĄ ˇšŔĚşíŔĚ ÁöÁ¤ľÇÁö žĘžŇ˝Ŕ´Ď´Ů. +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: %s ˇšŔĚşíŔť ĂŁŔť źö žř˝Ŕ´Ď´Ů. +. +:SHELL_CMD_FILE_NOT_FOUND +%s ĆÄŔĎŔť ĂŁŔť źö žř˝Ŕ´Ď´Ů. +. +:SHELL_CMD_FILE_EXISTS +%s ĆÄŔĎŔĚ ŔĚšĚ Á¸ŔçÇŐ´Ď´Ů. +. +:SHELL_CMD_DIR_INTRO +%s ľđˇşĹ͸Ž +. +:SHELL_CMD_DIR_BYTES_USED +%5d°ł ĆÄŔĎ %17s šŮŔĚĆŽ. +. +:SHELL_CMD_DIR_BYTES_FREE +%5d°ł ľđˇşĹ͸Ž %17s šŮŔĚĆŽ ł˛Ŕ˝. +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +%c ľĺśóŔĚşę°Ą Á¸ŔçÇĎÁö žĘ˝Ŕ´Ď´Ů! +¸ŐŔú ¸śżîĆŽ¸Ś ÇϽʽÿŔ. ´ő ŔÚźźÇŃ Á¤ş¸¸Ś ş¸ˇÁ¸é intro śÇ´Â intro mountśó°í ŔÔˇÂÇϽʽÿŔ. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +żĂšŮ¸ŁÁö žĘŔş ¸íˇÉžîŔÔ´Ď´Ů: %s. +. +:SHELL_CMD_PAUSE +°čźÓÇϡÁ¸é žĆšŤ Ĺ°łŞ ´Š¸Ł˝Ę˝ĂżŔ. +. +:SHELL_CMD_PAUSE_HELP +Ĺ°¸Ś ÇŃ šř ´Š¸Ś ś§ąîÁö ąâ´Ů¸Ž´Ů°Ą °čźÓÇŐ´Ď´Ů. +. +:SHELL_CMD_COPY_FAILURE +şšťç ˝ÇĆĐ : %s. +. +:SHELL_CMD_COPY_SUCCESS + %d°łŔÇ ĆÄŔĎŔĚ şšťçľÇžú˝Ŕ´Ď´Ů. +. +:SHELL_CMD_SUBST_NO_REMOVE +ľĺśóŔĚşę ÁŚ°Ĺ¸Ś ÁöżřÇĎÁö žĘ˝Ŕ´Ď´Ů. žĆšŤ °Íľľ ÇĎÁö žĘ˝Ŕ´Ď´Ů. +. +:SHELL_CMD_SUBST_FAILURE +SUBST ˝ÇĆĐ. ¸íˇÉ ÁŮżĄź­ Ŕ߸ř ŔÔˇÂÇĎż´°ĹłŞ ´ëťó ľĺśóŔĚşę°Ą ŔĚšĚ ťçżë ÁßŔÔ´Ď´Ů. +ˇÎÄĂ ľĺśóŔ̺꿥¸¸ SUBST¸Ś ťçżëÇŇ źö ŔÖ˝Ŕ´Ď´Ů. +:SHELL_STARTUP_BEGIN +ŚŁŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚ¤ +Ś˘DOSBox v%-8s Ś˘ +Ś˘ Ś˘ +Ś˘ťőˇÎ żŔ˝Ĺ şĐľéŔť Ŕ§ÇŃ ÂŞŔş źŇ°š¸ťŔť ş¸ˇÁ¸é ŔÔˇÂÇϽʽÿŔ: INTRO Ś˘ +Ś˘ÁöżřľÇ´Â źĐ ¸íˇÉžî¸Ś ş¸ˇÁ¸é ŔÔˇÂÇϽʽÿŔ: HELP Ś˘ +Ś˘ Ś˘ +Ś˘źÓľľ¸Ś łôŔ̡Á¸é ´Š¸Ł˝Ę˝ĂżŔ: Ctrl-F8 š× ctrl-F12. Ś˘ +Ś˘¸ĹÇÎ ÇÁˇÎą×ˇĽŔť ż­ˇÁ¸é: Ctrl-F1. Ś˘ +Ś˘´ő ¸šŔş Á¤ş¸´Â DOSBox ľđˇşĹ͸ŽŔÇ README ĆÄŔĎżĄ ŔÖ˝Ŕ´Ď´Ů. Ś˘ +Ś˘ Ś˘ +. +:SHELL_STARTUP_CGA +Ś˘DOSBox´Â ÄÄĆ÷ÁöĆŽ CGA šć˝ÄŔť ÁöżřÇŐ´Ď´Ů. Ś˘ +Ś˘ŔĚ ¸đľĺŔĎ ś§ ťöŔť šŮ˛ŮˇÁ¸é (alt-)F11Ŕť ťçżëÇϽʽÿŔ. Ś˘ +Ś˘ Ś˘ +. +:SHELL_STARTUP_DEBUG +Ś˘Alt-Pause¸Ś ´­ˇŻ ľđšöąëÇĎ°ĹłŞ, DEBUG ¸íˇÉžîˇÎ EXE¸Ś ˝ÇÇŕÇŐ´Ď´Ů. Ś˘ +Ś˘ Ś˘ +. +:SHELL_STARTUP_END +Ś˘Áń°Ĺżî ÇĎˇç ľÇ˝Ę˝ĂżŔ! Ś˘ +Ś˘DOSBox ĆŔ Ś˘ +ŚŚŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĄŚĽ +. +:SHELL_CMD_CHDIR_HELP +ÇöŔç ľđˇşĹ͸Ž¸Ś ş¸żŠ ÁÖ°ĹłŞ šŮ˛ß´Ď´Ů. +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [ľĺśóŔĚşę:][°ćˇÎ] +CHDIR [..] +CD [ľĺśóŔĚşę:][°ćˇÎ] +CD [..] + + .. ťóŔ§ ľđˇşĹ͸ŽˇÎ šŮ˛ß´Ď´Ů. + +ĆŻÁ¤ ľĺśóŔĚşęŔÇ ľđˇşĹ͸Ž¸Ś ÇĽ˝ĂÇϡÁ¸é 'CD ľĺśóŔĚşę:'¸Ś ŔÔˇÂÇϽʽÿŔ. +ÇöŔç ľĺśóŔĚşężÍ ľđˇşĹ͸Ž¸Ś ÇĽ˝ĂÇϡÁ¸é ¸Ĺ°ł şŻźö žřŔĚ 'CD'¸Ś ŔÔˇÂÇϽʽÿŔ. +. +:SHELL_CMD_CLS_HELP +Č­¸éŔť Áöżó´Ď´Ů. +. +:SHELL_CMD_DIR_HELP +ľđˇşĹ͸Ž¸Ś ş¸żŠ ÁÝ´Ď´Ů. +. +:SHELL_CMD_ECHO_HELP +¸Ţ˝ĂÁö¸Ś ş¸żŠÁÖ°ĹłŞ, ¸íˇÉžî šÝÇâŔť ÄŃ°ĹłŞ ˛ü´Ď´Ů. +. +:SHELL_CMD_EXIT_HELP +źĐżĄź­ şüÁŽ łŞ°Š´Ď´Ů. +. +:SHELL_CMD_HELP_HELP +ľľżň¸ťŔť ş¸żŠ ÁÝ´Ď´Ů. +. +:SHELL_CMD_MKDIR_HELP +ľđˇşĹ͸Ž¸Ś ¸¸ľě´Ď´Ů. +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [ľĺśóŔĚşę:][°ćˇÎ] +MD [ľĺśóŔĚşę:][°ćˇÎ] +. +:SHELL_CMD_RMDIR_HELP +ľđˇşĹ͸Ž¸Ś Áöżó´Ď´Ů. +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [ľĺśóŔĚşę:][°ćˇÎ] +RD [ľĺśóŔĚşę:][°ćˇÎ] +. +:SHELL_CMD_SET_HELP +ČŻ°ć şŻźö¸Ś šŮ˛ß´Ď´Ů. +. +:SHELL_CMD_IF_HELP +ŔĎ°ý ÇÁˇÎą×ˇĽżĄź­ Áś°Ç Ăł¸Ž¸Ś źöÇŕÇŐ´Ď´Ů. +. +:SHELL_CMD_GOTO_HELP +ŔĎ°ý ˝şĹŠ¸łĆŽżĄź­ ˇšŔĚşíŔĚ ŔÖ´Â Á١ΠŔĚľżÇŐ´Ď´Ů. +. +:SHELL_CMD_SHIFT_HELP +ŔĎ°ý ˝şĹŠ¸łĆŽżĄź­ šŮ˛Ü źö ŔÖ´Â ¸Ĺ°ł şŻźöŔÇ Ŕ§ÄĄ¸Ś żŢÂĘŔ¸ˇÎ żňÁ÷ŔÔ´Ď´Ů. +. +:SHELL_CMD_TYPE_HELP +ĹŘ˝şĆŽ ĆÄŔĎŔÇ łťżëŔť ş¸żŠÁÝ´Ď´Ů. +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [ľĺśóŔĚşę:][°ćˇÎ][ĆÄŔĎŔ̸§] +. +:SHELL_CMD_REM_HELP +ŔĎ°ý ĆÄŔĎżĄ ÁÖźŽŔť ąâˇĎÇŐ´Ď´Ů. +. +:SHELL_CMD_REM_HELP_LONG +REM [ÁÖźŽ] +. +:SHELL_CMD_NO_WILD +°Ł´Ü šöŔüŔÇ ¸íˇÉžîŔ̚ǡΠƯźö šŽŔÚ¸Ś ÇăżëÇĎÁö žĘ˝Ŕ´Ď´Ů! +. +:SHELL_CMD_RENAME_HELP +ÇĎłŞ ŔĚťóŔÇ ĆÄŔĎ Ŕ̸§Ŕť šŮ˛ß´Ď´Ů. +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [ľĺśóŔĚşę:][°ćˇÎ]ĆÄŔĎŔ̸§1 ĆÄŔĎŔ̸§2. +REN [ľĺśóŔĚşę:][°ćˇÎ]ĆÄŔĎŔ̸§1 ĆÄŔĎŔ̸§2. + +´ëťó ĆÄŔϡΠťő ľĺśóŔ̺곪 °ćˇÎ¸Ś ÁöÁ¤ÇŇ źö žřŔ˝Ŕť ÁÖŔÇÇϽʽÿŔ. +. +:SHELL_CMD_DELETE_HELP +ÇĎłŞ ŔĚťóŔÇ ĆÄŔĎŔť ťčÁŚÇŐ´Ď´Ů. +. +:SHELL_CMD_COPY_HELP +ĆÄŔĎŔť şšťçÇŐ´Ď´Ů. +. +:SHELL_CMD_CALL_HELP +´Ů¸Ľ ŔĎ°ý ĆÄŔĎ žČżĄź­ ŔĎ°ý ĆÄŔĎŔť ˝ÇÇŕÇŐ´Ď´Ů. +. +:SHELL_CMD_SUBST_HELP +łťşÎ ľđˇşĹ͸Ž¸Ś ľĺśóŔĚşęˇÎ ÇŇ´çÇŐ´Ď´Ů. +. +:SHELL_CMD_LOADHIGH_HELP +ÇÁˇÎą×ˇĽŔť ťóŔ§ ¸Ţ¸đ¸ŽżĄ şŇˇŻľéŔÔ´Ď´Ů (xms=true, umb=true°Ą ľÇžî ŔÖžîžß ÇŐ´Ď´Ů). +. +:SHELL_CMD_CHOICE_HELP +ťçżëŔÚŔÇ Ĺ°¸Ś ąâ´Ů¸Ž°í ERRORLEVELŔť źłÁ¤ÇŐ´Ď´Ů. +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:źąĹĂ Ç׸ń] [/N] [/S] šŽŔÚż­ + /C[:]źąĹĂ Ç׸ń - ÇăżëÇŇ Ĺ°¸Ś ÁöÁ¤ÇŐ´Ď´Ů. ąâşť ¸ńˇĎŔş ynŔÔ´Ď´Ů. + /N - ÇÁˇŇÇÁĆŽżĄ źąĹĂ ¸ńˇĎŔť źűąé´Ď´Ů. + /S - ´ë/źŇšŽŔڡΠą¸ş°ľČ źąĹĂ Ç׸ńŔť źąĹĂÇŇ źö ŔÖľľˇĎ ÇŐ´Ď´Ů. + text - ÇÁˇŇÇÁĆŽ žŐżĄ ÇĽ˝ĂľÉ šŽŔÚż­ŔÔ´Ď´Ů. +. +:SHELL_CMD_ATTRIB_HELP +žĆšŤ °Íľľ ÇĎÁö žĘ˝Ŕ´Ď´Ů. ČŁČŻźşŔť Ŕ§ÇŘ ł˛°ÜľÓ´Ď´Ů. +. +:SHELL_CMD_PATH_HELP +ČŁČŻźşŔť Ŕ§ÇŘ ł˛°ÜľÓ´Ď´Ů. +. +:SHELL_CMD_VER_HELP +DOS šöŔüŔť ş¸żŠ ÁÖ°í źłÁ¤ÇŐ´Ď´Ů. +. +:SHELL_CMD_VER_VER +DOSBox šöŔü %s. DOS šöŔü %d.%d. +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/ko/README-0.72.TXT dosbox-staging-0.77.0/contrib/old-translations/ko/README-0.72.TXT --- dosbox-staging-0.76.0/contrib/old-translations/ko/README-0.72.TXT 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/ko/README-0.72.TXT 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1127 @@ +---------------------------------------------------------------- + + 1. 공식 사이트 + + 공식 홈페이지 주소 : http://dosbox.sourceforge.net + 공식 영돸 포럼 : http://vogons.zetafleet.com + + + 2. 도스박스 다음 카페에서 글 옮김 + + English (영어): http://ykhwong.x-y.net + Korean (한국 포럼): http://cafe.daum.net/dosbox + + 옮긴이 : 유태웅 (전자우편 ykhwong@hanmail.net) + 엠에스엔 아이디: ykhwong@msn.com + +---------------------------------------------------------------- + + +DOSBox v0.72 + +===== +알림 +===== + +DOSBox는 이제껏 개인 컴퓨터에 맞춰 만들어진 프로그램들을 언젠가는 모두 +실행할 것입니다. 그것이 우리의 바람이지만 아직 다 이루지는 못했습니다. +DOSBox는 이제서야 매우 뚠뼸 컴퓨터에서 낮은 사양의 486 PC에 가깝게 돌아갑니다. +DOSBox는 옛날의 CGA/Tandy/PCjr 게임부터 Quake가 나온 즈음의 게임까지 +DOS 게임을 폭 넓게 실행할 수 있게 되었습니다. + + + +======== +찾아보기 +======== +1. 뚠뼸 도움말 +2. 자주 찾는 질문들 +3. 사용 방법 +4. 내부 프로그램 +5. 바로가는 키 +6. 매퍼 +7. 키보드 레이아웃 +8. 시리얼 멀티플레이어 기능 +9. 리소스를 많이 쓰는 게임을 실행하기 +10. 문제 해결 +11. 설정 구성 파일 +12. 언어 파일 +13. 나만의 DOSBox 만들기 +14. 고마운 분들 +15. 연락처 + +============== +1. 뚠뼸 도움말 +============== + +DOSBox 명령 줄에서 INTRO라고 입력하여 뚠뼸 도움말을 보실 수 있습니다. +마운트를 이해하는 데에 많은 도움을 받을 수 있겠습니다. +DOSBox는 에뮬레이션에 접근할 드라이브를 스스로 만들어 내지 않습니다. +자주 묻는 질돸 항목들 가운데 "C:ďźź>가 아니라 Z:ďźź>라고 뜹니다."와 +4번 구문에 나온 MOUNT 명령어 설명을 읽어 보십시오. + + +================= +2. 자주 찾는 질문들 +================= + +몇 가지 자주 찾는 질문들: + +물음: C:ďźź>가 아니라 Z:ďźź>라고 뜹니다. +물음: 제가 자주 쓰는 명령어들을 언제나 입력해야 합니까? 자동으로 되는 ęą´ 없나요? +물음: 전체 화면으로 어떻게 바꿉니까? +물음: 제 CD-ROM이 돌아가지 않습니다. +물음: 마우스가 돌아가지 않습니다. +물음: 소리가 나지 않습니다. +물음: 소리가 끊기거나 늘어집니다. +물음: DOSBox에서 ďźź 또는 : 가 눌러지지 않습니다. +물음: 키보드가 반응이 느립니다. +물음: 커서가 언제나 한쪽으로만 움직입니다! +물음: 게임, 응용 프로그램이 CD-ROM을 찾지 못합니다. +물음: 게임, 응용 프로그램이 너무 느리게 돌아갑니다! +물음: DOSBox가 제 컴퓨터에 해를 끟욠 수 있나요? +물음: 메모리 큏기/CPU 속도/EMS/SoundBlaster IRQ뼟 바꾸고 싶어요. +물음: 어떤 사운드 하드웨어가 DOSBox에서 지원되나요? +물음: DOSBox뼟 실행하자마자 충돌합니다. +물음: 설명이 잘 나와 있으나 그래도 잘 모르겠습니다. + + + + +물음: C:ďźź>가 아니라 Z:ďźź>라고 뜹니다. +풀이: 여러분이 가지고 있는 실제 디렉터리를 DOSBox의 가상 드라이브로 만들어야 합니다. + "mount" 명령어를 써 보십시오. + + 보기 + ① Windows에서 + "mount C D:ďźźGAMES" 라고 입력하면 실제 D:ďźźGAMES는 DOSBox의 C 드라이브가 됩니다. + ② Linux에서 + "mount c /home/username" 라고 입력하면 실제 /home/username 의 위치는 + DOSBox의 C 드라이브가 됩니다. + + 위에서 마운트된 드라이브로 바꾸려면 "C:"라고 입력하십시오. + 이렇게 해서 "C:\>"라고 뜨면 다 된 것입니다. + +물음: 제가 자주 쓰는 명령어들을 언제나 입력해야 합니까? 자동으로 되는 ęą´ 없나요? +풀이: DOSBox 설정 구성 파일을 열면 [autoexec] 구문이 있습니다. ꡸ 아래에 명령어들을 적어 두십시오. +그러면 DOSBox가 실행되자마자 이 명령어들이 실행됩니다. 마운트 등을 위해 이 구문을 사용할 수 있습니다. + +물음: 전체 화면으로 어떻게 바꿉니까? +풀이: Alt-Enter뼟 누르십시오. 아니면 DOSBox의 설정 구성 파일을 열고 fullscreen=false뼟 + fullscreen=true로 바꾸십시오. 화면이 제대로 꽉 ě°¨ 보이지 않으면 DOSBox 설정 구성 파일의 + fullresolution의 값을 바꿔서 게임을 실행해 보십시오. 전체 화면 모드에서 + 원래대로 되돌아가려면 다시 Alt-Enter뼟 누르시면 됩니다. + + +물음: 제 CD-ROM이 돌아가지 않습니다. +풀이: DOSBox에서 CD-ROM을 띄우려면 CD-ROM을 띄울 때 몇 가지 또 다른 선택 항목을 + 지정하셔야 합니다. + ① MSCDEX뼟 비롯한 CD-ROM 지원을 사용하려면: + - mount d f:ďźź -t cdrom + ② 낮은 수준의 SDL 지원을 사용하려면: + - mount d f:ďźź -t cdrom -usecd 0 -noioctl + ③ 낮은 수준의 ASPI 지원을 사용하려면 (ASPI-Layer가 설치된 Win98): + - mount d f:ďźź -t cdrom -usecd 0 -apsi + + 이 명령어에서: + d DOSBox의 가상 드라이브 문자열 + f:ďźź PC의 CD-ROM 실제 위치 + 0 CD-ROM 드라이브의 숫자, mount -cd 뼟 통해 구분 + 다음의 물음도 읽어 보십시오: 게임, 응용 프로그램이 CD-ROM을 찾지 못합니다. + + +물음: 마우스가 돌아가지 않습니다. +풀이: 보통 DOSBox는 게임이 마우스를 제어할 때 마우스를 찾아냅니다. + 화면을 한 번 누르면 잠금 처리되어 돌아갑니다. (DOSBox ě°˝ 안에서) + 어떠한 게임에서는 DOSBox가 마우스를 찾아내지 못할 수도 있습니다. + 이 경우 Ctrl-F10 키를 눌러서 마우스를 잠궈둘 수 있습니다. + +물음: 소리가 나지 않습니다. +풀이: 게임 설정에서 사운드를 올바르게 구성했는지 살펴 보십시오. + 소리 설정 유틸리티는 게임이 깔릴 때 같이 깔리며 설치하는 동안에도 소리를 설정할지 + 물어볼 수 있습니다. + 먼저 자동 감지(Autodetection) 옵션이 있는지 살펴 보십시오. 이 항목이 없다면 + SoundBlaster 또는 SoundBlaster 16을 골라 보십시오. + DOSBox의 기본 설정값은 address=220 irq=7 dma=1입니다. MIDI도 고르실 수 있는데 + 음악 장치 주소의 기본값은 330입니다. 가상으로 구현되는 사운드 카드들의 + 매개 변수들은 DOSBox 설정 구성 파일 안에서 바꾸실 수 있습니다. + 그래도 소리를 들으실 수 없다면 코어를 Normal로 바꾸시고 사이클 값을 cycles=2000ęłź + 같이 좀 더 낮은 값으로 맞춰 보십시오. + 소리를 내보내는 사운드 카드의 드라이버가 제대로 설치되어 있는지, + 선이 잘 꽂혀 있는지, 소리 크기가 알맞게 맞추어져 있는지 살펴 보십시오. + + +물음: 소리가 끊기거나 늘어집니다. +풀이: DOSBox가 현재의 뚠뼴기뼟 맞추기 위해 CPU 전력을 너무 많이 쓰고 있습니다. + CPU 사이클(cycles) 값을 낮추거나, 프레임 무시(frameskip) 값을 늘리거나, 각 사운드 장치 또는 믹서 장치의 + 샘플 속도(samplerate)뼟 낮추십시오. 또 prebuffer의 값을 늘려 보십시오. 이것들은 모두 DOSBox + 설정 구성 파일에서 바꾸실 수 있습니다. + cycles=max 또는 cycles=auto뼟 사용하고 계시면, DOSBox 밖에서 쓰이는 다른 프로그램들, + 특히 하드 디스크에 접근을 많이 하는 프로그램들이 DOSBox뼟 간섭할 수 있습니다! + + +물음: DOSBox에서 ďźź 또는 : 가 눌러지지 않습니다. +풀이: ďźź 는 \와 같습니다. 한국어 자판을 쓸 때에는 이와 같은 문제가 없습니다. + 어떠한 나라들의 자판에서는 이러한 문제가 알려져 있습니다. 자판 설계가 미꾭 방식이 아니면 일어납니다. + 아래에 나온 여덟 가지 가운데 하나를 따르십시오: + 1. 운영체제의 자판 설계를 바꾼다. + 2. ďźź 대신에 / 뼟 쓴다. + 3. DOSBox.Conf뼟 열고 userscancodes=false뼟 userscancodes=true로 바꾼다. + 4. DOSBox.Conf뼟 열고 [autoexec] 아래에 명령어를 미댏 입력해 놓는다. + 5. 자판 설계를 바꾼다. (키보드 레이아웃 꾏돸 7을 읽어 보십시오) + 6. : 뼟 입력하려면 Alt-58 키를, ďźź 뼟 입력하려면 Alt-92 키를 누른다. + 7. Enter와 가까운 키들을 하나씩 눌러보면 \가 먚힐 수 있다. + Shift 또는, Enter와 l 사이의 키들을 누르면 : 가 먚힐 수 있다. (미꾭 자판 기준) + 8. FreeDOS에서 keyb.com 을 내려받아 사용한다. (http://projects.freedos.net/keyb/) + 오래 되었거나 새로 나온 버전에서는 불러오는 방식에 버그가 남아 있을 수 있으므로 + 이러한 것들을 쓰지 말고 keyb2.0 pre4 버전을 찾아 본다. + +물음: 키보드가 반응이 느립니다. +풀이: DOSBox 설정 구성 파일에서 priority=normal,normalęłź 같이 우선 순위를 바꿔 보십시오. + CPU 사이클을 낮추는 것도 고려해 보십시오. + +물음: 커서가 언제나 한쪽으로만 움직입니다! +풀이: 조이스틱 에뮬레이션을 ęşź 보십시오. DOSBox 설정 구성 파일에서 joysticktype=none으로 두시면 + 됩니다. 조이스틱이 꽂혀 있다면 ëšź 주십시오. + 게임에서 조이스틱을 사용하려면 timed=false로 설정하십시오. ꡸댏고 운영체제의 제어판 쪽곟 + 게임 설정에서 조이스틱의 설정을 여러분의 조이스틱을 만져 보면서 잘 맞춰 보십시오. + +물음: 게임, 응용 프로그램이 CD-ROM을 찾지 못합니다. +풀이: CD-ROM을 띄우려면 -t cdrom 스위치를 사용해야 합니다. + 게임이 CD-ROM 레이블(이름)을 찾아내려고 한다면 이름을 올바르게 지정하셔야 합니다 (-label 레이블 이름) + 낮은 수준의 CD-ROM 지원을 사용하려면 다음의 스위치를 지정해야 합니다 : -usecd # + (#는 mount -cd뼟 통해 알려주는 CD-ROM 드라이브의 숫자) + Windows에서는 -ioctl, -aspi, 또는 -noioctl뼟 지정하십시오. + 이에 대한 더 자세한 내용은 이 문서의 다른 항목에서 찾아 보실 수 있습니다. + 아니면 CD-ROM 이미지를 만들어 보십시오. (CUE/BIN을 선호) ꡸댏고 DOSBox 내부 명령어 + IMGMOUNT 도구를 가지고 이미지를 마운트해 보십시오. 이것은 어느 운영체제에서든지 낮은 수준의 + CD-ROM 지원을 이용할 수 있도록 도와 줍니다. + + +물음: 게임, 응용 프로그램이 너무 느리게 돌아갑니다! +풀이: 더 많은 정보를 보려늴 "리소스를 많이 쓰는 게임들을 실행하기" 구문을 보십시오. + + +물음: DOSBox가 제 컴퓨터에 해를 끟욠 수 있나요? +풀이: DOSBox는 리소스를 많이 쓰는 다른 프로그램들에 견주어 보더라도 컴퓨터에 해를 주지 않습니다. + 사이클 값을 높인다고 해서 실제 CPU 클럭을 끌어 올리는 것이 아닙니다. + 사이클을 너무 높게 잡으면 DOSBox 안에서 실행되고 있는 소프트웨어의 성능이 떨어질 수 있습니다. + + +물음: 메모리 큏기/CPU 속도/EMS/SoundBlaster IRQ뼟 바꾸고 싶어요. +풀이: 바꾸실 수 있습니다! + ꡸냼 config 파일을 하나 만드십시오: config -writeconf dosbox.conf + 메모장과 같은 프로그램을 실행하여 여러분만의 설정값으로 바꿔 보십시오. + dosbox.exe -conf dosbox.conf라고 입력하면 이 dosbox.conf의 설정이 DOSBox에 적용됩니다. + + +물음: 어떤 사운드 하드웨어가 DOSBox에서 지원되나요? +풀이: DOSBox는 오래된 사운드 장치들 몇 가지를 가상으로 구현해 냅니다: + - 내부 PC 스피커 (비프음) + 높고 낮은 소리와 여러 종류의 디지털 소리를 내부 스피커로 만들어 냅니다. + - Creative CMS/Gameblaster + Creative Labs(R) 사에서 맨 처음 선보인 사운드 카드입니다. 기본 포트 구성은 0x220으로 되어 있습니다. + Adlibęłź 함께 사용하면 충돌할 수도 있습니다. + - Tandy 3 voice + 노이즈 채널을 제외하고 완전히 가상으로 구현해냅니다. + 노이즈 채널에 대해서는 문서에 낱낱이 나와 있지 않으며 다만 소리의 정확도와 가장 관계가 깊다고 생각합니다. + - Tandy DAC + Tandy DAC 가상 구현은 사운드 블라스터 가상 구현의 도움을 받습니다. + 따라서 DOSBox 설정 구성 파일에서 soundblaster가 ęşźě ¸ 있지 않아야 합니다. + Tandy DAC는 BIOS 수준에서만 가상으로 구현됩니다. + - Adlib + MAME에서 가져온 것입니다. 완벽에 가깝고 디지털 소리를 거의 다 재생해 낼 수 있습니다. + - SoundBlaster 16/ SoundBlaster Pro I & II /SoundBlaster I & II + 기본적으로 DOSBox는 SoundBlaster 16의 16비트 스테레오 사운드를 제공합니다. + DOSBox.Conf에서 각기 다른 SoundBlaster 버전을 고뼟 수 있습니다. (내부 명령어를 보려늴 : CONFIG) + - Disney Soundsource + 이 소리 장치는 프린터 포트를 쓰고 디지털 소리만을 내보냅니다. + - Gravis Ultrasound (GUS) + 이 하드웨어는 거의 완전히 가상으로 구현됩니다. + MPU-401이 다른 코드에서 가상으로 구현된 뒤 MIDI뼟 거치면서 성능은 점점 떨어집니다. + - MPU-401 + MIDI Passthrough 인터페이스 또한 가상으로 구현됩니다. + 이 소리의 출력 방식은 일반 MIDI나 MT-32 장치와 함께 사용될 때에만 동작합니다. + +물음 : DOSBox뼟 실행하자마자 충돌합니다. +풀이 : DOSBox 때문에 문제가 비롯된 게 아닙니다. + SDL_AUDIODRIVER 환경 변수를 alsa 또는 oss로 설정해 보십시오. + + +물음: 설명이 잘 나와 있으나 그래도 잘 모르겠습니다. +풀이: 친숙하지 않다면 그럴 수도 있습니다. + "The Newbie's pictorial guide to DOSBox" (초보자를 위한 DOSBox로의 ꡸댟 안내)가 + http://vogons.zetafleet.com/viewforum.php?f=39 에 옏려져 있습니다. 많은 도움이 될 것입니다. + DOSBox의 위키도 들어가 보십시오 : http://dosbox.sourceforge.net/wiki/ + + +더 많은 물음을 보려늴 +README에 있는 것을 읽어 보시거나 아래의 사이트 또는 모임에 들어가 보십시오: +http://dosbox.sourceforge.net + + + + +================ +3. 사용 방법 +================ + +DOSBox가 가질 수 명령 줄 옵션이 아래에 추려져 있습니다. +Windows뼟 쓰고 있는 누구나 cmd.exe 또는 command.com뼟 열거나 +DOSBox.exe에 대한 바로가기를 수정하여 아래의 항목을 지정할 수 있습니다. +프롬프트에서 HELP라고 입력하면 내부 명령어들을 하나씩 보여 줍니다. +이 옵션들은 특별한 말이 없는 한 모든 운영체제에서 돌아갑니다. + +dosbox [이름] [-exit] [-c 명령어] [-fullscreen] [-conf 설정구성파일] + [-lang 언어파일] [-machine 기기 종류] [-noconsole] + [-startmapper] [-noautoexec] [-scaler 스케일러] [-forcescaler 스케일러] + +dosbox -version + + 이름 + "이름"이 디렉터리라면, C 드라이브로 마운트합니다 + "이름"이 실행 파일이라면, C 드라이브의 "이름"이 있는 디렉터리를 마운트합니다 + + -exit + "이름"의 실행이 끝나면 DOSBox는 바로 닫힙니다. + + -c 명령어 + "이름"이 실행되기 전에 지정된 명령어를 먼저 실행합니다. 여러 개의 명령어들을 한꺼번에 + 지정할 수도 있습니다. 그러나 명령어마다 앞에 -c뼟 붙여야 합니다. + 내부 프로그램, DOS 명령어, 아니면 마운트된 드라이브의 실행 파일이 명령어가 될 수 있습니다. + + -fullscreen + DOSBox뼟 전체 화면 모드로 실행합니다. + + -conf 설정구성파일 + "설정구성파일" 안에 지정된 선택 내용에 따라 DOSBox뼟 실행합니다. + -conf 옵션을 여러 개 지정해서도 사용할 수 있습니다. 더 자세한 정보는 11번째 구문에 있습니다. + + -lang 언어파일 + "언어파일" 안에 지정된 언어 문자열을 사용하여 DOSBox뼟 실행합니다. + + -machine 기기 종류 + DOSBox가 원하는 종류의 기기뼟 가상으로 구현해 낼 수 있게 합니다. + 사용할 수 있는 기기 종류는 : hercules, cga, tandy, pcjr, vga (기본값) 입니다. + 기기 종류는 그래픽 카드와 이에 따른 사운드 카드 둘 다 영향을 미칩니다. + + -noconsole (Windows 운영체제만) + 콘솔 창을 보이지 않고 DOSBox뼟 실행합니다. stdout.txt 와 stderr.txt 로 대신 출력합니다. + + -startmapper + 실행하자마자 곧바로 키보드/조이스틱 매핑 프로그램을 띄웁니다. + 키보드나 조이스틱에 문제가 있을 때 쓰시기 바랍니다. + + -noautoexec + 자동 일괄 실행(AUTOEXEC - DOSBox.Conf의 [autoexec] 꾏돸)을 사용하지 않습니다. + + -scaler 스케일러 이름 + "스케일러 이름"으로 지정된 스케일러를 사용합니다. 이 기능을 쓰려면 먼저 DOSBox 설정 구성 파일을 + 열어서 어떠한 스케일러들을 사용할 수 있는지 살펴 보십시오. + + -forcescaler 스케일러 이름 + 위의 -scaler 변수와 비슷합니다. 다만 지정된 스케일러가 화면 크기에 알맞게 들어맞지 않는 등 어떠한 경우가 + 있다 하더라도 돴쥰깴 사용하도록 합니다. + + -version + 버전 정보를 보여주고 끝냅니다. 프론트엔드를 쓸 때 유용합니다. + +알림 : 이름/명령어/설정구성파일/언어파일에 뚈 칸이 들어 있으면 + 모든 항목들(이름/명령어/설정구성파일/언어파일)마다 큰 따옴표를 넣으십시오. + ("명령 또는 파일 이름"). + 따옴표 안에 따옴표를 넣고 싶으시면 (흔히 -c와 마운트 방식이 뒷따름) + Windows와 OS/2 사용자들은 큰 따옴표(") 안에 작은 따옴표(')뼟 넣으십시오. + 다른 운영체제를 쓰시는 분들은 \뼟 대신 쓰면 됩니다. + Windows: -c "mount c 'c:\program files\'" + Linux: -c "mount c \"/tmp/뚈 칸이 들어간 이름\"" + +보기 : + +dosbox c:ďźźatlantisďźźatlantis.exe -c "MOUNT D C:ďźźSAVES" + 이것은 c:ďźźatlantis뼟 c:\으로 마운트시키고 ATLANTIS.EXE 파일을 실행합니다. + 이에 앞서 먼저 C:ďźźSAVES 는 D 드라이브로 마운트합니다. + +Windows에서는 디렉터리나 파일을 DOSBox 실행 파일로 끌어 놓올 수 있습니다. + + + +================ +4. 내부 프로그램 +================ + +DOSBox는 command.com에서 찾을 수 있는 DOS 명령어들 가운데 많은 수뼟 지원합니다. +꡸ 밖에 다음의 명령어들도 사용할 수 있습니다: + +MOUNT "가상으로 쓰려는 드라이브 문자" "실제 드라이브 문자:\ 또는 디렉터리" + [-t 종류] [-aspi] [-ioctl] [-noioctl] [-usecd 숫자] [-size 드라이브 큏기] + [-label 드라이브 이름] [-freesize 큏기(MB)] [-freesize 큏기(KB : 플로피)] + +MOUNT -cd + +MOUNT -u "가상 드라이브를 헤제할 문자" + + 로컬 디렉터리들이 DOSBox 안에서 드라이브로 인식합니다. + + "가상으로 쓰려는 드라이브 문자" + → DOSBox 안의 드라이브 문자 (보기 : mount c c:\의 c) + + "실제 드라이브 문자:\ 또는 디렉터리" + → DOSBox 안에서 사용할 로컬 디렉터리 + (Win32의 경우 "가상 구현된 드라이브 문자"와 같습니다. + 보기 : mount c c:\의 c:ďźź) + + -t 종류 + → 마운트되는 디렉터리의 종류 - 'dir (기본값), floppy, cdrom' 중 하나를 고뼟 수 있습니다 + (보기 : mount d -t cdrom d:ďźź) + + -size 드라이브 큏기 + → 드라이브의 큏기뼟 지정합니다. 여기서 형식은 "bps, spc, tcl, fcl"이 있습니다. + bps: bytes per psector(섹터 당 바이트). CD-ROM 드라이브에서는 2048이며, ꡸ 밖에는 512가 기본입니다. + spc: sectors per cluster(클러스터 당 섹터). 보통 1에서 127까지 쓸 수 있습니다. + tcl: total clusters(모든 클러스터). 1에서 65534까지 쓸 수 있습니다. + fcl: total free clusters(남아 있는 클러스터). 1에서 tcl 값까지 쓸 수 있습니다. + + -freesize 큏기 (단위 : MB | KB) + → 드라이브에서 사용할 수 있는 여유 공간의 큏기뼟 설정합니다. 단위는 일반 드라이브에서 MB(메가바이트)이며 + 플로피 드라이브에서는 KB(킬로바이트)입니다. + -size 보다 더 간단하게 사용할 수 있습니다. + + -label 드라이브 이름 (레이블) + → 드라이브의 이름을 지정합니다. 프로그램이나 게임이 CD-ROM의 이름을 읽어내지 못할 때 사용하십시오. + 레이블을 지정하지 않거나 낮은 수준의 지원을 사용하지 않을 때 (-usecd # 및 -ioctl/aspi뼟 사용하지 않거나 -noioctl뼟 지정할 때) + * Win32에서 : 기본적으로 "실제 드라이브"의 레이블을 가져옵니다. + * Linux에서 : 기본적으로 NO_LABEL (레이블 없음)으로 설정합니다. + + 마운트가 된 뒤에는 레이블 이름을 따로 바꿀 수 없습니다. + + -aspi + → ASPI 레이어를 강제로 사용합니다. + ASPI 레이어를 사용하는 Windows 시스템에서만 이 옵션으로 마운트하실 수 있습니다. + + -ioctl + → ioctl 명령어를 강제로 사용합니다. Windows NT/2000/XP/2003/Vista 이상에서만 사용하십시오. + + -noioctl + → SDL CD-ROM 레이어를 강제로 사용합니다. 모든 시스템에서 쓸 수 있습니다. + + -usecd 숫자 + → 이것을 사용하기 전에 mount -cd 라고 입력해서 CD-ROM에 맞는 숫자를 미댏 살펴 보십시오. + 이것을 통해 CD-ROM의 숫자를 정할 수 있습니다. 모든 시스템에서 사용할 수 있습니다. + + -cd + → CD-ROM의 실제 번호와 드라이브를 보여줍니다. -usecd뼟 사용할 때 참고하십시오. + + -u + → 마운트했던 드라이브의 마운트를 해제합니다. + Z:\에서는 동작하지 않습니다. + + 알림 : 로컬 디렉터리를 CD-ROM 드라이브로 마운트할 수는 있습니다. 그러나 + 하드웨어 지원을 제대로 받지 못할 수도 있습니다. + + MOUNT는 기본적으로 여러분이 가지고 있는 실제 하드웨어를 DOSBox의 가상 컴퓨터에 + 연결할 수 있도록 도와 줍니다. MOUNT C C:\은 DOSBox가 여러분의 실제 C 드라이브를 + DOSBox의 C 드라이브로 연결할 수 있게 해 줍니다. 또한 어떠한 프로그램에 맞추어 + 드라이브의 문자열을 바꿀 수도 있습니다. + + 보기 : Touche: Adventures of the Fifth Musketeer는 C 드라이브에서 실행해야 합니다. + DOSBox에서 마운트 명령어를 사용하면 원하는 위치의 드라이브나 폴더를 C 드라이브로 + 속일 수 있습니다. 예뼟 들어, 게임이 D:\TOUCHE에 있다면 MOUNT C D:\ 명령어를 + 사용하여 D 드라이브에서 Touche뼟 실행할 수 있습니다. + + 'MOUNT C C:\'와 같이 C 드라이브를 통째로 마운트하지 않는 것이 좋습니다! + 사용자나 DOSBox는 잘못하여 사용자가 가지고 있던 파일을 모두 날려 버릴 수도 있습니다. + 응용 프로그램이나 게임을 담고 있는 하위 디렉터리를 마운트하시기 바랍니다. + + MOUNT 일반 보기 : + 1. C:\DirX뼟 플로피 드라이브로 마운트 : + mount a c:\DirX -t floppy + 2. 시스템의 CD-ROM 드라이브 E뼟 DOSBox에서 D 드라이브로 마운트 : + mount d e:\ -t cdrom + 3. /media/cdrom 위치의 시스템 CD-ROM 드라이브를 DOSBox에서 D 드라이브로 마운트 : + mount d /media/cdrom -t cdrom -usecd 0 + 4. 디스크 공간이 ~870MB가 남아 있는 드라이브 마운트 (간단 버전): + mount c d:\ -freesize 870 + 5. 디스크 공간이 ~870MB가 남아 있는 드라이브 마운트 (고급 사용자만 쓸 것, 완전한 제어): + mount c d:\ -size 512,127,16513,13500 + 6. DOSBox에서 /home/user/dirY 뼟 드라이브로 마운트 : + mount c /home/user/dirY + 7. DOSBox가 설치된 디렉터리를 DOSBox에서 D로 마운트 : + mount d . + +MEM + 메모리가 얼만큼 남아 있는지 보여주는 프로그램입니다. + +CONFIG [-writeconf] 로컬 파일 +CONFIG [-writelang] 로컬 파일 +CONFIG -set "섹션 속성=값" +CONFIG -get "섹션 속성" + + CONFIG뼟 쓰면 DOSBox뼟 실행하는 동안 갖가지 설정 값을 바꿀 수 있습니다. + 지정해 둔 설정과 언어 문자열을 디스크에 저장할 수 있습니다. + 사용할 수 있는 모든 꾏돸곟 속성에 대한 정보를 보려늴 9번 항목 (설정 구성 파일)을 읽어 보십시오. + + -writeconf 로컬 파일 + 현재의 구성을 파일에 기록합니다. + "로컬 파일"은 DOSBox가 있는 실제 드라이브에 있습니다. (DOSBox에서 마운트한 드라이브에 있지 않습니다) + 설정 구성 파일은 DOSBox의 여러 설정을 제어합니다 : + 가상으로 구현된 메모리의 큏기, 가상으로 구현된 사운드 카드 밖의 설정들. + AUTOEXEC.BAT에도 접근할 수 있습니다. + 더 자세한 정보를 보려늴 11번 항목 (설정 구성 파일)에서 찾으실 수 있습니다. + + -writelang 로컬 파일 + 현재의 언어 설정을 파일에 기록합니다. + "로컬 파일"은 DOSBox가 있는 실제 드라이브에 있습니다. (DOSBox에서 마운트한 드라이브에 있지 않습니다) + 언어 파일은 내부 명령어와 내부 DOS에서 눈에 보이는 모든 출력 문자열을 제어합니다. + + -set "꾏돸 속성=값" + 속성을 새로운 값으로 설정합니다. + 이 때 CONFIG는 명령이 제대로 받아들여졌는지 알려 주지 않습니다. + + -get "꾏돸 속성" + 속성에 들어있는 값을 알려 죟늰 %CONFIG% 환경 변수에 저장됩니다. + 일괄(배욘) 파일을 사용하여 값을 저장할 때 쓰시면 됩니다. + + "-set"와 "-get" 둘 다 일괄(bat) 파일에 넣을 수 있으며 게임마다 설정을 다르게 하여 쓸 수 있습니다. + + 보기 : + 1. 현재의 디렉터리에 설정 구성 파일을 만들기: + config -writeconf dosbox.conf + 2. CPU 사이클 값을 10000으로 놓기: + config -set "cpu cycles=1000" + 3. EMS 메모리 가상 구현을 끄기: + config -set "dos ems=false" + 4. 어떤 CPU 코어가 쓰이고 있는지 알아 보기: + config -get "cpu core" + + + +LOADFIX [-큏기] [프로그램] [프로그램 매개변수] +LOADFIX -f + + 메모리를 잡아먹게 합니다. + 오래된 프로그램들이 너무 많은 메모리를 알아채지 못할 때가 있는데 이럴 때 쓰면 좋습니다. + + -큏기 + 메모리를 차지할 KB 수, 기본값 = 64kb + -f + 이전에 할당했던 모든 메모리를 되돌립니다 + + +보기: + 1. 64KB 메모리를 할당하여 MM2.EXE뼟 실행할 때 : + loadfix mm2 + 2. 32KB 메모리를 할당하여 MM2.EXE뼟 실행할 때 : + loadfix -32 mm2 + 3. 이전에 할당한 모든 메모리 볾꾏 : + loadfix -f + + +RESCAN +DOSBox 드라이브의 캐시를 다시 불러 들입니다. +실행하고 나서 Drive cache cleared라고 뜨면 정상입니다. Ctrl-F4 키를 누르셔도 이 기능이 동작합니다. + +DOSBox에서 마운트를 한 다음 Windows에서 폴더나 파일을 수정하거나 이름을 바꾸었다면, +DOSBox에서는 이 명령어를 사용하여 바뀐 디렉터리의 꾏쥰뼟 다시 읽어 들입니다. + + +MIXER + DOSBox가 현재의 소리 큏기 설정을 보여 줍니다. + 이 설정을 바꾸실 수 있는 방법은 다음과 같습니다: + + mixer 채널 왼쪽:오뼸쪽 [/NOSHOW] [/LISTMIDI] + + 채널 + 다음 중 하나를 고뼟 수 있습니다: MASTER, DISNEY, SPKR, GUS, SB, FM. + + 왼쪽:오뼸쪽 + 소리 큏기뼟 % 로 보여 줍니다. 앞에 D 뼟 놓으면 데시벨(deciBell)로 보여 줍니다 + 보기) mixer gus d-10 + + /NOSHOW + 소리 큏기 수준에서 하나를 설정한다면 DOSBox가 결곟뼟 보여 주지 않게 합니다. + + /LISTMIDI + PC(Windows)에서 사용할 수 있는 미디 장치를 나열합니다. + Windows 기본 미디 매퍼 뿐만 아니라 다른 장치도 고뼴려늴 + 설정 구성 파일 안에 'config=id' 줄을 추가하여 [midi] 구문에다 추가하십시오. + 여기서 나오는 id는 LISTMIDI의 목록에 나온 장치의 개수를 뜻합니다. + + +IMGMOUNT +DOSBox에서 디스크 이미지와 CD-ROM 이미지를 마운트할 때 쓰이는 유틸리티입니다. + +IMGMOUNT 드라이브 [이미지 파일] -t [이미지 종류] -fs [이미지 형식] + -size [섹터 바이트 큏기, 헤드 당 섹터 수, 헤드 수, 실린더 수] + + 이미지 파일 + DOSBox에서 마운트하려는 이미지 파일의 위치입니다. + 이 위치는 DOSBox 안에서 마운트된 드라이브나 실제 디스크에 놓일 수 있습니다. + CD-ROM 이미지 (ISO 또는 CUE/BIN) 또한 마운트할 수 있습니다. + CD 바꾸기 기능을 사용하고 싶으시면 모든 이미지를 여러 개로 이어서 지정하십시오. + CD들은 어느 때나 CTRL-F4키를 누르면 바꿀 수 있습니다. + + -t [이미지 종류] + 다음의 3가지 이미지 종류 중 하나를 고뼟 수 있습니다: + floppy + 플로피 이미지, 일반 이미지를 지정합니다. + DOSBox는 자동으로 디스크 용량을 알아냅니다 (보기 : 360K 1.2MB, 720K, 1.44MB, 등) + iso + CD-ROM의 ISO 이미지를 지정합니다. 용량은 알아서 인식하여 해당 크기로 설정합니다. + ISO, CUE/BIN을 사용할 수 있습니다. + hdd + 하드 드라이브 이미지를 지정합니다. 알맞은 CHS 용량이 설정되어야 이 옵션이 동작합니다. + + -fs [이미지 형식] + 다음의 파일 시스템 형식을 사용할 수 있습니다: + iso + ISO 9660 CD-ROM 포맷을 사용합니다. + fat + 이미지를 파일 할당 테이블(FAT) 파일 시스템으로 사용합니다. + DOSBox는 해당 이미지를 DOSBox의 드라이브로 인식하며 DOSBox 안에서 파일들을 사용할 수 있습니다. + none + DOSBox가 디스크의 파일 시스템을 읽어들이지 않습니다. + 포맷해야 하거나, BOOT 명령어를 사용하여 디스크를 시동해야 할 때 쓸모 있습니다. + "none" 파일 시스템을 사용할 때 드라이브 문자가 아닌 드라이브 숫자를 지정해야 합니다 + (2 또는 3) → 2는 마스터, 3은 슬레이브 + 예뼟 들어, 70MB 이미지를 슬레이브 드라이브 장치로 마운트하고자 한다면, 이렇게 입력하십시오: + "imgmount 3 d:\test.img -size 512,63,16,142 -fs none" + DOSBox의 드라이브로 읽어들이려면: + "imgmount e: d:\test.img -size 512,63,16,142" + + -size [섹터바이트 큏기, 헤드 당 섹터 수, 헤드 수, 실린더 수] + 실린더, 헤더, 섹터를 드라이브에 맞게 지정합니다. + 하드 드라이브 이미지를 마운트할 때 필요합니다. + + CD-ROM 이미지의 본보기 : + 1-가. mount c /tmp + 1-나. imgmount d c:\myiso.iso -t iso + 또는 (이것도 동작함): + 2. imgmount d /tmp/myiso.iso -t iso + + +BOOT + BOOT는 플로피 이미지나 하드 드라이브 이미지가 DOSBox뼟 깰쳐 운영 체제 에뮬레이션을 독립적으로 수행하게 합니다. + 시동 플로피 디스크로 사용하거나 DOSBox 안에서 다른 운영체제로 시동할 수 있게 합니다. + 가상으로 구현되는 시스템이 PCJr이라면(machine=pcjr) BOOT 명령어로 PCJr 카트리지(.jrc)뼟 불러올 수 있습니다. + + BOOT [디스크이미지1.img 디스크이미지2.img … 디스크이미지N.img] [-l 드라이브 문자열] + BOOT [cart.jrc] (PCJr 전용) b + + diskimgN.img (N은 숫자) + 지정된 드라이브 문자열로 DOSBox가 시동한 뒤에 마운트하고자 하는 플로피 디스크의 이미지의 수뼟 지정할 수 있습니다. + 이미지를 넘기려면, CTRL-F4 키를 눌러 현재의 디스크를 빠져나오게 하고 목록에서 다음 디스크로 넘겨 주십시오. + 목록에서 마지막 디스크가 다 끝나면, 목록은 처음으로 다시 되돌아갑니다. + + - 알면 좋은 정보! + 내가 좋아하는 게임 정품이 디스켓이 3장 있다고 칩시다. + 게임을 설치하다가 '두 번째 디스켓을 넣으라', '세 번째 디스켓을 넣으라'할 때가 있을 것입니다. + 이 때 첍 번째 디스켓이 끝나면 CTRL-F4 키를 눌러 두 번째 디스켓으로 넘기게 하면 되고, + '세 번째 디스켓을 넣으라'라고 뜨면 또 다시 CTRL-F4 키를 눌러 세 번째 디스켓으로 넘기면 됩니다. + + [-l 드라이브 문자열] + 시동할 드라이브를 지정하는 매개 변수입니다. 플로피 드라이브는 기본값으로 A 드라이브입니다. + 하드 드라이브 이미지를 마스터로 시동하려면 "-l C"라고 지정하십시오. + 아니면 "-l D"로 지정하여 하드 드라이브 이미지를 슬레이브로 지정할 수도 있습니다. + + cart.jrc (PCJr 전용) + PCJr의 가상 구현이 켜져 있다면 카트리지는 BOOT 명령어를 써서 불러들일 수 있습니다. + 완전하게 지원하지는 않습니다. + + + +IPX + + DOSBox의 설정 구성 파일에서 IPX 네트워크가 켜져 있어야 합니다. + + 내부 DOSBox 프로그램인 IPXNET은 모든 방식의 IPX 네트워크를 관리합니다. + IPXNET HELP라고 입력하면 명령어들과 관련 문서를 나열하면서 + DOSBox 내부 IPX 네트워크의 도움말을 보여줍니다. + + 실제로 통신망을 설정하려면, 한쪽의 시스템은 서버가 되어야 합니다. + 이것을 설정하려면, DOSBox 구문에서 IPXNET STARTSERVER뼟 입력하십시오. + 서버 DOSBox 세션은 알아서 ꡸ 자체가 가상 IPX 네트워크에 추가됩니다. + 다시 말해, 가상 IPX 네트워크의 일부가 되어야 하는 다른 모든 컴퓨터에 맞게, + IPXNET CONNECT <컴퓨터 호스트 이름 또는 IP>뼟 입력해야 합니다. + 예뼟 들어, 서버가 bob.dosbox.com에 있다면, 서버가 아닌 시스템 쪽에서 + IPXNET CONNECT bob.dosbox.com이라고 입력하십시오. + + Netbios가 필요한 게임을 돌리려면 노벨(Novell)사의 NETBIOS.EXE가 필요합니다. + 위에서 말했던 IPX에 연결하려면 "netbios.exe"뼟 실행하십시오. + + 아래에 IPXNET 명령어 참조가 나와 있습니다: + + → IPXNET CONNECT + IPXNET CONNECT 다른 DOSBox 세션에서 실행되고 있는 IPX Tunneling 서버로 연결합니다. + + "주소" 매개 변수는 IP 주소나 서버 컴퓨터의 호스트 이름을 지정합니다. 사용할 UDP 포트도 지정할 수 있습니다. + 기본값으로 IPXNET는 213 포트, IPX Tunneling용으로 할당된 IANA 포트를 연결할 때 사용합니다. + + ※ IPX CONNET 구문은 ▼ + IPXNET CONNECT 주소 <포트> + + → IPXNET DISCONNECT + IPXNET DISCONNECT는 IPX Tunneling 서버와의 연결을 끊습니다. + + ※ IPXNET DISCONNECT의 구문은 ▼ + IPXNET DISCONNECT + + → IPXNET STARTSERVER + IPXNET STARTSERVER뼟 시작하면 IPX Tunneling 서버는 DOSBox 세션에 있게 됩니다. + 기본으로 서버가 바뀌어도 이 서버는 UDP 포트 213의 연결을 받아들입니다. + 서버가 시작되면, DOSBox는 자동으로 IPX Tunneling 서버에 클라이언트 연결을 시작합니다. + + ※ IPXNET STARTSERVER의 구문은 ▼ + IPXNET STARTSERVER <포트> + + 서버가 라우터 뒤에 있다면, UDP 포트 <포트>는 ꡸ 서버 컴퓨터에서 먼저 포워드되어야 합니다. + + 리눅스/유닉스 기반의 시스템에서는 1023보다 더 작은 값의 포트 번호는 루트 권한으로만 쓰일 수 있습니다. + 따라서 이러한 시스템을 쓰신다면 1023보다 더 큰 값으로 포트 번호뼟 지정하십시오. + + → IPXNET STOPSERVER + + IPXNET STOPSERVER 는 IPX Tunneling 서버를 이 DOSBox 세션에서 중지합니다. + 다른 연결들이 모두 종료되었는지 미댏 살펴 보아야 합니다. + 왜냐하면 서버를 중지해도 다른 컴퓨터가 IPX Tunneling 서버를 여전히 사용할 수 있기 때문입니다. + + ※ IPXNET STOPSERVER의 구문은 ▼ + IPXNET STOPSERVER + + → IPXNET PING + + IPXNET PING 은 Ping 요청을 IPX Tunneled 통신망을 통해 전송합니다. + 응답할 때에는 연결된 다른 모든 컴퓨터들이 Ping에 응답할 것이고 Ping 메시지를 죟고 받는 데 + 시간이 얼만큼 걸렸는지 알려 줍니다. + + ※ IPXNET PING의 구문은 ▼ + IPXNET PING + + → IPXNET STATUS + + IPXNET STATUS 는 DOSBox 세션의 현재 상태를 IPX Tunneling 네트워크에 알려 줍니다. + 네트워크로 연결된 컴퓨터의 목록을 보려늴 IPXNET PING 명령어를 사용하십시오. + + ※ IPXNET STATUS의 구문은 ▼ + IPXNET STATUS + + + +KEYB [언어 코드 [코드 페이지 [코드 페이지 파일]]] + 키보드 레이아웃을 바꿉니다. 키보드 레이아웃에 대한 더 자세한 정보를 보려늴 + 꾏돸 7번을 읽어 보십시오. + + [언어 코드] + 두 개의 특별한 케이스의 문자열들을 이루는 문자열입니다. + 이러한 문자열들은 GK (그리스)나 IT (이탈리아)와 같습니다. + 이것은 키보드 레이아웃을 결정합니다. + + [코드 페이지] + 코드 페이지의 숫자입니다. + 키보드 레이아웃은 지정된 코드 페이지에 대한 지원을 제공해야 합니다. + 숫자가 올바르지 않다면 레이아웃을 불러올 수 없습니다. + 코드 페이지가 지정되지 않으면 요청된 레이아웃에 대한 올바른 코드 페이지가 + 알아서 지정됩니다. + + [코드 페이지 파일] + DOSBox 안에 기본적으로 들어있지 않은 코드 페이지를 불러올 때 쓰입니다. + DOSBox가 코드 페이지를 찾을 수 없을 때에만 사용할 수 있습니다. + + + 보기 : + 1) 독일어 키보드 레이아웃을 읽어 들이려면 (코드 페이지 858이 알아서 주어집니다): + keyb gr + 2) 코드 페이지 866을 가진 러시아어 키보드 레이아웃을 읽어 들이려면: + keyb ru 866 + 러시아어 문자열을 입력하려면 ALT-RIGHT-SHIFT뼟 누르십시오. + 3) 코드 페이지 850을 가진 프랑스어 키보드 레이아웃을 읽어 들이려면 + (코드 페이지의 위치는 EGACPI.DAT 안에 정의되어 있습니다): + keyb fr 850 EGACPI.DAT + 4) 코드 페이지 858을 읽어 들이려면 (키보드 레이아웃 없이): + keyb none 858 + freedos keyb2 유틸리티를 사용해서 코드 페이지를 바꿀 수도 있습니다. + + + +더 자세한 정보를 보려늴 프로그램의 매개 변수에 /? 명령어를 사용하십시오. + +================ +5. 바로가는 키: +================ + +ALT-ENTER 전체 화면에서 ě°˝ / 창에서 전체 화면 +ALT-PAUSE 잠깐 늈윤 +CTRL-F1 키보드 키나 조이스틱 단추를 매핑하는 프로그램 보기 +CTRL-F4 드라이브 캐시를 다시 불러오기, 마운트된 여러 개의 디스크 이미지들을 순환 +CTRL-ALT-F5 화면의 동영상 녹화 실행 / 중지 (AVI) +CTRL-F5 스크린샷 저장 (PNG) +CTRL-F6 소리 출력을 웨이브(WAV) 파일로 기록 / 중지 +CTRL-ALT-F7 OPL 녹음 명령 실행 / 중지 +CTRL-ALT-F8 MIDI 녹음 명령 실행 / 중지 +CTRL-F7 프레임 무시 줄임 +CTRL-F8 프레임 무시 높임 +CTRL-F9 DOSBox 끝내기 +CTRL-F10 마우스 잠금 / 잠금 풀기 +CTRL-F11 가상 구현 느리게 (사이클 줄임) +CTRL-F12 가상 구현 빠르게 (사이클 늘림) +ALT-F12 속도 제한 해제 (터보 단추) + +이것은 기본적인 키보드 조합입니다. 매핑 프로그램(Ctrl-F1)에서 바꿀 수 있습니다. + +저장된 파일들은 "현재의 디렉터리/CAPTURE"에서 찾을 수 있습니다. +(configfile에서 이 폴더의 위치를 바꿀 수도 있습니다). +DOSBox가 실행되기 전에 CAPTURE 디렉터리가 반드시 있어야 하며 +없으면 파일이 저장되지 않습니다. + + +알림 : Ctrl-F12 키를 너무 많이 눌러서, 또는 DOSBox.Conf의 [cpu]의 cycles 값을 너무 큰 값으로 + 지정하여 여러분이 가지고 있는 컴퓨터의 최대 성능의 한도를 넘어가버리면, + 오히려 에뮬레이션의 속도를 떨어뜨릴 수 있습니다. + 이 CPU 사이클 속도의 알맞은 값은 컴퓨터마다 다르며 표준으로 잡혀있지 않습니다. + + + +============= +6. 매퍼: +============= + +DOSBox 매핑 프로그램을 시작할 때 (Ctrl-F1 키 또는 명령 줄 매개변수에다 -startmapper뼟 추가하여) +가상 키보드와 가상 조이스틱을 지정할 수 있습니다. + +이러한 가상 장치들은 DOSBox에서 쓰이는 키와 일치하며 DOS 응용 프로그램에 보고합니다. +마우스로 키를 누르면 왼쪽 아래 모서리에서 키보드의 어떠한 키가 ꡸ 키와 +일치하는지를 ëłź 수 있습니다. + +Event: EVENT +BIND: BIND + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENT + DOSBox에서 실행하고 있는 응용 프로그램에 보고할 해당 키나 조이스틱의 축/단추/햇 + +BIND + EVENT와 연결된 사용자의 실제 키보드의 키 또는 실제 조이스틱의 축/단추/햇 + (SDL이 보고합니다) + +mod1,2,3 + 수정 키들입니다. BIND뼟 누르는 동안 눌러야 하는 키들입니다. + mod1 = CTRL 이고 mod2 = ALT 입니다. + 일반적으로 여러분이 DOSBox의 단축키를 바꾸고자 할 때 사용하시면 됩니다. +Add + 이 EVENT에 새로운 BIND뼟 추가합니다. + 기본적으로 DOSBox에서 EVENT 키를 만들어내는 '사용자의 키보드' 에서 키를, + 또는 '조이스틱의 단추 눌림, 축/햇 이동' 이벤트를 추가합니다. +Del + BIND뼟 이 EVENT로 삭제합니다. + EVENT가 BINDS뼟 가지고 있지 않으면 DOSBox에서 이 이벤트를 입력할 수 없습니다. + 다시 말해, 키를 입력하거나 조이스틱을 동작시킬 수 없습니다. +Next + 이 EVENT로 매핑된 BINDS들의 목록을 통해 계속 반복됩니다. + + + +* 보기 +물음1. DOSBox에서 Z뼟 입력하면 X로 뜨게 하고 싶습니다.. +풀이. 마우스로 키보드 매퍼에 있는 Z뼟 누르십시오. ꡸댏고 "Add"뼟 누르십시오. + 그런 다음에 키보드에서 X 키를 누르십시오. + +물음2. "Next"뼟 두 번 누른다면 여러분이 키보드의 Z뼟 입력할 때 DOSBox에서 Z가 입력되는 것을 알 수 있습니다. +풀이. 그러므로 다시 Z뼟 누르고 키보드에서 Z뼟 사용할 수 있을 때까지 "Next"뼟 누르십시오. + 이제 "Del"을 누르십시오. + +물음3. DOSBox에서 입력하고자 할 때, 여러분은 X뼟 누르면 ZX로 뜨는 것을 ëłź 수 있습니다. +풀이. 키보드 상의 X는 여전히 X로 매핑이 되어 있습니다! + 키보드 매퍼의 X뼟 누른 뒤, 매핑된 키 X뼟 찾을 때까지 "Next"로 계속 찾아 보십시오. + ꡸댏고 "Del"키를 누르십시오. + +조이스틱 매핑 보기: + 조이스틱이 장착되어 있고 DOSBox에서 제대로 동작하며 몇 가지 키보드 전용 게임을 조이스틱으로 + 쌐기고 싶다고 칩시다. (게임이 키보드의 방향키로 제어된다고 가정할 때) + + 1) 매핑 프로그램을 열고 화면 왼쪽 부분의 가운데에 있는 방향키들 가운데 하나를 + 누르십시오 (Mod1/Mod2 단추들 바로 위에 있음) + EVENT는 key_left가 되어야 합니다. 이제 Add뼟 누르고 각 방향으로 + 조이스틱을 움직이십시오. 이것은 이벤트를 BIND에 추가하는 방법입니다. + 2) 매핑하지 않았던 나머지 방향 단추를 또한 추가해야 하므로 + 위의 방법을 되풀이 하십시오. 조이스틱의 단추(Fire/Jump)도 돟률 매핑할 수 있습니다. + 3) Save뼟 누르고 Exit을 눌러 게임을 실행하십시오. + + 몇몇 비행 시뮬레이션 게임들이 조이스틱의 위/아래 이동이 여러분이 좋아하지 않는 + 방식을 사용하기 때문에, 또 게임 자체에서 구성할 수 없기 때문에 + 조이스틱의 y축을 바꾸고 싶다고 칩시다. + + 1) 매핑 프로그램을 열고 위쪽 조이스틱 영역 안에 있는 Y-(2개의 조이스틱이 장착되어 있다면 + 첍 번째 조이스틱에 해당합니다) 또는 아래의 조이스틱 영역 (보통 두 번째 조이스틱을 + 말하며, 조이스틱이 하나만 장착되었다면 두 번째 축 크로스[십자]에 해당합니다)을 누르십시오. + EVENT는 jaxis_0_1- (또는 jaxis_1_1-)가 되어야 합니다. + 2) Del을 눌러 현재의 Bind뼟 지웁니다. ꡸댏고 Add뼟 누르고 조이스틱을 아래로 이동합니다. + 새로운 Bind가 만들어졌습니다. + 3) Y+에 맞춰서 이 방법을 되풀이하십시오. + ꡸댏고 레이아웃을 저장하고 게임을 실행하십시오. + + +"Save"뼟 눌러서 기본 키보드/조이스틱 매핑에서 사용자가 변경한 사항들을 따로 저장할 수 있습니다. + +DOSBox는 보통 DOSBox.Conf에 지정된 위치를 mapperfile=mapper.txt 로 잡고 있습니다. +(즉, 위의 값을 사용자가 수정하면 ꡸ 수정했던 내용을 mapper.txt 파일로 저장한다는 뜻입니다) +DOSBox뼟 시작하면 DOSBox.Conf 안에 있는 mapperfile= 뒤에 지정된 파일의 내용을 불러옵니다. + + +==================== +7. 키보드 레이아웃 +==================== + +다른 키보드 레이아웃으로 바꾸려면 DOSBox.Conf 안에 있는 [dos] 구문에 있는 +"keyboardlayout"의 값을 바꾸거나 DOSBox 내부 프로그램인 keyb.com을 이용하십시오. +두 방법 모두 DOS 호환 언어 코드를 가져 옵니다. (아래에 나와 있습니다) +다만 코드 페이지는 keyb.com로만 바꿀 수 있습니다. + +레이아웃 바꾸기 + 수 많은 키보드 레이아웃과 코드 페이지를 기본으로 지원합니다. + 이 때 DOSBox는 레이아웃 검색자가 지정되어야 합니다. + (보기 : DOSBox 설정 구성 파일에서 keyboardlayout=sv 지정 + 또는 DOSBox 명령 프롬프트에서 "keyb sv"라고 입력) + + 몇몇 키보드 레이아웃들(예뼟 들어 레이아웃 GK 코드 페이지 869와 레이아웃 RU + 코드 페이지 808)은 이중 레이아웃을 지원합니다. 이 기능은 왼쪽 ALT-오뼸쪽 SHIFT뼟 + 눌러서 켜거나 왼쪽 ALT-왼쪽-SHIFT로 끌 수 있습니다. + +지원하는 외부 파일 + Freedos .kl 파일들(freedos keyb2 키보드 레이아웃 파일)을 비롯하여 + 사용할 수 있는 .kl 파일로 구성되어 있는 Freedos keyboard.sys/keybrd2.sys/keybrd3.sys + 라이브러리를 지원합니다. + DOSBox에 내장된 레이아웃이 어떠한 까닭으로 동작하지 않으면 + http://projects.freedos.net/keyb/ 에서 미댏 컴파일된 키보드 레이아웃을 살펴 보시기 바랍니다. + + .CPI (MSDOS 호환 코드 페이지 파일)ęłź .CPX (UPX로 압축된 Freedos 코드 페이지 파일) + 둘 다 쓸 수 있습니다. 몇몇의 코드 페이지는 DOSBox에 들어 있기 때문에 + 외부 코드 페이지 파일을 따로 가져다 쓰지 않으셔도 됩니다. + 또는 다른 사용자가 만든 코드 페이지 파일을 써야 한다면 DOSBox 구성 파일이 있는 + 디렉터리에 복사하여 DOSBox가 접근할 수 있게 해야 합니다. + + 따로 추가되는 레이아웃은 일치하는 .kl 파일을 DOSBox.Conf가 있는 디렉터리로 + 복사하고 언어 코드를 파일 이름의 첍 번째 부분을 사용하여 추가될 수 있습니다. + 보기: UZ.KL 파일이 있다면 UZ.KL (우즈베키스탄의 키보드 레이아웃) + DOSBox.Conf에서 "keyboardlayout=uz"라고 지정하십시오. + 이러한 키보드 레이아웃들의 통합(keybrd2.sys) 은 의도된 바와 비슷하게 동작합니다. + + +키보드 레이아웃은 다른 나라의 문자열들을 받아들일 수 있지만 파일 이름 안에 +꡸ 문자열들을 쓸 수 없습니다. +DOSBox 안에서 뿐만 아니라 DOSBox가 접근할 수 있는 호스트 운영 체제에 +있는 파일들 안에서도 이 문자열들을 사용하는 것은 삼가시기 바랍니다. + + +============================== +8. 시리얼 멀티플레이어 기능 +============================== + +DOSBox는 시리얼 널모뎀(nullmodem) 케이블을 네트워크와 인터넷을 깰쳐 +가상으로 구현합니다. +DOSBox 설정 구성 파일에 있는 [serialports] 구문에서 구성하실 수 있습니다. + +널모뎀에 연결하면 한쪽은 서버, 나머지 한쪽은 클라이언트가 됩니다. + +DOSBox 설정 구성 파일을 다음과 같이 구성해야 합니다: +서버: + serial1=nullmodem + +클라이언트: + serial1=nullmodem server: + +이제 게임을 실행하여 +nullmodem (널 모뎀) / serial cable (직렏 케이블) / +already connected as multiplayer method on COM1 (COM1에 멀티플레이어 방식으로 이미 연결됨) +가운데 하나를 고르십시오. 두 컴퓨터에다 같은 ëł´(baud) 속도를 지정하십시오. + +이뿐 아니라 다음의 변수를 지정하여 nullmodem 연결 방식을 제어할 수 있습니다. +여기에 매개 변수가 모두 모여 있습니다: + + * port: - TCP 포트 번호. 기본값: 23 + * rxdelay: - 인터페이스가 준비되지 않았다면, 받은 데이터를 얼만큼 + 오랫동안 지연할지 결정합니다 (단위 : 밀리초) + DOSBox 상태 창에서 Overrun(오버런) 오류가 뜨면 이 값을 높이십시오. + 기본값: 100 + * txdelay: - 패킷을 보내기 전에 얼만큼 오랫동안 데이터를 받을지 결정합니다. + 기본값 : 12 (네트워크의 부하를 덜어 줍니다) + * server: - 이 nullmodem은 지정된 서버에 연결되는 클라이언트가 됩니다. (server에 인수가 없으면 서버가 됩니다) + * transparent:1 - 시리얼 데이터만 보냅니다. RTS/DTR 상호 교환(handshake)은 없습니다. + nullmodem이 아닌 장치에 연결할 때 사용하십시오. + * telnet:1 - 원격 사이트가 보낸 텔넷 데이터를 해석합니다. 자동으로 투명하게 처리됩니다. + * usedtr:1 - DOS 프로그램이 DTR을 쟤 때까지 연결되지 않게 합니다. + 모뎀 터미널을 쓸 때 유용합니다. 자동으로 투명하게 처리됩니다. + * inhsocket:1 - 명령 줄을 깰쳐 DOSBox로 보내진 소켓을 사용합니다. 자동으로 투명하게 + 처리됩니다. (Socket Inheritance: 새로운 BBS 소프트웨어 상에서 + 오래된 DOS 도어 게임을 돌릴 때 쓰입니다) + +보기: TCP 포트 5000에 서버 리스닝 처댏. + serial1=nullmodem server: port:5000 rxdelay:1000 + + +=================================== +9. 리소스를 많이 쓰는 게임을 실행하기 +=================================== + +DOSBox는 CPU, 사운드 카드, 그래픽 카드, ꡸댏고 다른 여러 주변 기기들을 +한꺼번에 가상으로 구현해 냅니다. +가상으로 구현되는 DOS 응용 프로그램의 속도는 CPU 사이클(얼마나 많은 +함수가 가상으로 구현되느냐)이 결정합니다. + +CPU 사이클 + cycles=auto가 기본으로 잡혀 있는데 이로써 DOSBox는 + 실행하려는 게임이 될 수 있으면 많은 함수를 써야 하는 게임인지 + 그렇지 않은 게임인지를 알아냅니다. + + 게임이 바라던 바와 관계 없이 될 수만 있다면 돴쥰깴 함수를 많이 쓰게 하려면 + DOSBox 설정 구성 파일에서 cycles=max로 놓으십시오. + + cycles=auto로 설정해 두고 나서 함수를 최대한 많이 쓰는 게임을 실행하거나 + cycles=max로 설정해 두었다면 DOSBox ě°˝ 맨 위에는 "CPU Cycles : Max"라고 나타납니다. + + 이 방식에서 % (퍼센테이지) 기반으로 사이클의 범위를 줄이거나 (CTRL-F11) + 다시 높일 수 있습니다 (CTRL-F12). + + 가끔은 DOSBox 설정 구성 파일에서 cycles=30000ęłź 같이 + 사용자가 수동으로 사이클 값을 넣는 것이 결과가 더 낫습니다. + 어떠한 DOS용 응용 프로그램을 실행할 때 CTRL-F12뼟 몇 번 더 눌러 + 사이클을 높일 수 있지만, 실제 CPU 성능에 제한을 받습니다. + + 여러분의 실제 CPU가 얼마나 여유가 있는지 알아 보려늴 + 다음의 과정을 따르십시오. + Windows 2000/XP/2003/Vista : 작업 관리자 (Ctrl-Shift-Esc) + Windows 95/98/ME : 시스템 모니터 + 실제 CPU가 100% 점유하고 있다고 뜨면 DOSBox는 더 이상 속도를 낼 수 + 없습니다. (DOSBox의 CPU가 아닌 장치들이 주는 부하를 줄이지 않는 한) + +CPU 코어 + x86 기반에서 유동적으로 다시 컴파일되는 코어를 사용할 수 있습니다 + (DOSBox 설정 구성 파일에서 core=dynamic으로 설정) + 자동 감지(core=auto)가 제대로 되지 않을 때 더 나은 결곟뼟 가져다 + 줍니다. 여기에다 cycles=max로 두면 가장 나은 성능을 보여줍니다. + Dynamic 코어 때문에 오히려 느려지거나 아예 동작하지 않는 + 게임이 있을 수 있습니다! + +그래픽 가상 구현 + VGA 에뮬레이션은 DOSBox에서 CPU 사용률을 가장 많이 차지하는 부분입니다. + Ctrl-F8 키를 눌러서 프레임 무시 값을 높여 보십시오. + 고정된 사이클 값을 사용하면 CPU 사용률을 줄일 수 있습니다. + 게임 속도가 빨라질 때까지 프레임 무시값을 올리는 것을 여러 번 되풀이하십시오. + 그러나 알아둘 것은 : 프레임을 너무 많이 무시해 버리면 속도는 얻지만 + 게임의 부드러움은 잃게 됩니다 + +사운드 가상 구현 + 게임 설정 유틸리티에서 사운드를 ęşź 놓아서 CPU로 가는 부하를 덜 수 있습니다. + nosound=true로 놓는 것은 소리만 나오지 않는 것이지 사운드 장치를 끄는 것이 + 아닙니다. + + +게다가 DOSBox가 되도록 많은 리소스를 쓸 수 있도록 DOSBox뼟 제외한 모든 프로그램을 닫으십시오. + + + +고급 사이클 설정 +cycles=auto와 cycles=max 설정은 시작 기본값을 다르게 지정할 수 있습니다. + +꾏돸 + cycles=auto ["리얼모드 기본값"] ["보호 모드 기본값"%] + [limit "사이클 최대값"] + cycles=max ["보호 모드 기본값"%] [limit "사이클 최대값"] + +보기: + cycles=auto 1000 80% limit 20000 + 이렇게 지정하면 리얼 모드 게임에서 cycles=1000을 사용합니다. + 또 보호 모드 게임을 쌐길 때 사이클 제한을 20000으로 두면서 CPU뼟 80% 점유합니다. + + +=================== +10. 문제 해결 : +=================== +DOSBox뼟 실행하자마자 바로 충돌합니다: + - output= 항목에 다른 값을 넣어 보십시오. (DOSBox 설정 구성 파일에서) + - 그래픽 카드 드라이버와 DirectX뼟 업데이트해 보십시오. + +어떤 게임을 실행하면 DOSBox가 닫히면서, 어떤 메시지가 나타나거나 늈윰 있으면서 충돌합니다: + - DOSBox뼟 설치한 뒤 설정 구성 파일(DOSBox.Conf)을 건드리지 마십시오. + - 사운드를 ęşź 보십시오 (게임과 함께 따라오는 사운드 구성 프로그램을 사용해 보거나, + DOSBox 설정 구성 파일에서 sbtype=noneęłź gus=false뼟 사용해 보십시오) + - DOSBox 설정 구성 파일의 일부 항목을 바꿔 보십시오. 예뼟 들면: + core=normal + 고정 사이클 (예뼟 들면 cycles=10000) + ems=false + xms=false + 또는 위의 설정에 대한 조합 + - 명령 프롬프트에서 loadfix뼟 입력하고 게임을 실행하십시오 + +게임이 어떠한 오뼘 메시지를 보여주며 DOSBox 프롬프트로 ëš ě ¸ 나갑니다. + - 오류가 적힌 말을 꼼꼼히 읽으시고 오류가 일어난 까닭을 살펴 보십시오. + - 위의 구문들에 있는 도움말들을 따르십시오. + - 설치 위치에 꽤 민감한 게임들이 있으므로 이 때에는 마운트를 다르게 해 보십시오. + 예뼟 들어 "mount d d:\oldgames\game"로 실행해 왔다면 + 한 번 "mount c d:\oldgames\game"와 "mount c d:\oldgames"로도 해 보십시오. + - 게임이 CD-ROM을 요구하면 마운트할 때 "-t cdrom"을 사용해야 합니다. + 돟률 다른 매개 변수들(ioctl, usecd, ꡸댏고 label 스위치 등 : 적절한 사용법을 읽어볼 것)도 지정해 보십시오. + - 게임 파일의 접근 권한을 확인해 보십시오 (읽기 전용 특성이 있다면 제거하시고 쓰기 특성이 있다면 추가하십시오) + - DOSBox 안에서 게임을 다시 설치해 보십시오. + + +=================== +11. 설정 구성 파일 : +=================== + +CONFIG.COM로 구성 파일을 만들 수 있습니다. (CONFIG -writelang 언어 파일) +이 파일은 내부 DOSBox Z: 드라이브에서 찾을 수 있습니다. +CONFIG.COM뼟 어떻게 쓰는지 살펴 보려늴 내부 프로그램 구문을 읽어 보십시오. +DOSBox뼟 직접 구성할 수 있도록 만들어진 구성 파일을 수정할 수 있습니다. + +이 파일은 여러 구문으로 나뉘어집니다. (항목 [] 사이에 있는 이름들로) +어떠한 구문은 설정할 수 있는 옵션을 가지고 있습니다. #와 %는 사용법이나 도움말을 뜻합니다. + +만들어진 구성 파일은 현재 쓰고 있는 설정값을 담고 있으며 -conf 스위치로 이 설정들을 바꾸실 수 있습니다. +설정을 바꾼 다음에 -conf 스위치로 새로운 값을 불러오실 수도 있습니다. +DOSBox뼟 초기값으로 되돌리려면 기존에 가지고 있던 DOSBox.Conf 파일을 지우십시오. + +-conf 스위치에 설정 구성 파일이 지정되어 있지 않으면, DOSBox는 현재의 디렉터리에서 +dosbox.conf뼟 찾고자 합니다. +* Linux에서는 : ~/.dosboxrc뼟, Win32에서는 ~\dosbox.conf뼟, +* MacOSX에서는 : ~/Library/Preferences/DOSBox Preferences뼟 찾습니다. + + + +====================== +12. 언어 파일 : +====================== + +CONFIG.COM로 언어 파일을 만들 수 있습니다. + +DOSBox에다 -lang 스위치를 덧붙여서 새로운 언어 파일을 쓸 수 있고, +아니면 [dosbox] 구문의 구성 파일의 이름을 놓을 수 있습니다. +다시 말하면 'language = 항목'이며, 파일 이름을 넣으시면 됩니다. + + + +======================================== +13. 나만의 DOSBox 만들기 +======================================== + +소스를 내려 받으신 다음 INSTALL 파일을 천천히 읽어 보십시오. + + + +=================== +14. 고마운 분들 : +=================== + +THANKS 파일을 읽어 보십시오 + + + +============ +15. 연락처 : +============ + +이 사이트에 들어가 보십시오 : +http://dosbox.sourceforge.net +전자우편 주소는 Crew 페이지에 나와 있습니다. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/ko/README-0.74.txt dosbox-staging-0.77.0/contrib/old-translations/ko/README-0.74.txt --- dosbox-staging-0.76.0/contrib/old-translations/ko/README-0.74.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/ko/README-0.74.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1375 @@ +-- Translated in DOSBox Daum Cafe ------------------- + English: http://ykhwong.x-y.net + Korean: http://cafe.daum.net/dosbox +---------------------------------------------------------------- + +DOSBox v0.74 설명서 (www.dosbox.com에서 늘 최신 버전을 이용하십시오) + +===== +알림 +===== + +DOSBox는 이제껏 개인 컴퓨터에 맞춰 만들어진 프로그램들을 언젠가는 모두 +실행할 것입니다. 그것이 우리의 바람이지만 아직 다 이루지는 못했습니다. +DOSBox는 이제서야 매우 뚠뼸 컴퓨터에서 낮은 사양의 486 PC에 가깝게 돌아갑니다. +DOSBox는 옛날의 CGA/Tandy/PCjr 게임부터 Quake가 나온 즈음의 게임까지 +DOS 게임을 폭 넓게 실행할 수 있게 되었습니다. + + + +======== +찾아보기 +======== +1. 뚠뼸 도움말 +2. 시작 (자주 찾는 질문들) +3. 명령 매개변수 +4. 내부 프로그램 +5. 바로가는 키 +6. 조이스틱/게임패드 +7. 매퍼 +8. 키보드 레이아웃 +9. 시리얼 멀티플레이어 기능 +10. DOSBox의 속도 쥰절 +11. 문제 해결 +12. DOSBox 상태 ě°˝ +13. 설정 구성 (옵션) 파일 +14. 언어 파일 +15. 나만의 DOSBox 만들기 +16. 고마운 분들 +17. 연락처 + +============== +1. 뚠뼸 도움말 +============== + +DOSBox 명령 줄에서 INTRO라고 입력하여 뚠뼸 도움말을 보실 수 있습니다. +마운트를 이해하는 데에 많은 도움을 받을 수 있습니다. +DOSBox는 에뮬레이션에 접근할 드라이브를 스스로 만들어 내지 않습니다. + +4번 꾏돸 "내부 프로그램"에 나온 MOUNT 명령의 설명뿐 아니라 +FAQ 항목 "어떻게 시작합니까?"을 읽어 보십시오. +CD-ROM 게임을 하고 싶으면 다음 안내를 참조하십시오: +http://vogons.zetafleet.com/viewtopic.php?t=8933 + +================= +2. 자주 찾는 질문들 +================= + +몇 가지 자주 찾는 질문들: + +시작: 어떻게 시작합니까? +자동 : 제가 늘 이 "mount" 명령어를 입력하여야 합니까? +전체 화면: 전체 화면으로 어떻게 바꿀 수 있습니까? +CD-ROM: 제 CD-ROM이 동작하지 않습니다. +CD-ROM: 게임, 응용 프로그램이 CD-ROM을 찾지 못합니다. +마우스: 마우스가 동작하지 않습니다. +소리: 소리가 나지 않습니다. +소리: DOSBox가 어떠한 사운드 하드웨어를 가상으로 구현합니까? +소리: 소리가 끊기거나 늘어집니다. +키보드: DOSBox에서 ďźź 또는 : 가 눌러지지 않습니다. +키보드: 오뼸쪽 Shift와 \가 DOSBox에서 동작하지 않습니다. (Windows) +키보드: 키보드가 반응이 느립니다. +제어: 캐릭터, 커서, 마우스 포인터가 늘 한쪽으로만 움직입니다! +속도: 게임, 응용 프로그램이 너무 느리게 돌아갑니다! +충돌: 게임, 응용 프로그램이 아예 동작하지 않고 충돌을 일으킵니다! +충돌: DOSBox뼟 실행하자마자 충돌합니다. +게임: 제 빌드 게임(Duke3D/Blood/Shadow Warrior)에 문제가 있습니다. +안전: DOSBox가 제 컴퓨터에 해를 끟욠 수 있습니까? +옵션: DOSBox의 옵션을 바꾸고 싶습니다. +도움말: 설명이 잘 나와 있으나 그래도 잘 모르겠습니다. + + +시작: 어떻게 시작합니까? + + 처음 시작할 때 여러분은 C:ďźź>가 아니라 Z:ďźź>라고 뜨는 것을 ëłź 것입니다. + 여러분이 가지고 있는 실제 디렉터리를 DOSBox의 가상 드라이브로 만들어야 합니다. + "mount" 명령어를 써 보십시오. + + 보기 + ① Windows에서 + "mount C D:ďźźGAMES" 라고 입력하면 실제 D:ďźźGAMES는 DOSBox의 C 드라이브가 됩니다. + ② Linux에서 + "mount c /home/username" 라고 입력하면 실제 /home/username 의 위치는 + DOSBox의 C 드라이브가 됩니다. + + 위에서 마운트된 드라이브로 바꾸려면 "C:"라고 입력하십시오. + 이렇게 해서 "C:\>"라고 뜨면 다 된 것입니다. + + +자동: 제가 늘 이 "mount" 명령어를 입력하여야 합니까? + + DOSBox 설정 구성 파일을 열면 [autoexec] 구문이 있습니다. ꡸ 아래에 명령어들을 적어 두십시오. + 그러면 DOSBox가 실행되자마자 이 명령어들이 실행됩니다. 마운트 등을 위해 이 구문을 사용할 수 있습니다. + 단락 13: 설정 구성 (옵션) 파일을 참조하십시오. + + +전체 화면: 전체 화면으로 어떻게 바꿀 수 있습니까? + Alt-Enter뼟 누르십시오. 아니면 DOSBox의 설정 구성 파일을 열고 fullscreen=false뼟 + fullscreen=true로 바꾸십시오. 화면이 제대로 꽉 ě°¨ 보이지 않으면 DOSBox 설정 구성 파일의 + fullresolution, output, aspect의 값을 바꿔서 게임을 실행해 보십시오. 전체 화면 모드에서 + 원래대로 되돌아가려면 다시 Alt-Enter뼟 누르시면 됩니다. + + +CD-ROM: 제 CD-ROM이 동작하지 않습니다. + DOSBox에서 CD-ROM을 띄우려면 CD-ROM을 띄울 때 몇 가지 또 다른 선택 항목을 + 지정하셔야 합니다. + ① MSCDEX뼟 비롯한 CD-ROM 지원을 사용하려면: (Windows) + - mount d f:ďźź -t cdrom + 리눅스에서는 다음과 같이 합니다. + - mount d /media/cdrom -t cdrom + 이따금씩은 특수한 CD-ROM 인터페이스를 사용하여야 하는 경우도 있습니다. + 이를테면 CD 오디오가 동작하지 않으면: + SDL 지원 방식을 사용하거나 + - mount d f:ďźź -t cdrom -usecd 0 -noioctl + CD 오디오의 디지털 오디오 확장을 사용한 ioctl 접근을 사용하거나 (Windows 전용, 비스타 이상에 적합) + - mount d f:ďźź -t cdrom -ioctl_dx + CD 오디오의 MCI뼟 이용하여 ioctl을 사용하거나 (Windows 전용) + - mount d f:ďźź -t cdrom -ioctl_mci + ioctl만 사용할 수도 있습니다. (Windows 전용) + - mount d f:ďźź -t cdrom -ioctl_dio + ② 낮은 수준의 SDL 지원을 사용하려면: + - mount d f:ďźź -t cdrom -aspi + ③ 낮은 수준의 ASPI 지원을 사용하려면 (ASPI-Layer가 설치된 Win98): + - mount d f:ďźź -t cdrom -usecd 0 -apsi + + 이 명령어에서: + d DOSBox의 가상 드라이브 문자열 (d가 가장 좋은 선택입니다.) + f:ďźź PC의 CD-ROM 실제 위치 (대부분의 경우 d:\나 e:\입니다) + 0 CD-ROM 드라이브의 숫자, mount -cd 뼟 통해 구분 + 이 CD-ROM 드라이브 숫자 값은 CD 오디오를 재생하기 위하여 SDL을 사용할 때에만 사용되며 + 다른 경우에는 무시됩니다. + 다음의 물음도 읽어 보십시오: 게임, 응용 프로그램이 CD-ROM을 찾지 못합니다. + + +CD-ROM: 게임, 응용 프로그램이 CD-ROM을 찾지 못합니다. + CD-ROM을 띄우려면 -t cdrom 스위치를 사용해야 합니다. + 게임이 CD-ROM 레이블(이름)을 찾아내려고 한다면 이름을 올바르게 지정하셔야 합니다 (-label 레이블 이름) + 낮은 수준의 CD-ROM 지원을 사용하려면 다음의 스위치를 지정해야 합니다 : -usecd # + (#는 mount -cd뼟 통해 알려주는 CD-ROM 드라이브의 숫자) + Windows에서는 -ioctl, -aspi, 또는 -noioctl뼟 지정하십시오. + 이에 대한 더 자세한 내용은 이 문서의 4번 항목에서 찾아 보실 수 있습니다. + + 아니면 CD-ROM 이미지를 만들어 보십시오. (CUE/BIN을 선호) ꡸댏고 DOSBox 내부 명령어 + IMGMOUNT 도구를 가지고 이미지(CUE 시트)뼟 마운트해 보십시오. 이것은 어느 운영체제에서든지 + 낮은 수준의 CD-ROM 지원을 이용할 수 있도록 도와 줍니다. + + +마우스: 마우스가 동작하지 않습니다. + 보통 DOSBox는 게임이 마우스를 제어할 때 마우스를 찾아냅니다. + 화면을 한 번 누르면 잠금 처리되어 돌아갑니다. (DOSBox ě°˝ 안에서) + 어떠한 게임에서는 DOSBox가 마우스를 찾아내지 못할 수도 있습니다. + 이 경우 Ctrl-F10 키를 눌러서 마우스를 잠궈둘 수 있습니다. + 어떠한 경우에는 다른 사운드 장치(이를테면 sbtype=spro1 이나 GUS)뼟 사용하여 + 해결하기도 합니다. + +소리: 소리가 나지 않습니다. + 게임 설정에서 사운드를 올바르게 구성했는지 살펴 보십시오. + 소리 설정 유틸리티는 게임이 깔릴 때 같이 깔리며 설치하는 동안에도 소리를 설정할지 + 물어볼 수 있습니다. + 먼저 자동 감지(Autodetection) 옵션이 있는지 살펴 보십시오. 이 항목이 없다면 + SoundBlaster 또는 SoundBlaster 16을 골라 보십시오. + DOSBox의 기본 설정값은 address=220 irq=7 dma=1 (가끔은 highdma=5일 때도 있음) + 입니다. MIDI도 고르실 수 있는데 이를테면 Sound Canvas/SCC/MPU-401/ + General MIDI/Wave Blaster의 경우 기본값은 address=330에 IRQ=2입니다. + 가상으로 구현되는 사운드 카드들의 매개 변수들은 DOSBox 설정 구성 파일 안에서 바꾸실 + 수 있습니다. + 그래도 소리를 들으실 수 없다면 코어를 Normal로 바꾸시고 사이클 값을 cycles=2000ęłź + 같이 좀 더 낮은 값으로 맞춰 보십시오. + 소리를 내보내는 사운드 카드의 드라이버가 제대로 설치되어 있는지, + 선이 잘 꽂혀 있는지, 소리 크기가 알맞게 맞추어져 있는지 살펴 보십시오. + 어떠한 경우에는 Sound Blaster Pro (DOSBox 설정 구성 파일에서의 sbtype=sbpro1) 또는 + Gravis Ultrasound (gus=true)와 같은 각기 다른 에뮬레이트되는 사운드 장치를 사용하는 + 것이 도움이 될 수도 있습니다. + + +소리: DOSBox가 어떠한 사운드 하드웨어를 가상으로 구현합니까? + DOSBox는 오래된 사운드 장치들 몇 가지를 가상으로 구현해 냅니다: + - 내부 PC 스피커 (비프음) + 높고 낮은 소리와 여러 종류의 디지털 소리를 내부 스피커로 만들어 냅니다. + - Creative CMS/Gameblaster + Creative Labs(R) 사에서 맨 처음 선보인 사운드 카드입니다. 기본 포트 구성은 0x220으로 되어 있습니다. + 기본값은 disabled입니다. + - Tandy 3 voice + 노이즈 채널을 제외하고 완전히 가상으로 구현해 냅니다. + 노이즈 채널은 아주 잘 문서화되어 있지 않으므로 사운드 정확도에 의문이 생길 수 있습니다. + 기본값은 disabled로 되어 있습니다. + - Tandy DAC + 일부 게임은 더 나은 Tandy DAC 사운드 지원을 위해 SoundBlaster 에뮬레이션을 끌 것을(sbtype=none) + 요구할 수 있습니다. Tandy 사운드를 사용하지 않는다면 sbtype뼟 sb16으로 다시 설정해 놓는 것을 + 잊지 마십시오. + - Adlib + 이 에뮬레이션은 거의 완벽에 가깝고 디지털화된 소리를 충분히 재생할 수 있습니다. + - SoundBlaster 16/ SoundBlaster Pro I & II /SoundBlaster I & II + 기본적으로 DOSBox는 SoundBlaster 16의 16비트 스테레오 사운드를 제공합니다. + DOSBox.Conf에서 각기 다른 SoundBlaster 버전을 고뼟 수 있습니다. (내부 명령어를 보려늴 : CONFIG) + AWE32 음악은 가상으로 구현하지 않으며 MPU-401을 대신 사용할 수 있습니다. (아래 참고) + - Disney Soundsource 및 Covox Speech + 이 소리 장치는 프린터 포트를 쓰고 디지털 소리만을 내보냅니다. LPT1에 위치합니다. + - Gravis Ultrasound (GUS) + 이 하드웨어는 거의 완전히 가상으로 구현됩니다. + MPU-401이 다른 코드에서 가상으로 구현된 뒤 MIDI뼟 거치면서 성능은 점점 떨어집니다. + Gravis 음악의 경우 Gravis 드라이버를 DOSBox 안에서 설치해야 할 수도 있습니다. + 기본값은 disabled입니다. + - MPU-401 + MIDI Passthrough 인터페이스 또한 가상으로 구현됩니다. + 이 소리의 출력 방식은 일반 MIDI나 MT-32 장치와 함께 사용될 때에만 동작합니다. + Windows XP/Vista/7 및 Mac OS는 호환이 되는 기본 에뮬레이터를 갖추고 있습니다: + Sound Canvas/SCC/General Standard/General MIDI/Wave Blaster + Roland LAPC/CM-32L/MT-32뼟 구현하려면 다른 장치나 별도의 에뮬레이터가 필요합니다. + +소리: 소리가 끊기거나 늘어집니다. + DOSBox가 현재의 뚠뼴기뼟 맞추기 위해 CPU 전력을 너무 많이 쓰고 있습니다. + CPU 사이클(cycles) 값을 낮추거나, 프레임 무시(frameskip) 값을 늘리거나, 각 사운드 장치 또는 믹서 장치의 + 샘플 속도(samplerate)뼟 낮추십시오. 또 prebuffer의 값을 늘려 보십시오. 이것들은 모두 DOSBox + 설정 구성 파일에서 바꾸실 수 있습니다. 꾏돸 13 설정 구성 (옵션) 파일을 참조하십시오. + cycles=max 또는 cycles=auto뼟 사용하고 계시면, DOSBox 밖에서 쓰이는 다른 프로그램들, + 특히 하드 디스크에 접근을 많이 하는 프로그램들이 DOSBox뼟 간섭할 수 있습니다! + 또, 꾏돸 10 "DOSBox 속도 쥰절"을 참고하십시오. + +키보드: DOSBox에서 ďźź 또는 : 가 눌러지지 않습니다. + ďźź 는 \와 같습니다. 한국어 자판을 쓸 때에는 이와 같은 문제가 없습니다. + 해당 키가 눌리지 않는 데에는 다양한 이유가 존재합니다. 호스트 운영 체제의 자판이 도스 레이아웃과 + 일치하지 않거나 올바르게 감지하지 몝 했을 때, 아니면 키 매핑이 잘못되었을 때에도 그러할 수 있습니다. + + 몇 가지 해결할 수 있는 사항이 있습니다: + 1. ďźź 대신에 / 뼟 쓴다. :에 해당하는 ALT-58이나 \에 해당하는 ALT-92뼟 사용한다. + 2. 도스 자판 설계를 변경한다. (꾏돸 8을 확인할 것) + 3. DOSBox.Conf뼟 열고 [autoexec] 아래에 명령어를 미댏 입력해 놓는다. + 4. DOSBox.Conf뼟 열고 usescancodes 값을 수정한다. + 5. 운영체제의 자판 설계를 바꾼다. + + 호스트 컴퓨터의 레이아웃이 증명되지 않았을 경우, 아니면 키보드 설계가 DOSBox 설정 구성 파일에서 + none (없음)으로 잡혀 있는 경우 표준 미국식 레이아웃이 사용됩니다. + 이 구성을 사용할 경우 \ (백슬래시)뼟 입력할 때 Enter 키 주변의 키들을 입력해 보십시오. + : (콜론)의 경우 Shift 키를, 또 Enter와 L 사이의 키들을 눌러 보십시오. + +키보드: 오뼸쪽 Shift와 \가 DOSBox에서 동작하지 않습니다. (Windows) + 사용자의 PC에 한 대 이상의 키보드가 장착되어 있으면 Windows 상에서 이러한 일이 벌어질 수 있습니다. + 이 문제를 확인하려면 cmd.exe뼟 실행한 뒤 DOSBox 프로그램 폴더에 들어가서 다음과 같이 입력하십시오. + set sdl_videodriver=windib + dosbox.exe + 키보드가 정상 동작하는지 확인해 보십시오. windib는 속도가 느립니다. 이곳에 제공된 두 가지 해결책 가운데 + 하나를 이용하는 것이 가장 좋습니다. + http://vogons.zetafleet.com/viewtopic.php?t=24072 + +키보드: 키보드가 반응이 느립니다. + DOSBox 설정 구성 파일에서 priority=normal,normalęłź 같이 우선 순위를 바꿔 보십시오. + CPU 사이클을 낮추는 것도 고려해 보십시오. (cycles=10000ęłź 같이 사이클 고정값을 입력해 보십시오) + +제어: 캐릭터, 커서, 마우스 포인터가 늘 한쪽으로만 움직입니다! + 조이스틱 에뮬레이션을 ęşź 보십시오. DOSBox 설정 구성 파일에서 joysticktype=none으로 두시면 + 됩니다. 조이스틱이나 키패드가 꽂혀 있다면 ëšź 주십시오. + 게임에서 조이스틱을 사용하려면 timed=false로 설정하십시오. ꡸댏고 운영체제의 제어판 쪽곟 + 게임 설정에서 조이스틱의 설정을 여러분의 조이스틱을 만져 보면서 잘 맞춰 보십시오. + + +속도: 게임, 응용 프로그램이 너무 느리게 돌아갑니다! + 더 많은 정보를 보려늴 꾏돸 10 "DOSBox 속도 쥰절"을 읽어 보십시오. + +충돌: 게임, 응용 프로그램이 아예 동작하지 않고 충돌을 일으킵니다! + 11번째 꾏돸 "문제 해결"을 읽어 보십시오. + +충돌: DOSBox뼟 실행하자마자 충돌합니다. + 11번째 꾏돸 "문제 해결"을 읽어 보십시오. + +게임: 제 빌드 게임(Duke3D/Blood/Shadow Warrior)에 문제가 있습니다. + 먼저 게임 포트를 찾아 보십시오. 높은 해상도에서 DOSBox의 그래픽 문제를 해결하려면 + DOSBox 설정 구성 파일 (DOSBox.Conf)을 열고 machine=svga_s3을 찾아 보십시오. + 이 svga_s3을 vesa_nolfb로 바꿔 보십시오. memsize=16을 memsize=63으로 바꿔 보십시오. + +안전: DOSBox가 제 컴퓨터에 해를 끟욠 수 있습니까? + DOSBox는 리소스를 많이 쓰는 다른 프로그램들에 견주어 보더라도 컴퓨터에 해를 주지 않습니다. + 사이클 값을 높인다고 해서 실제 CPU 클럭을 끌어 올리는 것이 아닙니다. + 사이클을 너무 높게 잡으면 DOSBox 안에서 실행되고 있는 소프트웨어의 성능이 떨어질 수 있습니다. + +옵션: DOSBox의 옵션을 바꾸고 싶습니다. + 꾏돸 13 "설정 구성 (옵션) 파일"을 읽어 보십시오. + +도움말: 설명이 잘 나와 있으나 그래도 잘 모르겠습니다. + 다른 질문이 있다면 이 설명서의 나머지 부분도 참고해 보십시오. 또 이곳도 참조해 보십시오. + "The Newbie's pictorial guide to DOSBox" (초보자를 위한 DOSBox로의 ꡸댟 안내)가 + http://vogons.zetafleet.com/viewforum.php?f=39 에 옏려져 있습니다. + DOSBox의 위키도 들어가 보십시오 : http://www.dosbox.com/wiki/ + DOSBox 사이트 및 포럼 : http://www.dosbox.com + + + +================ +3. 명령 매개변수 +================ + +DOSBox가 가질 수 명령 줄 옵션이 아래에 추려져 있습니다. +대부분의 경우 DOSBox의 설정 구성 파일(DOSBox.Conf)을 이용하는 것이 +더 쉬울 수 있습니다. + +Windows 사용자: cmd.exe 또는 command.com뼟 열거나 +DOSBox.exe에 대한 바로가기를 수정하여 아래의 항목을 지정할 수 있습니다. + +Linux 사용자: 콘솔을 이용하십시오. + +MAC OS X 사용자: terminal.app을 시작하고 이곳으로 들어가십시오: + /applications/dosbox.app/contents/macos/dosbox + +이 옵션들은 특별한 말이 없는 한 모든 운영체제에서 돌아갑니다. + +dosbox [이름] [-exit] [-c 명령어] [-fullscreen] -[-userconf] + [-conf 설정구성파일] [-lang 언어파일위치] + [-machine 기기 종류] [-noconsole] [-startmapper] [-noautoexec] + [-securemode] [-scaler 스케일러] [-forcescaler 스케일러] [-version] + [-socket 소켓] + +dosbox -version +dosbox -editconf 프로그램 +dosbox -opencaptures 프로그램 +dosbox -printconf +dosbox -eraseconf +dosbox -resetmapper + + + 이름 + "이름"이 디렉터리라면, C 드라이브로 마운트합니다 + "이름"이 실행 파일이라면, C 드라이브의 "이름"이 있는 디렉터리를 마운트합니다 + + -exit + "이름"의 실행이 끝나면 DOSBox는 바로 닫힙니다. + + -c 명령어 + "이름"이 실행되기 전에 지정된 명령어를 먼저 실행합니다. 여러 개의 명령어들을 한꺼번에 + 지정할 수도 있습니다. 그러나 명령어마다 앞에 -c뼟 붙여야 합니다. + 내부 프로그램, DOS 명령어, 아니면 마운트된 드라이브의 실행 파일이 명령어가 될 수 있습니다. + + -fullscreen + DOSBox뼟 전체 화면 모드로 실행합니다. + + -userconf + 사용자가 지정한 설정 구성 파일로 DOSBox뼟 시작합니다. -conf 변수와 함께 사용할 수 있지만 + -userconf는 늘 -conf 변수 바로 앞에 위치하여야 합니다. + + -conf 설정구성파일 + "설정구성파일" 안에 지정된 선택 내용에 따라 DOSBox뼟 실행합니다. + -conf 옵션을 여러 개 지정해서도 사용할 수 있습니다. 더 자세한 정보는 13번째 구문에 있습니다. + + -lang 언어파일위치 + "언어파일위치" 안에 지정된 언어 문자열을 사용하여 DOSBox뼟 실행합니다. + 더 자세한 정보는 14번째 구문에 있습니다. + + -machine 기기 종류 + DOSBox가 원하는 종류의 기기뼟 가상으로 구현해 낼 수 있게 합니다. + 사용할 수 있는 기기 종류는 : hercules, cga, ega, tandy, pcjr, vga (기본값) 입니다. + 여기에다 DOSBox 설정 구성 파일의 도움말에 나열된 svga 칩셋도 선택할 수 있습니다. + svga_s3는 VESA 에뮬레이션까지 담당합니다. + 일부 VGA 특수 효과의 경우 machinetype 중 vgaonly뼟 사용할 수 있습니다만 + 이것은 SVGA 기능을 사용할 수 없게 하고 더 높은 에뮬레이션의 정확성 때문에 + 속도가 느려질 수 있습니다. + 기기 종류는 그래픽 카드와 이에 따른 사운드 카드 둘 다 영향을 미칩니다. + + -noconsole (Windows 운영체제만) + DOSBox 상태 ě°˝(콘솔 ě°˝)을 보이지 않고 DOSBox뼟 실행합니다. + stdout.txt 와 stderr.txt 로 대신 출력합니다. + + -startmapper + 실행하자마자 곧바로 키보드/조이스틱 매핑 프로그램을 띄웁니다. + 키보드나 조이스틱에 문제가 있을 때 쓰시기 바랍니다. + + -noautoexec + 자동 일괄 실행(AUTOEXEC - DOSBox.Conf의 [autoexec] 꾏돸)을 사용하지 않습니다. + + -securemode + -noautoexec와 같지만 config.com -securemode뼟 AUTOEXEC.BAT 맨 아래에 집어 넣습니다. 도스박스 안에서 + 드라이브의 마운트 방식을 ęşź 놓습니다. + + -scaler 스케일러 이름 + "스케일러 이름"으로 지정된 스케일러를 사용합니다. 이 기능을 쓰려면 먼저 DOSBox 설정 구성 파일을 + 열어서 어떠한 스케일러들을 사용할 수 있는지 살펴 보십시오. + + -forcescaler 스케일러 이름 + 위의 -scaler 변수와 비슷합니다. 다만 지정된 스케일러가 화면 크기에 알맞게 들어맞지 않는 등 어떠한 경우가 + 있다 하더라도 돴쥰깴 사용하도록 합니다. + + -version + 버전 정보를 보여주고 끝냅니다. 프론트엔드를 쓸 때 유용합니다. + + -editconf 프로그램 + 첍 변수로 지정된 프로그램을 구성 파일로 호출합니다. + 이 명령을 한 번 이상 지정할 수 있습니다. 이 경우 첍 번째 프로그램이 시작을 실패하면 두 번째 프로그램이 실행됩니다. + + -opencaptures 프로그램 + 첍 변수로 지정된 프로그램을 캥처 폴더 변수로 호출합니다. + + -printconf + 기본 구성 파일의 위치를 출력합니다. + + -eraseconf + 기본 구성 파일을 제거합니다. + + -resetmapper + 깨끗한 기본 구성 파일이 사용하는 매퍼 파일을 제거합니다. + + -socket + 소켓 번호뼟 nullmodem 에뮬레이션으로 내보냅니다. + 꾏돸 9 "시리얼 멀티플레이어 기능"을 참고하십시오. + +알림 : 이름/명령/설정구성파일/언어파일위치에 뚈 칸이 들어 있으면 + 모든 항목들(이름/명령어/설정구성파일/언어파일)마다 큰 따옴표를 넣으십시오. + ("명령 또는 파일 이름"). + 따옴표 안에 따옴표를 넣고 싶으시면 (흔히 -c와 마운트 방식이 뒷따름) + Windows와 OS/2 사용자들은 큰 따옴표(") 안에 작은 따옴표(')뼟 넣으십시오. + 다른 운영체제를 쓰시는 분들은 \뼟 대신 쓰면 됩니다. + Windows: -c "mount c 'c:\My folder with DOS games\'" + Linux: -c "mount c \"/tmp/뚈 칸이 들어간 이름\"" + +Windows의 경우 드문 예가 하나 있습니다: + +dosbox D:ďźźfolderďźźfile.exe -c "MOUNT Y H:ďźźMyFolder" + 이것은 D:ďźźfolder뼟 c:\으로 마운트시키고 file.exe 파일을 실행합니다. + 이에 앞서 먼저 H:ďźźMyFolder 는 Y 드라이브로 마운트합니다. + +또, Windows에서는 디렉터리나 파일을 DOSBox 실행 파일로 끌어 놓올 수 있습니다. + + + +================ +4. 내부 프로그램 +================ + +DOSBox는 command.com에서 찾을 수 있는 DOS 명령어들 가운데 많은 수뼟 지원합니다. +꡸ 밖에 다음의 명령어들도 사용할 수 있습니다: + +MOUNT "가상으로 쓰려는 드라이브 문자" "실제 드라이브 문자:\ 또는 디렉터리" + [-t 종류] [-aspi] [-ioctl] [-noioctl] [-usecd 숫자] [-size 드라이브 큏기] + [-label 드라이브 이름] [-freesize 큏기(MB)] [-freesize 큏기(KB : 플로피)] + +MOUNT -cd + +MOUNT -u "가상 드라이브를 헤제할 문자" + + 로컬 디렉터리들이 DOSBox 안에서 드라이브로 인식합니다. + + "가상으로 쓰려는 드라이브 문자" + → DOSBox 안의 드라이브 문자 (보기 : mount c c:\의 c) + + "실제 드라이브 문자:\ 또는 디렉터리" + → DOSBox 안에서 사용할 로컬 디렉터리 + (Win32의 경우 "가상 구현된 드라이브 문자"와 같습니다. + 보기 : mount c c:\의 c:ďźź) + + -t 종류 + → 마운트되는 디렉터리의 종류 - 'dir (기본값), floppy, cdrom' 중 하나를 고뼟 수 있습니다 + (보기 : mount d -t cdrom d:ďźź) + + -size 드라이브 큏기 + → (고급 사용자만 이용할 것) 드라이브의 큏기뼟 지정합니다. 여기서 형식은 "bps, spc, tcl, fcl"이 있습니다. + bps: bytes per psector(섹터 당 바이트). CD-ROM 드라이브에서는 2048이며, ꡸ 밖에는 512가 기본입니다. + spc: sectors per cluster(클러스터 당 섹터). 보통 1에서 127까지 쓸 수 있습니다. + tcl: total clusters(모든 클러스터). 1에서 65534까지 쓸 수 있습니다. + fcl: total free clusters(남아 있는 클러스터). 1에서 tcl 값까지 쓸 수 있습니다. + + -freesize 큏기 (단위 : MB | KB) + → 드라이브에서 사용할 수 있는 여유 공간의 큏기뼟 설정합니다. 단위는 일반 드라이브에서 MB(메가바이트)이며 + 플로피 드라이브에서는 KB(킬로바이트)입니다. + -size 보다 더 간단하게 사용할 수 있습니다. + + -label 드라이브 이름 (레이블) + → 드라이브의 이름을 지정합니다. 프로그램이나 게임이 CD-ROM의 이름을 읽어내지 못할 때 사용하십시오. + 레이블을 지정하지 않거나 낮은 수준의 지원을 사용하지 않을 때 (-usecd # 및 -ioctl/aspi뼟 사용하지 않거나 -noioctl뼟 지정할 때) + * Win32에서 : 기본적으로 "실제 드라이브"의 레이블을 가져옵니다. + * Linux에서 : 기본적으로 NO_LABEL (레이블 없음)으로 설정합니다. + + 마운트가 된 뒤에는 레이블 이름을 따로 바꿀 수 없습니다. + + -aspi + → ASPI 레이어를 강제로 사용합니다. (현재는 이용할 수 없음) + ASPI 레이어를 사용하는 Windows 시스템에서만 이 옵션으로 마운트하실 수 있습니다. + + -ioctl (CD 오디오 인터페이스 자동 선택) + -ioctl_dx (CD 오디오에 쓰이는 디지털 오디오 확장) + -ioctl_dio (CD 오디오 재생을 위해 ioctl 요청) + -ioctl_mci (CD 오디오 재생을 위해 MCI 사용) + → ioctl 명령어를 강제로 사용합니다. Windows NT/2000/XP/2003/Vista/7 이상에서만 사용하십시오. + CD 오디오를 위한 다양한 선택 사항이 존재하지만 부하가 적은 -ioctl_dio뼟 사용하는 것이 좋습니다. 그러나 모든 시스템에서 동작하는 + 것은 아니기 때문에 -ioctl_dx나 -ioctl_mci도 사용할 수 있습니다. + + -noioctl + → SDL CD-ROM 레이어를 강제로 사용합니다. 모든 시스템에서 쓸 수 있습니다. + + -usecd 숫자 + → 모든 운영 체제에서 사용할 수 있습니다. 그러나 Windows에서는 -noioctl 스위치를 사용하여야 -usecd 스위치를 + 사용할 수 있습니다. SDL에 사용해야 하는 드라이브를 사용할 수 있게 합니다. + SDL CD-ROM 인터페이스를 사용하는 동안 CD-ROM 드라이브가 없다고 뜨거나 문제가 있으면 사용하십시오. + 이것을 사용하기 전에 mount -cd 라고 입력해서 CD-ROM에 맞는 숫자를 미댏 살펴 보실 수 있습니다. + + -cd + → CD-ROM의 실제 번호와 드라이브를 보여줍니다. -usecd뼟 사용할 때 참고하십시오. + + -u + → 마운트했던 드라이브의 마운트를 해제합니다. + Z:\에서는 동작하지 않습니다. + + 알림 : 로컬 디렉터리를 CD-ROM 드라이브로 마운트할 수는 있습니다. 그러나 + 하드웨어 지원을 제대로 받지 못할 수도 있습니다. + + MOUNT는 기본적으로 여러분이 가지고 있는 실제 하드웨어를 DOSBox의 가상 컴퓨터에 + 연결할 수 있도록 도와 줍니다. MOUNT C C:\GAMES은 DOSBox가 여러분의 실제 C 드라이브를 + DOSBox의 C:\GAMES로 연결할 수 있게 해 줍니다. 또한 어떠한 프로그램에 맞추어 + 드라이브의 문자열을 바꿀 수도 있습니다. + + 'MOUNT C C:\'와 같이 C 드라이브를 통째로 마운트하지 않는 것이 좋습니다! + 이는 읽기 전용이 특징인 CD-ROM을 제외한 다른 드라이브의 루트 드라이브를 마운트하는 것도 + 마찬가지입니다. 사용자나 DOSBox는 잘못하여 사용자가 가지고 있던 파일을 모두 날려 버릴 수도 + 있습니다. 또, Windows Vista/7에서 Windows 폴더나 Program Files 폴더, 또 ꡸ 하위 폴더로 + 마운트하지 마십시오. DOSBox가 정상 동작하지 않거나 뒤에 동작을 멈출 수도 있습니다. + 응용 프로그램이나 게임을 담고 있는 단순한 디렉터리를 마운트하실 것을 권합니다. + + DOSBox 안에서 게임을 설치해야 할 수도 있습니다. 그러므로 CD에 게임이 있다면 (설치 이후라도) + CD-ROMęłź 하드 디스크 드라이브를 폴더로 둘 다 마운트하여야 합니다. + 이를테면 하드 디스크는 c로 마운트하고 + CD-ROM은 d로 마운트하며 + 플로피는 a나 b로 마운트해야 합니다. + + Windows에서 MOUNT뼟 하는 일반 보기입니다: + 1. 폴더를 하드디스크로 마운트: + mount c d:\dosgames + 2. 드라이브를 플로피로 마운트: + mount a a:\ -t floppy + 3. CD-ROM 드라이브 E뼟 도스박스의 CD-ROM 드라이브 D로 마운트: + mount d e:\ -t cdrom + + Windows에서 MOUNT뼟 하는 고급 보기입니다: + + 4. ~870 mb의 남은 디스크 공간이 있는 하드 디스크 드라이브 마운트 (단순 버전): + mount c d:\dosgames -freesize 870 + + 5. ~870 mb의 남은 디스크 공간이 있는 드라이브를 마운트 (고급 사용자용, 완전한 제어): + mount c d:\dosgames -size 512,127,166513,13500 + + 다른 MOUNT 보기: + 6. /media/cdrom 위치의 시스템 CD-ROM 드라이브를 DOSBox에서 D 드라이브로 마운트 : + mount d /media/cdrom -t cdrom -usecd 0 + 7. DOSBox에서 /home/user/dirY 뼟 드라이브로 마운트 : + mount c /home/user/dirY + 8. DOSBox가 설치된 디렉터리를 DOSBox에서 D로 마운트 : + mount d . + (.은 Windows Vista/7에서 도스박스가 시작한 디렉터리를 말함. + DOSBox가 Program Files에 설치되어 있다면 이것을 사용하지 마십시오) + + CD 이미지나 플로피 이미지를 마운트하려면 IMGMOUNT뼟 사용하십시오. + MOUNT는 다음과 같은 외부 프로그램들을 이용할 경우에만 이미지와 동작합니다. + - Daemon Tools Lite (CD 이미지) + - Virtual Floppy Drive (플로피 이미지) + 다만 IMGMOUNT가 더 나은 호환성을 제공할 수 있습니다. + +MEM + 메모리가 얼만큼 남아 있는지 보여주는 프로그램입니다. + +VER + VER set 기본 버전 [소수점 뒤의 버전] + 도스박스 버전을 보여 죟고 도스 버전을 보고합니다. VER set 6 22라고 입력하면 도스박스에 6.22으로 버전 번호뼟 입력하게 됩니다. + +CONFIG -writeconf 파일 위치 +CONFIG -writelang 파일 위치 +CONFIG -securemode +CONFIG -set "섹션 속성=값" +CONFIG -get "섹션 속성" + + CONFIG뼟 쓰면 DOSBox뼟 실행하는 동안 갖가지 설정 값을 바꿀 수 있습니다. + 지정해 둔 설정과 언어 문자열을 디스크에 저장할 수 있습니다. + 사용할 수 있는 모든 꾏돸곟 속성에 대한 정보를 보려늴 13번 항목 (설정 구성 파일)을 읽어 보십시오. + + -writeconf 파일 위치 + 현재의 구성을 파일에 기록합니다. + "파일 위치"는 DOSBox가 있는 실제 드라이브에 있습니다. (DOSBox에서 마운트한 드라이브에 있지 않습니다) + 설정 구성 파일은 DOSBox의 여러 설정을 제어합니다 : + 가상으로 구현된 메모리의 큏기, 가상으로 구현된 사운드 카드 밖의 설정들. + AUTOEXEC.BAT에도 접근할 수 있습니다. + 더 자세한 정보를 보려늴 13번 항목 (설정 구성 파일)에서 찾으실 수 있습니다. + + -writelang 파일 위치 + 현재의 언어 설정을 파일에 기록합니다. + "파일 위치"는 DOSBox가 있는 실제 드라이브에 있습니다. (DOSBox에서 마운트한 드라이브에 있지 않습니다) + 언어 파일은 내부 명령어와 내부 DOS에서 눈에 보이는 모든 출력 문자열을 제어합니다. + 더 자세한 정보는 14번 꾏돸 "언어 파일"을 읽어 보십시오. + + -securemode + 도스박스를 더 안전한 모드로 전환합니다. 이 모드에서 내부 명령어 MOUNT, IMGMOUNT, BOOT는 동작하지 않습니다. + 새로운 설정 구성 파일이나 언어 파일을 만들 수도 없습니다. (도스박스를 다시 시작해야 앞서 언급한 기능들을 사용할 수 있음) + + -set "꾏돸 속성=값" + 속성을 새로운 값으로 설정합니다. + 이 때 CONFIG는 명령이 제대로 받아들여졌는지 알려 주지 않습니다. + + -get "꾏돸 속성" + 속성에 들어있는 값을 알려 죟늰 %CONFIG% 환경 변수에 저장됩니다. + 일괄(배욘) 파일을 사용하여 값을 저장할 때 쓰시면 됩니다. + + "-set"와 "-get" 둘 다 일괄(bat) 파일에 넣을 수 있으며 게임마다 설정을 다르게 하여 쓸 수 있습니다. + ꡸ 대신 각 게임에 맞추어 별도의 DOSBox 설정 구성 파일을 사용하는 것이 더 쉬울 수도 있습니다. + + 보기 : + 1. c:\dosgames 디렉터리에 설정 구성 파일을 만들기: + config -writeconf c:\dosgames\dosbox.conf + 2. CPU 사이클 값을 10000으로 놓기: + config -set "cpu cycles=1000" + 3. EMS 메모리 가상 구현을 끄기: + config -set "dos ems=false" + 4. 어떤 CPU 코어가 쓰이고 있는지 알아 보기: + config -get "cpu core" + +LOADFIX [-큏기] [프로그램] [프로그램 매개변수] +LOADFIX -f + + 메모리를 잡아먹게 합니다. + 오래된 프로그램들이 너무 많은 메모리를 알아채지 못할 때가 있는데 이럴 때 쓰면 좋습니다. + + -큏기 + 메모리를 차지할 KB 수, 기본값 = 64kb + -f + 이전에 할당했던 모든 메모리를 되돌립니다 + + +보기: + 1. 64KB 메모리를 할당하여 MM2.EXE뼟 실행할 때 : + loadfix mm2 + 2. 32KB 메모리를 할당하여 MM2.EXE뼟 실행할 때 : + loadfix -32 mm2 + 3. 이전에 할당한 모든 메모리 볾꾏 : + loadfix -f + + +RESCAN +DOSBox 드라이브의 캐시를 다시 불러 들입니다. +실행하고 나서 Drive cache cleared라고 뜨면 정상입니다. Ctrl-F4 키를 누르셔도 이 기능이 동작합니다. + +DOSBox에서 마운트를 한 다음 Windows에서 폴더나 파일을 수정하거나 이름을 바꾸었다면, +DOSBox에서는 이 명령어를 사용하여 바뀐 디렉터리의 꾏쥰뼟 다시 읽어 들입니다. + + +MIXER + DOSBox가 현재의 소리 큏기 설정을 보여 줍니다. + 이 설정을 바꾸실 수 있는 방법은 다음과 같습니다: + + mixer 채널 왼쪽:오뼸쪽 [/NOSHOW] [/LISTMIDI] + + 채널 + 다음 중 하나를 고뼟 수 있습니다: MASTER, DISNEY, SPKR, GUS, SB, FM, [, CDAUDIO] + CDAUDIO는 볟뼨 제어가 있는 CD-ROM 인터페이스를 이용하고 있을 때(CD 이미지, ioctl_dx) + 사용할 수 있습니다. + + 왼쪽:오뼸쪽 + 소리 큏기뼟 % 로 보여 줍니다. 앞에 D 뼟 놓으면 데시벨(deciBell)로 보여 줍니다 + 보기) mixer gus d-10 + + /NOSHOW + 소리 큏기 수준에서 하나를 설정한다면 DOSBox가 결곟뼟 보여 주지 않게 합니다. + + /LISTMIDI + PC(Windows)에서 사용할 수 있는 미디 장치를 나열합니다. + Windows 기본 미디 매퍼 뿐만 아니라 다른 장치도 고뼴려늴 + 설정 구성 파일 안에 'midconfig=id' 줄을 추가하여 [midi] 구문에다 추가하십시오. + 여기서 나오는 id는 LISTMIDI의 목록에 나온 장치의 개수를 뜻합니다. (예: midconfig=2) + + 리눅스의 경우 이 옵션은 동작하지 않지만 콘솔에서 'pmidi -l' 뼟 이용하면 비슷한 + 결곟뼟 얻을 수 있습니다. ꡸ 뒤 "midconfig=" 줄을 "midconfig=포트"로 바꾸어 + 주시면 됩니다. 여기서 포트는 pmidi -l을 통해 나열한 장치의 포트를 가리킵니다. + (예: midconfig=128:0) + + +IMGMOUNT +DOSBox에서 디스크 이미지와 CD-ROM 이미지를 마운트할 때 쓰이는 유틸리티입니다. + +IMGMOUNT 드라이브 [이미지 파일] -t [이미지 종류] -fs [이미지 형식] + -size [섹터 바이트 큏기, 헤드 당 섹터 수, 헤드 수, 실린더 수] +IMGMOUNT 드라이브 [이미지 파일1, 이미지 파일2, ... 이미지파일N] -t cdrom -fs iso + + 이미지 파일 + DOSBox에서 마운트하려는 이미지 파일의 위치입니다. + 이 위치는 DOSBox 안에서 마운트된 드라이브나 실제 디스크로 설정할 수 있습니다. + CD-ROM 이미지 (ISO 또는 CUE/BIN 또는 CUE/IMG) 또한 마운트할 수 있습니다. CD 바꾸기 기능을 사용하고 싶으시면 + 바로 아래에 있는 옵션을 보십시오. + CUE/BIN 파일들은 선호되는 CD-ROM 이미지 형태로, 데이터만 입력할 수 있는 ISO에 + 소리가 저장되어 있습니다. CUE/BIN의 경우 마운트할 때 언제나 CUE 시트를 지정합니다. + + 이미지 파일1, 이미지 파일2, ... 이미지파일N + DOSBox에서 마운트하려는 이미지 파일의 위치입니다. + 이미지 파일의 번호는 CD-ROM 이미지만 허용합니다. CD들은 어느 때나 CTRL-F4키를 + 누르면 바꿀 수 있습니다. 여러 개의 CD-ROM이 필요한 게임이나 게임 도중 CD뼟 바꿔야 할 때 + 사용하십시오. + + -t [이미지 종류] + 다음의 3가지 이미지 종류 중 하나를 고뼟 수 있습니다: + floppy + 플로피 이미지, 일반 이미지를 지정합니다. + DOSBox는 자동으로 디스크 용량을 알아냅니다 (보기 : 360K 1.2MB, 720K, 1.44MB, 등) + cdrom + CD-ROM의 ISO 이미지를 지정합니다. 용량은 알아서 인식하여 해당 크기로 설정합니다. + ISO, CUE/BIN, CUE/IMG뼟 사용할 수 있습니다. + hdd + 하드 드라이브 이미지를 지정합니다. 알맞은 CHS 용량이 설정되어야 이 옵션이 동작합니다. + + -fs [이미지 형식] + 다음의 파일 시스템 형식을 사용할 수 있습니다: + iso + ISO 9660 CD-ROM 포맷을 사용합니다. + fat + 이미지를 파일 할당 테이블(FAT) 파일 시스템으로 사용합니다. + DOSBox는 해당 이미지를 DOSBox의 드라이브로 인식하며 DOSBox 안에서 파일들을 사용할 수 있습니다. + none + DOSBox가 디스크의 파일 시스템을 읽어들이지 않습니다. + 포맷해야 하거나, BOOT 명령어를 사용하여 디스크를 시동해야 할 때 쓸모 있습니다. + "none" 파일 시스템을 사용할 때 드라이브 문자가 아닌 드라이브 숫자를 지정해야 합니다 + (2 또는 3) → 2는 마스터, 3은 슬레이브 + 예뼟 들어, 70MB 이미지를 슬레이브 드라이브 장치로 마운트하고자 한다면, 이렇게 입력하십시오: + "imgmount 3 d:\test.img -size 512,63,16,142 -fs none" + DOSBox의 드라이브로 읽어들이려면: + "imgmount e: d:\test.img -size 512,63,16,142" + + -size [섹터바이트 큏기, 헤드 당 섹터 수, 헤드 수, 실린더 수] + 실린더, 헤더, 섹터를 드라이브에 맞게 지정합니다. + 하드 드라이브 이미지를 마운트할 때 필요합니다. + + CD-ROM 이미지의 본보기 (리눅스): + 1. imgmount d /tmp/cdimage1.cue /tmp/cdimage2.cue -t cdrom + 또는 + 2-가. mount c /tmp + 2-나. imgmount d c:\cdimage1.cue c:\cdimage2.cue -t cdrom + CD-ROM 이미지의 본보기 (리눅스): + imgmount d f:\img\CD1.cue f:\img\CD2.cue f:\img\CD3.cue -t cdrom + imgmount d "g:\img\7th Guest CD1.cue" "g:\img\7th Guest CD2.cue" -t cdrom + MOUNT로 이미지를 마운트할 수 있지만 외부 프로그램을 이용해야 한다는 것을 잊지 마십시오. + (위에 언급) + + +BOOT + BOOT는 플로피 이미지나 하드 드라이브 이미지가 DOSBox뼟 깰쳐 운영 체제 에뮬레이션을 독립적으로 수행하게 합니다. + 시동 플로피 디스크로 사용하거나 DOSBox 안에서 다른 운영체제로 시동할 수 있게 합니다. + 가상으로 구현되는 시스템이 PCJr이라면(machine=pcjr) BOOT 명령어로 PCJr 카트리지(.jrc)뼟 불러올 수 있습니다. + + BOOT [디스크이미지1.img 디스크이미지2.img … 디스크이미지N.img] [-l 드라이브 문자열] + BOOT [cart.jrc] (PCJr 전용) b + + diskimg1.img diskimg2.img .. diskimgN.img (N은 숫자) + 지정된 드라이브 문자열로 DOSBox가 시동한 뒤에 마운트하고자 하는 플로피 디스크의 이미지의 수뼟 지정할 수 있습니다. + 이미지를 넘기려면, CTRL-F4 키를 눌러 현재의 디스크를 빠져나오게 하고 목록에서 다음 디스크로 넘겨 주십시오. + 목록에서 마지막 디스크가 다 끝나면, 목록은 처음으로 다시 되돌아갑니다. + + - 알면 좋은 정보! + 내가 좋아하는 게임 정품이 디스켓이 3장 있다고 칩시다. + 게임을 설치하다가 '두 번째 디스켓을 넣으라', '세 번째 디스켓을 넣으라'할 때가 있을 것입니다. + 이 때 첍 번째 디스켓이 끝나면 CTRL-F4 키를 눌러 두 번째 디스켓으로 넘기게 하면 되고, + '세 번째 디스켓을 넣으라'라고 뜨면 또 다시 CTRL-F4 키를 눌러 세 번째 디스켓으로 넘기면 됩니다. + + [-l 드라이브 문자열] + 시동할 드라이브를 지정하는 매개 변수입니다. 플로피 드라이브는 기본값으로 A 드라이브입니다. + 하드 드라이브 이미지를 마스터로 시동하려면 "-l C"라고 지정하십시오. + 아니면 "-l D"로 지정하여 하드 드라이브 이미지를 슬레이브로 지정할 수도 있습니다. + + cart.jrc (PCJr 전용) + PCJr의 가상 구현이 켜져 있다면 카트리지는 BOOT 명령어를 써서 불러들일 수 있습니다. + 완전하게 지원하지는 않습니다. + + + +IPX + + DOSBox의 설정 구성 파일에서 IPX 네트워크가 켜져 있어야 합니다. + + 내부 DOSBox 프로그램인 IPXNET은 모든 방식의 IPX 네트워크를 관리합니다. + IPXNET HELP라고 입력하면 명령어들과 관련 문서를 나열하면서 + DOSBox 내부 IPX 네트워크의 도움말을 보여줍니다. + + 실제로 통신망을 설정하려면, 한쪽의 시스템은 서버가 되어야 합니다. + 이것을 설정하려면, DOSBox 구문에서 IPXNET STARTSERVER뼟 입력하십시오. + 서버 DOSBox 세션은 알아서 ꡸ 자체가 가상 IPX 네트워크에 추가됩니다. + 다시 말해, 가상 IPX 네트워크의 일부가 되어야 하는 다른 모든 컴퓨터에 맞게, + IPXNET CONNECT <컴퓨터 호스트 이름 또는 IP>뼟 입력해야 합니다. + 예뼟 들어, 서버가 bob.dosbox.com에 있다면, 서버가 아닌 시스템 쪽에서 + IPXNET CONNECT bob.dosbox.com이라고 입력하십시오. + + Netbios가 필요한 게임을 돌리려면 노벨(Novell)사의 NETBIOS.EXE가 필요합니다. + 위에서 말했던 IPX에 연결하려면 "netbios.exe"뼟 실행하십시오. + + 아래에 IPXNET 명령어 참조가 나와 있습니다: + + → IPXNET CONNECT + IPXNET CONNECT 다른 DOSBox 세션에서 실행되고 있는 IPX Tunneling 서버로 연결합니다. + + "주소" 매개 변수는 IP 주소나 서버 컴퓨터의 호스트 이름을 지정합니다. 사용할 UDP 포트도 지정할 수 있습니다. + 기본값으로 IPXNET는 213 포트, IPX Tunneling용으로 할당된 IANA 포트를 연결할 때 사용합니다. + + ※ IPX CONNET 구문은 ▼ + IPXNET CONNECT 주소 <포트> + + → IPXNET DISCONNECT + IPXNET DISCONNECT는 IPX Tunneling 서버와의 연결을 끊습니다. + + ※ IPXNET DISCONNECT의 구문은 ▼ + IPXNET DISCONNECT + + → IPXNET STARTSERVER + IPXNET STARTSERVER뼟 시작하면 IPX Tunneling 서버는 DOSBox 세션에 있게 됩니다. + 기본으로 서버가 바뀌어도 이 서버는 UDP 포트 213의 연결을 받아들입니다. + 서버가 시작되면, DOSBox는 자동으로 IPX Tunneling 서버에 클라이언트 연결을 시작합니다. + + ※ IPXNET STARTSERVER의 구문은 ▼ + IPXNET STARTSERVER <포트> + + 서버가 라우터 뒤에 있다면, UDP 포트 <포트>는 ꡸ 서버 컴퓨터에서 먼저 포워드되어야 합니다. + + 리눅스/유닉스 기반의 시스템에서는 1023보다 더 작은 값의 포트 번호는 루트 권한으로만 쓰일 수 있습니다. + 따라서 이러한 시스템을 쓰신다면 1023보다 더 큰 값으로 포트 번호뼟 지정하십시오. + + → IPXNET STOPSERVER + + IPXNET STOPSERVER 는 IPX Tunneling 서버를 이 DOSBox 세션에서 중지합니다. + 다른 연결들이 모두 종료되었는지 미댏 살펴 보아야 합니다. + 왜냐하면 서버를 중지해도 다른 컴퓨터가 IPX Tunneling 서버를 여전히 사용할 수 있기 때문입니다. + + ※ IPXNET STOPSERVER의 구문은 ▼ + IPXNET STOPSERVER + + → IPXNET PING + + IPXNET PING 은 Ping 요청을 IPX Tunneled 통신망을 통해 전송합니다. + 응답할 때에는 연결된 다른 모든 컴퓨터들이 Ping에 응답할 것이고 Ping 메시지를 죟고 받는 데 + 시간이 얼만큼 걸렸는지 알려 줍니다. + + ※ IPXNET PING의 구문은 ▼ + IPXNET PING + + → IPXNET STATUS + + IPXNET STATUS 는 DOSBox 세션의 현재 상태를 IPX Tunneling 네트워크에 알려 줍니다. + 네트워크로 연결된 컴퓨터의 목록을 보려늴 IPXNET PING 명령어를 사용하십시오. + + ※ IPXNET STATUS의 구문은 ▼ + IPXNET STATUS + + + +KEYB [키보드 레이아웃 코드 [코드 페이지 [코드 페이지 파일]]] + 키보드 레이아웃을 바꿉니다. 키보드 레이아웃에 대한 더 자세한 정보를 보려늴 + 꾏돸 8번 "키보드 레이아웃"을 읽어 보십시오. + + [키보드 레이아웃 코드] + 5개 이하의 문자열들을 이루는 레이아웃 코드입니다. + 이를테면 PL214 (폴란드 타자수)나 PL547 (폴란드 프로그래머)가 있습니다. + 이것은 키보드 레이아웃을 결정합니다. + DOSBox에 도입된 레이아웃 목록을 모두 보려늴 여기로 들어가 보십시오: + http://vogons.zetafleet.com/viewtopic.php?t=21824 + + [코드 페이지] + 코드 페이지의 숫자입니다. + 키보드 레이아웃은 지정된 코드 페이지에 대한 지원을 제공해야 합니다. + 숫자가 올바르지 않다면 레이아웃을 불러올 수 없습니다. + 코드 페이지가 지정되지 않으면 요청된 레이아웃에 대한 올바른 코드 페이지가 + 알아서 지정됩니다. + + [코드 페이지 파일] + DOSBox 안에 기본적으로 들어있지 않은 코드 페이지를 불러올 때 쓰입니다. + DOSBox가 코드 페이지를 찾을 수 없을 때에만 사용할 수 있습니다. + 코드 페이지 파일이 지정되지 않으면 DOSBox 프로그램 폴더에서 + ega.cpx 파일들 (FreeDOS에서 가져와서)을 모두 넣으십시오. + 요청된 레이아웃/코드페이지에 대한 적절한 코드 페이지 파일이 자동으로 + 선택됩니다. + + + 보기 : + 1) 폴란드 타자수 레이아웃을 읽어 들이려면 (코드 페이지 852가 알아서 주어집니다): + keyb pl214 + 2) 코드 페이지 866을 가진 러시아어 키보드 레이아웃을 읽어 들이려면: + keyb ru441 866 + 러시아어 문자열을 입력하려면 ALT-RIGHT-SHIFT뼟 누르십시오. + 3) 코드 페이지 850을 가진 프랑스어 키보드 레이아웃을 읽어 들이려면 + (코드 페이지의 위치는 EGACPI.DAT 안에 정의되어 있습니다): + keyb fr189 850 EGACPI.DAT + 4) 코드 페이지 858을 읽어 들이려면 (키보드 레이아웃 없이): + keyb none 858 + freedos keyb2 유틸리티를 사용해서 코드 페이지를 바꿀 수도 있습니다. + + + +더 자세한 정보를 보려늴 프로그램의 매개 변수에 /? 명령어를 사용하십시오. + +================ +5. 바로가는 키: +================ + +ALT-ENTER 전체 화면에서 ě°˝ / 창에서 전체 화면 +ALT-PAUSE 잠깐 늈윤 (ALT-PAUSE뼟 다시 누르면 다시 원래대로 돌아갑니다) +CTRL-F4 마운트된 플로피 CD 이미지들을 바꿉니다. 모든 드라이브에 대한 드라이브 캐시를 다시 불러옵니다. +CTRL-ALT-F5 화면의 동영상 녹화 실행 / 중지 (AVI) +CTRL-F5 스크린샷 저장 (PNG) +CTRL-F6 소리 출력을 웨이브(WAV) 파일로 기록 / 중지 +CTRL-ALT-F7 OPL 녹음 명령 실행 / 중지 +CTRL-ALT-F8 MIDI 녹음 명령 실행 / 중지 +CTRL-F7 프레임 무시 줄임 +CTRL-F8 프레임 무시 높임 +CTRL-F9 DOSBox 끝내기 +CTRL-F10 마우스 잠금 / 잠금 풀기 +CTRL-F11 가상 구현 느리게 (사이클 줄임) +CTRL-F12 가상 구현 빠르게 (사이클 늘림) +ALT-F12 속도 제한 해제 (터보 단추 / 뚨댏감기) +F11, ALT-F11 (machine=cga) NTSC 출력 모드의 tint 변경*** +F11 (machine=hercules) amber, green, white 색*** + +**알림 : Ctrl-F12 키를 너무 많이 눌러서, 또는 DOSBox.Conf의 [cpu]의 cycles 값을 너무 큰 값으로 + 지정하여 여러분이 가지고 있는 컴퓨터의 최대 성능의 한도를 넘어가버리면, + 오히려 에뮬레이션의 속도를 떨어뜨릴 수 있습니다. + 이 CPU 사이클 속도의 알맞은 값은 컴퓨터마다 다르며 표준으로 잡혀있지 않습니다. +** 알림: 여유로운 CPU 리소스가 필요합니다. 리소스가 많을수록 더 빠릅니다. + 그러므로 cycles=max뼟 사용한다든지 너무 높은 고장값을 cycles에 준다고 하여 + 속도 문제가 해결이 되는 것은 아닙니다. 키를 계속 눌러 보면서 동작을 살펴 보시기 바랍니다! + +*** 알림: 다른 기기(machine) 종류를 사용하면서 매퍼 파일을 일찍 저장했을 경우 이러한 키들은 동작하지 않을 것입니다. + 이 경우 키들을 다시 할당하거나 키보드 매퍼를 다시 설정하십시오. + +이것은 기본적인 키보드 조합입니다. 매핑 프로그램(Ctrl-F1)에서 바꿀 수 있습니다. (단락 7 매퍼 참쥰) + +MAC OS에서 cmd-ctrl-F1와 같은 키가 동작하지 않는다면 cmd(애플 키)와 Ctrl을 함께 사용할 수 있습니다. +그러나 일부 키들은 매퍼를 통하여 키를 다시 설정하여야 할 수도 있습니다. (리눅스에서도) + +저장된 파일들은 다음의 위치에서 찾을 수 있습니다. + (Windows) "시작/Windows 로고 메뉴"->"모든 프로그램"->DOSBox-0.74->Extras + (Linux) ~/.dosbox/capture + (MAC OS X) "~/Library/Preferences/capture" + +DOSBox 설정 구성 파일에서 이것을 바꿀 수 있습니다. + +============= +6. 조이스틱/게임패드: +============= +DOS의 표준 조이스틱 포트는 최대 4개의 축(axe)와 4개의 단추(button)뼟 지원합니다. +더 많이 사용할 경우 설정 구성 파일을 수정하여야 합니다. + +DOSBox가 다른 종류의 조이스틱/게임패드를 강제로 사용하게 하려면 +[joystick] 안의 joysticktype에 다음 값을 넣으면 됩니다. + + none - 컨트롤러 지원을 사용하지 않습니다. + + auto - (기본값) 하나 이상의 컨트롤러가 연결되어 있는지를 자동으로 알아냅니다: + 한 개: 4axis 설정이 사용됩니다. + 두 개: 2axis 설정이 사용됩니다. + + 2axis - 두 개의 컨트롤러가 연결되어 있으면 2개의 축과 2개의 단추가 있는 조이스틱을 + 가상으로 구현합니다. 하나의 컨트롤러만 연결되어 있다면 2개의 축과 2개의 단추가 + 있는 조이스틱을 가상으로 구현합니다. + + 4axis - 첍 번째 컨트롤러만 지원하며 4개의 축에 4개의 단추가 있는 조이스틱이나 + 2개의 축에 6개의 단추가 있는 게임패드를 가상으로 구현합니다. + + 4axis_2 - 두 번째 컨트롤러만 지원합니다. + + fcs - 첍 번째 컨트롤러만 지원하며 3개의 축과 4개의 단추, ꡸댏고 하나의 햇(hat)이 있는 + ThrustMaster Flight Control System을 지원합니다. + + ch - 첍 번째 컨트롤러만 지원하며 4개의 축과 6개의 단추, ꡸댏고 하나의 햇(hat)이 있는 + CH 플라이트스틱을 가상으로 구현합니다. 그러나 동시에 단추 하나를 초과하여 + 동시에 누를 수는 없습니다. + + 또, 게임 안에서 컨트롤러를 올바르게 설정하여야 합니다. + + 조이스틱 설정이 없는 매퍼 파일을 저장하였거나 다른 조이스틱 설정을 갖춘 매퍼 파일을 사용하면 + DOSBox 매퍼 파일을 다시 설정하지 않는 한 새로운 설정은 올바르게 동작하지 않거나 완전히 + 동작하지 않을 것입니다. + + 컨트롤러가 DOSBox 밖에서 올바르게 동작하지만 DOSBox 안에서 올바르게 캘리브레이션(calibration) + 과정을 거치지 않았다면 DOSBox 설정 구성 파일(DOSBox.Conf)의 timed 설정값을 바꿔 보십시오. + + +============= +7. 매퍼: +============= + +DOSBox 매핑 프로그램을 시작할 때 Ctrl-F1 키(5번 꾏돸 바로가기 키 참고) 또는 명령 줄 매개변수에다 +-startmapper뼟 추가하여(꾏돸 3 명령 매개변수 참고) 가상 키보드와 가상 조이스틱을 지정할 수 있습니다. +가상 키보드와 가상 조이스틱이 화면에 나타납니다. + +이러한 가상 장치들은 DOSBox에서 쓰이는 키와 일치하며 DOS 응용 프로그램에 보고합니다. +마우스로 키를 누르면 왼쪽 아래 모서리에서 키보드의 어떠한 키가 ꡸ 키와 +일치하는지를 ëłź 수 있습니다. + +Event: EVENT +BIND: BIND (손가락으로 누르는 실제 키 / 단추 / 축) + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENT + DOSBox에서 실행하고 있는 응용 프로그램에 보고할 해당 키나 조이스틱의 축/단추/햇 + (게임하는 동안에 일어나는 이벤트 - 예: 총 쏘기/점프/깡기) + +BIND + EVENT와 연결된 사용자의 실제 키보드의 키 또는 실제 조이스틱의 축/단추/햇 + (SDL이 보고합니다) + +mod1,2,3 + 수정 키들입니다. BIND뼟 누르는 동안 눌러야 하는 키들입니다. + mod1 = CTRL 이고 mod2 = ALT 입니다. + 일반적으로 여러분이 DOSBox의 단축키를 바꾸고자 할 때 사용하시면 됩니다. +Add + 이 EVENT에 새로운 BIND뼟 추가합니다. + 기본적으로 DOSBox에서 EVENT 키를 만들어내는 '사용자의 키보드' 에서 키를, + 또는 '조이스틱의 단추 눌림, 축/햇 이동' 이벤트를 추가합니다. +Del + BIND뼟 이 EVENT로 삭제합니다. + EVENT가 BINDS뼟 가지고 있지 않으면 DOSBox에서 이 이벤트를 입력할 수 없습니다. + 다시 말해, 키를 입력하거나 조이스틱을 동작시킬 수 없습니다. +Next + 이 EVENT로 매핑된 BINDS들의 목록을 통해 계속 반복됩니다. + + + +* 보기 +물음1. DOSBox에서 Z뼟 입력하면 X로 뜨게 하고 싶습니다.. +풀이. 마우스로 키보드 매퍼에 있는 Z뼟 누르십시오. ꡸댏고 "Add"뼟 누르십시오. + 그런 다음에 키보드에서 X 키를 누르십시오. + +물음2. "Next"뼟 두 번 누른다면 여러분이 키보드의 Z뼟 입력할 때 DOSBox에서 Z가 입력되는 것을 알 수 있습니다. +풀이. 그러므로 다시 Z뼟 누르고 키보드에서 Z뼟 사용할 수 있을 때까지 "Next"뼟 누르십시오. + 이제 "Del"을 누르십시오. + +물음3. DOSBox에서 입력하고자 할 때, 여러분은 X뼟 누르면 ZX로 뜨는 것을 ëłź 수 있습니다. +풀이. 키보드 상의 X는 여전히 X로 매핑이 되어 있습니다! + 키보드 매퍼의 X뼟 누른 뒤, 매핑된 키 X뼟 찾을 때까지 "Next"로 계속 찾아 보십시오. + ꡸댏고 "Del"키를 누르십시오. + +조이스틱 매핑 보기: + 조이스틱이 장착되어 있고 DOSBox에서 제대로 동작하며 몇 가지 키보드 전용 게임을 조이스틱으로 + 쌐기고 싶다고 칩시다. (게임이 키보드의 방향키로 제어된다고 가정할 때) + + 1) 매핑 프로그램을 열고 화면 왼쪽의 키보드 방향키들 가운데 하나를 누르십시오. + EVENT는 key_left가 되어야 합니다. 이제 Add뼟 누르고 각 방향으로 + 조이스틱을 움직이십시오. 이것은 이벤트를 BIND에 추가하는 방법입니다. + 2) 매핑하지 않았던 나머지 방향 단추를 또한 추가해야 하므로 + 위의 방법을 되풀이 하십시오. 조이스틱의 단추(Fire/Jump)도 돟률 매핑할 수 있습니다. + 3) Save뼟 누르고 Exit을 눌러 게임을 실행하십시오. + + 몇몇 비행 시뮬레이션 게임들이 조이스틱의 위/아래 이동이 여러분이 좋아하지 않는 + 방식을 사용하기 때문에, 또 게임 자체에서 구성할 수 없기 때문에 + 조이스틱의 y축을 바꾸고 싶다고 칩시다. + + 1) 매핑 프로그램을 열고 첍 번째 조이스틱 영역 안에 있는 Y-을 누르십시오. + EVENT는 jaxis_0_1- 이 되어야 합니다. + 2) Del을 눌러 현재의 Bind뼟 지웁니다. ꡸댏고 Add뼟 누르고 조이스틱을 아래로 이동합니다. + 새로운 Bind가 만들어졌습니다. + 3) Y+에 맞춰서 이 방법을 되풀이하십시오. + ꡸댏고 레이아웃을 저장하고 게임을 실행하십시오. + +d-pad/hat의 어떠한 것이든 다시 매핑하고 싶으면 설정 구성 파일(DOSBox.Conf)에서 +joysticktype=auto뼟 joysticktype=fcs로 바꾸어야 합니다. 이것은 다음 DOSBox 버전에서 +개선될 것입니다. + +"Save"뼟 눌러서 기본 키보드/조이스틱 매핑에서 사용자가 변경한 사항들을 따로 저장할 수 있습니다. + +DOSBox는 보통 DOSBox.Conf에 지정된 위치를 mapperfile=mapper.txt 로 잡고 있습니다. +(즉, 위의 값을 사용자가 수정하면 ꡸ 수정했던 내용을 mapper.txt 파일로 저장한다는 뜻입니다) +DOSBox뼟 시작하면 DOSBox.Conf 안에 있는 mapperfile= 뒤에 지정된 파일의 내용을 불러옵니다. + + +==================== +8. 키보드 레이아웃 +==================== + +다른 키보드 레이아웃으로 바꾸려면 DOSBox.Conf 안에 있는 [dos] 구문에 있는 +"keyboardlayout"의 값을 바꾸거나 DOSBox 내부 프로그램인 keyb.com을 이용하십시오. +두 방법 모두 DOS 호환 언어 코드를 가져 옵니다. (아래에 나와 있습니다) +다만 코드 페이지는 keyb.com로만 바꿀 수 있습니다. (꾏돸 4 : 내부 프로그램) + +기본 keyboardlayout=auto는 현재 Windows에서만 동작합니다. +이 언어는 운영 체제의 언어에 따라 선택되지만 키보드 레이아웃을 감지되지 않습니다. + +레이아웃 바꾸기 + 수 많은 키보드 레이아웃과 코드 페이지를 기본으로 지원합니다. + 이 때 DOSBox는 레이아웃 검색자가 지정되어야 합니다. + (보기 : DOSBox 설정 구성 파일에서 keyboardlayout=PL214 지정하거나 + DOSBox 명령 프롬프트에서 "keyb PL214"라고 입력) DOSBox에서 사용할 + 수 있는 키보드 레이아웃 목록은 여기에 있습니다: + http://vogons.zetafleet.com/viewtopic.php?t=21824 + + 몇몇 키보드 레이아웃들(예뼟 들어 레이아웃 GK319 코드 페이지 869와 레이아웃 RU441 + 코드 페이지 808)은 이중 레이아웃을 지원합니다. 이 기능은 왼쪽 ALT-오뼸쪽 SHIFT뼟 + 눌러서 하나의 레이아웃을 접근하거나 왼쪽 ALT-왼쪽-SHIFT뼟 눌러 다른 레이아웃에 접근할 + 수 있습니다. LT456 코드페이지 771ęłź 같은 일부 키보드 레이아웃은 이러한 레이아웃을 + 지원하며 왼쪽 ALT+왼쪽 CTRL로 접근할 수 있습니다. + +지원하는 외부 파일 + Freedos .kl 파일들(freedos keyb2 키보드 레이아웃 파일)을 비롯하여 + 사용할 수 있는 .kl 파일로 구성되어 있는 Freedos keyboard.sys/keybrd2.sys/keybrd3.sys + 라이브러리를 지원합니다. + DOSBox에 내장된 레이아웃이 어떠한 까닭으로 동작하지 않으면 + http://www.freedos.org 에서 미댏 컴파일된 키보드 레이아웃을 살펴 보시기 바랍니다. + + .CPI (MSDOS 호환 코드 페이지 파일)ęłź .CPX (UPX로 압축된 Freedos 코드 페이지 파일) + 둘 다 쓸 수 있습니다. 몇몇의 코드 페이지는 DOSBox에 들어 있기 때문에 + 외부 코드 페이지 파일을 따로 가져다 쓰지 않으셔도 됩니다. + 또는 다른 사용자가 만든 코드 페이지 파일을 써야 한다면 DOSBox 구성 파일이 있는 + 디렉터리에 복사하여 DOSBox가 접근할 수 있게 해야 합니다. + 10개의 모든 ega.cpx 파일들 (FreeDOS에서 가져옴)이 DOSBox 폴더에 있으면 + 요청된 레이아웃/코드페이지에 대한 적절한 코드 페이지 파일이 자동으로 + 선택됩니다. + + 따로 추가되는 레이아웃은 일치하는 .kl 파일을 DOSBox.Conf가 있는 디렉터리로 + 복사하고 언어 코드를 파일 이름의 첍 번째 부분을 사용하여 추가될 수 있습니다. + 보기: UZ.KL 파일이 있다면 UZ.KL (우즈베키스탄의 키보드 레이아웃) + DOSBox.Conf에서 "keyboardlayout=uz"라고 지정하십시오. + 이러한 키보드 레이아웃들의 통합(keybrd2.sys) 은 의도된 바와 비슷하게 동작합니다. + + +키보드 레이아웃은 다른 나라의 문자열들을 받아들일 수 있지만 파일 이름 안에 +꡸ 문자열들을 쓸 수 없습니다. +DOSBox 안에서 뿐만 아니라 DOSBox가 접근할 수 있는 호스트 운영 체제에 +있는 파일들 안에서도 이 문자열들을 사용하는 것은 삼가시기 바랍니다. + + +============================== +9. 시리얼 멀티플레이어 기능 +============================== + +DOSBox는 시리얼 널모뎀(nullmodem) 케이블을 네트워크와 인터넷을 깰쳐 +가상으로 구현합니다. +DOSBox 설정 구성 파일에 있는 [serialports] 구문에서 구성하실 수 있습니다. + +널모뎀에 연결하면 한쪽은 서버, 나머지 한쪽은 클라이언트가 됩니다. + +DOSBox 설정 구성 파일을 다음과 같이 구성해야 합니다: +서버: + serial1=nullmodem + +클라이언트: + serial1=nullmodem server: + +이제 게임을 실행하여 +nullmodem (널 모뎀) / serial cable (직렏 케이블) / +already connected as multiplayer method on COM1 (COM1에 멀티플레이어 방식으로 이미 연결됨) +가운데 하나를 고르십시오. 두 컴퓨터에다 같은 ëł´(baud) 속도를 지정하십시오. + +이뿐 아니라 다음의 변수를 지정하여 nullmodem 연결 방식을 제어할 수 있습니다. +여기에 매개 변수가 모두 모여 있습니다: + + * port: - TCP 포트 번호. 기본값: 23 + * rxdelay: - 인터페이스가 준비되지 않았다면, 받은 데이터를 얼만큼 + 오랫동안 지연할지 결정합니다 (단위 : 밀리초) + DOSBox 상태 창에서 Overrun(오버런) 오류가 뜨면 이 값을 높이십시오. + 기본값: 100 + * txdelay: - 패킷을 보내기 전에 얼만큼 오랫동안 데이터를 받을지 결정합니다. + 기본값 : 12 (네트워크의 부하를 덜어 줍니다) + * server: - 이 nullmodem은 지정된 서버에 연결되는 클라이언트가 됩니다. (server에 인수가 없으면 서버가 됩니다) + * transparent:1 - 시리얼 데이터만 보냅니다. RTS/DTR 상호 교환(handshake)은 없습니다. + nullmodem이 아닌 장치에 연결할 때 사용하십시오. + * telnet:1 - 원격 사이트가 보낸 텔넷 데이터를 해석합니다. 자동으로 투명하게 처리됩니다. + * usedtr:1 - DOS 프로그램이 DTR을 쟤 때까지 연결되지 않게 합니다. + 모뎀 터미널을 쓸 때 유용합니다. 자동으로 투명하게 처리됩니다. + * inhsocket:1 - 명령 줄을 깰쳐 DOSBox로 보내진 소켓을 사용합니다. 자동으로 투명하게 + 처리됩니다. (Socket Inheritance: 새로운 BBS 소프트웨어 상에서 + 오래된 DOS 도어 게임을 돌릴 때 쓰입니다) + +보기: TCP 포트 5000에 서버 리스닝 처댏. + serial1=nullmodem server: port:5000 rxdelay:1000 + + +=================================== +10. DOSBox 속도 쥰절 +=================================== + +DOSBox는 CPU, 사운드 카드, 그래픽 카드, ꡸댏고 다른 여러 주변 기기들을 +한꺼번에 가상으로 구현해 냅니다. +가상으로 구현되는 DOS 응용 프로그램의 속도는 CPU 사이클(얼마나 많은 +함수가 가상으로 구현되느냐)이 결정합니다. + +CPU 사이클 (속도 높이고 낮추기) + cycles=auto가 기본으로 잡혀 있는데 이로써 DOSBox는 + 실행하려는 게임이 될 수 있으면 많은 함수를 써야 하는 게임인지 + 그렇지 않은 게임인지를 알아냅니다. + + 게임이 바라던 바와 관계 없이 될 수만 있다면 돴쥰깴 함수를 많이 쓰게 하려면 + DOSBox 설정 구성 파일에서 cycles=max로 놓으십시오. (cycles=max로 두면 + 가끔은 속도가 너무 빠르거나 안정적이지 않을 수도 있습니다) + cycles=3000ęłź 같은 고정 값을 사용하면 속도가 너무 느리거나 너무 뚠뼟 수 있습니다. + 그러나 DOSBox 설정 구성 파일의 다른 설정을 수동으로 강제 설정할 수 있습니다. + + DOSBox 설정 구성 파일(DOSBox.Conf)의 cycles에 고정된 값을 설정하여 속도를 강제로 + 낮추거나 높일 수 있습니다. 이를테면 cycles=10000으로 두면 DOSBox ě°˝ 맨 위에는 + Cpu Speed: fixed 10000 cycles가 나타납니다. + 이 상태에서 CTRL-F11을 눌러 속도를 줄이거나 CTRL-F12뼟 눌러 속도를 빠르게 할 수 + 있습니다만 이는 컴퓨터 PC의 한 개의 코어의 힘에 제한을 받습니다. + + 여러분의 실제 CPU가 얼마나 여유가 있는지 알아 보려늴 + 다음의 과정을 따르십시오. + Windows 2000/XP/2003/Vista/7 : 작업 관리자 (Ctrl-Shift-Esc) + Windows 95/98/ME : 시스템 모니터 + + 컴퓨터의 실제 CPU 코어 하나가 100%뼟 차지하고 있다면 DOSBox뼟 더 빠르게 + 할 방법은 없습니다. (DOSBox의 CPU가 아닌 장치들이 주는 부하를 줄이지 않는 한) + + DOSBox는 CPU의 코어 하나만 사용할 수 있으므로 이를테면 4개의 코어를 지닌 CPU뼟 사용한다면 + DOSBox는 다른 코어의 힘을 사용하지 못합니다. + + cycles=auto로 설정해 두고 나서 함수를 최대한 많이 쓰는 게임을 실행하거나 + cycles=max로 설정해 두었다면 DOSBox ě°˝ 맨 위에는 "CPU Cycles : Max 100% cycles"라고 나타납니다. + 이 때에는 CPU 코어가 얼마나 많은 리소스를 차지하는지 사용자가 고려할 필요는 없습니다. + 이 방식에서 % (퍼센테이지) 기반으로 사이클의 범위를 줄이거나 (CTRL-F11) + 다시 높일 수 있습니다 (CTRL-F12). + +CPU 코어 (속도 향상) + x86 기반에서 유동적으로 다시 컴파일되는 코어를 사용할 수 있습니다 + (DOSBox 설정 구성 파일에서 core=dynamic으로 설정) + 자동 감지(core=auto)가 제대로 되지 않을 때 더 나은 결곟뼟 가져다 + 줍니다. 여기에다 cycles=max로 두면 가장 나은 성능을 보여줍니다. + 그러나 cycles=20000ęłź 같이 높은 고정값을 사용해도 됩니다. + Dynamic 코어 때문에 오히려 느려지거나 아예 동작하지 않거나 + 충돌하는 게임이 있을 수 있습니다! + +그래픽 가상 구현 (속도 향상) + VGA 에뮬레이션은 DOSBox에서 CPU 사용률을 가장 많이 차지하는 부분입니다. + Ctrl-F8 키를 눌러서 프레임 무시 값을 높여 보십시오. + 고정된 사이클 값을 사용하면 CPU 사용률을 줄일 수 있으며 CTRL-F12키를 눌러 + 사이클을 높일 수도 있습니다. + 게임 속도가 빨라질 때까지 프레임 무시값을 올리는 것을 여러 번 되풀이하십시오. + 그러나 알아둘 것은 : 프레임을 너무 많이 무시해 버리면 속도는 얻지만 + 게임의 부드러움은 잃게 됩니다 + +사운드 가상 구현 (속도 향상) + 게임 설정 유틸리티에서 사운드를 ęşź 놓아서 CPU로 가는 부하를 덜 수 있습니다. + nosound=true로 놓는 것은 소리만 나오지 않는 것이지 사운드 장치를 끄는 것이 + 아닙니다. + + +게다가 DOSBox가 되도록 많은 리소스를 쓸 수 있도록 DOSBox뼟 제외한 모든 프로그램을 닫으십시오. + + + +고급 사이클 설정 +cycles=auto와 cycles=max 설정은 시작 기본값을 다르게 지정할 수 있습니다. + +꾏돸 + cycles=auto ["리얼모드 기본값"] ["보호 모드 기본값"%] + [limit "사이클 최대값"] + cycles=max ["보호 모드 기본값"%] [limit "사이클 최대값"] + +보기: + cycles=auto 5000 80% limit 20000 + 이렇게 지정하면 리얼 모드 게임에서 cycles=2000을 사용합니다. + 또 보호 모드 게임을 쌐길 때 사이클 제한을 20000으로 두면서 CPU뼟 80% 점유합니다. + + +=================== +11. 문제 해결 : +=================== +일반 팁: + DOSBox 상태 창의 메시지를 확인해 보십시오. (꾏돸 12 "DOSBox 상태 ě°˝"을 참조하십시오) + +DOSBox뼟 실행하자마자 바로 충돌합니다: + - output= 항목에 다른 값을 넣어 보십시오. (DOSBox 설정 구성 파일에서) + - 그래픽 카드 드라이버와 DirectX뼟 업데이트해 보십시오. + - (리눅스) 환경 변수 SDL_AUDIODRIVER뼟 alsa나 oss로 설정해 보십시오. + +어떤 게임을 실행하면 DOSBox가 닫히면서, 어떤 메시지가 나타나거나 늈윰 있으면서 충돌합니다: + - DOSBox뼟 설치한 뒤 설정 구성 파일(DOSBox.Conf)을 건드리지 마십시오. + - 사운드를 ęşź 보십시오 (게임과 함께 따라오는 사운드 구성 프로그램을 사용해 보거나, + DOSBox 설정 구성 파일에서 sbtype=noneęłź gus=false뼟 사용해 보십시오) + - DOSBox 설정 구성 파일의 일부 항목을 바꿔 보십시오. 예뼟 들면: + core=normal + 고정 사이클 (예뼟 들면 cycles=10000) + ems=false + xms=false + 또는 위의 설정에 대한 조합. + 이와 비슷하게 machine에서도 칩셋과 기능을 제어할 수 있습니다. + machine=vesa_nolfb + 또는 + machine=vgaonly + - 명령 프롬프트에서 loadfix뼟 입력하고 게임을 실행하십시오 + +게임이 어떠한 오뼘 메시지를 보여주며 DOSBox 프롬프트로 ëš ě ¸ 나갑니다. + - 오류가 적힌 말을 꼼꼼히 읽으시고 오류가 일어난 까닭을 살펴 보십시오. + - 위의 구문들에 있는 도움말들을 따르십시오. + - 설치 위치에 꽤 민감한 게임들이 있으므로 이 때에는 마운트를 다르게 해 보십시오. + 예뼟 들어 "mount d d:\oldgames\game"로 실행해 왔다면 + 한 번 "mount c d:\oldgames\game"와 "mount c d:\oldgames"로도 해 보십시오. + - 게임이 CD-ROM을 요구하면 마운트할 때 "-t cdrom"을 사용해야 합니다. + 돟률 다른 매개 변수들(ioctl, usecd, ꡸댏고 label 스위치 등 : 적절한 사용법을 읽어볼 것)도 지정해 보십시오. + - 게임 파일의 접근 권한을 확인해 보십시오 (읽기 전용 특성이 있다면 제거하시고 쓰기 특성이 있다면 추가하십시오) + - DOSBox 안에서 게임을 다시 설치해 보십시오. + +=================== +12. DOSBox 상태 ě°˝: +=================== +DOSBox 상태 창은 DOSBox가 동작하는 가운데 현재의 설정에 대한 유용한 정보를 많이 제공합니다. +오류에 대한 정보도 제공합니다. DOSBox에 문제가 있으면 이 메시지를 참고하시면 됩니다. + +DOSBox 상태 창을 시작하려면: +(Windows) 상태 창은 DOSBox 기본 창곟 함께 시작됩니다: +(Linux) 콘솔에서 DOSBox뼟 시작해야 상태 창이 나타납니다. +(MAC OS X) DOSBox.app에 마우스 오뼸쪽 단추를 누르고 "패키지 콘텐츠 보기"→"콘텐츠"로 들어간 뒤→ + "MacOS"에 들어가서→"DOSBox"뼟 실행하면 됩니다. + + +=================== +13. 설정 구성 (옵션) 파일 : +=================== + +설정 구성 파일은 DOSBox뼟 처음 실행하자마자 자동으로 만들어집니다. + +이 파일은 여기에 있습니다: +* Windows: "시작 / Windows 로고 메뉴"->"모든 프로그램"->DOSBox-0.74->옵션 +* Linux : ~/.dosbox/dosbox-0.74.conf +* MacOSX : ~/Library/Preferences/DOSBox Preferences + +이 파일은 여러 구문으로 나뉩니다. (항목 [] 사이에 있는 이름들로) +이 설정은 속성=값 줄로 되어 있으며 여기서 값은 DOSBox에서 바꿀 수 있는 설정 값입니다. + +#와 %는 사용법이나 도움말을 뜻합니다. + +CONFIG.COM로 특별한 구성 파일을 만들 수 있습니다. 이 파일은 내부 DOSBox Z: 드라이브에서 +찾을 수 있습니다. CONFIG.COM뼟 어떻게 쓰는지 살펴 보려늴 꾏돸 4 "내부 프로그램"을 읽어 보십시오. +DOSBox뼟 직접 구성할 수 있도록 만들어진 구성 파일을 수정할 수 있습니다. + +만들어진 구성 파일은 현재 쓰고 있는 설정값을 담고 있으며 설정을 바꾼 다음에 -conf 스위치로 +저장된 파일의 새로운 값을 불러오실 수도 있습니다. +-conf 스위치에 설정 구성 파일이 지정되어 있지 않으면, DOSBox는 현재의 디렉터리에서 +dosbox.conf뼟 찾고자 합니다. dosbox.conf가 없다면 DOSBox는 사용자 구성 파일을 불러올 것입니다. +이 파일은 존재하지 않으면 새로 만듭니다. + +중요: Windows Vista/7에서 설정 구성 파일이 Windows 또는 Program Files 폴더, 또 ꡸ 하위 폴더, 아니면 + c:\에 위치하면 올바르게 동작하지 않습니다. 가장 좋은 위치는 예뼟 들면 C:\oldgames와 같은 + 곳입니다. + + +====================== +14. 언어 파일 : +====================== + +내부 DSOBox Z:에 위치한 CONFIG.COM로 언어 파일을 만들 수 있습니다. +꾏돸 4: 내부 프로그램을 참조하십시오. + +언어 파일을 ㅇ릭어 ëł´ęł  이해할 수 있는 항목을 원하는대로 바꾸어 보십시오. + +DOSBox에다 -lang 스위치를 덧붙여서 새로운 언어 파일을 쓸 수 있고, +아니면 [dosbox] 구문의 구성 파일의 이름을 놓을 수 있습니다. +다시 말하면 'language = 항목'이며, 여기에 파일 이름을 넣으시면 됩니다. + + + +======================================== +15. 나만의 DOSBox 만들기 +======================================== + +소스를 내려 받으신 다음 INSTALL 파일을 천천히 읽어 보십시오. + + + +=================== +16. 고마운 분들 : +=================== + +THANKS 파일을 읽어 보십시오 + + + +============ +17. 연락처 : +============ + +이 사이트에 들어가 보십시오 : +http://www.dosbox.com +전자우편 주소는 Crew 페이지에 나와 있습니다. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/ko/USAGE-0.72.txt dosbox-staging-0.77.0/contrib/old-translations/ko/USAGE-0.72.txt --- dosbox-staging-0.76.0/contrib/old-translations/ko/USAGE-0.72.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/ko/USAGE-0.72.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,78 @@ +---------------------------------------------------------------- + + 1. 공식 사이트 + + 공식 홈페이지 주소 : http://dosbox.sourceforge.net + 공식 영돸 포럼 : http://vogons.zetafleet.com + + + 2. 도스박스 다음 카페에서 글 옮김 + + English (영어): http://ykhwong.x-y.net + Korean (한국 포럼): http://cafe.daum.net/dosbox + + 옮긴이 : 유태웅 (전자우편 ykhwong@hanmail.net) + 엠에스엔 아이디: ykhwong@msn.com + +---------------------------------------------------------------- + +안녕하세요, 도스박스 다음 카페지기입니다. + +도스박스는 GNU에 근거한 공개 소스 기반의 프로젝트이며, 최신의 컴퓨터에서 돌아가지 않는 +도스용 게임이나 프로그램을 돌리기 위해 개발되었습니다. + +NT 기반의 운영체제에서 뿐만 아니라 다른 여러 플랫폼에서도 돌아갑니다. + + +압축 파일 안에는 "DOSBox 정식 버전"을 위한 언어 파일과 설명서가 포함되어 있습니다. + +이 압축 파일은 http://dosbox.sourceforge.net의 Downloads 섹션에서 다음의 항목을 눌러서 내려 +받으실 수 있습니다. + + Korean languagefile+Readme 0.xx DOSBox in Korean + + + +1. 설명서 파일 + + DOSBox의 한국어 설명서는 버전 업데이트를 거침에 따라 꾸준히 그에 맞추어 업데이트되어 왔습니다. + 도스박스 정식 버전에 맞추어져 있는 우리말로 된 설명서입니다. 메모장으로 보시면 편합니다. + + +2. 언어 파일 사용하기 + + DOSBox에서는 다른 나라의 언어를 지원하기 위한 시스템이 구축되어 있습니다. + + 1) 먼저, 제공된 압축 파일 안에 있는 Korean.lang 파일을 DOSBox가 설치된 ęłł, + 예뼟 들어 Program Files\DOSBox-0.xx에 압축을 푸십시오. + + 2) HBIOS.COM 파일과 같은 한글 바이오스를 내려 받아 DOSBox가 설치된 곳에 + 복사합니다. + + 3) DOSBox.Conf뼟 메모장으로 열고 language=korean.lang로 지정합니다. + 또한, [autoexec] 아래 줄에다가 한글 BIOS의 실행 파일에 관한 줄을 추가합니다. + 예뼟 들어, hbios.com가 c:\에 있다면 다음의 줄을 추가하면 됩니다. + + [autoexec] + mount y . + hbios + + 4) 모두 다 되었으면 설정 파일을 저장하십시오. + 5) dosbox.exe뼟 실행하시면 실행되자마자 한글 BIOS가 실행되고 언어 파일을 불러들여 보여 줍니다. + + + - 알아둘 것 + * korean.lang 파일은 DOSBox 정식 버전에서만 돌아가도록 설계되었습니다. + * Windows Vista에서는 dosbox.exe뼟 관리자 권한으로 실행해야 한국어 파일이 적용됩니다. + * 적절한 한글 BIOS뼟 사용하시기 바랍니다. 한글 BIOS는 수많은 도스용 게임과 충돌을 야기한다는 사실 또한 잊지 마십시오. + + + +!!! 끝으로 !!! + +도스박스 다음 카페는 정식 버전에서 제공하지 않는 특별한 기능을 담은 도스박스 특별 버전을 제공합니다. +초보자 누구든지 도스박스의 메뉴에 접근하여 쉽게 게임을 쌐길 수 있으며 여러가지 특별한 기능들이 제공됩니다. +자세한 정보를 보시려면 도스박스 다음 카페의 영돸 페이지나 한국어 페이지에 들어가시기 바랍니다. + + +감사합니다. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/ko/version.txt dosbox-staging-0.77.0/contrib/old-translations/ko/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/ko/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/ko/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,2 @@ +Korean 0.72 +Korean 0.74 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/ko/zmbv-0.72/README.txt dosbox-staging-0.77.0/contrib/old-translations/ko/zmbv-0.72/README.txt --- dosbox-staging-0.76.0/contrib/old-translations/ko/zmbv-0.72/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/ko/zmbv-0.72/README.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,33 @@ +도스박스에 화면 출력을 동영상으로 만들 수 있는 기능이 들어가 있습니다. + +동영상을 녹화하려면, CTRL-ALT-F5뼟 누르십시오. +녹화를 그만하려면, CTRL-ALT-F5뼟 다시 누르십시오. + +녹화된 영상을 재생하려면 ZMBV 코덱을 다룰 수 있는 동영상 플레이어가 갖춰져 있어야 합니다. +MS Windows 사용자들은 DOSBox의 시작 메뉴 항목에서 이 코덱을 찾을 수 있습니다. +리눅스와 다른 운영체제를 쓰시는 분들은 ffmpeg 라이브러리를 사용하는 동영상 플레이어를 +찾아 보시기 바랍니다. 업데이트를 하시거나 업그레이드를 요청해야 할 수도 있습니다. + +* 자주 묻는 질돸 +질돸 : 동영상을 보는데 소리가 끊어집니다. +답변 : 디스플레이 설정에 들어가서 화면 재생 빈도가 적어도 70Hz는 되는지 + 살펴 보십시오. Virtualdub에서 동영상을 재생해 보십시오 (http://virtualdub.sf.net) + +질돸 : 어째서 동영상이 여러 개의 파일로 나뉘어집니까? +답변 : 게임 해상도가 바뀔 때마다 DOSBox는 동영상 파일을 새로 하나 만들어냅니다. + 동영상 파일은 하나의 해상도만 포함할 수 있기 때문입니다. + +질돸 : 녹화할 때 제 PC가 받아들일 수 있는 것 보다 더 많은 사이클을 설정할 수 있습니까? +답변 : 할 수 있습니다. 녹화를 하면서 게임은 느리고 버벅일 수 있습니다만 + 녹화된 동영상 결과물은 정해진 뚠뼴기뼟 버벅임 없이 그대로 간직합니다. + +질돸 : 리눅스에서 CTRL-ALT-F5가 콘솔로 바뀝니다. +답변 : + 1. DOSBox뼟 다음과 같이 실행하십시오: dosbox -startmapper + 2. Video(비디오)뼟 누르고 Add(추가)뼟 누르십시오. + 3. 원하는 키를 선택하십시오. (예뼟 들면 Scroll Lock 또는 PrintScreen 키) + 4. exit을 누르십시오. + 5. 사용자가 지정한 키(예뼟 들어 Scroll Lock키)뼟 눌러서 동영상을 만들 수 있습니다. + +질돸: 64비트 Windows뼟 쓰고 있는데 색이 이상합니다 +답변: 여기로 들어가 보십시오: http://vogons.zetafleet.com/viewtopic.php?t=12133 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/nl/DOSBox-0.74.conf dosbox-staging-0.77.0/contrib/old-translations/nl/DOSBox-0.74.conf --- dosbox-staging-0.76.0/contrib/old-translations/nl/DOSBox-0.74.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/nl/DOSBox-0.74.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,243 @@ +# Dit is het configuratiebestand voor DOSBox 0.74. (Gebruik de nieuwste versie van DOSBox.) +# Regels die met # beginnen, worden als commentaar geďnterpreteerd en door DOSBox genegeerd. +# Met commentaarregels kun je een (korte) beschrijving van elke optie geven. + +[sdl] +# fullscreen: DOSBox rechtstreeks op volledig scherm starten. (Druk op Alt+Enter om terug te gaan). +# fulldouble: Dubbele buffering gebruiken bij weergave op volledig scherm. Hierdoor gaat het beeldscherm mogelijk minder flikkeren, maar wordt DOSBox mogelijk ook traag. +# fullresolution: De resolutie die moet worden gebruikt voor weergave op volledig scherm: oorspronkelijk of vaste grootte (bijv. 1024×768). +# Het resultaat is mogelijk optimaal als je de eigen resolutie van je beeldscherm gebruikt en ASPECT instelt op TRUE. +# Heb je een groot scherm en zie je een klein venster, kies dan een uitvoerindeling die verschilt van het beeldoppervlak. +# windowresolution: Het venster op dit formaat schalen míts het uitvoerapparaat hardwareschaling ondersteunt. +# (Schalen wordt niet ondersteund als OUTPUT is ingesteld op SURFACE!) +# output: Het videosysteem dat voor de uitvoer wordt gebruikt. +# Mogelijke waarden: surface, overlay, opengl, openglnb, ddraw. +# autolock: De muis automatisch blokkeren bij het klikken op het scherm. (Druk op Ctrl+F10 om de blokkering op te heffen.) +# sensitivity: De gevoeligheid van de muis. +# waitonerror: Als in DOSBox een fout is opgetreden: wachten voordat de console wordt gesloten. +# priority: Prioriteitniveaus voor DOSBox. De tweede waarde achter de komma wordt gebruikt wanneer DOSBox niet de focus heeft of is geminimaliseerd. +# Voor de tweede waarde kun je alleen PAUSE opgeven. +# Mogelijke waarden: lowest, lower, normal, higher, highest, pause. +# mapperfile: Het bestand waaruit de toets-/gebeurtenisparen worden geladen of het bestand waarin deze worden opgeslagen. RESETMAPPER werkt alleen met de standaardwaarde. +# usescancodes: Het gebruik van Symkeys vermijden. Deze optie werkt mogelijk niet op alle besturingssystemen. + +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper-0.74.map +usescancodes=true + +[dosbox] +# language: Een ander taalbestand selecteren. +# machine: Het type computer dat moet worden geëmuleerd. +# Mogelijke waarden: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe. +# captures: De directory waarin bijvoorbeeld WAVE- en MIDI-bestanden en schermopnamen worden vastgelegd. +# memsize: De hoeveelheid geheugen voor DOSBox in megabytes. +# Laat de standaardwaarde ongewijzigd om problemen met sommige spellen te voorkomen, +# tenzij je de waarde voor bepaalde spellen moet verhogen. +# DOSBox wordt meestal niet sneller als je deze waarde verhoogt. + +language=C:\Program Files (x86)\DOSBox-0.74\DOSBox-0.74-NL.lng +machine=svga_s3 +captures=capture +memsize=16 + +[render] +# frameskip: Het aantal frames dat DOSBox moet overslaan voordat een nieuw frame wordt getekend. +# aspect: De beeldverhouding corrigeren. Als de gekozen uitvoermethode geen ondersteuning voor schalen biedt, kan DOSBox met deze optie trager worden! +# scaler: De schaalmethode waarmee lage-resolutiemodi worden vergroot/verbeterd. +# Als je FORCED toevoegt, wordt de schaalmethode zelfs gebruikt wanneer het resultaat mogelijk niet gewenst is. +# Mogelijke waarden: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x. + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core: De CPU-kern die bij de emulatie wordt gebruikt. Indien mogelijk wordt AUTO gewijzigd in DYNAMIC. +# Mogelijke waarden: auto, dynamic, normal, simple. +# cputype: Het CPU-type dat bij de emulatie wordt gebruikt. AUTO geeft het snelste resultaat. +# Mogelijke waarden: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch. +# cycles: Het aantal instructies dat DOSBox per milliseconde moet emuleren. +# Als je een te hoge waarde instelt, kan het geluid wegvallen of een vertraging vertonen. +# Je kunt de cycli op drie manieren instellen: +# auto Het geschikte aantal voor een spel proberen vast te stellen. +# Deze instelling werkt met de meeste spellen. +# fixed #aantal Een vast aantal cycli instellen. Meestal moet je deze instelling gebruiken als AUTO mislukt. +# (Voorbeeld: fixed 4000). +# max Het maximumaantal cycli laten toewijzen dat je computer kan verwerken. +# +# Mogelijke waarden: auto, fixed, max. +# cycleup: Het aantal cycli dat met Ctrl+F11/Ctrl+F12 kan worden verlaagd/verhoogd. +# cycledown: Als je een kleinere waarde dan 100 opgeeft, wordt deze als percentage geďnterpreteerd. + +core=auto +cputype=auto +cycles=auto +cycleup=10 +cycledown=20 + +[mixer] +# nosound: De stille modus inschakelen. Het geluid wordt wel nog steeds geëmuleerd. +# rate: De sampling-frequentie voor de mixer. Als je een hogere frequentie voor een apparaat instelt, neemt de geluidskwaliteit waarschijnlijk af. +# Mogelijke waarden: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# blocksize: De blokgrootte voor de mixer. Met grotere blokken kun je 'stotterend' geluid mogelijk voorkomen, maar kan een vertraging optreden. +# Mogelijke waarden: 1024, 2048, 4096, 8192, 512, 256. +# prebuffer: Het aantal milliseconden gegevens dat boven op de blokgrootte moet worden bewaard. + +nosound=false +rate=44100 +blocksize=1024 +prebuffer=20 + +[midi] +# mpu401: Het type MPU-401 dat moet worden geëmuleerd. +# Mogelijke waarden: intelligent, uart, none. +# mididevice: Het apparaat dat de MIDI-gegevens van MPU-401 ontvangt. +# Mogelijke waarden: default, win32, alsa, oss, coreaudio, coremidi, none. +# midiconfig: Speciale configuratieopties voor het apparaatstuurprogramma. Dit is meestal de ID van het apparaat dat je wilt gebruiken. +# Zie de leesmij/handleiding voor meer informatie. + +mpu401=intelligent +mididevice=default +midiconfig= + +[sblaster] +# sbtype: Het type Soundblaster dat moet worden geëmuleerd. GB staat voor Gameblaster. +# Mogelijke waarden: sb1, sb2, sbpro1, sbpro2, sb16, gb, none. +# sbbase: Het I/O-adres van Soundblaster. +# Mogelijke waarden: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300. +# irq: Het IRQ-nummer van Soundblaster. +# Mogelijke waarden: 7, 5, 3, 9, 10, 11, 12. +# dma: Het DMA-nummer van Soundblaster. +# Mogelijke waarden: 1, 5, 0, 3, 6, 7. +# hdma: Het hoge DMA-nummer van Soundblaster. +# Mogelijke waarden: 1, 5, 0, 3, 6, 7. +# sbmixer: De Soundblaster-mixer toestaan de DOSBox-mixer te wijzigen. +# oplmode: Het type OPL-emulatie. Met AUTO wordt de modus vastgesteld door het type Soundblaster. Alle OPL-modi behalve CMS zijn compatibel met Adlib. +# Mogelijke waarden: auto, cms, opl2, dualopl2, opl3, none. +# oplemu: De provider voor de OPL-emulatie. COMPAT geeft mogelijk een hogere kwaliteit (zie ook OPLRATE). +# Mogelijke waarden: default, compat, fast. +# oplrate: De sampling-frequentie voor de emulatie van OPL-muziek. Gebruik 49716 voor de hoogste kwaliteit (stel de mixerfrequentie op een overeenkomende waarde in.) +# Mogelijke waarden: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000. + +sbtype=sb16 +sbbase=220 +irq=7 +dma=1 +hdma=5 +sbmixer=true +oplmode=auto +oplemu=default +oplrate=44100 + +[gus] +# gus: Emulatie van Gravis Ultrasound inschakelen. +# gusrate: De sampling-frequentie voor Gravis Ultrasound-emulatie. +# Mogelijke waarden: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# gusbase: Het I/O-basisadres van Gravis Ultrasound. +# Mogelijke waarden: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300. +# gusirq: Het IRQ-nummer van Gravis Ultrasound. +# Mogelijke waarden: 5, 3, 7, 9, 10, 11, 12. +# gusdma: Het DMA-kanaal van Gravis Ultrasound. +# Mogelijke waarden: 3, 0, 1, 5, 6, 7. +# ultradir: Het pad naar de Gravis Ultrasound-directory. Deze moet een MIDI-directory bevatten +# met de patchbestanden +# voor GUS-weergave. Patchsets voor Timidity +# zijn waarschijnlijk geschikt. + +gus=false +gusrate=44100 +gusbase=240 +gusirq=5 +gusdma=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker: Emulatie van de pc-luidspreker inschakelen. +# pcrate: De sampling-frequentie waarmee geluid via de pc-luidspreker wordt gegenereerd. +# Mogelijke waarden: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# tandy: Emulatie van Tandy Sound System inschakelen. Met AUTO is emulatie alleen beschikbaar als de computer is ingesteld op TANDY. +# Mogelijke waarden: auto, on, off. +# tandyrate: De sampling-frequentie voor de Tandy 3-Voice-generatie. +# Mogelijke waarden: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# disney: Emulatie van Disney Sound Source inschakelen (compatibel met Covox Voice Master en Speech Thing). + +pcspeaker=true +pcrate=44100 +tandy=auto +tandyrate=44100 +disney=true + +[joystick] +# joysticktype: Het type joystick dat moet worden geëmuleerd: AUTO (standaard), NONE (geen), +# 2AXIS (ondersteunt twee joysticks), +# 4AXIS (ondersteunt één joystick, eerste joystick gebruikt), +# 4AXIS_2 (ondersteunt één joystick, tweede joystick gebruikt), +# FCS (Thrustmaster), CH (CH Flightstick). +# Met NONE wordt joystick-emulatie uitgeschakeld. +# Met AUTO wordt de emulatie gekozen op basis van echte joystick(s). +# (Onthoud dat je het DOSBox-toewijzingsbestand opnieuw moet instellen als je dit eerder hebt opgeslagen.) +# Mogelijke waarden: auto, 2axis, 4axis, 4axis_2, fcs, ch, none. +# timed: Periodieke intervallen voor de as inschakelen. Experimenteer met deze optie als de joystick een afwijking vertoont. +# autofire: Blijven vuren zolang de knop wordt ingedrukt. +# swap34: De derde en vierde as verwisselen. Dit kan handig zijn voor bepaalde joysticks. +# buttonwrap: 'Button wrapping' inschakelen bij het aantal geëmuleerde knoppen. + +joysticktype=auto +timed=true +autofire=false +swap34=false +buttonwrap=false + +[serial] +# serial1: Het type apparaat instellen dat op de COM-poort is aangesloten. +# Kan worden ingesteld op DISABLED, DUMMY, MODEM, NULLMODEM of DIRECTSERIAL. +# Aanvullende parameters moeten op dezelfde regel worden opgegeven met de notatie +# parameter:waarde. De parameter voor alle typen is IRQ (optioneel). +# Voor DIRECTSERIAL: REALPORT (vereist), RXDELAY (optioneel). +# (realport:COM1 realport:ttyS0). +# Voor MODEM: LISTENPORT (optioneel). +# Voor NULLMODEM: SERVER, RXDELAY, TXDELAY, TELNET, USEDTR, +# TRANSPARENT, PORT, INHSOCKET (allemaal optioneel). +# Voorbeeld: serial1=modem listenport:5000 +# Mogelijke waarden: dummy, disabled, modem, nullmodem, directserial. +# serial2: Zie SERIAL1. +# Mogelijke waarden: dummy, disabled, modem, nullmodem, directserial. +# serial3: Zie SERIAL1. +# Mogelijke waarden: dummy, disabled, modem, nullmodem, directserial. +# serial4: Zie SERIAL1. +# Mogelijke waarden: dummy, disabled, modem, nullmodem, directserial. + +serial1=dummy +serial2=dummy +serial3=disabled +serial4=disabled + +[dos] +# xms: XMS-ondersteuning inschakelen. +# ems: EMS-ondersteuning inschakelen. +# umb: UMB-ondersteuning inschakelen. +# keyboardlayout: De taalcode van de toetsenbordindeling (of geen). + +xms=true +ems=true +umb=true +keyboardlayout=us103 853 + +[ipx] +# ipx: IPX via UDP/IP-emulatie inschakelen. + +ipx=false + +[autoexec] +# De regels in deze sectie worden tijdens het opstarten uitgevoerd. +# Je kunt hier MOUNT-regels opgeven. + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/nl/DOSBox-0.74.lng dosbox-staging-0.77.0/contrib/old-translations/nl/DOSBox-0.74.lng --- dosbox-staging-0.76.0/contrib/old-translations/nl/DOSBox-0.74.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/nl/DOSBox-0.74.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,971 @@ +:CONFIG_FULLSCREEN +DOSBox rechtstreeks op volledig scherm starten. (Druk op Alt+Enter om terug te gaan). +. +:CONFIG_FULLDOUBLE +Dubbele buffering gebruiken bij weergave op volledig scherm. Hierdoor gaat het beeldscherm mogelijk minder flikkeren, maar wordt DOSBox mogelijk ook traag. +. +:CONFIG_FULLRESOLUTION +De resolutie die moet worden gebruikt voor weergave op volledig scherm: oorspronkelijk of vaste grootte (bijv. 1024×768). + Het resultaat is mogelijk optimaal als je de eigen resolutie van je beeldscherm gebruikt en ASPECT instelt op TRUE. + Heb je een groot scherm en zie je een klein venster, kies dan een uitvoerindeling die verschilt van het beeldoppervlak. +. +:CONFIG_WINDOWRESOLUTION +Het venster op dit formaat schalen míts het uitvoerapparaat hardwareschaling ondersteunt. + (Schalen wordt niet ondersteund als OUTPUT is ingesteld op SURFACE!) +. +:CONFIG_OUTPUT +Het videosysteem dat voor de uitvoer wordt gebruikt. +. +:CONFIG_AUTOLOCK +De muis automatisch blokkeren bij het klikken op het scherm. (Druk op Ctrl+F10 om de blokkering op te heffen.) +. +:CONFIG_SENSITIVITY +De gevoeligheid van de muis. +. +:CONFIG_WAITONERROR +Als in DOSBox een fout is opgetreden: wachten voordat de console wordt gesloten. +. +:CONFIG_PRIORITY +Prioriteitniveaus voor DOSBox. De tweede waarde achter de komma wordt gebruikt wanneer DOSBox niet de focus heeft of is geminimaliseerd. + Voor de tweede waarde kun je alleen PAUSE opgeven. +. +:CONFIG_MAPPERFILE +Het bestand waaruit de toets-/gebeurtenisparen worden geladen of het bestand waarin deze worden opgeslagen. RESETMAPPER werkt alleen met de standaardwaarde. +. +:CONFIG_USESCANCODES +Het gebruik van Symkeys vermijden. Deze optie werkt mogelijk niet op alle besturingssystemen. +. +:CONFIG_LANGUAGE +Een ander taalbestand selecteren. +. +:CONFIG_MACHINE +Het type computer dat moet worden geëmuleerd. +. +:CONFIG_CAPTURES +De directory waarin bijvoorbeeld WAVE- en MIDI-bestanden en schermopnamen worden vastgelegd. +. +:CONFIG_MEMSIZE +De hoeveelheid geheugen voor DOSBox in megabytes. + Laat de standaardwaarde ongewijzigd om problemen met sommige spellen te voorkomen, + tenzij je de waarde voor bepaalde spellen moet verhogen. + DOSBox wordt meestal niet sneller als je deze waarde verhoogt. +. +:CONFIG_FRAMESKIP +Het aantal frames dat DOSBox moet overslaan voordat een nieuw frame wordt getekend. +. +:CONFIG_ASPECT +De beeldverhouding corrigeren. Als de gekozen uitvoermethode geen ondersteuning voor schalen biedt, kan DOSBox met deze optie trager worden! +. +:CONFIG_SCALER +De schaalmethode waarmee lage-resolutiemodi worden vergroot/verbeterd. + Als je FORCED toevoegt, wordt de schaalmethode zelfs gebruikt wanneer het resultaat mogelijk niet gewenst is. +. +:CONFIG_CORE +De CPU-kern die bij de emulatie wordt gebruikt. Indien mogelijk wordt AUTO gewijzigd in DYNAMIC. +. +:CONFIG_CPUTYPE +Het CPU-type dat bij de emulatie wordt gebruikt. AUTO geeft het snelste resultaat. +. +:CONFIG_CYCLES +Het aantal instructies dat DOSBox per milliseconde moet emuleren. +Als je een te hoge waarde instelt, kan het geluid wegvallen of een vertraging vertonen. +Je kunt de cycli op drie manieren instellen: + auto Het geschikte aantal voor een spel proberen vast te stellen. + Deze instelling werkt met de meeste spellen. + fixed #aantal Een vast aantal cycli instellen. Meestal moet je deze instelling gebruiken als AUTO mislukt. + (Voorbeeld: fixed 4000). + max Het maximumaantal cycli laten toewijzen dat je computer kan verwerken. + +. +:CONFIG_CYCLEUP +Het aantal cycli dat met Ctrl+F11/Ctrl+F12 kan worden verlaagd/verhoogd. +. +:CONFIG_CYCLEDOWN +Als je een kleinere waarde dan 100 opgeeft, wordt deze als percentage geďnterpreteerd. +. +:CONFIG_NOSOUND +De stille modus inschakelen. Het geluid wordt wel nog steeds geëmuleerd. +. +:CONFIG_RATE +De sampling-frequentie voor de mixer. Als je een hogere frequentie voor een apparaat instelt, neemt de geluidskwaliteit waarschijnlijk af. +. +:CONFIG_BLOCKSIZE +De blokgrootte voor de mixer. Met grotere blokken kun je 'stotterend' geluid mogelijk voorkomen, maar kan een vertraging optreden. +. +:CONFIG_PREBUFFER +Het aantal milliseconden gegevens dat boven op de blokgrootte moet worden bewaard. +. +:CONFIG_MPU401 +Het type MPU-401 dat moet worden geëmuleerd. +. +:CONFIG_MIDIDEVICE +Het apparaat dat de MIDI-gegevens van MPU-401 ontvangt. +. +:CONFIG_MIDICONFIG +Speciale configuratieopties voor het apparaatstuurprogramma. Dit is meestal de ID van het apparaat dat je wilt gebruiken. + Zie de leesmij/handleiding voor meer informatie. +. +:CONFIG_SBTYPE +Het type Soundblaster dat moet worden geëmuleerd. GB staat voor Gameblaster. +. +:CONFIG_SBBASE +Het I/O-adres van Soundblaster. +. +:CONFIG_IRQ +Het IRQ-nummer van Soundblaster. +. +:CONFIG_DMA +Het DMA-nummer van Soundblaster. +. +:CONFIG_HDMA +Het hoge DMA-nummer van Soundblaster. +. +:CONFIG_SBMIXER +De Soundblaster-mixer toestaan de DOSBox-mixer te wijzigen. +. +:CONFIG_OPLMODE +Het type OPL-emulatie. Met AUTO wordt de modus vastgesteld door het type Soundblaster. Alle OPL-modi behalve CMS zijn compatibel met Adlib. +. +:CONFIG_OPLEMU +De provider voor de OPL-emulatie. COMPAT geeft mogelijk een hogere kwaliteit (zie ook OPLRATE). +. +:CONFIG_OPLRATE +De sampling-frequentie voor de emulatie van OPL-muziek. Gebruik 49716 voor de hoogste kwaliteit (stel de mixerfrequentie op een overeenkomende waarde in.) +. +:CONFIG_GUS +Emulatie van Gravis Ultrasound inschakelen. +. +:CONFIG_GUSRATE +De sampling-frequentie voor Gravis Ultrasound-emulatie. +. +:CONFIG_GUSBASE +Het I/O-basisadres van Gravis Ultrasound. +. +:CONFIG_GUSIRQ +Het IRQ-nummer van Gravis Ultrasound. +. +:CONFIG_GUSDMA +Het DMA-kanaal van Gravis Ultrasound. +. +:CONFIG_ULTRADIR +Het pad naar de Gravis Ultrasound-directory. Deze moet een MIDI-directory bevatten +met de patchbestanden +voor GUS-weergave. Patchsets voor Timidity +zijn waarschijnlijk geschikt. +. +:CONFIG_PCSPEAKER +Emulatie van de pc-luidspreker inschakelen. +. +:CONFIG_PCRATE +De sampling-frequentie waarmee geluid via de pc-luidspreker wordt gegenereerd. +. +:CONFIG_TANDY +Emulatie van Tandy Sound System inschakelen. Met AUTO is emulatie alleen beschikbaar als de computer is ingesteld op TANDY. +. +:CONFIG_TANDYRATE +De sampling-frequentie voor de Tandy 3-Voice-generatie. +. +:CONFIG_DISNEY +Emulatie van Disney Sound Source inschakelen (compatibel met Covox Voice Master en Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Het type joystick dat moet worden geëmuleerd: AUTO (standaard), NONE (geen), +2AXIS (ondersteunt twee joysticks), +4AXIS (ondersteunt één joystick, eerste joystick gebruikt), +4AXIS_2 (ondersteunt één joystick, tweede joystick gebruikt), +FCS (Thrustmaster), CH (CH Flightstick). +Met NONE wordt joystick-emulatie uitgeschakeld. +Met AUTO wordt de emulatie gekozen op basis van echte joystick(s). +(Onthoud dat je het DOSBox-toewijzingsbestand opnieuw moet instellen als je dit eerder hebt opgeslagen.) +. +:CONFIG_TIMED +Periodieke intervallen voor de as inschakelen. Experimenteer met deze optie als de joystick een afwijking vertoont. +. +:CONFIG_AUTOFIRE +Blijven vuren zolang de knop wordt ingedrukt. +. +:CONFIG_SWAP34 +De derde en vierde as verwisselen. Dit kan handig zijn voor bepaalde joysticks. +. +:CONFIG_BUTTONWRAP +'Button wrapping' inschakelen bij het aantal geëmuleerde knoppen. +. +:CONFIG_SERIAL1 +Het type apparaat instellen dat op de COM-poort is aangesloten. +Kan worden ingesteld op DISABLED, DUMMY, MODEM, NULLMODEM of DIRECTSERIAL. +Aanvullende parameters moeten op dezelfde regel worden opgegeven met de notatie +parameter:waarde. De parameter voor alle typen is IRQ (optioneel). +Voor DIRECTSERIAL: REALPORT (vereist), RXDELAY (optioneel). + (realport:COM1 realport:ttyS0). +Voor MODEM: LISTENPORT (optioneel). +Voor NULLMODEM: SERVER, RXDELAY, TXDELAY, TELNET, USEDTR, + TRANSPARENT, PORT, INHSOCKET (allemaal optioneel). +Voorbeeld: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +Zie SERIAL1. +. +:CONFIG_SERIAL3 +Zie SERIAL1. +. +:CONFIG_SERIAL4 +Zie SERIAL1. +. +:CONFIG_XMS +XMS-ondersteuning inschakelen. +. +:CONFIG_EMS +EMS-ondersteuning inschakelen. +. +:CONFIG_UMB +UMB-ondersteuning inschakelen. +. +:CONFIG_KEYBOARDLAYOUT +De taalcode van de toetsenbordindeling (of geen). +. +:CONFIG_IPX +IPX via UDP/IP-emulatie inschakelen. +. +:AUTOEXEC_CONFIGFILE_HELP +De regels in deze sectie worden tijdens het opstarten uitgevoerd. +Je kunt hier MOUNT-regels opgeven. + +. +:CONFIGFILE_INTRO +# Dit is het configuratiebestand voor DOSBox %s. (Gebruik de nieuwste versie van DOSBox.) +# Regels die met # beginnen, worden als commentaar geďnterpreteerd en door DOSBox genegeerd. +# Met commentaarregels kun je een (korte) beschrijving van elke optie geven. + +. +:CONFIG_SUGGESTED_VALUES +Mogelijke waarden +. +:PROGRAM_CONFIG_FILE_ERROR +Kan het bestand %s niet openen. + +. +:PROGRAM_CONFIG_USAGE +Configuratieprogramma: +Typ -writeconf bestandsnaam om de huidige configuratie weg te schrijven. +Typ -writelang bestandsnaam om de huidige taaltekenreeksen weg te schrijven. + +. +:PROGRAM_CONFIG_SECURE_ON +De beveiligde modus is geactiveerd. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Deze bewerking is niet toegestaan in de beveiligde modus. + +. +:PROGRAM_CONFIG_SECTION_ERROR +De sectie %s bestaat niet. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Sectie of eigenschap is niet gevonden. + +. +:PROGRAM_CONFIG_NO_PROPERTY +De eigenschap %s is niet gevonden in de sectie %s. + +. +:PROGRAM_CONFIG_GET_SYNTAX +Juiste syntaxis: config -get "sectie-eigenschap". + +. +:PROGRAM_MOUNT_CDROMS_FOUND +Gevonden cd-rom's: %d + +. +:PROGRAM_MOUNT_STATUS_2 +Station %c is aangekoppeld als %s. + +. +:PROGRAM_MOUNT_STATUS_1 +Momenteel aangekoppelde stations: + +. +:PROGRAM_MOUNT_ERROR_1 +De directory %s bestaat niet. + +. +:PROGRAM_MOUNT_ERROR_2 +%s is geen directory. + +. +:PROGRAM_MOUNT_ILL_TYPE +Ongeldig type: %s. + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Station %c is al aangekoppeld als %s. + +. +:PROGRAM_MOUNT_USAGE +Syntaxis: MOUNT stationsletter lokale_directory +Voorbeeld: MOUNT c %s +Hiermee fungeert de directory %s in DOSBox als station C:. +De directory moet wel bestaan. + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Station %c is niet aangekoppeld. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Station %c is verwijderd. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Virtuele stations kunnen niet worden ontkoppeld. + +. +:PROGRAM_MOUNT_WARNING_WIN +c:\ aankoppelen wordt NIET aanbevolen. Koppel voortaan een (sub)directory aan. + +. +:PROGRAM_MOUNT_WARNING_OTHER +/ aankoppelen wordt NIET aanbevolen. Koppel voortaan een (sub)directory aan. + +. +:PROGRAM_MEM_CONVEN +%10d kB conventioneel geheugen beschikbaar. + +. +:PROGRAM_MEM_EXTEND +%10d kB uitgebreid (extended) geheugen beschikbaar. + +. +:PROGRAM_MEM_EXPAND +%10d kB extra (expanded) geheugen beschikbaar. + +. +:PROGRAM_MEM_UPPER +%10d kB hoger geheugen beschikbaar in %d blokken (grootste UMB: %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB gealloceerd. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB vrijgegeven. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Gebruikt geheugen is vrijgegeven. + +. +:PROGRAM_LOADFIX_ERROR +Fout van geheugenallocatie. + +. +:MSCDEX_SUCCESS +Installatie van MSCDEX is geslaagd. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Fout: letters van meerdere cd-romstations moeten elkaar opvolgen. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Fout: wordt nog niet ondersteund. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Fout: bestand is ongeldig of kan niet worden geopend. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Fout: te veel cd-romstations (max. 5). MSCDEX-installatie is mislukt. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Subdirectory aangekoppeld: beperkte ondersteuning. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Fout: bestand is geen ISO- of CUE-image of bevat fouten. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Fout: onbekende fout. + +. +:PROGRAM_RESCAN_SUCCESS +De stationscache is leeggemaakt. + +. +:PROGRAM_INTRO +Welkom bij DOSBox, een x86-emulator met geluid en graphics. +DOSBox is een omgeving die eruitziet als het DOS van voorheen. + +Voor informatie over standaardaankoppeling typ je intro mount. +Voor informatie over cd-romondersteuning typ je intro cdrom. +Voor informatie over speciale toetsen typ je intro special. +Voor meer informatie over DOSBox ga ja naar http://www.dosbox.com/wiki. + +Als er een fout optreedt, wordt DOSBox zonder waarschuwing gestopt/afgesloten! + + + +. +:PROGRAM_INTRO_MOUNT_START +Dit zijn enkele opdrachten waarmee je aan de slag kunt gaan: +Voordat je de bestanden in je eigen bestandssysteem kunt gebruiken, +moet je de directory met die bestanden aankoppelen. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprogs\: station C aankoppelen met daarin c:\dosprogs. ş +ş ş +ş c:\dosprogs\ is een voorbeeld. Typ in plaats hiervan je eigen directory. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprogs: station C aankoppelen met daarin ~/dosprogs. ş +ş ş +ş ~/dosprogs is een voorbeeld. Typ in plaats hiervan je eigen directory. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +Nadat de aankoppeling is voltooid, kun je c: typen om naar het nieuwe station +C: te gaan. Typ daarna dir om de inhoud van het station te bekijken. Met cd kun je een directory opgeven. +(Directory's worden in een directorylijst aangegeven met [].) +Je kunt programma's/bestanden uitvoeren die eindigen op .exe, .bat of .com. + +. +:PROGRAM_INTRO_CDROM +Een echt/virtueel cd-romstation aankoppelen in DOSBox: +DOSBox biedt cd-rom-emulatie voor verschillende niveaus. + +Het basisniveau is geschikt voor alle cd-romstations en gewone directory's. +Hiermee wordt MSCDEX geconfigureerd en zijn de bestanden alleen-lezen. +Dit volstaat normaal gesproken voor de meeste spellen: +mount d D:\ -t cdrom of mount d C:\voorbeeld -t cdrom +Als dit niet werkt, moet je de cd-rom-aanduiding aan DOSBox doorgeven: +mount d C:\voorbeeld -t cdrom -label CDLABEL + +Met het volgende niveau wordt low-levelondersteuning toegevoegd. +Dit is dan ook alleen geschikt voor cd-romstations: +mount d D:\ -t cdrom -usecd 0 + +Het laatste ondersteuningsniveau is afhankelijk van je besturingssysteem: +Voor Windows 2000, Windows XP of Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +Voor Windows 9x met een ASPI-laag: +mount d D:\ -t cdrom -usecd 0 -aspi + +Vervang D:\ door de locatie van je cd-romstation. +Vervang 0 in -usecd 0 door het nummer van het cd-romstation in deze opdracht: +mount -cd + +. +:PROGRAM_INTRO_SPECIAL +Speciale toetsen: +Dit zijn de standaardtoetscombinaties. +Je kunt deze wijzigen via de toetstoewijzingsfunctie. + +Alt+Enter : volledig scherm in- of uitschakelen. +Alt+Pause : DOSBox onderbreken +Ctrl+F1 : toetstoewijzingsfunctie starten +Ctrl+F4 : dir.cache alle stations bijwerken. Aangek. schijfimage verwiss. +Ctrl+Alt+F5 : video van het scherm vastleggen starten/stoppen +Ctrl+F5 : een schermopname opslaan +Ctrl+F6 : vastleggen van geluid in een WAVE-bestand starten/stoppen +Ctrl+Alt+F7 : vastleggen van OPL-opdrachten starten/stoppen +Ctrl+Alt+F8 : vastleggen van ruwe MIDI-opdrachten starten/stoppen +Ctrl+F7 : aantal overgeslagen frames verlagen +Ctrl+F8 : aantal overgeslagen frames verhogen +Ctrl+F9 : DOSBox afsluiten +Ctrl+F10 : muis vastzetten/vrijgeven +Ctrl+F11 : emulatie vertragen (aantal DOSBox-cycli verlagen) +Ctrl+F12 : emulatie versnellen (aantal DOSBox-cycli verhogen) +Alt+F12 : ontgrendelingssnelheid (turboknop/snel vooruit) + +. +:PROGRAM_BOOT_NOT_EXIST +Opstartschijfbestand bestaat niet. Bewerking mislukt. + +. +:PROGRAM_BOOT_NOT_OPEN +Kan het opstartschijfbestand niet openen. Bewerking mislukt. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Imagebestand is alleen-lezen! Dit kan tot problemen leiden. + +. +:PROGRAM_BOOT_PRINT_ERROR +Hiermee wordt DOSBox opgestart vanaf een diskette of harde-schijfimage. + +Je kunt een reeks diskettes typen (te verwisselen door op Ctrl+F4 te drukken), +of je kunt met -l het aangekoppelde station typen waarvan moet worden opgestart. +Als je geen stationsletter opgeeft, wordt standaard vanaf station A: opgestart. +De enige opstartbare stationsletters zijn A, C en D. +Als je vanaf een harde schijf (C of D) wilt opstarten, + moet deze al zijn aangekoppeld met IMGMOUNT. + +De syntaxis van deze opdracht is: + +BOOT [schijfimage1.img schijfimage2.img] [-l stationsletter] + +. +:PROGRAM_BOOT_UNABLE +Kan niet opstarten vanaf station %c. +. +:PROGRAM_BOOT_IMAGE_OPEN +Imagebestand openen: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Kan %s niet openen. +. +:PROGRAM_BOOT_BOOT +Opstarten vanaf station %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Er is een PCjr-cartridge gevonden, maar de computer is niet PCjr. +. +:PROGRAM_BOOT_CART_LIST_CMDS +Beschikbare opdrachten voor PCjr-cartridges: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +Er zijn geen opdrachten voor PCjr-cartridges gevonden. +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Je moet de stationsletter opgeven waarop je het image wilt aankoppelen. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Typ het stationsnr. (0 of 3) om het image te kopp. (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Voor cd-rom-images: IMGMOUNT stationsletter imagelocatie -t iso + +Voor harde-schijfimages: geef de schijfgeometrie op voor harde schijven: +bytes_per_sector, sectoren_per_cylinder, koppen_per_cilinder, aantal_cilinders. +IMGMOUNT stationsletter imagelocatie -size bps,spc,kpc,cil + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Kan het imagebestand niet laden. +Controleer of het pad juist is en het image toegankelijk is. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Kan de schijfgeometrie niet uit het image extraheren. +Geef deze op met de parameter -size bps,spc,kpc,cil. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Het type %s wordt niet ondersteund. Geef HDD, FLOPPY of ISO op. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +De indeling %s wordt niet ondersteund. Geef FAT, ISO of NONE op. + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Je moet het bestandsimage opgeven dat je wilt aankoppelen. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Imagebestand niet gevonden. + +. +:PROGRAM_IMGMOUNT_MOUNT +Om een directory aan te koppelen, typ je MOUNT in plaats van IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Het station is al met deze letter aangekoppeld. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Kan geen station maken van een bestand. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Stationsnummer %d is aangekoppeld als %s. + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Het image moet zich op een host of lokaal station bevinden. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Meerdere bestanden worden alleen ondersteund voor CUE- of ISO-images. + +. +:PROGRAM_KEYB_INFO +De codetabel %i is geladen. + +. +:PROGRAM_KEYB_INFO_LAYOUT +De codetabel %i is geladen voor de indeling %s. + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [toetsenbordindeling-ID[ codetabelnummer[ codetabelbestand]]] + +Enkele voorbeelden: + KEYB: momenteel geladen codetabel weergeven. + KEYB sp: de Spaanse (SP) indeling laden met een geschikte codetabel. + KEYB sp 850: de Spaanse (SP) indeling laden met codetabel 850. + KEYB sp 850 mycp.cpi: idem, maar met gebruikmaking van het bestand mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +De toetsenbordindeling %s is geladen voor de codetabel %i. + +. +:PROGRAM_KEYB_FILENOTFOUND +Het toetsenbordbestand %s is niet gevonden. + + +. +:PROGRAM_KEYB_INVALIDFILE +Het toetsenbordbestand %s is ongeldig. + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Er is in %s geen indeling gevonden voor de codetabel %i. + +. +:PROGRAM_KEYB_INVCPFILE +Het codetabelbestand voor de indeling %s ontbreekt of is ongeldig. + + +. +:SHELL_ILLEGAL_PATH +Ongeldig pad. + +. +:SHELL_CMD_HELP +Om een lijst met alle ondersteunde opdrachten weer te geven, typ je help /all. +Een korte lijst met de meest gebruikte opdrachten: + +. +:SHELL_CMD_ECHO_ON +ECHO is ingeschakeld. + +. +:SHELL_CMD_ECHO_OFF +ECHO is uitgeschakeld. + +. +:SHELL_ILLEGAL_SWITCH +Ongeldige schakeloptie: %s. + +. +:SHELL_MISSING_PARAMETER +Vereiste parameter ontbreekt. + +. +:SHELL_CMD_CHDIR_ERROR +Kan niet navigeren naar: %s. + +. +:SHELL_CMD_CHDIR_HINT +Als je naar een ander station wilt navigeren, typ je %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +De directorynaam is langer dan 8 tekens en/of bevat spaties. +Probeer cd %s. + +. +:SHELL_CMD_CHDIR_HINT_3 +Je bent nog op station Z:. Navigeer naar een aangekoppeld station met C:. + +. +:SHELL_CMD_MKDIR_ERROR +Maken mislukt: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Verwijderen mislukt: %s. + +. +:SHELL_CMD_DEL_ERROR +Wissen mislukt: %s. + +. +:SHELL_SYNTAXERROR +De syntaxis van de opdracht is onjuist. + +. +:SHELL_CMD_SET_NOT_SET +De omgevingsvariabele %s is niet gedefinieerd. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Onvoldoende omgevingsruimte. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Bestandsnaam ontbreekt. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Nummer ontbreekt. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Ongeldig nummer. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Er is geen label opgegeven voor de opdracht GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Het label %s is niet gevonden. + +. +:SHELL_CMD_FILE_NOT_FOUND +Het bestand %s is niet gevonden. + +. +:SHELL_CMD_FILE_EXISTS +Het bestand %s bestaat al. + +. +:SHELL_CMD_DIR_INTRO +Directory van %s. + +. +:SHELL_CMD_DIR_BYTES_USED +%5d bestand(en), %17s bytes. + +. +:SHELL_CMD_DIR_BYTES_FREE +%5d directory('s), %17s bytes beschikbaar. + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Het station %c bestaat niet! +Koppel dit eerst aan met mount. Typ intro of intro mount voor meer informatie. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Ongeldige opdracht: %s. + +. +:SHELL_CMD_PAUSE +Druk op een toets om door te gaan. + +. +:SHELL_CMD_PAUSE_HELP +Wachten op 1 toetsaanslag + +. +:SHELL_CMD_COPY_FAILURE +Kopie maken mislukt: %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d bestand(en) gekopieerd. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Verwijderen van station wordt niet ondersteund. Er wordt geen actie uitgevoerd. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST is mislukt. De opdrachtregel bevat een fout of het doelstation +wordt al gebruikt. Je kunt SUBST alleen gebruiken met lokale stations. +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Welkom bij DOSBox v%-8s (Nederlandse vertaling: Mark Haasen, 2010) ş +ş ş +ş Korte inleiding voor nieuwe gebruikers: typ INTRO ş +ş Lijst van ondersteunde shellopdrachten: typ HELP ş +ş ş +ş Druk op Ctrl+F11 of Ctrl+F12 om de CPU-emulatiesnelheid aan te passen. ş +ş Druk op Ctrl+F1 om de toetstoewijzingsfunctie te activeren. ş +ş Zie het bestand README in de directory van DOSBox voor meer informatie. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox ondersteunt de samengestelde CGA-modus. ş +ş Druk op (Alt+)F11 om de kleuren in deze modus te wijzigen. ş +ş ş + +. +:SHELL_STARTUP_HERC +ş Druk op F11 om te wisselen tussen wit, oranje en groen-monochroom. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Activeer de foutopsporing met Alt+Pause of start het EXE-bestand met DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş VEEL PLEZIER! ş +ş Het DOSBox-team http://www.dosbox.com ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:SHELL_CMD_CHDIR_HELP +De huidige directory bekijken of wijzigen + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [station:][pad] +CHDIR [..] +CD [station:][pad] +CD [..] + + .. Naar de bovenliggende directory navigeren + +Typ CD station: voor de huidige directory in het opgegeven station. +Typ CD zonder parameters voor het huidige station en de huidige directory. + +. +:SHELL_CMD_CLS_HELP +Het scherm wissen + +. +:SHELL_CMD_DIR_HELP +De inhoud van een directory bekijken + +. +:SHELL_CMD_ECHO_HELP +Berichten weergeven en ECHO-uitvoer voor opdrachten in-/uitschakelen + +. +:SHELL_CMD_EXIT_HELP +De shell afsluiten + +. +:SHELL_CMD_HELP_HELP +Help weergeven + +. +:SHELL_CMD_MKDIR_HELP +Een directory maken + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [station:][pad] +MD [station:][pad] + +. +:SHELL_CMD_RMDIR_HELP +Een directory verwijderen + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [station:][pad] +RD [station:][pad] + +. +:SHELL_CMD_SET_HELP +Omgevingsvariabelen wijzigen + +. +:SHELL_CMD_IF_HELP +Instructies in batchprogramma's voorwaardelijk verwerken + +. +:SHELL_CMD_GOTO_HELP +Naar een gelabelde regel gaan in een batchscript + +. +:SHELL_CMD_SHIFT_HELP +Shift-links toepassen op opdrachtregelparameters in een batchscript + +. +:SHELL_CMD_TYPE_HELP +De inhoud van een tekstbestand bekijken + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [station:][pad][bestandsnaam] + +. +:SHELL_CMD_REM_HELP +Opmerkingen aan een batchbestand toevoegen + +. +:SHELL_CMD_REM_HELP_LONG +REM [opmerking] + +. +:SHELL_CMD_NO_WILD +Dit is een eenvoudige versie van de opdracht. Jokertekens zijn niet toegestaan + +. +:SHELL_CMD_RENAME_HELP +De naam van een of meer bestanden wijzigen + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [station:][pad]bestandsnaam1 bestandsnaam2. +REN [station:][pad]bestandsnaam1 bestandsnaam2. + +Je kunt geen nieuw station of pad opgeven voor het doelbestand + +. +:SHELL_CMD_DELETE_HELP +Een of meer bestanden verwijderen + +. +:SHELL_CMD_COPY_HELP +Een kopie maken van bestanden + +. +:SHELL_CMD_CALL_HELP +Een batchbestand starten vanuit een ander batchbestand + +. +:SHELL_CMD_SUBST_HELP +Een interne directory aan een station toewijzen + +. +:SHELL_CMD_LOADHIGH_HELP +Een programma in het bovengeheugen laden (vereist xms=true,umb=true) + +. +:SHELL_CMD_CHOICE_HELP +Wachten op een toetsaanslag en ERRORLEVEL instellen + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:opties] [/N] [/S] tekst + /C[:]opties - Toegestane toetsen opgeven. De standaardwaarde is yn (ja/nee). + /N - Opties niet weergeven aan het einde van een bericht. + /S - Hoofdlettergevoelige selectie van opties inschakelen. + tekst - De tekst die in het bericht moet worden afgebeeld. + +. +:SHELL_CMD_ATTRIB_HELP +Heeft geen functie en is beschikbaar voor compatibiliteit + +. +:SHELL_CMD_PATH_HELP +Beschikbaar voor compatibiliteit + +. +:SHELL_CMD_VER_HELP +De gerapporteerde DOS-versie bekijken of instellen + +. +:SHELL_CMD_VER_VER +DOSBox-versie %s. DOSBox-versie %s. Gerapporteerde DOS-versie %d.%02d. + +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/nl/version.txt dosbox-staging-0.77.0/contrib/old-translations/nl/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/nl/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/nl/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Dutch 0.74 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/no/DOSBox-0.63-nb_NO dosbox-staging-0.77.0/contrib/old-translations/no/DOSBox-0.63-nb_NO --- dosbox-staging-0.76.0/contrib/old-translations/no/DOSBox-0.63-nb_NO 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/no/DOSBox-0.63-nb_NO 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,477 @@ +:Translated by Alexander Nicolaysen Sřrnes +:Oversatt av Alexander Nicolaysen Sřrnes +: +:DIRECTSERIAL_CONFIGFILE_HELP +directserial -- Aktiver seriell passeringsstřtte. +comport -- COM-port inne i DOSBox. +realport -- COM-port pĺ maskinen. +defaultbps -- Standardhastighet (BPS). +parity -- Pariteten til pakkene. Dette kan vćre N, E eller O. +bytesize -- Střrrelse pĺ hver pakke. Dette kan vćre 5 eller 8. +stopbit -- Antall stoppbiter. Dette kan vćre 1 eller 2. +. +:IPX_CONFIGFILE_HELP +ipx -- Slĺ pĺ IPX over UDP/IP-emulering. +. +:SDL_CONFIGFILE_HELP +fullscreen -- Start DOSBox direkte i fullskjerm. +fulldouble -- Bruk dobbel bufring i fullskjerm. +fullfixed -- Ikke endre skjermopplřsningen i fullskjermmodues. +fullwidth/height -- Hvilken opplřsning som skal brukes i fullskjermmodues, bruk sammen med "fullfixed". +output -- Hva som skal brukes for utdata: "surface", "overlay", "opengl", eller "openglnb". +hwscale -- Ekstra skalering av vinduet hvis utdata-enheten střtter maskinvareskalering. +autolock -- Musen vil automatisk lĺses hvis du klikker pĺ skjermen. +sensitiviy -- Mussensitivitet. +waitonerror -- Vent fřr konsollet renses hvis det oppstĺr en feil i DOSBox. +. +:DOSBOX_CONFIGFILE_HELP +language -- Velg en annen sprĺkfil. +memsize -- Mengden minne DOSBox har i megabyte. +machine -- Maskintypen som skal emuleres: "auto", "hercules", "cga", "tandy" eller "vga". + Prřv en spesifik type hvis spillet ditt har problemer med "auto". +. +:RENDER_CONFIGFILE_HELP +frameskip -- Hvor mange bilder DOSBox hopper over fřr det tegner et. +snapdir -- Mappen hvor skjermdumper lagres. +aspect -- Foreta aspektkorreksjon. +scaler -- Skalering bruk til ĺ forstřrre/forbedre lave skjermmodi. + Střttede valg er "none", "normal2x" og "advance2x". +. +:CPU_CONFIGFILE_HELP +core -- Prosessorkjerne brukt i emulering: "normal", "full" eller "dynamic". +cycles -- Mengde instruksjoner DOSBox prřver ĺ emulere hvert millisekund. + Ĺ sette dette hřyere enn maskinen din kan takle er fćlt! +cycleup -- Antall instruksjoner ĺ řke/senke med "keycombo". +cycledown Ĺ sette den lavere enn 100 vil bli en prosentandel. +. +:MIXER_CONFIGFILE_HELP +nosound -- Aktiver stille modus, dog lyden blir fortsatt emulert. +rate -- Samplingsrate for mikser. Ĺ sette en enhet hřyere enn dette vil + sansynligvis redusere lydkvaliteten dens. +blocksize -- Blokkstřrrelse for mikser. Střrre blokker kan kanskje + hjelpe stutrende lyd, men den vil ogsĺ bli tregere. +wavedir -- Mappe hvor lagret lyd oppbevares nĺr du bruker + tastekombinasjonen for lydopptak. Se filen "README". +. +:MIDI_CONFIGFILE_HELP +mpu401 -- Aktiver emulering av MPU-401. +device -- Enhet som skal motta MIDI-data fra MPU-401. Dette kan vćre "default", + "alsa", "oss", "win32", "coreaudio" eller "none". +config -- Spesielle konfigureringsmuligheter for enheten. +. +:SBLASTER_CONFIGFILE_HELP +sblaster -- Aktiver emulering av SoundBlaster. +base,irq,dma -- IO/IRQ/DMA-adressen for SoundBlaster. +sbrate -- Samplingsrate for SoundBlaster-emuleringen. +adlib -- Aktiver emulering av AdLib. +adlibrate -- Samplingsrate for AdLib-emulering. +cms -- Aktiver emulering av Creative Music System/GameBlaster. + Ĺ aktivere bĺde Adlib og CMS kan skape konflikter. +cmsrate -- Samplingsrate for CMS-emulering. +. +:GUS_CONFIGFILE_HELP +gus -- Aktiver emulering av Gravis UltraSound. +base,irq1,irq2,dma1,dma2 -- IO/IRQ/DMA-adressen til + Gravis UltraSound. (Lik IRQ og DMA er OK.) +rate -- Samplingsrate for UltraSound-emulering. +ultradir -- Sti til UltraSound-mappen. I denne mappen břr det + vćre en MIDI-mappe som inneholder oppdateringsfilene + for GUS-avspilling. Oppdateringssett bruk med + Timidity břr virke fint. +. +:SPEAKER_CONFIGFILE_HELP +pcspeaker -- Aktiver emulering av PC-Speaker. +pcrate -- Samplingsrate for PC-Speaker-lydgeneratoren. +tandy -- Aktiver emulering av Tandy 3-Voice. +tandyrate -- Samplingsrate for Tandy 3-Voice-lydgenereringen. +disney -- Aktiver emulering av Dysney Sound Source. +. +:DOS_CONFIGFILE_HELP +xms -- Aktiver XMS-střtte. +ems -- Aktiver EMS-střtte. +. +:MODEM_CONFIGFILE_HELP +modem -- Aktiver emulering av virtuelt modem. +comport -- COM-porten modemet er koblet til. +listenport -- TCP-porten modemet lytter pĺ for inkommende forbindelser. +. +:AUTOEXEC_CONFIGFILE_HELP +Linjer i dette omrĺdet vil bli kjřrt ved oppstart. +. +:PROGRAM_CONFIG_FILE_ERROR +Kan ikke ĺpne filen %s. +. +:PROGRAM_CONFIG_USAGE +Konfigureringsverktoey: +Bruk "-writeconf FILNAVN" for † skrive gjeldende konfigurasjon. +Bruk "-writelang FILNAVN" for † skrive gjeldende spr†kstrenger. +. +:DISNEY_CONFIGFILE_HELP +Ingenting ĺ forandre pĺ ennĺ. +. +:BIOS_CONFIGFILE_HELP +Ingenting ĺ forandre pĺ ennĺ. +. +:PROGRAM_MOUNT_STATUS_2 +Stasjon %c er montert som %s. +. +:PROGRAM_MOUNT_STATUS_1 +N†v‘rende monterte stasjoner er: +. +:PROGRAM_MOUNT_ERROR_1 +Katalogen %s eksisterer ikke. +. +:PROGRAM_MOUNT_ERROR_2 +%s er ikke en katalog. +. +:PROGRAM_MOUNT_ILL_TYPE +Ugyldig type %s. +. +:PROGRAM_MOUNT_ALLREADY_MOUNTED +Stasjon %c er allerede montert med %s. +. +:PROGRAM_MOUNT_USAGE +Bruk "MOUNT STASJONSBOKSTAV LOKAL_MAPPE". +For eksempel vil "MOUNT c c:\windows" montere mappen "windows" som stasjon C: i DOSBox. +. +:PROGRAM_MEM_CONVEN +%10d kB ledig konvensjonelt minne +. +:PROGRAM_MEM_EXTEND +%10d kB ledig utvidet minne (EMS) +. +:PROGRAM_MEM_EXPAND +%10d kB ledig utvidet minne (XMS) +. +:PROGRAM_LOADFIX_ALLOC +%d kB allokert. +. +:PROGRAM_LOADFIX_DEALLOC +%d kB frigjort. +. +:PROGRAM_LOADFIX_DEALLOCALL +Brukt minne frigjort. +. +:PROGRAM_LOADFIX_ERROR +Minneallokeringsfeil. +. +:MSCDEX_SUCCESS +MSCDEX installert. +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Feil: Stasjonsbokstaver for flere CD-ROM-stasjoner m† v‘re etter hverandre. +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Feil: Ikke stoettet enn†. +. +:MSCDEX_ERROR_PATH +MSCDEX: Feil: Banen er ikke gyldig. +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Feil: For mange CD-ROM-stasjoner (maks. 5). MSCDEX-installasjon feilet. +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Monterte underkatalog: begrenset stoette. +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Feil: Ukjent problem. +. +:PROGRAM_RESCAN_SUCCESS +Stasjonshurtigminne renset. +. +:PROGRAM_INTRO +Velkommen til DOSBox, en x86-emulator med lyd og grafikk. +DOSBox lager et skall for deg som ser ut som gamle, enkle DOS. + +Her er noen kommandoer for † sette deg igang: +Foer du kan bruke filene p† ditt eget filsystem, +m† du montere mappen som inneholder filene. +For Windows: +mount c c:\dosprog vil opprette stasjon C: i DOSBox med c:\dosprog som innhold. + +For andre plattformer: +mount c /home/user/dosprog vil gjoere det samme. + +N†r monteringen er ferdig kan du skrive c: for † g† til din ferskt monterte +C-stasjon.  skrive dir der vil vise innholdet i katalogen. cd vil tillate deg †g† inn i en katalog (gjenkjent med i en kataloglisting). +Du kan kjoere programmer/filer som ender med .exe, .bat og .com. + +DOSBox vil avslutte uten en advarsel hvis det oppst†r en feil! +. +:SHELL_ILLEGAL_PATH +Ugyldig bane. +. +:SHELL_CMD_HELP +Stoettede kommandoer er: +. +:SHELL_CMD_ECHO_ON +ECHO er p†. +. +:SHELL_CMD_ECHO_OFF +ECHO er av. +. +:SHELL_ILLEGAL_SWITCH +Ugyldig bryter: %s. +. +:SHELL_CMD_CHDIR_ERROR +Kan ikke bytte arbeidskatalog til %s. +. +:SHELL_CMD_MKDIR_ERROR +Kan ikke opprette %s. +. +:SHELL_CMD_RMDIR_ERROR +Kan ikke fjerne %s. +. +:SHELL_CMD_DEL_ERROR +Kan ikke slette %s. +. +:SHELL_SYNTAXERROR +Syntaksen i kommandoen er ukorrekt. +. +:SHELL_CMD_SET_NOT_SET +Miljoevariabel %s er ikke definert. +. +:SHELL_CMD_SET_OUT_OF_SPACE +Ikke nok miljoeplass igjen. +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Manglende filnavn. +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Manglende nummer. +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Ugyldig nummer. +. +:SHELL_CMD_GOTO_MISSING_LABEL +Ingen etikett gitt til GOTO-kommandoen. +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Etiketten %s ikke funnet. +. +:SHELL_CMD_FILE_NOT_FOUND +Filen %s ble ikke funnet. +. +:SHELL_CMD_FILE_EXISTS +Filen %s finnes allerede. +. +:SHELL_CMD_DIR_INTRO +Innhold i %s +. +:SHELL_CMD_DIR_BYTES_USED +%5d fil(er) %17s Byte. +. +:SHELL_CMD_DIR_BYTES_FREE +%5d katalog(er) %17s Byte ledig. +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Stasjon %c finnes ikke. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Ugyldig kommando: %s. +. +:SHELL_CMD_PAUSE +Trykk en tast for † fortsette. +. +:SHELL_CMD_PAUSE_HELP +Venter p† et tastetrykk for † fortsette. +. +:SHELL_CMD_COPY_FAILURE +Kopieringsfeil: %s. +. +:SHELL_CMD_COPY_SUCCESS + %d fil(er) kopiert. +. +:SHELL_CMD_SUBST_NO_REMOVE +Fjerning av stasjon stoettes ikke. Ingenting blir gjort. +. +:SHELL_STARTUP +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş DOSBox-skall versjon 0.63 ş +ş DOSBox kjoerer spill for MS-DOS. ş +ş For skallkommandoer, skriv HELP ş +ş For en kort introduksjon, skriv INTRO ş +ş ş +ş Hvis du oensker stoerre fart, proev ctrl-F8 og ctrl-F12. ş +ş Trykk ctrl-F1 for † aktivere tastaturkartleggeren. ş +ş Les filen README i DOSBox-mappen for mer informasjon. ş +ş ş +ş HA DET GOEY! ş +ş -DOSBox-laget ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:SHELL_CMD_CHDIR_HELP +Endrer arbeidskatalog. +. +:SHELL_CMD_CLS_HELP +Toemmer skjermen. +. +:SHELL_CMD_DIR_HELP +Viser innholdet i en katalog. +. +:SHELL_CMD_ECHO_HELP +Viser meldinger og sl†r av/p† kommando-ekko. +. +:SHELL_CMD_EXIT_HELP +Avslutter skallet. +. +:SHELL_CMD_HELP_HELP +Viser hjelp. +. +:SHELL_CMD_MKDIR_HELP +Oppretter en katalog. +. +:SHELL_CMD_RMDIR_HELP +Fjerner en katalog. +. +:SHELL_CMD_SET_HELP +Endrer miljoevariabler. +. +:SHELL_CMD_IF_HELP +Utfoerer forholdsbehandling i satsvise programmer. +. +:SHELL_CMD_GOTO_HELP +Hopper til en etikett i en satsvis fil. +. +:SHELL_CMD_TYPE_HELP +Viser innholdet i en tekstfil. +. +:SHELL_CMD_REM_HELP +Legger til kommentarer i en satsvis fil. +. +:SHELL_CMD_NO_WILD +Dette er en simpel versjon av kommandoen, ingen jokersymbol tillat. +. +:SHELL_CMD_RENAME_HELP +Endrer navn p† filer. +. +:SHELL_CMD_DELETE_HELP +Sletter filer. +. +:SHELL_CMD_COPY_HELP +Kopier filer. +. +:SHELL_CMD_CALL_HELP +Starter en satsvis fil fra en annen satsvis fil. +. +:SHELL_CMD_SUBST_HELP +Oppnevner en intern katalog til en stasjon. +. +:SHELL_CMD_LOADHIGH_HELP +Kjoerer et program. Kun for kompatibilitet med satsvise filer. +. +:PROGRAM_MOUNT_CDROMS_FOUND +CD-ROM'er funnet: %d +. +:PROGRAM_INTRO_CDROM +Hvordan man monterer en fysisk/virtuell CD-ROM-stasjon i DOSBox: +DOSBox kan emulere CD-ROM'er p† flere niv†er. + +Basis-niv†et virker med alle CD-ROM-stasjoner og vanlige mapper. +Det installerer MSCDEX og markerer filene som skrivebeskyttet. +Dette er nok for de fleste spillene: +mount d D:\ -t cdrom eller mount d C:\eksempel -t cdrom +Hvis dette ikke virker, m† du kanskje fortelle DOSBox etiketten p† CD-ROM'en: +mount d C:\eksempel -t cdrom -label ETIKETT + +Det neste niv†et legger til litt lavniv†tilgang til CD-ROM-stasjonen, og +virker derfor ikke med mapper: +mount d D:\ -t cdrom -usecd 0 + +Det siste niv†et med CD-ROM-emulering avhenger av ditt operativsystem: +For Windows 2000, Windows XP og Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +For Windows 9x med et ASPI-lag installert: +mount d D:\ -t cdrom -usecd 0 -aspi +Erstatt D:\ med plasseringen til din CD-ROM. +Erstatt 0 i -usecd 0 med ned nummeret p† CD-ROM-stasjonen, som du f†r ved † +skrive: +mount -cd +. +:PROGRAM_BOOT_NOT_EXIST +Oppstartsdisk-filen finnes ikke; avbryter. +. +:PROGRAM_BOOT_NOT_OPEN +Kan ikke †pne oppstartsdisk-filen; avbryter. +. +:PROGRAM_BOOT_PRINT_ERROR +Denne kommandoen starter DOSBox fra et diskett- eller harddiskbilde. + +For denne kommandoen kan du oppgi flere disketter som du kan bytte mellom ved † trykke Ctrl-F4, hvor -l spesifiserer den monterte stasjonen du skal starte opp fra. Hvis du ikke har oppgitt en stasjonsbokstav, blir dette stasjon A. +De eneste stasjonene du kan starte opp fra er A, C og D. Skal du starte fra en harddisk-stasjon (C eller D), m† du foerst montere bildet med +IMGMOUNT-kommandoen. + +Syntaksen for denne kommandoen er: + +BOOT [bilde1.img bilde2.img] [-l stasjonsbokstav] +. +:PROGRAM_BOOT_UNABLE +Kan ikke starte opp fra stasjon %c. +. +:PROGRAM_BOOT_IMAGE_OPEN +pner bildefil: %s +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Kan ikke †pne %s. +. +:PROGRAM_BOOT_BOOT +Starter opp fra stasjon %c... +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Du m† oppgi stasjonsbokstaven som bildet skal monteres som. +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Du m† oppgi stasjonsbokstaven (0 eller 3) som du vil montere bildet som (0,1=fda,fdb;2,3=hda,hdb). +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +For CD-ROM-bilder: imgmount stasjonsbokstav bildeplassering -t iso + +For harddisk-bilder m† du du oppgi diskgeometrien: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" stoettes ikke. Oppgi "fat", "iso" eller "none". +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Du m† oppgi filbildet du oensker † montere. +. +:PROGRAM_IMGMOUNG_FILE_NOT_FOUND +Bildefilen ble ikke funnet. +. +:PROGRAM_IMGMOUNG_MOUNT +Bruk MOUNT-kommandoen for † montere mapper, ikke IMGMOUNT-kommandoen. +. +:PROGRAM_IMGMOUNT_ALLREADY_MOUNTED +En stasjon er allerede montert som den bokstaven. +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Kan ikke opprette stasjon fra filen. +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Stasjon %d montert som %s +. +:SHELL_CMD_SUBST_FAILURE +SUBST feilet. Enten skrev du feil i kommandolinjen, eller s† er m†lstasjonen allerede i bruk. +Det er bare mulig † bruke SUBST p† lokale stasjoner. +. +:SHELL_CMD_CHOICE_HELP +Venter p† et tastetrykk og setter ERRORLEVEL. +. +:SHELL_CMD_ATTRIB_HELP +Gjoer ingenting; kun for kompatibilitet. +. +:PROGRAM_MOUNT_UMOUNT_CURRENT +Du kan ikke avmontere den aktive stasjonen. +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Stasjon %c er ikke montert. +. +:PROGRAM_MOUNT_UMOUNT_SUCCES +Stasjon %c er fjernet. +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Virtuelle stasjoner kan ikke avmonteres. +. +:SHELL_CMD_PATH_HELP +Tatt med for kompatibilitet. +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/no/dosbox.conf dosbox-staging-0.77.0/contrib/old-translations/no/dosbox.conf --- dosbox-staging-0.76.0/contrib/old-translations/no/dosbox.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/no/dosbox.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,178 @@ +[sdl] +# fullscreen -- Start DOSBox direkte i fullskjerm. +# fulldouble -- Bruk dobbel bufring i fullskjerm. +# fullfixed -- Ikke endre skjermopplřsningen i fullskjermmodues. +# fullwidth/height -- Hvilken opplřsning som skal brukes i fullskjermmodues, bruk sammen med "fullfixed". +# output -- Hva som skal brukes for utdata: "surface", "overlay", "opengl", eller "openglnb". +# hwscale -- Ekstra skalering av vinduet hvis utdata-enheten střtter maskinvareskalering. +# autolock -- Musen vil automatisk lĺses hvis du klikker pĺ skjermen. +# sensitiviy -- Mussensitivitet. +# waitonerror -- Vent fřr konsollet renses hvis det oppstĺr en feil i DOSBox. + +fullscreen=false +fulldouble=false +fullfixed=false +fullresolution=1024x768 +output=surface +hwscale=1.00 +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper.txt + +[dosbox] +# language -- Velg en annen sprĺkfil. +# memsize -- Mengden minne DOSBox har i megabyte. +# machine -- Maskintypen som skal emuleres: "auto", "hercules", "cga", "tandy" eller "vga". +# Prřv en spesifik type hvis spillet ditt har problemer med "auto". + +language=DOSBox-0.63-nb_NO +machine=vga +captures=capture +memsize=16 + +[render] +# frameskip -- Hvor mange bilder DOSBox hopper over fřr det tegner et. +# snapdir -- Mappen hvor skjermdumper lagres. +# aspect -- Foreta aspektkorreksjon. +# scaler -- Skalering bruk til ĺ forstřrre/forbedre lave skjermmodi. +# Střttede valg er "none", "normal2x" og "advance2x". + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core -- Prosessorkjerne brukt i emulering: "normal", "full" eller "dynamic". +# cycles -- Mengde instruksjoner DOSBox prřver ĺ emulere hvert millisekund. +# Ĺ sette dette hřyere enn maskinen din kan takle er fćlt! +# cycleup -- Antall instruksjoner ĺ řke/senke med "keycombo". +# cycledown Ĺ sette den lavere enn 100 vil bli en prosentandel. + +core=normal +cycles=3000 +cycleup=500 +cycledown=20 + +[mixer] +# nosound -- Aktiver stille modus, dog lyden blir fortsatt emulert. +# rate -- Samplingsrate for mikser. Ĺ sette en enhet hřyere enn dette vil +# sansynligvis redusere lydkvaliteten dens. +# blocksize -- Blokkstřrrelse for mikser. Střrre blokker kan kanskje +# hjelpe stutrende lyd, men den vil ogsĺ bli tregere. +# wavedir -- Mappe hvor lagret lyd oppbevares nĺr du bruker +# tastekombinasjonen for lydopptak. Se filen "README". + +nosound=false +rate=22050 +blocksize=2048 +prebuffer=10 + +[midi] +# mpu401 -- Aktiver emulering av MPU-401. +# device -- Enhet som skal motta MIDI-data fra MPU-401. Dette kan vćre "default", +# "alsa", "oss", "win32", "coreaudio" eller "none". +# config -- Spesielle konfigureringsmuligheter for enheten. + +mpu401=true +intelligent=true +device=default +config= + +[sblaster] +# sblaster -- Aktiver emulering av SoundBlaster. +# base,irq,dma -- IO/IRQ/DMA-adressen for SoundBlaster. +# sbrate -- Samplingsrate for SoundBlaster-emuleringen. +# adlib -- Aktiver emulering av AdLib. +# adlibrate -- Samplingsrate for AdLib-emulering. +# cms -- Aktiver emulering av Creative Music System/GameBlaster. +# Ĺ aktivere bĺde Adlib og CMS kan skape konflikter. +# cmsrate -- Samplingsrate for CMS-emulering. + +type=sb16 +base=220 +irq=7 +dma=1 +hdma=5 +mixer=true +oplmode=auto +oplrate=22050 + +[gus] +# gus -- Aktiver emulering av Gravis UltraSound. +# base,irq1,irq2,dma1,dma2 -- IO/IRQ/DMA-adressen til +# Gravis UltraSound. (Lik IRQ og DMA er OK.) +# rate -- Samplingsrate for UltraSound-emulering. +# ultradir -- Sti til UltraSound-mappen. I denne mappen břr det +# vćre en MIDI-mappe som inneholder oppdateringsfilene +# for GUS-avspilling. Oppdateringssett bruk med +# Timidity břr virke fint. + +gus=true +rate=22050 +base=240 +irq1=5 +irq2=5 +dma1=3 +dma2=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker -- Aktiver emulering av PC-Speaker. +# pcrate -- Samplingsrate for PC-Speaker-lydgeneratoren. +# tandy -- Aktiver emulering av Tandy 3-Voice. +# tandyrate -- Samplingsrate for Tandy 3-Voice-lydgenereringen. +# disney -- Aktiver emulering av Dysney Sound Source. + +pcspeaker=true +pcrate=22050 +tandyrate=22050 +disney=true + +[bios] +# Ingenting ĺ forandre pĺ ennĺ. + + +[dos] +# xms -- Aktiver XMS-střtte. +# ems -- Aktiver EMS-střtte. + +xms=true +ems=true + +[modem] +# modem -- Aktiver emulering av virtuelt modem. +# comport -- COM-porten modemet er koblet til. +# listenport -- TCP-porten modemet lytter pĺ for inkommende forbindelser. + +modem=false +comport=2 +listenport=23 + +[directserial] +# directserial -- Aktiver seriell passeringsstřtte. +# comport -- COM-port inne i DOSBox. +# realport -- COM-port pĺ maskinen. +# defaultbps -- Standardhastighet (BPS). +# parity -- Pariteten til pakkene. Dette kan vćre N, E eller O. +# bytesize -- Střrrelse pĺ hver pakke. Dette kan vćre 5 eller 8. +# stopbit -- Antall stoppbiter. Dette kan vćre 1 eller 2. + +directserial=false +comport=1 +realport=COM1 +defaultbps=1200 +parity=N +bytesize=8 +stopbit=1 + +[ipx] +# ipx -- Slĺ pĺ IPX over UDP/IP-emulering. + +ipx=false + +[autoexec] +# Linjer i dette omrĺdet vil bli kjřrt ved oppstart. + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/no/LESMEG.txt dosbox-staging-0.77.0/contrib/old-translations/no/LESMEG.txt --- dosbox-staging-0.76.0/contrib/old-translations/no/LESMEG.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/no/LESMEG.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,18 @@ +LESMEG for norsk sprĂĽkfil til DOSBox 0.63 +----------------------------------------- + + +OVERSETTELSE +Oversettelse av Alexander N. Sørnes + +INSTALLASJON +Plasser filene "dosbox.conf" og "DOSBox-0.63-nb_NO" i samme mappe som DOSBox-programfilen + +ELLER + +Rediger din eksisterende "dosbox.conf" slik at "language" peker til "DOSBox-0.63-nb_NO" + +ELLER + +Plasser filen "DOSBox-0.63-nb_NO" i den mappen du mĂĽtte ønske, og kjør deretter DOSBox med bryteren +-lang FILBANE \ No newline at end of file diff -Nru dosbox-staging-0.76.0/contrib/old-translations/no/version.txt dosbox-staging-0.77.0/contrib/old-translations/no/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/no/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/no/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Norwegian 0.63 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pl/dosbox-0.73.conf dosbox-staging-0.77.0/contrib/old-translations/pl/dosbox-0.73.conf --- dosbox-staging-0.76.0/contrib/old-translations/pl/dosbox-0.73.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pl/dosbox-0.73.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,231 @@ +# To jest plik konfiguracyjny dla DOSBOXa 0.73. +# Linie zaczynajšce się od # sš komentarzami. +# Sš one używane do (pobieżnego) udokumentowania efektu każdej opcji. + +[sdl] +# fullscreen: Włšcza dosboxa w trybie pełnoekranowym.. +# fulldouble: Używa podwójnego buforowania w trybie pełnoekranowym.. +# fullresolution: Jakiej rozdzielczoœci używać w trybie pełnoekranowym: oryginalnej czy narzuconej (np. 1024x768). +# windowresolution: Przeskalowuje okno do tego rozmiaru O ILE urzšdzenie wyjœcia obsługuje sprzętowe skalowanie. +# output: Jakiego systemu obrazu używać dla wyjœcia. +# Possible values: surface, overlay, opengl, openglnb, ddraw. +# autolock: Mysz zostanie automatycznie zablokowana, kiedy klikniesz na ekranie. +# sensitivity: Czułoœć myszy. +# waitonerror: Zatrzymuje przed zamknięciem konsoli, jeœli dosbox zgłosił błšd. +# priority: Priorytety dla dosboxa. Druga wartoœć po przecinku dotyczy okna dosboxa, które jest nieaktywne/zminimalizowane. ('pause' można używać tylko jako drugiej wartoœci) +# Możliwe wartoœci: lowest, lower, normal, higher, highest, pause. +# mapperfile: Plik używany do wczytywania/zapisywania skrótów klawiszowych. +# usescancodes: Unika symulowania klawiszy, może nie działać na wszystkich systemach operacyjnych. + +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper.txt +usescancodes=true + +[dosbox] +# language: Wybiera inny plik językowy +# machine: Typ maszyny, który dosbox próbuje naœladować. +# Możliwe wartoœci: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe. +# captures: Katalog, w którym sš przechowywane przechwycone pliki wave i midi oraz zrzuty ekranu. +# memsize: Rozmiar pamięci DOSBoxa w megabajtach. +# Tej wartoœci lepiej nie zmieniać aby uniknšć problemów z niektórymi grami, +# choć niektóre gry mogš wymagać większej wartoœci. +# Generalnie podniesienie tej wartoœci nie powoduje przyœpieszenia. + +language=polish.lng +machine=svga_s3 +captures=capture +memsize=16 + +[render] +# frameskip: Jak wiele ramek DOSBox przeskakuje zanim jakšœ narysuje. +# aspect: Dokonuj korekcji aspektu. Jeœli wybrana metoda wyœwietlania nie wspiera skalowania, ustawienie tej opcji może spowodować spowolnienie!. +# scaler: Metoda skalowania używana do powiększania/polepszania obrazu w niskiej rozdzielczoœci. Dopisanie 'forced' powoduje używanie metody nawet gdy wynik może nie być pożšdany. +# Możliwe wartoœci: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x. + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core: Jšdro procesora używane do emulacji. auto przełšcza w tryb dynamic jeœli jest dostępny i właœciwy. +# Możliwe wartoœci: auto, dynamic, normal, simple. +# cputype: CPU Typ procesora używanego w emulacji. auto to wybór najszybszego. +# Możliwe wartoœci: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch. +# cycles: Liczba instrukcji które DOSBox próbuje emulować w każdej milisekundzie. Ustawienie tej wartoœci na zbyt dużš powoduje przerwy w dŸwięku i zacinanie się obrazu. Cykle można ustawić na 3 sposoby: +# 'auto' próbuje odgadnšć czego potrzebuje gra. +# Przeważnie działa, ale może nie sprawdzać się dla pewnych gier. +# 'fixed #numer' ustawi narzuconš liczbę cykli. Tego przeważnie potrzebujesz jeœli 'auto' zawiedzie. +# (Przykład: fixed 4000) +# 'max' zaalokuje tyle cykli ile tylko komputer jest w stanie obsłużyć. +# +# Możliwe wartoœci: auto, fixed, max. +# cycleup: Liczba cykli o którš wartoœć zwiększa/zmniejsza kombinacja klawiszy. +# cycledown: Ustawienie tej wartoœci na mniejszš niż 100 powoduje odpowiedniš zmianę procentowš. + +core=auto +cputype=auto +cycles=auto +cycleup=500 +cycledown=20 + +[mixer] +# nosound: Włšcz tryb cichy, choć dŸwięk nadal jest emulowany. +# rate: Częstotliwoœć próbkowania miksera, ustawienie częstotliwoœci urzšdzenia ponad tš wartoœć prawdopodobnie obniży jakoœć dŸwięku.. +# Możliwe wartoœci: 22050, 44100, 48000, 32000, 16000, 11025, 8000, 49716. +# blocksize: Wielkoœć bloku miksera, większe bloki mogš pomóc na "zajškiwania się" dŸwięku, ale będzie też więcej zacięć. +# Możliwe wartoœci: 2048, 4096, 8192, 1024, 512, 256. +# prebuffer: Jak wiele milisekund danych przechowywać. + +nosound=false +rate=22050 +blocksize=2048 +prebuffer=10 + +[midi] +# mpu401: Typ emulowanego MPU-401. +# Możliwe wartoœci: intelligent, uart, none. +# mididevice: Urzšdzenie, które będzie otrzymywać dane MIDI z MPU-401. +# Możliwe wartoœci: default, win32, alsa, oss, coreaudio, coremidi, none. +# midiconfig: Specjalne opcje konfiguracji dla sterownika urzšdzenia. Przeważnie jest to identyfikator urzšdzenia, którego chcesz użyć. Szczegóły znajdujš się w pliku README.. + +mpu401=intelligent +mididevice=default +midiconfig= + +[sblaster] +# sbtype: Typ emulowanego sblastera. +# Możliwe wartoœci: sb1, sb2, sbpro1, sbpro2, sb16, none. +# sbbase: Adres IO soundblastera. +# Możliwe wartoœci: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300. +# irq: Numer IRQ soundblastera. +# Możliwe wartoœci: 7, 5, 3, 9, 10, 11, 12. +# dma: Numer DMA soundblastera. +# Możliwe wartoœci: 1, 5, 0, 3, 6, 7. +# hdma: Numer High DMA soundblastera. +# Możliwe wartoœci: 1, 5, 0, 3, 6, 7. +# sbmixer: Pozwala mixerowi soundblastera na modyfikowanie mixera DOSboxa. +# oplmode: Typ emulacji OPL. 'auto' powoduje wybranie trybu na podstawie typu soundblastera. Wszystkie tryby OPL, oprócz trybu 'cms', sš kompatybilne z Adlib. +# Możliwe wartoœci: auto, cms, opl2, dualopl2, opl3, none. +# oplemu: Dostawca emulacji OPL. compat lub old mogš dawać lepszš jakoœć (zobacz też oplrate). +# Możliwe wartoœci: default, compat, fast, old. +# oplrate: Częstotliwoœć próbkowania emulacji muzyki OPL. Użyj 49716 dla najlepszej jakoœci (ustaw odpowiedniš częstotliwoœć miksera). +# Możliwe wartoœci: 22050, 49716, 44100, 48000, 32000, 16000, 11025, 8000. + +sbtype=sb16 +sbbase=220 +irq=7 +dma=1 +hdma=5 +sbmixer=true +oplmode=auto +oplemu=default +oplrate=22050 + +[gus] +# gus: Włšcz emulację karty Gravis Ultrasound. +# gusrate: Częstotliwoœć próbkowania emulacji Ultrasounda. +# Możliwe wartoœci: 22050, 44100, 48000, 32000, 16000, 11025, 8000, 49716. +# gusbase: Bazowy adres IO karty Gravis Ultrasound. +# Możliwe wartoœci: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300. +# gusirq: Numer IRQ karty Gravis Ultrasound. +# Możliwe wartoœci: 5, 3, 7, 9, 10, 11, 12. +# gusdma: Kanał DMA karty Gravis Ultrasound. +# Możliwe wartoœci: 3, 0, 1, 5, 6, 7. +# ultradir: Œcieżka do katalogu Ultrasounda. W tym katalogu +# powinien znajdować się katalog MIDI, zawierajšcy +# patche dla odtwarzania GUS. Zestawy patchy używane +# z Timidity powinny działać dobrze.. +gus=false +gusrate=22050 +gusbase=240 +gusirq=5 +gusdma=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker: Włšcz emulację PC-Spekera. +# pcrate: Częstotliwoœć próbkowania dŸwięku generowanego przez PC-Speakera. +# Możliwe wartoœci: 22050, 44100, 48000, 32000, 16000, 11025, 8000, 49716. +# tandy: Włšcz emulację Tandy Sound System. Przy 'auto' emulacja odbywa się tylko jeœli maszyna jest ustawiona na 'tandy'. +# Możliwe wartoœci: auto, on, off. +# tandyrate: Częstotliwoœć próbkowania Tandy 3-Voice generation. +# Możliwe wartoœci: 22050, 44100, 48000, 32000, 16000, 11025, 8000, 49716. +# disney: Włšcza emulację Disney Sound Source. (kompatybilne z Covox Voice Master and Speech Thing). + +pcspeaker=true +pcrate=22050 +tandy=auto +tandyrate=22050 +disney=true + +[joystick] +# joysticktype: Typ emulowanego joystika; auto (domyœlny), brak, +# 2axis (wspiera dwa joysticki), +# 4axis (wspiera jeden joystick, używany jest pierwszy), +# 4axis_2 (wspiera jeden joystick, używany jest drugi), +# fcs (Thrustmaster), ch (CH Flightstick). +# none wyłšcza emulację joysticków. +# auto wybiera typ emulacji zależnie od prawdziwych joysticków.. +# Możliwe wartoœci: auto, 2axis, 4axis, 4axis_2, fcs, ch, none. +# timed: Włšcz ograniczone interwały dla osi (false powoduje stare zachowanie). +# autofire: strzela cišgle tak długo jak długo wciœnięty jest klawisz. +# swap34: Zamienia 3 i 4 oœ. Może być przydatne dla pewnych joysticków. +# buttonwrap: Włšcza zawijanie numerów przycisków ze względu na liczbę emulowanych przycisków. + +joysticktype=auto +timed=true +autofire=false +swap34=false +buttonwrap=true + +[serial] +# serial1: Ustawia typ urzšdzenia podłšczonego do portu com. +# Możliwe wartoœci to: disabled, dummy, modem, nullmodem, directserial. +# Dodatkowe parametry muszš znaleŸć się w tej samej linii w formacie parametr:wartoœć. Parametrem dla wszystkich wartoœci jest irq. +# dla directserial: realport (wymagany), rxdelay (opcjonalny). +# (realport:COM1 realport:ttyS0). +# dla modem: listenport (opcjonalny). +# dla nullmodem: server, rxdelay, txdelay, telnet, usedtr, +# transparent, port, inhsocket (wszystkie opcjonalne). +# Przykład: serial1=modem listenport:5000. +# Możliwe wartoœci: dummy, disabled, modem, nullmodem, directserial. +# serial2: Zobacz serial1. +# Możliwe wartoœci: dummy, disabled, modem, nullmodem, directserial. +# serial3: Zobacz serial1. +# Możliwe wartoœci: dummy, disabled, modem, nullmodem, directserial. +# serial4: Zobacz serial1. +# Możliwe wartoœci: dummy, disabled, modem, nullmodem, directserial. + +serial1=dummy +serial2=dummy +serial3=disabled +serial4=disabled + +[dos] +# xms: Włšcz obsługę XMS. +# ems: Włšcz obsługę EMS. +# umb: Włšcz obsługę UMB. +# keyboardlayout: Kod języka layoutu klawiatury (lub none). + +xms=true +ems=true +umb=true +keyboardlayout=auto + +[ipx] +# ipx: Włšcz ipx dla emulacji UDP/IP. + +ipx=false + +[autoexec] +# Linie w tej sekcji zostanš uruchomione przy starcie. + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pl/polish.lng dosbox-staging-0.77.0/contrib/old-translations/pl/polish.lng --- dosbox-staging-0.76.0/contrib/old-translations/pl/polish.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pl/polish.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,736 @@ +:CONFIG_FULLSCREEN +WˆĽcaz dosboxa w trybie peˆnoekranowym.. +:CONFIG_FULLDOUBLE +Užywa podw˘jnego buforowania w trybie peˆnoekranowym.. +:CONFIG_FULLRESOLUTION +Jakiej rozdzielczo˜ci užywa† w trybie peˆnoekranowym: oryginalnej czy narzuconej (np. 1024x768).. +:CONFIG_WINDOWRESOLUTION +Przeskalowuje okno do tego rozmiaru O ILE urzĽdzenie wyj˜cia obsˆuguje sprzŠtowe skalowanie.. + +:CONFIG_OUTPUT +Jakiego systemu obrazu užywa† dla wyj˜cia.. +:CONFIG_AUTOLOCK +Mysz zostanie automatycznie zablokowana, kiedy klikniesz na ekranie.. +:CONFIG_SENSITIVITY +Czuˆo˜† myszy.. +:CONFIG_WAITONERROR +Zatrzymuje przed zamkniŠciem konsoli, je˜li dosbox zgˆosiˆ bˆĽd.. +:CONFIG_PRIORITY +Priorytety dla dosboxa. Druga warto˜† po przecinku dotyczy okna dosboxa, kt˘re jest nieaktywne/zminimalizowane. ('pause' možna užywa† tylko jako drugiej warto˜ci). +:CONFIG_MAPPERFILE +Plik užywany do wczytywania/zapisywania skr˘t˘w klawiszowych.. +:CONFIG_USESCANCODES +Unika symulowania klawiszy, može nie dziaˆa† na wszystkich systemach operacyjnych.. +:CONFIG_LANGUAGE +Wybiera inny plik jŠzykowy.. +:CONFIG_MACHINE +Typ maszyny, kt˘ry dosbox pr˘buje na˜ladowa†.. +:CONFIG_CAPTURES +Katalog, w kt˘rym sĽ przechowywane przechwycone pliki wave i midi oraz zrzuty ekranu.. +:CONFIG_MEMSIZE +Rozmiar pamiŠci DOSBoxa w megabajtach. + Tej warto˜ci lepiej nie zmienia† aby uniknĽ† problem˘w z niekt˘rymi grami, + cho† niekt˘re gry mogĽ wymaga† wiŠkszej warto˜ci. + Generalnie podniesienie tej warto˜ci nie powoduje przy˜pieszenia.. +:CONFIG_FRAMESKIP +Jak wiele ramek DOSBox przeskakuje zanim jakĽ˜ narysuje.. +:CONFIG_ASPECT +Dokonuj korekcji aspektu. Je˜li wybrana metoda wy˜wietlania nie wspiera skalowania, ustawienie tej opcji može spowodowa† spowolnienie!. +:CONFIG_SCALER +Metoda skalowania užywana do powiŠkszania/polepszania obrazu w niskiej rozdzielczo˜ci. Dopisanie 'forced' powoduje užywanie metody nawet gdy wynik može nie by† požĽdany.. +:CONFIG_CORE +JĽdro procesora užywane do emulacji. auto przeˆĽcza w tryb dynamic je˜li jest dostŠpny i wˆa˜ciwy.. +:CONFIG_CPUTYPE +Typ procesora užywanego w emulacji. auto to wyb˘r najszybszego.. +:CONFIG_CYCLES +Liczba instrukcji kt˘re DOSBox pr˘buje emulowa† w každej milisekundzie. Ustawienie tej warto˜ci na zbyt dužĽ powoduje przerwy w dŤwiŠku i zacinanie siŠ obrazu. Cykle možna ustawi† na 3 sposoby: + 'auto' pr˘buje odgadnĽ† czego potrzebuje gra. + Przewažnie dziaˆa, ale može nie sprawdza† siŠ dla pewnych gier. + 'fixed #numer' ustawi narzuconĽ liczbŠ cykli. Tego przewažnie potrzebujesz je˜li 'auto' zawiedzie. + (Przykˆad: fixed 4000) + 'max' zaalokuje tyle cykli ile tylko komputer jest w stanie obsˆužy†. +:CONFIG_CYCLEUP +Liczba cykli o kt˘rĽ warto˜† zwiŠksza/zmniejsza kombinacja klawiszy.. +:CONFIG_CYCLEDOWN +Ustawienie tej warto˜ci na mniejszĽ niž 100 powoduje odpowiedniĽ zmianŠ procentowĽ. +:CONFIG_NOSOUND +WˆĽcz tryb cichy, cho† dŤwiŠk nadal jest emulowany.. +:CONFIG_RATE +CzŠstotliwo˜† pr˘bkowania miksera, ustawienie czŠstotliwo˜ci urzĽdzenia ponad tĽ warto˜† prawdopodobnie obnižy jako˜† dŤwiŠku.. +:CONFIG_BLOCKSIZE +Wielko˜† bloku miksera, wiŠksze bloki mogĽ pom˘c na "zajĽkiwania siŠ" dŤwiŠku, ale bŠdzie tež wiŠcej zaciŠ†.. +:CONFIG_PREBUFFER +Jak wiele milisekund danych przechowywa†.. +:CONFIG_MPU401 +Typ emulowanego MPU-401.. +:CONFIG_MIDIDEVICE +UrzĽdzenie, kt˘re bŠdzie otrzymywa† dane MIDI z MPU-401.. +:CONFIG_MIDICONFIG +Specjalne opcje konfiguracji dla sterownika urzĽdzenia. Przewažnie jest to identyfikator urzĽdzenia, kt˘rego chcesz užy†. Szczeg˘ˆy znajdujĽ siŠ w pliku README.. +:CONFIG_SBTYPE +Typ emulowanego sblastera.. +:CONFIG_SBBASE +Adres IO soundblastera.. +:CONFIG_IRQ +Numer IRQ soundblastera.. +:CONFIG_DMA +Numer DMA soundblastera.. +:CONFIG_HDMA +Numer High DMA soundblastera.. + +:CONFIG_SBMIXER +Pozwala mixerowi soundblastera na modyfikowanie mixera DOSboxa.. +:CONFIG_OPLMODE +Typ emulacji OPL. 'auto' powoduje wybranie trybu na podstawie typu soundblastera. Wszystkie tryby OPL, opr˘cz trybu 'cms', sĽ kompatybilne z Adlib.. +:CONFIG_OPLEMU +Dostawca emulacji OPL. compat lub old mogĽ dawa† lepszĽ jako˜† (zobacz tež oplrate).. +:CONFIG_OPLRATE +CzŠstotliwo˜† pr˘bkowania emulacji muzyki OPL. Užyj 49716 dla najlepszej jako˜ci (ustaw odpowiedniĽ czŠstotliwo˜† miksera).. +:CONFIG_GUS +WˆĽcz emulacjŠ karty Gravis Ultrasound.. +:CONFIG_GUSRATE +CzŠstotliwo˜† pr˘bkowania emulacji Ultrasounda.. +:CONFIG_GUSBASE +Bazowy adres IO karty Gravis Ultrasound.. +:CONFIG_GUSIRQ +Numer IRQ karty Gravis Ultrasound.. +:CONFIG_GUSDMA +Kanaˆ DMA karty Gravis Ultrasound.. +:CONFIG_ULTRADIR +—ciežka do katalogu Ultrasounda. W tym katalogu +powinien znajdowa† siŠ katalog MIDI, zawierajĽcy +patche dla odtwarzania GUS. Zestawy patchy užywane +z Timidity powinny dziaˆa† dobrze.. +:CONFIG_PCSPEAKER +WˆĽcz emulacjŠ PC-Spekera.. +:CONFIG_PCRATE +CzŠstotliwo˜† pr˘bkowania dŤwiŠku generowanego przez PC-Speakera.. +:CONFIG_TANDY +WˆĽcz emulacjŠ Tandy Sound System. Przy 'auto' emulacja odbywa siŠ tylko je˜li maszyna jest ustawiona na 'tandy'.. +:CONFIG_TANDYRATE +CzŠstotliwo˜† pr˘bkowania Tandy 3-Voice generation.. +:CONFIG_DISNEY +WˆĽcza emulacjŠ Disney Sound Source. (kompatybilne z Covox Voice Master and Speech Thing).. +:CONFIG_JOYSTICKTYPE +Typ emulowanego joystika; auto (domy˜lny), brak, +2axis (wspiera dwa joysticki), +4axis (wspiera jeden joystick, užywany jest pierwszy), +4axis_2 (wspiera jeden joystick, užywany jest drugi), +fcs (Thrustmaster), ch (CH Flightstick). +none wyˆĽcza emulacjŠ joystick˘w. +auto wybiera typ emulacji zaležnie od prawdziwych joystick˘w.. +:CONFIG_TIMED +WˆĽcz ograniczone interwaˆy dla osi (false powoduje stare zachowanie).. +:CONFIG_AUTOFIRE +strzela ciĽgle tak dˆugo jak dˆugo wci˜niŠty jest klawisz.. +:CONFIG_SWAP34 +Zamienia 3 i 4 o˜. Može by† przydatne dla pewnych joystick˘w.. +:CONFIG_BUTTONWRAP +WˆĽcza zawijanie numer˘w przycisk˘w ze wzglŠdu na liczbŠ emulowanych przycisk˘w.. +:CONFIG_SERIAL1 +Ustawia typ urzĽdzenia podˆĽczonego do portu com. +Možliwe warto˜ci to: disabled, dummy, modem, nullmodem, directserial. +Dodatkowe parametry muszĽ znaleŤ† siŠ w tej samej linii w formacie parametr:warto˜†. Parametrem dla wszystkich warto˜ci jest irq. +dla directserial: realport (wymagany), rxdelay (opcjonalny). + (realport:COM1 realport:ttyS0). +dla modem: listenport (opcjonalny). +dla nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (wszystkie opcjonalne). +Przykˆad: serial1=modem listenport:5000. +:CONFIG_SERIAL2 +Zobacz serial1. +:CONFIG_SERIAL3 +Zobacz serial1. +:CONFIG_SERIAL4 +Zobacz serial1. +:CONFIG_XMS +WˆĽcz obsˆugŠ XMS.. +:CONFIG_EMS +WˆĽcz obsˆugŠ EMS.. +:CONFIG_UMB +WˆĽcz obsˆugŠ UMB.. +:CONFIG_KEYBOARDLAYOUT +Kod jŠzyka layoutu klawiatury (lub none).. +:CONFIG_IPX +WˆĽcz ipx dla emulacji UDP/IP.. +:AUTOEXEC_CONFIGFILE_HELP +Linie w tej sekcji zostanĽ uruchomione przy starcie. +. +:CONFIGFILE_INTRO +# To jest plik konfiguracyjny dla DOSBOXa %s. +# Linie zaczynajĽce siŠ od # sĽ komentarzami. +# SĽ one užywane do (pobiežnego) udokumentowania efektu každej opcji. +. +:CONFIG_SUGGESTED_VALUES +Možliwe warto˜ci. +:PROGRAM_CONFIG_FILE_ERROR +Nie možna otworzy† pliku %s +. +:PROGRAM_CONFIG_USAGE +NarzŠdzie Config: +Užyj -writeconf nazwapliku do zapisania aktualnej konfiguracji. +Užyj -writelang nazwapliku do zapisania aktualnych napis˘w jŠzykowych. +. +:PROGRAM_CONFIG_SECURE_ON +PrzeˆĽczono w tryb bezpieczny. +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Ta operacja nie jest možliwa w trybie bezpiecznym. +. +:PROGRAM_CONFIG_SECTION_ERROR +Sekcja %s nie istnieje. +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Brak takiej sekcji lub wˆa˜ciwo˜ci. +. +:PROGRAM_CONFIG_NO_PROPERTY +Nie ma wˆa˜ciwo˜ci %s w sekcji %s. +. +:PROGRAM_CONFIG_GET_SYNTAX +Poprawna skˆadnia: config -get "sekcja wˆa˜ciwo˜†". +. +:PROGRAM_MOUNT_CDROMS_FOUND +Znalezione CDROMy: %d +. +:PROGRAM_MOUNT_STATUS_2 +Dysk %c jest zamontowany jako %s +. +:PROGRAM_MOUNT_STATUS_1 +Aktualnie zamontowane dyski: +. +:PROGRAM_MOUNT_ERROR_1 +Katalog %s nie istnieje. +. +:PROGRAM_MOUNT_ERROR_2 +%s nie jest katalogiem +. +:PROGRAM_MOUNT_ILL_TYPE +Nieprawidˆowy typ %s +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Dysk %c jest juž zamontowany jako %s +. +:PROGRAM_MOUNT_USAGE +Spos˘b užywania MOUNT Litera-Dysku Lokalny-Katalog +Tak wiŠc MOUNT c c:\windows zamontuje katalog windows w DOSBoxie jako dysk c:. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Dysk %c nie jest zamontowany. +. +:PROGRAM_MOUNT_UMOUNT_SUCCES +Dysk %c zostaˆ pomy˜lnie usuniŠty. +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Dyski Wirtualne nie mogĽ zosta† odmontowane. +. +:PROGRAM_MOUNT_WARNING_WIN +Montowanie dysku c:\ NIE jest zalecane. ProszŠ nastŠpnym razem zamontowa† (pod)katalog. +. +:PROGRAM_MOUNT_WARNING_OTHER +Montowanie / nie jest zalecane.ProszŠ nastŠpnym razem zamontowa† (pod)katalog. +. +:PROGRAM_MEM_CONVEN +%10d Kb wolnej pamiŠci konwencjonalnej +. +:PROGRAM_MEM_EXTEND +%10d Kb wolnej pamiŠci rozszerzonej +. +:PROGRAM_MEM_EXPAND +%10d Kb wolnej pamiŠci stronicowej +. +:PROGRAM_MEM_UPPER +%10d Kb wolnej pamiŠci g˘rnej w %d blokach (najwiŠkszy blok %d Kb) +. +:PROGRAM_LOADFIX_ALLOC +%d kb zaalokowanych. +. +:PROGRAM_LOADFIX_DEALLOC +%d kb zwolnionych. +. +:PROGRAM_LOADFIX_DEALLOCALL +Užyta pamiŠ† zwolniona. +. +:PROGRAM_LOADFIX_ERROR +BˆĽd alokacji pamiŠci. +. +:MSCDEX_SUCCESS +MSCDEX zainstalowany. +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Poražka: Litery dysk˘w wielu napŠd˘w CDRom muszĽ nastŠpowa† po sobie. +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Poražka: jeszcze nie obsˆugiwane. +. +:MSCDEX_ERROR_PATH +MSCDEX: Poražka: —ciežka nieprawidˆowa. +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Poražka: Za dužo napŠd˘w CDRom. (maksymalnie: 5). Instalacja MSCDEX nieudana. +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Zamontowano podkatalog: ograniczone wsparcie. +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Poražka: Plik nie jest obrazem iso/cue lub zawiera bˆŠdy. +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Poražka: Nieznany bˆĽd. +. +:PROGRAM_RESCAN_SUCCESS +Cache dysku wyczyszczony. +. +:PROGRAM_INTRO +Witaj w DOSBoxie, emulatorze x86 z dŤwiŠkiem i grafikĽ. +DOSBox tworzy dla Ciebie shella, kt˘ry wyglĽda jest stary, prosty DOS. + +Informacja o podstawowach montowania napiszintro mount +Informacja o wsparciu dla CD-ROM˘w napisz intro cdrom +Informacja o klawiszach specjalnych napisz intro special +WiŠcej informacji o DOSBoxie, zobacz na http://dosbox.sourceforge.net/wiki + +DOSBox zatrzyma/wyˆĽczy siŠ bez ostrzeženia je˜li wystĽpi bˆĽd! + + +. +:PROGRAM_INTRO_MOUNT_START +Tu znajduje siŠ kilka komend potrzebnych na poczĽtek: +Zanim užyjesz plik˘w z wˆasnego systemu plik˘w, +musisz zamontowa† katalog zawierajĽcy te pliki. + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ utworzy dysk C z c:\dosprog jako zawarto˜ciĽ. ş +ş ş +ş c:\dosprog\ to przykˆad. Zamieä go na Tw˘j wˆasny katalog z grami.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprog utworzy dysk C z ~/dosprog jako zawarto˜ciĽ. ş +ş ş +ş ~/dosprog to przykˆad. Zamieä go na Tw˘j wˆasny katalog z grami.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:PROGRAM_INTRO_MOUNT_END +Gdy montowanie zostanie zakoäczone, možesz wpisa† c: aby przej˜† do nowo +utworzonego dysku C. Wpisanie tam dir pokaže jego zawarto˜†. cd pozwoli Ci +na wpisanie katalogu (Rozpoznawany poprzez [] w listingu katalogu). +Možesz uruchomi† programy/pliki z rozszerzeniem .exe .bat i .com. +. +:PROGRAM_INTRO_CDROM +Jak zamontowa† fizyczny/wirtualny napŠd CD-ROM w DOSBoxie: +DOSBox dostarcza kilka poziom˘w emulacji pˆyt CD. + +Poziom podstawowy dziaˆa na wszystkich napŠdach CD-ROM i normalnych katalogach. +Instaluje MSCDEX i oznacza pliki jako tylko-do-odczytu. +Przewažnie jest to wystarczajĽce dla wiŠkszo˜ci gier: +mount d D:\ -t cdrom or mount d C:\example -t cdrom +Je˜li to nie dziaˆa, možesz by† zmuszony do podania etykiety pˆyty CD: +mount d C:\example -t cdrom -label ETYKIETA + +NastŠpny poziom dodaje trochŠ wsaprcie niskopoziomowego. +Dlatego dziaˆa jedynie na napŠdach CD-ROM. +mount d D:\ -t cdrom -usecd 0 + +Ostatni poziom wsparcia zaležy od systemu operacyjnego: +Dla Windows 2000, Windows XP i Linuxa: +mount d D:\ -t cdrom -usecd 0 -ioctl +Dla Windows 9x z zainstalowanĽ warstwĽ ASPI: +mount d D:\ -t cdrom -usecd 0 -aspi + +Zamieä D:\ na poˆoženie napŠdu CD-ROM. +Zamieä 0 w -usecd 0 na numer wy˜wietlany przy CD-ROMie po wpisaniu komendy: +mount -cd +. +:PROGRAM_INTRO_SPECIAL +Klawisze specjalne: +Domy˜lne dowiĽzania klawiszowe. +MogĽ zosta† zmienione narzŠdziem keymapper. + +ALT-ENTER : PrzejdŤ do trybu peˆnoekranowego i spowrotem. +ALT-PAUSE : Zapauzuj DOSBoxa. +CTRL-F1 : Uruchom keymappera. +CTRL-F4 : Zaaktualizuj cache katalog˘w dla wszystkich dysk˘w! Przeˆaduj zamontowany obraz dysku. +CTRL-ALT-F5 : Rozpocznij/zatrzymaj nagrywanie filmu z zawarto˜ciĽ ekranu. +CTRL-F5 : Zr˘b i zapisz zrzut ekranu. +CTRL-F6 : Rozpocznij/zatrzymaj nagrywanie dŤwiŠku do pliku wave. +CTRL-ALT-F7 : Rozpocznij/zatrzymaj nagrywanie komend OPL. +CTRL-ALT-F8 : Rozpocznij/zatrzymaj nagrywanie komend raw MIDI. +CTRL-F7 : Zmniejsz frameskip. +CTRL-F8 : ZwiŠksz frameskip. +CTRL-F9 : WyˆĽcz DOSBoxa. +CTRL-F10 : Przechwy†/Zwolnij myszkŠ. +CTRL-F11 : Spowolnij emulacjŠ (Obniž liczbŠ cykli DOSBoxa). +CTRL-F12 : Przy˜piesz emulacjŠ (ZwiŠksz liczbŠ cykli DOSBoxa). +ALT-F12 : Uwolnij prŠdko˜† (przycisk "turbo"). +. +:PROGRAM_BOOT_NOT_EXIST +Plik z dyskiem bootujĽcym nie istnieje. Koäczenie pracy. +. +:PROGRAM_BOOT_NOT_OPEN +Nie možna otworzy† pliku z dyskiem bootujĽcym. Koäczenie pracy. +. +:PROGRAM_BOOT_WRITE_PROTECTED +Plik obrazu jest tylko do odczytu! Može to spowodowa† problemy. +. +:PROGRAM_BOOT_PRINT_ERROR +Ta komenda bootuje DOSBoxa z dyskietki lub obrazu dysku twardego. + +Do tej komendy možna wˆĽczy† wyb˘r kolejno˜ci dysk˘w +kombinacjĽ klawiszy Ctrl-F4, wtedy opcja -l okre˜la zamontowany dysk do zbootowania. +Je˜li nie podano litery dysku, domy˜lnie bootowany jest dysk A. +Jedynymi literami bootowalnych dysk˘w sĽ litery A, C i D. Aby zbootowa† z dysku +twardego (C lub D), obraz powinien by† zamontowany komendĽ +IMGMOUNT command. + +Skˆadnia tej komendy jest nastŠpujĽca: + +BOOT [obrazdysku1.img obrazdysku1.img] [-l literadysku] +. +:PROGRAM_BOOT_UNABLE +Nie udaˆo siŠ zbootowa† z dysku %c. +:PROGRAM_BOOT_IMAGE_OPEN +Otwieranie pliku obrazu: %s +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Nie možna otworzy† %s. +:PROGRAM_BOOT_BOOT +Bootowanie z dysku %c... +. +:PROGRAM_BOOT_CART_WO_PCJR +Znaleziono kartridž PCjr, ale maszyna nie jest typu PCjr. +:PROGRAM_BOOT_CART_LIST_CMDS +DostŠpne komendy kartridžy PCjr:%s. +:PROGRAM_BOOT_CART_NO_CMDS +Nie znaleziono komend kartidžy PCjr. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Musisz poda† literŠ dysku, na kt˘rym zamontowany bŠdzie obraz. +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Musisz poda† numer dysku (0 - 3), gdzie zamontowany bŠdzie obraz (0,1=fda,fdb;2,3=hda,hdb). +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Dla obraz˘w CD-ROM: IMGMOUNT litera-dysku lokalizacja-obrazu -t iso + +Dla obraz˘w dysk˘w twardych : Musisz zdefiniowa† geometriŠ dysku: +bajt˘w_na_sektor, sektor˘w_na_cylinder, gˆowic_na_cylinder, liczba cylindr˘w. +IMGMOUNT litera-dysku lokalizacja-obrazu -size bns,snc,gnc,cyl +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Nie udaˆo siŠ wczyta† pliku obrazu. +SprawdŤ czy ˜ciežka jest poprawna, a obraz dostŠpny. +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Nie udaˆo siŠ odczyta† geometrii dysku z obrazu. +Užyj parametru -size bns,snc,gnc,cyl aby zdefiniowa† geometriŠ. +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Typ "%s" nie jest obsˆugiwany. Užyj "hdd", "floppy" lub "iso". +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" nie jest obsˆugiwany. Užyj "fat", "iso" lub "none". +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Musisz zdefiniowa† plik obrazu do zamontowania. +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Nie znaleziono pliku obrazu. +. +:PROGRAM_IMGMOUNT_MOUNT +Do montowania katalog˘w sˆužy komenda MOUNT command, a nie IMGMOUNT. +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Na tej literze jest juž zamontowany dysk. +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Nie da siŠ utworzy† dysku z tego pliku. +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Numer dysku %d jst zamontowany jako %s +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Obraz musi by† na dysku gˆ˘wnym lub lokalnym. +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Užywanie wielu plik˘w jest obsˆugiwane tylko dla obraz˘w cue/iso. +. +:PROGRAM_KEYB_INFO +Strona kodowa %i zostaˆa zaˆadowana +. +:PROGRAM_KEYB_INFO_LAYOUT +Strona kodowa %i zostaˆa zaˆadowana dla layoutu %s +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID layoutu klawiatury[ numer strony kodowej[ plik strony kodowej]]] + +Kilka przykˆad˘w: + KEYB: Wy˜wietla aktualnie wczytanĽ stronŠ kodowĽ. + KEYB sp: Wczytuje hiszpaäski (SP) layout, užywa odpowiedniej strony kodowej. + KEYB sp 850: Wczytuje hiszpaäski (SP) layout, užywa strony kodowej 850. + KEYB sp 850 mycp.cpi: Tak jak wyžej, ale užywa pliku mycp.cpi. +. +:PROGRAM_KEYB_NOERROR +Layout klawiatury %s zostaˆ wczytany dla strony kodowej %i. +. +:PROGRAM_KEYB_FILENOTFOUND +Nie znaleziono pliku klawiatury %s + +. +:PROGRAM_KEYB_INVALIDFILE +Plik klawiatury %s jest nieprawidˆowy +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Brak layoutu w %s dla strony kodowej %i +. +:PROGRAM_KEYB_INVCPFILE +Brak lub nieprawidˆowy plik strony kodowej dla layoutu %s + +. +:SHELL_ILLEGAL_PATH +Nieprawidˆowa ˜ciežka +. +:SHELL_CMD_HELP +Je˜li chcesz zobaczy† listŠ wszystkich obsˆugiwanych komend, wpisz help /all . +Kr˘tka lista najczŠ˜ciej užywanych komend: +. +:SHELL_CMD_ECHO_ON +ECHO jest wˆĽczone. +. +:SHELL_CMD_ECHO_OFF +ECHO jest wyˆĽczone. +. +:SHELL_ILLEGAL_SWITCH +Nieprawidˆowy przeˆĽcznik: %s. +. +:SHELL_MISSING_PARAMETER +Brak wymaganego parametru. +. +:SHELL_CMD_CHDIR_ERROR +Nie možna przej˜† do: %s. +. +:SHELL_CMD_CHDIR_HINT +Aby przej˜† do innego dysku wpisz %c: +. +:SHELL_CMD_CHDIR_HINT_2 +Nazwa katalogu jest dˆužsza niž 8 znak˘w i/lub zawiera spacje. +Spr˘buj cd %s +. +:SHELL_CMD_CHDIR_HINT_3 +CiĽgle jeste˜ na dysku Z:, Wpisz C: aby przej˜† na zamontowany dysk. +. +:SHELL_CMD_MKDIR_ERROR +Nie možna utworzy†: %s. +. +:SHELL_CMD_RMDIR_ERROR +Nie možna usunĽ†: %s. +. +:SHELL_CMD_DEL_ERROR +Nie možna usunĽ†: %s. +. +:SHELL_SYNTAXERROR +Skˆadnia komendy jest nieprawidˆowa. +. +:SHELL_CMD_SET_NOT_SET +Zmienna ˜rodowiskowa %s jest jest zdefiniowana. +. +:SHELL_CMD_SET_OUT_OF_SPACE +NiewystarczajĽca ilo˜† miejsca w ˜rodowisku. +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Brakuje nazwy pliku. +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Brakuje numeru. +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Nieprawidˆowy numer. +. +:SHELL_CMD_GOTO_MISSING_LABEL +Brakuje etykiety dla komendy GOTO. +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Nie odnaleziono etykiety %s. +. +:SHELL_CMD_FILE_NOT_FOUND +Nie odnaleziono pliku %s. +. +:SHELL_CMD_FILE_EXISTS +Plik %s juž istnieje. +. +:SHELL_CMD_DIR_INTRO +Katalog %s. +. +:SHELL_CMD_DIR_BYTES_USED +%5d plik(˘w) %17s bajt˘w. +. +:SHELL_CMD_DIR_BYTES_FREE +%5d katalog(˘w) %17s bajt˘w wolnych. +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Dysk %c nie istnieje! +Musisz go najpierw zamontowa† . Wpisz intro lub intro mount aby uzyska† wiŠcej informacji. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Nieprawidˆowa komenda: %s. +. +:SHELL_CMD_PAUSE +Naci˜nij dowolny klawisz, aby kontynuowa†. +. +:SHELL_CMD_PAUSE_HELP +Czeka na 1 uderzenie w klawisz aby kontynuowa†. +. +:SHELL_CMD_COPY_FAILURE +Nie udaˆo siŠ skopiowa†: %s. +. +:SHELL_CMD_COPY_SUCCESS + %d skopiowanych plik(˘w). +. +:SHELL_CMD_SUBST_NO_REMOVE +Usuwanie dysku nie jest obsˆugiwane. Nic nie zrobiono. +. +:SHELL_CMD_SUBST_FAILURE +Wykonanie polecenia SUBST nie powiodˆo siŠ. Može to by† spowodowane bˆŠdem w linii komend lub tym, že docelowy dysk jest užywany. +Polecenia SUBST možna užy† jedynie na lokalnych dyskach. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Witaj w DOSBox v%-8s ş +ş ş +ş Kr˘tki wstŠp dla nowych užytkownik˘w wpisz: INTRO ş +ş Wspierane komendy shella wpisz: HELP ş +ş ş +ş Je˜li chcesz zwiŠkszy† prŠdko˜†, spr˘buj ctrl-F8 oraz ctrl-F12. ş +ş Aby aktywowa† keymappera, wci˜nij ctrl-F1. ş +ş WiŠcej informacji w pliku README w katalogu DOSBoxa. ş +ş ş +. +:SHELL_STARTUP_CGA +ş DOSBox wspiera tryb Composite CGA. ş +ş Užyj (alt-)F11 aby zmieni† kolory w tyb trybie. ş +ş ş +. +:SHELL_STARTUP_DEBUG +ş Wci˜nij alt-Pause aby wˆĽczy† debuggera albo wˆĽcz plik exe komendĽ DEBUG. ş +ş ş +. +:SHELL_STARTUP_END +ş MIEJ ZABAWY! ş +ş Zesp˘ˆ DOSBoxa http://www.dosbox.com ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź +. +:SHELL_CMD_CHDIR_HELP +Wy˜wietla/zmienia aktualny katalog. +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [dysk:][˜ciežka] +CHDIR [..] +CD [dysk:][˜ciežka] +CD [..] + + .. oznacza, že chcesz przej˜† do katalogu powyžej. + +Wpisz CD dysk: aby wy˜wietli† aktualnĽ ˜ciežkŠ na okre˜lonym dysku. +Wpisz CD bez parametr˘w aby wy˜wietli† aktualny dysk i katalog. +. +:SHELL_CMD_CLS_HELP +Czy˜ci ekran. +. +:SHELL_CMD_DIR_HELP +PodglĽd ˜ciežki. +. +:SHELL_CMD_ECHO_HELP +Wy˜wietla wiadomo˜ci i wˆĽcza/wyˆĽcza wypisywanie wykonywanych komend. +. +:SHELL_CMD_EXIT_HELP +WyˆĽcza konsolŠ. +. +:SHELL_CMD_HELP_HELP +WˆĽcza pomoc. +. +:SHELL_CMD_MKDIR_HELP +Tworzy katalog. +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [dysk:][˜ciežka] +MD [dysk:][˜ciežka] +. +:SHELL_CMD_RMDIR_HELP +Usuwa katalog. +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [dysk:][˜ciežka] +RD [dysk:][˜ciežka] +. +:SHELL_CMD_SET_HELP +Zmienia warto˜ci zmiennych ˜rodowiskowych. +. +:SHELL_CMD_IF_HELP +W skrypcie powoduje warunkowe przetwarzanie. +. +:SHELL_CMD_GOTO_HELP +W skrypcie przeskakuje do linii o danej etykiecie. +. +:SHELL_CMD_SHIFT_HELP +Užyty w skrypcie zamienia miejscami 2 kolejne parametry linii komend. +. +:SHELL_CMD_TYPE_HELP +Wy˜wieta zawarto˜† pliku tekstowego. +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [dysk:][˜ciežka][nazwapliku] +. +:SHELL_CMD_REM_HELP +Dodaje komentarz w skrypcie. +. +:SHELL_CMD_REM_HELP_LONG +REM [komentarz] +. +:SHELL_CMD_NO_WILD +To prosta wersja komendy, symbole wieloznaczne nie sĽ dozwolone! +. +:SHELL_CMD_RENAME_HELP +Zmienia nazwŠ jednego lub wielu plik˘w. +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [dysk:][˜ciežka]nazwapliku1 nazwapliku2. +REN [dysk:][˜ciežka]nazwapliku1 nazwapliku2. + +PamiŠtaj, že nie možesz okre˜li† nowego dysku i ˜ciežki dla pliku docelowego. +. +:SHELL_CMD_DELETE_HELP +Usuwa jeden lub wiele plik˘w. +. +:SHELL_CMD_COPY_HELP +Kopiuje pliki. +. +:SHELL_CMD_CALL_HELP +Uruchamia skrypt z innego skryptu. +. +:SHELL_CMD_SUBST_HELP +PrzyporzĽdkowuje wewnŠtrzny katalog do dysku. +. +:SHELL_CMD_LOADHIGH_HELP +Wczytuje program do pamiŠci g˘rnej (wymaga xms=true,umb=true). +. +:SHELL_CMD_CHOICE_HELP +Czeka na wci˜niŠcie klawisza i ustawia ERRORLEVEL. +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:možliwo˜ci] [/N] [/S] tekst + /C[:]možliwo˜cie - Okre˜la dostŠpne klawisze. Domy˜lnie: yn. + /N - Nie wy˜wietlaj možliwo˜ci na koniec zgˆoszenia. + /S - WˆĽcza rozr˘žnianie wielko˜ci liter možliwo˜ci. + tekst - Tekst wy˜wietlany w zgˆoszeniu. +. +:SHELL_CMD_ATTRIB_HELP +Nie powoduje žadnego efektu. Dostarczone dla zachowania kompatybilno˜ci. +. +:SHELL_CMD_PATH_HELP +Dostarczono dla zachowania kompatybilno˜ci. +. +:SHELL_CMD_VER_HELP +Zobacz i ustaw zgˆoszonĽ wersjŠ DOSa. +. +:SHELL_CMD_VER_VER +Wersja DOSBoxa %s. Zgˆoszona wersja DOSa %d.%02d. +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pl/version.txt dosbox-staging-0.77.0/contrib/old-translations/pl/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/pl/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pl/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Polish 0.73 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pt-br/dosbox-0.74B.conf dosbox-staging-0.77.0/contrib/old-translations/pt-br/dosbox-0.74B.conf --- dosbox-staging-0.76.0/contrib/old-translations/pt-br/dosbox-0.74B.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pt-br/dosbox-0.74B.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,242 @@ +# Esse é o arquivo de configuraçőes do DOSBox 0.74. (Por favor use a última versăo do DOSBox) +# Linhas começando com # săo linhas de comentário. +# Săo usadas para informar (rapidamente) o efeito que cada opçăo causará. + +[sdl] +# fullscreen: Iniciar o dosbox em tela-cheia. (Aperte ALT-Enter para retornar) +# fulldouble: Usar buffer duplo quando em tela-cheia. Poderá reduzir tremulaçőes na tela, mas também poderá causar uma reduçăo na velocidade. +# fullresolution: Que resoluçăo usar no modo tela-cheia: original ou tamanho fixo (ex. 1024x768). +# Usar a resoluçăo nativa do seu monitor com aspect=true deverá dar os melhores resultados. +# Se a imagem exibida for pequena em uma tela grande, tente uma saída de vídeo diferente de surface. +# windowresolution: Ajustar a janela para este tamanho SE o dispositivo de saída suportar escalagem. +# (output=surface năo suporta!) +# output: Qual sistema utilizar para saída de vídeo. +# Valores possíveis: surface, overlay, opengl, openglnb, ddraw. +# autolock: Capturar o mouse automaticamente, quando clicar na tela do dosbox. (Aperte CTRL-F10 para liberar) +# sensitivity: Sensibilidade do mouse. +# waitonerror: Se ocorrer algum erro com o dosbox, aguardar o fechamento do console. +# priority: Níveis de prioridade para o dosbox. A segunda opçăo, depois da vírgula, é usada quando o dosbox está em segundo plano. +# (O pause só é válido para a segunda opçăo) +# Valores possíveis: lowest, lower, normal, higher, highest, pause. +# mapperfile: Arquivo utilizado para carregar/salvar o mapeamento das teclas/eventos. Resetmapper apenas funciona com os valores padrăo. +# usescancodes: Evite o uso de symkeys. Pode năo funcionar em certos sistemas operacionais. + +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper-0.74.map +usescancodes=true + +[dosbox] +# language: Selecionar outro arquivo de idioma. +# machine: Tipo de máquina a emular. +# Valores possíveis: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe. +# captures: Diretório para salvar a captura de tela, sons, música. +# memsize: Quantidade de memória para o dosbox utilizar, em megabytes. +# O melhor valor é o padrăo. Ele evitará problemas com alguns jogos. +# Contudo outros jogos talvez precisem de um valor maior. +# Geralmente năo há melhora na velocidade aumentando-se esse valor. + +language=portuguese.lang +machine=svga_s3 +captures=capture +memsize=16 + +[render] +# frameskip: Quantos frames o dosbox irá ignorar antes de desenhar outro. +# aspect: Fazer correçăo do formato. Se a saída năo suportar escalagem, o desempenho do dosbox poderá ser reduzido! +# scaler: Escala utilizada para ampliar/melhorar modos de baixa resoluçăo. +# Se 'forced' for adicionado, a escala será usada mesmo se o resultado năo for o desejado. +# Valores possíveis: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x. + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core: Núcleo do processador usado na emulaçăo. auto alterna para dynamic quando disponível e apropriado. +# Valores possíveis: auto, dynamic, normal, simple. +# cputype: Tipo de emulaçăo do processador. auto é a opçăo de melhor velocidade. +# Valores possíveis: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch. +# cycles: Quantidade de instruçőes que o dosbox emulará por milisegundo. +# Colocar um valor muito alto pode ocasionar perda de áudio e reduçăo da velocidade. +# Os ciclos podem ser ajustados de 3 maneiras: +# 'auto' tenta descobrir o melhor valor. +# Geralmente funciona, mas poderá falhar para alguns jogos. +# 'fixed #número' ajusta uma quantidade fixa de ciclos. Isso poderá ser usado caso 'auto' falhe. +# (Exemplo: fixed 4000) +# 'max' aloca a maior quantidade de ciclos que seu computador pode suportar. +# Valores possíveis: auto, fixed, max. +# cycleup: Quantidade de ciclos para aumentar/diminuir ao apertar as teclas correspondentes. (CTRL-F11/CTRL-F12) +# cycledown: Valores menores que 100 correspondem ŕ porcentagens. + +core=auto +cputype=auto +cycles=auto +cycleup=10 +cycledown=20 + +[mixer] +# nosound: Ativar modo silencioso. Ainda assim, o som continuará sendo emulado. +# rate: Taxa de amostragem do mixer. Ajustar qualquer valor maior que este no dispositivo provavelmente diminua a qualidade do áudio. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# blocksize: Tamanho do bloco do mixer. Blocos maiores podem evitar sons picotados mas o som poderá sair com atraso. +# Valores possíveis: 1024, 2048, 4096, 8192, 512, 256. +# prebuffer: Quantos milisegundos de dados manter antes do buffer. + +nosound=false +rate=44100 +blocksize=1024 +prebuffer=20 + +[midi] +# mpu401: Tipo de MPU-401 a emular. +# Valores possíveis: intelligent, uart, none. +# mididevice: Dispositivo que receberá as informaçőes MIDI a partir do MPU-401. +# Valores possíveis: default, win32, alsa, oss, coreaudio, coremidi, none. +# midiconfig: Opçőes especiais de configuraçăo para o dispositivo. Esse é geralmente o id. do dispositivo que vocę deseja usar. +# Veja o arquivo README/Manual para mais detalhes. + +mpu401=intelligent +mididevice=default +midiconfig= + +[sblaster] +# sbtype: Tipo de SoundBlaster a emular. gb é Gameblaster +# Valores possíveis: sb1, sb2, sbpro1, sbpro2, sb16, gb, none. +# sbbase: Valor do 'IO address' do SoundBlaster. +# Valores possíveis: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300. +# irq: Valor do IRQ do SoundBlaster. +# Valores possíveis: 7, 5, 3, 9, 10, 11, 12. +# dma: Valor do DMA do SoundBlaster. +# Valores possíveis: 1, 5, 0, 3, 6, 7. +# hdma: Valor 'High DMA' do SoundBlaster. +# Valores possíveis: 1, 5, 0, 3, 6, 7. +# sbmixer: Permitir que o mixer do SoundBlaster modifique o mixer do dosbox. +# oplmode: Tipo de emulaçăo OPL. Em 'auto', o modo é determinado pelo tipo do SoundBlaster. Todos os modos OPL săo compatíveis com Adlib, exceto o 'cms'. +# Valores possíveis: auto, cms, opl2, dualopl2, opl3, none. +# oplemu: Provedor da emulaçăo do OPL. compat deve oferecer melhor qualidade (veja também oplrate). +# Valores possíveis: default, compat, fast. +# oplrate: Taxa de amostragem da emulaçăo da música OPL. Use 49716 para a mais alta qualidade (ajuste a taxa de amostragem do mixer correspondente). +# Valores possíveis: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000. + +sbtype=sb16 +sbbase=220 +irq=7 +dma=1 +hdma=5 +sbmixer=true +oplmode=auto +oplemu=default +oplrate=44100 + +[gus] +# gus: Ativar a emulaçăo do Gravis Ultrasound. +# gusrate: Taxa de amostragem da emulaçăo do GUS. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# gusbase: Valor do 'IO address' do Gravis Ultrasound. +# Valores possíveis: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300. +# gusirq: Valor do IRQ do Gravis Ultrasound. +# Valores possíveis: 5, 3, 7, 9, 10, 11, 12. +# gusdma: Valor do 'DMA channel' do Gravis Ultrasound. +# Valores possíveis: 3, 0, 1, 5, 6, 7. +# ultradir: Caminho para o diretório do Ultrasound. Neste diretório +# deverá haver uma pasta de MIDI que contém +# o banco de sons para a reproduçăo do GUS. Também podem ser +# usados os mesmos que funcionam com Timidity. + +gus=false +gusrate=44100 +gusbase=240 +gusirq=5 +gusdma=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker: Ativar a emulaçăo do PC-Speaker. +# pcrate: Taxa de amostragem do som do PC-Speaker. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# tandy: Ativar emulaçăo do Tandy Sound System. Em 'auto' a emulaçăo do Tandysound só será feita se a máquina estiver como 'Tandy'. +# Valores possíveis: auto, on, off. +# tandyrate: Taxa de amostragem do Tandy 3-Voice generation. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# disney: Ativar a emulaçăo do Disney Sound Source. (Covox Voice Master e Speech Thing compatíveis). + +pcspeaker=true +pcrate=44100 +tandy=auto +tandyrate=44100 +disney=true + +[joystick] +# joysticktype: Tipo do joystick a emular: auto (padrăo), none, +# 2axis (suporta 2 joysticks), +# 4axis (suporta 1 joystick, o primeiro será utilizado), +# 4axis_2 (suporta 1 joystick, o segundo será utilizado), +# fcs (Thrustmaster), ch (CH Flightstick). +# none desativa a emulaçăo do joystick. +# auto determina a emulaçăo de acordo com o joystick(s) utilizado(s). +# (Lembre-se de resetar o arquivo de mapeamento caso vocę tenha salvo ele antes) +# Valores possíveis: auto, 2axis, 4axis, 4axis_2, fcs, ch, none. +# timed: Ativa intervalos temporizados para os eixos. Experimente essa opçăo se o jogo fizer movimentos quando o joystick estiver parado. +# autofire: Atira continuamente enquanto o botăo estiver pressionado. +# swap34: Inverter o 3ş e o 4ş eixo. Pode ser útil para alguns joysticks. +# buttonwrap: Ativar agrupamento dos botőes quando um certo número for emulado. + +joysticktype=auto +timed=true +autofire=false +swap34=false +buttonwrap=false + +[serial] +# serial1: Configure o tipo de dispositivo conectado a porta serial. +# Pode ser disabled, dummy, modem, nullmodem, directserial. +# Parâmetros adicionais devem estar na mesma linha da seguinte forma +# parâmetro:valor. O parâmetro comum é irq. +# para directserial: realport (obrigatório), rxdelay (opcional). +# (realport:COM1 realport:ttyS0). +# para modem: listenport (opcional). +# para nullmodem: server, rxdelay, txdelay, telnet, usedtr, +# transparent, port, inhsocket (todos opcionais). +# Exemplo: serial1=modem listenport:5000 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. +# serial2: Veja serial1 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. +# serial3: Veja serial1 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. +# serial4: Veja serial1 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. + +serial1=dummy +serial2=dummy +serial3=disabled +serial4=disabled + +[dos] +# xms: Habilitar suporte a XMS. +# ems: Habilitar suporte a EMS. +# umb: Habilitar suporte a UMB. +# keyboardlayout: Código do idioma para layout do teclado (ou nenhum). + +xms=true +ems=true +umb=true +keyboardlayout=br + +[ipx] +# ipx: Ativar emulaçăo IPX sobre UDP/IP. + +ipx=false + +[autoexec] +# As linhas nesta seçăo serăo sempre executadas ao se iniciar o dosbox. +# Vocę pode adicionar comandos de montagem aqui. + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pt-br/dosbox-0.74.conf dosbox-staging-0.77.0/contrib/old-translations/pt-br/dosbox-0.74.conf --- dosbox-staging-0.76.0/contrib/old-translations/pt-br/dosbox-0.74.conf 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pt-br/dosbox-0.74.conf 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,245 @@ +# Esse é o arquivo de configuraçőes do DOSBox 0.74. (Por favor use a última versăo do DOSBox) +# Linhas começando com # săo linhas de comentário. +# Săo usadas para informar (rapidamente) o efeito que cada opçăo causará. + +[sdl] +# fullscreen: Iniciar o dosbox em tela-cheia. (Aperte ALT-Enter para retornar) +# fulldouble: Usar buffer duplo quando em tela-cheia. Poderá reduzir tremulaçőes na tela, mas também poderá causar uma reduçăo na velocidade. +# fullresolution: Que resoluçăo usar no modo tela-cheia: original ou tamanho fixo (ex. 1024x768). +# Usar a resoluçăo nativa do seu monitor com aspect=true deverá dar os melhores resultados. +# Se a imagem exibida for pequena em uma tela grande, tente uma saída de vídeo diferente de surface. +# windowresolution: Ajustar a janela para este tamanho SE o dispositivo de saída suportar escalagem. +# (output=surface năo suporta!) +# output: Qual sistema utilizar para saída de vídeo. +# Valores possíveis: surface, overlay, opengl, openglnb, ddraw. +# autolock: Capturar o mouse automaticamente, quando clicar na tela do dosbox. (Aperte CTRL-F10 para liberar) +# sensitivity: Sensibilidade do mouse. +# waitonerror: Se ocorrer algum erro com o dosbox, aguardar o fechamento do console. +# priority: Níveis de prioridade para o dosbox. A segunda opçăo, depois da vírgula, é usada quando o dosbox está em segundo plano. +# (O pause só é válido para a segunda opçăo) +# Valores possíveis: lowest, lower, normal, higher, highest, pause. +# mapperfile: Arquivo utilizado para carregar/salvar o mapeamento das teclas/eventos. Resetmapper apenas funciona com os valores padrăo. +# usescancodes: Evite o uso de symkeys. Pode năo funcionar em certos sistemas operacionais. + +fullscreen=false +fulldouble=false +fullresolution=original +windowresolution=original +output=surface +autolock=true +sensitivity=100 +waitonerror=true +priority=higher,normal +mapperfile=mapper-0.74.map +usescancodes=true + +[dosbox] +# language: Selecionar outro arquivo de idioma. +# machine: Tipo de máquina a emular. +# Valores possíveis: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe. +# captures: Diretório para salvar a captura de tela, sons, música. +# memsize: Quantidade de memória para o dosbox utilizar, em megabytes. +# O melhor valor é o padrăo. Ele evitará problemas com alguns jogos. +# Contudo outros jogos talvez precisem de um valor maior. +# Geralmente năo há melhora na velocidade aumentando-se esse valor. + +language=portuguese.lang +machine=svga_s3 +captures=capture +memsize=16 + +[render] +# frameskip: Quantos frames o dosbox irá ignorar antes de desenhar outro. +# aspect: Fazer correçăo do formato. Se a saída năo suportar escalagem, o desempenho do dosbox poderá ser reduzido! +# scaler: Escala utilizada para ampliar/melhorar modos de baixa resoluçăo. +# Se 'forced' for adicionado, a escala será usada mesmo se o resultado năo for o desejado. +# Valores possíveis: none, normal2x, normal3x, advmame2x, advmame3x, advinterp2x, advinterp3x, hq2x, hq3x, 2xsai, super2xsai, supereagle, tv2x, tv3x, rgb2x, rgb3x, scan2x, scan3x. + +frameskip=0 +aspect=false +scaler=normal2x + +[cpu] +# core: Núcleo do processador usado na emulaçăo. auto alterna para dynamic quando disponível e apropriado. +# Valores possíveis: auto, dynamic, normal, simple. +# cputype: Tipo de emulaçăo do processador. auto é a opçăo de melhor velocidade. +# Valores possíveis: auto, 386, 386_slow, 486_slow, pentium_slow, 386_prefetch. +# cycles: Quantidade de instruçőes que o dosbox emulará por milisegundo. +# Colocar um valor muito alto pode ocasionar perda de áudio e reduçăo da velocidade. +# Os ciclos podem ser ajustados de 3 maneiras: +# 'auto' tenta descobrir o melhor valor. +# Geralmente funciona, mas poderá falhar para alguns jogos. +# 'fixed #número' ajusta uma quantidade fixa de ciclos. Isso poderá ser usado caso 'auto' falhe. +# (Exemplo: fixed 4000) +# 'max' aloca a maior quantidade de ciclos que seu computador pode suportar. +# Valores possíveis: auto, fixed, max. +# cycleup: Quantidade de ciclos para aumentar/diminuir ao apertar as teclas correspondentes. (CTRL-F11/CTRL-F12) +# cycledown: Valores menores que 100 correspondem ŕ porcentagens. + +core=auto +cputype=auto +cycles=auto +cycleup=10 +cycledown=20 + +[mixer] +# nosound: Ativar modo silencioso. Ainda assim, o som continuará sendo emulado. +# rate: Taxa de amostragem do mixer. Ajustar qualquer valor maior que este no dispositivo provavelmente diminua a qualidade do áudio. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# blocksize: Tamanho do bloco do mixer. Blocos maiores podem evitar sons picotados mas o som poderá sair com atraso. +# Valores possíveis: 1024, 2048, 4096, 8192, 512, 256. +# prebuffer: Quantos milisegundos de dados manter antes do buffer. + +nosound=false +rate=44100 +blocksize=1024 +prebuffer=20 + +[midi] +# mpu401: Tipo de MPU-401 a emular. +# Valores possíveis: intelligent, uart, none. +# mididevice: Dispositivo que receberá as informaçőes MIDI a partir do MPU-401. +# Valores possíveis: default, win32, alsa, oss, coreaudio, coremidi, none. +# midiconfig: Opçőes especiais de configuraçăo para o dispositivo. Esse é geralmente o id. do dispositivo que vocę deseja usar. +# Veja o arquivo README/Manual para mais detalhes. + +mpu401=intelligent +mididevice=default +midiconfig= + +[sblaster] +# sbtype: Tipo de SoundBlaster a emular. gb é Gameblaster +# Valores possíveis: sb1, sb2, sbpro1, sbpro2, sb16, gb, none. +# sbbase: Valor do 'IO address' do SoundBlaster. +# Valores possíveis: 220, 240, 260, 280, 2a0, 2c0, 2e0, 300. +# irq: Valor do IRQ do SoundBlaster. +# Valores possíveis: 7, 5, 3, 9, 10, 11, 12. +# dma: Valor do DMA do SoundBlaster. +# Valores possíveis: 1, 5, 0, 3, 6, 7. +# hdma: Valor 'High DMA' do SoundBlaster. +# Valores possíveis: 1, 5, 0, 3, 6, 7. +# sbmixer: Permitir que o mixer do SoundBlaster modifique o mixer do dosbox. +# oplmode: Tipo de emulaçăo OPL. Em 'auto', o modo é determinado pelo tipo do SoundBlaster. Todos os modos OPL săo compatíveis com Adlib, exceto o 'cms'. +# Valores possíveis: auto, cms, opl2, dualopl2, opl3, none. +# oplemu: Provedor da emulaçăo do OPL. compat deve oferecer melhor qualidade (veja também oplrate). +# Valores possíveis: default, compat, fast. +# oplrate: Taxa de amostragem da emulaçăo da música OPL. Use 49716 para a mais alta qualidade (ajuste a taxa de amostragem do mixer correspondente). +# Valores possíveis: 44100, 49716, 48000, 32000, 22050, 16000, 11025, 8000. + +sbtype=sb16 +sbbase=220 +irq=7 +dma=1 +hdma=5 +sbmixer=true +oplmode=auto +oplemu=default +oplrate=44100 + +[gus] +# gus: Ativar a emulaçăo do Gravis Ultrasound. +# gusrate: Taxa de amostragem da emulaçăo do GUS. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# gusbase: Valor do 'IO address' do Gravis Ultrasound. +# Valores possíveis: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300. +# gusirq: Valor do IRQ do Gravis Ultrasound. +# Valores possíveis: 5, 3, 7, 9, 10, 11, 12. +# gusdma: Valor do 'DMA channel' do Gravis Ultrasound. +# Valores possíveis: 3, 0, 1, 5, 6, 7. +# ultradir: Caminho para o diretório do Ultrasound. Neste diretório +# deverá haver uma pasta de MIDI que contém +# o banco de sons para a reproduçăo do GUS. Também podem ser +# usados os mesmos que funcionam com Timidity. + +gus=false +gusrate=44100 +gusbase=240 +gusirq=5 +gusdma=3 +ultradir=C:\ULTRASND + +[speaker] +# pcspeaker: Ativar a emulaçăo do PC-Speaker. +# pcrate: Taxa de amostragem do som do PC-Speaker. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# tandy: Ativar emulaçăo do Tandy Sound System. Em 'auto' a emulaçăo do Tandysound só será feita se a máquina estiver como 'Tandy'. +# Valores possíveis: auto, on, off. +# tandyrate: Taxa de amostragem do Tandy 3-Voice generation. +# Valores possíveis: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716. +# disney: Ativar a emulaçăo do Disney Sound Source. (Covox Voice Master e Speech Thing compatíveis). + +pcspeaker=true +pcrate=44100 +tandy=auto +tandyrate=44100 +disney=true + +[joystick] +# joysticktype: Tipo do joystick a emular: auto (padrăo), none, +# 2axis (suporta 2 joysticks), +# 4axis (suporta 1 joystick, o primeiro será utilizado), +# 4axis_2 (suporta 1 joystick, o segundo será utilizado), +# fcs (Thrustmaster), ch (CH Flightstick). +# none desativa a emulaçăo do joystick. +# auto determina a emulaçăo de acordo com o joystick(s) utilizado(s). +# (Lembre-se de resetar o arquivo de mapeamento caso vocę tenha salvo ele antes) +# Valores possíveis: auto, 2axis, 4axis, 4axis_2, fcs, ch, none. +# timed: Ativa intervalos temporizados para os eixos. Experimente essa opçăo se o jogo fizer movimentos quando o joystick estiver parado. +# autofire: Atira continuamente enquanto o botăo estiver pressionado. +# swap34: Inverter o 3ş e o 4ş eixo. Pode ser útil para alguns joysticks. +# buttonwrap: Ativar agrupamento dos botőes quando um certo número for emulado. + +joysticktype=auto +timed=true +autofire=false +swap34=false +buttonwrap=false + +[serial] +# serial1: Configure o tipo de dispositivo conectado a porta serial. +# Pode ser disabled, dummy, modem, nullmodem, directserial. +# Parâmetros adicionais devem estar na mesma linha da seguinte forma +# parâmetro:valor. O parâmetro comum é irq. +# para directserial: realport (obrigatório), rxdelay (opcional). +# (realport:COM1 realport:ttyS0). +# para modem: listenport (opcional). +# para nullmodem: server, rxdelay, txdelay, telnet, usedtr, +# transparent, port, inhsocket (todos opcionais). +# Exemplo: serial1=modem listenport:5000 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. +# serial2: Veja serial1 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. +# serial3: Veja serial1 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. +# serial4: Veja serial1 +# Valores possíveis: dummy, disabled, modem, nullmodem, directserial. + +serial1=dummy +serial2=dummy +serial3=disabled +serial4=disabled + +[dos] +# xms: Habilitar suporte a XMS. +# ems: Habilitar suporte a EMS. +# umb: Habilitar suporte a UMB. +# keyboardlayout: Código do idioma para layout do teclado (ou nenhum). + +xms=true +ems=true +umb=true +keyboardlayout=br + +[ipx] +# ipx: Ativar emulaçăo IPX sobre UDP/IP. + +ipx=false + +[autoexec] +# As linhas nesta seçăo serăo sempre executadas ao se iniciar o dosbox. +# Vocę pode adicionar comandos de montagem aqui. +mount c c:\ +mount d d:\ -t cdrom +c: +dir/p + diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/pt-br/DOSBOX EM PORTUGUES NOTAS.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/pt-br/DOSBOX EM PORTUGUES NOTAS.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/pt-br/DOSBOX EM PORTUGUES NOTAS.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/pt-br/DOSBOX EM PORTUGUES NOTAS.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,139 @@ + +=================================== +DOSBox 0.74 em PortuguĂŞs/Brasileiro +=================================== + +A VersĂŁo em portuguĂŞs para a galera brazuka!! + +0. CrĂŠditos da tradução +1. Notas do autor sobre tradução +2. Alteração do idioma +3. Futuras versĂľes +4. Agradecimentos +5. Dicas (Windows) (INICIANTES, LEIAM ISTO) +6. MĂŠtodo FĂĄcil (Recomendado) + +Qualquer dĂşvida na instalação da tradução contate-me (ableite@msn.com). + +======================== +0. CrĂŠditos da tradução: +======================== + +DOSBox v0.74 - Lex Leite + +Leia-Me do DOSBox - Lex Leite e Sael Aran, com uma ajuda de Mosca-Ninja e David Tuka + +RevisĂŁo - Lex Leite + + +Contatos: Lex Leite / ableite@msn.com + Sael Aran / lord.sael@hokkaido-fansubber.com + Mosca-Ninja / -- + David Tuka / david_tuka@hotmail.com + + +================================= +1. Notas do autor sobre tradução: +================================= + +a. A tradução do arquivo de idioma do DOSBox estĂĄ completa. + A tradução do arquivo Leia-me/Manual (read-me) do DOSBox estĂĄ sendo atualizada para a nova versĂŁo. + Por enquanto a versĂŁo antiga do Leia-me estĂĄ contida no ZIP pois ela ainda serve para essa nova versĂŁo. + A tradução do arquivo Leia-me da captura de vĂ­deo estĂĄ completa. + +b. A tradução foi feita com base no arquivo original em inglĂŞs e com o arquivo de + tradução em espanhol o que ajudou para deixar a tradução ainda melhor. + +c. NĂŁo pude testar certas telas do DOSBox. Telas como a inicial onde existe uma + grande caixa azul, podem estar malfeitas por conta da numeração que pode ter + ficado errada, porĂŠm creio que esteja tudo correto. + + +================================================== +2. Para alterar o idioma do DOSBox para PortuguĂŞs: +================================================== + + Atenção: A pasta onde se encontra o arquivo de configuração do DOSBox foi + alterada na versĂŁo 0.74 do DOSBox. Agora a pasta esta localizada em: + "C:\Documents and Settings\Usuario\Configuraçþes locais\Dados de aplicativos\DOSBox" + no windows XP. + No vista/7 "C:\Users\Usuario\AppData\Local\DOSBox". + Substitua "usuario" pelo seu nome do seu usuario no computador. + Sempre que eu me referir a pasta de configuração do DOSBox, vĂĄ atĂŠ a pasta citada acima. + + Para facilitar a instalação da tradução simplesmente copie os 2 arquivos + "portuguese.lang" e "dosbox-0.74.conf" para a pasta de configuração + do DOSBox. (MĂŠtodo fĂĄcil) + + Se essa pasta nĂŁo existir, abra o DOSBox e logo em seguida feche-o. Ela deverĂĄ + ter sido criada pelo prĂłprio programa agora. + + +=================== +3. Futuras versĂľes: +=================== + + Fizemos o melhor nessa tradução e esperamos que nĂŁo contenha erros. PorĂŠm ĂŠ possĂ­vel + termos deixado passar alguma letrinha ou acento. Se vocĂŞ detectar algum erro, poderĂĄ + contatar pelo e-mail (ableite@msn.com) para que possamos consertĂĄ-lo e numa + futura versĂŁo o DOSBox fique corretamente traduzido. + + +================== +4. Agradecimentos: +================== + + Obrigado a equipe do DOSBox por ter feito esse programa maravilhoso, onde eu posso + jogar jogos da ĂŠpoca em que eu era um garotinho no Windows XP/Vista, que nĂŁo da mais + suporte ao verdadeiro MS-DOS. + + Obrigado a Gustavo Queipo de LLano Álvarez, pois usei seus arquivos de tradução em + espanhol. Arquivos que me ajudaram a criar uma tradução ainda melhor para o portuguĂŞs. + + Obrigado a Sael Aran, Mosca-Ninja e David Tuka por ajudar na tradução do arquivo "Leia-Me" + + Obrigado aos meus colegas que me incentivaram! + + E um Obrigado reservado, para caso eu tenha esquecido de colocar aqui alguĂŠm que + me ajudou. + +============================= +5. Dicas (Windows XP/Vista/7) +============================= + + Para quem estĂĄ começando a usar o DOSBox agora e quiser começar a jogar antes de + aprender a usĂĄ-lo completamente faça o seguinte: + + Abra o arquivo de configuraçþes do DOSBox. + Na ultima linha desse arquivo estĂĄ seção de auto execução [autoexec] de comandos + que serĂŁo sempre executados quando o DOSBox for iniciado. + Logo abaixo da Ăşltima linha copie e cole o texto abaixo: + +----corte aqui---- + +mount c c:\ +mount d d:\ -t cdrom +c: +dir/p + +----corte aqui---- + + Obviamente o "c c:\" ĂŠ para o HD que estiver na unidade c: e o "d d:\" para onde + estiver a unidade de cd-rom. No windows geralmente essas letras sĂŁo padrĂŁo, logo, + basta copiar e colar. Se nĂŁo, altere as letras para as unidades corretas. + + +============================= +6. MĂŠtodo FĂĄcil (Recomendado) +============================= + + PODE NÃO FUNCIONAR EM ALGUNS COMPUTADORES!!! + Copie os arquivos "dosbox-0.74.conf" e "portuguese.lang" para a pasta de + configuração do DOSBox. + Abra o executĂĄvel. + + Se nĂŁo funcionar, delete o arquivo "dosbox-0.74.conf" arquivo e copie o + "dosbox-0.74B.conf" para a pasta de configuração do DOSBox. Agora renomeie + "dosbox-0.74B.conf" para "dosbox-0.74.conf". + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pt-br/LEIAME-0.73.txt dosbox-staging-0.77.0/contrib/old-translations/pt-br/LEIAME-0.73.txt --- dosbox-staging-0.76.0/contrib/old-translations/pt-br/LEIAME-0.73.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pt-br/LEIAME-0.73.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1309 @@ +DOSBox v0.73 + + +===== +NOTA: +===== + +Enquanto nĂłs estamos torcendo para que um dia o DOSBox rode todos os programas +jĂĄ feitos para PC, ainda nĂŁo estamos lĂĄ. Hoje o DOSBox, rodando +numa mĂĄquina potente, dificilmente serĂĄ equivalente a um PC 486. +O DOSBox pode ser configurado para rodar um leque variado de jogos DOS, +desde clĂĄssicos CGA/Tandy/PCjr atĂŠ jogos da era Quake. + + +Arquivo LEIA-ME traduzido por: Lex Leite / ableite@msn.com + Sael Aran / lord.sael@hokkaido-fansubber.com + + com ajuda de: Mosca-Ninja / - - + David Tuka / david_tuka@hotmail.com + + + +======= +ÍNDICE: +======= +1. InĂ­cio RĂĄpido +2. Perguntas & Respostas +3. Uso +4. Programas Internos +5. Teclas Especiais +6. Mapeador de Teclas +7. Layout do teclado +8. Função Multi-Jogador via Serial +9. Como rodar jogos que necessitam mais recursos +10. Solução de Problemas +11. O arquivo das configuraçþes +12. O arquivo do idioma +13. Fazendo sua prĂłpria versĂŁo do DOSBox +14. Agradecimentos especiais +15. Contato + + +================= +1. InĂ­cio RĂĄpido: +================= + +Digite INTRO no DOSBox para um tour rĂĄpido. +É essencial que vocĂŞ se familiarize com a ideia de montar +diretĂłrios. O DOSBox nĂŁo faz com que qualquer unidade +(ou parte dela) seja automaticamente acessĂ­vel para emulação. +Veja a parte de P&R "Eu tenho um diretĂłrio Z ao invĂŠs de +um C no prompt." assim como a explicação do comando MOUNT +(seção 4) + + + +======= +2. P&R: +======= + +Algumas perguntas feitas frequentemente: + +P: Aparece um diretĂłrio Z ao invĂŠs de um C no prompt. +P: Sempre deverei digitar esses comandos? NĂŁo existe uma forma automĂĄtica? +P: Como eu coloco tela cheia? +P: Meu CD-ROM nĂŁo funciona. +P: O jogo/aplicativo nĂŁo consegue achar seu CD-ROM. +P: O mouse nĂŁo funciona. +P: O aplicativo nĂŁo tem som. +P: O som sai cortado ou estranho/difuso. +P: Eu nĂŁo consigo digitar \ ou : no DOSBox. +P: Estou com atraso no teclado. +P: O cursor estĂĄ se movendo em apenas uma direção! +P: O jogo/aplicativo roda muito lento! +P: O jogo/aplicativo nĂŁo chega a rodar/trava! +P: O DOSBox pode danificar meu computador? +P: Eu queria trocar o tamanho da memĂłria/Velocidade da CPU/ems/soundblaster IRQ. +P: Quais hardwares de som o DOSBox emula atualmente? +P: DOSBox trava no inĂ­cio e eu estou rodando artes/cinemĂĄtica. +P: Estou tendo problemas para rodar um jogo feito com a Build Engine (Duke3D/Blood/Shadow Warrior). +P: Excelente LEIAME, mas eu ainda nĂŁo entendi. + + + + +P: Aparece um diretĂłrio Z ao invĂŠs de um C no prompt. +R: VocĂŞ deve fazer seus diretĂłrios ficarem disponĂ­veis no DOSBox usando + o comando "mount". Por exemplo, no Windows "mount C D:\JOGOS" vai criar + um drive C no DOSBox que leva ao seu diretĂłrio D:\JOGOS. + No Linux, "mount c /home/username" criarĂĄ um drive C no DOSBox + que leva para o /home/username no Linux. + Para mudar o drive montado, digite "C:". Se tudo ocorreu + bem, DOSBox irĂĄ mostrar no prompt "C:\>". + + +P: Sempre deverei digitar esses comandos? NĂŁo existe uma forma automĂĄtica? +R: No arquivo de configuraçþes do DOSBox, existe uma seção [autoexec]. Os comandos + ali escritos sĂŁo executados quando o DOSBox iniciar, entĂŁo vocĂŞ pode usar esta seção + para a montagem. + + +P: Como eu coloco tela cheia? +R: Pressione alt-enter. Alternativamente: Edite o arquivo de configuraçþes do DOSBox e + mude a opção fullscreen=false para fullscreen=true. Se na tela cheia lhe parece + errada: Altere a opção fullresolution no arquivo de configuraçþes do + DOSBox. Para sair do modo tela cheia: Pressione alt-enter novamente. + + +P: Meu CD-ROM nĂŁo funciona. +R: Para montar seu CD-ROM no DOSBox, vocĂŞ deve especificar algumas opçþes adicionais + ao montar o CD-ROM. + Para ativar o suporte ao CD-ROM (incluindo MSCDEX): + - mount d f:\ -t cdrom (windows) + - mount d /media/cdrom -t cdrom (linux) + + Em alguns casos vocĂŞ pode querer usar uma interface CD-ROM diferente, + por exemplo, caso o ĂĄudio do CD nĂŁo funcione: + Para ativar o suporte ao SDL (nĂŁo inclui acesso do CD em baixo nĂ­vel!): + - mount d f:\ -t cdrom -usecd 0 -noioctl + Para ativar o acesso do ioctl usando extração digital de ĂĄudio para CDs de ĂĄudio + (apenas no windows, Ăştil para o Vista): + - mount d f:\ -t cdrom -ioctl_dx + Para ativar o acesso do ioctl usando MCI para CDs de ĂĄudio (apenas no windows): + - mount d f:\ -t cdrom -ioctl_mci + Para forçar apenas o acesso pelo ioctl (apenas no windows): + - mount d f:\ -t cdrom -ioctl_dio + Para ativar o suporte aspi em baixo nĂ­vel (win98 com aspi-layer instalado): + - mount d f:\ -t cdrom -aspi + + Nos comandos: - d letra da unidade que aparecerĂĄ no DOSBox + - f:\ localização do CD-ROM no seu PC. + - 0 O nĂşmero da unidade de CD-ROM, reportado pelo comando "mount -cd" + (note que este valor sĂł ĂŠ necessĂĄrio quando o SDL ĂŠ utilizado + para CDs de ĂĄudio, de qualquer outra maneira ĂŠ ignorado) + Veja tambĂŠm a prĂłxima pergunta: O jogo/aplicativo nĂŁo consegue achar seu CD-ROM. + + +P: O jogo/aplicativo nĂŁo consegue achar seu CD-ROM. +R: Tenha certeza de montar o CD-ROM com o switch -t cdrom, isso ativarĂĄ a + interface MSCDEX requerida por jogos em DOS para se comunicar com os CD-ROMs. + Tente tambĂŠm adicionar o rĂłtulo correto (-label RÓTULO) no comando mount, + onde RÓTULO ĂŠ o rĂłtulo do CD (ID do volume). + No Windows, vocĂŞ pode especificar -ioctl, -aspi ou -noioctl. Olhe a + descrição do comando mount na Seção 4 para entender seus significados e + opçþes adicionais, relacionadas com CDs de ĂĄudio, -ioctl_dx, ioctl_mci, ioctl_dio. + + Tente criar uma imagem do CD-ROM (preferivelmente o par CUE/BIN) e usar a + ferramenta interna IMGMOUNT do DOSBox para montar a imagem (a lista CUE). + Isso ativa o suporte ao CD-ROM em baixo nĂ­vel para qualquer sistema operacional. + + +P: O mouse nĂŁo funciona. +R: Normalmente, o DOSBox detecta quando um jogo utiliza o mouse. Quando vocĂŞ clica na + tela, o mouse deverĂĄ ser capturado pelo DOSBox e funcionar. + Em alguns jogos a detecção do mouse nĂŁo funciona. Nesses casos + vocĂŞ deverĂĄ capturar o mouse manualmente apertando CTRL-F10. + + +P: O aplicativo nĂŁo tem som. +R: Tenha certeza que o som estĂĄ configurado corretamente no jogo. Isso pode ser + feito durante a instalação ou no programa setup/setsound que acompanha + o jogo. Primeiro, veja se existe uma opção para auto-detecção. Se nĂŁo + existe, tente selecionar soundblaster ou soundblaster16 com as configuraçþes + padrĂľes, sendo "address=220 irq=7 dma=1". VocĂŞ talvez queira selecionar o + midi no address 330 como dispositivo de mĂşsica. + Os parâmetros das placas de som emuladas podem ser alterados no arquivo de + configuraçþes do DOSBox. + Se continuar sem som, coloque o nĂşcleo (core) em normal e use valores + menores e fixos para os ciclos (como cycles=2000). TambĂŠm assegure que + o seu sistema operacional estĂĄ com som ativado. + Em alguns casos, pode ser Ăştil usar um dispositivo emulador de som diferente + como soundblaster pro (sbtype=sbpro1 no arquivo de configuraçþes do DOSBox) ou + o gravis ultrasound (gus=true). + + +P: O som sai cortado ou estranho/difuso. +R: VocĂŞ estĂĄ exigindo muito da sua CPU para manter o DOSBox rodando naquela velocidade. + VocĂŞ pode diminuir os ciclos, pular quadros, reduzir a taxa de amostragem do + dispositivo de som (veja o arquivo de configuraçþes do DOSBox) ou + o dispositivo mixador. VocĂŞ pode tambĂŠm aumentar o prĂŠbuffer no arquivo de configuraçþes do DOSBox. + Se vocĂŞ estĂĄ usando cycles=max ou =auto, entĂŁo tenha certeza que nĂŁo existe + nenhum processo em segundo plano interferindo! (especialmente se estes acessam o disco rĂ­gido) + + +P: Eu nĂŁo consigo digitar \ ou : no DOSBox. +R: Isso pode acontecer em vĂĄrias situaçþes, caso o layout do seu teclado nĂŁo possua uma + representação adequada no DOS (ou nĂŁo foi detectada corretamente), + ou o mapeamento das teclas estĂĄ errado. + Algumas possĂ­veis soluçþes: + 1. Use /, ou ALT-58 para : e ALT-92 para \. + 2. Mude o layout do teclado do DOS (veja Seção 7: Layout do teclado). + 3. Adicione os comandos que vocĂŞ quer na seção [autoexec] + do arquivo de configuraçþes do DOSBox. + 4. Abra o arquivo de configuraçþes do DOSBox e mude o valor do usescancodes. + 5. Mude o layout do teclado do seu sistema operacional. + + Note que se o layout do seu teclado nĂŁo puder ser identificado, ou o keyboardlayout estĂĄ ajustado + para none no arquivo de configuraçþes do DOSBox, o layout padrĂŁo dos EUA ĂŠ usado. + Nessa configuração tente as teclas ao redor do "enter" para a tecla \ (barra invertida), + e para a tecla : (dois pontos) use shift e as teclas entre "enter" e "l". + + +P: Estou com atraso no teclado. +R: Diminua a prioridade no arquivo de configuraçþes do DOSBox, por exemplo + ajuste "priority=normal,normal". VocĂŞ tambĂŠm pode tentar diminuir os ciclos + (começe com um ciclo fixo, como cycles=10000). + + +P: O cursor estĂĄ se movendo em apenas uma direção! +R: Veja se isso ainda acontece ao desabilitar a emulação do joystick, + coloque joysticktype=none na seção [joystick] do arquivo de configuraçþes + do DOSBox. Tente tambĂŠm desconectar qualquer joystick/gamepad. + Se vocĂŞ quiser usar o joystick no jogo, tente ajustar timed=false + e tenha certeza de calibrar o joystick (no seu sistema operacional e + no jogo ou no programa de instalação do jogo). + + +P: O jogo/aplicativo roda muito lento! +R: Olhe a seção "Como rodar jogos que necessitam mais recursos" + para maiores informaçþes. + + +P: O jogo/aplicativo nĂŁo chega a rodar/trava! +R: Olhe a Seção 10: Solução de Problemas + + +P: O DOSBox pode danificar meu computador? +R: O DOSBox nĂŁo pode danificar seu computador mais do que qualquer outro programa que + necessita muitos recursos. Aumentando os ciclos nĂŁo faz um overclock no seu CPU. + Quando os ciclos estĂŁo muito altos a performance do software executado no DOSBox cai. + + +P: Eu queria trocar o tamanho da memĂłria/velocidade da CPU/ems/soundblaster IRQ. +R: É possĂ­vel! Apenas crie um arquivo de configuraçþes: config -writeconf arquivodeconfiguraçþes. + Abra seu editor de texto favorito e modifique as configuraçþes. Para iniciar o DOSBox + com suas novas configuraçþes: dosbox -conf arquivodeconfiguraçþes + Veja como funciona o comando config na Seção 4 para mais detalhes. + + +P: Quais hardwares de som o DOSBox emula atualmente? +R: DOSBox emula vĂĄrios dispositivos de som: + - Som interno do PC + Essa emulação inclui o gerador de tons e vĂĄrias formas de + saĂ­da de som digital atravĂŠs da caixa de som interna. + - Creative CMS/Gameblaster + É a primeira placa feita pela Creative Labs(R). A localização padrĂŁo + da configuração estĂĄ na porta 0x220. Nota-se que ao habilitar essa + emulação com a emulação do Adlib poderĂĄ resultar em conflitos. + - Tandy 3 voice + A emulação deste hardware ĂŠ completa, com a exceção do + canal de ruĂ­do. Esse canal nĂŁo ĂŠ muito bem documentado, + com isso, seja talvez a melhor opção quanto a precisĂŁo do som. + - Tandy DAC + A emulação do Tandy DAC utiliza o emulador Soundblaster, entĂŁo + esteja certo de que o soundblaster estĂĄ habilitado no arquivo de configuraçþes + do DOSBox. O Tandy DAC ĂŠ emulado apenas em nĂ­vel de BIOS. + - Adlib + Esta emulação ĂŠ quase perfeita e inclui a habilidade do Adlib de + tocar quase todo som digitalizado. + - SoundBlaster 16 / SoundBlaster Pro I & II / SoundBlaster I & II + Por padrĂŁo, o DOSBox fornece Soundblaster 16 em 16-bit de som estĂŠreo. + É possĂ­vel selecionar uma versĂŁo diferente do SoundBlaster no arquivo de + configuraçþes do DOSBox (Ver Programas internos: CONFIG). + - Disney Soundsource + Usando a porta da impressora, esse dispositivo apenas gera som digital. + - Gravis Ultrasound + A emulação deste hardware estĂĄ quase completa, apesar da capacidade + de tocar MIDI ter sido deixada de lado, pois o MPU-401 + começou a ser emulado em outro cĂłdigo. + - MPU-401 + A interface MIDI ĂŠ tambĂŠm emulada. Esse mĂŠtodo de saĂ­da som + somente funcionarĂĄ quando usado com um dispositivo de "General Midi" ou MT-32. + + +P: DOSBox trava no inĂ­cio e eu estou rodando artes/cinemĂĄtica. +R: Esse nĂŁo ĂŠ realmente um problema no DOSBox, mas a solução ĂŠ colocar a + variĂĄvel do ambiente SDL_AUDIODRIVER para alsa ou oss. + + +P: Estou tendo problemas para rodar um jogo feito com a Build Engine (Duke3D/Blood/Shadow Warrior). +R: Primeiramente, tente encontrar alguma portabilidade do jogo. Essas fornecerĂŁo uma + melhor velocidade. Para consertar problemas grĂĄficos que ocorrem no + DOSBox em altas resoluçþes: Abra o arquivo de configuraçþes do DOSBox + e procure por machine=svga_s3. Mude de svga_s3 para vesa_nolfb + + +P: Excelente LEIAME, mas eu ainda nĂŁo entendi. +R: O fĂłrum "The Newbie's pictorial guide to DOSBox" localizado em + http://vogons.zetafleet.com/viewforum.php?f=39 poderĂĄ te ajudar. + Tente tambĂŠm o wiki do DOSBox: + http://www.dosbox.com/wiki/ + + +Para mais perguntas, leia o restante desse LEIAME e/ou verifique o +site/fĂłrum: +http://www.dosbox.com + + + +======= +3. Uso: +======= + +Aqui vocĂŞ terĂĄ uma visĂŁo ampla das opçþes da linha de comando que vocĂŞ +pode dar ao DOSBox. UsuĂĄrios do Windows devem executar o cmd.exe, +command.com, ou editar um atalho para o DOSBox para isso. +Essas opçþes sĂŁo vĂĄlidas para qualquer sistema operacional, +menos quando indicado na descrição da opção: + +dosbox [nome] [-exit] [-c comando] [-fullscreen] [-conf arquivodeconfig] + [-lang arquivodeidioma] [-machine tipodemĂĄquina] [-noconsole] + [-startmapper] [-noautoexec] [-securemode] + [-scaler escala | -forcescaler escala] + [-version] + +dosbox -version +dosbox -editconf programa +dosbox -opencaptures programa +dosbox -printconf +dosbox -eraseconf + + name + Se "nome" for um diretĂłrio, ele serĂĄ montado como se fosse a unidade C:. + Se "nome" for um executĂĄvel, serĂĄ montado o diretĂłrio de "name" como + a unidade C: e entĂŁo "nome" serĂĄ executado. + + -exit + O DOSBox vai fechar automaticamente assim que o aplicativo "nome" for + encerrado. + + -c comando + Essa função executa comandos antes de "nome" ser executado. + VĂĄrios comandos podem ser especificados, embora cada um + deles deva ser iniciado com um "-c". + Um comando pode ser: um Programa Interno, um comando do prĂłprio + DOS ou um executĂĄvel que esteja em uma unidade emulada. + + -fullscreen + Inicia o DOSBox jĂĄ no modo de tela cheia. + + -conf arquivodeconfig + Abre o DOSBox com as opçþes que foram especificadas em "arquivodeconfig". + VĂĄrias opçþes -conf podem ser usadas. + Para mais informaçþes, veja a Seção 11. + + -lang arquivodeidioma + Executa o DOSBox usando o idioma programado em "arquivodeidioma". + + -machine tipodemĂĄquina + Faz com que o DOSBox emule um determinado tipo de mĂĄquina. Algumas + das opçþes sĂŁo: hercules, cga, pcjr, tandy, svga_s3 (padrĂŁo) assim + como os chipsets svga adicionais, que estĂŁo listadas no arquivo de + configuraçþes do DOSBox. + O svga_s3 tambĂŠm permite uma emulação vesa. + Para alguns efeitos especiais do vga, somente o tipo de mĂĄquina vgaonly + poderĂĄ ser usado. Perceba que essa opção irĂĄ desabilitar as capacidades + do svga, e poderĂĄ ficar (consideravelmente) mais lento devido Ă  melhor + precisĂŁo na emulação. + A função machinetype afeta tanto as placas de vĂ­deo como as placas de + som disponĂ­veis. + + -noconsole (Apenas Windows) + Inicia o DOSBox sem mostrar a janela do console. O log de saĂ­da serĂĄ + redirecionado para stdout.txt e stderr.txt + + + -startmapper + Inicia o mapeador de teclas logo no inicio. Essa função ĂŠ Ăştil para pessoas + que possuam algum tipo de problema no seu teclado. + + -noautoexec + Esse comando "pula" a seção [autoexec] do arquivo de configuraçþes + que foi carregado. + + -securemode + Possui a mesma função do -noautoexec, porĂŠm ele adiciona + config.com -securemode no final do AUTOEXEC.BAT (o que, em troca, + ignora quaisquer mudanças que foram feitas em relação Ă  como as + unidades sĂŁo emuladas, dentro do DOSBox). + + -scaler escala + Usa a escala que foi especificada em "escala". Abra o arquivo de + configuraçþes do DOSBox para verificar quais as escalas disponĂ­veis. + + -forcescaler escala + Função parecida com o parâmetro -scaler, mas esse força o + uso da escala determinada, mesmo que ela nĂŁo seja necessariamente + adequada. + + -version + Mostra informaçþes sobre a versĂŁo e fecha o DOSBox. + Útil para a criação de frontends. + + -editconf programa + Chama "programa" como o primeiro parâmetro do arquivo de configuraçþes. + VocĂŞ pode especificar esse comando mais de uma vez. Nesse caso, + ele irĂĄ se dirigir ao segundo programa, caso o primeiro falhe na + execução. + + -opencaptures programa + Chama "programa" como o primeiro parâmetro a localização + da pasta de captura. + + -printconf + Imprime a localização do arquivo de configuraçþes padrĂŁo. + + -eraseconf + Exclui o arquivo de configuraçþes padrĂŁo. + +Nota: Se por acaso o nome/comando/arquivo de configuraçþes/arquivo de + idioma possuir algum espaço, ponha todo o nome/comando/arquivo + de configuraçþes/arquivo de idioma entre aspas: + ("comando ou nome do arquivo"). Se vocĂŞ quiser usar aspas dentro + das prĂłprias aspas (provavelmente quando for usar -c e mount): + UsuĂĄrios do Windows e OS/2 podem usar aspas simples dentro de aspas + duplas. + Outros usuĂĄrios poderĂŁo usar aspas com uma barra (\") dentro das aspas duplas. + Windows: -c "mount c 'c:\program files\'" + Linux: -c "mount c \"/tmp/name with space\"" + +Aqui vai um exemplo: + +dosbox c:\atlantis\atlantis.exe -c "MOUNT D C:\SAVES" + Isso vai montar c:\atlantis como c:\ e executar atlantis.exe. + Antes dele fazer isso ele vai montar C:\SAVES como sendo a unidade D. + +No Windows, vocĂŞ tambĂŠm pode arrastar os diretĂłrios/arquivos diretamente +para o executĂĄvel do DOSBox. + + + +====================== +4. Programas Internos: +====================== + +O DOSBox suporta a maioria dos comandos do DOS encontrados no command.com. +Para ver uma lista dos programas internos digite "HELP" no prompt de comando. + +AlĂŠm desses, os seguintes comandos podem ser usados: + +MOUNT "Letra da Unidade emulada" "Unidade Real ou DiretĂłrio" + [-t tipo] [-aspi] [-ioctl] [-noioctl] [-usecd nĂşmero] [-size tam_unidade] + [-label rĂłtulo] [-freesize tam_em_mb] + [-freesize tam_em_kb (disquetes)] +MOUNT -cd +MOUNT -u "Letra da Unidade emulada" + + Programa para montar diretĂłrios locais como unidades dentro do DOSBox. + + "Letra da Unidade emulada" + A letra da unidade dentro do DOSBox (ex. C). + + "Letra Real da Unidade (geralmente para CD-ROMs no Windows) ou DiretĂłrio" + O diretĂłrio local que vocĂŞ deseja acessar com o DOSBox. + + -t tipo + Tipo da unidade a ser montada. Os suportados sĂŁo: dir (padrĂŁo), + floppy (disquete), cdrom. + + -size tam_unidade + Ajusta o tamanho da unidade, onde tam_unidade ĂŠ pode ser + "bps,spc,tcl,fcl": + bps: bytes por setor. Por padrĂŁo, 512 para unidades convencionais + e 2048 para unidades de CD-ROM + spc: setores por cluster, geralmente entre 1 e 127 + tcl: total de clusters, entre 1 e 65534 + fcl: total de clusters livres, entre 1 e tcl + + -freesize tam_em_mb | tam_em_kb + Ajusta a quantidade de espaço disponĂ­vel na unidade em megabytes + (unidades convencionais) ou kilobytes (unidades de disquete). + Essa ĂŠ uma versĂŁo mais simples de -size. + + -label rĂłtulo + Ajusta o nome da unidade para "rĂłtulo". É necessĂĄrio em alguns + sistemas caso o rĂłtulo do CD-ROM nĂŁo seja lido corretamente (Ăştil quando + o programa nĂŁo consegue encontrar seu CD-ROM). Se o rĂłtulo nĂŁo for especificado + ou o suporte de baixo nĂ­vel nĂŁo for selecionado (isto ĂŠ, omitir os parâmetros + -usecd # e/ou -aspi, ou especificando -noioctl): + No Windows: o rĂłtulo serĂĄ lido da "Unidade Real". + No Linux: o rĂłtulo serĂĄ NO_LABEL. + + Se vocĂŞ especificar um rĂłtulo, esse rĂłtulo serĂĄ mantido enquanto a unidade + estiver montada. Ele nĂŁo serĂĄ atualizado em caso de mudança de CD, etc !! + + -aspi + Força o uso da camada aspi. SĂł funciona montando a unidade de CD-ROM + em ambiente Windows que possuam a Camada ASPI. + + -ioctl (seleção automĂĄtica da interface de CDs de ĂĄudio) + -ioctl_dx (extração de ĂĄudio digital usado em CDs de ĂĄudio) + -ioctl_dio (chamadas ioctl usadas em CDs de ĂĄudio) + -ioctl_mci (MCI usado em CDs de ĂĄudio) + Força o uso de comandos ioctl. SĂł ĂŠ vĂĄlido se a unidade de CD-ROM for montada + no Windows que suporte esses comandos (Win2000/XP/NT). + As diferentes opçþes diferem apenas na maneira de como o CD de ĂĄudio ĂŠ manuseado. + Tenha preferĂŞncia por -ioctl_dio (requer menor processamento), mas ele pode nĂŁo + funcionar em todos os sistemas, entĂŁo, -ioctl_dx (ou -ioctl_mci) devem ser usados. + + -noioctl + Força o uso da camada SDL do CD-ROM. VĂĄlido para qualquer sistema. + + -usecd nĂşmero + VĂĄlido para qualquer sistema, no Windows o parâmetro -noioctl deve + estar presente para se poder fazer o uso do parâmetro -usecd. + Ativa a seleção da unidade que deverĂĄ ser usada pelo SDL. Use isso se + a unidade de CD-ROM nĂŁo existir ou nĂŁo estiver montada enquanto usa + a interface de CD-ROM do SDL. "nĂşmero" pode ser encontrado atravĂŠs de "MOUNT -cd". + + -cd + Exibe todas as unidades de CD-ROM detectadas pelo SDL e seus respectivos + nĂşmeros. Veja mais informaçþes na seção -usecd acima. + + -u + Desmonta a unidade. NĂŁo funciona para a Z:\. + + Observação: É possĂ­vel montar um diretĂłrio local como unidade de CD-ROM. + Sendo assim, nĂŁo existirĂĄ suporte de hardware. + + Basicamente o MOUNT permite vocĂŞ conectar o hardware do seu computador + ao PC emulado pelo DOSBox. + EntĂŁo, "MOUNT C C:\JOGOS" diz ao DOSBox para usar a pasta C:\JOGOS como a unidade C: + dentro do DOSBox. Ele tambĂŠm permite que vocĂŞ mude a letra da unidade para + programas que necessitam unidades com letras especĂ­ficas. + + Por exemplo: "Touche: Adventures of The Fifth Musketeer" deve ser executado + na unidade C:. Usando o DOSBox juntamente com seu comando mount, vocĂŞ pode + fazer com que o jogo pense que ele estĂĄ na unidade C, enquanto ele estĂĄ em + qualquer outro lugar que vocĂŞ queira colocar. Por exemplo, se o jogo estiver + em D:\JOGOSANTIGOS\TOUCHE, o comando "MOUNT C D:\JOGOSANTIGOS" permitirĂĄ vocĂŞ + executar o Touche a partir da unidade D. + + Montar a sua unidade C inteira com "MOUNT C C:\" NÃO ĂŠ recomendado! O mesmo + ĂŠ vĂĄlido ao montar a raiz de qualquer outra unidade, exceto para CD-ROMs (devido + sua natureza de somente leitura). Se nĂŁo, caso vocĂŞ ou o DOSBox faça algum erro, + vocĂŞ poderĂĄ perder todos os seus arquivos. + É recomendado colocar todos os seus aplicativos/jogos em um subdiretĂłrio e montĂĄ-lo. + + Exemplos gerais de MOUNT: + 1. Para montar c:\DirX como um disquete : + mount a c:\DirX -t floppy + 2. Para montar a unidade de CD-ROM E: do sistema como unidade de CD-ROM D: no DOSBox: + mount d e:\ -t cdrom + 3. Para montar a unidade de CD-ROM do sistema como pontodemontagem /mĂ­dia/cdrom como + unidade de CD-ROM D: no DOSBox: + mount d /media/cdrom -t cdrom -usecd 0 + 4. Para montar uma unidade com ~870 MB de espaço disponĂ­vel (versĂŁo simples): + mount c d:\ -freesize 870 + 5. Para montar uma unidade com ~870 MB de espaço disponĂ­vel (modo avançado, controle total): + mount c d:\ -size 512,127,16513,13500 + 6. Para montar /home/user/dirY como unidade C no DOSBox: + mount c /home/user/dirY + 7. Para montar o diretĂłrio onde o DOSBox foi iniciado como D no DOSBox: + mount d . + (note o . que representa a pasta onde o DOSBox foi iniciado) + + +MEM + Programa para mostrar a quantidade de memĂłria disponĂ­vel. + + +VER +VER set versĂŁo_maior [versĂŁo_menor] + Mostra a versĂŁo atual do DOSBox e a versĂŁo relatada do DOS + (uso sem parâmetros). + Altera a versĂŁo relatada do DOS com o parâmetro "set", + por exemplo: escreva "VER set 6 22" para que a versĂŁo relatada + do DOS pelo DOSBox seja a 6.22. + + +CONFIG -writeconf localdoarquivo +CONFIG -writelang localdoarquivo +CONFIG -securemode +CONFIG -set "seção propriedade=valor" +CONFIG -get "seção propriedade" + + O CONFIG pode ser usado para alterar ou obter informaçþes de vĂĄrias configuraçþes do DOSBox + durante sua execução. Ele pode salvar as configuraçþes atuais e os textos do idioma para um + arquivo no disco rĂ­gido. Informaçþes sobre todas as possĂ­veis seçþes e propriedades podem ser + encontradas na Seção 11 (O Arquivo de Configuraçþes). + + -writeconf localdoarquivo + Escreve as atuais configuraçþes do DOSBox em um arquivo. "localdoarquivo" ĂŠ + um local do seu disco rĂ­gido, nĂŁo uma unidade montada no DOSBox. + O arquivo de configuraçþes contĂŠm vĂĄrios ajustes do DOSBox: + a quantidade de memĂłria emulada, as placas de som emuladas dentre muitas outras + coisas. Ele tambĂŠm permite acesso ao AUTOEXEC.BAT. + Veja a Seção 11 (O Arquivo de Configuraçþes) para maiores informaçþes. + + -writelang localdoarquivo + Escreve os textos do idioma atual em um arquivo. "localdoarquivo" ĂŠ + um local do seu disco rĂ­gido, nĂŁo uma unidade montada no DOSBox. + O arquivo de idioma controla toda a saĂ­da visĂ­vel dos comandos internos + do DOSBox e do DOS interno. + + -securemode + Alterna o DOSBox para um modo mais seguro. Nesse modo, os comandos internos + MOUNT, IMGMOUNT e BOOT nĂŁo funcionarĂŁo. TambĂŠm nĂŁo ĂŠ possĂ­vel criar um novo + arquivo de configuraçþes ou de idiomas enquanto estiver nesse modo. + (Atenção: a Ăşnica maneira de sair desse modo ĂŠ reiniciando o DOSBox.) + + -set "seção propriedade=valor" + O CONFIG tentarĂĄ ajustar um novo valor para uma certa propriedade. Atualmente + o CONFIG nĂŁo tem como informar se o comando foi concluĂ­do com sucesso ou nĂŁo. + + -get "seção propriedade" + O valor atual de uma determinada propriedade ĂŠ relatada e gravada na variĂĄvel + ambiente %CONFIG%. Isso pode ser usado para gravar um determinado valor quando + estiver usando arquivos batch. + + Ambos "-set" e "-get" funcionam a partir de arquivos batch e podem ser usados para + ajustar suas prĂłprias configuraçþes para cada jogo. + + Exemplos: + 1. Para criar um arquivo de configuraçþes no diretĂłrio atual: + config -writeconf dosbox.conf + 2. Para ajustar os ciclos da CPU em 10000: + config -set "cpu cycles=10000" + 3. Para desligar a emulação da memĂłria ems: + config -set "dos ems=off" + 4. Para verificar qual nĂşcleo da CPU estĂĄ sendo usada. + config -get "cpu core" + + +LOADFIX [-tamanho] [programa] [parâmetros-do-programa] +LOADFIX -f + Programa usado para reduzir a quantidade de memĂłria convencional disponĂ­vel. + Útil para programas antigos que nĂŁo esperam que muita memĂłria esteja disponĂ­vel. + + -tamanho + nĂşmero de kilobytes para "comer" (reduzir), padrĂŁo = 64kb + + -f + libera todas as memĂłrias alocadas anteriormente + + Exemplos: + 1. Para iniciar mm2.exe e alocar uma memĂłria de 64kb + (mm2 terĂĄ menos 64 kb de memĂłria disponĂ­vel) : + loadfix mm2 + 2. Para iniciar mm2.exe e alocar uma memĂłria de 32kb : + loadfix -32 mm2 + 3. Para liberar as memĂłrias anteriormente alocadas : + loadfix -f + + +RESCAN + Faz o DOSBox reanalizar a estrutura do diretĂłrio. Útil caso vocĂŞ tenha + alterado algo, em uma das unidades montadas, fora do DOSBox. (CTRL - F4 ĂŠ um atalho!) + + +MIXER + Faz o DOSBox exibir suas configuraçþes atuais do volume. + Logo abaixo estĂĄ como alterĂĄ-las: + + mixer canal esquerdo:direito [/NOSHOW] [/LISTMIDI] + + canal + SĂŁo opçþes possĂ­veis: MASTER, DISNEY, SPKR, GUS, SB, FM [, CDAUDIO]. + CDAUDIO estĂĄ disponĂ­vel apenas se a interface do CD-ROM com controle + de volume estiver ativada (imagem do CD, ioctl_dx). + + esquerdo:direito + Os nĂ­veis de volume em porcentagens. Se vocĂŞ colocar um D na frente o + valor serĂĄ em decibĂŠis (Exemplo: mixer gus d-10). + + /NOSHOW + Previne o DOSBox de mostrar o resultado caso vocĂŞ tenha ajustado algum + dos nĂ­veis de volume. + + /LISTMIDI + Lista os dispositivos MIDI disponĂ­veis no seu PC (Windows). Para escolher + um dispositivo que nĂŁo seja o mapeador de midi padrĂŁo do Windows, adicione + uma linha 'midiconfig=id' na seção [midi] no arquivo de configuraçþes, + onde 'id' ĂŠ o nĂşmero do dispositivo listado pelo LISTMIDI. + + +IMGMOUNT + É um utilitĂĄrio para montar imagens de disco ou de CD-ROM dentro do DOSBox. + + IMGMOUNT UNIDADE [arquivo_imagem] -t [tipo_imagem] -fs [formato_imagem] + -size [setoresporbyte, setoresporcabeça, cabeças, cilindros] + IMGMOUNT UNIDADE [arquivodeimagem1, .. ,arquivodeimagemN] -t iso -fs iso + + arquivo_imagem + Local do arquivo de imagem para montar no DOSBox. O local pode + ser uma unidade montada dentro do DOSBox, ou o seu disco rĂ­gido real. + TambĂŠm ĂŠ possĂ­vel montar imagens de CD-ROM (ISOs ou CUE/BIN), caso + vocĂŞ necessite trocar o CD em um determinado momento especifique + todas as imagens em sucessĂŁo (veja prĂłximo tĂłpico). + Os pares CUE/BIN sĂŁo melhores opçþes para imagens de CD-ROM pois elas + guardam informaçþes sobre faixas de ĂĄudio em comparação com ISOs + (que armazenam apenas dados). Para montar um par CUE/BIN sempre + especifique a lista CUE. + + arquivodeimagem1, .. ,arquivodeimagemN + Local dos arquivos de imagem para montar no DOSBox. SĂł ĂŠ permitido + especificar um nĂşmero de imagens para imagens de CD-ROM. Os CDs + podem ser trocados, a qualquer momento, com CTRL-F4. Isso ĂŠ necessĂĄrio + para jogos que usam vĂĄrios CD-ROMs e que precisem, em um determinado + ponto do jogo, que os CDs sejam trocados. + + -t + A seguir estĂŁo os tipos de imagens vĂĄlidas: + floppy: Especifica uma imagem de disquete. O DOSBox automaticamente + identificarĂĄ a geometria do disco (360K, 1.2MB, 720K, 1.44MB, etc). + iso: Especifica uma imagem de CD-ROM. A geometria ĂŠ automĂĄtica e + ĂŠ ajustada para seu tamanho. Pode ser uma iso ou um par cue/bin. + hdd: Especifica uma imagem de disco rĂ­gido. A geometria CHS apropriada + deve ser colocada para que isso funcione. + + -fs + A seguir estĂŁo os sistemas de arquivos vĂĄlidos: + iso: Especifica o formato CD-ROM ISO 9660. + fat: Especifica que a imagem usa o sistema de arquivos FAT. O DOSBox tentarĂĄ + montar essa imagem como uma unidade no DOSBox e fazer com que seus arquivos + estejam disponĂ­veis dentro do DOSBox. + none: O DOSBox nĂŁo lerĂĄ o sistema de arquivos do disco. + É Ăştil caso vocĂŞ precise formatar ou caso vocĂŞ queira iniciar + o disco atravĂŠs do comando BOOT. Quando o sistema de arquivo "none" + ĂŠ usado, vocĂŞ deve especificar o nĂşmero da unidade (2 ou 3, + onde 2 = master, 3 = slave) ao invĂŠs da letra da unidade. + Por exemplo, para montar uma imagem de 70MB como uma unidade slave, + vocĂŞ deverĂĄ escrever (sem as aspas): + "imgmount 3 d:\teste.img -size 512,63,16,142 -fs none" + Compare isso com o mount para ser possĂ­vel acessar a unidade + pelo DOSBox, que deveria ser: + "imgmount e: d:\teste.img -size 512,63,16,142" + + -size + Os Cilindros, Cabeças e Setores (CHS) da unidade. + NecessĂĄrio para montar imagens de disco rĂ­gido. + + Um exemplo de como montar imagens de CD-ROM: + 1a. mount c /tmp + 1b. imgmount d c:\minhaiso.iso -t iso + ou (que funciona igual): + 2. imgmount d /tmp/minhaiso.iso -t iso + + +BOOT + O BOOT inicia imagens de disquete ou de disco rĂ­gido independente da + emulação do sistema operacional oferecido pelo DOSBox. Isso permite + jogar bootĂĄveis de disquetes ou iniciar outros sistemas operacionais + dentro do DOSBox. Se o sistema emulado for PCjr (machine=pcjr) o + comando de boot pode ser usado para carregar cartuchos PCjr (.jrc). + + BOOT [diskimg1.img diskimg2.img .. diskimgN.img] [-l letradaunidade] + BOOT [cart.jrc] (apenas PCjr) + + diskimgN.img + Isso ĂŠ nĂşmero de imagens de disquete que vocĂŞ deseja que sejam montadas + depois do DOSBox iniciar a letra da unidade especificada. + Para alternar entre as imagens, aperte CTRL-F4 para mudar do disco atual + para o disco seguinte da lista. Quando chegar ao Ăşltimo disco da lista + o prĂłximo serĂĄ o primeiro. + + [-l letradaunidade] + Esse parâmetro permite que vocĂŞ especifique de qual unidade serĂĄ inicializado. + A unidade padrĂŁo ĂŠ A:, a unidade de disquete. VocĂŞ tambĂŠm pode iniciar uma + imagem de disco rĂ­gido montada como "master" ao especificar "-l C" + (sem as aspas) ou como "slave" ao especificar "-l D" + + cart.jrc (apenas PCjr) + Quando a emulação do PCjr estĂĄ ativada, cartuchos podem ser carregados com + o comando BOOT. O suporte ainda ĂŠ limitado. + + +IPX + + É preciso ativar a rede IPX no arquivo de configuraçþes do DOSBox. + + Toda a rede IPX ĂŠ gerenciada pelo programa interno do DOSBox, + IPXNET. Para obter ajuda sobre a rede IPX dentro do DOSBox, digite + "IPXNET HELP" (sem aspas) e o programa listarĂĄ os comandos com uma + documentação relevante. + + Em relação a como ajustar uma rede, um sistema precisa ser o servidor. + Para fazĂŞ-lo, digite "IPXNET STARTSERVER" (sem as aspas) numa sessĂŁo do + DOSBox. A sessĂŁo onde o DOSBox estĂĄ sendo servidor automaticamente + se adicionarĂĄ para a rede virtual IPX. Para cada computador adicional + que deverĂĄ fazer parte da rede virtual IPX, vocĂŞ deverĂĄ digitar + "IPXNET CONNECT ". + Por exemplo, se o servidor estiver no joao.dosbox.com, vocĂŞ deverĂĄ digitar + "IPXNET CONNECT joao.dosbox.com" em cada sistema que nĂŁo seja o servidor. + + Para jogar os jogos que precisam do Netbios, o arquivo NETBIOS.EXE da Novell + ĂŠ necessĂĄrio. Estabeleça a conexĂŁo IPX como explicado acima, e entĂŁo + execute o "netbios.exe". + + A seguir estĂŁo as referĂŞncias do comando IPXNET: + + IPXNET CONNECT + + IPXNET CONNECT abre uma conexĂŁo e cria um tĂşnel com o servidor IPX + rodando em outra sessĂŁo do DOSBox. O parâmetro "endereço" especifica + o endereço de IP ou nome do host do computador servidor. VocĂŞ tambĂŠm + pode especificar qual a porta UDP que serĂĄ usada. Por padrĂŁo, o IPXNET + usa a porta 213 - que ĂŠ a porta IANA associada para tĂşneis IPX - para + sua conexĂŁo. + + A sintaxe para o IPXNET CONNECT ĂŠ: + IPXNET CONNECT endereço + + IPXNET DISCONNECT + + IPXNET DISCONNECT fecha o tĂşnel da conexĂŁo com o servidor IPX. + + A sintaxe para o IPXNET DISCONNECT ĂŠ: + IPXNET DISCONNECT + + IPXNET STARTSERVER + + IPXNET STARTSERVER inicia um servidor IPX nessa sessĂŁo do DOSBox. + Por padrĂŁo, o servidor aceitarĂĄ conexĂľes na porta 213 UDP, + mas isso pode ser alterado. Uma vez que o servidor for iniciado, o + DOSBox automaticamente iniciarĂĄ uma conexĂŁo com o cliente atravĂŠs do + tĂşnel do servidor IPX. + + A sintaxe para o IPXNET STARTSERVER ĂŠ: + IPXNET STARTSERVER + + Se o servidor estiver por trĂĄs de um router, a porta UDP deverĂĄ ser + encaminhada Ă quele computador (fazer um port-fowarding). + + Nos sistemas Linux/Unix-based: NĂşmeros menores que 1023 para as portas sĂł + podem ser usadas com privilĂŠgios de root. Use portas maiores que 1023 + nesses sistemas. + + IPXNET STOPSERVER + + IPXNET STOPSERVER fecha o tĂşnel do servidor IPX rodando nessa sessĂŁo do + DOSBox. Um certo cuidado deve ser tomado; assegure-se que todas as outras + conexĂľes tenham sido terminadas antes, pois deixar de ser um servidor poderĂĄ + travar as outras mĂĄquinas que ainda estĂŁo usando o tĂşnel de conexĂŁo com o + servidor. + + A sintaxe para o IPXNET STOPSERVER ĂŠ: + IPXNET STOPSERVER + + IPXNET PING + + IPXNET PING emite um pedido de ping atravĂŠs do tĂşnel da rede IPX. + Em resposta, todos os outros computadores conectados responderĂŁo ao ping + e reportarĂŁo o tempo que levou para receber e enviar a mensagem de ping. + + A sintaxe para o IPXNET PING ĂŠ: + IPXNET PING + + IPXNET STATUS + + IPXNET STATUS mostra o estado atual do tĂşnel da rede IPX da sessĂŁo + atual do DOSBox. Para ver a lista de todos os computadores conectados + na rede use o comando IPXNET PING. + + A sintaxe para o IPXNET STATUS ĂŠ: + IPXNET STATUS + + +KEYB [cĂłdigodeidioma [codepage [arquivodecodepage]]] + Altera o layout do teclado. Para informaçþes detalhadas sobre os layouts + do teclado veja a Seção 7. + + [cĂłdigodeidioma] sĂŁo os caracteres que especificam o layout do teclado + que serĂĄ usado. Geralmente sĂŁo 2 caracteres mas, em casos especiais, mais. + Exemplos sĂŁo GK (GrĂŠcia) ou IT (ItĂĄlia). + + [codepage] ĂŠ o nĂşmero da codepage a ser usada. O layout do teclado deve + apresentar suporte para a codepage especificada, caso contrĂĄrio o + carregamento layout falharĂĄ. + Se nenhuma codepage for especificada, uma codepage apropriada para o + layout escolhido ĂŠ automaticamente selecionado. + + [arquivodecodepage] pode ser usado para carregar codepages que ainda nĂŁo estĂŁo + compiladas no DOSBox. SĂł ĂŠ necessĂĄrio quando o DOSBox nĂŁo encontra a codepage. + + + Exemplos: + 1. Para carregar o layout do teclado alemĂŁo (automaticamente usa a codepage 858): + keyb gr + 2. Para carregar o layout do teclado russo com codepage 866: + keyb ru 866 + Para escrever os caracteres russos aperte ALT+SHIFT DIREITO. + 3. Para carregar o layout do teclado francĂŞs com codepage 850 (onde a + codepage estĂĄ no arquivo EGACPI.DAT): + keyb fr 850 EGACPI.DAT + 4. Para carregar a codepage 858 (sem o layout do teclado): + keyb none 858 + Isso pode ser usado para mudar a codepage do utilitĂĄrio FreeDOS keyb2. + 5. Para exibir a codepage atual e, se carregado, o layout do teclado: + keyb + + + +Para maiores informaçþes, use o switch /? na linha de comando com os programas. + + + +==================== +5. Teclas Especiais: +==================== + + +ALT-ENTER : Alterna entre o modo janela e tela-cheia. +ALT-PAUSE : Pausa o DOSBox. (aperte ALT-PAUSE novamente para continuar) +CTRL-F1 : Executa o mapeador de teclas. +CTRL-F4 : Alterna entre as imagens dos discos montadas. + Atualiza a cache dos diretĂłrios de todas as unidades. +CTRL-ALT-F5 : Inicia/Para a gravação de vĂ­deo Ă  um arquivo. (formato AVI) +CTRL-F5 : Captura e salva a imagem da tela. (formato PNG) +CTRL-F6 : Inicia/Para a gravação do ĂĄudio Ă  um arquivo wave. +CTRL-ALT-F7 : Inicia/Para a gravação de comandos OPL. (formato DRO) +CTRL-ALT-F8 : Inicia/Para a gravação de comandos MIDI sem processar. +CTRL-F7 : Diminui o frameskip. +CTRL-F8 : Aumenta o frameskip. +CTRL-F9 : Encerra o DOSBox. +CTRL-F10 : Captura/Libera o mouse. +CTRL-F11 : Desacelera a emulação (Diminui os ciclos do DOSBox). +CTRL-F12 : Acelera a emulação (Aumenta os ciclos do DOSBox). +ALT-F12 : Desativa o limitador de velocidade (BotĂŁo turbo). + + +(NOTA: Uma vez que vocĂŞ ultrapassar o mĂĄximo de ciclos que o computador +suporta, a velocidade começarĂĄ a diminuir. Esse mĂĄximo varia para cada +computador.) + +Essas sĂŁo atribuiçþes de teclas padrĂŁo. Elas podem ser alteradas atravĂŠs +do mapeador de teclas. (Veja seção 6: Mapeador de teclas) + +Arquivos salvos/gravados podem ser encontrados em diretĂłrio_atual/capture +(isso pode ser alterado no arquivo de configuraçþes do DOSBox). +Essa pasta deverĂĄ existir antes do DOSBox ser iniciado, se nĂŁo nada serĂĄ +salvo/gravado ! + + + +====================== +6. Mapeador de Teclas: +====================== + +Quando o mapeador de teclas do DOSBox ĂŠ iniciado (Pressionando CTRL+F1 ou +escrevendo o parâmetro -startmapper na linha de comando do executĂĄvel) +na tela serĂĄ exibido um teclado virtual e um joystick virtual. + +Esses dispositivos virtuais corresponderĂŁo Ă s teclas e eventos que o +DOSBox irĂĄ relatar para as aplicaçþes DOS (que estĂĄ sendo emulado). +Quando vocĂŞ clicar em um botĂŁo com o mouse, no canto inferior esquerdo +aparecerĂĄ o evento a que estĂĄ associado (EVENT) e com que tecla estĂĄ +atualmente atribuĂ­da. + +Event: EVENT +BIND: BIND + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENT + A tecla ou direção/botĂŁo do joystick que serĂĄ relatada pelo DOSBox + Ă s aplicaçþes DOS. +BIND + Que tecla do seu teclado ou botĂŁo/direção do seu joystick (os de verdade) + (o mostrado pelo SDL) que estĂŁo associadas ao EVENT. + +mod1,2,3 + Modificadores. Essas sĂŁo as teclas que tambĂŠm deverĂŁo ser pressionadas + enquanto vocĂŞ aperta a tecla associada (BIND). mod1 = CTRL e mod2 = ALT. + Elas normalmente sĂł sĂŁo usadas quando vocĂŞ quer mudar as teclas especiais + do DOSBox. +Add + Adiciona uma nova BIND ao EVENT. Basicamente adiciona uma tecla do seu + teclado ou um botĂŁo/direção do seu joystick que irĂĄ resultar num EVENT + no DOSBox. +Del + Apaga o BIND associado a esse EVENT. Se o EVENT nĂŁo possui nenhum BIND, + entĂŁo nĂŁo ĂŠ possĂ­vel ativĂĄ-lo no DOSBox (ou seja, nĂŁo hĂĄ como usar + a tecla ou usar a respectiva ação no joystick). +Next + Mostra quais as BINDS (teclas) estĂŁo atribuĂ­das ao determinado EVENT. + + +Exemplo: +P1. VocĂŞ quer que o X do seu teclado digite um Z no DOSBox. + R. Clique no Z do mapeador de teclas. Clique em "Add". Agora + pressione o X do seu teclado. + +P2. Se vocĂŞ clicar em "Next" algumas vezes, verĂĄ que o Z do seu teclado + tambĂŠm faz aparecer um Z no DOSBox. + R. Sendo assim, selecione o Z novamente e clique em "Next" atĂŠ que o BIND + seja o Z do seu teclado. Agora clique em "Del". + +P3. Se vocĂŞ apertar X no DOSBox perceberĂĄ o aparecimento de XZ. + R. O X do seu teclado tambĂŠm estĂĄ mapeado como X!! Clique no X do mapeador + de teclas e procure com o "Next" atĂŠ que vocĂŞ ache o X mapeado. ApĂłs isso, + clique em "Del". + + +Exemplos sobre o remapeamento do joystick: + VocĂŞ tem um joystick conectado, que funciona muito bem com o DOSBox, mas vocĂŞ + quer jogar um jogo, que sĂł aceita o teclado, com o joystick (assume-se que o + jogo seja controlado pelas setinhas do teclado): + 1. Inicie o mapeador, clique em uma das setas localizadas no + centro-esquerdo da tela (logo acima dos botĂľes Mod1/Mod2). + O EVENT deve ser key_left. Agora clique em Add e mova o seu joystick na + respectiva direção. Com isso, vocĂŞ deve ter adicionado uma BIND ao evento. + 2. Repita os passos anteriores para a adição das trĂŞs direçþes restantes. + É claro que os botĂľes do joystick tambĂŠm podem ser remapeados (atirar, + pular, etc.) + 3. Clique em Save, depois em Exit e teste sua nova configuração com algum jogo. + + VocĂŞ quer inverter o eixo y do joystick porque alguns simuladores de vĂ´o usam + esses movimentos de uma maneira que vocĂŞ nĂŁo gosta e nĂŁo ĂŠ configurĂĄvel no jogo: + 1. Inicie o mapeador e clique no Y- no campo superior direito + (essa opção ĂŠ para o primeiro joystick, caso vocĂŞ tenha dois deles + conectados), ou no campo logo abaixo do anterior (essa opção ĂŠ para + o segundo joystick ou, caso vocĂŞ sĂł tenha um encaixado, o segundo + eixo se inverte). + O EVENT deverĂĄ ser jaxis_0_1- (ou jaxis_1_1-). + 2. Clique em Del para remover a BIND atual, e depois clique em Add e mova o + seu joystick para baixo. Feito isso, uma nova bind deverĂĄ criada. + 3. Repita essa operação para configurar o Y+, salve sua configuração e + teste-a em algum jogo. + + + +Se vocĂŞ modificar o mapeamento padrĂŁo, poderĂĄ salvar suas alteraçþes clicando +em "Save". O DOSBox vai salvar esse mapeamento no local especificado no arquivo +de configuraçþes (opção mapperfile=). Na inicialização, o DOSBox vai +carregar o seu arquivo de mapeamento, se o mesmo estiver preenchido +no arquivo de configuraçþes. + + + +===================== +7. Layout do teclado: +===================== + +Para mudar o layout do teclado basta preencher a configuração "keyboardlayout" +na seção [dos] do arquivo de configuraçþes do DOSBox ou utilizar o programa +interno keyb.com do DOSBox. Ambos aceitam cĂłdigos de idioma (veja abaixo), mas +somente ĂŠ possĂ­vel especificar uma codepage customizada atravĂŠs do programa +keyb.com. + +A opção "keyboardlayout=auto" atualmente sĂł funciona em ambiente Windows. +O layout ĂŠ escolhido baseado no qual o sistema operacional estĂĄ usando. + +Mudando o Layout + Por padrĂŁo, o DOSBox jĂĄ suporta um certo nĂşmero de layouts de teclado + e codepages. Nesse caso, apenas o identificador do layout precisa ser + especificado (ex: keyboardlayout=br no arquivo de configuração do + DOSBox, ou escrevendo "keyb br" no prompt de comando do DOSBox). + + Alguns layouts de teclado (por exemplo, o layout GK codepage 869 e o layout RU + codepage 808) tĂŞm suporte para layout duplo que pode ser ativado pressionando + ALT ESQUERDO+SHIFT DIREITO e desativado usando ALT ESQUERDO+SHIFT ESQUERDO. + +Arquivos externos suportados + Os arquivos .kl do FreeDOS sĂŁo suportados (arquivos de layout do FreeDOS keyb2) + assim como suas bibliotecas, (keyboard.sys/keybrd.sys/keybrd3.sys) que consistem + na uniĂŁo dos arquivos .kl existentes. + Caso os layouts integrados do DOSBox nĂŁo funcionem, acesse o site + http://projects.freedos.net/keyb/ para obter layouts de teclado precompilados + com suas devidas atualizaçþes, caso estejam disponĂ­veis. + + Os arquivos .CPI (Arquivos MS-DOS e de codepages compatĂ­veis) e .CPX (Arquivos de + codepage UPX-condesadas do FreeDOS) podem ser usados. Algumas codepages jĂĄ foram + prĂŠ-compiladas no DOSBox. NĂŁo hĂĄ necessidade de se preocupar com arquivo de + codepage externo. Se vocĂŞ necessitar de um arquivo de codepage diferente + (ou customizado), copie ele para o diretĂłrio do arquivo de configuração do DOSBox + para que o DOSBox possa acessĂĄ-lo. + + Layouts adicionais podem ser aplicados copiando o arquivo .kl para o + diretĂłrio do arquivo de configuraçþes do DOSBox e usando a primeira parte do + nome do arquivo como o cĂłdigo do idioma. + Exemplo: Para o arquivo UZ.KL (layout de teclado para o UzbequistĂŁo), especifique + "keyboardlayout=uz" no arquivo de configuraçþes do DOSBox. + A integração das bibliotecas de layouts de teclado (ex: keybrd2.sys) funciona da + mesma maneira. + + +Observe que o layout do teclado faz com que os caracteres estrangeiros apareçam, mas +atualmente NÃO hĂĄ suporte para eles nos nomes dos arquivos. Evite-os tanto no DOSBox +quanto nos arquivos do seu computador que estĂŁo sendo acessados pelo DOSBox. + + + +=================================== +8. Função Multi-Jogador via Serial: +=================================== + +O DOSBox pode emular cabos seriais e nullmodem atravĂŠs da rede local e da internet. +Essa opção pode ser configurada atravĂŠs da seção "Porta Serial" no arquivo de +configuração do DOSBox. + +Para estabelecer uma conexĂŁo Null Modem, uma pessoa deverĂĄ ser o servidor +e o outra deverĂĄ ser o cliente. + +Quem decidir ser o servidor terĂĄ que ajustar o arquivo de configuração +do DOSBox, da seguinte maneira: + serial1=nullmodem + +E o arquivo de configuração do DOSBox no cliente deverĂĄ ficar assim: + serial1=nullmodem server: + +Agora inicie o jogo e escolha, na COM1, uma dentre essas opçþes de multiplayer: +Nullmodem / Cabo Serial / JĂĄ conectado. Lembre-se de deixar as baudrates iguais +nos dois computadores. + +AlĂŠm disso, outros parâmetros podem ser ajustados para melhorar a conexĂŁo +do Null Modem. Estes sĂŁo os parâmetros disponĂ­veis: + + * port: - NĂşmero da porta TCP. PadrĂŁo: 23 + * rxdelay: - Em quanto tempo (milissegundos) os dados recebidos serĂŁo atrasados, + caso a interface ainda nĂŁo esteja pronta. Aumente esse valor + se vocĂŞ encontrar erros na Janela de Status do DOSBox. PadrĂŁo: 100 + * txdelay: - Quanto tempo levar para que as informaçþes sejam + acumuladas, antes de serem enviadas de uma vez em um pacote. + PadrĂŁo:12 + (Isso diminui a sobrecarga do servidor) + * server: - Esse Null Modem serĂĄ um cliente se conectando Ă  um servidor + previamente especificado. + (Se nĂŁo houver servidor: Seja um.) + * transparent:1 - Apenas enviar as informaçþes do serial, sem nenhum handshake + de RTS/DTR. Use essa opção quando estiver se conectando via + algo que nĂŁo seja um Null Modem. + * telnet:1 - Interpreta informaçþes de Telnet provenientes do site remoto. + Automaticamente ativa a transparĂŞncia. + * usedtr:1 - A conexĂŁo nĂŁo serĂĄ estabelecida atĂŠ que o DTR seja ligado pelo + programa DOS. Útil para terminais de modem. + * inhsocket:1 - Usar um socket que serĂĄ enviado ao DOSBox atravĂŠs de uma linha + de comando. Automaticamente ativa a transparĂŞncia. + (Compatibilidade do Socket: É usado para rodar jogos do DOS + antigos em softwares da BBS novos.) + +Exemplo: Para ser um servidor conectado Ă  Porta TCP 5000 + serial1=nullmodem server: port:5000 rxdelay:1000 + + + +============================================================ +9. Como rodar jogos que requerem mais recursos do computador +============================================================ + +O DOSBox emula a CPU, as placas de som e de vĂ­deos, e outros perifĂŠricos +de um computador, tudo de uma sĂł vez. A velocidade do aplicativo emulado +no DOS depende de quantas instruçþes podem ser emuladas. +Esse valor ĂŠ ajustĂĄvel (nĂşmero de ciclos). + +Ciclos da CPU + Por padrĂŁo (cycles=auto). O DOSBox tentarĂĄ descobrir quanto um jogo + necessita para executar as tantas instruçþes emuladas por intervalo de + tempo possĂ­vel. É possĂ­vel forçar esse comportamento ajustando os ciclos + para cycles=max no arquivo de configuraçþes do DOSBox. + A janela do DOSBox mostrarĂĄ uma linha "Cpu Cycles: max" na barra de tĂ­tulo. + Nesse modo ĂŠ possĂ­vel reduzir a quantidade de ciclos por percentual + (CTRL-F11) ou aumentar novamente (CTRL-F12). + + As vezes obtem-se melhores resultados ajustando manualmente o nĂşmero de ciclos. + Ajuste, por exemplo, no arquivo de configuraçþes do DOSBox cycles=30000. + É possĂ­vel aumentar ainda mais o nĂşmero de ciclos, enquanto vocĂŞ roda algum + programa do DOS, apertando CTRL-F12 mas esse valor serĂĄ limitado pela potĂŞncia + da sua CPU. VocĂŞ pode ver o quanto de carga estĂĄ sendo processado pela sua CPU + pelo Gerenciador de Tarefas no Windows 2000/XP/Vista e pelo Monitor de Sistema + no Windows 95/98/ME. Uma vez que 100% do seu processador real esteja em uso nĂŁo + serĂĄ mais possĂ­vel aumentar a velocidade do DOSBox, a menos que vocĂŞ reduza a + carga de processamento de outros aplicativos que nĂŁo sejam o do DOSBox. + +NĂşcleos da CPU + Em arquiteturas x86 (32 bits) vocĂŞ pode tentar forçar o uso de um nĂşcleo + recompilador dinâmico (coloque core=dynamic no arquivo de configuraçþes). + Isso geralmente trĂĄs melhores resultados se a auto detecção (core=auto) falhar. + A melhor opção ĂŠ colocar cycles=max. Mas note que poderĂŁo existir jogos + que funcionem pior do que com o nĂşcleo dinâmico, ou que atĂŠ nem funcionem. + +Emulação de grĂĄficos + A emulação do VGA ĂŠ uma parte bastante delicada do DOSBox em termos de + uso da CPU. Aumentar o nĂşmero de quadros que nĂŁo serĂŁo emulados (frameskip) + apertando CTRL-F8 (incrementos de um) poderĂŁo ajudar no aumento da velocidade. + A carga sobre a CPU deverĂĄ diminuir quando o nĂşmero de ciclos estĂĄ fixo. + Repita esse procedimento atĂŠ que o jogo tenha uma velocidade agradĂĄvel para + vocĂŞ. Note que isso ĂŠ uma troca: o que vocĂŞ perde em fluidez do vĂ­deo vocĂŞ ganha + em velocidade. + +Emulação de som + VocĂŞ pode tentar desativar o som atravĂŠs do instalador do jogo para reduzir + a quantidade de informaçþes que deverĂŁo ser processadas. Colocar nosound=true + NÃO desativa a emulação dos dispositivos de som, apenas a saĂ­da de som serĂĄ + desativada. + +Tente fechar todos os programas em execução, exceto o DOSBox, para aumentar ainda +mais os recursos para o DOSBox. + + +Configuraçþes avançadas dos ciclos: +As opçþes cycles=auto e cycles=max podem ser parametrizadas para possuĂ­rem +diferentes padrĂľes de inicialização. A sintaxe ĂŠ + cycles=auto ["padrĂŁo modoreal"] ["padrĂŁo modo protegido"%] + [limite do "limite do ciclo"] + cycles=max ["padrĂŁo modo protegido"%] [limite do "limite do ciclo"] +Exemplo: + cycles=auto 1000 80% limit 20000 + utilizarĂĄ cycles=1000 para jogos em modo real, 80% da aceleração da CPU + para jogos no modo protegido juntamente com um limite rĂ­gido de 20000 ciclos + + + +========================= +10. Solução de Problemas: +========================= + +O DOSBox nĂŁo inicia: + - use valores diferentes para a opção output= no arquivo de configuração do DOSBox + - atualize os drivers da sua placa de vĂ­deo e o DirectX + +Executar certos tipos de jogos faz o DOSBox fechar, mostrar mensagens de erro ou parar +de responder: + - verifique se o jogo funciona com a instalação padrĂŁo do DOSBox + (com arquivo de configuração nĂŁo modificado) + - tente jogar com o som desativado (altere as configuraçþes do som + no instalador do jogo. Tente tambĂŠm usar sbtype=none e gus=false no arquivo + de configuraçþes do DOSBox) + - tente alterar algumas opçþes no arquivo de configuraçþes, especialmente: + core=normal + ciclos fixos (por exemplo cycles=10000) + ems=false + xms=false + ou combinaçþes para as opçþes acima, + use configuraçþes similares a da mĂĄquina que controla + o chipset emulado e funcionalidade: + machine=vesa_nolfb + ou + machine=vgaonly + - use o loadfix antes de executar o jogo + +O jogo ĂŠ finalizado e retorna ao prompt do DOSBox com uma mensagem de erro: + - leia a mensagem com atenção e tente localizar o erro + - utilize as dicas nas seçþes acima descritas + - monte em outros diretĂłrios pois alguns jogos sĂŁo chatos quanto a localização, + por exemplo, se vocĂŞ utilizou "mount d d:\jogosantigos\jogox" tente + "mount c d:\jogosantigos\jogo" ou "mount c d:\jogosantigos" + - se o jogo necessitar de uma unidade de CD-ROM verifique se vocĂŞ digitou "-t cdrom" + ao montar a unidade e tente usar outros parâmetros adicionais (Os parâmetros + ioctl, usecd e label. Veja na seção apropriada) + - verifique as permissĂľes dos arquivos do jogo (desmarque os atributos + de somente-leitura e adicione permiçþes para gravaçþes etc.) + - tente reinstalar o jogo pelo dosbox + +=============================== +11. O Arquivo de Configuraçþes: +=============================== + +O arquivo com as configuraçþes pode gerado pelo CONFIG.COM, que estĂĄ localizado +na unidade interna (Z:) do dosbox. Leia a seção "Programas Internos" para +entender o funcionamento do CONFIG.COM. +É possĂ­vel modificar o arquivo de configuraçþes gerado para personalizar o DOSBox. + +O arquivo ĂŠ dividido em diversas seçþes (elas estĂŁo destacadas por [] ). +Algumas seçþes possuem opçþes que podem ser configuradas. +Linhas de comentĂĄrio sĂŁo indicadas por # e %. +O arquivo de configuraçþes gerado contĂŠm as configuraçþes atuais. VocĂŞ pode alterĂĄ-las +e entĂŁo iniciar o DOSBox com o parâmetro -conf para carregar o arquivo e consequentemente +as novas configuraçþes. + +O DOSBox buscarĂĄ o arquivo de configuração especificado pelo parâmetro -conf. +Se nenhum arquivo for especificado com o parâmetro, o DOSBox irĂĄ procurar pelo +arquivo "dosbox.conf" no diretĂłrio atual. +Se nĂŁo existir nenhum, o DOSBox carregarĂĄ o arquivo de configuraçþes do usuĂĄrio. +Esse arquivo serĂĄ criado se ele nĂŁo existir. +O arquivo pode ser encontrado em ~/.dosbox (no Linux) ou "~/Library/Preferences" (no MAC OS X). +No Windows os atalhos do menu iniciar deverĂŁo ser usados para encontrĂĄ-lo. + + + +======================== +12. O Arquivo de Idioma: +======================== + +Um arquivo de idioma pode ser gerado pelo CONFIG.COM (CONFIG -writelang nomedoarquivo). +Leia-o, e esperamos que vocĂŞ entenda como mudĂĄ-lo. +Inicie o DOSBox com o parâmetro -lang para usar seu novo arquivo de idioma. +Alternativamente, vocĂŞ pode colocar o nome do arquivo na seção [dosbox] do arquivo de configuraçþes. +LĂĄ existe uma entrada language= onde deverĂĄ ser adicionado o nome do arquivo. + + + +========================================= +13. Criando sua prĂłpria versĂŁo do DOSBox: +========================================= + +Faça o download da fonte. +Verifique o INSTALADOR na distribuição da fonte. + + + +============================= +14. Agradecimentos Especiais: +============================= + +Ver o arquivo THANKS. + + +============ +15. Contato: +============ + +Acesse o site: +http://www.dosbox.com +para ver o email (Na pĂĄgina "Crew"). + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pt-br/portuguese.lang dosbox-staging-0.77.0/contrib/old-translations/pt-br/portuguese.lang --- dosbox-staging-0.76.0/contrib/old-translations/pt-br/portuguese.lang 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pt-br/portuguese.lang 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,972 @@ +:CONFIG_FULLSCREEN +Iniciar o dosbox em tela-cheia. (Aperte ALT-Enter para retornar) +. +:CONFIG_FULLDOUBLE +Usar buffer duplo quando em tela-cheia. Poderá reduzir tremulaçőes na tela, mas também poderá causar uma reduçăo na velocidade. +. +:CONFIG_FULLRESOLUTION +Que resoluçăo usar no modo tela-cheia: original ou tamanho fixo (ex. 1024x768). + Usar a resoluçăo nativa do seu monitor com aspect=true deverá dar os melhores resultados. + Se a imagem exibida for pequena em uma tela grande, tente uma saída de vídeo diferente de surface. +. +:CONFIG_WINDOWRESOLUTION +Ajustar a janela para este tamanho SE o dispositivo de saída suportar escalagem. + (output=surface năo suporta!) +. +:CONFIG_OUTPUT +Qual sistema utilizar para saída de vídeo. +. +:CONFIG_AUTOLOCK +Capturar o mouse automaticamente, quando clicar na tela do dosbox. (Aperte CTRL-F10 para liberar) +. +:CONFIG_SENSITIVITY +Sensibilidade do mouse. +. +:CONFIG_WAITONERROR +Se ocorrer algum erro com o dosbox, aguardar o fechamento do console. +. +:CONFIG_PRIORITY +Níveis de prioridade para o dosbox. A segunda opçăo, depois da vírgula, é usada quando o dosbox está em segundo plano. + (O pause só é válido para a segunda opçăo) +. +:CONFIG_MAPPERFILE +Arquivo utilizado para carregar/salvar o mapeamento das teclas/eventos. Resetmapper apenas funciona com os valores padrăo. +. +:CONFIG_USESCANCODES +Evite o uso de symkeys. Pode năo funcionar em certos sistemas operacionais. +. +:CONFIG_LANGUAGE +Selecionar outro arquivo de idioma. +. +:CONFIG_MACHINE +Tipo de máquina a emular. +. +:CONFIG_CAPTURES +Diretório para salvar a captura de tela, sons, música. +. +:CONFIG_MEMSIZE +Quantidade de memória para o dosbox utilizar, em megabytes. + O melhor valor é o padrăo. Ele evitará problemas com alguns jogos. + Contudo outros jogos talvez precisem de um valor maior. + Geralmente năo há melhora na velocidade aumentando-se esse valor. +. +:CONFIG_FRAMESKIP +Quantos frames o dosbox irá ignorar antes de desenhar outro. +. +:CONFIG_ASPECT +Fazer correçăo do formato. Se a saída năo suportar escalagem, o desempenho do dosbox poderá ser reduzido! +. +:CONFIG_SCALER +Escala utilizada para ampliar/melhorar modos de baixa resoluçăo. + Se 'forced' for adicionado, a escala será usada mesmo se o resultado năo for o desejado. +. +:CONFIG_CORE +Núcleo do processador usado na emulaçăo. auto alterna para dynamic quando disponível e apropriado. +. +:CONFIG_CPUTYPE +Tipo de emulaçăo do processador. auto é a opçăo de melhor velocidade. +. +:CONFIG_CYCLES +Quantidade de instruçőes que o dosbox emulará por milisegundo. +Colocar um valor muito alto pode ocasionar perda de áudio e reduçăo da velocidade. +Os ciclos podem ser ajustados de 3 maneiras: + 'auto' tenta descobrir o melhor valor. + Geralmente funciona, mas poderá falhar para alguns jogos. + 'fixed #número' ajusta uma quantidade fixa de ciclos. Isso poderá ser usado caso 'auto' falhe. + (Exemplo: fixed 4000) + 'max' aloca a maior quantidade de ciclos que seu computador pode suportar. +. +:CONFIG_CYCLEUP +Quantidade de ciclos para aumentar/diminuir ao apertar as teclas correspondentes. (CTRL-F11/CTRL-F12) +. +:CONFIG_CYCLEDOWN +Valores menores que 100 correspondem ŕ porcentagens. +. +:CONFIG_NOSOUND +Ativar modo silencioso. Ainda assim, o som continuará sendo emulado. +. +:CONFIG_RATE +Taxa de amostragem do mixer. Ajustar qualquer valor maior que este no dispositivo provavelmente diminua a qualidade do áudio. +. +:CONFIG_BLOCKSIZE +Tamanho do bloco do mixer. Blocos maiores podem evitar sons picotados mas o som poderá sair com atraso. +. +:CONFIG_PREBUFFER +Quantos milisegundos de dados manter antes do buffer. +. +:CONFIG_MPU401 +Tipo de MPU-401 a emular. +. +:CONFIG_MIDIDEVICE +Dispositivo que receberá as informaçőes MIDI a partir do MPU-401. +. +:CONFIG_MIDICONFIG +Opçőes especiais de configuraçăo para o dispositivo. Esse é geralmente o id. do dispositivo que vocę deseja usar. + Veja o arquivo README/Manual para mais detalhes. +. +:CONFIG_SBTYPE +Tipo de SoundBlaster a emular. gb é Gameblaster +. +:CONFIG_SBBASE +Valor do 'IO address' do SoundBlaster. +. +:CONFIG_IRQ +Valor do IRQ do SoundBlaster. +. +:CONFIG_DMA +Valor do DMA do SoundBlaster. +. +:CONFIG_HDMA +Valor 'High DMA' do SoundBlaster. +. +:CONFIG_SBMIXER +Permitir que o mixer do SoundBlaster modifique o mixer do dosbox. +. +:CONFIG_OPLMODE +Tipo de emulaçăo OPL. Em 'auto', o modo é determinado pelo tipo do SoundBlaster. Todos os modos OPL săo compatíveis com Adlib, exceto o 'cms'. +. +:CONFIG_OPLEMU +Provedor da emulaçăo do OPL. compat deve oferecer melhor qualidade (veja também oplrate). +. +:CONFIG_OPLRATE +Taxa de amostragem da emulaçăo da música OPL. Use 49716 para a mais alta qualidade (ajuste a taxa de amostragem do mixer correspondente). +. +:CONFIG_GUS +Ativar a emulaçăo do Gravis Ultrasound. +. +:CONFIG_GUSRATE +Taxa de amostragem da emulaçăo do GUS. +. +:CONFIG_GUSBASE +Valor do 'IO address' do Gravis Ultrasound. +. +:CONFIG_GUSIRQ +Valor do IRQ do Gravis Ultrasound. +. +:CONFIG_GUSDMA +Valor do 'DMA channel' do Gravis Ultrasound. +. +:CONFIG_ULTRADIR +Caminho para o diretório do Ultrasound. Neste diretório +deverá haver uma pasta de MIDI que contém +o banco de sons para a reproduçăo do GUS. Também podem ser +usados os mesmos que funcionam com Timidity. +. +:CONFIG_PCSPEAKER +Ativar a emulaçăo do PC-Speaker. +. +:CONFIG_PCRATE +Taxa de amostragem do som do PC-Speaker. +. +:CONFIG_TANDY +Ativar emulaçăo do Tandy Sound System. Em 'auto' a emulaçăo do Tandysound só será feita se a máquina estiver como 'Tandy'. +. +:CONFIG_TANDYRATE +Taxa de amostragem do Tandy 3-Voice generation. +. +:CONFIG_DISNEY +Ativar a emulaçăo do Disney Sound Source. (Covox Voice Master e Speech Thing compatíveis). +. +:CONFIG_JOYSTICKTYPE +Tipo do joystick a emular: auto (padrăo), none, +2axis (suporta 2 joysticks), +4axis (suporta 1 joystick, o primeiro será utilizado), +4axis_2 (suporta 1 joystick, o segundo será utilizado), +fcs (Thrustmaster), ch (CH Flightstick). +none desativa a emulaçăo do joystick. +auto determina a emulaçăo de acordo com o joystick(s) utilizado(s). +(Lembre-se de resetar o arquivo de mapeamento caso vocę tenha salvo ele antes) +. +:CONFIG_TIMED +Ativa intervalos temporizados para os eixos. Experimente essa opçăo se o jogo fizer movimentos quando o joystick estiver parado. +. +:CONFIG_AUTOFIRE +Atira continuamente enquanto o botăo estiver pressionado. +. +:CONFIG_SWAP34 +Inverter o 3ş e o 4ş eixo. Pode ser útil para alguns joysticks. +. +:CONFIG_BUTTONWRAP +Ativar agrupamento dos botőes quando um certo número for emulado. +. +:CONFIG_SERIAL1 +Configure o tipo de dispositivo conectado a porta serial. +Pode ser disabled, dummy, modem, nullmodem, directserial. +Parâmetros adicionais devem estar na mesma linha da seguinte forma +parâmetro:valor. O parâmetro comum é irq. +para directserial: realport (obrigatório), rxdelay (opcional). + (realport:COM1 realport:ttyS0). +para modem: listenport (opcional). +para nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (todos opcionais). +Exemplo: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +Veja serial1 +. +:CONFIG_SERIAL3 +Veja serial1 +. +:CONFIG_SERIAL4 +Veja serial1 +. +:CONFIG_XMS +Habilitar suporte a XMS. +. +:CONFIG_EMS +Habilitar suporte a EMS. +. +:CONFIG_UMB +Habilitar suporte a UMB. +. +:CONFIG_KEYBOARDLAYOUT +Código do idioma para layout do teclado (ou nenhum). +. +:CONFIG_IPX +Ativar emulaçăo IPX sobre UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +As linhas nesta seçăo serăo sempre executadas ao se iniciar o dosbox. +Vocę pode adicionar comandos de montagem aqui. + +. +:CONFIGFILE_INTRO +# Esse é o arquivo de configuraçőes do DOSBox %s. (Por favor use a última versăo do DOSBox) +# Linhas começando com # săo linhas de comentário. +# Săo usadas para informar (rapidamente) o efeito que cada opçăo causará. + +. +:CONFIG_SUGGESTED_VALUES +Valores possíveis +. +:PROGRAM_CONFIG_FILE_ERROR +NĆo foi possĄvel abrir o arquivo %s + +. +:PROGRAM_CONFIG_USAGE +Ferramenta config: +Use -writeconf nomedoarquivo para salvar as configura‡äes atuais. +Use -writelang nomedoarquivo para salvar os textos do idioma utilizado. + +. +:PROGRAM_CONFIG_SECURE_ON +Modo seguro ativado. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Essa opera‡Ćo nĆo ‚ permitida no modo seguro. + +. +:PROGRAM_CONFIG_SECTION_ERROR +A se‡Ćo %s nĆo existe. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Essa se‡Ćo ou propriedade nĆo existe. + +. +:PROGRAM_CONFIG_NO_PROPERTY +NĆo existe propriedade %s na se‡Ćo %s. + +. +:PROGRAM_CONFIG_GET_SYNTAX +Sintaxe correta: config -get "se‡Ćo propriedade". + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMs encontrados: %d + +. +:PROGRAM_MOUNT_STATUS_2 +A unidade %c est  montada como %s + +. +:PROGRAM_MOUNT_STATUS_1 +As unidades atualmente montadas sĆo: + +. +:PROGRAM_MOUNT_ERROR_1 +O diret˘rio %s nĆo existe. + +. +:PROGRAM_MOUNT_ERROR_2 +%s nĆo ‚ um diret˘rio + +. +:PROGRAM_MOUNT_ILL_TYPE +Tipo ilegal %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +A unidade %c j  est  montada como %s + +. +:PROGRAM_MOUNT_USAGE +Use MOUNT Letra-da-Unidade Diret˘rio-Local +Exemplo: MOUNT c %s +Isso faz com que o diret˘rio %s apare‡a como a unidade C: no DOSBox +O diret˘rio deve existir. + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +A unidade %c nĆo est  montada. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +A unidade %c foi desmontada com sucesso. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +As unidades virtuais nĆo podem ser desmontadas. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montar c:\ NÇO ‚ recomendado.  preferĄvel montar um (sub)diret˘rio. +. + +:PROGRAM_MOUNT_WARNING_OTHER +Montar / NÇO ‚ recomendado.  preferĄvel montar um (sub)diret˘rio. +. + +:PROGRAM_MEM_CONVEN +%10d Kb de mem˘ria convencional disponĄvel +. + +:PROGRAM_MEM_EXTEND +%10d Kb de mem˘ria estendida disponĄvel +. + +:PROGRAM_MEM_EXPAND +%10d Kb de mem˘ria expandida disponĄvel +. + +:PROGRAM_MEM_UPPER +%10d Kb de mem˘ria superior em %d blocos disponĄveis (Maior bloco de %d Kb) +. + +:PROGRAM_LOADFIX_ALLOC +%d kb alocados. +. + +:PROGRAM_LOADFIX_DEALLOC +%d kb liberados. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Mem˘ria usada liberada. + +. +:PROGRAM_LOADFIX_ERROR +Erro na aloca‡Ćo da mem˘ria. + +. +:MSCDEX_SUCCESS +MSCDEX instalado. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Falha: As letras das mŁltiplas unidades de CD-Rom devem ser contĄnuas. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Falha: Sem suporte. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Falha: Arquivo inv lido ou foi impossĄvel abrir. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Falha: Muitas unidades de CDRom (m x: 5). Falha ao instalar o MSCDEX. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Subdiret˘rio montado: Suporte limitado. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Falha: O arquivo nĆo ‚ uma imagem iso/cue ou cont‚m erros. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Falha: Erro desconhecido. + +. +:PROGRAM_RESCAN_SUCCESS +Cache da unidade apagada. + +. +:PROGRAM_INTRO +Bem-Vindo ao DOSBox, um emulador de x86 com som e gr ficos. +O DOSBox cria um interpretador de comandos semelhante ao do antigo DOS. + +Para informa‡äes b sicas sobre montagem escreva intro mount +Para informa‡äes sobre suporte … CD-ROM escreva intro cdrom +Para informa‡äes sobre teclas especiais escreva intro special +Para mais informa‡äes sobre o DOSBox, veja http://www.dosbox.com/wiki + +O DOSBox ser  finalizado sem avisar se algum erro ocorrer! + + + +. +:PROGRAM_INTRO_MOUNT_START +Aqui estĆo alguns comandos para come‡ar: +Antes que vocˆ possa utilizar seus arquivos no DOSBox, +‚ necess rio montar o diret˘rio que cont‚m os arquivos. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ criar  a unidade C com o conteŁdo de c:\dosprog. ş +ş ş +ş c:\dosprog\ ‚ um exemplo. Substitua pelo diret˘rio onde estĆo seus jogos. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprog criar  a unidade C com o conteŁdo de ~/dosprog. ş +ş ş +ş ~/dosprog ‚ um exemplo. Substitua pelo diret˘rio onde estĆo seus jogos.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +Se a unidade C foi montada corretamente, escreva c: para ir … nova +unidade. O comando dir mostra seu conteŁdo e cd permite a mudan‡a +de diret˘rio (aparecem marcados com [] ao escrever dir). + possĄvel executar programas/arquivos que acabam com .exe .bat e .com. + +. +:PROGRAM_INTRO_CDROM +Como montar uma unidade de CD-ROM Real/Virtual no DOSBox: +DOSBox proporciona emula‡Ćo de CD-ROM em v rios nĄveis. + +O nĄvel b sico funciona com todas as unidades de CD-ROM e diret˘rios normais. +Instala o MSCDEX e marca os arquivos como somente leitura. +Geralmente ‚ o suficiente para a maioria dos jogos: +mount d D:\ -t cdrom ou mount d C:\exemplo -t cdrom +Se nĆo funcionar ser  necess rio informar ao DOSBox o r˘tulo do CD-ROM: +mount d C:\example -t cdrom -label RŕTULO_CD + +O nĄvel a seguir fornece um suporte de baixo nĄvel. +Conseqentemente s˘ funciona em unidades de CD-ROM: +mount d D:\ -t cdrom -usecd 0 + +O Łltimo nĄvel de suporte depende de seu Sistema Operacional: +Para Windows 2000, Windows XP e Linux: +mount d D:\ -t cdrom -usecd 0 -ioctl +Para Windows 9x com ASPI layer instalado: +mount d D:\ -t cdrom -usecd 0 -aspi + +Substitua D:\ pela letra da unidade de seu CD-ROM. +Substitua o 0, em -usecd 0, pelo nŁmero da unidade visualizada ao teclar: +mount -cd + +. +:PROGRAM_INTRO_SPECIAL +Teclas especiais: +Estas sĆo as atribui‡äes das teclas por padrĆo. +Podem ser alteradas usando o mapeador de teclas. + +ALT-ENTER : Alterna entre o modo janela e tela-cheia. +ALT-PAUSE : Pausa o DOSBox. +CTRL-F1 : Executa o mapeador de teclas. +CTRL-F4 : Atualiza a cache dos diret˘rios de todas as unidades. +CTRL-ALT-F5 : Inicia/Para a grava‡Ćo de vĄdeo … um arquivo. +CTRL-F5 : Captura e salva a imagem da tela. +CTRL-F6 : Inicia/Para a grava‡Ćo do  udio … um arquivo wave. +CTRL-ALT-F7 : Inicia/Para a grava‡Ćo de comandos OPL. +CTRL-ALT-F8 : Inicia/Para a grava‡Ćo de comandos MIDI sem processar. +CTRL-F7 : Diminui o frameskip. +CTRL-F8 : Aumenta o frameskip. +CTRL-F9 : Encerra o DOSBox. +CTRL-F10 : Captura/Libera o mouse. +CTRL-F11 : Desacelera a emula‡Ćo (Diminui os ciclos do DOSBox). +CTRL-F12 : Acelera a emula‡Ćo (Aumenta os ciclos do DOSBox). +ALT-F12 : Desativa o limitador de velocidade (BotĆo turbo). + +. +:PROGRAM_BOOT_NOT_EXIST +O arquivo do disco de boot nĆo existe. Erro. + +. +:PROGRAM_BOOT_NOT_OPEN +NĆo foi possĄvel abrir o arquivo do disco de boot. Erro. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +O arquivo de imagem ‚ somente leitura! Poder  causar problemas. +. + +:PROGRAM_BOOT_PRINT_ERROR +Este comando inicia o DosBox a partir de um disco flexĄvel ou uma imagem no disco rĄgido. + +Para este comando, ‚ possĄvel especificar uma sucessĆo de disquetes intercambi veis +apertando Ctrl-F4, e -l especifica de qual unidade montada iniciar. Se +nĆo for especificada nenhuma letra, por padrĆo ser  a unidade A. +As unidades que podem ser iniciadas sĆo A, C, e D. Para iniciar do disco rĄgido +(C ou D), a imagem deve estar previamente montada usando o comando +IMGMOUNT. + +A sintaxe para este comando ‚: + +BOOT [diskimg1.img diskimg2.img] [-l unidade] + +. +:PROGRAM_BOOT_UNABLE +NĆo foi possĄvel iniciar a partir da unidade %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Abrindo arquivo de imagem: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +ImpossĄvel abrir %s +. +:PROGRAM_BOOT_BOOT +Iniciando pela unidade %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Cartucho PCjr encontrado, mas o computador nĆo ‚ PCjr. +. +:PROGRAM_BOOT_CART_LIST_CMDS +Commandos disponĄveis no cartucho PCjr: %s. +. +:PROGRAM_BOOT_CART_NO_CMDS +Os commandos do cartucho PCjr nĆo foram encontrados. +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE + necess rio especificar a letra da unidade onde a imagem ser  montada. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 + necess rio especificar o nŁmero da unidade (0 ou 3) onde a imagem ser  montada (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Para imagens de CD-ROM: imgmount letra-da-unidade local-da-imagem -t iso + +Para imagens de disco rĄgido:  necess rio especificar a geometria do disco rĄgido: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT letra-da-unidade local-da-imagem -tamanho bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +NĆo foi possĄvel carregar o arquivo de imagem. +Verifique se o caminho est  correto e a imagem acessĄvel. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +NĆo foi possĄvel extrair a geometria da unidade da imagem. +Utilize os parƒmetros -size bps,spc,hpc,cyl para especificar a geometria. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +O tipo "%s" nĆo ‚ suportado. Especifique "hdd", "floppy" ou "iso". + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +O formato "%s" nĆo ‚ suportado. Especifique "fat", "iso" ou "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE + preciso especificar o arquivo de imagem para montar. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +O arquivo de imagem nĆo foi encontrado. + +. +:PROGRAM_IMGMOUNT_MOUNT +Para montar diret˘rios, use o comando MOUNT, nĆo o comando IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +A unidade j  est  montada com essa letra. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +NĆo se pode criar uma unidade a partir de um arquivo. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Unidade nŁmero %d est  montada como %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +A imagem deve estar no servidor ou disco local. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +O uso de diversos arquivos ‚ apenas suportado por imagens cue/iso. + +. +:PROGRAM_KEYB_INFO +A codepage %i foi carregada + +. +:PROGRAM_KEYB_INFO_LAYOUT +Codepage %i carregado para o layout de teclado %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID da layout do teclado] [nŁmero da codepage] [arquivo da codepage] + +Exemplos: + KEYB: Mostra a codepage atualmente carregada. + KEYB br: Ativa o layout brasileiro (BR), usando uma codepage apropriada. + KEYB br 850: Ativa o layout brasileiro (BR), usando a codepage 850. + KEYB br 850 meucp.cpi: O mesmo que acima, mas usando o arquivo meucp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Layout do teclado %s carregado com codepage %i + +. +:PROGRAM_KEYB_FILENOTFOUND +O arquivo do teclado %s nĆo foi encontrado + + +. +:PROGRAM_KEYB_INVALIDFILE +O arquivo do teclado %s ‚ inv lido + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +NĆo h  layout em %s para a codepage %i + +. +:PROGRAM_KEYB_INVCPFILE +O arquivo de codepage para o layout %s est  faltando ou ‚ inv lido + + +. +:SHELL_ILLEGAL_PATH +Caminho inv lido. + +. +:SHELL_CMD_HELP +Para uma lista com todos os comandos suportados digite help /all . +Uma breve lista dos comandos mais utilizados: + +. +:SHELL_CMD_ECHO_ON +ECHO est  ativado. + +. +:SHELL_CMD_ECHO_OFF +ECHO est  desativado. + +. +:SHELL_ILLEGAL_SWITCH +Parƒmetro inv lido: %s. + +. +:SHELL_MISSING_PARAMETER +Um parƒmetro obrigat˘rio est  faltando. + +. +:SHELL_CMD_CHDIR_ERROR +NĆo foi possĄvel mudar para: %s. + +. +:SHELL_CMD_CHDIR_HINT +Para mudar de unidade digite %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +O nome da pasta tem mais de 8 caracteres e/ou cont‚m espa‡os. +Tente cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Vocˆ ainda est  na unidade Z:. Mude para uma unidade montada digitando C:. + +. +:SHELL_CMD_MKDIR_ERROR +NĆo foi possĄvel criar: %s. + +. +:SHELL_CMD_RMDIR_ERROR +NĆo foi possĄvel remover: %s. + +. +:SHELL_CMD_DEL_ERROR +NĆo foi possĄvel deletar: %s. + +. +:SHELL_SYNTAXERROR +A sintaxe do comando est  incorreta. + +. +:SHELL_CMD_SET_NOT_SET +A vari vel %s do ambiente nĆo est  definida. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +NĆo h  espa‡o suficiente no ambiente. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Falta o nome do arquivo. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Falta o nŁmero. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: NŁmero inv lido. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +NĆo foi proporcionado um r˘tulo para o comando GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: R˘tulo %s nĆo encontrado. + +. +:SHELL_CMD_FILE_NOT_FOUND +Arquivo %s nĆo encontrado. + +. +:SHELL_CMD_FILE_EXISTS +O arquivo %s j  existe. + +. +:SHELL_CMD_DIR_INTRO +Pasta de %s. + +. +:SHELL_CMD_DIR_BYTES_USED +%5d arquivo(s) %17s Bytes. + +. +:SHELL_CMD_DIR_BYTES_FREE +%5d pasta(s) %17s Bytes disponĄveis. + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +A unidade %c nĆo existe! +Primeiro ‚ preciso usar o comando mount. Digite intro ou intro mount para mais informa‡äes. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Comando inv lido: %s. + +. +:SHELL_CMD_PAUSE +Pressione qualquer tecla para continuar... + +. +:SHELL_CMD_PAUSE_HELP +Espera o apertar de uma tecla antes de continuar. + +. +:SHELL_CMD_COPY_FAILURE +Erro ao copiar: %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d arquivo(s) copiado(s). + +. +:SHELL_CMD_SUBST_NO_REMOVE +Remover uma unidade nĆo ‚ suportado. NĆo h  nada para fazer. + +. +:SHELL_CMD_SUBST_FAILURE +O SUBST falhou. Vocˆ cometeu um erro na linha de comando ou a unidade alvo j  est  em uso. +S˘ ‚ possĄvel usar o SUBST em unidades locais. + +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Bem-Vindo ao DOSBox v%-8s ş +ş ş +ş Para uma breve introdu‡Ćo, para novos usu rios, digite: INTRO ş +ş Para ver uma lista dos comandos suportados digite: HELP ş +ş ş +ş Se quiser mais velocidade, tente ctrl-F8 e ctrl-F12. ş +ş Para ativar o mapeador de teclas aperte ctrl-F1. ş +ş Para mais informa‡äes leia o arquivo README no diret˘rio do DOSBox.ş +ş ş + +. +:SHELL_STARTUP_CGA +ş O DOSBox suporta o modo CGA Composto. ş +ş Aperte (alt-)F11 para alterar as cores quando neste modo. ş +ş ş + +. +:SHELL_STARTUP_HERC +ş Aperte F11 para circular entre as cores branco, ambar, e verde. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Aperte alt-Pause para usar o depurador ou use o comando DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş DIVIRTA-SE! ş +ş Equipe DOSBox http://www.dosbox.com ş +ş Traduzido para Portuguˆs-BR por LexLeite / ableite@msn.com ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:SHELL_CMD_CHDIR_HELP +Exibe o nome da pasta atual ou faz altera‡äes nela. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [unidade:][caminho] +CHDIR [..] +CD [unidade:][caminho] +CD [..] + + .. Especifica que vocˆ quer ir para o diret˘rio acima. + +Escreva CD unidade: para mostrar o diret˘rio atual na unidade especificada. +Escreva CD sem parƒmetros para mostrar a unidade e o diret˘rio atual. + +. +:SHELL_CMD_CLS_HELP +Limpa a tela. + +. +:SHELL_CMD_DIR_HELP +Exibe uma lista de arquivos e subpastas em uma pasta. + +. +:SHELL_CMD_ECHO_HELP +Exibe mensagens ou ativa ou desativa o eco de comandos. + +. +:SHELL_CMD_EXIT_HELP +Sai do interpretador de comandos. + +. +:SHELL_CMD_HELP_HELP +Fornece informa‡äes de ajuda sobre os comandos. + +. +:SHELL_CMD_MKDIR_HELP +Cria um diret˘rio. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [unidade:][caminho] +MD [unidade:][caminho] + +. +:SHELL_CMD_RMDIR_HELP +Remove uma pasta. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [unidade:][caminho] +RD [unidade:][caminho] + +. +:SHELL_CMD_SET_HELP +Exibe, define ou remove vari veis de ambiente. + +. +:SHELL_CMD_IF_HELP +Realiza processamento condicional em arquivos em lotes. + +. +:SHELL_CMD_GOTO_HELP +Direciona o interpretador de comandos para uma linha identificada em um programa em lotes. + +. +:SHELL_CMD_SHIFT_HELP +Parƒmetros da linha de comando do shift da esquerda em um script de um programa em lotes. + +. +:SHELL_CMD_TYPE_HELP +Exibe o conteŁdo de um arquivo de texto. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [unidade:][caminho][nomedoarquivo] + +. +:SHELL_CMD_REM_HELP +Grava coment rios em arquivos de lotes. + +. +:SHELL_CMD_REM_HELP_LONG +REM [coment rio] + +. +:SHELL_CMD_NO_WILD +Esta ‚ uma versĆo simples do interpretador de comandos. Sem suporte a wildcards! + +. +:SHELL_CMD_RENAME_HELP +Altera o nome de um arquivo ou arquivos. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [unidade:][caminho]nomedoarquivo1 nomedoarquivo2. +REN [unidade:][caminho]nomedoarquivo1 nomedoarquivo2. + +Note que vocˆ nĆo pode especificar uma nova unidade ou caminho para o arquivo de destino. + +. +:SHELL_CMD_DELETE_HELP +Exclui um ou mais arquivos. + +. +:SHELL_CMD_COPY_HELP +Copia um ou mais arquivos para outro local. + +. +:SHELL_CMD_CALL_HELP +Chama um programa em lotes a partir de outro. + +. +:SHELL_CMD_SUBST_HELP +Associa um caminho a uma letra de unidade. + +. +:SHELL_CMD_LOADHIGH_HELP +Executa um programa com mais mem˘ria (requer xms=true,umb=true). + +. +:SHELL_CMD_CHOICE_HELP +Espera o apertar de uma tecla e estabelece o valor de ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:choices] [/N] [/S] texto + /C[:]choices - Especifica as teclas permitidas. PadrĆo: yn. + /N - NĆo mostrar as escolhas no final do prompt. + /S - Permite a sele‡Ćo de escolhas caixa-sensĄvel. + texto - Texto a ser mostrado como prompt. + +. +:SHELL_CMD_ATTRIB_HELP +NĆo faz nada. Fornecido apenas para compatibilidade. + +. +:SHELL_CMD_PATH_HELP +Fornecido apenas para compatibilidade. + +. +:SHELL_CMD_VER_HELP +Ver e ajustar a versĆo relatada do DOS. + +. +:SHELL_CMD_VER_VER +DOSBox versĆo %s. VersĆo relatada do DOS %d.%d. + +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pt-br/version.txt dosbox-staging-0.77.0/contrib/old-translations/pt-br/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/pt-br/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pt-br/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Portuguese 0.74 diff -Nru dosbox-staging-0.76.0/contrib/old-translations/pt-br/zmbv/LeiaMe.txt dosbox-staging-0.77.0/contrib/old-translations/pt-br/zmbv/LeiaMe.txt --- dosbox-staging-0.76.0/contrib/old-translations/pt-br/zmbv/LeiaMe.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/pt-br/zmbv/LeiaMe.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,36 @@ +Desde a versĂŁo 0.65, DOSBox permite criar vĂ­deos do que estĂĄ passando na tela. + +Para gravar um vĂ­deo, aperte CTRL-ALT-F5. +Para parar/finalizar a gravação, volte a apertar CTRL-ALT-F5. + +Para reproduzir o vĂ­deo gravado ĂŠ necessĂĄrio ter instalado um reprodutor que +possa trabalhar com o codec ZMBV. UsuĂĄrios do Windows podem encontrar esse codec +no menu DOSBox em Inciar>Todos os Programas. Para outros sistemas operacionais, +deve-se usar um reprodutor que use a biblioteca ffmpeg. + + +Perguntas FreqĂźentes: +P: Durante a reprodução o som sai com atraso. +R: Verifique as propriedades de vĂ­deo para ver se a frequĂŞncia de atualização + da tela estĂĄ por menos de 70hz. Tente reproduzir o vĂ­deo no VirtualDub + (http://virtualdub.sf.net) + +P: Por que o vĂ­deo resultante se consiste em vĂĄrios arquivos? +R: Cada vez que o jogo altera sua resolução, o DOSBox cria um novo arquivo de vĂ­deo, + pois cada arquivo sĂł pode ter uma resolução. + +P: Durante uma gravação, posso configurar o DOSBox para um nĂşmero de ciclos alĂŠm + do que meu PC pode suportar? +R: Sim. Durante a gravação, a velocidade do jogo poderĂĄ ser reduzida. PorĂŠm isso + nĂŁo afetarĂĄ o vĂ­deo resultante e ele se reproduzirĂĄ corretamente. + +P: CTRL-ALT-F5 alterna para o console no Linux. +R: 1. Inicie o DOSBox assim: dosbox -startmapper + 2. Clique em "Video", clique em "Add" + 3. Aperte a tecla que vocĂŞ deseja (por exemplo, scroll lock ou printscreen) + 4. Clique em "Exit". + 5. Agora serĂĄ possĂ­vel gravar vĂ­deos apertando qualquer que seja a tecla + programada. + +Q: Estou usando o Windows 64bit e as cores estĂŁo erradas +A: Olhe aqui: http://vogons.zetafleet.com/viewtopic.php?t=12133 (em ingles) diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/ru/DOSBox 0.74 Manual RUS.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/ru/DOSBox 0.74 Manual RUS.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/ru/DOSBox 0.74 Manual RUS.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/ru/DOSBox 0.74 Manual RUS.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1525 @@ +Руководство DOSBox v0.74 (всогда используйте самую свежую версию с www.dosbox.com) + +Перевод: Arik (www.gh.gameslife.ru) +Обновление перевода для версии 0.74: Alexander Katz (skatz1971@gmail.com) + + +========== +Замечание: +========== + +Хотя мы и надеемся, что однажды DOSBox будет запускать всо программы, +кОгда-НийО сделанные для PC... пОка это всё ещё но так. +В настоящее время, DOSBox запущенный на Пашино пОсНодногО поколения будет +приблизительно эквивалентен PC кНасса Pentium I. DOSBox может быть настроен +для Сапуска широкого круга DOS игр, от классических CGA/Tandy/PCjr +Đ´Đž игр эпохи Quake. + + +=========== +Содержание: +=========== +1. Быстрое начало +2. Начало (ЧАВО) +3. Параметры кОПанднОК строки +4. Внутренние программы +5. Специальные кНавиши +6. Джойстик/гоКПпад +7. Переназначение кНавиш +8. Клавиатурная раскладка +9. Сетевая игра через прямое кабельное подключение +10. Как ускорить/замедлить DOSBox +11. Рошонио проблем +12. Окно состояния DOSBox +13. Настроечный файл +14. Языковой файл +15. Сборка собственной версии DOSBox +16. Особая благодарность +17. Связь + + +================== +1. Быстрое начало: +================== + +Для получения краткого введения напечатайте INTRO в DOSBox. +Важно, чтобы вы ОсвОиНи идею монтирования - DOSBox но делает автоматически +никаких дискОв (иНи их подразделов) доступными для эмуляции. +Смотрите вопрос в ЧАВО "ĐĄ чего начать?" Đ° также Описанио команды +MOUNT (раздел 4). +Если ваша игра расположена на компакт диско, можете воспользоваться следующей +инструкцией: http://vogons.zetafleet.com/viewtopic.php?t=8933 + +================= +2. Начало (ЧАВО): +================= + +НАЧАЛО: ĐĄ чего начать? +АВТОМАТИЗАЦИЯ: ĐŻ дОНМон каждый раз писать эти команды монтирования? +ПОЛНЫЙ ЭКРАН: Как переключится на полный экран? +CD-ROM: Мой CD-ROM но работает. +CD-ROM: Игра/приложение но может найти CD-ROM. +МЫШЬ: Мышь но работает. +ЗВУК: Нет Свука. +ЗВУК: Какое СвукОвОо МоНоСО эмулирует DOSBox? +ЗВУК: Звук заикается иНи Свуки растянутые/непонятные. +КЛАВИАТУРА: ĐŻ но ПОгу напечатать \ иНи : в DOSBox. +КЛАВИАТУРА: Правый Shift и "\" но работают в DOSBox. (только для Windows) +КЛАВИАТУРА: Клавиатура тормозит. +УПРАВЛЕНИЕ: Персонаж/курсор/указатель мыши всо время движется в ОднОП + направлении! +СКОРОСТЬ: Игра/приложение работает сНишкОП ПодНоннО/сНишкОП быстро! +ВЫЛЕТ: Игра/приложение вообще но работает/вылетает! +ВЫЛЕТ: DOSBox вылетает при Сапуско! +ИГРА: ĐŁ ПОоК игры на двиМко Build (Duke3D/Blood/Shadow Warrior) есть + проблемы. +БЕЗОПАСНОСТЬ: Может DOSBox нанести ущерб ПОоПу компьютеру? +НАСТРОЙКИ: ĐŻ хочу поменять настройки DOSBox. +ПОМОЩЬ: Замечательное руководство, нО я так и но получил ответа. + + + +НАЧАЛО: ĐĄ чего начать? + В начале при Сапуско вы видите в кОПанднОК строке Z:\> вместо C:\>. + Вам нуМнО сделать ваши директории доступными как диски в DOSBox, используя + кОПанду "mount" (монтирование). Например, в Windows "mount C D:\GAMES" даст ваП + диск C в DOSBox указывающий на вашу директорию D:\GAMES в Windows + (предварительно созданную). В Linux, "mount c /home/username" даст C в + DOSBox который указывает на /home/username в Linux. + Чтобы перейти на диск, смонтированный, как укаСанО выше, наберите "C:". + Если всо прошло нормально, DOSBox отобразит строчку "C:\>". + + +АВТОМАТИЗАЦИЯ: ĐŻ дОНМон каждый раз писать эти команды монтирования? + В настроечном файле DOSBox есть секция [autoexec]. Команды, представленные + здесь, исполняются, кОгда запускается DOSBox, так что вы можете + использовать эту секцию для монтирования. ĐĄĐź. раздел 13 "Настроечный файл") + + +ПОЛНЫЙ ЭКРАН: Как переключится на полный экран? + Нажмите alt-enter. Альтернатива: Отредактируйте настроечный файл DOSBox, + поменяв опцию fullscreen=false на fullscreen=true. Если "полный экран" на + ваш взгляд выглядит неверно, используйте опции fullresolution, output и + aspect в настроечном файле DOSBox. Чтобы вернутся иС полноэкранного + режима: Нажмите снОва alt-enter. + + +CD-ROM: Мой CD-ROM но работает. + Чтобы монтировать CD-ROM в DOSBox ваП надО указать некоторые дополнительные + опции при монтировании. + Чтобы включить поддержку CD-ROM (включает MSCDEX) в (Windows): + - mount d f:\ -t cdrom + в Linux + - mount d /media/cdrom -t cdrom + В некоторых случаях вы можете захотеть использовать другой интерфейс CD-ROM, + например, осНи но работает CD-аудиО. + Чтобы включить поддержку SDL (но включает низкоуровневый доступ Đş CD!): + - mount d f:\ -t cdrom -usecd 0 -noioctl + Чтобы включить доступ ioctl, используя цифровое извлечений аудиО для + CD-аудиО (только Windows, пОНоСнО пОд Vista): + - mount d f:\ -t cdrom -ioctl_dx + Чтобы включить доступ ioctl, используя MCI для CD-аудиО (только Windows): + - mount d f:\ -t cdrom -ioctl_mci + Чтобы принудительно включить доступ только через ioctl (только Windows): + - mount d f:\ -t cdrom -ioctl_dio + Чтобы включить низкоуровневую поддержку aspi (Win98 с установленным + aspi-layer): + - mount d f:\ -t cdrom -aspi + + пояснение: - d йуква диска, которую получите в DOSBox ('d' - наилучший + выбор, но меняйте огО) + - f:\ размещение CD-ROM на вашоП PC. В большинстве случаев + это будет d:\ иНи e:\ + - 0 номер CD-ROM привода, определяется кОПандОК "mount -cd" + (Отметьте, что даннОо значение необходимо только при + использовании SDL для CD-аудиО, для прочих + режимов - игнорируется.) + Смотрите также следующий вопрос: Игра/приложение но может найти CD-ROM. + + +CD-ROM: Игра/приложение но может найти CD-ROM. + Убедитесь, что смонтировали CD-ROM с -t cdrom параметром, это задействует + интерфейс MSCDEX, требующийся DOS играм для взаимодействия с CD-ROM'аПи. + ТакМо попробуйте добавить корректную метку (-label МЕТКА) Đş кОПандо + монтирования, гдо МЕТКА - это метка компакт-диска (volume ID). + Под Windows вы можете указать -ioctl, -aspi иНи -noioctl. Обратитесь Đş + описанию команды mount в разделе 4 "Внутренние программы"Са разъяснением их + значения и ОписаниоП дополнительных возможностей для аудиО-CD: -ioctl_dx, + ioctl_mci, ioctl_dio. + + Попробуйте создать образ CD-ROM (желательно пару CUE/BIN) и используйте + внутреннюю утилиту DOSBox IMGMOUNT, чтобы смонтировать образ (файл CUE). + Это обеспечит очень хорошую низкоуровневую поддержку CD-ROM на любой + операционной системе. + + +МЫШЬ: Мышь но работает. + Обычно DOSBox определяет, кОгда игра использует мышиное управление. Если вы + кликните на экран, Она закрепится (будет двигаться только в Окно DosBox) и + будет работать. ИнОгда определение мыши DOSBox'ОП но срабатывает в + определенных играх. В этом случае Вы должны вручную закрепить мышь, + используя ctrl-F10. + + +ЗВУК: Нет Свука. + Убедитесь, что Свук корректно настроен в игре. Это может быть сдоНанО вО + время установки игры иНи с помощью программ setup/setsound, поставляемых + с игрой. Вначале посмотрите, нет Ни пункта autodetection (автоопределение). + Если такового нет, попробуйте выбрать Soundblaster иНи Soundblaster 16 с + настройками пО умолчанию "address=220 irq=7 dma=1" (и инОгда "highdma=5"). + Вы также можете выбрать Sound Canvas/SCC/MPU-401/General MIDI/Wave Blaster + с параметрами "address=330 IRQ=2" в качестве музыкального устройства. + Параметры эмулируемых звуковых карт могут быть изменены в настроечном + файле DosBox. + Если Свук но появился, поставьте core (ядро) на normal в настроечном файле + и используйте ниСкио значения cycles (инструкций), такие как cycles=2000. + ТакМо убедитесь, что ваша реальная звуковая система спОсОйна выводить Свук. + В некоторых случаях может быть пОНоСнО использовать другое эмулируемое + устройство, например SoundBlaster Pro (sbtype=sbpro1 в настроечном файле + DOSBox) иНи Gravis Ultrasound (gus=true). + + +ЗВУК: Какое СвукОвОо МоНоСО эмулирует DOSBox? + DOSBox эмулирует несколько существующих звуковых устройств: + - Внутренний динаПик ПК/Зуммер + Этот эмулятор включает и генератор тона и несколько форм цифрового + СвукОвОгО вывода через внутренний динаПик. + - Creative CMS/Gameblaster + Это первая карта, выпущенная Creative Labs(R). По умолчанию Она + настраивается на адрес 220. По умолчанию отключен. + - Tandy 3 voice + Эмуляция этого СвукОвОгО МоНоСа готова Са исключением noise channel. + Noise channel но очень хорошо задокументирован и, пО существу, есть только + предположение как Он дОНМон работать. По умолчанию отключен. + - Tandy DAC + для некоторых игр может потребоваться отключения эмуляции SoundBlaster + (sbtype=none) для лучшей поддержки Свука Tandy DAC. Не забудьте установить + sbtype обратно в sb16, осНи вы больше но используете Свук Tandy. + - Adlib + Этот эмулятор почти безупречный и включает способность Adlib проигрывать + оцифрованный Свук. Настраивается на адрес 220 (Đ° также на 388). + - SoundBlaster 16 / SoundBlaster Pro I & II / SoundBlaster I & II + По-умолчанию DOSBox использует Soundblaster 16 + 16-bit'ный стерео Свук. Вы можете выбрать другую версию SoundBlaster + в настроечном файле DOSBox. Музыка в AWE32 но эмулируется, т.Đş. вы можете + использовать вместо неё MPU-401 (сП. ниМо). + - Disney Soundsource + Использует порт принтера. Это СвукОвОо устройство выводит только цифровой + Свук. Настраивается на LPT1. + - Gravis Ultrasound + Эмуляция устройства йНиСка Đş завершению, хотя MIDI возможности были + исключены с тех пор, как MPU-401 эмулируется другим кОдОП. Для музыки + в Gravis вы должны установить драйвера Gravis внутри DOSBox. + По умолчанию отключен. + - MPU-401 + MIDI passthrough interface также эмулируется. Этот метод вывода Свука + будет работать только при использовании с вношниП устройством эмулятором. + Каждый экземпляр Windows XP/Vista/7 и MAC OS имеет встроенный эмулятор + совместимый с Sound Canvas/SCC/General Standard/General MIDI/Wave Blaster. + Для совместимости с устройствами Roland LAPC/CM-32L/MT-32 нуМон другой + эмулятор. + + +ЗВУК: Звук заикается иНи Свуки растянутые/непонятные. + Вы используете сНишкОП ПнОгО ресурсов процессора, чтобы работать с текущей + скоростью. Вы можете сделать следующее: замедлить инструкции, пропускать + кадры, уменьшить частоту дискретизации соответствующего СвукОвОгО + устройства, увеличить предбуфер (prebuffer). + ĐĄĐź. раздел 13 "Настроечный файл". + Если вы используете cycles=max иНи =auto, убедитесь что нет мешающих + фоновых процессов! (ОсОйоннО осНи Они обращаются Đş жесткому диску) + ТакМо обратитесь Đş разделу 10 "Как ускорить/замедлить DOSBox". + + +КЛАВИАТУРА: ĐŻ но ПОгу напечатать \ иНи : в DOSBox. + Это может произойти в различных ситуациях, например, осНи клавиатурная + раскладка вашогО компьютера но имеет соответствующей DOS раскладки + (иНи была неверно определена), иНи файл переназначения кНавиш неверен. + Возможные решения проблемы: + 1. Используйте / вместо \, иНи ALT-58 для : и ALT-92 для \. + 2. Измените раскладку клавиатуры DOS'Đ° + (сП. раздел 8 "Клавиатурная раскладка"). + 3. Добавьте команды, которые хотите выполнить в раздел [autoexec] + настроечного файла DOSBox. + 4. Откройте настроечный файл DOSBox и измените параметр usescancodes. + 5. Переключите клавиатурную раскладку вашоК операционной системы. + + Заметьте, что осНи раскладку вашогО компьютера определить но удалось иНи + keyboardlayout установлен в none в настроечном файле DOSBox, используется + стандартная раскладка US. В этом случае попробуйте кНавиши рядом с "enter" + для кНавиши \ (обратная косая), Đ° для кНавиши : (двоеточие) используйте + shift и кНавиши ПоМду "enter" и"L". + + +КЛАВИАТУРА: Правый Shift и "\" но работают в DOSBox. (только для Windows) + Это может произойти, осНи Windows считает, что у ваП подключено йОНоо ОднОК + клавиатуры, кОгда вы используете нокОо устройство дистанционного + управления. + Для проверки даннОК ситуации запустите cmd.exe, перейдите в папку, + в которой установлен DOSBox, и введите команды: + set sdl_videodriver=windib + dosbox.exe + проверьте стала Ни клавиатура работать правильно. Так как windib - режим + относительно медленный, лучше использовать ОднО иС двух решений, + приведённых в http://vogons.zetafleet.com/viewtopic.php?t=24072 + + +КЛАВИАТУРА: Клавиатура тормозит. + Уменьшите настройки приоритета в настроечном файле DOSBox, например, + выставив "priority=normal,normal". Вы можете также попробовать уменьшить + число инструкций. (Начните с фиксированного числа инструкций, + скаМоП cycles=10000). + + +УПРАВЛЕНИЕ: Персонаж/курсор/указатель мыши всо время движется в ОднОП + направлении! + Посмотрите, продолжается Ни это, осНи вы отключаете джойстик, выставляя + joysticktype=none в секции [joystick] вашогО настроечного файла DOSBox. + Можете также попробовать отсоединить всо джойстики/геймпады физически. + Если вы хотите использовать joystick в игре, попробуйте настройки + timed=false + и убедитесь, что джойстик откалиброван (и в вашоК ОС, и в игре иНи + настройке игры). + + +СКОРОСТЬ: Игра/приложение работает сНишкОП ПодНоннО/сНишкОП быстро! + Обратитесь Đş разделу 10 "Как ускорить/замедлить DOSBox" Са дальнейшими + сведениями. + + +ВЫЛЕТ: Игра/приложение вообще но работает/вылетает! + ĐĄĐź. раздел 11 "Рошонио проблем" + + +ВЫЛЕТ: DOSBox вылетает при Сапуско! + ĐĄĐź. раздел 11 "Рошонио проблем" + + +ИГРА: ĐŁ ПОоК игры на двиМко Build (Duke3D/Blood/Shadow Warrior) есть проблемы. + Прежде всогО, попытайтесь найти версию игры портированную пОд вашу систему. + Это даст ваП большие возможности. Чтобы решить проблемы с графикой высокого + разрешения в DOSBox, откройте настроечный файл DOSBox и поищите в ноП + строчку machine=svga_s3. Замените svga_s3 на vesa_nolfb + Замените memsize=16 на memsize=63 + + +БЕЗОПАСНОСТЬ: Может DOSBox нанести ущерб ПОоПу компьютеру? + DOSBox но может причинить вред вашоПу компьютеру, больший, чем любые другие + ресурсоемкие программы. + Увеличение cycles (числа инструкций) но разгоняет ваш реальный CPU. + Установка для cycles сНишкОП высоких значений даст негативный эффект + программам, запущенным внутри DOSBox. + + +НАСТРОЙКИ: ĐŻ хочу поменять настройки DOSBox. + ĐĄĐź. раздел 13 "Настроечный файл" + + +ПОМОЩЬ: Замечательное руководство, нО я так и но получил ответа. + Для изучения прочих вопросов читайте даНоо даннОо руководство. + Вы также можете обратиться Đş инструкциям, размещённым в + http://vogons.zetafleet.com/viewforum.php?f=39 + Wiki-энциклопедии DOSBox http://www.dosbox.com/wiki/ + иНи сайту/форуму http://www.dosbox.com + + + +=============================== +3. Параметры кОПанднОК строки: +=============================== + +Обзор параметров, которые вы можете задать для DOSBox. Хотя в больштнстве +случаев легче использовать вместо них настроечный файл DOSBox. +ĐĄĐź. раздел 13 "Настроечный файл" + +Чтобы задействовать параметр кОПанднОК строки: +(Windows) откройте cmd.exe иНи command.com иНи исправьте ярлык для dosbox.exe +(Linux) используйте консоль +(MAC OS X) запустите terminal.app и прейдите в: + /applications/dosbox.app/contents/macos/dosbox + +Пользователи Windows для этого должны открыть cmd.exe иНи command.com иНи +отредактировать ярлык Đş dosbox.exe. +Опции доступны для всех операционных систем, осНи в их Описании но скаСанО +иначе: + +dosbox [name] [-exit] [-c command] [-fullscreen] [-userconf] + [-conf congfigfilelocation] [-lang languagefilelocation] + [-machine machine type] [-noconsole] [-startmapper] [-noautoexec] + [-securemode] [-scaler scaler | -forcescaler scaler] [-version] + [-socket socket] + +dosbox -version +dosbox -editconf program +dosbox -opencaptures program +dosbox -printconf +dosbox -eraseconf +dosbox -erasemapper + + name + Если "name" директория Она будет монтирована как диск C:. + Если "name" исполняемый файл, будет монтирована директория с "name" как + диск C: и этот файл будет запущен. + + -exit + DOSBox закроется, кОгда DOS приложение "name" закончит работу. + + -c command + Выполняет определенные команды Đ´Đž Сапуска "name". Может быть выполнено + несколько кОПанд. Каждая кОПанда дОНМна начинаться с параметра "-c". + Команда может быть: внутренней программой, DOS кОПандОК иНи исполняемым + файлом на смонтированном диско. + + -fullscreen + Стартует DOSBox в полноэкранном режиме. + + -userconf + Запускает DOSBox с настроечный файлом иС профиля пользователя. Может + использоваться совместно с множественными параметрами -conf parameters, + нО -userconf всогда загружается перед ниПи. + + -conf configfilelocation + Запускает DOSBox с опциями, назначенными в файле настройки + "configfilelocation". Может быть несколько -conf опций. + Смотрите раздел 13 для подробностей. + + -lang languagefilelocation + Запускает DOSBox, используя язык, определенный в языковом файле + "languagefilelocation". ĐĄĐź. подробнее в разделе 14. + + -machine machinetype + Задает DOSBox эмулировать конкретный тип машины. Доступны для выбора: + hercules, cga, ega, pcjr, tandy, svga_s3 (пО-умолчанию), Đ° также + дополнительные svga карты, перечисленные в комментариях Đş настроечному + файлу DOSBox. + svga_s3 также включает эмуляцию vesa. + Для некоторых видеоэффектов VGA ПОМнО указать тип vgaonly, помните, + что это отключит возможности svga и может быть заметно ПодНонноо иС-Са + большей точности эмуляции. + Тип машины влияет на видеокарту и доступные звуковые карты. + + -noconsole (Только Windows) + Запускает DOSBox йоС Окна состояния. Вывод будет перенаправлен в + stdout.txt и stderr.txt + + -startmapper + Войти в режим назначения кНавиш непосредственно при старте. Полезно для + тех, у кОгО проблемы с клавиатурой. + + -noautoexec + Пропустить секцию [autoexec] загруженного настроечного файла. + + -securemode + ТОМо что и -noautoexec, нО добавляеит "config.com -securemode" в конец + AUTOEXEC.BAT (который, в свою очередь, запрещает любые изменения + в монтируемых дисках внутри DOSBox). + + -scaler scaler + Использует метод масштабирования (scaler) определенный параметром + "scaler". + Смотрите настроечный файл DOSBox для списка доступных методов + масштабирования. + + -forcescaler scaler + Подобен параметру -scaler, нО пытается принудительно применить указанный + метод масштабирования, даМо осНи Он может но подойти (пО размеру Окна). + + -version + Вывести информацию Đž версии и выйти. Полезно для оболочек. + + -editconf program + Вызывает программу, передав оК настроечный файл в качестве первого + параметра. Вы можете задать эту кОПанду несколько раз. В этом случае + вторая программа будет вызвана, осНи первая но запустится. + + -opencaptures program + Вызывает программу, передав оК путь Đş папко скриншотов в качестве + первого параметра. + + -printconf + Выводит расположение настроечного файла пО умолчанию. + + -eraseconf + -resetconf + Удаляет настроечный файл пО умолчанию. + + -erasemapper + -resetmapper + Удаляет файл переназначения кНавиш, используемый конфигурацией + пО-умолчанию. + + -socket + передает номер сокета модулю эмуляции нуль-ПОдоПа. + ĐĄĐź. раздел 9 "Прямое кабельное подключение" + + +Замечание: Если имя/кОПанда/настроечный файл/языковой файл содержит пробелы + внутри, пишите всо имя/кОПанда/настроечный файл/языковой файл в кавычках + ("кОПанда иНи имя файла"). Если ваП необходимо использовать кавычки внутри + кавычек (обычно в параметре -c и монтировании): + Пользователи Windows и OS/2 могут писать одинарные кавычки внутри двойных. + Остальные - комбинацию сО сНошоП (\) внутри двойных кавычек. + Windows: -c "mount c 'c:\program files\'" + Linux: -c "mount c \"/tmp/name with space\"" + + +Достаточно необычный пример, просто для демонстрации (Windows): +dosbox D:\folder\file.exe -c "MOUNT Y H:\MyFolder" + Будет смонтирована D:\folder как C:\ и запущен file.exe. + Но Đ´Đž этого будет смонтирована H:\MyFolder как диск Y. + + +В Windows вы также можете перетащить папки/файлы на исполняемый файл dosbox. + + + +======================== +4. Внутренние программы: +======================== + +DOSBox поддерживает большинство кОПанд DOS имеющихся в command.com. +Для получения списка внутренних кОПанд напишите "HELP" в кОПанднОК строке. + +ТакМо в дОпОНнонио, доступны следующие команды: + +MOUNT "Буква эмулируемого диска" "Реальный диск иНи директория" + [-t type] [-aspi] [-ioctl] [-noioctl] [-usecd number] [-size drivesize] + [-label drivelabel] [-freesize size_in_mb] + [-freesize size_in_kb (floppies)] +MOUNT -cd +MOUNT -u "Буква эмулируемого диска" + + Программа для монтирования локальных директорий как дискОв внутри DOSBox. + + "Буква эмулируемого диска" + Буква диска внутри dosbox (например, C). + + "Реальный диск (йуква, используется обычно для CD-ROM в Windows) иНи директория" + Локальная директория, которую вы хотите видеть внутри dosbox. + + -t type + Тип монтируемой директории. + Поддерживаются: dir (пО-умолчанию), floppy, cdrom. + + -size drivesize + (только для опытных пользователей) + Устанавливает размер диска, гдо размер диска задается пО форме + "bps,spc,tcl,fcl": + bps: байт в секторе, пО-умолчанию 512 для постоянных дискОв и + 2048 для CD-ROM дискОв + spc: секторов в кластере, обычно ПоМду 1 и 127 + tcl: всогО кластеров, ПоМду 1 и 65534 + fcl: всогО свОйОднО кластеров, ПоМду 1 и tcl + + -freesize size_in_mb | size_in_kb + Устанавливает величину свОйОднОгО места доступного на диско в мегабайтах + (постоянные диски) иНи килобайтах (дискеты). + Это упрощенная версия -size. + + -label drivelabel + Устанавливает имя диска как "drivelabel". Необходимо некоторым системам, + осНи имя диска но читается корректно (пОНоСнО, кОгда программа но может + найти свОК CD-ROM). Если но укаСанО имя и но включена поддержка на + ниСкОП уровне (но указаны -usecd # и/иНи -aspi параметры иНи укаСанО + -noioctl): + Для Windows: имя берется с "реального диска". + Для Linux: Имя ставиться как NO_LABEL. + + Если вы укажете имя, это имя будет сохраняться, пОка диск смонтирован. + Оно но будет обновляться!! + + -aspi + Указывает использовать aspi layer. Доступно только осНи монтируется + cdrom пОд Windows с ASPI-Layer. + + -ioctl (автоматический выбор интерфейса CD-аудиО) + -ioctl_dx (используется цифровое извлечение аудиО для CD-аудиО) + -ioctl_dio (используется ioctl для CD-аудиО) + -ioctl_mci (используется MCI для CD-аудиО) + Указывает использовать ioctl команды. Доступно только осНи монтируется + CD-ROM пОд Windows, который поддерживает их (Win2000/XP/NT). + Варианты различаются только спОсОйОП работы с CD-аудиО, + предпочтительно использовать -ioctl_dio (наименьшая загрузка процессора), + нО это может работать но на всех системах, тогда следует использовать + -ioctl_dx (иНи -ioctl_mci). + + -noioctl + Указывает использовать SDL CD-ROM layer. Работает на всех системах. + + -usecd number + Указывает использовать SDL поддержку CD-ROM для диска с номером. + Номер может быть получен с параметром -cd. Доступно на всех системах. + + Доступно на всех системах, пОд Windows нуМнО указать параметр -noioctl + чтобы задействовать -usecd. + Позволяет указать диск, который будет использоваться SDL. Используйте, + осНи при использовании SDL интерфейса монтируется неверный CD-ROM диск + (иНи вообще но монтируется). + Номер может быть получен кОПандОК "MOUNT -cd". + + -cd + Отображает всо CD-ROM диски, обнаруженные SDL, и их номера. + ĐĄĐź. выше Описанио параметра -usecd. + + -u + Удаляет смонтированный диск. Не работает для Z:\. + + Замечание: Возможно смонтировать локальную директорию, как cdrom, нО + аппаратная поддержка в этом случае отсутствует. + + + Собственно MOUNT позволяет ваП соединить реальную аппаратную часть с + DOSBox'ОвОК эмуляцией PC. Так MOUNT C C:\GAMES говорит DOSBox использовать + директорию C:\GAMES как диск C: в DOSBox. MOUNT C E:\SomeFolde говорит + DOSBox использовать директорию E:\SomeFolder как диск C: in DOSBox. + + Монтирование всогО диска C кОПандОК MOUNT C C:\ НЕ рекомендуется! ТО Мо + относится и Đş другим дискаП, кроме CD-ROM (так как это устройства + "только для чтения"). + В противном случае при вОСникнОвонии Ошийки в DOSBox, вы можете потерять + всо ваши файлы. ТакМо никОгда но монтируйте папки "Windows" иНи + "Program Files" (и их пОдпапки) в системах Windows Vista/7, так как DOSBox + в таком случае может работать некорректно (иНи прекратить корректную работу + в дальнейшем). Рекомендуется положить всо ваши приложения/игры в простую + папку (например, c:\dosgames) и монтировать оо. + + Вы должны всогда устанавливать ваши игры внутри DOSBox. + И, осНи ваша игра расположена на CD, вы должны (пОсНо установки!) смонтировать + папку как жёсткий диск и как устройство как CD-ROM. + Жёсткий диск всогда дОНМон монтироваться как c + CD-ROM всогда дОНМон монтироваться как d + Дисковод (для гибких дискОв) всогда дОНМон монтироваться как a (иНи b) + + Простые примеры команды MOUNT (Windows): + + 1. Чтобы смонтировать папку как жёсткий диск: + mount c d:\dosgames + + 2. Чтобы смонтировать устройство CD-ROM E как устройство CD-ROM D в DOSBox: + mount d e:\ -t cdrom + + 3. Чтобы смонтировать устройство a: как дискету: + mount a a:\ -t floppy + + Расширенные примеры команды (Windows): + + 4. Чтобы смонтировать жёсткий диск с ~870 Мб свОйОднОгО места (простая версия): + mount c d:\dosgames -freesize 870 + + 5. Чтобы смонтировать устройство с ~870 Мб свОйОднОгО места (пОНнОо управление): + mount c d:\dosgames -size 512,127,16513,13500 + + 6. Чтобы смонтировать c:\dosgames\floppy как дискету: + mount a c:\dosgames\floppy -t floppy + + + Прочие примеры команды MOUNT: + + 7. Чтобы смонтировать устройство CD-ROM /media/cdrom как устройство + CD-ROM D в DOSBox: + mount d /media/cdrom -t cdrom -usecd 0 + + 8. Чтобы смонтировать /home/user/dosgames как диск C в DOSBox: + mount c /home/user/dosgames + + 9. Чтобы смонтировать директорию, иС которой был запущен DOSBox + как диск C в DOSBox: + mount c . + (Обратите вниПанио на ".", что означает директорию в которой был + запущен DOSBox, но используйте её на Windows Vista/7, осНи вы + установили DOSBox в папку "Program Files") + + Если вы хотите смонтировать образ CD иНи дискеты, смотрите Описанио команды + IMGMOUNT. + MOUNT также может работать с образами, нО для этого требуется использование + сторонних программ, например (Ойо бесплатны): + - Daemon Tools Lite (для образов CD), + - Virtual Floppy Drive (для образов дискет). + Хотя IMGMOUNT может дать большую совместимость. + + +MEM + Программа для отображения величины свОйОднОК памяти. + + +VER +VER set major_version [minor_version] + Отображает текущую версию DOSBox и сообщаемую программам версию DOS + (при вызове йоС параметров). + Вы можете изменить сообщаемую версию DOS при помощи параметра "set", + например "VER set 6 22" заставит DOSBox сообщать версию DOS 6.22. + + +CONFIG -writeconf filelocation +CONFIG -writelang filelocation +CONFIG -securemode +CONFIG -set "секция свойство=значение" +CONFIG -get "секция свойство" + + CONFIG может быть использован, чтобы менять иНи узнавать различные настроки + для DOSBox вО время работы. Она может сохранить текущие настройки и языковые + строки на диск. Информация ОйО всех возможных секциях и свойствах может быть + наКдона в разделе 13 "Настроечный файл". + + -writeconf filelocation + Записать текущие конфигурационные настройки в файл в укаСаннОП месте. + "filelocation" располагается на реальном диско, Đ° но на смонтированном + диско в DOSBox. + Настроечный файл управляет различными настройками DOSBox: + Размер эмулируемой памяти, эмулируемые звуковые карты и другие вещи. + Он позволяет получить доступ Đş AUTOEXEC.BAT. + ĐĄĐź. раздел 13 "Настроечный файл". + + -writelang filelocation + Записать текущие языковые настройки в файла в укаСаннОП месте. + "filelocation" располагается на реальном диско, Đ° но на смонтированном + диско в DOSBox. + Языковой файл определяет всо видимые сообщения внутренних кОПанд + и внутренней системы DOS. + ĐĄĐź. раздел 14 "Языковой файл". + + -securemode + Переключает DOSBox в "защищённый" режим. В этом режиме внутренние команды + MOUNT, IMGMOUNT и BOOT но работают. ТакМо в этом режиме нельзя создать + новый настроечный файл иНи языковой. + (Предупреждение: отменить этот режим ПОМнО только перезапустив DOSBox.) + + -set "секция свойство=значение" + CONFIG попытается установить свойству нОвОо значение. На данный момент + CONFIG может но сообщать, выполнилась Ни кОПанда успошнО иНи нет. + + -get "секция свойство" + Текущее значение свойства выводится и сохраняется в переменной окружения + %CONFIG%. Она может быть использована при работе с пакетными + файлами (bat). + + И "-set" и "-get" работают иС пакетных файлов и могут быть использованы для + установки своих собственных настроек для каМдОК игры. Хотя может оказаться + проще использовать раздельные настроечные файлы для каМдОК игры. + + Примеры: + 1. Для создания настроечного файла в директории c:\dosgames: + config -writeconf c:\dosgames\dosbox.conf + 2. Для установки числа инструкций CPU на 10000: + config -set "cpu cycles=10000" + 3. Для отключения эмуляции ems памяти: + config -set "dos ems=off" + 4. Для проверки, какОо ядро cpu используется. + config -get "cpu core" + + +LOADFIX [-size] [program] [program-parameters] +LOADFIX -f + Программа для сокращения количества доступной обычной памяти. Полезна для + старых программ, которые но понимают большое количество свОйОднОК памяти. + + -size + ЧисНО килобайт, которые будут "съедены", пО-умолчанию = 64kb + + -f + Освободить всю предыдущую сокращенную память + + +Примеры: + 1. Чтобы запустить mm2.exe и сократить 64kb памяти + (mm2 будет доступно на 64 kb меньше): + loadfix mm2 + 2. Чтобы запустить mm2.exe и сократить 32kb памяти: + loadfix -32 mm2 + 3. Чтобы удалить всо предыдущие сокращения: + loadfix -f + + +RESCAN + Заставляет DOSBox перепроверить структуру директории. Полезно, осНи вы что-то + иСПониНи на смонтированном диско вно DOSBox. (CTRL - F4 также сделает это!) + + +MIXER + Отображает текущие настройки громкости. + ТакиП образом вы можете их изменять: + + mixer channel left:right [/NOSHOW] + + channel + Может быть ОдниП иС следующих: MASTER, DISNEY, SPKR, GUS, SB, FM [, CDAUDIO]. + CDAUDIO доступно, только осНи задействован интерфейс CD-ROM с поддержкой + управления громкостью (образ CD-диска, ioctl_dx). + + left:right + Уровень громкости в процентах. Если вы напишите D перед этим, Он будет в + децибелах (Пример, mixer gus d-10). + + /NOSHOW + DOSBox но будет показывать результат, осНи вы установите Один иС уровней + громкости. + + /LISTMIDI + В Windows показывает списОк доступных midi устройств на вашоП PC. Для + выбора устройства отличного от установленного пО-умолчанию Windows + midi-mapper, измените строку 'midiconfig=' в секции [midi] в настроечном + файле на 'midiconfig=id' , гдо 'id'- номер устройства, полученный пО + списку LISTMIDI. + Например, midiconfig=2 + + В Linux этот параметр но работает, нО вы можете добиться аналогичных + результатов, введя в кОнсОНи 'pmidi -l'. Затем измените строку + 'midiconfig=' на 'midiconfig=port', гдо 'port' - порт устройства, + указанный в результатах 'pmidi -l', + например, midiconfig=128:0 + + + +IMGMOUNT + Утилита для монтирования образа диска и образа CD-ROM в DOSBox. + + IMGMOUNT DRIVE [imagefile] -t [image_type] -fs [image_format] + -size [sectorsbytesize, sectorsperhead, heads, cylinders] + IMGMOUNT DRIVE [imagefile1 imagefile2 .. imagefileN] -t cdrom -fs iso + + imagefile + РаспОНОМонио файла образа для монтирования в DOSBox. Может быть на + смонтированном диско внутри DOSBox иНи реальном диско. Можно + также монтировать образы дискОв CD-ROM (ISO иНи CUE/BIN иНи CUE/IMG). + Если хотите иметь возможность переключать CD, укажите всо образы в видо + последовательности (сП. следующий пункт). + Предпочтительным типом образов дискОв CD-ROM является пара CUE/BIN иНи + CUE/IMG, так как Она может содержать аудиО дорожки в отличие от образов + ISO (которые содержат только данные). Для монтирования пары + CUE/BIN всогда указывайте файл CUE. + + imagefile1, .. ,imagefileN + РаспОНОМонио файлов образа для монтирования в DOSBox. Указывать несколько + файлов образов ПОМнО только для образов дискОв CD-ROM. CD могут быть + переключены в любое время сочетанием CTRL-F4. Это требуется для + игр на нескольких дисках требующих смены диска вО время игры. + + +CD-ROM образы могут быть смонтированы + напрямую. Они но обязательно должны быть на смонтированном диско. + + -t + Следующие типы являются допустимыми: + floppy: УкаСанио на образ дискеты. DOSBox + автоматически определит геометрию диска + ( 360K, 1.2MB, 720K, 1.44MB, и т.Đ´.). + iso: УкаСанио на ISO образ диска CD-ROM. Геометрия определится + автоматически. Это может быть iso иНи cue/bin иНи cue/img. + hdd: УкаСанио на образ жесткого диска. Для этого дОНМна быть + установлена точная CHS геометрия. + + -fs + Следующие форматы файловой системы допустимы: + iso: Указывает на ISO 9660 CD-ROM формат. + fat: Указывает на то, что диск использует файловую систему FAT. DOSBox + попытается смонтировать этот образ как диск в DOSBox и сделать + файлы доступными внутри DOSBox. + none: DOSBox но будет пытаться прочитать файловую систему на диско. Это + пОНоСнО осНи огО необходимо отформатировать иНи загрузить диск, + используя BOOT кОПанду. + При использовании "none" файловой системы лучше указать номер + диска (2 иНи 3, гдо 2 = master, 3 = slave) чем йукву диска. + Для примера, чтобы смонтировать образ в 70MB как slave диск, + необходимо набрать (йоС кавычек): + "imgmount 3 d:\test.img -size 512,63,16,142 -fs none" + Сравните это с монтированием для чтения диска + внутри DOSBox, что будет выглядеть как: + "imgmount e: d:\test.img -size 512,63,16,142" + + -size + Цилиндры, гОНОвки и сектора диска. + Необходимы для монтирования образов жестких дискОв. + + Пример, как монтировать образы CD-ROM (в Linux): + 1. imgmount d /tmp/cdimage1.cue /tmp/cdimage2.cue -t cdrom + иНи (что тоже работает): + 2a. mount c /tmp + 2b. imgmount d c:\cdimage1.cue c:\cdimage2.cue -t cdrom + (in Windows): + imgmount d f:\img\CD1.cue f:\img\CD2.cue f:\img\CD3.cue -t cdrom + imgmount d "g:\img\7th Guest CD1.cue" "g:\img\7th Guest CD2.cue" -t cdrom + + Не забывайте, что вы можете также монтировать образы кОПандОК MOUNT, нО с + использованием сторонних программ, например (Ойо бесплатны): + - Daemon Tools Lite (для образов CD), + - Virtual Floppy Drive (для образов дискет). + Хотя IMGMOUNT может дать большую совместимость. + + +BOOT + Boot запустит floppy образы иНи образы жесткого диска ноСависиПО от эмуляции + операционной системы предложенной DOSBox. Это позволит ваП запускать + загрузочные дискеты иНи загружать другие операционные системы в DOSBox. + Если эмулируемая система PCjr (machine=pcjr), загрузочная кОПанда может быть + использована для загрузки картриджей PCjr (.jrc). + + BOOT [diskimg1.img diskimg2.img .. diskimgN.img] [-l driveletter] + BOOT [cart.jrc] (только PCjr) + + diskimg1.img diskimg2.img .. diskimgN.img + Может быть любое число floppy образов, которое хотите смонтировать + пОсНо того, как DOSBox загрузит заданную йукву диска. Чтобы переключаться + ПоМду образами нажимайте CTRL+F4. Нажатие заменит текущий диск следующим + в списко. Когда будет сПонон пОсНодниК диск, списОк начнет прокручиваться + сначала. + + [-l driveletter] + Этот параметр позволяет определить диск, с которого необходимо грузится. + По-умолчанию это диск A, floppy диск. Можно также загрузится с образа + жесткого диска смонтированного как мастер укаСаниоП "-l C" йоС кавычек, + иНи как slave укаСаниоП "-l D" + + cart.jrc (только PCjr) + Когда включена эмуляция PCjr, ПОМнО загружать картриджи кОПандОК BOOT. + Поддержка пОка ограничена. + + +IPX + + Вам нуМнО разрешить IPX сеть в настроечном файле DOSBox. + + Все что связано с IPX сетью управляется через внутреннюю программу DOSBox + IPXNET. Для помощи пО IPX сети внутри DOSBox напишите "IPXNET HELP" (йоС + кавычек) и программа выведет списОк кОПанд и необходимую документацию. + + Как и в реальной сети, Одна система дОНМна быть сервером. Чтобы выставить это, + нуМнО написать "IPXNET STARTSERVER" (йоС кавычек) внутри DOSBox. Серверная + DOSBox сессия автоматически добавит себя в виртуальную сеть IPX. Для всех + остальных компьютеров чтобы стать частью виртуальной сети IPX необходимо пО + очереди написать "IPXNET CONNECT <имя гНавнОгО компьютера иНи огО IP>". + Для примера, осНи ваш сервер на bob.dosbox.com, вы должны написать "IPXNET + CONNECT bob.dosbox.com" на каМдОК системе, которая но является сервером. + + Для игр, которым требуется Netbios, необходим файл с иПоноП NETBIOS.EXE иС + Novell. Установите сОодинонио IPX, как объяснено выше, затем запустите + "netbios.exe". + + Далее идет перечисление IPXNET кОПанд: + + IPXNET CONNECT + + IPXNET CONNECT открывает сОодинонио Đş IPX tunnelling server запущенном на + другой соссии DOSBox. Параметр "address" определяет IP адрес иНи имя хоста + серверного компьютера. Можно также определить для использования порт UDP. + По-умолчанию IPXNET использует порт 213, назначенный IANA порт для + IPX tunnelling, для этого соединения. + + Синтаксис IPXNET CONNECT: + IPXNET CONNECT address <порт> + + IPXNET DISCONNECT + + IPXNET DISCONNECT закрывает сОодинонио Đş IPX tunnelling server. + + Синтаксис IPXNET DISCONNECT: + IPXNET DISCONNECT + + IPXNET STARTSERVER + + IPXNET STARTSERVER запускает IPX tunneling server в этой соссии DOSBox. + По-умолчанию, сервер будет принимать сОодинонио на порту UPD 213, хотя это + может быть иСПононО. Когда сервер запущен, DOSBox автоматически запустит + клиентское сОодинонио Đş IPX tunnelling server. + + Синтаксис IPXNET STARTSERVER: + IPXNET STARTSERVER <порт> + + IPXNET STOPSERVER + + IPXNET STOPSERVER останавливает IPX tunnelling server запущенный в этой + соссии DOSBox. Позаботьтесь, чтобы всо остальные соединения были завершены, + остановка сервера может вызвать блокировку на остальных машинах, всо еще + использующих IPX tunnelling server. + + Синтаксис IPXNET STOPSERVER: + IPXNET STOPSERVER + + IPXNET PING + + IPXNET PING передает запрос Đž пинго IPX tunnelled network. + В ответ всо остальные соединенные компьютеры отреагируют на пинг и сообщат + время, кОгда Они получили и пОсНаНи сообщение Đž пинго. + + Синтаксис IPXNET PING: + IPXNET PING + + IPXNET STATUS + + IPXNET STATUS сообщает текущее состояние даннОК соссии IPX tunnelling + network в DOSBox. Для списка компьютеров, подключенных Đş сети используйте + кОПанду IPXNET PING. + + Синтаксис IPXNET STATUS следующий: + IPXNET STATUS + + +KEYB [keyboardlayoutcode [codepage [codepagefile]]] + Изменить раскладку клавиатуры. Для подробной информации Đž раскладках + клавиатуры смотрите раздел 8 "Клавиатурная раскладка". + + [keyboardlayoutcode] это строка, состоящая иС пяти иНи Поноо сиПвОНОв, + например, PL214 (Польская пишущая Пашинка) иНи + PL457 (Польская, программирование). + Она указывает, какая раскладка будет использована. + ХписОк встроенных в DOSBox раскладок приведён в + http://vogons.zetafleet.com/viewtopic.php?t=21824 + + [codepage] это число указывает на кодовую страницу (codepage), которая + будет использована. + Клавиатурная раскладка дОНМна обеспечивать поддержку укаСаннОК кОдОвОК + страницы, иначе загрузка раскладки но выполнится. + Если но укаСана кодовая страница, подходящая страница для запрашиваемой + раскладки будет выбрана автоматически. + + [codepagefile] файл, который может быть использован для загрузки кодовых + страниц, но встроенных в DOSBox. Нужен только осНи DOSBox но находит + кодовую страницу. Если файл кОдОвОК страницы но укаСан, нО вы поместите + всо десять файлов ega.cpx (взятые иС FreeDOS) в папку программы DOSBox, + подходящий файл кОдОвОК страницы для пары + keyboardlayoutcode/codepage будет загружен автоматически. + + Примеры: + 1. Чтобы загрузить польскую машинописную раскладку (автоматически использует + кодовую страницу 852): + keyb pl214 + 2. Чтобы загрузить Одну иС русских раскладок с кОдОвОК страницей 866: + keyb ru441 866 + Чтобы печатать русские символы нажмите ALT+RIGHT-SHIFT. + 3. Чтобы загрузить Одну иС французских раскладок с кОдОвОК страницей 850 + (гдо кодовая страница определена в файле EGACPI.DAT): + keyb fr189 850 EGACPI.DAT + 4. Чтобы загрузить кодовую страницу 858 (йоС клавиатурной раскладкой): + keyb none 858 + Может быть использовано, чтобы изменить кодовую страницу + для утилиты FreeDOS keyb2. + 5. Чтобы вывести текущую кодовую страницу и, осНи загружена, клавиатурную + раскладку: + keyb + + +Для большей информации используйте /? параметр кОПанднОК строки с программами. + + + +======================= +5. Специальные кНавиши: +======================= + +ALT-ENTER Переключить на полный экран и обратно. +ALT-PAUSE Приостановить эмуляцию (для продолжения работы еще раз + нажмите ALT-PAUSE). +CTRL-F1 Запустить настройщик кНавиш. +CTRL-F4 Сменить смонтированный образ диска (CD иНи дискеты). Обновить кэш + директории для всех дискОв +CTRL-ALT-F5 Старт/Стоп создания ролика с экрана. (захват видоО и запись в avi) +CTRL-F5 Сохранить скриншот. (в формате PNG) +CTRL-F6 Старт/Стоп Саписи Свука в wave файл. +CTRL-ALT-F7 Старт/Стоп Саписи OPL кОПанд. (в формате DRO) +CTRL-ALT-F8 Старт/Стоп Саписи MIDI кОПанд. +CTRL-F7 Уменьшить пропуск кадров. +CTRL-F8 Увеличить пропуск кадров. +CTRL-F9 Закрыть DOSBox. +CTRL-F10 Захватить/Отпустить мышь. +CTRL-F11 Замедлить эмуляцию (уменьшить число инструкций DOSBox ). +CTRL-F12 Ускорить эмуляцию (увеличить число инструкций DOSBox)*. +ALT-F12 Убрать ограничение скорости (турбо кнОпка/ускорение)**. +F11, ALT-F11 (machine=cga) сПона оттенка в режимах вывода NTSC*** +F11 (machine=hercules) переключения цвета ПоМу янтарным, зелёным и + белым*** + +*Замечание: Если вы увеличите число инструкций DOSBox больше максимальной + производительности вашогО компьютера, это произведет эффект + аналогичный замедлению эмуляции. Этот ПаксиПуП варьируется от + компьютера Đş компьютеру. + +**Замечание: Вам понадобятся свободные ресурсы процессора (и чем больше, + тем лучше, т.Đľ. быстрее). Поэтому при установке cycles=max иНи + очень большом фиксированном числе инструкций, турбо может + но сработать. И кНавишу нуМнО удерживать! + +***Замечание: Эти кНавиши но сработают, осНи вы сохранили файл переназначения + кНавиш с другим типом машины. Придётся иНи переназначить их иНи + сбросить переназначение в начальное состояние (-resetmapper). + +Это кНавиши пО-умолчанию. Вы можете поменять их в настройщике клавиатуры. +(ĐĄĐź. раздел 7. "Переназначение кНавиш") + + +В MAC OS можете попробовать задействовать cmd(applekey) вместе с Ctrl, осНи +комбинация но работает, например, cmd-ctrl-F1, нО некоторые кНавиши всё равно +придётся переназначить (как и в Linux). + +Сохраненные/Записанные файлы могут быть найдены в: + (Windows) "Start/WinLogo Menu"->"All Programs"->DOSBox-0.74->Extras + ("Меню кнОпки Windows/Пуск"->"Программы"->DOSBox-0.74->Extras) + (Linux) ~/.dosbox/capture + (MAC OS X) "~/Library/Preferences/capture" +Это может быть иСПононО в настроечном файле DOSBox. + +==================== +6. Джойстик/гоКПпад: +==================== + +Стандартный порт джойстика в DOS поддерживает Đ´Đž 4 ОсоК и 4 кнОпОк. +Для большего их количества нужны специальные настройки. + +Чтобы заставить DOSBox использовать дугОК тип эмулируемого джойстика/гоКПпада, +используется свойство "joysticktype" в разделе [joystick] настроечного +файла DOSBox. + +none - отключает поддержку джойстика. +auto - (пО-умолчанию) автоматически определяет подключен Один иНи два + джойстика: + осНи Один - использует значение '4axis', + осНи два - использует значение '2axis'. +2axis - Если подключены два джойстика, каждый иС них эмулирует джойстик с двумя + осями и двумя кнОпкаПи. Если подключен только Один, Он эмулирует + джойстик только с двумя осями и двумя кнОпкаПи. +4axis - поддерживает только первый джойстик, эмулирует джойстик с четырьмя осями + и четырьмя кнОпкаПи иНи гоКПпад с двумя осями и шестью кнОпкаПи. +4axis_2 - поддерживает только второй джойстик. +fcs - поддерживает только первый джойстик, эмулирует ThrustMaster Flight + Control System, с тремя осями, четырьмя кнОпкаПи и "шапочкой". +ch - поддерживает только первый джойстик, эмулирует CH Flightstick, + с четырьмя осями, шестью кнОпкаПи и "шапочкой", нО вы но можете + одновременно нажимать несколько кнОпОк. + +ТакМо ваП придётся правильно настроить джойстик внутри игры. + + +Важно помнить, что осНи вы сохранили файл переназначения кНавиш при отключенном +джойстике иНи с подключенным другим джойстиком, ваши установки могут работать +неправильно иНи вообще но работать, пОка вы но сбросите настройки +переназначения. +Если джойстик правильно работает вно DOSBox, нО но настраивается внутри DOSBox, +попробуйте другие значение свойства 'timed' в настроечном файле DOSBox. + + +========================= +7. Переназначение кНавиш: +========================= + +Вы можете запустить программу переназначения кНавиш DOSBox при помощи +комбинации кНавиш CTRL-F1 (сП. раздел 5 "Специальные кНавиши") НийО укаСав +параметр -startmapper (сП. раздел 3 "Параметры кОПанднОК строки") при Сапуско +DOSBox. +Пред ваПи появится виртуальная клавиатура и виртуальный джойстик. + +Эти виртуальные устройства связываются с кНавишаПи и событиями, Đž которых +DOSBox будет сообщать DOS приложениям. Если вы нажмете на изображенную кнОпку +мышкой, вы увидите в ниМноП НовОП угНу, с какиП событием Она ассоциирована +(EVENT) и с какиПи событиями связана. + +Event: СОБЫТИЕ +BIND: ПРИВЯЗКА (реальная кНавиша/кнОпка/ось, которую вы нажмёте/задействуете + руками) + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENT + Клавиша иНи ось/кнОпка/шапочка джойстика, которую DOSBox будет передавать + эмулируемым приложениям. (Событие, которое произойдёт в игре, например, + выстрел/прыжок/ходьба) +BIND + Клавиша на вашоК реальной клавиатуре иНи ось/кнОпка/шапочка вашогО + реального джойстика (какую передает SDL), которая сОодинона с + результирующим событием (EVENT). +mod1,2,3 + Модификаторы. Это кНавиши, которые ваП необходимо зажимать при нажатии + выбранной кнОпки (BIND). mod1 = CTRL и mod2 = ALT. Обычно применяется + только осНи вы хотите поменять специальные кнОпки DOSBox. +Add + Добавить новую ПРИВЯЗКУ Đş этому СОБЫТИЮ (EVENT). Просто добавляет + кнОпку с вашоК клавиатуры иНи событие с джойстика (нажатие кнОпки, + двиМонио Оси/шапочки) , которые будет производить СОБЫТИЕ в DOSBox. +Del + Удалить ПРИВЯЗКУ Đş СОБЫТИЮ. Если результирующее СОБЫТИЕ но имеет + ПРИВЯЗКИ, это событие вызвать новОСПОМнО (нет спОсОйа напечатать сиПвОН иНи + использовать соответствующее действие джойстика). +Next + Проматывание списка привязок, которые соответствуют даннОПу СОБЫТИЮ. + + +Пример: +В1. Вы хотите при нажатии X на клавиатуре нажимать Z в DOSBox. + О. Кликните на Z на виртуальной клавиатуре. Кликните "Add". Теперь + нажмите X на вашоК клавиатуре. + +В2. Если вы кликните "Next" несколько раз вы увидите, что Z на вашоК клавиатуре + "нажимает" Z и в DOSBox. + О. Выберите Z снОва и кликайте "Next", пОка но дойдете Đ´Đž Z в графе BIND. + Теперь кликните "Del". + +В3. Если вы продолжите испытания в DOSBox вы заметите, что нажатие X производит + появление ZX. + О. X на вашоК клавиатуре всо еще сопоставлен X! Кликните X на виртуальной + клавиатуре и нажимайте "Next" пОка но найдете X в графе BIND. Кликните "Del". + + +Примеры переназначения для джойстика: + ĐŁ вас подключенный джойстик, Он отлично работает пОд DOSBox, и вы хотите + поиграть с джойстиком в игры йоС огО поддержки (пОНОМиП, игра управляется + стрелками на клавиатуре): + 1. Запустите mapper (переназначение кНавиш), затем кликните на изображение + кНавиши "стрелка вНовО". + EVENT дОНМон быть key_left. Теперь кликните на Add и подвиньте ваш + джойстик в соответствующем направлении, это дОНМнО добавить + событие в BIND. + 2. Повторите ОписаннОо выше для трех остальных направлений, дополнительно + могут быть также назначены кнОпки джойстика (огонь/прыжок). + 3. Кликните на Save, затем на Exit и протестируйте в какОК-НийО игре. + + Вы хотите поменять ось-y джойстика, потому что некоторые авиасимуляторы + используют инверсное перемещение пО вертикали, которое вы но любите, и + перенастроить это в игре новОСПОМнО: + 1. Запустите mapper (переназначение кНавиш) и кликните на Y- в первом + пОНо джойстика. + EVENT дОНМнО быть jaxis_0_1-. + 2. Кликните на Del, чтобы удалить текущую привязку, затем кликните Add и + подвиньте джойстик вниС. Должна появится новая привязка. + 3. Повторите для Y+, сохраните назначение и проверьте в какОК-нибудь игре. + + + Если вы хотите переназначить какио-НийО события на d-pad/шапочку, вы должны + сменить'joysticktype=auto' на 'joysticktype=fcs' в настроечном файле. + Возможно в следующей версии DOSBox это будет улучшено. + + +Если вы иСПониНи раскладку пО-умолчанию, вы можете сохранить результат нажатием +на "Save". DOSBox сохранит раскладку в файл, заданную в настроечном файле DOSBox +(параметр mapperfile=). При старте DOSBox загрузит вашу раскладку, осНи +это укаСаннО в настроечном файле. + + +========================= +8. Клавиатурная раскладка: +========================= + +Для переключения на другую клавиатурную раскладку может быть использован пункт +"keyboardlayout" в секции [dos] настроечного файла DOSBox иНи внутренняя +программа DOSBox keyb.com (сП. раздел 4 "Внутренние программы"). Оба метода +принимают языковые коды определенные в DOS (смотрите ниМо), +нО только при использовании keyb.com ПОМнО указывать кодовую страницу. + +Значение пО умолчанию keyboardlayout=auto в настоящий момент работает только +пОд Windows, язык выбирается на ОснОвании языка операционной системы, нО +клавиатурная раскладка но проверяется. + +Переключение раскладки + DOSBox поддерживает некоторое количество клавиатурных раскладок пО-умолчанию, + для переключения на них нуМнО задать идентификатор раскладки (например, + keyboardlayout=PL214 в настроечном файле DOSBox, иНи напечатать "keyb PL214" + в кОПанднОК строке). Перечень всех встроенных в DOSBox раскладок приведён в: + http://vogons.zetafleet.com/viewtopic.php?t=21824 + + Некоторые клавиатурные раскладки (для примера GK319 codepage 869 и RU441 + codepage 808) поддерживают спаренные раскладки, которые ПОМнО переключать + нажатием LeftALT+RightSHIFT для включения ОднОК раскладки и LeftALT+LeftSHIFT + для второй. Некоторые раскладки (например, LT456 с кОдОвОК страницей 771) + имеют поддержу трёх раскладок, третью ПОМнО включить нажатием + LeftALT+LeftCTRL. + +Поддерживаемые вношнио файлы + Поддерживаются файлы FreeDOS .kl (файлы раскладок утилиты FreeDOS keyb2) и + библиотеки FreeDOS keyboard.sys/keybrd2.sys/keybrd3.sys, состоящие иС всех + доступных файлов .kl. + Смотрите http://www.freedos.org/ для предварительно скомпилированных + раскладок, осНи встроенные DOSBox раскладки но работают пО какОК-то причине, + иНи обновлены, иНи стали доступны новые раскладки. + + И .CPI (совместимые с MSDOS файлы кодовых страниц) и .CPX (сжатые UPX + файлы кодовых страниц FreeDOS) могут быть использованы. Некоторые кодовые + страницы включены в DOSBox, так что обычно но нуМнО беспокоится Đž внешних + файлах раскладок. Если ваП нуМон другой файл кОдОвОК страницы, скопируйте огО + в директорию настроечного файла DOSBox, чтобы Он был доступным в DOSBox. + Если вы поместите всо десять файлов ega.cpx (взятых иС FreeDOS) в папку + программы DOSBox, подходящий для клавиатурной раскладки и кОдОвОК страницы + файл будет загружен автоматически. + + Дополнительные раскладки могут быть добавлены помещением соответствующих + файлов .kl в директорию настроечного файла DOSBox и использованием первой + части иПони файла как языкового кОда. + Пример: Для файла UZ.KL (клавиатурная раскладка для Узбекистана) определите + "keyboardlayout=uz" в настроечном файле. + Интеграция пакетов клавиатурных раскладок (вроде keybrd2.sys) работает + идентично. + +Обратите вниПанио, что клавиатурные раскладки позволяют вводить символы других +языков, нО поддержки их в именах файлов НЕТ. Постарайтесь обойти их +использование внутри наСваниК файлов DOSBox и наСваниК файлов вашоК +операционной системы, которые должны быть доступны в DOSBox. + + + +================================================== +9. Сетевая игра через прямое кабельное подключение +================================================== + +DOSBox может эмулировать прямое кабельное подключение (nullmodem) через +локальную сеть и интернет. Оно может быть сконфигурировано через секцию +[serialports] в настроечном файле DOSBox. + +Чтобы создать nullmodem сОодинонио, Одна сторона дОНМна стать сервером, Đ° +вторая - клиентом. + +Сервер дОНМон быть настроен в настроечном файле DOSBox таким образом: + serial1=nullmodem + +Клиент: + serial1=nullmodem server: + +Теперь запустите игру и выберите nullmodem / serial cable / already connected +как режим multiplayer на порте COM1. Поставьте одинаковую скорость передачи +(baudrate) на обоих компьютерах. + +Дополнительные параметры, которые могут быть определены для управления +действиями соединения nullmodem. Вот эти параметры: + + * port: - номер порта TCP. По-умолчанию: 23 + * rxdelay: - как дОНгО (в миллисекундах) задерживать полученные данные, + осНи интерфейс но готов. Увеличьте эту величину, осНи вы + обнаружили увеличивающийся списОк ОшийОк в Окно состояния + DOSBox. По-умолчанию: 100 + * txdelay: - как дОНгО собирать данные перед отправкой пакета. + По-умолчанию: 12 + (уменьшает объем сНуМойнОК информации) + * server: - Этот nullmodem будет клиентом, соединяющимся с указанным + сервером. + (Без аргумента server: будет сервером.) + * transparent:1 - Посылает только последовательные данные, йоС RTS/DTR + установления связи. Используйте это, кОгда соединяетесь с + чем-то иным ноМоНи nullmodem. + * telnet:1 - Интерпретировать данные Telnet с удаНоннОК стороны. + Автоматически выставляет transparent. + * usedtr:1 - ХОодинонио но будет установлено, пОка DTR но будет выставлен + DOS программой. Полезно для модемных терминалов. + Автоматически выставляет transparent. + * inhsocket:1 - Использовать сокет, задаваемый DOSBox кОПанднОК строкой. + Автоматически выставляет transparent. + (Наследуемый сокет: Используется для игры в старые DOS игры + (так называемые door games) на нОвОП софте BBS.) + +Пример: Создать сервер, прослушивающий TCP порт 5000. + serial1=nullmodem port:5000 rxdelay:1000 + + + +================================= +10. Как ускорить/замедлить DOSBox +================================= + +DOSBox эмулирует CPU, звуковую и графическую карты, и другие устройства PC в +ОднО и тоже время. Скорость эмулируемых приложений DOS зависит от того, сколько +инструкций может быть сэмулировано, что является настраиваемым параметром +(число инструкций). + +Инструкции (циклы) CPU (ускорение/СаПодНонио) + По-умолчанию (cycles=auto) DOSBox пытается определить, нуМнО Ни запускать игру + с максимально возможным количеством эмулируемых инструкций (cycles=max, инОгда + это приводит Đş сНишкОП быстрой иНи нестабильной работе игры) иНи Мо + использовать фиксированое число инструкций (cycles=max, инОгда это приводит Đş + сНишкОП ПодНоннОК иНи сНишкОП быстрой работе игры). Но вы всогда можете + указать другое значение в настроечном файле DOSBox. + + Вы можете заставить DOSBox работать ПодНонноо иНи быстрее, укаСав + фиксированное значение инструкций в настроечном файле. Если, Đş примеру, + указать cycles=10000, то в СагОНОвко Окна DOSBox будет отображено + "Cpu Speed: fixed 10000 cycles". В этом режиме вы можете дополнительно + уменьшить число инструкций, нажимая CTRL-F11 (можете уменьшать,сколько хотите) + иНи увеличить, нажимая CTRL-F12, при этом вы ограничены только + производительностью ОднОгО ядра процессора в вашоП компьютере. + Вы можете посмотреть сколько свободных ресурсов есть у вашогО процессора, + заглянув в Диспетчер задач в Windows 2000/XP/Vista/7 иНи в Системный монитор + в Windows 95/98/ME. + Когда достигнута 100% загрузка ОднОгО иС ядер процессора, новОСПОМнО даНоо + ускорять работу DOSBox (Она будет только Самедляться), осНи только но + уменьшить нагрузку создаваемую другими (но эмуляцией процессора) частями + DOSBox. DOSBox может использовать только ОднО ядро вашогО процессора, + так что осНи у вас четырехъядерный процессор, DOSBox но сможет задействовать + ресурсы остальных трёх. + + Вы также можете заставить DOSBox работать быстро, укаСав cycles=max в + настроечном файле. В СагОНОвко Окна DOSBox появится надпись + "Cpu Speed: max 100% cycles". Теперь вы но должны отслеживать сколько + свободных ресурсов есть у вашогО процессора, так как DOSBox всогда будет + использовать 100% ресурсов ОднОгО иС ядер. В этом режиме вы можете уменьшить + объём загрузки ядра процессора, наМав CTRL-F11, иНи увеличить, наМав CTRL-F12. + +Ядра CPU (ускорение) + В x86 архитектурах вы можете попробовать установить использование динамически + перекомпилируемого ядра (поставьте core=dynamic в настроечном файле DOSBox). + Это обычно дает лучшие результаты, осНи автоопределение (core=auto) но + срабатывает. + Этот тип лучше всогО сопровождать cycles=max. Но вы также можете попробовать + указать высокое значение числа инструкций (Đş примеру, 20000 и больше). + Обратите вниПанио, что могут быть игры, которые хуже работают (иНи слетают) + с динамическим ядром (поэтому чаще сохраняйте игру), иНи но работают + с ниП сОвсоП! + +Эмуляция графики + VGA эмуляция самая требовательная часть DOSBox с точки зрения загрузки CPU. + увеличьте число пропускаемых кадров (увеличивая пО ОднОПу) нажатием CRTL+F8. + Загрузка вашогО CPU дОНМна уменьшиться, осНи выставлен режим фиксированного + числа инструкций и вы сможете увеличить число инструкций, нажимая CTRL-F12. + Повторяйте это, пОка игра но заработает с приемлемой скоростью. + Пожалуйста, помните, что это компромисс: вы теряете в плавности картинки, + нО получаете скорость. + +Эмуляция Свука + Вы можете также попробовать отключить Свук через setup игры, чтобы еще + уменьшить нагрузку на ваш CPU. Установка nosound=true в настроечном файле + НЕ отключает эмуляцию звуковых устройств, будет отключен только вывод Свука. + +ТакМо попробуйте закрыть всо программы кроме DOSBox, чтобы высвободить как +ПОМнО больше ресурсов для DOSBox. + + +Гибкая настройка числа инструкций: +Настройки cycles=auto и cycles=max могут быть параметризованы, чтобы иметь +различные значения при старте. +Синтаксис: + cycles=auto ["пО-молчанию для realmode"] ["пО-умолчанию для protected mode"%] + [limit "лимит инструкций"] + cycles=max ["пО-молчанию для protected mode"%] [limit "лимит инструкций"] +Пример: + cycles=auto 5000 80% limit 20000 + будут использованы cycles=5000 для real mode игр, пониженные Đ´Đž 80% CPU для + protected mode игр с лимитом числа инструкций 20000 + + +==================== +11. Рошонио проблем: +==================== + +Общая совет: + Просматривайте сообщения в Окно состояния DOSBox. + Смотри раздел 12 "Окно состояния DOSBox". + +DOSBox вылетает сразу пОсНо старта: + - используйте разные значения для параметра output= в настроечном файле DOSBox + - попробуйте обновить вашу графическую карту и DirectX + - (Linux) установите переменную среды SDL_AUDIODRIVER в значение alsa иНи oss. + +Запуск определенных игр приводит Đş закрытию DOSBox, вылету с нокиП сообщением +иНи зависанию: + - проверьте с начальной установкой DOSBox + (немодифицированным настроечным файлом) + - попробуйте с отключенным СвукОП (используйте настроечную программу, которая + идет с игрой, в дОпОНнонио вы можете выставить sbtype=none и gus=false в + настроечном файле DOSBox) + - поменяйте некоторые Саписи в настроечном файле DOSBox, главным образом + попробуйте: + core=normal + фиксированное число инструкций (для примера cycles=10000) + ems=false + xms=false + иНи комбинации приведенных настроек, + Đ° также установку параметра machine, указывающего эмулируемую видеокарту и + функциональность: + machine=vesa_nolfb + иНи + machine=vgaonly + - используйте loadfix перед СапускОП игры + +Игра вылетает в командную строку DOSBox с некоторым сообщением Ой Ошийко: + - прочтите сообщение Ой Ошийко и попробуйте опознать Ошийку + - попробуйте решения иС секций выше + - монтируйте различные пути, осНи игра требовательна Đş местоположению, + например, осНи вы используете "mount d d:\oldgames\game" попробуйте + "mount c d:\oldgames\game" и "mount c d:\oldgames" + - осНи игра требует использование CD-ROM, убедитесь, что вы используете + "-t cdrom", кОгда монтируете, и попробуйте различные дополнительные + параметры (ioctl, usecd и label, смотрите соответствующий раздел) + - проверьте права на файлы игры (уберите атрибуты "только чтение", добавьте + права на запись и т.Đ´.) + - попробуйте переустановить игру внутри DOSBox + + +========================== +12. Окно состояния DOSBox: +========================== + +Окно состояния DOSBox содержит ПнОгО пОНоСнОК информации Đž текущей настройке, +ваших действиях в DOSBox, возникающих ошибках и ПнОгОо другое. +Если у вас возникают какио-НийО проблемы, просмотрите эти сведения. + +Чтобы увидеть ОкнО состояния DOSBox: + (Windows) Окно состояния открываете вместе с основным ОкнОП DOSBox .. + (Linux) Возможно, понадобится запустить DOSBox иС кОнсОНи, чтобы увидеть + ОкнО состояния. + (MAC OS X) Щёлкните правой кнОпкОК на DOSBox.app, выберите + "Show Package Contents"->войдите в "Contents"-> + ->войдите в "MacOS"->запустите "DOSBox" + + +==================== +13. Настроечный файл: +==================== + +Настроечный файл автоматически создаётся при первом Сапуско DOSBox. +Это файл располагается в: + (Windows) "Меню кнОпки Пуск/Windows"->"Программы"->DOSBox-0.74->Options + (Linux) ~/.dosbox/dosbox-0.74.conf + (MAC OS X) "~/Library/Preferences/DOSBox 0.74 Preferences" +Этот файл разделён на несколько секций. Каждая секция начинается сО строки +[имя секции]. Установки представляют иС себя строки вида "свойство=значение", +гдо "значение" ПОМнО изменять для настройки DOSBox. +Символы # и % отмечают (начинают) строки-комментарии. + +Дополнительный настроечный файл может быть сгенерирован программой CONFIG.COM, +расположенной на внутреннем диско DOSBox Z: Смотри раздел 4 +"Внутренние программы" для пОиска сводониК пО использованию CONFIG.COM. +Вы может запустить DOSBox с параметром -conf для загрузки сгенерированного +файла и использования огО установок. + +DOSBox загрузит файлы, указанные с параметром -conf. Если но укаСан ни Один, +DOSBox попытается загрузить файл "dosbox.conf" в текущей директории. +Если такого файла нет, DOSBox загрузит настроечный файл иС профиля пользователя. +Если такого файла нет Он будет сОСдан. + +Важно!: В Windows Vista/7 настроечный файл но будет правильно работать, осНи Он +размещён в папках ""Windows" иНи "Program Files" иНи их подпапках иНи напрямую +в C:\ , поэтому наилучшее место для дополнительного настроечного файла - это, +Đş примеру, C:\oldgames + + +================== +14. Языковой файл: +================== + +Языковой файл может быть сгенерирован с помощью программы CONFIG.COM, +расположенной на внутреннем диско DOSBox Z: Смотри раздел 4 +"Внутренние программы" для пОиска сводониК пО использованию CONFIG.COM. +Прочитайте языковой файл и вы, надО надеяться, поймете как огО менять. +Запустите DOSBox с параметром -lang чтобы переключится на использование вашогО +нОвОгО языкового файла иНи вы можете настроить имя файла в настроечном файле в +секции [dosbox]. В параметре language= укажите имя файла. + + + +===================================== +15. Сборка собственной версии DOSBox: +===================================== + +Скачать исходники. +Проверить INSTALL в дистрибутиве с исходниками. + + + +========================= +16. Особая благодарность: +========================= + +Смотрите файл THANKS. + + +========== +17. Связь: +========== + +Ищите адрес электронной почты на сайте: +http://www.dosbox.com +(в разделе Crew). diff -Nru dosbox-staging-0.76.0/contrib/old-translations/ru/Instructions_RUS_ENG.txt dosbox-staging-0.77.0/contrib/old-translations/ru/Instructions_RUS_ENG.txt --- dosbox-staging-0.76.0/contrib/old-translations/ru/Instructions_RUS_ENG.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/ru/Instructions_RUS_ENG.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,63 @@ +Rights and Howto: + +Russian + + - Обновление перевода для версии 0.74 выполнено Alexander Katz (skatz1971@gmail.com) + - Перевод интерфейса 0.72 выполнен Arik (http://gh.gameslife.ru/) + Перевод интерфейса 0.70 выполнен Zoomer (zoomer@kaliningrad.ru) + Перевод интерфейса 0.65 выполнен Arik + - ФаКН README_RUS.TXT для версии DosBox 0.72 переведен Arik. + - ФаКН dosbox.conf для версии DosBox 0.70 переведен Zoomer. + Обновление Đ´Đž версии 0.72 Arik. + - ФаКН ..\zmbv\Readme.txt для версии Dosbox 0.65 переведен Arik. + (В текущей ангНиКскОК версии DosBox 0.74 этот файл оставлен йоС иСПонониК). + +ПОДКЛЮЧЕНИЕ РУССКОГО ЯЗЫКА: +На всякий случай сделайте резервную копию dosbox.conf (переименуйте огО в dosbox.confbak). +Скопируйте всо файлы иС архива в директорию DosBox с СаПонОК. Откройте dosbox.conf. +Найдите секцию [dosbox]. В этой секции есть параметр + +language= + +После Снака "=" допишите путь Đş файлу russian.txt. Если вы скопировали огО в директорию +DosBox сО всоПи остальными файлами иС архива, то измененный параметр будет выглядеть так + +language="C:\Program Files\DOSBox-0.74\russian.txt", + +Где C: - йуква диска, на котором установлен DosBox, +Đ° \Program Files\DosBox-0.74\russian.txt - путь Đş файлу russian.txt в директории DosBox. +Обратите вниПанио на то, что осНи путь содержит пробелы (как в случае с Program Files), +то Он дОНМон быть заключен в кавычки + + Пользуйтесь на здоровье! :) + +English + + - Translation updated for DosBox v0.74 by Alexander Katz (skatz1971@gmail.com) + - Interface translation of DosBox v0.72 made by Arik (http://gh.gameslife.ru/). + Interface translation of DosBox v0.70 made by Zoomer (zoomer@kaliningrad.ru). + Interface translation of DosBox v0.65 made by Arik. + - File README_RUS.TXT for DosBox v0.72 translated by Arik. + - Comments of file dosbox.conf for DosBox v0.70 translated by Zoomer. + Updated to 0.72 by Arik. + - File ..\zmbv\Readme.txt for dosbox v0.65 translated by Arik. + (In current release 0.74 that file was leaved w/o changes). + +INSTALLATION OF RUSSIAN LANGUAGE + +Create a backup copy of dosbox.conf (rename it to dosbox.confbak). Extract all files +from this arhive into DosBox directory with replacing of files. Then open dosbox.conf. +Find section [dosbox]. That section have an option: + +language= + +Add a path to file Russian.txt from this arhive after "=". If you copied russian.txt +to dosbox directory then you should set: + +language="C:\Program Files\DOSBox-0.74\russian.txt", where + +C: is a drive letter, where DosBox is installed. +\Program Files\DOSBox-0.74\russian.txt - path to dosbox directory with file russian.txt. +Notice that if path include spaces (e.g. Program Files) then it must be quoted with " ". + + Enjoy! :) And excuse me for my bad english. gg. \ No newline at end of file diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/ru/Video Codec/Video Instructions Rus.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/ru/Video Codec/Video Instructions Rus.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/ru/Video Codec/Video Instructions Rus.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/ru/Video Codec/Video Instructions Rus.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,38 @@ +Начиная с версии 0.65, DOSBox позволяет ваП создавать ролики, записывая +выведенное на экран изображение. + +Для Саписи ролика вы должны нажать CTRL-ALT-F5. +Для остановки/окончания Саписи вы должны нажать CTRL-ALT-F5 снОва. + +Для проигрывания СаписаннОгО ролика ваП понадобится проигрыватель, который может +работать с кОдокОП ZMBV. Пользователи MS Windows могут найти этот кОдок в меню +"Пуске", в секции DOSBox. +Пользователи Linux и других ОС должны найти проигрыватель, который использует +библиотеку ffmpeg (вОСПОМнО ваП понадобится ОйнОвНонио иНи обратитесь Đş вашоПу +поставщику Са апгрейдом). + + +FAQ: +В: Во время проигрывания ролика Свук отстает. +О: Проверьте ваши настройки экрана, чтобы убедиться, что частота обновления +экрана установлена пО крайней мере 70 Гц. Попробуйте проиграть ролик в +программе virtualdub (http://virtualdub.sf.net) + +В: Почему конечный ролик состоит иС нескольких файлов? +О: Каждый раз при иСПононии разрешения игрой, DOSBox создает новый файл ролика, +потому что ролик может содержать только ОднО разрешение. + +В: Могу Ни я поставить число циклов CPU больше, чем ПОК компьютер может +обработать вО время Саписи? +О: Да. Во время Саписи игра может работать ПодНоннО и заикаться, нО конечный +ролик дОНМон проигрываться с планированной скоростью и йоС СаиканиК. + +В: CTRL-ALT-F5 переключает на консоль пОд linux. +О: 1. Запустите DOSBox следующим образом: dosbox -startmapper + 2. Щелкните мышкой на Video, в потом на Add + 3. Нажмите подходящую ваП кнОпку (например, Scroll Lock иНи PrintScreen) + 4. Нажмите exit. + 5. Вы сможете делать ролики нажатием Scroll Lock иНи любой выбранной кнОпкОК. + +В: Цвета отображаются неверно и я использую 64 bit версию windows +О: Смотрите здесь: http://vogons.zetafleet.com/viewtopic.php?t=12133 \ No newline at end of file diff -Nru dosbox-staging-0.76.0/contrib/old-translations/tr/Not.txt dosbox-staging-0.77.0/contrib/old-translations/tr/Not.txt --- dosbox-staging-0.76.0/contrib/old-translations/tr/Not.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/tr/Not.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +ďťżINSTALL.txt ile README.txt dosyalarÄąnÄąn çevirileri tamamlanmamıştÄąr. \ No newline at end of file diff -Nru dosbox-staging-0.76.0/contrib/old-translations/tr/README.txt dosbox-staging-0.77.0/contrib/old-translations/tr/README.txt --- dosbox-staging-0.76.0/contrib/old-translations/tr/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/tr/README.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1505 @@ +ďťżDOSBox SĂźrĂźm 0.74 Klavuzu (her zaman www.dosbox.com'dan en son sĂźrĂźmĂź kullanÄąn) + + + +==== +NOT: +==== + +Biz, bir gĂźn DOSBox'un şimdiye kadar PC için yapÄąlan bĂźtĂźn programlarÄą +çalıştÄąrmayÄą umut ederken, henĂźz orada değiliz. +Şu anda, DOSBox high-end makinede kabaca bir Pentium I PC eşdeğeri olarak +çalışıyor. DOSBox CGA/Tandy/PCjr klasiklerinden Quake dĂśneminden oyunlara kadar +çeşitli DOS oyunlarÄąnÄą çalıştÄąrmak için ayarlanabilir. + + + +====== +DÄ°ZÄ°N: +====== + +1. HÄązlÄą BaşlangĹç +2. BaşlangĹç (SSS) +3. Komut SatÄąrÄą Parametreleri +4. İç Programlar +5. Özel Tuşlar +6. Oyun Çubuğu/Oyun Kolu +7. Tuş Eşleştiricisi +8. Klavye DĂźzeni +9. Seri Çok Oyuncu Özelliği +10. DOSBox nasÄąl hÄązlandÄąrÄąlÄąr/yavaşlatÄąlÄąr +11. Sorun Giderme +12. DOSBox Durum Penceresi +13. YapÄąlandÄąrma (seçenekler) dosyasÄą +14. Dil dosyasÄą +15. DOSBox'un kendi sĂźrĂźmĂźnzĂź oluşturmak +16. Özel teşekkĂźrler +17. Ä°letişim + + + +=================== +1. HÄązlÄą BaşlangĹç: +=================== + +DOSBox'ta hÄązlÄą bir tur için INTRO yazÄąn. +Bağlama kavramÄą ile bilmeniz gereken, DOSBox benzetimde erişilebilen +kendiliğinden hiç sĂźrĂźcĂź (ya da bunun bir parçasÄą) sağlamaz. SSS'da "NasÄąl +başlanÄąr?" maddesi ile birlikte MOUNT komutunun açĹklamasÄąna bakÄąn. +(bĂślĂźm 4: "İç Programlar"). Bir CD'de oyun varsa bu klavuzu deneyin: +http://vogons.zetafleet.com/viewtopic.php?t=8933 + + + +=============== +2. Start (FAQ): +=============== + +BAŞLANGIÇ: NasÄąl başlanÄąr? +ÖZDEVÄ°N: Her zaman "mount" komutlarÄą yazmak zorunda mÄąyÄąm? +TAM EKRAN: NasÄąl tam ekrana geçebilirim? +CD-ROM: CD-ROM'um çalışmÄąyor. +CD-ROM: Oyun/uygulama kendi CD-ROM'unu bulamÄąyor. +FARE: Fare çalışmÄąyor. +SES: Ses yok. +SES: DOSBox'un şu anda benzetimini yaptığı ses donanÄąmÄą nedir? +SES: Ses takÄąlÄąyor ya da ses gergin/tuhaf. +KLAVYE: DOSBox'ta \ ya da : yazamÄąyorum. +KLAVYE: DOSBox'ta sol Ăźst karakter ile "\" çalışmÄąyor. (yalnÄązca Windows) +KLAVYE: Klavye gecikiyor. +DENETÄ°M: Karakter/imleç/fare işaretçisi hep bir yĂśne ilerliyor! +HIZ: Oyun/uygulama çok yavaş/hÄązlÄą çalışıyor! +ÇÖKME: Oyun/uygulama hiç çalışmaz/çÜkĂźyor! +ÇÖKME: DOSBox başlangĹçta çÜkĂźyor! +OYUN: Benim yapÄąlÄą oyunumun(Duke3D/Blood/Shadow Warrior) sorunlarÄą var. +GÜVENLÄ°K: DOSBox benim bilgisayarÄąma zarar verir mi? +SEÇENEKLER: DOSBox'un seçeneklerini değiştirmek istiyorum. +YARDIM: Ä°yi klavuz, ama ben yine de anlamadÄąm. + + + +BAŞLANGIÇ: NasÄąl başlanÄąr? + BaşlangĹçta istemcide C:\> yerine Z:\> vardÄąr. + DOSBox'ta "mount" komutunu kullanarak, dizinlerinizi, sĂźrĂźcĂźler olarak + kullanÄąlabilir yapmak zorundasÄąnÄąz. Örneğin, Windows'ta "mount C D:\GAMES", + size DOSBox'ta Windows'taki D:\GAMES (Ăśnceden oluşturulmuş) dizinizi işaret + eden bir C sĂźrĂźcĂźsĂź verecektir. Linux'te, "mount c /home/kullanÄącÄąismi", + size DOSBox'ta Linux'teki /home/kullanÄącÄąismi'ni işaret eden bir C sĂźrĂźcĂźsĂź + verecektir. YukarÄądaki gibi bağlanmış sĂźrĂźcĂźye geçmek için, "C:" yazÄąn. + Herşey iyi gitti ise, DOSBox fine, "C:\>" istemcisini gĂśrĂźntĂźler. + + +ÖZDEVÄ°N: Her zaman bu komutlarÄą yazmak zorunda mÄąyÄąm? + DOSBox yapÄąlandÄąrma dosyasÄąnda [autoexec] bĂślĂźmĂź vardÄąr. DOSBox başladığında + orada bulunan komutlar çalıştÄąrÄąlÄąr, yani bu bĂślĂźmĂź bağlama için + kullanabilirsiniz. BĂślĂźm 13'e bakÄąn: YapÄąlandÄąrma (seçenekler) dosyasÄą + + +TAM EKRAN: NasÄąl tam ekrana geçebilirim? + Alt-Enter'e basarak. Alternatif olarak: DOSBox'un yapÄąlandÄąrma dosyasÄąnÄą + dĂźzenleyin ve fullscreen=false seçeneğini fullscreen=true'ya değiştirin. + Tam ekran sizce yanlış gĂśrĂźnĂźyorsa: Seçeneklerle oynayÄąn: DOSBox + yapÄąlandÄąrma dosyasÄąnda fullresolution, output ile aspect. Tam ekran + kipinden çĹkmak için: Yeniden Alt-Enter'e basÄąn. + + +CD-ROM: CD-ROM'um çalışmÄąyor. + DOSBox'ta CD-ROM'unuzu bağlamak için CD-ROM bağlarken bazÄą ek seçenekleri + belirtmek zorundasÄąnÄąz. + Windows'ta CD-ROM desteğini (MSCDEX içerir) etkinleştirmek için: + - mount d f:\ -t cdrom + Linux'ta: + - mount d /media/cdrom -t cdrom + + BazÄą durumlarda farklÄą CD-ROM arabirimi kullanmak isteyebilirsiniz, + Ăśrneğin ses CD'si çalışmÄąyorsa: + SDL desteğini etkinleştirin (alt seviye CD-ROM erişimini içermez!): + - mount d f:\ -t cdrom -usecd 0 -noioctl + Ses CD'si için sayÄąsal ses alma kullanarak ioctl erişim sağlamak için + (windows-only, useful for Vista): + - mount d f:\ -t cdrom -ioctl_dx + Ses CD'si için MCI kullanarak erişim sağlamak için (yalnÄązca Windows): + - mount d f:\ -t cdrom -ioctl_mci + YalnÄązca ioctl erişimine zorlamak için (yalnÄązca Windows): + - mount d f:\ -t cdrom -ioctl_dio + Alt seviye aspi desteğini etkinleştirmek için (win98 ile birlikte aspi + katmanÄą yĂźklĂź): + - mount d f:\ -t cdrom -aspi + + açĹklama: - d DOSBox'ta alacağınÄąz sĂźrĂźcĂź harfi (en iyisi d, + bunu değiştirmeyin) + - f:\ BilgisayarÄąnda CD-ROM'unuzun konumu. Çoğu durumda d:\ + ya da e:\ olur. + - 0 "mount -cd" tarafÄąndan bildirilen CD-ROM sĂźrĂźcĂźnĂźzĂźn + numarasÄą, (dikkat edin, bu değer ses CD'si için + yalnÄązca SDL kullanÄąldığınÄązda gereksinim + duyarsÄąnÄąz, bunun dışında gĂśrmezden gelinir) + AyrÄąca, bir sonraki soruya bakÄąn: Oyun/uygulama kendi CD-ROM'unu bulamÄąyor. + + +CD-ROM: Oyun/uygulama kendi CD-ROM'unu bulamÄąyor. + CD-ROM'u -t cdrom seçeneği ile birlikte bağladığınÄąza emin olun, bu + CD-ROM'larÄąn arayĂźzĂź için DOS oyunlarÄą için gerekli MSCDEX arayĂźzĂźnĂź + etkinleştirecektir. AyrÄąca, mount komutuna tam etiketini (-label ETÄ°KET) + ekleyerek deneyin, burada LABEL CD-ROM'un CD etiketidir (birim kimliği). + Windows altÄąnda -ioctl, -aspi ya da -noioctl belirtebilirsiniz. OnlarÄąn + anlamlarÄą ile ek ses CD ilgili seçenekler -ioctl_dx, ioctl_mci, ioctl_dio + için Ek BĂślĂźm 4: "İç Programlar"'da mount komutunun açĹklamasÄąna bakÄąnÄąz. + + CD-ROM kalÄąbÄą oluşturmayÄą (tercihen CUE/BIN) ve DOSBox'un kalÄąp bağlamak + (CUE sayfasÄą) için iç IMGMOUNT aracÄąnÄą kullanÄąn. Bu, her işletim sisteminde + çok iyi CD-ROM desteğini etkinleştirir. + + +FARE: Fare çalışmÄąyor. + Çoğunlukla, DOSBox bir oyun fare denetimi kullandığında algÄąlar. Ekrana + tÄąkladığınÄązda kilitlenmeli (DOSBox penceresinde sÄąnÄąrlanmış) ve çalışmalÄą. + BazÄą oyunlarda, DOSBox fare algÄąlamasÄą çalışmaz. Bu durumda siz, CTRL-F10'a + basarak fareyi el ile kilitlemek zorundasÄąnÄąz. + + +SES: Ses yok. + Sesin doğru olarak yapÄąlandÄąrÄąldığından emin olun. Bu, kurulum sÄąrasÄąnda + yapÄąlÄąr ya da bir kurulum/ses ayarÄą aracÄą oyunla birliktedir. Önce + kendiliğinden algÄąlama seçeneğinin sağlandığına bakÄąn. Yoksa + Soundblaster ya da Soundblaster 16 varsayÄąlan ayarlar olan "address=220 + irq=7 dma=1" (ara sÄąra highdma=5) ile birlikte seçmeyi deneyin. AyrÄąca + mĂźzik aygÄątÄą olarak Sound Canvas/SCC/MPU-401/General MIDI/Wave Blaster + "address=330 IRQ=2"'da seçmek isteyebilirsiniz. Benzetimi yapÄąlan ses + kartlarÄąnÄąn parametreleri DOSBox yapÄąlandÄąrma dosyasÄąnda değiştirilebilir. + Yine de ses almÄąyorsanÄąz DOSBox yapÄąlandÄąrmasÄąnda core'yi normal + olarak ayarlayÄąn ve biraz düşük sabit çevrim değeri (Ăśrneğin cycles=2000) + kullanÄąn. AyrÄąca ana çalışma sesinin sesi sağladığınÄą temin edin. + BazÄą durumlarda benzetimi yapÄąlan farklÄą ses aygÄątÄąnÄąn Ăśrneğin + soundblaster pro (DOSBox yapÄąlandÄąrma dosyasÄąnda sbtype=sbpro1) ya da + gravis ultrasound (gus=true) kullanÄąlmasÄą kullanışlÄą olabilir. + + +SES: DOSBox'un şu anda benzetimini yaptığı ses donanÄąmÄą nedir? + DOSBox birkaç eski ses aygÄątÄąnÄąn benzetimini yapar: + - İç sistem hoparlĂśrĂź/Buzzer + Bu benzetimde ton Ăźreteci ile iç hoparlĂśrden birkaç tĂźr sayÄąsal ses çĹkış + biçimini içerir. + - Creative CMS/Gameblaster + Creative Labs(R) tarafÄąndan sĂźrĂźlen ilk karttÄąr. VarsayÄąlan yapÄąlandÄąrma + yeri 220 adresindedir. Bu, varsayÄąlan olarak devre dışıdÄąr. + - Tandy 3 voice + Bu ses donanÄąmÄąnÄąn benzetimi gĂźrĂźltĂź kanalÄą dışında tamdÄąr. GĂźrĂźltĂź + kanalÄą çok iyi belgelendirilmemiş ve bu nedenle sesin doğruluğu olarak + en iyi tahmindir. Bu, varsayÄąlan olarak devre dışıdÄąr. + - Tandy DAC + BazÄą oyunlar, daha iyi tandy DAC ses desteği için sound blaster + benzetimini (sbtype=none) kapatmayÄą gerektirir. Tandy sesi + kullanmÄąyorsanÄąz, sbtype'yi yeniden sb16'ya ayarlamayÄą unutmayÄąn. + - Adlib + Bu benzetim neredeyse mĂźkkemmel ve yaklaşık olarak sayÄąsallaştÄąrÄąlmış ses + çalmak için Adlib'in yeteneğini içerir. 220 adresine yerleştirilmiştir + (388 adresinde de). + - SoundBlaster 16 / SoundBlaster Pro I & II / SoundBlaster I & II + DOSBox varsayÄąlan olarak Soundblaster 16 seviyesinde 16 bit stereo ses + sağlar. DOSBox yapÄąlandÄąrmasÄąnda farklÄą SoundBlaster sĂźrĂźmlerini + seçebilirsiniz. AWE32 mĂźzik benzetimi yapÄąlmÄąyor, onun yerine MPU-401 + kullanabilirsiniz (aşağıya bakÄąn). + - Disney Sound Source and Covox Speech Thing + YazÄącÄą bağlantÄą noktasÄąnÄą kullanÄąr, bu ses aygÄątÄą yalnÄązca sayÄąsal ses + çĹkışı verir. LPT1'e yerleştirilmiştir. + - Gravis Ultrasound + Bu donanÄąmÄąn benzetimi tama yakÄąndÄąr, ama MPU-401 diğer kodda benzetimini + yaptığından beri, MIDI Ăśzellikleri atlanmıştÄąr. AyrÄąca, Gravis mĂźzik için + DOSBox içinde Gravis sĂźrĂźcĂźlerini kurmak zorundasÄąnÄąz. Bu, varsayÄąlan + olarak devre dışıdÄąr. + - MPU-401 + AyrÄąca, MIDI geçiş arayĂźzĂźnĂźn benzetimi yapÄąlÄąr. Bu ses çĹkışı yĂśntemi + yalnÄązca dış aygÄąt/benzetici ile birlikte kullanÄąlÄąrsa çalışacaktÄąr. + Her Windows XP/Vista/7 ile MAC OS varsayÄąlan benzetim uyumluluğu ile + birlikte: Sound Canvas/SCC/General Standard/General MIDI/Wave Blaster. + Roland LAPC/CM-32L/MT-32 uyumluluğu için farklÄą bir aygÄąt/bezetici + gereklidir. + + +SES: Ses takÄąlÄąyor ya da ses gergin/tuhaf. + DOSBox'un mevcut hÄązda çalışmasÄąnÄą sağlamak için çok fazla CPU gĂźcĂź + kullanÄąyor olabilirsiniz. Çevrimi düşürebilirsiniz, çerçeve skip frames, reduce the sampling rate of + atlayabilirsiniz, kendi ses aygÄątÄąnÄązÄąn Ăśrnekleme oranÄąnÄą azaltabilirsiniz, + Ăśnbelleği arttÄąrabilirsiniz. BĂślĂźm 13'e bakÄąn: "YapÄąlandÄąrma (seçenekler) + dosyasÄą" + cycles=max ya da =auto kullanÄąrsanÄąz, arka plan işlemlerinin + karışmadığına emin olunuz! (Ăśzellikle sabit diske erişiyorlarsa) + AyrÄąca BĂślĂźm 10'a bakÄąn: "DOSBox'ta nasÄąl hÄąz arttÄąrÄąlÄąr/aşağıya düşürĂźlĂźr" + + +KLAVYE: DOSBox'ta \ ya da : yazamÄąyorum. + Bu, çeşitli durumlarda olabilir, kendi ana klavye dĂźzeniniz gibi eşleşen dĂźzenini + DOS dĂźzeni temsili yok (ya da doğru algÄąlanmadÄą), ya da tuş eşleştiriciniz + yanlış. + BazÄą olasÄą dĂźzeltmeler:: + 1. Yerine / kullanÄąn ya da : için ALT-58 ile \ için ALT-92. + 2. DOS klavye dĂźzeninizi değiştirin (BĂślĂźm 8'e bakÄąn: Klavye DĂźzeni). + 3. ÇalıştÄąrmak istediğiniz komutlarÄą DOSBox yapÄąlandÄąrma dosyasÄąnda + [autoexec] bĂślĂźmĂźne ekleyin.of the DOSBox configuration file. + 4. DOSBox yapÄąlandÄąrma dosyasÄąnÄą açĹn ve usescancodes girişini + değiştirin. + 5. Switch the keyboard layout of your operating system. + + Dikkat edin, ana dĂźzeniniz tanÄąmlanamÄąyorsa ya da DOSBox yapÄąlandÄąrma + dosyasÄąnda keyboardlayout hiçbirine ayarlanmamışsa, standart ABD dĂźzeni + kullanÄąlÄąr. Bu yapÄąlandÄąrmada \ (ters bĂślĂź işareti) tuşu için "yeni + satÄąr"'Äąn yanÄąnda olan tuşlarÄą deneyin ve : (iki nokta) tuşu için Ăźst + karakter ile "yeni satÄąr" ve "L" tuşlarÄąnÄąn arasÄąnda olan tuşlarÄą kullanÄąn. + + +KLAVYE: DOSBox'ta Sağ Üst Karakter ile "\" çalışmÄąyor. (yalnÄązca Windows) + Bu, bazÄą uzaktan kumanda aygÄątlarÄąnÄą kullandığınÄązda Windows, + bilgisayarÄąnÄąza birden çok klavye bağlÄą olduğunu sanÄąrsa bu olabilir. + Bu sorunu doğrulamak için cmd.exe'yi çalıştÄąrÄąn, DOSBox program dizinine + gidin ve yazÄąn: + set sdl_videodriver=windib + dosbox.exe + klavyenin dĂźzgĂźn çalışmaya başladığınÄą denetleyin. windib yavaş olduğu için + en iyisi iki çÜzĂźmden birini burada sağlanan iki çÜzĂźmden birini kullanÄąn: + http://vogons.zetafleet.com/viewtopic.php?t=24072 + + +KLAVYE: Klavye takÄąlÄąyor. + DOSBox yapÄąlandÄąrma dosyasÄąnda Ăśncelik ayarÄą düşük, Ăśrneğin + "priority=normal,normal" ayarlÄą. Daha düşük çevirim hÄązÄą denemeyiYou might also want to try lowering the + isteyebilirsiniz (BaşlangĹç için sabit çevirim değeri kullanÄąn, Ăśrneğin cycles=10000). + + +DENETÄ°M: Karakter/imleç/fare işaretçisi hep bir yĂśne ilerliyor! + Yine oluyorsa joystick benzetimini devre dışı bÄąrakmayÄą bakÄąn, + DOSBox'unuzun yapÄąlandÄąrma dosyasÄąnda [joystick] bĂślĂźmĂźnde + joysticktype=none olarak ayarlayÄąn. Belki de herhangi bir oyun çubuğu/oyun kolu sĂśkĂźlmüştĂźr. + Oyunda joystick kullanmak istiyorsanÄąz, timed=false olarak ayarlayÄąn + ve joystickin ayarlandığına emin olun (hem işletim sisteminizde hem de + oyun ya da oyunun kurulum programÄąnda). + + +HIZ: Oyun/uygulama çok yavaş/hÄązlÄą çalışıyor! + Daha çok bilgi için bĂślĂźm 10'a bakÄąn: "DOSBox nasÄąl hÄązlandÄąrÄąlÄąr/ + yavaşlatÄąlÄąr" + + +ÇÖKME: Oyun/uygulama hiç çalışmaz/çÜkĂźyor! + BĂślĂźm 11'e bakÄąn: Sorun Giderme + + +ÇÖKME: DOSBox açĹlışta çÜkĂźyor! + BĂślĂźm 11'e bakÄąn: Sorun Giderme + + +OYUN: Benim yapÄąlÄą oyunumun(Duke3D/Blood/Shadow Warrior) sorunlarÄą var. + Herşeyden Ăśnce, oyunun bir portunu bulmayÄą çalışın. Bu, daha iyi bir + deneyim sunacaktÄąr. DOSBox'ta yĂźksek çÜzĂźnĂźrlĂźklerde ortaya çĹkan grafik + sorununu çÜzmek için: DOSBox'un yapÄąlandÄąrma dosyasÄąnÄą açĹn ve + machine=svga_s3'Ăź arayÄąn. svga_s3'ten vesa_nolfb'yi değiştirin. + memsize=16'yÄą memsize=63'e değiştirin. + + +GÜVENLÄ°K: DOSBox benim bilgisayarÄąma zarar verir mi? + DOSBox, diğer kaynak isteyen programdan daha çok zarar veremez. Çevrimi + arttÄąrmak, gerçek CPU'nuzu hÄąz aşırtmak değildir. Çevirimi çok yĂźkseğe + ayarlamak DOSBox içinde çalışan yazÄąlÄąma olumsuz başarÄąm etkisi yapar. + + +SEÇENEKLER: DOSBox'un seçeneklerini dĂźzenlemek istiyorum.. + BĂślĂźm 13'e bakÄąn: "YapÄąlandÄąrma (seçenekler) dosyasÄą" + + +HELP: Ä°yi klavuz, ama ben yine de anlamadÄąm. + Daha çok soru için bu klavuzun geri kalanÄąnÄą okuyun. AyrÄąca, bakabilirsiniz: + klavuzlar http://vogons.zetafleet.com/viewforum.php?f=39 'da yerleşmiştir. + DOSBox'un wikisi http://www.dosbox.com/wiki/ için + Site/forum: http://www.dosbox.com + + + +============================== +3. Komut SatÄąrÄą Parametreleri: +============================== + +DOSBox'a verebileceğiniz komut satÄąrÄą seçeneklerine genel bakış. Çoğu durumda +bunun yerine DOSBox'un yapÄąlandÄąrma dosyasÄąnÄą kullanmak daha kolay olmasÄąna karşın. +BakÄąnÄąz: BĂślĂźm 13. "YapÄąlandÄąrma (Seçenekler) DosyasÄą" + +Komut satÄąrÄą parametrelerini kullanmak için: +(Windows) cmd.exe'yi ya da command.com'u açĹn ya da kÄąsayol dosbox.exe'yi + dĂźzenleyin +(Linux) konsolu kullanÄąn +(MAC OS X) start terminal.app'Äą başlatÄąn ve + /applications/dosbox.app/contents/macos/dosbox'a gidin. + +Seçenekler açĹklamasÄąnda belirtilmediği sĂźrece bu seçenekler, bĂźtĂźn işletim +sistemleri için geçerlidir: + +dosbox [isim] [-exit] [-c komut] [-fullscreen] [-userconf] + [-conf yapÄąlandÄąrma_dosyasÄą_konumu] [-lang dil_dosyasÄą_konumu] + [-machine makine_tĂźrĂź] [-noconsole] [-startmapper] [-noautoexec] + [-securemode] [-scaler Ăślçekleyici | -forcescaler Ăślçekleyici] [-version] + [-socket soket] + +dosbox -version +dosbox -editconf program +dosbox -opencaptures program +dosbox -printconf +dosbox -eraseconf +dosbox -erasemapper + + name + "isim" bir dizin ise C: sĂźrĂźcĂźsĂź olarak bağlanÄąr. + "isim" bir çalıştÄąrÄąlabilir ise "isim" dizini C: sĂźrĂźcĂźsĂź olarak + bağlanÄąr ve "isim"'i çalıştÄąrÄąr. + + -exit + DOSBox, "isim" DOS uygulamas bittiğinde kendi kendine kapanacaktÄąr. + + -c command + "isim" çalıştÄąrÄąlmadan Ăśnce belirtilen komutu çalıştÄąrÄąr. Birden çok + komut belirtilebilir. Fakat, her komut "-c" ile başlamalÄądÄąr. + Bir komut: bir iç program, bir DOS komutu ya da bağlanmış sĂźrĂźcĂźde bir + çalıştÄąrÄąlabilir dosya olabilir. + + -fullscreen + DOSBox'u tam ekran kipinde başlatÄąr. + + -userconf + DOSBox'u kullanÄącÄąlarla Ăśzel yapÄąlandÄąrma dosyasÄą ile başlatÄąr. Birden + çok -conf parametresi ile birlikte belirtebilirsiniz, ama -userconf + her zaman onlardan Ăśnce yĂźklenir. + + -conf yapÄąlandÄąrma_dosyasÄąn_konumu + DOSBox'u "yapÄąlandÄąrma_dosyasÄą_konumu" ile belirtilen seçeneklerle + başlatÄąr. Birden çok -conf seçenekleri mevcut olabilir. + Daha çok ayrÄąntÄą için BĂślĂźm 13'e bakÄąnÄąz. + + -lang dil_dosyasÄą_konumu + DOSBox'u "dil_dosyasÄą_konumu" ile belirtilen dili kullanarak başlatÄąr. + Daha çok ayrÄąntÄą için BĂślĂźm 14'e bakÄąnÄąz. + + -machine machinetype + DOSBox'u belirli makine tĂźrĂźnĂźn benzetimini yapmak için kurar. Geçerli + seçenekler: hercules, cga, ega, pcjr, tandy, svga_s3 (varsayÄąlan) + hem de DOSBox yapÄąlandÄąrma dosyasÄąnda listelenmiş ek SVGA yonga + setleri. + svga_s3 vesa benzetimini de etkinleştirir. + Bazi belirli VGA etkileri için makine tĂźrĂź vgaonly kullanabilir, + dikkat edin, bu SVGA yeteneklerini ve daha yĂźksek benzetim + duyarlÄąlığında yavaş olabilir. + machinetype, video kartÄąna ile mevcut ses kartlarÄąnÄą etkiler. + + -noconsole (YalnÄązca Windows) + DOSBox'u DOSBox Durum Penceresi (konsol) gĂśrĂźntĂźlenmeden başlatÄąr. + ÇıktÄą stdout.txt ile stderr.txt'ye yĂśnlendirilir. + + -startmapper + BaşlangĹçta tuş eşleştiricisine gidilir. Klavye sorunlarÄą olan insanlar + için kullanışlÄądÄąr. + + -noautoexec + YapÄąlandÄąrma dosyasÄąnda yĂźklenen [autoexec] bĂślĂźmĂźnĂź atlar. + + -securemode + -noautoexec ile aynÄądÄąr, ama AUTOEXEC.BAT'Äąn sonuna + config.com -securemode ekler. (bir de DOSBox içinde sĂźrĂźcĂźlerin nasÄąl + bağlandığına karşı her değişikliklikleri devre dışı bÄąrakÄąr.) + + -scaler Ölçekleyici + "Ölçekleyici" ile belirlenmiş Ăślçekleyiciyi kullanÄąr. Mevcut + Ăślçekleyiciler için DOSBox yapÄąlandÄąrma dosyasÄąna bakÄąnÄąz. + + -forcescaler Ölçekleyici + -scaler parametresi ile benzerdir, ama uygun olmayabiliyorsa bile + belirtilen Ăślçekleyiciyi kullanÄąma zorlar. + + -version + SĂźrĂźm bilgisini gĂśrĂźntĂźler ve çĹkar. KullanÄącÄą arayĂźzĂź için + kullanışlÄądÄąr. + + -editconf program + program'Äą ilk parametresi yapÄąlandÄąrma dosyasÄą olarak çağırÄąr. + Birden çok komut belirtebilirsiniz. Bu durumda birincisi başlatma + başarÄąsÄąz ise ikinci programa geçer. + + -opencaptures program + program'Äą ilk parametresi olarak yakalama dizininin konumu ile çağırÄąr. + + -printconf + VarsayÄąlan yapÄąlandÄąrma dosyasÄąnÄąn konumunu yazdÄąrÄąr. + + -resetconf + VarsayÄąlan yapÄąlandÄąrma dosyasÄąnÄą siler. + + -resetmapper + VarsayÄąlan saf yapÄąlandÄąrma dosyasÄąnÄą kullanarak tuş eşleştiricisi + dosyasÄąnÄą siler. + + -socket + Kukla modem benzetimi için soket numarasÄąnÄą geçirir. BĂślĂźm 9: + "Seri Çok Oyuncu Özelliği"'ne bakÄąnÄąz: + +Not: Bir isim/komut/yapÄąlandÄąrma_dosyasÄą_konumu/dil_dosyasÄą_konumu bir + boşluk içeriyorsa, ismin/komutun/yapÄąlandÄąrma_dosyasÄą_konumu/ + dil_dosyasÄą_konumu tamamÄąnÄą tÄąrnak işaretleri arasÄąna koyun ("komut + ya da dosya ismi"). Çift tÄąrnak işaretleri içinde tÄąrnak işareti + kullanmaya ihtiyaç duyarsanÄąz (bĂźyĂźk bir olasÄąlÄąkla -c ve mount ile + birlikte):Windows ile OS/2 kullanÄącÄąlarÄą çift tÄąrnak işaretleri içine tek + tÄąrnak işareti kullanabilirsiniz. Diğer herkes çift tÄąrnak arasÄąnda çift + tÄąrnak kaçış karakteri kullanabilir. + Windows: -c "mount c 'c:\DOS oyunlarÄą dizinim\'" + Linux: -c "mount c \"/tmp/boşluk ile isim\"" + +Oldukça sÄąradışı bir Ăśrnek, yalnÄązca neler yapabileceğinizi gĂśstermek için (Windows): +dosbox D:\dizin\dosya.exe -c "MOUNT Y H:\Dizinim" + Bu D:\dizin'i C:\ olarak bağlar ve dosya.exe'yi çalıştÄąrÄąr. + Bunu yapmadan Ăśnce, H:\Dizinim'i Y sĂźrĂźcĂźsĂź olarak bağlar. + +Windows'ta, ayrÄąca DOSBox çalıştÄąrÄąlabilir dosyanÄąn Ăźzerine dizinleri/dosyalarÄą +sĂźrĂźkleyebilirsiniz. + + + +================= +4. İç Programlar: +================= + +DOSBox command.com'da bulunan çoğu DOS komutunu destekler. +İç komutlarÄąn bir listesini almak için istemciye "HELP" yazÄąn. + +Ek olarak, aşağıdaki komutlarda mevcuttur: + +MOUNT "Benzetimi yapÄąlan sĂźrĂźcĂź harfi" "Gerçek sĂźrĂźcĂź ya da dizin" + [-t tĂźr] [-aspi] [-ioctl] [-noioctl] [-usecd sayÄą] [-size sĂźrĂźcĂź_boyutu] + [-label sĂźrĂźcĂź_etiketi] [-freesize MB_cinsindem_boyutu] + [-freesize KB_cinsinden_boyutu (disketler)] +MOUNT -cd +MOUNT -u "Benzetimi yapÄąlan sĂźrĂźcĂź harfi" + + DOSBox içerisine yerel dizinleri sĂźrĂźcĂź olarak bağlayan programdÄąr. + + "Benzetimi yapÄąlan sĂźrĂźcĂź harfi" + DOSBox içerisinde sĂźrĂźcĂź harfi (Ăśrneğin C). + + "Gerçek sĂźrĂźcĂź harfi(çoğunlukla Windows'ta CD-ROM'lar için) ya da dizin" + DOSBox içerisinde erişmek istediğiniz yerel dizin. + + -t tĂźr + Bağlanmış dizinin tĂźrĂź. + Desteklenen: dir (varsayÄąlan), floppy, cdrom. + + -size sĂźrĂźcĂź_boyutu + (yalnÄązca uzmanlar) + "bps,spc,tcl,fcl" biçiminde olan sĂźrĂźcĂźnĂźn boyutunu ayarlar: + bps: sektĂśr başına bayt, sÄąradan sĂźrĂźcĂźelr için 512 ve CD-ROM + sĂźrĂźcĂźleri için 2048 + spc: silindir başına sektĂśr, çoğunlukla 1 ile 127 arasÄąnda + tcl: toplam silindir, 1 ile 65534 arasÄąnda + fcl: toplam boş silindir, 1 ile tcl arasÄąnda + + -freesize MB_cinsinden_boşluk | KB_cinsinden_boyut + SĂźrĂźcĂźde bulunan boş alanÄą megabayt (sÄąradan sĂźrĂźcĂźler) ya da kilobayt + (disket sĂźrĂźcĂźleri) cinsinden ayarlar. + Bu, -size'nin daha basit sĂźrĂźmĂźdĂźr. + + -label sĂźrĂźcĂź_etiketi + SĂźrĂźcĂźnĂźn etiketini "sĂźrĂźcĂź_etiketi" olarak ayarlar. BazÄą sistemlerde Needed on some systems + CD-ROM etiketi doğru okunmuyorsa (program kendi CD-ROM'unu bulamazsa + kullanışlÄądÄąr) gereklidir. Bir etiket belirtmezseniz ve alt dĂźzey + desteği seçilmezse (-usecd # ya da -aspi parametreleri koymadığınÄązda + ya da -noioctl belirtiğinizde): + Windows için: Gerçek sĂźrĂźcĂźden alÄąnan etiket. + For Linux: Etiket NO_LABEL olarak ayarlanÄąr. + + Etiket belirtirseniz, bu etiket sĂźrĂźcĂź bağlÄą olduğu sĂźrece + korunacaktÄąr. Bu gĂźncellenmeyecektir !! + + -aspi + ASPI katmanÄąnÄą kullanmaya zorlar. YalnÄązca, Windows sistemi ile + birlikte ASPI katmanÄą altÄąnda CD-ROM bağlanacaksa geçerlidir. + + -ioctl (Kendiliğinden ses CD'si arayĂźzĂź seçimi) + -ioctl_dx (Ses CD'si için sayÄąsal ses elde edilimi) + -ioctl_dio (Ses CD'si için ioctl çağrÄąsÄą kullanma) + -ioctl_mci (Ses CD'si için MCI kullanma) + ioctl komutlarÄąnÄą kullanmaya zorlar. YalnÄązca onlara destek veren + Windows işletim sistemlerinde CD-ROM bağlanacaksa geçerlidir. + (Win2000/XP/NT) + Çeşitli seçimler yalnÄązca ses CD'si işlendiği şeklinde farklÄą olur, + Ăśncelikli olarak -ioctl_dio kullanÄąlÄąr (en düşük iş yĂźkĂź), ama bu bĂźtĂźn + sistemlerde çalışmayabilir, bu yĂźzden -ioctl_dx (ya da -ioctl_mci) + kullanÄąlÄąr. + + -noioctl + SDL CD-ROM katmanÄąnÄą kullanmaya zorlar. BĂźtĂźn sistemlerde geçerlidir. + + -usecd sayÄą + BĂźtĂźn sistemlerde geçerlidir, Windows altÄąnda -usecd seçeneğini + kullanmak için -noioctl seçeneği olmasÄą zorunludur. + SDL tarafÄąndan kullanÄąlan sĂźrĂźcĂźleri etkinleştirir. Bunu, SDL CD-ROM + arayĂźzĂź kullandığınÄązda yanlış ya da hiç CD-ROM sĂźrĂźcĂźsĂź bağlanmamışsa + kullanÄąn. "sayÄą", "MOUNT -cd" tarafÄąndan bulunabilir. + + -cd + SDL tarafÄąndan algÄąlanan bĂźtĂźn CD-ROM sĂźrĂźcĂźlerini ile onlarÄąn + numaralarÄąnÄą gĂśrĂźntĂźler. YukarÄądaki -usecd maddesindeki bilgiye bakÄąn. + + -u + Bağı kaldÄąrÄąr. Z:\ için çalışmaz. + + Not: Bir yerel dizini CD-ROM sĂźrĂźcĂźsĂź olarak bağlamak olanaklÄądÄąr, ama + donanÄąm desteği eksiktir. + + AslÄąnda MOUNT DOSBox'un benzetimini yaptığı bilgisayar için gerçek donanÄąma + bağlanmanÄąza izin verir. + Bu yĂźzden MOUNT C C:\OYUNLAR, DOSBox'a sizin C:\OYUNLAR dizininizi DOSBox + içinde C: sĂźrĂźcĂźsĂź olarak kullanÄąlacağınÄą bildirir. MOUNT C E:\BirDizin, + DOSBox'a sizin E:\BirDizin dizininizi DOSBox içinde C: sĂźrĂźcĂźsĂź olarak + kullanÄąlacağınÄą bildirir. + + BĂźtĂźn C sĂźrĂźcĂźnĂźzĂź MOUNT C C:\ ile bağlanmasÄą Ăśnerilmez. AynÄą durum, + CD-ROM'lar dışında (yalnÄąz okunur yapÄąsÄą nedeniyle) başka bir sĂźrĂźcĂźnĂźn + kĂśkĂźne bağlamak için doğrudur. + Bunun dışında siz ya da DOSBox bir hata yaparsanÄąz bĂźtĂźn dosyalarÄąnÄązÄą + kaybedebilirsiniz. AyrÄąca hiçbir zaman Windows Vista/7'de asla "Windows" + ya da "Program Files" dizinleri ya da onlarÄąn alt dizinlerini bağlamayÄąnÄąz, + çßnkĂź DOSBox dĂźzgĂźn çalışmayabilir ya da dĂźzgĂźn çalışmadan sonra durabilir. + BĂźtĂźn DOS uygulamalarÄąnÄązÄą/oyunlarÄąnÄązÄą bir basit dizinde tutmanÄąz + (Ăśrneğin c:\dosoyunlarÄą) ve onu bağlamanÄąz Ăśnerilir. + + OyunlarÄąnÄązÄą, her zaman DOSBox içinde kurmalÄąsÄąnÄąz. + Bu yĂźzden, siz CD'de oyuna sahipseniz her zaman (kurulumdan sonra!) ikisini + bağlamak zorundasÄąnÄąz: sabit disk sĂźrĂźcĂźsĂź ya da CD-ROM olarak dizin. + Sabit disk her zaman c olarak bağlanmalÄądÄąr. + CD-ROM her zaman d olarak bağlanmalÄądÄąr. + Disket her zaman a (ya da b) olarak bağlanmalÄądÄąr.) + + SÄąradan kullanÄąm için temel MOUNT Ăśrnekleri (Windows): + + 1. Bir dizini bir sabit disk sĂźrĂźcĂźsĂź olarak bağlamak için: + mount c d:\dosoyunlarÄą + + 3. E: CD-ROM sĂźrĂźcĂźnĂźzĂź DOSBox'ta D: CD-ROM sĂźrĂźcĂźsĂź olarak bağlamak için: + mount d e:\ -t cdrom + + 2. A: sĂźrĂźcĂźnĂźzĂź disket olarak bağlamak için: + mount a a:\ -t floppy + + Ä°leri MOUNT Ăśrnekleri (Windows): + + 4. Bir sabit disk sĂźrĂźcĂźsĂźnĂź ~870 MB boş disk alanÄą ile bağlamak için (basit + biçim): + mount c d:\dosoyunlarÄą -freesize 870 + + 5. Bir sabit disk sĂźrĂźcĂźsĂźnĂź ~870 MB boş disk alanÄą ile bağlamak için + (yanlÄązca uzmanlar, tam denetim): + mount c d:\oyunlarÄą -size 512,127,16513,13500 + + 1. c:\dosoyunlarÄą\disket'i bir disket olarak bağlamak için: + mount a c:\dosoyunlarÄą\disket -t floppy + + + Diğer MOUNT Ăśrnekleri: + + 3. DOSBox'ta /media/cdrom bağlanma noktasÄąndaki sistemin CD-ROM sĂźrĂźcĂźsĂźnĂź + CD-ROM sĂźrĂźcĂźsĂź D olarak bağlamak içinin DOSBox: + mount d /media/cdrom -t cdrom -usecd 0 + + 6. DOSBox'ta /home/user/dosoyunlarÄą'i C sĂźrĂźcĂźsĂź olarak bağlamak için: + mount c /home/user/dosoyunlarÄą + + 7. DOSBox'ta DOSBox'un başladığı dizini C sĂźrĂźcĂźsĂź olarak bağlamak için: + mount c . + (not . DOSBox'un başladığı dizini belirtir, Windows Vista/7'de + DOSBox'u "Program Files" dizininize kurmuşsanÄąz bunu kullanmayÄąn.) + + CD kalÄąbÄą ya da disket kalÄąbÄą bağlamak isterseniz IMGMOUNT'u gĂśzden + geçirin. AynÄą zamanda, dış program kullanÄąyorsanÄąz MOUNT + kalÄąplarla da çalışır,Ăśrneğin (ikiside Ăźcretsizdir): + - Daemon Tools Lite (CD kalÄąplarÄą için), + - Virtual Floppy Drive (disket kalÄąplarÄą için). + Gerçi IMGMOUNT en iyi uyumluluğu verebilir. + + +MEM + Serbest bellek miktarÄąnÄą ile tĂźrĂźnĂź gĂśrĂźntĂźlemek için programdÄąr. + + +VER +VER set ana_sĂźrĂźm [ikincil_sĂźrĂźm] + Geçerli DOSBox sĂźrĂźmĂźnĂź gĂśrĂźntĂźler ve bildirir (parametresiz kullanÄąm). + Bildirilen DOS sĂźrĂźmĂźnĂź "set" parametresi ile değiştirir, + Ăśrneğin: DOSBox'un, sĂźrĂźm numarasÄą olarak DOS 6.22'yi bildirmesi için + "VER set 6 22". + +CONFIG -writeconf dosya_konumu +CONFIG -writelang dosya_konumu +CONFIG -securemode +CONFIG -set "bĂślĂźm Ăśzellik=değer" +CONFIG -get "bĂślĂźm Ăśzellik" + + CONFIG DOSBox'un ayarlarÄąnÄą çalışma zamanÄą sÄąrasÄąnda değiştirmek ya da + sorgulamak için kullanÄąlabilir. Bu geçerli ayarlarÄą ile dil katarlarÄąnÄą diske + kaydedebilir. BĂślĂźm 13: "YapÄąlandÄąrma (seçenekler) dosyasÄą"'nda olasÄą + bĂślĂźmler ile Ăśzellikler hakkÄąnda bilgi bulunabilir. + + -writeconf dosya_konumu + Geçerli yapÄąlandÄąrma ayarlarÄąnÄą belirtilen konumda bir dosyaya yazar. + "dosya_konumu" yerel sĂźrĂźcĂźde bulunur, DOSBox'ta bağlanmış sĂźrĂźcĂźde değil. + YapÄąlandÄąrma dosyasÄą DOSBox'un çeşitli ayarlarÄąnÄą denetler: + benzetimi yapÄąlan bellek miktarÄą, benzetimi yapÄąlan ses kartlarÄą ile çok + şeyler. AyrÄąca, bu AUTOEXEC.BAT'a erişimine olanak verir. + Daha çok bilgi için BĂślĂźm 13: "YapÄąlandÄąrma (ayarlar) dosyasÄą"'na bakÄąnÄąz. + + -writelang dosya_konumu + Geçerli dil ayarlarÄąnÄą belirtilen konumda bir dosyaya yazar. + "dosya_yolu" yerel sĂźrĂźcĂźde bulunur, DOSBox'ta bağlanmış sĂźrĂźcĂźde değil. + Dil dosyasÄą, iç komutlarÄąn ile iç DOS'un bĂźtĂźn gĂśrĂźnĂźr çĹktÄąyÄą denetler. + Daha çok bilgi için BĂślĂźm 14: "Dil DosyasÄą"'na bakÄąnÄąz. + + -securemode + DOSBox daha gĂźvenli kipe geçer. Bu kipte MOUNT, IMGMOUNT ile BOOT iç + komutlarÄą çalışmaz. Bu kipte yeni bir yapÄąlandÄąrma dosyasÄą ya da dil + dosyasÄą oluşturmak olanaklÄą değildir. + (UyarÄą: YalnÄązca DOSBox'u yeniden başlatarak bu kipi geri alabilirsiniz.) + + -set "bĂślĂźm Ăśzellik=değer" + CONFIG Ăśzelliği yeni değere ayarlamaya çalışır. + Şu anda CONFIG komutun başarÄąlÄą olmasÄąnÄą ya da olmamasÄąnÄą bildiremez. + + -get "bĂślĂźm Ăśzellik" + Özelliğin geçerli değerini bildirir ve %CONFIG% ortam değişkenine yĂźkler. + Bu, toplu iş dosyalarÄą kullanÄąldığı zaman değeri yĂźklemek için + kullanÄąlabilir. + + "-set" ile "-get" ikiside toplu iş dosyalarÄąnda her oyun için kendi + Ăśzelliklerinizi dĂźzenlemek için kullanabilirsiniz. Gerçi her oyun için bu yerine + DOSBox'un ayrÄą yapÄąlandÄąrma dosyalarÄą kullanmak daha kolay olabilir.s + + Örnekler: + 1. c:/dosoyunlarÄą dizininizde bir yapÄąlandÄąrma dosyasÄą oluşturmak için: + config -writeconf c:\dosoyunlarÄą\dosbox.conf + 2. CPU çevrimini 10000'e ayarlamak için: + config -set "cpu cycles=10000" + 3. EMS belleği benzetimini kapatmak için: + config -set "dos ems=off" + 4. Hangi CPU çekirdeğini kullanÄąldığınÄą bakmak için: + config -get "cpu core" + + +LOADFIX [-size] [program] [program_parmaetreleri] +LOADFIX -f + Geleneksel belleğin miktarÄąnÄą düşürmek için program. + Çok serbest bellek beklemeyen eski programlar için kullanışlÄądÄąr. + + -size + "TĂźketilen" kilobayt sayÄąsÄą, varsayÄąlan = 64kb + + -f + Önceden ayrÄąlmış bĂźtĂźn belleği serbest bÄąrakÄąr. + + Örnekler: + 1. mm2.exe'yi başlatmak ve 64 KB bellek ayÄąrmak için + (mm2 64 KB'tan daha az kullanÄąlabilir): + loadfix mm2 + 2. mm2.exe'yi başlatmak ve 32 KB bellek ayÄąrmak için: + loadfix -32 mm2 + 3. Önceden ayrÄąlmış belleği serbest bÄąrakmak için: + loadfix -f + + +RESCAN + DOSBox'u dizin yapÄąsÄąnÄą yeniden okumasÄąnÄą sağlar. DOSBox dışında + bir bağlanmış sĂźrĂźcĂźde bir şeyleri değiştirdiyseniz kullanışlÄądÄąr. + (CTRL - F4 de bunu yapabilir!) + + +MIXER + DOSBox'un geçerli ses ayarlarÄąnÄą gĂśrĂźntĂźlemesini sağlar. + Burada onlarÄą nasÄąl değiştirebilirsiniz: + + mixer kanal sol:sağ [/NOSHOW] [/LISTMIDI] + + kanal + Belirtilenlerden biri olabilir: + MASTER, DISNEY, SPKR, GUS, SB, FM [, CDAUDIO]. + CDAUDIO yalnÄązca CD-ROM arayĂźzĂź ile birlikte ses denetimi etkinse + geçerlidir (CD kalÄąbÄą, ioctl_dx). + + sol:sağ + YĂźzde cinsinden ses dĂźzeyleri. Önde bir D koyarsanÄąz desibel anlamÄąna + gelir. (Örneğin: mixer gus d-10). + + /NOSHOW + Ses dĂźzeylerinden birini ayarlarsanÄąz DOSBox'un sonucu + gĂśrĂźntĂźlemesini Ăśnler. + + /LISTMIDI + Windows'ta bilgisayarÄąnÄązda mevcut midi aygÄątlarÄąnÄą listeler. Windows'un + varsayÄąlan midi eşleştiricisinden başka bir aygÄąt seçmek için, + yapÄąlandÄąrma dosyasÄąnda [midi] bĂślĂźmĂźde 'midiconfig=' satÄąrÄąnÄą + 'midiconfig=kimlik' olarak değiştirin, burada 'kimlik' LISTMIDI tarafÄąndan + listelenen aygÄąt için numaradÄąr. Örneğin midiconfig=2 + + Linux'ta bu seçenek çalışmaz, ama konsolda 'pmidi -l' kullanrak benzer + sonuçlar elde edebilirsiniz. Ondan sonra 'midiconfig=' satÄąrÄąnÄąThen change the line 'midiconfig=' to 'midiconfig=port' + 'midiconfig=bağlantÄą_noktasÄą' olarak değiştirin, burada 'bağlantÄą_noktasÄą' + 'pmidi -l' tarafÄąndan listelenen aygÄąt için bağlantÄą noktasÄądÄąr. + Örneğin midiconfig=128:0 + + +IMGMOUNT + DOSBox'ta disk kalÄąplarÄąnÄą ile CD-ROM kalÄąplarÄąnÄą bağlamak için araç. + + IMGMOUNT DRIVE [kalÄąp_dosyasÄą] -t [kalÄąp_tĂźrĂź] -fs [kalÄąp_biçimi] + -size [sektĂśrlerin_bayt_boyutu, kafa_başına_sektĂśr_sayÄąsÄą, kafalar, silindirler] + IMGMOUNT DRIVE [kalÄąp_dosyasÄą_1 kalÄąp_dosyasÄą_2 .. kalÄąp_dosyasÄą_N] -t cdrom -fs iso + + imagefile + DOSBox'ta bağlamak için kalÄąp dosyasÄąnÄąn konumu. Konum, DOSBox içinde + bağlanmış sĂźrĂźcĂźde ya da kendi gerçek diskinizde olabilir. Bu, CD-ROM + kalÄąplarÄą (ISOs ya da CUE/BIN ya da CUE/IMG) bağlamak için de + olanaklÄądÄąr. CD takas yeteneğine gereksinim duyarssanÄąz, bĂźtĂźn + kalÄąplarÄą art arda belirtin (Bir sonraki maddeye bakÄąn). + CUE/BIN çiftleri ile CUE/IMG, ISO'lar (yalnÄąz veri olan) ile ses izlerini + saklanabilir olarak karşılaştÄąrÄąldığında Ăśncelikli CD-ROM kalÄąbÄą + tĂźrleridir. CUE/BIN bağlamak için her zaman CUE sayfasÄąnÄą belirtin. For + the CUE/BIN mounting always specify the CUE sheet. + + kalÄąp_dosyasÄą_1 kalÄąp_dosyasÄą_2 .. kalÄąp_dosyasÄą_N + DOSBox'ta bağlamak için kalÄąp dosyalarÄąnÄąn konumu. Birkaç kalÄąp dosyalarÄą + belirtmek yalnÄązca CD-ROM kalÄąplarÄąna izin verilir. + CD'ler her zaman CTRL-F4 ile takas yapÄąlabilir. + Bu birçok CD-ROM kullanan oyunlar için gereklidir ve oyun sÄąrasÄąnda bazÄą noktalarda + değişimi yapÄąlmasÄąnÄą gerektirir. + + -t + Aşağıdaki geçerli kalÄąp tĂźrleri: + floppy: Bir disket kalÄąbÄą belirtir. DOSBox disk geometrisini + kendiliğinden tanÄąmlayacaktÄąr(360K, 1.2MB, 720K, 1.44MB ve + benzeri). + cdrom: CD-ROM kalÄąbÄą belirtilir. Geometri, kendiliğinden ve bu boyut + için ayarlanÄąr. Bu bir ISO ya da bir CUE/BIN çifti ya da + CUE/IMG çifti olabilir. + hdd: Sabit disk kalÄąbÄą belirtir. Bunun çalışmasÄą için uygun CHS + geometrisi ayarlanmış olmalÄądÄąr. + + -fs + Aşağıdaki geçerli dosya sistemi biçimleri: + iso: ISO 9660 CD-ROM biçimi belirtir. + fat: KalÄąbÄąn FAT dosya sistemini kullandığınÄą belirtir. DOSBox bu will + kalÄąbÄą bir sĂźrĂźcĂź olarak bağlamaya çalışacak ve DOSBox içinde + dosyalarÄą erişilir kÄąlar. + none: DOSBox dosya sistemini okumak için hiçbir girişim yapmayacaktÄąr. + Bu onu biçimlendirmeye gereksinim duyarsanÄąz ya da diski BOOT + komutunu kullanarak ĂśnyĂźklemek isterseniz kullanışlÄądÄąr. "none" + dosya sistemi kullanÄąldığında, bir sĂźrĂźcĂź harfi yerine sĂźrĂźcĂź + numarasÄąnÄą (2 or 3, burada 2 = ana, 3 = bağımlÄą) belirtmelisiniz. + Örneğin, 70 MB bir kalÄąbÄą bağımlÄą sĂźrĂźcĂź aygÄątÄą olarak bağlamak için + şunlarÄą yazÄąn (tÄąrmak işaretleri olmadan): + "imgmount 3 d:\sÄąnama.img -size 512,63,16,142 -fs none" + Okumuş olduğunuzu, DOSBox içinde sĂźrĂźcĂźye erişmek için bir bağlama ile + karşılaştÄąrÄąn: + "imgmount e: d:\sÄąnama.img -size 512,63,16,142" + + -size + SĂźrĂźcĂźnĂźn Silindirleri, KafalarÄą ile SektĂśrleri. + Sabit disk kalÄąbÄą bağlamak için gereklidir. + + NasÄąl CD-ROM kalÄąplarÄąnÄą bağlanÄąlmasÄą için bir Ăśrnek (Linux'ta): + 1. imgmount d /tmp/cd_kalÄąbÄą_1.cue /tmp/cd_kalÄąbÄą_2.cue -t cdrom + ya da (ayrÄąca çalışır): + 2a. mount c /tmp + 2b. imgmount d c:\cd_kalÄąbÄą_1.cue c:\cd_kalÄąbÄą_2.cue -t cdrom + (Windows'ta): + imgmount d f:\img\CD1.cue f:\img\CD2.cue f:\img\CD3.cue -t cdrom + imgmount d "g:\img\7th Guest CD1.cue" "g:\img\7th Guest CD2.cue" -t cdrom + Unutma, ayrÄąca kalÄąplar ile MOUNT kullanabilirsiniz, ama dış program + kullanÄąrsanÄąz, Ăśrneğin (ikisi de Ăźcretsiz): + - Daemon Tools Lite (CD kalÄąplarÄą için), + - Virtual Floppy Drive (disket kalÄąplarÄą için). + Gerçi IMGMOUNT en iyi sonucu verebilir. + + +BOOT + BOOT, disket kalÄąplarÄąnÄą ya da sabit disk kalÄąplarÄąnÄą DOSBox tarafÄąndan + sunulan işletim sistemi benzetiminiden bağımsÄąz olarak başlatacaktÄąr. Bu + ĂśnyĂźklemeli disketleri oynamanÄąza ya da DOSBox içinde diğer işletim + sistemlerini ĂśnyĂźklemenize izin verir. Benzetimi yapÄąlan hedef sistem + PCjr ise (machine=pcjr) BOOT komutu PCjr kartuşlarÄąnÄą (.jrc) yĂźklemek için + kullanÄąlabilir. + + BOOT [disk_kalÄąbÄą_1.img disk_kalÄąbÄą_2.img .. disk_kalÄąbÄą_N.img] [-l sĂźrĂźcĂź_harfi] + BOOT [kart.jrc] (yalnÄązca PCjr) + + diskimg1.img diskimg2.img .. diskimgN.img + Bu, DOSBox belirtilen sĂźrĂźcĂź harfinden başlatÄąldÄąktan sonra birini + bağlanmak istenen disket kalÄąplarÄą herhangi bir sayÄąda olabilir. + KalÄąplar arasÄąnda geçiş yapmak için, geçerli diskten listede sonraki + diske değiştirmek için CTRL-F4'e basÄąn. Liste, en son disk kalÄąbÄąndan + başlangÄąca geri dĂśnecektir. + + [-l sĂźrĂźcĂź_harfi] + Bu parametre, ĂśnyĂźklenecek sĂźrĂźcĂźyĂź belirlemenize izin verir. + VarsayÄąlan olarak A sĂźrĂźcĂźsĂź, disket sĂźrĂźcĂźdĂźr. AyrÄąca tÄąrnak işaretleri + olmadan "-l C" belirterek ana olarak ya da "-l D" belirterek bağımlÄą + olarak bağlanmış bir sabit disk kalÄąbÄąndan başlatabilirsiniz. + + cart.jrc (PCjr only) + PCjr benzetimi etkinleştirildiğinde, kartuşlar BOOT komutu ile + yĂźklenebilir. Destek henĂźz sÄąnÄąrlÄądÄąr. + + +IPX + + DOSBox'un yapÄąlandÄąrma dosyasÄąnda IPX ağı iletişimini etkinleştirmeye + gereksinim duyarsÄąnÄąz. + + BĂźtĂźn IPX ağ iletişimini DOSBox iç program IPXNET aracÄąlığıyla yĂśnetilir. + DOSBox içinde IPX ağ iletişimi Ăźzerinde yardÄąm için, "IPXNET HELP" + (tÄąrnak işareti olmadan) yazÄąn ve program komutlarÄą ile konu ile ilgili + belgeleri listeleyecektir. + + AslÄąnda bir ağ kurmak bakÄąmÄąndan, bir sistemin sunucu olmasÄąna gereksinim + duyar. Bunu kurmak için, bir DOSBox oturumunda "IPXNET STARTSERVER" (tÄąrnak + işaretleri olmadan) yazÄąn. Sunucu DOSBox oturumu kendiliğinden kendini sanal + IPX ağına ekleyecektir. Her ek bilgisayar için sanal IPX ağınÄąn parçasÄą + olmalÄądÄąr, "IPXNET CONNECT " + yazmaya gereksinim duyarsÄąnÄąz. + Örneğin, sunucunuz bob.dosbox.com ise, bĂźtĂźn sunucu olmayan sistemlerde + "IPXNET CONNECT bob.dosbox.com" yazarsÄąnÄąz. + + Netbios'a gereksinim duyan oyunlarÄą oynamak için Novell'in NETBIOS.EXE isimli + bir dosya gereklidir. YukarÄąda açĹklandığı gibi IPX bağlantÄąsÄą kurun, sonra + "netbios.exe"'yi çalıştÄąrÄąn. + + Aşağıdaki bir IPXNET komutu referansÄą: + + IPXNET CONNECT + + IPXNET CONNECT, başka DOSBox oturumunda çalışan bir IPX tĂźnelleme sunucusu + için bir bağlantÄą açar. "Adres" parametresi sunucu bilgisayarÄąn adresini + ya da alan ismini belirtir. AyrÄąca kullanmak için UDP bağlantÄą noktasÄą + belirtebilirsiniz. VarsayÄąlan olarak IPXNET kendi bağlantÄąsÄą için bağlantÄą + noktasÄą 213'Ăź - IPX tĂźnelleme için ayrÄąlmış IANA bağlantÄą noktasÄą - + kullanÄąr. + + The syntax for IPXNET CONNECT için sĂśzdizimi: + IPXNET CONNECT adres + + IPXNET DISCONNECT + + IPXNET DISCONNECT, IPX tĂźnelleme sunucusuna bğlantÄąyÄą kapatÄąr. + + IPXNET DISCONNECT için sĂśzdizimi: + IPXNET DISCONNECT + + IPXNET STARTSERVER + + IPXNET STARTSERVER, bu DOSBox oturumunda IPX tĂźnelleme sunucusunu + başlatÄąr. VarsayÄąlan olarak, sunucu UDP 213 bağlantÄą noktasÄąnda + bağlantÄąyÄą onaylar, gerçi bu değiştirilebilir. Sunucu başlatÄąldÄąktan + sonra, DOSBox, IPX tĂźnelleme sunucusu için kendiliğinden bir istemci + bağlantÄąsÄą başlayacaktÄąr. + + IPXNET STARTSERVER için sĂśzdizimi: + IPXNET STARTSERVER + + Sunucu, bir yĂśnlendiricinin arkasÄąnda ise, UDP + bağlantÄą noktasÄą o bilgisayar için yĂśnlendirmeye gerekir. + + Linux/Unix tabanlÄą sistemlerde 1023'ten kßçßk bağlantÄą noktasÄą numaralarÄą + yalnÄązca yĂśnetici haklarÄą ile birlikte kullanÄąlabilir. O sistemlerde + 1023'ten bĂźyĂźk bağlantÄą noktalarÄą kullanÄąn. + + IPXNET STOPSERVER + + IPXNET STOPSERVER, bu DOSBox oturumunda IPX tĂźnelleme sunucusunu durdurur. + Diğer bĂźtĂźn bağlantÄąlarÄąn doğru şekilde sona ermesine emin olmak için + Ăśzen gĂśsterilmelidir, sunucuyu durdurduktan sonra IPX tĂźnelleme sunucusunu + yine kullanan diğer makinelerde kilitlenmelere neden olabilir. + + IPXNET STOPSERVER için sĂśzdizimi: + IPXNET STOPSERVER + + IPXNET PING + + IPXNET PING, IPX tĂźnelleme sunucusu Ăźzerinden bir ping atar. + YanÄąt olarak, diğer bĂźtĂźn bağlÄą bilgisayarlar pinge karşılÄąk verir ve + ping iletisinin alÄąnma ile gĂśnderilme sĂźresini raporlar. + + IPXNET PING için sĂśzdizimi: + IPXNET PING + + IPXNET STATUS + + IPXNET STATUS, bu DOSBox outrumunun IPX tĂźnelleme ağınÄąn geçerli durumunu + rapor eder. Ağa bağlÄą bĂźtĂźn bilgisayarlarÄąn bir listesi için IPXNET PING + komutunu kullanÄąn. + + IPXNET STATUS için sĂśzdizimi: + IPXNET STATUS + + +KEYB [klavye_dĂźzeni_kodu [kod_sayfasÄą [kod_sayfasÄą_dosyasÄą]]] + + Klavye dĂźzenini değiştirir. Klavyeler ile ilgili ayrÄąntÄąlÄą bilgi için lĂźtfen + BĂślĂźm 8: "Klavye DĂźzeni"'ne bakÄąnÄąz. + + [klavye_dĂźzeni_kodu] beş ya da daha az karakterden oluşan katardÄąr, + Ăśrnekler PL214 (Lehçe daktilocular) ya da PL457 (Lehçe programcÄąlar). + Bu kullanÄąlacak klavye dĂźzenini belirtir. + DOSBox içine yapÄąlÄą bĂźtĂźn dĂźzenlerin listesi burada: + http://vogons.zetafleet.com/viewtopic.php?t=21824 + + [kod_sayfasÄą] kullanÄąlacak kod sayfasÄąnÄąn numarasÄądÄąr. Klavye dĂźzeni + belirtilen kod sayfasÄą için destek sağlamak zorundadÄąr, bunun dışında + dĂźzen yĂźkleme başarÄąsÄąz olur. + Hiçbir kod sayfasÄą belirtilmemişse, istenen dĂźzen için uygun kod sayfasÄą + kendiliğinden seçilir. + + [kod_sayfasÄą_dosyasÄą] henĂźz DOSBox içine derlenmemiş kod sayfalarÄąnÄą yĂźklemek + için kullanÄąlabilir. Bu yalnÄązca DOSBox kod sayfasÄąnÄą bulamadığında + gereklidir. Hiçbir kod sayfasÄą dosyasÄą belirtilmemişse, ama on ega.cpx + dosyalarÄąnÄą (FreeDOS'tan) DOSBox program dizinine yerleştirdiyseniz, + istenen dĂźzen/kod sayfasÄą için uygun kod sayfasÄą dosyasÄą kendiliğinden + seçilir. + + Örnekler: + 1. Lehçe daktilocu tuşlarÄą dĂźzenini yĂźklemek için (kendiliğinden kod + sayfasÄą 852 kullanÄąlÄąr): + keyb pl214 + 2. Bir Rus klavye dĂźzenlerinden birini kod sayfasÄą 866 ile birlikte + yĂźklemek için: + keyb ru441 866 + Rus karakterleri yazmak için ALT+RIGHT-SHIFT'e basÄąn. + 3. FransÄąz klavye dĂźzenlerinden birini kod sayfasÄą 850 ile birlikte + yĂźklemek için (kod sayfasÄą EGACPI.DAT'ta tanÄąmlÄą): + keyb fr189 850 EGACPI.DAT + 4. Kod sayfasÄą 858'i yĂźklemek için (bir klayve dĂźzeni olmadan): + keyb none 858 + Bu, FreeDOS keyb2 aracÄąna uygun kod sayfasÄąnÄą değiştirmek için + kullanÄąlabilir. + 5. Geçerli kod sayfasÄąnÄą ile yĂźklĂź ise klavye dĂźzenini gĂśrĂźntĂźlemek için: + keyb + + + +Daha çok bilgi için programlar ile birlikte /? komut satÄąrÄą anahtarÄąnÄą kullananÄąn. + + + +=============== +5. Özel Tuşlar: +=============== + +ALT-ENTER Tam ekrana geçer ve vazgeçer. +ALT-PAUSE Benzetimi duraklatÄąr (yeniden sĂźrdĂźrmek için ALT-PAUSE'ye basÄąn). +CTRL-F1 Tuş eşleştiricisini başlatÄąr. +CTRL-F4 Bağlanmış disket/CD kalÄąplarÄąnÄąn arasÄąnda aktarma yapar. BĂźtĂźn + sĂźrĂźcĂźler için dizin Ăśnbelleğini gĂźnceller. +CTRL-ALT-F5 EkranÄąn bir filmini başlatÄąr/durdurur. (avi video yakalama) +CTRL-F5 Bir ekran gĂśrĂźntĂźsĂź kaydeder. (PNG biçimi) +CTRL-F6 Sesi bir ses dosyasÄąnda kaydedilmesini başlatÄąr/durdurur. +CTRL-ALT-F7 OPL komutlarÄąnÄąn kaydedilmesini başlatÄąr/durdurur. (DRO biçimi) +CTRL-ALT-F8 Saf MIDI komutlarÄąnÄąn kaydedilmesini başlatÄąr/durdurur. +CTRL-F7 Çerçeve atlamayÄą azaltÄąr. +CTRL-F8 Çerçeve atlamayÄą arttÄąrÄąr. +CTRL-F9 DOSBox'u ĂśldĂźrĂźr. +CTRL-F10 Fareyi yakalar/bÄąrakÄąr. +CTRL-F11 Benzetimi yavaşlatÄąr (DOSBox çevrimlerini azaltÄąr). +CTRL-F12 Benzetimi hÄązlandÄąrÄąr (DOSBox çevrimlerini arttÄąrÄąr)*. +ALT-F12 HÄąz kilidini açar (turbo düğmesi/hÄązlÄą ileri alma)**. +F11, ALT-F11 (machine=cga) NTSC çĹktÄą kipini değiştirir*** +F11 (machine=hercules) kehribar, yeşil, beyaz renklendirme arasÄąnda*** +devir yapar. + +*NOT: Bir kez DOSBox'unuzun çevirimini bilgisayarÄąnÄązÄąn CPU kaynaklarÄąnÄąn + Ăśtesinde arttÄąrmak, bezetimi yavaşlatmak gibi aynÄą etki yapacaktÄąr. + Bu en yĂźksek derece bilgisayardan bilgisayara değişir. + +**NOT: Bu için CPU kaynaklarÄąnÄą serbest bÄąrakmaya gereksinim duyarsÄąnÄąz (daha + çok elde ederseniz, daha hÄązlÄą gider), bu yĂźzden cycles=max ya da çok + yĂźksek bir sabit çevirim ile hiç çalışmaz. Bunun çalışmasÄą için tuşlarÄą + basÄąlÄą tutmak zorundasÄąnÄąz. + +***NOT: Bu tuşlar faklÄą bir makine tĂźrĂź ile daha Ăśnce bir eşleştirici dosyasÄąnÄą + kaydettiyseniz çalışmaz. Bu yĂźzden ya onlarÄą yeniden atayÄąn ya da + eşleştiriciyi sÄąfÄąrlayÄąn. + +Bunlar varsayÄąlan tuş bağlarÄądÄąr. OnlarÄą tuş eşleştiricisinde +değiştirebilirsiniz (BĂślĂźm 7: Tuş Eşleştiricisi'ne bakÄąnÄąz). + +MAC OS'ta Ctrl ile birlikte cmd(apple tuşu)'yi kullanmayÄą denerseniz tuşyou can try using cmd(applekey) together with Ctrl if the key doesn't +çalışmaz Ăśrneğin cmd-ctrl-F1, ama bazÄą tuşlar yine de eşleştirmeye gereksinim duyabilir (Linux'te de). + +İçinde kaydedilmiş dosyalar bulunabilir: + (Windows) "Başlat/WinLogo MenĂźsĂź"->"TĂźm Programlar"->DOSBox-0.74->Extras + (Linux) ~/.dosbox/capture + (MAC OS X) "~/Library/Preferences/capture" +Bu DOSBox yapÄąlandÄąrma dosyasÄąnda değiştirebilir. + + + +========================= +6. Oyun Çubuğu/Oyun Kolu: +========================= + +DOS altÄąnda standart joystick bağlantÄą noktasÄą en çok 4 eksen ile 4 düğmeyi +destekler. Daha çok için, o yapÄąlandÄąrmanÄąn farklÄą değişiklikleri kullanÄąldÄą. + +DOSBox'u farklÄą bir oyun çubuğunu/oyun kolunu kullanmaya zorlamak için, +DOSBox yapÄąlandÄąrma dosyasÄąnda [joystick] bĂślĂźmĂźnde "joysticktype" girişi +kullanÄąlabilir. + +none - denetleyici desteğini devre dışı bÄąrakÄąr. +auto - (varsayÄąlan) Bir ya da iki denetleyici bağlÄą olup olmadığınÄą + kendiliğinden algÄąlar: + Bir varsa - '4axis' ayarÄą kullanÄąlÄąr, + Ä°ki varsa - '2axis' ayarÄą kullanÄąlÄąr. +2axis - Ä°ki denetleyici bağladÄąysanÄąz, her biri 2 eksenli ile 2 düğmeli bir + bir joystickin benzetimini yapacaktÄąr. YalnÄąz bir denetleyici bağladÄąysanÄąz + yalnÄązca 2 eksenli ile 2 düğmeli bir joystickin benzetimini yapacaktÄąr. +4axis - YalnÄązca birinci denetleyiciyi destekler, 4 eksenli ile 4 düğmeli bir + joystickin ya da 2 eksenli ile 6 düğmeli bir oyun kolunun benzetimini + yapar. +4axis_2 - YalnÄązca ikinci denetleyiciyi destekler. +fcs - YalnÄązca birinci denetleyiciyi destekler, 3 eksenli, + 4 düğmeli ile 1 başlÄąklÄą ThrustMaster Flight Control System'in + benzetimini yapar. +ch - YalnÄązca birinci denetleyiciyi destekler, 4 eksenli, 6 düğmeli ile + 1 şapkalÄą CH Flightstick'in benzetimini yapar, ama aynÄą anda birden + çok düğmeye basamazsÄąnÄąz. + +AyrÄąca, oyun içinde denetleyicileri uygun şekilde yapÄąlandÄąrmanÄąz gerekir. + +BağlÄą joystick olmadan ya da farklÄą bir joystick ayarÄą ile tuş eşleştiricisini +kaydetmişseniz, DOSBox'un tuş eşleştiricisini sÄąfÄąrlayana kadar yeni +değişiklikleriniz dĂźzgĂźn çalışmamasÄąnÄą ya da hiç çalışmamasÄąnÄą hatÄąrlamak +Ăśnemlidir. + + +Denetleyici DOSBox dışında dĂźzgĂźn çalışıyorsa, ama DOSBox içinde dĂźzgĂźn +ayarlanmÄąyorsa, DOSBox yapÄąlandÄąrma dosyasÄąnda farklÄą 'timed' ayarÄą +deneyin. + + + +===================== +7. Tuş Eşleştiricisi: +===================== + +DOSBox eşleştiricisini CTRL-F1 (BĂślĂźm 5. Özel Tuşlar'a bakÄąnÄąz) ya da +-startmapper ikisinden biri(BĂślĂźm 3. Komut SatÄąrÄą Parametreleri'ne bakÄąnÄąz) ile başlatÄąn. +Size bir sanal klavye ile bir sanal joystick sunulmaktadÄąr. + +Bu sanal aygÄątlarÄąn tuşlarÄąna ile olaylarÄąna karşılÄąk DOSBox DOS uygulamalarÄąna +bildirecektir. Farenizde bir tuşa basarsanÄąz, sağ aşağı köşede ilişkilendirilen +olay (EVENT) ile şu anda bağlÄą olaylarÄą gĂśrebilirsiniz. + +EVENT: Olay +BIND: Bağlayan şey (sizin parmağınÄąz/eliniz ile bastığınÄązgerçek tuş/düğme/eksen) + + Add Del +mod1 hold Next +mod2 +mod3 + + +EVENT + DOSBox'un DOS uygulamasÄąna bildireceği tuş ya da joystick + ekseni/düğmesi/şapkasÄą. (Oyun sÄąrasÄąnda gerçekleştirilecek olay [Ăśrneğin + ateş etme/zÄąplama/yĂźrĂźme]) +BIND + EVENT'te bağlÄą gerçek klavyenizde tuş ya da gerçek joystick(ler)inizde + eksen/düğme/şapka (SDL tarafÄąndan bildirilen). +mod1,2,3 + TanÄąmlayÄącÄąlar. Bunlar BIND'a bastığınÄąz zaman basÄąlmasÄąna gereksinim + duyduklarÄąnÄąz tuşlardÄąr. mod1 = CTRL ile mod2 = ALT. Bunlar çoğunlukla + yalnÄązca DOSBox'un Ăśzel tuşlarÄąnÄą değiştirmek istediğinizde kullanÄąlÄąr. +Add + Bu EVENT'e yeni BIND ekler. AslÄąnda DOSBox'ta EVENT Ăźretecek klavyenizde + bir tuş ya da joystickinizde yeni bir olay (düğmeye baÄąlmasÄą, eksen/şapka + hareketi) eklemektir. +Del + EVENT'te BIND'i siler. Bir EVENT hiç BIND'lara sahip değilse, bu DOSBox'ta + bu olayÄą tetiklemek için olanaklÄą değildir (Bunun tuşu tuşlamak ya da + joystickte ilgili eylemi kullanmak olanağı yok). +Next + Bu EVENT'te eşleştirilen bağlamalar listesine baştan başa gider. + + +Örnek: +Q1. DOSBox'ta bir Z yazmanÄąz için klavyenizde X'in bulunmasÄąnÄą istiyorsunuz. + A. Tuş eşleştiricinizdeki Z'ye tÄąklayÄąn. "Add"'e tÄąklayÄąn. + Şimdi, klavyenizdeki X'e basÄąn. + +Q2. "Next"'e birkaç kez tÄąklarsanÄąz, siz DOSBox'ta klavyenizdeki Z'nin bir Z + Ăźrettiğini de farkettiniz. + A. Bu nedenle Z'yi yeniden seçin ve klavyenizdeki Z'yi buluncaya kadar + "Next"'e tÄąklayÄąn. Şimdi "Del"'e tÄąklayÄąn. + +Q3. DOSBox'ta ondan çĹkmayÄą denerseniz, X'e bastığınÄązda ZX ortaya çĹktığınÄą + farkedeceksiniz. + A. Klavyenizdeki X'in yine X'e de eşleşmiştir! Tuş eşleştiricinizdeki X'e + tÄąklayÄąn ve X'i eşleşmiş tuş X'i buluncaya kadar "Next" ile arayÄąn. + "Del"'e basÄąn. + + +Joysticki yeniden eşleştirme ile ilgili Ăśrnekler: + Bir joystick bağladığınÄązda, DOSBox altÄąnda iyi çalışır ve yalnÄąz klavye ile + oynanan bazÄą oyunlarÄą joystick ile oynamak isterseniz (bu, klavyedeki oklar + ile yĂśnetilen oyunu sanÄąr.): + 1. Eşleştiriciyi başlatÄąn, sonra sol klavye oklarÄąndan birine tÄąklayÄąn. + EVENT, key_left olmalÄądÄąr. Şimdi "Add"'e tÄąklayÄąn ve joystickinizi + ilgili yĂśne hareket ettirin, bu BIND'a olay eklemelidir. + 2. Eksik 3 yĂśn için yukarÄądakini yineleyin, ayrÄąca joystickin + düğmelerini de yeniden eşleştirebilirsiniz (ateş/zÄąplama). + 3. Save'ye tÄąklayÄąn, sonra Exit'e tÄąklayÄąn ve bazÄą oyunlarda deneyin. + + Joystickin y-eksenini değiştirmek istersiniz, çßnkĂź bazÄą uçuş benzetimcileri + sevmediğiniz bir biçimde yukarÄą/aşağı joystick hareketleri kullanÄąr ve bu + oyunda kendini yapÄąlandÄąrÄąlamaz: + 1. Eşleştiriciyi başlatÄąn ve ilk joystick alanÄąnda Y-'ye tÄąklayÄąn. + EVENT, jaxis_0_1- olmalÄądÄąr. + 2. Geçerli bağlayÄącÄąyÄą kaldÄąrmak için Del'e tÄąklayÄąn, sonra Add'e tÄąklayÄąn + ve joystickinizi aşağıya doğru hareket ettirin. Yeni bir bağ oluşmalÄądÄąr. + 3. Bunu Y+ için yineleyin, dĂźzeni kaydedin ve en sonunda bunu bazÄą + oyunlarla sÄąnayÄąn. + + D-padinizi/ŞapkanÄązÄą herhangi bir şeye yeniden eşleştirmek isterseniz, + yapÄąlandÄąrma dosyasÄąnda 'joysticktype=auto''yu 'joysticktype=fcs''ye + değiştirmek zorundasÄąnÄąz. Belki bu, ileriki DOSBox sĂźrĂźmĂźnde + geliştirilebilir. + + +VarasyÄąlan eşleşmeyi değiştirmek isterseniz, "Save"'ye tÄąklayarak +değişikliklerinizi kaydedebilirsiniz. DOSBox, yapÄąlandÄąrma dosyasÄąnda +belirtilen bir konuma (mapperfile= kayÄąt) kaydedecektir. BaşlangĹçta, DOSBox +yapÄąlandÄąrma dosyasÄąnda belirtmişseniz, DOSBox, eşleştirme dosyasÄąnÄą +yĂźkleyecektir. + + + +================= +8. Klavye DĂźzeni: +================= + +FarklÄą bir klavye dĂźzenine değiştirmek için, ya DOSBox yapÄąlandÄąrma dosyasÄąnda +bĂślĂźmĂźnde "keyboardlayout" girişi kullanÄąlabilir ya da DOSBox iç programÄą +keyb.com (BĂślĂźm 4: İç Programlar) +Her ikisi de DOS uyumlu dil kodlarÄąnÄą kabul eder (aşağıya bakÄąnÄąz), ama +yalnÄązca keyb.com'u kullanarak bir Ăśzel kod sayfasÄą tanÄąmlayabilirsiniz. + +VarsayÄąlan keyboardlayout=auto şu anda yalnÄązca Windows altÄąnda çalışır. Dil, +işletim sisteminin diline gĂśre seçilir, ama klavye dĂźzeni algÄąlanmaz. + +DĂźzen değiştirmek + DOSBox varsayÄąlan olarak bir kaç klavye dĂźzeni ile kod sayfasÄąnÄą destekler, + bu durumda yalnÄązca dĂźzen tanÄąmlayÄącÄąsÄąnÄąn tanÄąmlanmasÄąna (DOSBox + yapÄąlandÄąrma dosyasÄąnda keyboardlayout=PL214 ya da DOSBox komut isteminde + "keyb PL214"kullanma gibi) gereklidir. DOSBox içine yapÄąlÄą bĂźtĂźn dĂźzenlerin + listesi burada: http://vogons.zetafleet.com/viewtopic.php?t=21824 + + BazÄą klavye dĂźzenleri (Ăśrneğin GK319 dĂźzeni 869 kod sayfasÄą ile RU441 dĂźzeni) + 808 kod sayfasÄą) bir dĂźzen için SolALT+SağSHIFT'e ile diğeri + SolALT+SolSHIFT'e basÄąlarak erişilebilen çift dĂźzen için desteğe sahiptir. + BazÄą klavye dĂźzenleri (Ăśrneğin LT456 dĂźzeni 771 kod sayfasÄą) ßç dĂźzen için + desteğe sahiptir, ßçßncĂź SolALT+SolCTRL'ye basÄąlarak erişilebilir. + +Desteklenen dış dosyalar + FreeDOS .kl dosyalarÄą desteklenir (FreeDOS keyb2 Klavye DĂźzen DosyalarÄą) + hem de bĂźtĂźn mevcut .kl dosyalarndan oluşan FreeDOS keyboard.sys/keybrd2.sys/ + keybrd3.sys kĂźtĂźphaneleri. + DOSBox'a tĂźmleşik dĂźzenler bazÄą nedenlerden dolayÄą çalışmÄąyorsa ya da + gĂźncellenmişse ya da yeni dĂźzenler kullanÄąlabilir duruma gelirse Ăśnceden + derlenmiş klavye dĂźzenleri için http://www.freedos.org/'a bakÄąnÄąz. + + .CPI (MS-DOS ile uyumlu kod sayfasÄą dosyalarÄą) ile .CPX (FreeDOS + UPX-sÄąkıştÄąrÄąlmış kod sayfasÄą dosyalarÄą) her ikisi de kullanÄąlabilir. BazÄą + kod sayfalarÄą DOSBox içinde derlenmiştir, bu yĂźzden çoğunlukla dış kod + sayfasÄą dosyalarÄąnÄą Ăśnemsemek gerekli değildir. Bir farklÄą (ya da Ăśzel) kod + sayfasÄą dosyasÄąna gereksinim duyuyorsanÄąz, bunu DOSBox dizinine kopyalayÄąn + bĂśylece DOSBox için erişilebilir. DOSBox dizinine on ega.cpx dosyalarÄąnÄą + (FreeDOS'tan) yerleştirirseniz, istenen dĂźzen/kod sayfasÄą için bir uygun kod + sayfasÄą kendiliğinden seçilir. + + Ek dĂźzenler uygun .kl dosyasÄąnÄąn DOSBox yapÄąlandÄąrma dosyasÄąnÄąn dizinine + kopyalanma ve dosya isminin ilk bĂślĂźmĂź dil kodu olarak kullanÄąlma ile + eklenebilir. + Örnek: For the file UZ.KL dosyasÄą için (Özbekistan için klavye dosyasÄą) + DOSBox yapÄąlandÄąrma dosyasÄąnda "keyboardlayout=uz" belirtin. + Klavye dĂźzeni paketlerinin (keybrd2.sys gibi) tĂźmleştirilmesi benzer şekilde + çalışır. + +Dikkat edin, bu klavye dĂźzeni yabancÄą karakterlerin girilmesine izin verir, ama +dosya adlarÄąnda onlar için orada destek yoktur. Hem DOSBox içinde hem de DOSBox +tarafÄąndan erişilebilen ana bilgisayar işletim sisteminizdeki dosyalarda +kullanmaktan kaçĹnmaya çalışınÄąz. + + + +============================ +9. Seri Çok Oyuncu Özelliği: +============================ + +DOSBox ağ ile internet Ăźzerinde bir seri kukla modem kablosu benzetimi +yapabilir. Bu, DOSBox yapÄąlandÄąrma dosyasÄąnda [serialports] bĂślĂźmĂźnĂźn Ăźzerinden +yapÄąlandÄąrÄąlabilir. + +Bir kukla modem bağlantÄąsÄą kurmak için, bir taraf sunucu olarak ve biri +istemci olarak davranmaya gereksinim duyar. + +Sunucu, DOSBox yapÄąlandÄąrma dosyasÄąnda bunun gibi kuruluma gereksinim duyar: + serial1=nullmodem + +Ä°stemci: + serial1=nullmodem server: + +Şimdi oyunu başlatÄąn ve çok oyunculu yĂśntemi ile COM1 Ăźzerinden kukla modem / +seri kablo / şimdiden bağlanmış seçin. Her iki bilgisayara aynÄą baud hÄązÄąnÄą +ayarlayÄąn. + +AyrÄąca, kukla modemin bağlantÄą davranışınÄą denetlemek için ek parametreler +belirtilebilir. Bunlar bĂźtĂźn parametrelerdir: + + * port: - TCP bağlantÄą noktasÄą numarasÄą. VarsayÄąlan: 23 + * rxdelay: - ArayĂźz hazÄąr değilse alÄąnan veriyi geciktirmek için + ne kadar sĂźre (milisaniye). DOSBox Durum Penceresi'nde taşma + hatalarÄą ile karşılaşırsanÄąz bu değeri arttÄąrÄąn. + VarsayÄąlan: 100 + * txdelay: - Bir paket gĂśnderiminden Ăśnce veriyi toplamak için ne kadar + sĂźre. VarsayÄąlan: 12 (ağ ek yĂźkĂźnĂź azaltÄąr) + * server: - Bu kukla modemin belirtilen sunucuya bir istemci bağlama. + (server argĂźmanÄą yok: bir sunucu olur) + * transparent:1 - YalnÄązca seri veriyi gĂśnderir, RTS/DTR el sÄąkışmasÄą yok. Bu, + bir kukla modem dışında bir şey bağlandığında kullanÄąlÄąr. + * telnet:1 - Uzak siteden Telnet verisini yorumlar. Kendiliğinden şeffaf + ayarlar. + * usedtr:1 - BağlantÄą, DOS programÄą tarafÄąndan DTR ayarlanÄąncaya kadar + kurulmuş olmayacaktÄąr. Modem uçbirimleri için kullanışlÄądÄąr. + Kendiliğinden şeffaf ayarlar. + * inhsocket:1 - Komut satÄąrÄą tarafÄąndan DOSBox'a geçirilen bir yuva + kullanÄąlÄąr. Kendiliğinden şeffaf ayarlar. (Yuva KalÄątÄąmÄą: BuIt is used for + yeni BBS yazÄąlÄąmlarÄąnda eski kapÄą oyunlarÄąnÄą oynamak için + kullanÄąlÄąr.) + +Örnek: TCP bağlantÄą nÄąktasÄą 5000'i dinleyen bir sunucu anlamÄąna gelir. + serial1=nullmodem server: port:5000 rxdelay:1000 + + + +===================================== +10. How to speed up/slow down DOSBox: +===================================== + +DOSBox emulates the CPU, the sound and graphic cards, and other peripherals +of a PC, all at the same time. The speed of an emulated DOS application +depends on how many instructions can be emulated, which is adjustable +(number of cycles). + +CPU Cycles (speed up/slow down) + By default (cycles=auto) DOSBox tries to detect whether a game needs to + be run with as many instructions emulated per time interval as possible + (cycles=max, sometimes this results in game working too fast or unstable), + or whether to use fixed amount of cycles (cycles=3000, sometimes this results + in game working too slow or too fast). But you can always manually force + a different setting in the DOSBox's configuration file. + + You can force the slow or fast behavior by setting a fixed amount of cycles + in the DOSBox's configuration file. If you for example set cycles=10000, then + DOSBox window will display a line "Cpu Speed: fixed 10000 cycles" at the top. + In this mode you can reduce the amount of cycles even more by hitting CTRL-F11 + (you can go as low as you want) or raise it by hitting CTRL-F12 as much as you + want, but you will be limited by the power of one core of your computer's CPU. + You can see how much free time your real CPU's cores have by looking at + the Task Manager in Windows 2000/XP/Vista/7 and the System Monitor + in Windows 95/98/ME. Once 100% of the power of your computer's real CPU's one + core is used, there is no further way to speed up DOSBox (it will actually + start to slow down), unless you reduce the load generated by the non-CPU parts + of DOSBox. DOSBox can use only one core of your CPU, so If you have + for example a CPU with 4 cores, DOSBox will not be able to use the power + of three other cores. + + You can also force the fast behavior by setting cycles=max in the DOSBox + configuration file. The DOSBox window will display a line + "Cpu Speed: max 100% cycles" at the top then. This time you won't have to care + how much free time your real CPU's cores have, because DOSBox will always use + 100% of your real CPU's one core. In this mode you can reduce the amount + of your real CPU's core usage by CTRL-F11 or raise it with CTRL-F12. + +CPU Core (speed up) + On x86 architectures you can try to force the usage of a dynamically + recompiling core (set core=dynamic in the DOSBox configuration file). + This usually gives better results if the auto detection (core=auto) fails. + It is best accompanied by cycles=max. But you may also try using it with + high amounts of cycles (for example 20000 or more). Note that there might be + games that work worse/crash with the dynamic core (so save your game often), + or do not work at all! + +Graphics emulation (speed up) + VGA emulation is a demanding part of DOSBox in terms of actual CPU usage. + Increase the number of frames skipped (in increments of one) by pressing + CTRL-F8. Your CPU usage should decrease when using a fixed cycle setting, + and you will be able to increase cycles with CTRL-F12. + You can repeat this until the game runs fast enough for you. + Please note that this is a trade-off: you lose in fluidity of video what + you gain in speed. + +Sound emulation (speed up) + You can also try to disable the sound through the setup utility of the game + to reduce load on your CPU further. Setting nosound=true in DOSBox's + configuration does NOT disable the emulation of sound devices, just + the output of sound will be disabled. + +Also try to close every program but DOSBox to reserve as much resources +as possible for DOSBox. + + +Advanced cycles configuration: +The cycles=auto and cycles=max settings can be parameterized to have +different startup defaults. The syntax is + cycles=auto ["realmode default"] ["protected mode default"%] + [limit "cycle limit"] + cycles=max ["protected mode default"%] [limit "cycle limit"] +Example: + cycles=auto 5000 80% limit 20000 + will use cycles=5000 for real mode games, 80% CPU throttling for + protected mode games along with a hard cycle limit of 20000 + + + +==================== +11. Troubleshooting: +==================== + +General tip: + Check messages in DOSBox Status Window. See section 12. "DOSBox Status Window" + +DOSBox crashes right after starting it: + - use different values for the output= entry in your DOSBox + configuration file + - try to update your graphics card driver and DirectX + - (Linux) set the environment variable SDL_AUDIODRIVER to alsa or oss. + +Running a certain game closes DOSBox, crashes with some message or hangs: + - see if it works with a default DOSBox installation + (unmodified configuration file) + - try it with sound disabled (use the sound configuration + program that comes with the game, additionally you can + set sbtype=none and gus=false in the DOSBox configuration file) + - change some entries of the DOSBox configuration file, especially try: + core=normal + fixed cycles (for example cycles=10000) + ems=false + xms=false + or combinations of the above settings, + similar the machine settings that control the emulated chipset and + functionality: + machine=vesa_nolfb + or + machine=vgaonly + - use loadfix before starting the game + +The game exits to the DOSBox prompt with some error message: + - read the error message closely and try to locate the error + - try the hints at the above sections + - mount differently as some games are picky about the locations, + for example if you used "mount d d:\oldgames\game" try + "mount c d:\oldgames\game" and "mount c d:\oldgames" + - if the game requires a CD-ROM be sure you used "-t cdrom" when + mounting and try different additional parameters (the ioctl, + usecd and label switches, see the appropriate section) + - check the file permissions of the game files (remove read-only + attributes, add write permissions etc.) + - try reinstalling the game within DOSBox + + + +========================= +12. DOSBox Status Window: +========================= + +DOSBox's Staus window contains many useful information about your currant +configuration, your actions in DOSBox, errors that happened and more. +Whenever you have any problem with DOSBox check these messages. + +To start DOSBox Status Window: + (Windows) Status Window is being started together with main DOSBox window. + (Linux) You may have to start DOSBox from a console to see Status Window. + (MAC OS X) Right click on DOSBox.app, choose "Show Package Contents"-> + ->enter "Contents"->enter "MacOS"->run "DOSBox" + + + +===================================== +13. The configuration (options) file: +===================================== + +The configuration file is automatically created the first time you run DOSBox. +The file can be found in: + (Windows) "Start/WinLogo Menu"->"All Programs"->DOSBox-0.74->Options + (Linux) ~/.dosbox/dosbox-0.74.conf + (MAC OS X) "~/Library/Preferences/DOSBox 0.74 Preferences" +The file is divided into several sections. Each section starts with a +[section name] line. The settings are the property=value lines where value can +be altered to customize DOSBox. +# and % indicate comment-lines. + + +An extra configuration file can be generated by CONFIG.COM, which can be found +on the internal DOSBox Z: drive when you start up DOSBox. Look in the Section 4: +"Internal programs" for usage of CONFIG.COM. You can start DOSBox with +the -conf switch to load the generated file and use its settings. + +DOSBox will load configuration files that are specified with -conf. If none were +specified, it will try to load "dosbox.conf" from the local directory. +If there is none, DOSBox will load the user configuration file. +This file will be created if it doesn't exist. + +Important!: In Windows Vista/7 the configuration file won't work correctly +if it is located in "Windows" or "Program Files" folder or their subfolders, +or directly on c:\, so the best place for storing extra configuration files is +for example: C:\oldgames + + + +====================== +14. The Language File: +====================== + +A language file can be generated by CONFIG.COM, which can be found on the +internal DOSBox Z: drive when you start up DOSBox. Look in the Section 4: +"Internal programs" for usage of CONFIG.COM. +Read the language file, and you will hopefully understand how to change it. +Start DOSBox with the -lang switch to use your new language file. +Alternatively, you can setup the filename in the configuration file +in the [dosbox] section. There's a language= entry that can be changed with +the filelocation. + + + +======================================== +15. Building your own version of DOSBox: +======================================== + +Download the source. +Check the INSTALL in the source distribution. + + + +=================== +16. Special thanks: +=================== + +See the THANKS file. + + + +============ +17. Contact: +============ + +See the site: +http://www.dosbox.com +for an email address (The Crew-page). + + diff -Nru dosbox-staging-0.76.0/contrib/old-translations/tr/Turkish.lang dosbox-staging-0.77.0/contrib/old-translations/tr/Turkish.lang --- dosbox-staging-0.76.0/contrib/old-translations/tr/Turkish.lang 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/tr/Turkish.lang 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,983 @@ +:CONFIG_FULLSCREEN +DOSBox'u do§rudan tam ekranda baŸlatr. (ALT-Enter'e baslnca d”ner.) +. +:CONFIG_FULLDOUBLE +Tam ekranda ‡ift arabellekleme kullanlr. Bu ekrann titreŸmesini azaltr ,ama sonu‡ olarak da yavaŸ DOSBox olabilir. +. +:CONFIG_FULLRESOLUTION +Tam ekran i‡in hangi ‡”znrlk kullanlacak: original yada fixed size (”rne§in 1024x768). + Monit”rn do§al ‡”znrl§, aspect=true birlikte kullanld§nda en iyi sonucu verebilir. + E§er, siz byk ekranda k‡k ‡”znrlk kullanld§nzda, yzeyde farkl g”rnmeye ‡alŸabilir. +. +:CONFIG_WINDOWRESOLUTION +E§er, ‡kŸ aygtnz donanm ”l‡eklendirmesini destekliyorsa pencereyi bu boyuta ”l‡eklendirir. + (output=surface yapmaz.) +. +:CONFIG_OUTPUT +€kŸ i‡in kullanlacak g”rnt sistemi. +. +:CONFIG_AUTOLOCK +Siz ekrana tkland§nzda, fare kendili§inden kilitlenecektir. (CTRL-F10'a basld§nda kilit kaldrlr.) +. +:CONFIG_SENSITIVITY +Fare duyarll§. +. +:CONFIG_WAITONERROR +DOSBox bir hata durumunda, kapanmadan ”nce bekler. +. +:CONFIG_PRIORITY +DOSBox i‡in ”ncelik dzeyleri. Virglden sonra olan ikinci giriŸ, DOSBox etkin olmad§/simge durumuna k‡ltld§ zaman i‡indir. + pause yalnzca ikinci giriŸ i‡in ge‡erlidir. +. +:CONFIG_MAPPERFILE +TuŸlarn/Olaylarn eŸleŸmelerinin yklenece§i/kaydedilece§i dosya. Resetmapper yalnzca varsaylan de§erde ‡alŸr. +. +:CONFIG_USESCANCODES +symkeys kullanmn ”nler, tm iŸletim sistemlerinde ‡alŸmayabilir. +. +:CONFIG_LANGUAGE +BaŸka dil dosyas se‡er. +. +:CONFIG_MACHINE +Benzetimi yaplmaya ‡alŸlan makinenin tr. +. +:CONFIG_CAPTURES +KaydedilmiŸ ses kayd, midi, ekran g”rntlerinin kaydedildi§i dizin. +. +:CONFIG_MEMSIZE +DOSBox'un sahip oldu§u megabayt cinsinden toplam belle§i. + Bu de§er, en iyi baz oyunlar ile sorunlar ”nlemek i‡in varsaylan olarak braklr. + ama birka‡ oyun yksek de§er gerektirebilmektedir. + Bu de§eri ykseltmek, ‡o§unlukla hz getirisi olmaz. +. +:CONFIG_FRAMESKIP +DOSBox, ‡izmeden ”nce ka‡ kare atlanaca§dr. +. +:CONFIG_ASPECT +En-boy do§rulamas yapar, e§er ‡kŸ y”nteminiz ”l‡eklendirmeyi desteklemiyorsa iŸleri yavaŸlatr. +. +:CONFIG_SCALER +DŸk ‡”znrlk kiplerini geniŸletmek/daraltmak i‡in kullanlacak ”l‡eklendirici. + E§er "forced" kullanlrsa, sonu‡ istenildi§i gibi olmasa da ”l‡eklendirici kullanlacaktr. +. +:CONFIG_CORE +Benzetimde kullanlacak CPU ‡ekirde§i. auto, e§er varsa ve uygunsa dynamic'e ge‡er. +. +:CONFIG_CPUTYPE +Benzetimde kullanlacak CPU tr. auto en hzl se‡imdir. +. +:CONFIG_CYCLES +DOSBox'un her milisaniyede benzetimi yapaca§ komut says. +Bu se‡ene§i ‡ok ykse§e ayarlamak seste kesilmelere ya da gecikmeye neden olabilir. +€evrim 3 y”ntem ile yaplabilir: + "auto" Bir oyunun gereksinimi sezer. + Bu ‡o§unlukla ‡alŸr, ama baz oyunlarda baŸarsz olsbilir. + "fixed #number" Sabit ‡evirim saysn belirler. Bu, ‡o§unlukla auto baŸarsz olunca gereksinim duyarsnz. + (™rne§in: fixed 4000). + "max" Bilgisayarn iŸleyebilece§i en ‡ok ‡evirim says kadar atar. + +. +:CONFIG_CYCLEUP +TuŸ bileŸiminin azaltaca§/arttraca§ ‡evirim says.(CTRL-F11/CTRL-F12) +. +:CONFIG_CYCLEDOWN +100'den k‡k de§er ayarland§nda yzdelik olarak belirlenir. +. +:CONFIG_NOSOUND +Sessiz kipi etkinleŸtirir, yine de ses benzetimi yaplacaktr. +. +:CONFIG_RATE +KarŸtrc ”rnekleme hz, herhangi bir aygtn hzn bundan daha yksek de§ere ayarlamak muhtemelen ses kalitesini dŸrecektir. +. +:CONFIG_BLOCKSIZE +KarŸtrcnn blok hz, daha byk blok boyutu sesin taklmasn engelleyebilir ama ses daha ‡ok gecikecektir. +. +:CONFIG_PREBUFFER +Blok boyutu i‡inde ka‡ milisaniyede veri tutulaca§dr. +. +:CONFIG_MPU401 +Benzetimi yaplacak MPU-401 tr. +. +:CONFIG_MIDIDEVICE +MPU-401'den MIDI verisi alacak olan aygt. +. +:CONFIG_MIDICONFIG +Aygt srcsnn ”zel yaplandrma se‡enekleri. Bu ‡o§unlukla aygtn kimli§ini kullanrsnz. + Ayrntl bilgi i‡in README/klavuza baknz. +. +:CONFIG_SBTYPE +benzetimi yaplacak Soundblaster tr. gb Gameblaster'dir. +. +:CONFIG_SBBASE +Soundblaster'in giriŸ ile ‡kŸ adresi. +. +:CONFIG_IRQ +Soundblaster'in IRQ numaras. +. +:CONFIG_DMA +Soundblaster'in DMA numaras. +. +:CONFIG_HDMA +Soundblaster'in Yksek DMA adresi. +. +:CONFIG_SBMIXER +Soundblaster karŸtrcsnn DOSBox karŸtrcsn de§iŸtirmesine izin verir. +. +:CONFIG_OPLMODE +OPL benzetimi tr. "auto" kipi, soundblaster trne g”re belirtir. Btn OPL kipleri, "cms" dŸnda Adlib uyumludur. +. +:CONFIG_OPLEMU +OPL benzetimi i‡in sa§layc. compat daha iyi sa§layabilir.(oplrate'ye de baknz) +. +:CONFIG_OPLRATE +OPL mzik benzetiminin ”rnekleme hz. En yksek kalite i‡in 49716'y kullannz. (karŸtrc hzn uygun Ÿekilde belirtiniz) +. +:CONFIG_GUS +Gravis Ultrasound benzetimini etkinleŸtirir. +. +:CONFIG_GUSRATE +Ultrasound benzetiminin ”rnekleme hz. +. +:CONFIG_GUSBASE +Gravis Ultrasound'n giriŸ ile ‡kŸ ana adresi. +. +:CONFIG_GUSIRQ +Gravis Ultrasound'n IRQ numaras. +. +:CONFIG_GUSDMA +Gravis Ultrasound'n DMA kanal. +. +:CONFIG_ULTRADIR +Ultrasound dizininin yolu. Bu dizin i‡ine +GUS oynatmak i‡in gerekli yama dosyalarnn oldu§u +MIDI dizini olmal. Timidity ile kullanlan yama +setleri dzgn ‡alŸyor olmal. +. +:CONFIG_PCSPEAKER +Sistem hoparl”r benzetimini etkinleŸtirir. +. +:CONFIG_PCRATE +Sistem hoparl”r ses retiminin ”rnekleme hz. +. +:CONFIG_TANDY +Tandy Sound System benzetimini etkinleŸtirir. "auto" i‡in sadece makine tandy'e ayarland ise Tandysound benzetimi sunulur. +. +:CONFIG_TANDYRATE +Tandy 3-Voice retiminin ”rnekleme hz. +. +:CONFIG_DISNEY +Disney Sound Source benzetimini etkinleŸtirir. (Covox Voice Master ile Speech Thing uyumlu). +. +:CONFIG_JOYSTICKTYPE +Benzetimi yaplacak joystick tr: auto (default), none, +2axis (iki joystick destekler), +4axis (bir joystick destekler, kullanlan ilk joystick), +4axis_2 (bir joystick destekler, kullanlan ikinci joystick), +fcs (Thrustmaster), ch (CH Flightstick). +none joystick benzetimini devredŸ brakr.disables joystick emulation. +auto ger‡ek joystick(ler)e g”re benzetim se‡er. +(E§er ”nceden kaydettiyseniz, DOSBox'un eŸleyici dosyasn sfrlayn.) +. +:CONFIG_TIMED +Eksen i‡in zaman aralklarn etkinleŸtirir. E§er joystickiniz srklenir ise (bir y”ne), bu se‡enek ile birlikte deneyin. +. +:CONFIG_AUTOFIRE +TuŸa basl tuttu§unuz srece atŸ devam eder. +. +:CONFIG_SWAP34 +3. ile 4. eksenlerinin yerini de§iŸtirir. Baz joystickler i‡in kullanŸl olabilir. +. +:CONFIG_BUTTONWRAP +Benzetim yaplan d§me kadar d§me kaydrmay etkinleŸtirir. +. +:CONFIG_SERIAL1 +Seri arabirime ba§l aygtlarn trn ayarlar. +disabled, dummy, modem, nullmodem, directserial olabilir. +Ek parametreler, parametre:de§er Ÿeklinde ayn satrda olmaldr. +Tm trler i‡in parametre irq (iste§e ba§l). +directserial i‡in: realport (gerekli), rxdelay (iste§e ba§l). + (realport:COM1 realport:ttyS0). +modem i‡in: listenport (optional). +nullmodem i‡in: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (hepsi iste§e ba§l). +™rne§in: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +serial1'e baknz. +. +:CONFIG_SERIAL3 +serial1'e baknz. +. +:CONFIG_SERIAL4 +serial1'e baknz. +. +:CONFIG_XMS +XMS deste§ini etkinleŸtirir. +. +:CONFIG_EMS +EMS deste§ini etkinleŸtirir. +. +:CONFIG_UMB +UMB deste§ini etkinleŸtirir. +. +:CONFIG_KEYBOARDLAYOUT +Klavye dzeni i‡in dil koduLanguage code of the keyboard layout (or none). +. +:CONFIG_IPX +UDP/IP benzetimi zerinde ipx'i etkinleŸtirir. +. +:AUTOEXEC_CONFIGFILE_HELP +Bu b”lmde olan satrlar a‡lŸta ‡alŸtrlacak. +Siz, MOUNT satrlarn buraya yazabilirsiniz. + +. +:CONFIGFILE_INTRO +# Bu, DOSBox %s i‡in yaplandrma dosyasdr. (Ltfen DOSBox'un en son srmn kullannz.) +# # ile baŸlayan satrlar DOSBox'un g”rmezden geldi§i a‡klama satrlardr. +# Onlar, her se‡ene§in etkilerini (ksaca) belgelemek i‡in kullanlr. + +. +:CONFIG_SUGGESTED_VALUES +Olas de§erler +. +:PROGRAM_CONFIG_FILE_ERROR +%s dosyas a‡lamad. + +. +:PROGRAM_CONFIG_USAGE +Yaplandrma arac: +Ge‡erli yaplandrmay yazdrmak i‡in -writeconf dosyaismi kullann. +Ge‡erli dil katarlar i‡in -writelang dosyaismi kullann. + +. +:PROGRAM_CONFIG_SECURE_ON +Gvenli kipe ge‡ildi. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Gvenli kipte bu iŸleme izin verlimez. + +. +:PROGRAM_CONFIG_SECTION_ERROR +%s b”lmnde yok. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +B”yle b”lm ya da ”zellik yok. + +. +:PROGRAM_CONFIG_NO_PROPERTY +%s ”zelli§i, %s b”lmnde yok. + +. +:PROGRAM_CONFIG_GET_SYNTAX +Do§ru s”zdizimi: config -get "b”lm ”zelli§i" + +. +:PROGRAM_MOUNT_CDROMS_FOUND +Bulunan CDROM'lar: %d + +. +:PROGRAM_MOUNT_STATUS_2 +%c srcs %s olarak ba§land. + +. +:PROGRAM_MOUNT_STATUS_1 +žimdiki ba§lanmŸ srcler: + +. +:PROGRAM_MOUNT_ERROR_1 +%s dizini bulunmuyor. + +. +:PROGRAM_MOUNT_ERROR_2 +%s bir dizin de§il. + +. +:PROGRAM_MOUNT_ILL_TYPE +Ge‡ersiz tr %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +%c srcs zaten %s ile atanmŸ. + +. +:PROGRAM_MOUNT_USAGE +Kullanm MOUNT Surucu-Harfi Yerel-Dizin +™rne§in: MOUNT c %s +Bu, %s dizini, DOSBox'ta C: srcs g”revini yapar. +Bu dizin var olmas gerekir. + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +%c srcs ba§lanmamŸ. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +%c srcs baŸarl olarak kaldrld. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Sanal srcler ‡karlamaz. + +. +:PROGRAM_MOUNT_WARNING_WIN +c:\ ba§lanmas ”nerilmemektedir. Ltfen bir dahaki sefere bir (alt) dizin ba§layn. + +. +:PROGRAM_MOUNT_WARNING_OTHER +/ ba§lanmas ”nerilmemektedir. Ltfen bir dahaki sefere (alt) dizin ba§layn. + +. +:PROGRAM_MEM_CONVEN +%10d Kb boŸ geleneksel bellek + +. +:PROGRAM_MEM_EXTEND +%10d Kb boŸ uzatlmŸ bellek + +. +:PROGRAM_MEM_EXPAND +%10d Kb geniŸletilmŸiŸ bellek + +. +:PROGRAM_MEM_UPPER +%10d Kb %d bloklarnda boŸ st bellek (en byk UMB %d Kb) + +. +:PROGRAM_LOADFIX_ALLOC +%d kb ayrld. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kb serbest brakld. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Kullanlan bellek serbest brakld. + +. +:PROGRAM_LOADFIX_ERROR +Bellek ayrma hatas. + +. +:MSCDEX_SUCCESS +MSCDEX yklendi. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: BaŸarszlk: Birden ‡ok CDROM srclerinin src harfleri srekli +olmak zorunda. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: BaŸarszlk: Henz desteklenmiyor. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: BaŸarszlk: Ge‡ersiz dosya ya da a‡lmas olanaksz. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: BaŸarszlk: €ok fazla CDROM srcs (en ‡ok:5). MSCDEX yklemesi +baŸarsz. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Alt dizin ba§land: snrl destek.. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: BaŸarszlk: Dosya iso/cue kalb de§il ya da hatalar i‡eriyor. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: BaŸarszlk: Bilinmeyen hata. + +. +:PROGRAM_RESCAN_SUCCESS +Src ”nbelle§i temizlendi. + +. +:PROGRAM_INTRO +DOSBox'a hoŸgeldiniz, sesli ile grafikli x86 benzeticisidir. +DOSBox sizin, bildi§iniz eski yaln DOS gibi kabuk oluŸturur. + +Temel ba§lama ile ilgili bilgi i‡in intro mount yazn +CD-ROM deste§i ile ilgili bilgi intro cdrom yazn +™zel tuŸlar ile ilgili bilgi i‡inintro special yazn +DOSBox ile ilgili daha ‡ok bilgi i‡in http://www.dosbox.com/wiki gidin + +Hata oldu§unda DOSBox uyar vermeden durur/kapanr! + + + +. +:PROGRAM_INTRO_MOUNT_START +˜Ÿte baŸlamanz i‡in birka‡ komut: +Kendi dosya sisteminizde bulunan dosyalar kullanmadan +”nce, dosyalarn oldu§u dizini bir srcye atamalsnz. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprogs\ c:\dosprogs i‡eri§i bulunan bir ş +ş C srcs oluŸturacaktr. ş +ş ş +ş c:\dosprogs\ bir ”rnektir. Bunu kendi dizininiz ile de§iŸtirin. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprogs ~/dosprogs i‡eri§i bulunan bir ş +ş C srcs oluŸturacaktr. ş +ş ş +ş ~/dosprogs bir ”rnektir. Bunu kendi dizininiz ile de§iŸtirin. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +Ba§lanma baŸar ile tamamland§nda yeni C srcnze c: yazarak +ulaŸabilirsiniz. +dir yazarak i‡eri§ini g”sterebilirsiniz. cd bir dizine girmenize +olanak verir. (dizin listesinde [] ile tannan). +.exe .bat ya da .com ile biten programlar/dosyalar ‡alŸtrabilirsiniz. + +. +:PROGRAM_INTRO_CDROM +DOSBox'ta ger‡ek/sanal CD-ROM srcs nasl yaratlr: +DOSBox, CD-ROM benzetimini birka‡ seviyede sa§layabilir. + +Temel seviye tm CD-ROM srclerinde ile normal dizinlerde ‡alŸr. +Bu MSCDEX ykler ve dosyalar yalnz okunur olarak iŸaretler. +Bu ‡o§unlukla ‡o§u oyun i‡in yeterlidir: +mount d D:\ -t cdrom ya da mount d C:\example -t cdrom +E§er bu ‡alŸmazsa DOSBox'a CD-ROM etiketini bildirebilirsiniz: +mount d C:\example -t cdrom -label CDLABEL + +Sonraki seviyede biraz alt seviye dest§i ekler. +Bundan dolay yalnz CD-ROM srclerinde ‡alŸr: +mount d D:\ -t cdrom -usecd 0 + +Son seviyede iŸletim sisteminize ba§ldr: +Windows 2000, Windows XP ile Linux i‡in: +mount d D:\ -t cdrom -usecd 0 -ioctl +ASPI katman ykl Windows 9x i‡in: +mount d D:\ -t cdrom -usecd 0 -aspi + +D:\'yi CD-ROM'unuzun yeri ile de§iŸtirin. +-usecd 0'daki 0'i kendi CD-ROM'unuzun bildirilen numaras ile +de§iŸtirin: mount -cd + + +. +:PROGRAM_INTRO_SPECIAL +™zel tuŸlar: +Bunlar varsaylan tuŸ takmdr. +Onlar, keymapper'da de§iŸtirilebilirler. + +ALT-ENTER : Tam ekrana ge‡er ya da ‡kar. +ALT-PAUSE : DOSBox'u duraklatr. +CTRL-F1 : keymapper'i baŸlatr. +CTRL-F4 : Btn srcler i‡in dizin ”nbelle§ini gnceller. + Ba§lanmŸ disk kalbn de§iŸtirir. +CTRL-ALT-F5 : Bir ekran videosu oluŸturmay baŸlatr/durdurur. +CTRL-F5 : Ekran g”rnts kaydeder. +CTRL-F6 : Bir ses dosyasna ses ‡kŸ kaydn baŸlatr/durdurur. +CTRL-ALT-F7 : OPL komutlar kaydn baŸlatr/durdurur. +CTRL-ALT-F8 : Saf MIDI komutlarnn kaydn baŸlatr/durdurur. +CTRL-F7 : €er‡eve atlanmasn azaltr. +CTRL-F8 : €er‡eve atlanmasn arttrr. +CTRL-F9 : DOSBox'u sonlandrr. +CTRL-F10 : Fareyi yakalar/brakr. +CTRL-F11 : Benzetimini yavaŸlatr. (DOSBox d”nglerini azaltr). +CTRL-F12 : Benzetimini hzlandrr.(DOSBox d”nglerini arttrr). +ALT-F12 : Hz kilidini kaldrr. (turbo d§mesi/hzl ilerletme). + +. +:PROGRAM_BOOT_NOT_EXIST +A‡lŸ diski bulunmuyor. Hata. + +. +:PROGRAM_BOOT_NOT_OPEN +A‡lŸ diski dosyas a‡lmamyor. Hata. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Kalp dosyas yalnz okunur. Sorunlar oluŸturabilir. + +. +:PROGRAM_BOOT_PRINT_ERROR +Bu komut DOSBox'u bir disket ya da sabit disk kalbndan baŸlatr. + +Bu komut i‡in, Ctrl-F4'e basarak yer de§iŸtirebilen disket srcs +serisi belirtebilir, ve and -l baŸlatlacak ba§l srcy belirtebilir. +belirtebilir. E§er src harfi belirtilmemiŸse, varsaylan olarak A +srcsnden baŸlatlabilir. BaŸlatlabilir src harfleri yalnz A, C +ile D'dir. Sabit srcden baŸlatmak i‡in (C ya da D), kalbn ”nceden +IMGMOUNT komutu ile ba§lanmaldr. + +Bu komutun s”zdizimi: + +BOOT [diskimg1.img diskimg2.img] [-l src_harfi] + +. +:PROGRAM_BOOT_UNABLE +%c srcsnn baŸlatlmas olanaksz +. +:PROGRAM_BOOT_IMAGE_OPEN +Kalp dosyas a‡lyor: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +%s a‡lamyor. +. +:PROGRAM_BOOT_BOOT +%c srcsnden bŸlatlyor... + +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr kartuŸu bulundu, ama makine PCjr de§il. +. +:PROGRAM_BOOT_CART_LIST_CMDS +Hazr PCjr kartuŸu commandolar:%s +. +:PROGRAM_BOOT_CART_NO_CMDS +PCjr kartuŸu commando bulunamad. +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Kalp dosyasnn ba§lanaca§n srcnn src harfi belirlenmeli. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +G”rnt dosyasnn ba§lanaca§ src numaras (0 ya da 3) belirlenmeli. +(0,1=fda,fdb;2,3=hda,hdb) + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +CD-ROM kalplar i‡in: IMGMOUNT src_harfi kalbn_yolu -t iso + +Sabit disk kalplar i‡in: Sabit diskler i‡in src geometrisini +belirtmelisin: +sekt”r_baŸna_bayt, silindir_baŸna_sekt”r, silindir_baŸna_kafa, +silindir_says. +IMGMOUNT src-harfi kalbn_yolu -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +G”rnt dosyas yklenemedi. +Yolun do§ru ve kalbn eriŸilebilir olup olmad§na kontrol edin. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Kalbn src geometrisi ‡kartlamad. +-size bps,spc,hpc,cyl parametrelerini kullanarak geometriyi belirtin. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +"%s" tr desteklenmiyor. "hdd" ya da "floppy" ya da "iso" belirtin. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +"%s" tr desteklenmiyor. "fat" ya da "iso" ya da "none" belirtin. + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Kalp dosyasn belirtmelisiniz. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Kalp dosyas bulunamad. + +. +:PROGRAM_IMGMOUNT_MOUNT +Dizinleri ba§lamak i‡in MOUNT komutu kullann, IMGMOUNT komutunu de§il. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Bu harfe zaten src ba§lanmŸ. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Dosyadan src oluŸturulamyor. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Src numaras %d, %s olarak oluŸturuldu. + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Kalp dosyas yerel diskte ya da sunucuda olmal. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Birden ‡ok dosya kullanm yalnzca cue/iso kalplarnda desteklenir. + +. +:PROGRAM_KEYB_INFO +%i kod sayfas yklendi. + +. +:PROGRAM_KEYB_INFO_LAYOUT +%i kod sayfas %s dzeni i‡in yklendi. + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [klavye dzeni ID[ kod sayfas numaras[ kod sayfas dosyas ]]] + +Some examples: + KEYB: Ge‡erli yklenmiŸ kod sayfasn g”rntler. + KEYB sp: ˜spanyolca (SP) dzeni ykler, uygun bir kod sayfas kullanr. + KEYB sp 850: ˜spanyolca (SP) dzeni ykler, 850 kod sayfasn kullanr. + KEYB sp 850 mycp.cpi: Yukardaki ile ayn, ama mycp.cpi dosyasn kullanr. + +. +:PROGRAM_KEYB_NOERROR +%i kod sayfas i‡in %s klavye dzeni yklendi. + +. +:PROGRAM_KEYB_FILENOTFOUND +%s klavye dosyas bulunamad. + + +. +:PROGRAM_KEYB_INVALIDFILE +%s klavye dosyas ge‡ersiz. + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +%s'de %i kod sayfas i‡in dzen yok. + +. +:PROGRAM_KEYB_INVCPFILE +%s dzeni i‡in kod sayfas dosyas yok ya da ge‡ersiz. + + +. +:SHELL_ILLEGAL_PATH +Ge‡ersiz yol. + +. +:SHELL_CMD_HELP +E§er, siz desteklenen btn komutlarn listesini istiyorsanz help /all yazn. +€ok sk kullanlan komutlarn ksa bir listesi: + +. +:SHELL_CMD_ECHO_ON +ECHO a‡k. + +. +:SHELL_CMD_ECHO_OFF +ECHO kapal. + +. +:SHELL_ILLEGAL_SWITCH +Ge‡ersiz de§iŸtirme: %s. + +. +:SHELL_MISSING_PARAMETER +Gerekli parametre eksik. + +. +:SHELL_CMD_CHDIR_ERROR +Ge‡ilmesi olanaksz: %s. + +. +:SHELL_CMD_CHDIR_HINT +BaŸka srcye ge‡mek i‡in %c: yazn. + +. +:SHELL_CMD_CHDIR_HINT_2 +dizinismi 8 karakterden daha uzun ya da boŸluk i‡eriyor. +cd %s deneyin. + +. +:SHELL_CMD_CHDIR_HINT_3 +Siz yine Z: srcsndesiniz, C: ile ba§lanmŸ srcye ge‡iniz. + +. +:SHELL_CMD_MKDIR_ERROR +Yaplmas olanaksz: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Kaldrlmas olanaksz: %s. + +. +:SHELL_CMD_DEL_ERROR +Silinmesi olanaksz: %s. + +. +:SHELL_SYNTAXERROR +Komut s”zdizimi yanlŸ. + +. +:SHELL_CMD_SET_NOT_SET +%s ortam de§iŸkeni tanmlanmamŸ. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Ortamda yeterli kalan boŸluk yok. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Eksik dosya ismi. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Eksik say. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Ge‡ersiz say. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +GOTO komutuna etiket sa§lanmamŸ. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: %s etiketi bulunamad. + +. +:SHELL_CMD_FILE_NOT_FOUND +%s dosyas bulunamad. + +. +:SHELL_CMD_FILE_EXISTS +%s dosyas zaten var. + +. +:SHELL_CMD_DIR_INTRO +%s dizini. + +. +:SHELL_CMD_DIR_BYTES_USED +%5d Dosya(lar) %17s Bayt. + +. +:SHELL_CMD_DIR_BYTES_FREE +%5d Dizin(ler) %17s bayt boŸ. + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +%c srcs yok! +BaŸta mount kullanmalsnz. Daha ‡ok bilgi i‡in intro ya da intro mount yazn. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Ge‡ersiz komut: %s. + +. +:SHELL_CMD_PAUSE +Devam etmek i‡in bir tuŸa basn. + +. +:SHELL_CMD_PAUSE_HELP +Devam etmek i‡in bir tuŸa baslmasn bekler. + +. +:SHELL_CMD_COPY_FAILURE +Kopyalama baŸarsz: %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d dosya(lar) kopyaland. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Src kaldrma desteklenmiyor. Hi‡ bir Ÿey yaplmad. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST baŸarsz. Ya komut satrnda hata yaptnz ya da hedef src zaten +kullanlyor. +SUBST'n kullanm yalnzca yerel srclerde olanakldr. +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş DOSBox v%-s'e hoŸgeldiniz. ş +ş ş +ş Yeni kullanclar i‡in ksa bir giriŸ i‡in INTRO yazn. ş +ş Desteklenen arayz komutlar i‡in HELP yazn. ş +ş ş +ş CPU hzn ayarlamak i‡in, ctrl-F11'i ile ctrl-F12'yi kullann. ş +ş TuŸ eŸleŸtiricisini a‡mak i‡in ctrl-F1. ş +ş Daha ‡ok bilgi i‡in DOSBox dizinindeki README dosyasn okuyun. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox, kompozit CGA kipini destekler. ş +ş Bu kipte renkleri de§iŸtirmek i‡in (alt-)F11'i kullannz. ş +ş ş + +. +:SHELL_STARTUP_HERC +ş Beyaz, kehribar ile yeŸil tek renk d”ngs i‡in F11'i kullannz. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Hata ayklaycy a‡mak i‡in alt-Pause'ye basn ya da program ş +ş DEBUG ile a‡n. ş +ş ş + +. +:SHELL_STARTUP_END +ş ˜Y˜ EŚLENCELER! ş +ş DOSBox Takm http://www.dosbox.com ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:SHELL_CMD_CHDIR_HELP +Ge‡erli dizini g”rntler/de§iŸtirir. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [src:][yol] +CHDIR [..] +CD [src:][yol] +CD [..] + + .. šst dizine ge‡mek istedi§inizi belirtir. + +Belirtilen srcde ge‡erli dizini g”rntlemek i‡in CD src: yazn. +Ge‡erli srcy ile dizini g”rntlemek i‡in parametresiz CD yazn. + +. +:SHELL_CMD_CLS_HELP +Ekran temizler. + +. +:SHELL_CMD_DIR_HELP +Dizini g”sterir. + +. +:SHELL_CMD_ECHO_HELP +˜letileri g”sterir ve komut tekrarlanmasn etkinleŸtirir/devredŸ brakr. + +. +:SHELL_CMD_EXIT_HELP +Kabuktan ‡kar. + +. +:SHELL_CMD_HELP_HELP +Yardm g”rntler. + +. +:SHELL_CMD_MKDIR_HELP +Dizin oluŸturur. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [src:][yol] +MD [src:][yol] + +. +:SHELL_CMD_RMDIR_HELP +Dizini siler. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [src:][yol] +RD [src:][yol] + +. +:SHELL_CMD_SET_HELP +Ortam de§iŸkenlerini ayarlar. + +. +:SHELL_CMD_IF_HELP +Toplu iŸ programlarnda koŸullu iŸlemler ger‡ekleŸtirir. + +. +:SHELL_CMD_GOTO_HELP +Toplu iŸ beti§inde etiketli satra atlar. + +. +:SHELL_CMD_SHIFT_HELP +Toplu iŸ beti§inde komut satr parametrelerini sola kaydrr. + +. +:SHELL_CMD_TYPE_HELP +Bir yaz dosyasnn i‡eri§ini g”rntler. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [src:][yol][dosya_ismi] + +. +:SHELL_CMD_REM_HELP +Toplu iŸ dosaysna a‡klama ekler. + +. +:SHELL_CMD_REM_HELP_LONG +REM [a‡klama] + +. +:SHELL_CMD_NO_WILD +Bu komutun yaln bi‡imidir, joker karakterlere izin verilmez! + +. +:SHELL_CMD_RENAME_HELP +Bir ya da daha ‡ok dosyann isimlerini de§iŸtirir. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [src:][yol]dosya_ismi_1 dosya_ismi_2. +REN [src:][yol]dosya_ismi_1 dosya_ismi_2. + +Hedef dosya i‡in yeni bir src ya da yol belirtmeyece§inizi unutmayn. + +. +:SHELL_CMD_DELETE_HELP +Bir ya da daha ‡ok dosyay siler. + +. +:SHELL_CMD_COPY_HELP +Dosyalar kopyalar. + +. +:SHELL_CMD_CALL_HELP +BaŸka toplu iŸ dosyasnda bir toplu iŸ dosyasn baŸlatr. + +. +:SHELL_CMD_SUBST_HELP +Bir srcye bir i‡ dizin atar. + +. +:SHELL_CMD_LOADHIGH_HELP +Bri program st belle§e ykler (xms=true, umb=true gereklidir). + +. +:SHELL_CMD_CHOICE_HELP +Bir tuŸa baslmasn bekler ve ERRORLEVEL'i ayarlar. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:se‡imler] [/N] [/S] yaz + /C[:]se‡imler - Uygun tuŸlar belirtir. Varsaylan : yn. + /N - ˜stemcinin sonunda se‡imler g”rntlenmez. + /S - Se‡imleri se‡erken harf duyarll§n etkinleŸtirir. + text - ˜stemci olarak g”rntlenecek yaz. + +. +:SHELL_CMD_ATTRIB_HELP +BirŸey yapmaz. Uyumluluk i‡in sa§lanmŸtr. + +. +:SHELL_CMD_PATH_HELP +Uyumluluk i‡in sa§lanmŸtr. + +. +:SHELL_CMD_VER_HELP +Bildirilen DOS srmn g”rntler ve de§iŸtirir. + +. +:SHELL_CMD_VER_VER +DOSBox srm %s. Bildirilen DOS srm %d.%02d. + +. diff -Nru dosbox-staging-0.76.0/contrib/old-translations/tr/version.txt dosbox-staging-0.77.0/contrib/old-translations/tr/version.txt --- dosbox-staging-0.76.0/contrib/old-translations/tr/version.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/old-translations/tr/version.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +Turkish 0.74 diff -Nru "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/tr/Video Instructions.txt" "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/tr/Video Instructions.txt" --- "/tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/contrib/old-translations/tr/Video Instructions.txt" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/contrib/old-translations/tr/Video Instructions.txt" 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,35 @@ +SĂźrĂźm 0.65'ten beri, DOSBox ekran çĹkışında film oluşturmanÄązÄą sağlar. + +Bir film kaydÄą için, CTRL-ALT-F5'e basÄąn. +KayÄądÄą durdurmak/sonlandÄąrmak için, yeniden CTRL-ALT-F5'e basÄąn. + +Kaydedilmiş filmi oynatmak için, ZMBV çÜzĂźcĂźsĂź kullanabilir film oynatÄącÄąsÄąna +gereksinim duyarsÄąnÄąz. MS Windows kullanÄącÄąlarÄą DOSBox'un başlat menĂźsĂźnde +bulabilir. Linux ile diğer işletim sistemleri kullanÄącÄąlarÄą için ffmpeg +kĂźtĂźphanesini kullanan film oynatÄącÄąsÄą araştÄąrmalÄąsÄąnÄąz.(siz gĂźncellemeye ya da +dağıtÄąmÄąnÄąza yĂźkseltmesini istemeye gereksinim duyabilirsiniz). + +SÄąk Sorulan Sorular: +Soru: Filmin gĂśrĂźntĂźlenme sÄąrasÄąnda ses gecikiyor. +YanÄąt: GĂśrĂźntĂź Ăśzellikleri, yenileme hÄązÄąen az 70 hz olup olmadığınÄą denetleyin. +Filmi virtualdub (http://virtualdub.sf.net) ile oynatmayÄą deneyin. + +Soru: Neden elde edilen film birçok dosyadan oluşur? +YanÄąt: Oyun, çÜzĂźnĂźrlüğü her zaman değiştirdiğinde, DOSBox bir yeni film dosyasÄą +oluşturur, çßnkĂź bir film dosyasÄą yalnÄązca bir çÜzĂźnĂźrlĂźkte olabilir. + +Soru: KayÄąt sÄąrasÄąnda devri bilgisayarÄąmÄąn işleyebileceğinden daha yĂźkseğe +ayarlayabilir miyim? +YanÄąt: Evet. KayÄąt sÄąrasÄąnda, oyun yavaş ve takÄąlmalarla yĂźrĂźtĂźlĂźr, ama +elde edilen film istenilen hÄązda yĂźrĂźtĂźlmeli ve hiç takÄąlma olmamalÄą. + +Soru: Linux altÄąnda CTRL-ALT-F5 konsola geçer. +YanÄąt: 1. DOSBOX'u bĂśyle başlatÄąn: dosbox -startmapper + 2. Video'ya tÄąklayÄąn, Add'a tÄąklayÄąn + 3. Ä°stediğiniz tuşa basÄąn (Ăśrnek için scroll lock ya da printscreen) + 4. Exit'e tÄąklayÄąn. + 5. Scroll lock'a ya da seçtiğiniz herhangi tuşa basarak filimler + yapabilirsiniz. + +Soru: Renkler yanlış ve 64 bit Windows kullanÄąyorum. +YanÄąt: Buraya bakÄąn: http://vogons.zetafleet.com/viewtopic.php?t=12133 diff -Nru dosbox-staging-0.76.0/contrib/README.md dosbox-staging-0.77.0/contrib/README.md --- dosbox-staging-0.76.0/contrib/README.md 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/README.md 2021-07-02 15:47:39.000000000 +0000 @@ -9,9 +9,13 @@ - **icons**: Vector graphics and makefiles to re-create icons in .ico and .icns formats; read icons.md file for details - **static-fluidsynth**: Compiles a static FluidSynth library that can - be used by `./configure` in the absense of `pkg-config` + be used by `./configure` in the absence of `pkg-config` +- **static-glib**: Compiles a static Glib library that can be used by + `./configure` in the absence of `pkg-config` - **static-opus**: Compiles a static Opusfile library that can be used - by `./configure` in the absense of `pkg-config` + by `./configure` in the absence of `pkg-config` - **macos**: Files required for creating macOS App bundle - **linux**: Desktop file for Linux - +- **translations**: Translations for DOSBox Staging +- **old-translation**: Translated language files and manuals for old + DOSBox versions diff -Nru dosbox-staging-0.76.0/contrib/static-fluidsynth/Makefile dosbox-staging-0.77.0/contrib/static-fluidsynth/Makefile --- dosbox-staging-0.76.0/contrib/static-fluidsynth/Makefile 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/static-fluidsynth/Makefile 2021-07-02 15:47:39.000000000 +0000 @@ -66,7 +66,9 @@ fluidsynth/build: $(FLUIDSYNTH_ARCHIVE) @test -f $@ \ || (mkdir -p fluidsynth/build \ - && $(EXTRACT) $(FLUIDSYNTH_ARCHIVE) -C fluidsynth) + && $(EXTRACT) $(FLUIDSYNTH_ARCHIVE) -C fluidsynth) \ + && sed -i -E 's|^(Libs.+)|\1 $(GLIB_LIBS)|;s|^(Cflags.+)|\1 $(GLIB_CFLAGS)|' \ + fluidsynth/fluidsynth.pc.in fluidsynth/build/Makefile: fluidsynth/build cd fluidsynth \ @@ -75,6 +77,7 @@ -DBUILD_SHARED_LIBS=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="$(DIR)" \ + -DOpenMP_gomp_LIBRARY="" \ -DLIB_SUFFIX="" \ -Denable-alsa=0 \ -Denable-aufile=0 \ @@ -85,6 +88,9 @@ -Denable-floats=1 \ -Denable-ipv6=0 \ -Denable-jack=0 \ + -Denable-ladspa=0 \ + -Denable-lash=0 \ + -Denable-libinstpatch=0 \ -Denable-libsndfile=0 \ -Denable-midishare=0 \ -Denable-network=0 \ @@ -93,6 +99,8 @@ -Denable-pulseaudio=0 \ -Denable-readline=0 \ -Denable-sdl2=0 \ + -Denable-systemd=0 \ + -Denable-wasapi=0 \ -Denable-waveout=0 \ -Denable-winmidi=0 \ .. @@ -115,6 +123,10 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export FLUIDSYNTH_CFLAGS="-I$(CURDIR)/include $(GLIB_CFLAGS)" export FLUIDSYNTH_LIBS="$(CURDIR)/lib/libfluidsynth.a $(GLIB_LIBS) -lm" + +Export the following to configure dosbox-staging with pkg-config +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export PKG_CONFIG_PATH="$(CURDIR)/fluidsynth/build" endef GLIB_LIBS = $(shell pkg-config --libs gthread-2.0 glib-2.0) diff -Nru dosbox-staging-0.76.0/contrib/static-glib/.gitignore dosbox-staging-0.77.0/contrib/static-glib/.gitignore --- dosbox-staging-0.76.0/contrib/static-glib/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/static-glib/.gitignore 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,6 @@ +bin +include +lib* +glib +glib.tar.gz +share diff -Nru dosbox-staging-0.76.0/contrib/static-glib/Makefile dosbox-staging-0.77.0/contrib/static-glib/Makefile --- dosbox-staging-0.76.0/contrib/static-glib/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/static-glib/Makefile 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,123 @@ +## +# Fetch the latest dependencies from upstream +# ------------------------------------------- +GLIB_ARCHIVE = glib.tar.xz +GLIB_URL = https://download.gnome.org/sources/glib/2.67/glib-2.67.2.tar.xz +GLIB_SHA256 = b41d42d6c572e1e420ffc38a077e0157e0b53b5a94c9647a3dc3701043c3b69b + +## +# Common commands and arguments +# ----------------------------- +THREADS = $(shell nproc || echo 4) +CURL_FLAGS = --progress-bar +CURL = curl --location $(CURL_FLAGS) +WGET_FLAGS = --no-verbose --progress=bar +WGET = wget --no-clobber $(WGET_FLAGS) +EXTRACT = tar --strip 1 -Jxof +DIR := ${CURDIR} + +## +# Everything-targets +# ------------------ +.PHONY: all clean distclean +all: glib +clean: glib/clean +distclean: + rm -rf bin glib include lib* share *.xz + +## +# Re-useable download function that tries curl, then wget, and then +# prompts the user to manually download the files. Note that if +# one download fails then we assume they all will and therefore +# give the user the full list up-front. +# +define download + echo "Downloading $(URL) to ./$@" \ + && $(CURL) "$(URL)" -o "$@" \ + || $(WGET) "$(URL)" -O "$@" \ + || ( rm -f "$@" \ + && echo "" \ + && echo "DOWNLOAD FAILURE" \ + && echo "~~~~~~~~~~~~~~~~" \ + && echo "Please manually download the following, then re-run make:" \ + && echo " - $(GLIB_URL) to ./$(GLIB_ARCHIVE)" \ + && echo "" \ + && echo "Alternatively, you can use your own curl or wget" \ + && echo "arguments by passing CURL_FLAGS=\"--my-args\" and" \ + && echo "WGET_FLAGS=\"--my-flags\" to the make command." \ + && echo "" \ + && echo "For example, disable certificate checking:" \ + && echo " make CURL_FLAGS=\"-k\"" \ + && echo " make WGET_FLAGS=\"--no-check-certificate\"" \ + && echo "" \ + ) +endef + +define checksum + echo $(SUM) $(FILENAME) | sha256sum --check +endef + +## +# GLib Library +# ------------ +glib: glib-message + +glib: lib/libglib-2.0.a + +$(GLIB_ARCHIVE): + $(eval URL := $(GLIB_URL)) + @$(download) + $(eval SUM := $(GLIB_SHA256)) + $(eval FILENAME := $(GLIB_ARCHIVE)) + @$(checksum) + +glib/build: $(GLIB_ARCHIVE) + @test -f $@ \ + || (mkdir -p glib/build \ + && $(EXTRACT) $(GLIB_ARCHIVE) -C glib) + +glib/build/build.ninja: glib/build + cd glib \ + && cd build \ + && meson \ + --auto-features=disabled \ + --buildtype=release \ + --default-library=static \ + --prefix="$(DIR)" \ + --strip \ + -Dbsymbolic_functions=false \ + -Dfam=false \ + -Dglib_assert=false \ + -Dinstalled_tests=false \ + -Dinternal_pcre=true \ + -Dlibmount=disabled \ + -Dman=false \ + -Dnls=disabled \ + -Dselinux=disabled \ + -Dxattr=false \ + .. + +lib/libglib-2.0.a: glib/build/build.ninja + cd glib/build \ + && strings config.h \ + && ninja \ + && ninja install \ + && cd "$(DIR)"/lib \ + && ln -sf */* . + +define GLIB_EXPORTS + +Export the following to configure dosbox-staging without pkg-config +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export GLIB_CFLAGS="-I$(CURDIR)/include/glib-2.0" +export GLIB_LIBS="$(CURDIR)/lib/libglib-2.0.a" +export GTHREAD_CFLAGS="-I$(CURDIR)/include/glib-2.0" +export GTHREAD_LIBS="$(CURDIR)/lib/libgthread-2.0.a" +endef + +.PHONY: glib-message +glib-message: lib/libglib-2.0.a + $(info $(GLIB_EXPORTS)) + +glib/clean: + rm -rf glib/build diff -Nru dosbox-staging-0.76.0/contrib/translations/en/en_US.lng dosbox-staging-0.77.0/contrib/translations/en/en_US.lng --- dosbox-staging-0.76.0/contrib/translations/en/en_US.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/en/en_US.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1428 @@ +:CONFIG_FULLSCREEN +Start DOSBox directly in fullscreen. +Press Alt+Enter to switch back to window. +. +:CONFIG_DISPLAY +Number of display to use; values depend on OS and user settings. +. +:CONFIG_VSYNC +Vertical sync setting not implemented (setting ignored) +. +:CONFIG_FULLRESOLUTION +What resolution to use for fullscreen: 'original', 'desktop' +or a fixed size (e.g. 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Set window size to be used when running in windowed mode: + default: Select the best option based on your + environment and other settings. + original: Resize window to the resolution picked by + the emulated program. + resizable: Make the emulator window resizable. + This is an experimental option, works only with + output=opengl and glshader=sharp (or none) + : Scale the window content to the indicated + dimensions, in WxH format. For example: 1024x768. + Scaling is not performed for output=surface. +. +:CONFIG_OUTPUT +What video system to use for output. +. +:CONFIG_TEXTURE_RENDERER +Choose a renderer driver when using a texture output mode. +Use texture_renderer=auto for an automatic choice. +. +:CONFIG_CAPTURE_MOUSE +Choose a mouse control method: + onclick: The mouse will be captured after the first + click inside the window. + onstart: The mouse is captured immediately on start + (similar to real DOS). + seamless: The mouse can move seamlessly in and out of DOSBox + window and cannot be captured. + nomouse: The mouse is disabled and hidden without any + input sent to the game. +Choose how middle-clicks are handled (second parameter): + middlegame: Middle-clicks are sent to the game + (Ctrl+F10 uncaptures the mouse). + middlerelease: Middle-clicks are used to uncapture the mouse + (not sent to the game). However, middle-clicks + will be sent to the game in fullscreen or when + seamless control is set. + Ctrl+F10 will also uncapture the mouse. +Defaults (if not present or incorrect): seamless middlerelease +. +:CONFIG_SENSITIVITY +Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Enable this setting to bypass your operating system's mouse +acceleration and sensitivity settings. This works in +fullscreen or when the mouse is captured in window mode. +. +:CONFIG_WAITONERROR +Wait before closing the console if dosbox has an error. +. +:CONFIG_PRIORITY +Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized. +pause is only valid for the second entry. +. +:CONFIG_MAPPERFILE +File used to load/save the key/event mappings from. +Resetmapper only works with the default value. +. +:CONFIG_SCREENSAVER +Use 'allow' or 'block' to override the SDL_VIDEO_ALLOW_SCREENSAVER +environment variable (which usually blocks the OS screensaver +while the emulator is running). +. +:CONFIG_LANGUAGE +Select another language file. +. +:CONFIG_MACHINE +The type of machine DOSBox tries to emulate. +. +:CONFIG_CAPTURES +Directory where things like wave, midi, screenshot get captured. +. +:CONFIG_MEMSIZE +Amount of memory DOSBox has in megabytes. +This value is best left at its default to avoid problems with some games, +though few games might require a higher value. +There is generally no speed advantage when raising this value. +. +:CONFIG_STARTUP_VERBOSITY +Controls verbosity prior to displaying the program: +Verbosity | Splash | Welcome | Early stdout +high | yes | yes | yes +medium | no | yes | yes +low | no | no | yes +quiet | no | no | no +splash_only | yes | no | no +auto | 'low' if exec or dir is passed, otherwise 'high' +. +:CONFIG_FRAMESKIP +How many frames DOSBox skips before drawing one. +. +:CONFIG_ASPECT +Scales the vertical resolution to produce a 4:3 display aspect +ratio, matching that of the original standard-definition monitors +for which the majority of DOS games were designed. This setting +only affects video modes that use non-square pixels, such as +320x200 or 640x400; where as square-pixel modes, such as 640x480 +and 800x600, will be displayed as-is. +. +:CONFIG_MONOCHROME_PALETTE +Select default palette for monochrome display. +Works only when emulating hercules or cga_mono. +You can also cycle through available colours using F11. +. +:CONFIG_SCALER +Scaler used to enlarge/enhance low resolution modes. +If 'forced' is appended, then the scaler will be used even if +the result might not be desired. +Note that some scalers may use black borders to fit the image +within your configured display resolution. If this is +undesirable, try either a different scaler or enabling +fullresolution output. +. +:CONFIG_GLSHADER +Either 'none' or a GLSL shader name. Works only with +OpenGL output. Can be either an absolute path, a file +in the 'glshaders' subdirectory of the DOSBox +configuration directory, or one of the built-in shaders: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (default). +. +:CONFIG_CORE +CPU Core used in emulation. auto will switch to dynamic if available and +appropriate. +. +:CONFIG_CPUTYPE +CPU Type used in emulation. auto is the fastest choice. +. +:CONFIG_CYCLES +Amount of instructions DOSBox tries to emulate each millisecond. +Setting this value too high results in sound dropouts and lags. +Cycles can be set in 3 ways: + 'auto' tries to guess what a game needs. + It usually works, but can fail for certain games. + 'fixed #number' will set a fixed amount of cycles. This is what you usually + need if 'auto' fails (Example: fixed 4000). + 'max' will allocate as much cycles as your computer is able to + handle. +. +:CONFIG_CYCLEUP +Number of cycles to decrease/increase with keycombos. (Ctrl+F11/Ctrl+F12) +. +:CONFIG_CYCLEDOWN +Setting it lower than 100 will be a percentage. +. +:CONFIG_NOSOUND +Enable silent mode, sound is still emulated though. +. +:CONFIG_RATE +Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality. +. +:CONFIG_BLOCKSIZE +Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged. +. +:CONFIG_PREBUFFER +How many milliseconds of data to keep on top of the blocksize. +. +:CONFIG_MIDIDEVICE +Device that will receive the MIDI data (from the emulated MIDI +interface - MPU-401). Choose one of the following: +'fluidsynth', to use the built-in MIDI synthesizer. See the + [fluidsynth] section for detailed configuration. +'mt32', to use the built-in Roland MT-32 synthesizer. + See the [mt32] section for detailed configuration. +'auto', to use the first working external MIDI player. This + might be a software synthesizer or physical device. +. +:CONFIG_MIDICONFIG +Configuration options for the selected MIDI interface. +This is usually the id or name of the MIDI synthesizer you want +to use (find the id/name with DOS command 'mixer /listmidi'). +- This option has no effect when using the built-in synthesizers + (mididevice = fluidsynth or mt32). +- When using ALSA, use Linux command 'aconnect -l' to list open + MIDI ports, and select one (for example 'midiconfig=14:0' + for sequencer client 14, port 0). +- If you're using a physical Roland MT-32 with revision 0 PCB, + the hardware may require a delay in order to prevent its + buffer from overflowing. In that case, add 'delaysysex', + for example: 'midiconfig=2 delaysysex'. +See the README/Manual for more details. +. +:CONFIG_MPU401 +Type of MPU-401 to emulate. +. +:CONFIG_SOUNDFONT +Path to a SoundFont file in .sf2 format. You can use an +absolute or relative path, or the name of an .sf2 inside +the 'soundfonts' directory within your DOSBox configuration +directory. +An optional percentage will scale the SoundFont's volume. +For example: 'soundfont.sf2 50' will attenuate it by 50 percent. +The scaling percentage can range from 1 to 500. +. +:CONFIG_MODEL +Model of synthesizer to use. The default (auto) prefers CM-32L +if both sets of ROMs are provided. For early Sierra games and Dune 2 +it's recommended to use 'mt32', while newer games typically made +use of the CM-32L's extra sound effects (use 'auto' or 'cm32l') +. +:CONFIG_ROMDIR +The directory containing one or both pairs of MT-32 and/or CM-32L ROMs. +The files must be named in capitals, as follows: + - MT-32 ROM pair: MT32_CONTROL.ROM and MT32_PCM.ROM + - CM-32L ROM pair: CM32L_CONTROL.ROM and CM32L_PCM.ROM +The directory can be absolute or relative, or leave it blank to +use the 'mt32-roms' directory in your DOSBox configuration +directory, followed by checking other common system locations. +. +:CONFIG_SBTYPE +Type of Sound Blaster to emulate. 'gb' is Game Blaster. +. +:CONFIG_SBBASE +The IO address of the Sound Blaster. +. +:CONFIG_IRQ +The IRQ number of the Sound Blaster. +. +:CONFIG_DMA +The DMA number of the Sound Blaster. +. +:CONFIG_HDMA +The High DMA number of the Sound Blaster. +. +:CONFIG_SBMIXER +Allow the Sound Blaster mixer to modify the DOSBox mixer. +. +:CONFIG_OPLRATE +oplrate is deprecated. The OPL waveform is now sampled + at the mixer's playback rate to avoid resampling. +. +:CONFIG_OPLMODE +Type of OPL emulation. On 'auto' the mode is determined by 'sbtype'. +All OPL modes are AdLib-compatible, except for 'cms'. +. +:CONFIG_OPLEMU +Provider for the OPL emulation. 'compat' provides better quality, +'nuked' is the default and most accurate (but the most CPU-intensive). +. +:CONFIG_GUS +Enable Gravis UltraSound emulation. +. +:CONFIG_GUSBASE +The IO base address of the Gravis UltraSound. +. +:CONFIG_GUSIRQ +The IRQ number of the Gravis UltraSound. +. +:CONFIG_GUSDMA +The DMA channel of the Gravis UltraSound. +. +:CONFIG_ULTRADIR +Path to UltraSound directory. In this directory +there should be a MIDI directory that contains +the patch files for GUS playback. Patch sets used +with Timidity should work fine. +. +:CONFIG_PCSPEAKER +Enable PC-Speaker emulation. +. +:CONFIG_PCRATE +Sample rate of the PC-Speaker sound generation. +. +:CONFIG_ZERO_OFFSET +Neutralizes and prevents the PC speaker's DC-offset from harming other sources. +'auto' enables this for non-Windows systems and disables it on Windows. +If your OS performs its own DC-offset correction, then set this to 'false'. +. +:CONFIG_TANDY +Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'. +. +:CONFIG_TANDYRATE +Sample rate of the Tandy 3-Voice generation. +. +:CONFIG_DISNEY +Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible). +. +:CONFIG_JOYSTICKTYPE +Type of joystick to emulate: auto (default), +none (disables joystick emulation), +2axis (supports two joysticks), +4axis (supports one joystick, first joystick used), +4axis_2 (supports one joystick, second joystick used), +fcs (Thrustmaster), ch (CH Flightstick). +auto chooses emulation depending on real joystick(s). +(Remember to reset DOSBox's mapperfile if you saved it earlier) +. +:CONFIG_TIMED +enable timed intervals for axis. Experiment with this option, if your joystick drifts (away). +. +:CONFIG_AUTOFIRE +continuously fires as long as you keep the button pressed. +. +:CONFIG_SWAP34 +swap the 3rd and the 4th axis. Can be useful for certain joysticks. +. +:CONFIG_BUTTONWRAP +enable button wrapping at the number of emulated buttons. +. +:CONFIG_CIRCULARINPUT +enable translation of circular input to square output. +Try enabling this if your left analog stick can only move in a circle. +. +:CONFIG_DEADZONE +the percentage of motion to ignore. 100 turns the stick into a digital one. +. +:CONFIG_SERIAL1 +set type of device connected to com port. +Can be disabled, dummy, modem, nullmodem, directserial. +Additional parameters must be in the same line in the form of +parameter:value. Parameter for all types is irq (optional). +for directserial: realport (required), rxdelay (optional). + (realport:COM1 realport:ttyS0). +for modem: listenport (optional). +for nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (all optional). +Example: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +see serial1 +. +:CONFIG_SERIAL3 +see serial1 +. +:CONFIG_SERIAL4 +see serial1 +. +:CONFIG_PHONEBOOKFILE +File used to map fake phone numbers to addresses. +. +:CONFIG_XMS +Enable XMS support. +. +:CONFIG_EMS +Enable EMS support. The default (=true) provides the best +compatibility but certain applications may run better with +other choices, or require EMS support to be disabled (=false) +to work at all. +. +:CONFIG_UMB +Enable UMB support. +. +:CONFIG_VER +Set DOS version (5.0 by default). Specify as major.minor format. +A single number is treated as the major version. +Common settings are 3.3, 5.0, 6.22, and 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Language code of the keyboard layout (or none). +. +:CONFIG_IPX +Enable ipx over UDP/IP emulation. +. +:AUTOEXEC_CONFIGFILE_HELP +Lines in this section will be run at startup. +You can put your MOUNT lines here. + +. +:CONFIGFILE_INTRO +# This is the configuration file for dosbox-staging (%s). +# Lines starting with a '#' character are comments. + +. +:CONFIG_SUGGESTED_VALUES +Possible values +. +:PROGRAM_CONFIG_NOCONFIGFILE +No config file loaded! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Primary config file: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Additional config files: + +. +:PROGRAM_CONFIG_CONFDIR +DOSBox Staging %s configuration directory: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Can't open file %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Writing config file %s + +. +:PROGRAM_CONFIG_USAGE +Config tool: +-writeconf or -wc without parameter: write to primary loaded config file. +-writeconf or -wc with filename: write file to config directory. +Use -writelang or -wl filename to write the current language strings. +-r [parameters] + Restart DOSBox, either using the previous parameters or any that are appended. +-wcp [filename] + Write config file to the program directory, dosbox.conf or the specified + filename. +-wcd + Write to the default config file in the config directory. +-l lists configuration parameters. +-h, -help, -? sections / sectionname / propertyname + Without parameters, displays this help screen. Add "sections" for a list of + sections. For info about a specific section or property add its name behind. +-axclear clears the autoexec section. +-axadd [line] adds a line to the autoexec section. +-axtype prints the content of the autoexec section. +-securemode switches to secure mode. +-avistart starts AVI recording. +-avistop stops AVI recording. +-startmapper starts the keymapper. +-get "section property" returns the value of the property. +-set "section property=value" sets the value. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Purpose of property "%s" (contained in section "%s"): +%s + +Possible Values: %s +Default value: %s +Current value: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Purpose of section "%s": +%s +Current value: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +This property cannot be changed at runtime. + +. +:PROGRAM_CONFIG_HLP_POSINT +positive integer +. +:PROGRAM_CONFIG_HLP_SECTHLP +Section %s contains the following properties: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +DOSBox configuration contains the following sections: + + +. +:PROGRAM_CONFIG_SECURE_ON +Switched to secure mode. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +This operation is not permitted in secure mode. + +. +:PROGRAM_CONFIG_SECTION_ERROR +Section "%s" doesn't exist. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" is not a valid value for property %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +No such section or property. + +. +:PROGRAM_CONFIG_NO_PROPERTY +There is no property "%s" in section "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Correct syntax: config -set "section property". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Correct syntax: config -get "section property". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox was started with the following command line parameters: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Missing parameter. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMs found: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Drive +. +:PROGRAM_MOUNT_STATUS_TYPE +Type +. +:PROGRAM_MOUNT_STATUS_LABEL +Label +. +:PROGRAM_MOUNT_STATUS_2 +Drive %c is mounted as %s + +. +:PROGRAM_MOUNT_STATUS_1 +The currently mounted drives are: + +. +:PROGRAM_MOUNT_ERROR_1 +Directory %s doesn't exist. + +. +:PROGRAM_MOUNT_ERROR_2 +%s isn't a directory + +. +:PROGRAM_MOUNT_ILL_TYPE +Illegal type %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Drive %c already mounted with %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Drive %c isn't mounted. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Drive %c has successfully been removed. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Virtual Drives can not be unMOUNTed. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' is not a valid drive identifier. + +. +:PROGRAM_MOUNT_WARNING_WIN +Mounting c:\ is NOT recommended. Please mount a (sub)directory next time. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Mounting / is NOT recommended. Please mount a (sub)directory next time. + +. +:PROGRAM_MOUNT_NO_OPTION +Warning: Ignoring unsupported option '%s'. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +A normal directory needs to be MOUNTed first before an overlay can be added on top. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +The overlay is NOT compatible with the drive that is specified. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +The overlay needs to be specified using the same addressing as the underlying drive. No mixing of relative and absolute paths. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +The overlay directory can not be the same as underlying drive. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Something went wrong. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Overlay %s on drive %c mounted. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Can't move drive Z. Drive %c is mounted already. + +. +:PROGRAM_MEM_CONVEN +%10d kB free conventional memory + +. +:PROGRAM_MEM_EXTEND +%10d kB free extended memory + +. +:PROGRAM_MEM_EXPAND +%10d kB free expanded memory + +. +:PROGRAM_MEM_UPPER +%10d kB free upper memory in %d blocks (largest UMB %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB allocated. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB freed. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Used memory freed. + +. +:PROGRAM_LOADFIX_ERROR +Memory allocation error. + +. +:MSCDEX_SUCCESS +MSCDEX installed. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Failure: Drive-letters of multiple CD-ROM drives have to be continuous. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Failure: Not yet supported. + +. +:MSCDEX_ERROR_PATH +MSCDEX: Specified location is not a CD-ROM drive. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Failure: Invalid file or unable to open. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Failure: Too many CD-ROM drives (max: 5). MSCDEX Installation failed. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Mounted subdirectory: limited support. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Failure: File is either no ISO/CUE image or contains errors. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Failure: Unknown error. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Warning: Ignoring unsupported option '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +Drive cache cleared. + +. +:PROGRAM_INTRO +Welcome to DOSBox Staging, an x86 emulator with sound and graphics. +DOSBox creates a shell for you which looks like old plain DOS. + +For information about basic mount type intro mount +For information about CD-ROM support type intro cdrom +For information about special keys type intro special +For more imformation, visit DOSBox Staging wiki: +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox will stop/exit without a warning if an error occurred! + +. +:PROGRAM_INTRO_MOUNT_START +Here are some commands to get you started: +Before you can use the files located on your own filesystem, +You have to mount the directory containing the files. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosgames\ will create a C drive with c:\dosgames as contents.ş +ş ş +ş c:\dosgames\ is an example. Replace it with your own games directory.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosgames will create a C drive with ~/dosgames as contents.ş +ş ş +ş ~/dosgames is an example. Replace it with your own games directory. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +After successfully mounting the disk you can type c: to go to your freshly +mounted C-drive. Typing dir there will show its contents. cd will allow you to +enter a directory (recognised by the [] in a directory listing). +You can run programs/files with extensions .exe .bat and .com. + +. +:PROGRAM_INTRO_CDROM +How to mount a virtual CD-ROM Drive in DOSBox: +DOSBox provides CD-ROM emulation on several levels. + +This works on all normal directories, installs MSCDEX and marks the files +read-only. Usually this is enough for most games: + +mount D C:\example -t cdrom + +If it doesn't work you might have to tell DOSBox the label of the CD-ROM: + +mount D C:\example -t cdrom -label CDLABEL + +Additionally, you can use imgmount to mount iso or cue/bin images: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Special keys: +These are the default keybindings. +They can be changed in the keymapper. + +Alt+Enter Switch between fullscreen and window mode. +Alt+Pause Pause/Unpause emulator. +Ctrl+F1 Start the keymapper. +Ctrl+F4 Swap mounted disk image, update directory cache for all drives. +Ctrl+F5 Save a screenshot. +Ctrl+F6 Start/Stop recording sound output to a wave file. +Ctrl+F7 Start/Stop recording video output to a zmbv file. +Ctrl+F9 Shutdown emulator. +Ctrl+F10 Capture/Release the mouse. +Ctrl+F11 Slow down emulation. +Ctrl+F12 Speed up emulation. +Alt+F12 Unlock speed (turbo button/fast forward). + +. +:PROGRAM_BOOT_NOT_EXIST +Bootdisk file does not exist. Failing. + +. +:PROGRAM_BOOT_NOT_OPEN +Cannot open bootdisk file. Failing. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Image file is read-only! Might create problems. + +. +:PROGRAM_BOOT_PRINT_ERROR +This command boots DOSBox from either a floppy or hard disk image. + +For this command, one can specify a succession of floppy disks swappable +by pressing Ctrl+F4, and -l specifies the mounted drive to boot from. If +no drive letter is specified, this defaults to booting from the A drive. +The only bootable drive letters are A, C, and D. For booting from a hard +drive (C or D), the image should have already been mounted using the +IMGMOUNT command. + +The syntax of this command is: + +BOOT [diskimg1.img diskimg2.img] [-l driveletter] + +. +:PROGRAM_BOOT_UNABLE +Unable to boot off of drive %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Opening image file: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Cannot open %s +. +:PROGRAM_BOOT_BOOT +Booting from drive %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr cartridge found, but machine is not PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Available PCjr cartridge commands: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +No PCjr cartridge commands found +. +:PROGRAM_LOADROM_SPECIFY_FILE +Must specify ROM file to load. + +. +:PROGRAM_LOADROM_CANT_OPEN +ROM file not accessible. + +. +:PROGRAM_LOADROM_TOO_LARGE +ROM file too large. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +Video BIOS not supported by machine type. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +ROM file not recognized. + +. +:PROGRAM_LOADROM_BASIC_LOADED +BASIC ROM loaded. + +. +:SHELL_CMD_IMGMOUNT_HELP +mounts compact disc image(s) or floppy disk image(s) to a given drive letter. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Mount a CD-ROM, floppy, or disk image to a drive letter. + +Usage: + imgmount DRIVE CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount DRIVE IMAGEFILE [IMAGEFILE2 [..]] [-fs fat] -t hdd|floppy + imgmount DRIVE BOOTIMAGE [-fs fat|none] -t hdd -size GEOMETRY + imgmount -u DRIVE (unmounts the DRIVE's image) + +Where: + DRIVE is the drive letter where the image will be mounted: a, c, d, ... + CDROM-SET is an ISO, CUE+BIN, CUE+ISO, or CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + IMAGEFILE is a hard drive or floppy image in FAT16 or FAT12 format + BOOTIMAGE is a bootable disk image with specified -size GEOMETRY: + bytes-per-sector,sectors-per-head,heads,cylinders +Notes: + - Ctrl+F4 swaps & mounts the next CDROM-SET or IMAGEFILE, if provided. + +Examples: + imgmount D /home/USERNAME/games/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A floppy1.img floppy2.img floppy3.img -t floppy + imgmount C ~/dos/c_drive.img -t hdd + imgmount C bootable.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +maps physical folders or drives to a virtual drive letter. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Mount a directory from the host OS to a drive letter. + +Usage: + mount DRIVE DIRECTORY [-t TYPE] [-freesize SIZE] [-label LABEL] + mount -u DRIVE (unmounts the DRIVE's directory) + +Where: + DRIVE the drive letter where the directory will be mounted: A, C, D, ... + DIRECTORY is the directory on the host OS to be mounted + TYPE type of the directory to mount: dir, floppy, cdrom, or overlay + SIZE free space for the virtual drive (KiB for floppies, MiB otherwise) + LABEL drive label name to be used + +Notes: + - '-t overlay' redirects writes for mounted drive to another directory. + - Additional options are described in the manual (README file, chapter 4). + +Examples: + mount C ~/dosgames + mount D "/media/USERNAME/Game CD" -t cdrom + mount C my_savegame_files -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Must specify drive letter to mount image at. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Must specify drive number (0 or 3) to mount image at (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +For CD-ROM images: IMGMOUNT drive-letter location-of-image -t iso + +For hardrive images: Must specify drive geometry for hard drives: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT drive-letter location-of-image -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Could not load image file. +Check that the path is correct and the image is accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Could not extract drive geometry from image. +Use parameter -size bps,spc,hpc,cyl to specify the geometry. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Type '%s' is unsupported. Specify 'floppy', 'hdd', 'cdrom', or 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" is unsupported. Specify "fat" or "iso" or "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Must specify file-image to mount. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Image file not found. + +. +:PROGRAM_IMGMOUNT_MOUNT +To mount directories, use the MOUNT command, not the IMGMOUNT command. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Drive already mounted at that letter. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Can't create drive from file. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Drive number %d mounted as %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +The image must be on a host or local drive. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Using multiple files is only supported for cue/iso images. + +. +:PROGRAM_KEYB_INFO +Codepage %i has been loaded + +. +:PROGRAM_KEYB_INFO_LAYOUT +Codepage %i has been loaded for layout %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [keyboard layout ID[ codepage number[ codepage file]]] + +Some examples: + KEYB: Display currently loaded codepage. + KEYB sp: Load the spanish (SP) layout, use an appropriate codepage. + KEYB sp 850: Load the spanish (SP) layout, use codepage 850. + KEYB sp 850 mycp.cpi: Same as above, but use file mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Keyboard layout %s loaded for codepage %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Keyboard file %s not found + + +. +:PROGRAM_KEYB_INVALIDFILE +Keyboard file %s invalid + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +No layout in %s for codepage %i + +. +:PROGRAM_KEYB_INVCPFILE +None or invalid codepage file for layout %s + + +. +:SHELL_ILLEGAL_PATH +Illegal Path. + +. +:SHELL_CMD_HELP +If you want a list of all supported commands type help /all . +A short list of the most often used commands: + +. +:SHELL_CMD_ECHO_ON +ECHO is on. + +. +:SHELL_CMD_ECHO_OFF +ECHO is off. + +. +:SHELL_ILLEGAL_SWITCH +Illegal switch: %s. + +. +:SHELL_MISSING_PARAMETER +Required parameter missing. + +. +:SHELL_CMD_CHDIR_ERROR +Unable to change to: %s. + +. +:SHELL_CMD_CHDIR_HINT +Hint: To change to different drive type %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +directoryname is longer than 8 characters and/or contains spaces. +Try cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +You are still on drive Z:, change to a mounted drive with C:. + +. +:SHELL_CMD_DATE_HELP +Displays or changes the internal date. + +. +:SHELL_CMD_DATE_ERROR +The specified date is not correct. + +. +:SHELL_CMD_DATE_DAYS +3SunMonTueWedThuFriSat +. +:SHELL_CMD_DATE_NOW +Current date: +. +:SHELL_CMD_DATE_SETHLP +Type 'date MM-DD-YYYY' to change. + +. +:SHELL_CMD_DATE_FORMAT +M/D/Y +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-DD-YYYY] + MM-DD-YYYY: new date to set + /S: Permanently use host time and date as DOS time + /F: Switch back to DOSBox internal time (opposite of /S) + /T: Only display date + /H: Synchronize with host + +. +:SHELL_CMD_TIME_HELP +Displays the internal time. + +. +:SHELL_CMD_TIME_NOW +Current time: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Display simple time + /H: Synchronize with host + +. +:SHELL_CMD_MKDIR_ERROR +Unable to make: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Unable to remove: %s. + +. +:SHELL_CMD_DEL_ERROR +Unable to delete: %s. + +. +:SHELL_SYNTAXERROR +The syntax of the command is incorrect. + +. +:SHELL_CMD_SET_NOT_SET +Environment variable %s not defined. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Not enough environment space left. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Missing filename. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Missing number. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Invalid number. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +No label supplied to GOTO command. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Label %s not found. + +. +:SHELL_CMD_FILE_NOT_FOUND +File %s not found. + +. +:SHELL_CMD_FILE_EXISTS +File %s already exists. + +. +:SHELL_CMD_DIR_VOLUME + Volume in drive %c is %s + +. +:SHELL_CMD_DIR_INTRO + Directory of %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d file(s) %21s bytes + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d dir(s) %21s bytes free + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Drive %c does not exist! +You must mount it first. Type intro or intro mount for more information. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Illegal command: %s. + +. +:SHELL_CMD_PAUSE +Press any key to continue... +. +:SHELL_CMD_PAUSE_HELP +Waits for 1 keystroke to continue. + +. +:SHELL_CMD_COPY_FAILURE +Copy failure : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d File(s) copied. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Unable to remove, drive not in use. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST failed. You either made an error in your commandline or the target drive is already used. +It's only possible to use SUBST on Local drives +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Welcome to DOSBox Staging %-40s ş +ş ş +ş For a short introduction for new users type: INTRO ş +ş For supported shell commands type: HELP ş +ş ş +ş To adjust the emulated CPU speed, use Ctrl+F11 and Ctrl+F12. ş +ş To activate the keymapper Ctrl+F1. ş +ş For more information read the README file in the DOSBox directory. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox supports Composite CGA mode. ş +ş Use F12 to set composite output ON, OFF, or AUTO (default). ş +ş (Alt+)F11 changes hue; Ctrl+Alt+F11 selects early/late CGA model. ş +ş ş + +. +:SHELL_STARTUP_CGA_MONO +ş Use F11 to cycle through green, amber, white and paper-white mode, ş +ş and Alt+F11 to change contrast/brightness settings. ş + +. +:SHELL_STARTUP_HERC +ş Use F11 to cycle through white, amber, and green monochrome color. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Press Alt+Pause to enter the debugger or start the exe with DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş https://dosbox-staging.github.io ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Displays/changes the current directory. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [drive:][path] +CHDIR [..] +CD [drive:][path] +CD [..] + + .. Specifies that you want to change to the parent directory. + +Type CD drive: to display the current directory in the specified drive. +Type CD without parameters to display the current drive and directory. + +. +:SHELL_CMD_CLS_HELP +Clear the screen. + +. +:SHELL_CMD_DIR_HELP +Displays a list of files and subdirectories in a directory. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [drive:][path][filename] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [drive:][path][filename] + Specifies drive, directory, and/or files to list. + /W Uses wide list format. + /B Uses bare format (no heading information or summary). + /P Pauses after each screenful of information. + /AD Displays all directories. + /A-D Displays all files. + /O List by files in sorted order. + - Prefix to reverse order + sortorder N By name (alphabetic) S By size (smallest first) + E By extension (alphabetic) D By date & time (oldest first) + +. +:SHELL_CMD_ECHO_HELP +Display messages and enable/disable command echoing. + +. +:SHELL_CMD_EXIT_HELP +Exit from the shell. + +. +:SHELL_CMD_HELP_HELP +Show help. + +. +:SHELL_CMD_MKDIR_HELP +Make Directory. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [drive:][path] +MD [drive:][path] + +. +:SHELL_CMD_RMDIR_HELP +Remove Directory. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [drive:][path] +RD [drive:][path] + +. +:SHELL_CMD_SET_HELP +Change environment variables. + +. +:SHELL_CMD_IF_HELP +Performs conditional processing in batch programs. + +. +:SHELL_CMD_GOTO_HELP +Jump to a labeled line in a batch script. + +. +:SHELL_CMD_SHIFT_HELP +Leftshift commandline parameters in a batch script. + +. +:SHELL_CMD_TYPE_HELP +Display the contents of a text-file. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [drive:][path][filename] + +. +:SHELL_CMD_REM_HELP +Add comments in a batch file. + +. +:SHELL_CMD_REM_HELP_LONG +REM [comment] + +. +:SHELL_CMD_NO_WILD +This is a simple version of the command, no wildcards allowed! + +. +:SHELL_CMD_RENAME_HELP +Renames one or more files. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [drive:][path]filename1 filename2. +REN [drive:][path]filename1 filename2. + +Note that you can not specify a new drive or path for your destination file. + +. +:SHELL_CMD_DELETE_HELP +Removes one or more files. + +. +:SHELL_CMD_COPY_HELP +Copy files. + +. +:SHELL_CMD_CALL_HELP +Start a batch file from within another batch file. + +. +:SHELL_CMD_SUBST_HELP +Assign an internal directory to a drive. + +. +:SHELL_CMD_LOADHIGH_HELP +Loads a program into upper memory (requires xms=true,umb=true). + +. +:SHELL_CMD_LS_HELP +List directory contents. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [PATTERN] + +. +:SHELL_CMD_LS_PATH_ERR +ls: cannot access '%s': No such file or directory + +. +:SHELL_CMD_CHOICE_HELP +Waits for a keypress and sets ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:choices] [/N] [/S] text + /C[:]choices - Specifies allowable keys. Default is: yn. + /N - Do not display the choices at end of prompt. + /S - Enables case-sensitive choices to be selected. + text - The text to display as a prompt. + +. +:SHELL_CMD_ATTRIB_HELP +Does nothing. Provided for compatibility. + +. +:SHELL_CMD_PATH_HELP +Provided for compatibility. + +. +:SHELL_CMD_VER_HELP +View or set the reported DOS version. + +. +:SHELL_CMD_VER_HELP_LONG +Usage: + ver + ver set VERSION + +Where: + VERSION can be a whole number, such as 5, or include a two-digit decimal + value, such as: 6.22, 7.01, or 7.10. The decimal can alternatively be + space-separated, such as: 6 22, 7 01, or 7 10. + +Notes: + The DOS version can also be set in the configuration file under the [dos] + section using the "ver = VERSION" setting. + +Examples: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging version %s +DOS version %d.%02d + +. +:SHELL_CMD_VER_INVALID +The specified DOS version is not correct. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/encode.sh dosbox-staging-0.77.0/contrib/translations/encode.sh --- dosbox-staging-0.76.0/contrib/translations/encode.sh 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/encode.sh 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,59 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020-2021 Patryk Obara + +# Encode translation files in old .lng format from utf-8 to the codepage +# appropriate in DOS for a particular language. + +# Literal conversion - for languages that can be fully encoded +tconv_l () { + echo "Encoding $2 with $1 to $3.lng" + iconv -f UTF-8 -t "$1" "$2" > "$3.lng" +} + +# Transliteration - lossy encoding, some letters will be replaced +tconv_t () { + echo "Encoding $2 with $1 to $3.$1.lng" + iconv -f UTF-8 -t "$1//TRANSLIT" "$2" > "$3.$1.lng" +} + +trans_dir=$(dirname "$0") + +pushd "$trans_dir" > /dev/null || exit + +echo "In directory $trans_dir:" + +# (default) +# keyb us 437 +# keyb us 858 +tconv_l CP437 "utf-8/en/en-0.77.0-alpha.txt" en/en_US + +# keyb es +# keyb es 437 +# keyb es 858 +tconv_l CP858 "utf-8/es/es-0.77.0-alpha.txt" es/es_ES + +# keyb fr +# keyb fr 437 +# keyb fr 858 +tconv_l CP858 "utf-8/fr/fr-0.77.0-alpha.txt" fr/fr_FR + +# keyb it +# keyb it 858 +tconv_l CP858 "utf-8/it/it-0.77.0-alpha.txt" it/it_IT + +# keyb pl +# keyb pl 852 +tconv_l CP852 "utf-8/pl/pl-0.77.0-alpha.txt" pl/pl_PL + +# keyb pl 437 +tconv_t CP437 "utf-8/pl/pl-0.77.0-alpha.txt" pl/pl_PL + +# keyb ru +# keyb ru 866 +# keyb ru 808 - CP808 is CP866 with euro sign; iconv does not know 808 (?) +tconv_l CP866 "utf-8/ru/ru-0.77.0-alpha.txt" ru/ru_RU + +popd > /dev/null || exit diff -Nru dosbox-staging-0.76.0/contrib/translations/es/es_ES.lng dosbox-staging-0.77.0/contrib/translations/es/es_ES.lng --- dosbox-staging-0.76.0/contrib/translations/es/es_ES.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/es/es_ES.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1429 @@ +:CONFIG_FULLSCREEN +Inicia DOSBox directamente en pantalla completa. +Presione Alt+Enter para volver a la ventana. +. +:CONFIG_DISPLAY +NŁmero de pantalla a usar; valores dependen del SO y configuraci˘n del usuario. +. +:CONFIG_VSYNC +Configuraci˘n de sincronizaci˘n vertical no implementada (ajuste ignorado) +. +:CONFIG_FULLRESOLUTION +Qu‚ resoluci˘n usar para pantalla completa: 'original', 'desktop' +o un tama¤o fijo (por ejemplo, 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Establezca tama¤o de ventana a utilizar cuando se ejecute en modo ventana: + default: Selecciona la mejor opci˘n basado en tu + entorno y otras configuraciones. + original: Redimensiona la ventana a la resoluci˘n elegida por + el programa emulado. + resizable: Hace la ventana del emulador redimensionable. + Esta es una opci˘n experimental, funciona s˘lo con + output=opengl y glshader=sharp (o none) + : Escala el contenido de la ventana a las dimensiones + indicadas, en formato LxA. Por ejemplo: 1024x768. + El escalado no se realiza para output=surface. +. +:CONFIG_OUTPUT +Qu‚ sistema de vĄdeo utilizar para la salida. +. +:CONFIG_TEXTURE_RENDERER +Elija un controlador de renderizado cuando use un modo de salida de textura. +Use texture_renderer=auto para una elecci˘n autom tica. +. +:CONFIG_CAPTURE_MOUSE +Elija un m‚todo de control del mouse: + onclick: El mouse se capturar  despues del primer + clic dentro de la ventana. + onstart: El mouse es capturado inmediatamente al iniciar + (similar al DOS real). + seamless: El mouse puede moverse perfecto dentro y fuera + de la ventana de DOSBox y no puede ser capturado. + nomouse: El mouse esta deshabilitado y oculto sin que se + envĄe ninguna entrada al juego. +Elija c˘mo se manejan los clics centrales (segundo par metro): + middlegame: Los clics centrales son enviados al juego + (Ctrl+F10 descaptura el mouse). + middlerelease: Los clics centrales son usados para descapturar el mouse + (no se envĄa al juego). Sin embargo, los clics centrales + se enviar n al juego en pantalla completa o cuando + se establece el control seamless. + Ctrl+F10 podr  tambi‚n descapturar el mouse. +Defaults (si no est  presente o err˘neo): seamless middlerelease +. +:CONFIG_SENSITIVITY +Sensibilidad del mouse. El segundo par metro opcional especifica la sensibilidad vertical (por ejemplo, 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Habilite este ajuste para omitir la configuraci˘n de aceleraci˘n y sensibilidad +del mouse del sistema operativo. Esto funciona en +pantalla completa o cuando el mouse se captura en modo ventana. +. +:CONFIG_WAITONERROR +Espere antes de cerrar la consola si DOSBox tiene un error. +. +:CONFIG_PRIORITY +Niveles de prioridad para DOSBox. La segunda entrada detr s de la coma es para cuando DOSBox no est  enfocado/minimizado. +pausa s˘lo es v lida para la segunda entrada. +. +:CONFIG_MAPPERFILE +Archivo usado para cargar/guardar las asignaciones de teclas/eventos. +Resetmapper s˘lo funciona con el valor por defecto. +. +:CONFIG_SCREENSAVER +Use 'allow' (permitir) o 'block' (bloquear) para anular la variable de entorno +SDL_VIDEO_ALLOW_SCREENSAVER (que normalmente bloquea el protector de pantalla del SO +mientras se ejecuta el emulador). +. +:CONFIG_LANGUAGE +Seleccione otro archivo de idioma. +. +:CONFIG_MACHINE +El tipo de m quina que DOSBox intenta emular. +. +:CONFIG_CAPTURES +Directorio donde se capturan cosas como sonidos (wav, mid) y capturas de pantalla. +. +:CONFIG_MEMSIZE +Cantidad de memoria que tiene DOSBox en megabytes. +Es mejor dejar este valor por defecto para evitar problemas con algunos juegos, +aunque algunos juegos pueden requerir un valor m s alto. +Por lo general, no hay ninguna ventaja de velocidad al aumentar este valor. +. +:CONFIG_STARTUP_VERBOSITY +Controla la verbosidad antes de mostrar el programa: +Verbosidad | Inicio | Bienvenida | Salida anticipada +high | SĄ | SĄ | SĄ +medium | No | SĄ | SĄ +low | No | No | SĄ +quiet | No | No | No +splash_only | SĄ | No | No +auto | 'low' si exec o dir es pasado, de lo contrario 'high' +. +:CONFIG_FRAMESKIP +CŁantos fotogramas omite DOSBox antes de dibujar uno. +. +:CONFIG_ASPECT +Escala la resoluci˘n vertical para producir un aspecto de pantalla 4:3 +que se corresponde con la de los monitores originales de definici˘n est ndar +para el que se dise¤aron la mayorĄa de los juegos de DOS. Esta configuraci˘n +s˘lo afecta a los modos de vĄdeo que utilizan pĄxeles no cuadrados, como +320x200 or 640x400; mientras que los modos de pĄxeles cuadrados, como 640x480 +y 800x600, se mostrar n tal cual. +. +:CONFIG_MONOCHROME_PALETTE +Seleccione paleta por defecto para pantalla monocrom tica. +Funciona s˘lo cuando se emula hercules o cga_mono. +Tambi‚n puedes recorrer los colores disponibles usando F11. +. +:CONFIG_SCALER +Escalador utilizado para ampliar/mejorar modos de baja resoluci˘n. +Si 'forced' es agregado, el escalador se utilizar  incluso si +el resultado podrĄa no ser el deseado. +Note que algunos escaladores pueden utilizar bordes negros para ajustar la imagen +dentro de la resoluci˘n de pantalla configurada. Si esto es +indeseable, pruebe con otro escalador o habilite +salida fullresolution. +. +:CONFIG_GLSHADER +Ya sea 'none' o un nombre de shader GLSL. Funciona s˘lo con +salida OpenGL. Puede ser una ruta absoluta, un archivo +en el subdirectorio 'glshaders' del directorio de configuraci˘n +de DOSBox, o uno de los shaders incorporados: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (por defecto). +. +:CONFIG_CORE +NŁcleo de CPU utilizado en emulaci˘n. auto cambiar  a din mico si esta disponible y +es apropiado. +. +:CONFIG_CPUTYPE +Tipo de CPU utilizado en emulaci˘n. auto es la opci˘n mas r pida. +. +:CONFIG_CYCLES +Cantidad de instrucciones que DOSBox intenta emular cada milisegundo. +Si este valor es muy alto se producen cortes de sonido y retrasos. +Los ciclos se pueden establecer de 3 formas: + 'auto' intenta adivinar lo que un juego necesita. + Suele funcionar, pero puede fallar en algunos juegos. + 'fixed #number' establecer  una cantidad fija de ciclos. Esto es lo que normalmente + necesita si 'auto' falla (Ejemplo: fixed 4000). + 'max' asignar  tantos ciclos como su ordenador sea capaz de + manejar. +. +:CONFIG_CYCLEUP +NŁmero de ciclos para disminuir/incrementar con combinaciones de teclas. (Ctrl+F11/Ctrl+F12) +. +:CONFIG_CYCLEDOWN +Establecerlo por debajo de 100 ser  un porcentaje. +. +:CONFIG_NOSOUND +Activa modo silencio, aunque el sonido sigue siendo emulado. +. +:CONFIG_RATE +Frecuencia de muestreo del mezclador, ajustar frecuencias superiores a esta en cualquier dispositivo probablemente disminuir  su calidad de sonido. +. +:CONFIG_BLOCKSIZE +Tama¤o del bloque mezclador, bloques grandes podrĄan ayudar al tartamudeo del sonido pero el sonido tambi‚n estar  m s retrasado. +. +:CONFIG_PREBUFFER +Cu ntos milisegundos de datos para mantener encima del tama¤o de bloque. +. +:CONFIG_MIDIDEVICE +Dispositivo que recibir  los datos MIDI (de la interfaz emulada +MIDI - MPU-401). Elija uno de los siguientes: +'fluidsynth', para utilizar el sintetizador MIDI incorporado. Consulte + la secci˘n [fluidsynth] para una configuraci˘n detallada. +'mt32', para utilizar el sintetizador Roland MT-32 incorporado. + Consulte la secci˘n [mt32] para una configuraci˘n detallada. +'auto', para utilizar el primer reproductor MIDI externo funcional. Este + puede ser un sintetizador de software o un dispositivo fĄsico. +. +:CONFIG_MIDICONFIG +Opciones de configuraci˘n para la interfaz MIDI seleccionada. +Suele ser el id o nombre del sintetizador MIDI que quieres +utilizar (encuentra el id/nombre con el comando DOS 'mixer /listmidi'). +- Esta opci˘n no tiene efecto cuando se utilizan los sintetizadores integrados + (mididevice = fluidsynth o mt32). +- Cuando use ALSA, utilice el comando Linux 'aconnect -l' para listar los + puertos MIDI abiertos, y seleccione uno (por ejemplo 'midiconfig=14:0' + para el cliente secuenciador 14, puerto 0). +- Si est s utilizando un Roland MT-32 fĄsico con PCB revisi˘n 0, + el hardware puede requerir un retraso para evitar que se desborde + su bŁfer. En ese caso, agregue 'delaysysex', + por ejemplo: 'midiconfig=2 delaysysex'. +Consulte el README/Manual para mas detalles. +. +:CONFIG_MPU401 +Tipo de MPU-401 a emular. +. +:CONFIG_SOUNDFONT +Ruta a un archivo SoundFont en formato .sf2. Puedes utilizar una +ruta absoluta o relativa, o el nombre de un .sf2 dentro de +el directorio 'soundfonts' dentro del directorio de +configuraci˘n de DOSBox. +Un porcentaje opcional escalar  el volumen del SoundFont. +Por ejemplo: 'soundfont.sf2 50' lo atenuar  en un 50%. +El porcentaje de escalado puede ir de 1 a 500. +. +:CONFIG_MODEL +Modelo de sintetizador a utilizar. El valor por defecto (auto) prefiere CM-32L +si ambos conjuntos de ROMs son provistos. Para los primeros juegos de Sierra y Dune 2 +se recomienda utilizar 'mt32', mientras que los juegos mas recientes suelen +usar los efectos de sonido adicionales del CM-32L (use 'auto' o 'cm32l') +. +:CONFIG_ROMDIR +El directorio que contiene uno o ambos pares de ROMs MT-32 y/o CM-32L. +Los archivos deben ser nombrados en mayŁsculas, de la siguiente manera: + - Par de ROMs MT-32: MT32_CONTROL.ROM y MT32_PCM.ROM + - Par de ROMs CM-32L: CM32L_CONTROL.ROM y CM32L_PCM.ROM +El directorio puede ser absoluto o relativo, o d‚jelo en blanco para +utilizar el directorio 'mt32-roms' del directorio de configuraci˘n de DOSBox, +seguido de la comprobaci˘n de otras ubicaciones comunes del sistema. +. +:CONFIG_SBTYPE +Tipo de Sound Blaster a emular. 'gb' es Game Blaster. +. +:CONFIG_SBBASE +La direcci˘n de E/S del Sound Blaster. +. +:CONFIG_IRQ +El nŁmero de IRQ del Sound Blaster. +. +:CONFIG_DMA +El nŁmero de canal DMA del Sound Blaster. +. +:CONFIG_HDMA +El nŁmero de canal DMA m s alto del Sound Blaster. +. +:CONFIG_SBMIXER +Permite que el mezclador de Sound Blaster modifique el mezclador de DOSBox. +. +:CONFIG_OPLRATE +oplrate est  obsoleto. La forma de onda OPL es ahora muestreada + a la velocidad de reproducci˘n del mezclador para evitar el remuestreo. +. +:CONFIG_OPLMODE +Tipo de emulaci˘n OPL. En 'auto' el modo est  determinado por 'sbtype'. +Todos los modos OPL son compatibles con AdLib, excepto 'cms'. +. +:CONFIG_OPLEMU +Proveedor para la emulaci˘n OPL. 'compat' proporciona una mejor calidad, +'nuked' es la opci˘n por defecto y la m s precisa (pero la que consume m s CPU). +. +:CONFIG_GUS +Habilita emulaci˘n Gravis UltraSound. +. +:CONFIG_GUSBASE +La direcci˘n base de E/S del Gravis UltraSound. +. +:CONFIG_GUSIRQ +El nŁmero IRQ del Gravis UltraSound. +. +:CONFIG_GUSDMA +El canal DMA del Gravis UltraSound. +. +:CONFIG_ULTRADIR +Ruta al directorio UltraSound. En este directorio +debe haber un directorio MIDI que contenga los archivos +patch para reproducci˘n GUS. Conjunto de patchs +usados con Timidity deberĄan funcionar bien. +. +:CONFIG_PCSPEAKER +Habilita emulaci˘n del PC-Speaker. +. +:CONFIG_PCRATE +Frecuencia de muestreo del generador de sonido PC-Speaker. +. +:CONFIG_ZERO_OFFSET +Neutraliza y evita que el DC-offset del PC speaker perjudique a otras fuentes. +'auto' lo habilita en sistemas que no son Windows y lo deshabilita en Windows. +Si tu SO realiza su propia correcci˘n de DC-offset, entonces establezca esto en 'false'. +. +:CONFIG_TANDY +Habilita emulaci˘n del sistema de sonido Tandy. Para 'auto', la emulaci˘n est  presente s˘lo si la m quina est  establecida en 'tandy'. +. +:CONFIG_TANDYRATE +Frecuencia de muestreo de la generaci˘n Tandy 3-Voice. +. +:CONFIG_DISNEY +Habilita emulaci˘n Disney Sound Source. (compatible con Covox Voice Master y Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Tipo de joystick a emular: auto (por defecto), +none (deshabilita emulaci˘n del joystick), +2axis (soporta dos joysticks), +4axis (soporta un joystick, primer joystick usado), +4axis_2 (soporta un joystick, segundo joystick usado), +fcs (Thrustmaster), ch (CH Flightstick). +auto (elige emulaci˘n dependiendo de los joysticks reales). +(Recuerda resetear el mapperfile del DOSBox si lo has guardado anteriormente) +. +:CONFIG_TIMED +habilita intervalos cronometrados para ejes. Experimente con esta opci˘n, si tu joystick se desvĄa (se aleja). +. +:CONFIG_AUTOFIRE +dispara continuamente mientras se mantenga el bot˘n presionado. +. +:CONFIG_SWAP34 +intercambia el 3er y el 4to eje. Puede ser Łtil para ciertos joysticks. +. +:CONFIG_BUTTONWRAP +habilita ajuste de botones al nŁmero de botones emulados. +. +:CONFIG_CIRCULARINPUT +habilita traducci˘n de entrada circular a salida cuadrada. +Intenta habilitar esto si tu stick anal˘gico izquierdo s˘lo puede moverse en cĄrculo. +. +:CONFIG_DEADZONE +el porcentaje de movimiento a ignorar. 100 convierte el stick anal˘gico en uno digital. +. +:CONFIG_SERIAL1 +establece tipo de dispositivo conectado al puerto com. +Puede ser: disabled, dummy, modem, nullmodem, directserial. +Par metros adicionales deben estar en la misma lĄnea en la forma de +par metro:valor. Par metro para todos los tipos es irq (opcional). +para directserial: realport (requerido), rxdelay (opcional). + (realport:COM1 realport:ttyS0). +para modem: listenport (opcional). +para nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (todos opcional). +Ejemplo: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +consulte serial1 +. +:CONFIG_SERIAL3 +consulte serial1 +. +:CONFIG_SERIAL4 +consulte serial1 +. +:CONFIG_PHONEBOOKFILE +Archivo utilizado para asignar nŁmeros de tel‚fono falsos a direcciones. +. +:CONFIG_XMS +Habilita soporte XMS. +. +:CONFIG_EMS +Habilita soporte EMS. El valor por defecto (=true) proporciona la mejor +compatibilidad pero ciertas aplicaciones pueden funcionar mejor con +otras opciones, o requerir que el soporte EMS sea deshabilitado (=false) +para funcionar. +. +:CONFIG_UMB +Habilita soporte UMB. +. +:CONFIG_VER +Establezca versi˘n DOS (5.0 por defecto). Especificar formato como principal.menor. +Un solo nŁmero es tratado como la versi˘n principal. +Los ajustes m s comunes son 3.3, 5.0, 6.22, y 7.1. +. +:CONFIG_KEYBOARDLAYOUT +C˘digo de idioma de la distribuci˘n del teclado (o "none"). +. +:CONFIG_IPX +Habilita emulaci˘n ipx sobre UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +LĄneas en esta secci˘n se ejecutar n al inicio. +Puedes colocar tus lĄneas MOUNT aquĄ. + +. +:CONFIGFILE_INTRO +# Este es el archivo de configuraci˘n para DOSBox Staging (%s). +# Las lĄneas que comienzan con el caracter '#' son comentarios. + +. +:CONFIG_SUGGESTED_VALUES +Valores posibles +. +:PROGRAM_CONFIG_NOCONFIGFILE +No se ha cargado ningŁn archivo de configuraci˘n! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Archivo de configuraci˘n principal: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Archivos de configuraci˘n adicional: + +. +:PROGRAM_CONFIG_CONFDIR +Directorio de configuraci˘n de DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +No se puede abrir el archivo %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Escribiendo archivo de configuraci˘n %s + +. +:PROGRAM_CONFIG_USAGE +Herramienta de configuraci˘n: +-writeconf o -wc escribe al archivo de configuraci˘n primario cargado. +-writeconf o -wc [nombre de archivo] escribe archivo al directorio de configuraci˘n. +Use -writelang o -wl [nombre de archivo] para escribir las cadenas de idioma actuales. +-r [par metros] + Reinicie DOSBox, ya sea utilizando los par metros anteriores o cualquiera que se agregue. +-wcp [nombre de archivo] + Escribe archivo de configuraci˘n al directorio de programa, dosbox.conf o al nombre de archivo + especificado. +-wcd + Escribe al archivo de configuraci˘n por defecto en el directorio de configuraci˘n. +-l lista los par metros de configuraci˘n. +-h, -help, -? sections / nombre de secci˘n / nombre de propiedad + Sin par metros, muestra esta pantalla de ayuda. Agrega "sections" para una lista de secciones. + Para obtener informaci˘n sobre una secci˘n o propiedad especĄfica agregue su nombre detr s. +-axclear limpia la secci˘n autoexec. +-axadd [lĄnea] agrega una lĄnea a la secci˘n autoexec. +-axtype imprime el contenido de la secci˘n autoexec. +-securemode cambia a modo seguro. +-avistart inicia grabaci˘n AVI. +-avistop detiene grabaci˘n AVI. +-startmapper inicia el mapeador de teclas. +-get "propiedad de la secci˘n" devuelve el valor de la propiedad. +-set "propiedad de la secci˘n=valor" establece el valor. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Prop˘sito de la propiedad "%s" (contenido en la secci˘n "%s"): +%s + +Valores posibles: %s +Valor por defecto: %s +Valor actual: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Prop˘sito de la secci˘n "%s": +%s +Valor actual: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +Esta propiedad no se puede cambiar en tiempo de ejecuci˘n. + +. +:PROGRAM_CONFIG_HLP_POSINT +entero positivo +. +:PROGRAM_CONFIG_HLP_SECTHLP +La secci˘n %s contiene las siguientes propiedades: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +La configuraci˘n de DOSBox contiene las siguientes secciones: + + +. +:PROGRAM_CONFIG_SECURE_ON +Cambiado a modo seguro. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Esta operaci˘n no est  permitida en modo seguro. + +. +:PROGRAM_CONFIG_SECTION_ERROR +La secci˘n "%s" no existe. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" no es un valor v lido para la propiedad %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +No hay tal secci˘n o propiedad. + +. +:PROGRAM_CONFIG_NO_PROPERTY +No existe la propiedad "%s" en la secci˘n "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Sintaxis correcta: config -set "propiedad de la secci˘n". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Sintaxis correcta: config -get "propiedad de la secci˘n". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox se inici˘ con los siguientes par metros de lĄnea de comandos: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Falta un par metro. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMs encontrados: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Unidad +. +:PROGRAM_MOUNT_STATUS_TYPE +Tipo +. +:PROGRAM_MOUNT_STATUS_LABEL +Etiqueta +. +:PROGRAM_MOUNT_STATUS_2 +La unidad %c est  montada como %s + +. +:PROGRAM_MOUNT_STATUS_1 +Las unidades montadas actualmente son: + +. +:PROGRAM_MOUNT_ERROR_1 +El directorio %s no existe. + +. +:PROGRAM_MOUNT_ERROR_2 +%s no es un directorio + +. +:PROGRAM_MOUNT_ILL_TYPE +Tipo ilegal %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +La unidad %c ya est  montada con %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +La unidad %c no est  montada. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +La unidad %c se ha removido correctamente. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Las unidades virtuales no pueden ser desmontadas. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' no es un identificador de unidad v lido. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montar c:\ NO es recomendado. Por favor monte un (sub)directorio la pr˘xima vez. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Montar / NO es recomendado. Por favor monte un (sub)directorio la pr˘xima vez. + +. +:PROGRAM_MOUNT_NO_OPTION +Advertencia: Ignorando opci˘n no soportada '%s'. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +Un directorio normal necesita ser montado primero antes de que se pueda agregar una superposici˘n encima. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +La superposici˘n NO es compatible con la unidad especificada. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +La superposici˘n necesita ser especificada usando el mismo direccionamiento que la unidad subyacente. No se mezclan rutas relativas y absolutas. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +El directorio de superposici˘n no puede ser el mismo que la unidad subyacente. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Algo sali˘ mal. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Superposici˘n %s en la unidad %c montada. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +No se puede mover la unidad Z. La unidad %c ya est  montada. + +. +:PROGRAM_MEM_CONVEN +%10d kB de memoria convencional libre + +. +:PROGRAM_MEM_EXTEND +%10d kB de memoria extendida libre + +. +:PROGRAM_MEM_EXPAND +%10d kB de memoria expandida libre + +. +:PROGRAM_MEM_UPPER +%10d kB de memoria superior libre en %d bloques (UMB m s grande %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB asignados. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB liberados. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Memoria usada liberada. + +. +:PROGRAM_LOADFIX_ERROR +Error de asignaci˘n de memoria. + +. +:MSCDEX_SUCCESS +MSCDEX instalado. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Error: Las letras de unidad de mŁltiples unidades de CD-ROM tienen que ser continuas. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Error: AŁn no es soportado. + +. +:MSCDEX_ERROR_PATH +MSCDEX: La ubicaci˘n especificada no es una unidad de CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Error: Archivo no v lido o no se puede abrir. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Error: Demasiadas unidades de CD-ROM (m x: 5). La instalaci˘n de MSCDEX ha fallado. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Subdirectorio montado: soporte limitado. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Error: El archivo no es una imagen ISO/CUE o contiene errores. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Error: Error desconocido. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Advertencia: Ignorando opci˘n no soportada '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +Cach‚ de la unidad limpiada. + +. +:PROGRAM_INTRO +Bienvenido a DOSBox Staging, un emulador x86 con sonido y gr ficos. +DOSBox crea una interfaz para usted que se parece al viejo DOS. + +Para informaci˘n sobre el tipo de montaje b sico escriba intro mount +Para informaci˘n sobre el tipo de soporte de CD-ROM escriba intro cdrom +Para informaci˘n sobre el tipo de teclas especiales escriba intro special +Para mas informaci˘n, visite DOSBox Staging wiki: +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox se detendr /saldr  sin previo aviso si se produce un error! + +. +:PROGRAM_INTRO_MOUNT_START +AquĄ tienes algunos comandos para empezar: +Antes de poder utilizar los archivos ubicados en tu propio sistema de archivos, +tienes que montar el directorio que contiene los archivos. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosgames\ crear  una unidad C con c:\dosgames como contenido.ş +ş ş +ş c:\dosgames\ es un ejemplo. Reempl zalo con tu propio directorio de juegos.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosgames crear  una unidad C con ~/dosgames como contenido.ş +ş ş +ş ~/dosgames es un ejemplo. Reempl zalo con tu propio directorio de juegos.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +Despu‚s de montar el disco con ‚xito puedes escribir c: para ir a tu unidad C +reci‚n montada. Escribiendo dir allĄ mostrar  su contenido. cd le permitir  +ingresar un directorio (reconocido por el [] en un listado de directorios). +Puedes ejecutar programas/archivos con extensiones .exe .bat y .com. + +. +:PROGRAM_INTRO_CDROM +C˘mo montar una unidad virtual de CD-ROM en DOSBox: +DOSBox proporciona emulaci˘n de CD-ROM en varios niveles. + +Esto funciona en todos los directorios normales, instala MSCDEX y marca los archivos +de solo lectura. Normalmente esto es suficiente para la mayorĄa de juegos: + +mount D C:\ejemplo -t cdrom + +Si no funciona es posible que tengas que decirle a DOSBox la etiqueta del CD-ROM: + +mount D C:\ejemplo -t cdrom -label ETIQUETACD + +Adem s, puedes usar imgmount para montar im genes iso o cue/bin: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Teclas especiales: +Estas son las combinaciones de teclas por defecto. +Se pueden cambiar en el mapeador de teclas. + +Alt+Enter Cambia entre pantalla completa y modo ventana. +Alt+Pausa Pausa/Despausa el emulador. +Ctrl+F1 Inicia el mapeador de teclas. +Ctrl+F4 Cambia imagen de disco montada, actualiza la cach‚ de directorio para todas las unidades. +Ctrl+F5 Guarda una captura de pantalla. +Ctrl+F6 Inicia/Detiene grabaci˘n de salida de sonido a un archivo wav. +Ctrl+F7 Inicia/Detiene grabaci˘n de salida de video a un archivo zmbv. +Ctrl+F9 Apaga el emulador. +Ctrl+F10 Captura/Suelta el mouse. +Ctrl+F11 Ralentiza emulaci˘n. +Ctrl+F12 Acelera emulaci˘n. +Alt+F12 Desbloquea velocidad (bot˘n turbo/avance r pido). + +. +:PROGRAM_BOOT_NOT_EXIST +El archivo bootdisk no existe. Error. + +. +:PROGRAM_BOOT_NOT_OPEN +No se puede abrir el archivo bootdisk. Error. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +El archivo de imagen es de s˘lo lectura! PodrĄa crear problemas. + +. +:PROGRAM_BOOT_PRINT_ERROR +Este comando arranca DOSBox desde una imagen de disquete o de disco duro. + +Para este comando, se puede especificar una sucesi˘n de disquetes intercambiables +presionando Ctrl+F4, y -l especifica la unidad montada desde la que arrancar. Si +ninguna letra de unidad es especificada, se arranca por defecto desde la unidad A. +Las Łnicas letras de unidad arrancables son A, C, y D. Para arrancar desde un +disco duro (C o D), la imagen ya deberĄa haber sido montada utilizando el comando +IMGMOUNT . + +La sintaxis de este comando es: + +BOOT [imagendedisco1.img imagendedisco2.img] [-l letradeunidad] + +. +:PROGRAM_BOOT_UNABLE +No se puede arrancar desde la unidad %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Abriendo archivo de imagen: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +No se puede abrir %s +. +:PROGRAM_BOOT_BOOT +Arrancando desde la unidad %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Cartucho PCjr encontrado, pero la m quina no es PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Comandos disponibles del cartucho PCjr: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +No se han encontrado comandos del cartucho PCjr +. +:PROGRAM_LOADROM_SPECIFY_FILE +Debes especificar el archivo ROM a cargar. + +. +:PROGRAM_LOADROM_CANT_OPEN +Archivo ROM no accesible. + +. +:PROGRAM_LOADROM_TOO_LARGE +Archivo ROM demasiado grande. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +La BIOS de vĄdeo no es compatible con el tipo de m quina. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +Archivo ROM no reconocido. + +. +:PROGRAM_LOADROM_BASIC_LOADED +ROM BASIC cargada. + +. +:SHELL_CMD_IMGMOUNT_HELP +monta imagen(es) de disco compacto o de disquete a una letra de unidad determinada. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Monta un CD-ROM, disquete, o imagen de disco a una letra de unidad. + +Uso: + imgmount UNIDAD CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount UNIDAD ARCHIVOIMAGEN [ARCHIVOIMAGEN2 [..]] [-fs fat] -t hdd|floppy + imgmount UNIDAD IMAGENBOOT [-fs fat|none] -t hdd -size GEOM + imgmount -u UNIDAD (desmonta la imagen de la unidad) + +D˘nde: + UNIDAD es la letra de la unidad donde la imagen ser  montada: a, c, d, ... + CDROM-SET es un ISO, CUE+BIN, CUE+ISO, o CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + ARCHIVOIMAGEN un disco duro o una imagen de disquete en formato FAT16/FAT12 + IMAGENBOOT es una imagen de disco de arranque con especificado -size GEOM: + bytes-por-sector,sectores-por-cabeza,cabezas,cilindros +Notas: + - Ctrl+F4 intercambia & monta el siguiente CDROM-SET o ARCHIVOIMAGEN, si se + proporciona. + +Ejemplos: + imgmount D /Usuarios/NombredeUsuario/juegos/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A disquete1.img disquete2.img disquete3.img -t floppy + imgmount C ~/dos/unidad_c.img -t hdd + imgmount C arranque.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +asigna carpetas fĄsicas o unidades a una letra de unidad virtual. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Monta un directorio del SO anfitri˘n a una letra de unidad. + +Uso: + mount UNIDAD DIRECTORIO [-t TIPO] [-freesize TAMAĽO] [-label ETIQUETA] + mount -u UNIDAD (desmonta el directorio de la unidad) + +D˘nde: + UNIDAD es la letra de la unidad donde el directorio ser  montado: A, C, D, ... + DIRECTORIO es el directorio sobre el SO anfitri˘n a ser montado + TIPO es el tipo del directorio a montar: dir, floppy, cdrom, o overlay + TAMAĽO es el espacio libre para la unidad virtual (KiB para disquetes, MiB en caso contrario) + ETIQUETA es el nombre de la etiqueta de la unidad a ser usada + +Notas: + - '-t overlay' redirige las escrituras para la unidad montada a otro directorio. + - Opciones adicionales son descritas en el manual (archivo README, capĄtulo 4). + +Ejemplos: + mount C ~/juegosdos + mount D "/medio/NombredeUsuario/CD Juego" -t cdrom + mount C mis_archivos_savegame -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Debes especificar la letra de unidad en la que montar la imagen. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Debes especificar el nŁmero de unidad (0 o 3) para montar la imagen a (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Para im genes CD-ROM : IMGMOUNT letra-de-unidad ubicaci˘n-de-imagen -t iso + +Para im genes Disco Duro : Debes especificar la geometrĄa de la unidad para discos duros: +bytes_por_sector, sectores_por_cilindro, cabezas_por_cilindro, recuento_de_cilindros. +IMGMOUNT letra-de-unidad ubicaci˘n-de-imagen -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +No se ha podido cargar el archivo de imagen. +Compruebe que la ruta sea correcta y que la imagen sea accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +No se ha podido extraer la geometrĄa de la unidad desde la imagen. +Use par metro -size bps,spc,hpc,cyl para especificar la geometrĄa. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +El tipo '%s' no es soportado. Especifique 'floppy', 'hdd', 'cdrom', o 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +El formato "%s" no es soportado. Especifique "fat" o "iso" o "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Debes especificar el archivo imagen a montar. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Archivo imagen no encontrado. + +. +:PROGRAM_IMGMOUNT_MOUNT +Para montar directorios, use el comando MOUNT , no el comando IMGMOUNT . + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Unidad ya montada en esa letra. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +No se puede crear la unidad desde el archivo. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Unidad nŁmero %d montada como %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +La imagen debe estar en una unidad anfitriona o local. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Usar mŁltiples archivos s˘lo es soportado para im genes cue/iso. + +. +:PROGRAM_KEYB_INFO +P gina de c˘digo %i ha sido cargada + +. +:PROGRAM_KEYB_INFO_LAYOUT +P gina de c˘digo %i ha sido cargada para distribuci˘n %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID de distribuci˘n de teclado[ numero de p gina de c˘digo[ archivo de p gina de c˘digo]]] + +Algunos ejemplos: + KEYB: Muestra la p gina de c˘digo cargada actualmente. + KEYB sp: Carga la distribuci˘n espa¤ol (ES), usa una p gina de c˘digo apropiada. + KEYB sp 850: Carga la distribuci˘n espa¤ol (ES), usa p gina de c˘digo 850. + KEYB sp 850 mycp.cpi: Igual que el anterior, pero utilizando el archivo mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Distribuci˘n de teclado %s cargado para la p gina de c˘digo %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Archivo de teclado %s no encontrado + + +. +:PROGRAM_KEYB_INVALIDFILE +Archivo de teclado %s no v lido + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +No hay distribuci˘n en %s para la p gina de c˘digo %i + +. +:PROGRAM_KEYB_INVCPFILE +Archivo de p gina de c˘digo no v lido o no existe para la distribuci˘n %s + + +. +:SHELL_ILLEGAL_PATH +Ruta no v lida. + +. +:SHELL_CMD_HELP +Si buscas una lista de todos los comandos soportados escribe help /all . +Una breve lista de los comandos mas utilizados: + +. +:SHELL_CMD_ECHO_ON +ECHO est  encendido. + +. +:SHELL_CMD_ECHO_OFF +ECHO est  apagado. + +. +:SHELL_ILLEGAL_SWITCH +Interruptor no v lido: %s. + +. +:SHELL_MISSING_PARAMETER +Requerido par metro faltante. + +. +:SHELL_CMD_CHDIR_ERROR +No se puede cambiar a: %s. + +. +:SHELL_CMD_CHDIR_HINT +Sugerencia: Para cambiar a una unidad diferente escriba %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +El nombre de directorio es superior a 8 caracteres y/o contiene espacios. +Intente cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +TodavĄa est s en la unidad Z:, cambia a una unidad montada con C:. + +. +:SHELL_CMD_DATE_HELP +Muestra o cambia la fecha interna. + +. +:SHELL_CMD_DATE_ERROR +La fecha especificada no es correcta. + +. +:SHELL_CMD_DATE_DAYS +3DomLunMarMieJueVieSab +. +:SHELL_CMD_DATE_NOW +Fecha actual: +. +:SHELL_CMD_DATE_SETHLP +Escriba 'date MM-DD-AAAA' para cambiar la fecha. + +. +:SHELL_CMD_DATE_FORMAT +M/D/A +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-DD-AAAA] + MM-DD-AAAA: nueva fecha a establecer + /S: Usa permanentemente la hora y fecha del anfitri˘n como tiempo del DOS + /F: Vuelve a la hora interna de DOSBox (lo opuesto de /S) + /T: Muestra s˘lo la fecha + /H: Sincroniza con el anfitri˘n + +. +:SHELL_CMD_TIME_HELP +Muestra la hora interna. + +. +:SHELL_CMD_TIME_NOW +Hora actual: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Muestra s˘lo la hora + /H: Sincroniza con el anfitri˘n + +. +:SHELL_CMD_MKDIR_ERROR +No se puede crear: %s. + +. +:SHELL_CMD_RMDIR_ERROR +No se puede eliminar: %s. + +. +:SHELL_CMD_DEL_ERROR +No se puede borrar: %s. + +. +:SHELL_SYNTAXERROR +La sintaxis del comando es incorrecta. + +. +:SHELL_CMD_SET_NOT_SET +La variable de entorno %s no est  definida. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +No queda suficiente espacio en el entorno. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Falta el nombre del archivo. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Falta el nŁmero. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: NŁmero no v lido. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +No hay etiqueta suministrada al comando GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Etiqueta %s no encontrada. + +. +:SHELL_CMD_FILE_NOT_FOUND +Archivo %s no encontrado. + +. +:SHELL_CMD_FILE_EXISTS +Archivo %s ya existe. + +. +:SHELL_CMD_DIR_VOLUME + Volumen en unidad %c es %s + +. +:SHELL_CMD_DIR_INTRO + Directorio de %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d archivo(s) %21s bytes + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d directorio(s) %21s bytes libres + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +La unidad %c no existe! +Debes montar esto primero. Escribe intro o intro mount para m s informaci˘n. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Comando no v lido: %s. + +. +:SHELL_CMD_PAUSE +Presiona cualquier tecla para continuar... +. +:SHELL_CMD_PAUSE_HELP +Esperando 1 pulsaci˘n de tecla para continuar. + +. +:SHELL_CMD_COPY_FAILURE +Error de copia : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d Archivo(s) copiado(s). + +. +:SHELL_CMD_SUBST_NO_REMOVE +No se puede remover, la unidad no est  en uso. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST fall˘. Has cometido un error en la lĄnea de comandos o la unidad de destino ya est  siendo utilizada. +S˘lo es posible utilizar SUBST en unidades locales +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Bienvenido a DOSBox Staging %-40s ş +ş ş +ş Para una breve introducci˘n para nuevos usuarios escriba: INTRO ş +ş Para comandos de interfaz soportados escriba: HELP ş +ş ş +ş Para ajustar la velocidad de la CPU emulada, use Ctrl+F11 y Ctrl+F12. ş +ş Para activar el mapeador de teclas use Ctrl+F1. ş +ş Para m s informaci˘n lea el archivo README en el directorio de DOSBox. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox soporta el modo CGA compuesto. ş +ş Use F12 para establecer salida compuesta ON, OFF, o AUTO (por defecto). ş +ş (Alt+)F11 cambia tono; Ctrl+Alt+F11 selecciona modelo CGA inicial/final. ş +ş ş + +. +:SHELL_STARTUP_CGA_MONO +ş Use F11 para rotar entre los modos verde,  mbar, blanco y blanco papel, ş +ş y Alt+F11 para cambiar los ajustes de contraste/brillo. ş + +. +:SHELL_STARTUP_HERC +ş Use F11 para rotar entre los colores blanco,  mbar, y verde monocrom tico.ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Pulsa Alt+Pausa para entrar en el depurador o iniciar el exe con DEPURADO.ş +ş ş + +. +:SHELL_STARTUP_END +ş https://dosbox-staging.github.io ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Muestra/cambia el directorio actual. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [unidad:][ruta] +CHDIR [..] +CD [unidad:][ruta] +CD [..] + + .. Especifica que quieres cambiar al directorio principal. + +Escribe CD [unidad:] para mostrar el directorio actual en la unidad especificada. +Escribe CD sin par metros para mostrar la unidad y directorio actuales. + +. +:SHELL_CMD_CLS_HELP +Limpia la pantalla. + +. +:SHELL_CMD_DIR_HELP +Muestra una lista de archivos y subdirectorios de un directorio. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [unidad:][ruta][nombre de archivo] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [unidad:][ruta][nombre de archivo] + Especifica unidad, directorio, y/o archivos a listar. + /W Usa formato de lista ancha. + /B Usa formato simple (sin informaci˘n de encabezado o resumen). + /P Pausa despu‚s de cada pantalla llena de informaci˘n. + /AD Muestra todos los directorios. + /A-D Muestra todos los archivos. + /O Lista archivos en orden segŁn clasificaci˘n. + - Prefijo para invertir el orden + clasificaci˘n N Por nombre (alfab‚tico) S Por tama¤o (el m s peque¤o primero) + E Por extensi˘n (alfab‚tica) D Por fecha & hora (la m s antigua primero) + +. +:SHELL_CMD_ECHO_HELP +Muestra mensajes y habilita/deshabilita comando echo. + +. +:SHELL_CMD_EXIT_HELP +Sale de la interfaz. + +. +:SHELL_CMD_HELP_HELP +Muestra ayuda. + +. +:SHELL_CMD_MKDIR_HELP +Crea un directorio. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [unidad:][ruta] +MD [unidad:][ruta] + +. +:SHELL_CMD_RMDIR_HELP +Elimina un directorio. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [unidad:][ruta] +RD [unidad:][ruta] + +. +:SHELL_CMD_SET_HELP +Cambia variables de entorno. + +. +:SHELL_CMD_IF_HELP +Realiza procesamiento condicional en programas por lotes. + +. +:SHELL_CMD_GOTO_HELP +Salta a una lĄnea etiquetada en un script por lotes. + +. +:SHELL_CMD_SHIFT_HELP +Par metros de lĄnea de comandos Left Shift en un script por lotes. + +. +:SHELL_CMD_TYPE_HELP +Muestra el contenido de un archivo de texto. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [unidad:][ruta][nombre de archivo] + +. +:SHELL_CMD_REM_HELP +Agrega comentarios en un archivo por lotes. + +. +:SHELL_CMD_REM_HELP_LONG +REM [comentario] + +. +:SHELL_CMD_NO_WILD +Esta es una versi˘n simple del comando, no se permiten comodines! + +. +:SHELL_CMD_RENAME_HELP +Renombra uno o m s archivos. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [unidad:][ruta]nombredearchivo1 nombredearchivo2. +REN [unidad:][ruta]nombredearchivo1 nombredearchivo2. + +Note que no se puede especificar una nueva unidad o ruta para el archivo destino. + +. +:SHELL_CMD_DELETE_HELP +Elimina uno o m s archivos. + +. +:SHELL_CMD_COPY_HELP +Copia archivos. + +. +:SHELL_CMD_CALL_HELP +Inicia un archivo por lotes desde otro archivo por lotes. + +. +:SHELL_CMD_SUBST_HELP +Asigna un directorio interno a una unidad. + +. +:SHELL_CMD_LOADHIGH_HELP +Carga un programa en la memoria superior (requiere xms=true,umb=true). + +. +:SHELL_CMD_LS_HELP +Lista el contenido del directorio. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [PATRŕN] + +. +:SHELL_CMD_LS_PATH_ERR +ls: no se puede acceder a '%s': No hay tal archivo o directorio + +. +:SHELL_CMD_CHOICE_HELP +Espera a que se presione una tecla y establece un ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:opciones] [/N] [/S] texto + /C[:]opciones - Especifica teclas permitidas. Por defecto es: yn. + /N - No muestra las opciones al final del prompt. + /S - Habilita selecci˘n de opciones sensibles a mayŁsculas y minŁsculas. + text - El texto a mostrar como un prompt. + +. +:SHELL_CMD_ATTRIB_HELP +No hace nada. Provisto para compatibilidad. + +. +:SHELL_CMD_PATH_HELP +Provisto para compatibilidad. + +. +:SHELL_CMD_VER_HELP +Ve o establece la versi˘n DOS reportada. + +. +:SHELL_CMD_VER_HELP_LONG +Uso: + ver + ver set VERSIŕN + +D˘nde: + VERSIŕN puede ser un nŁmero entero como 5, o incluir un valor decimal de dos + dĄgitos como: 6.22, 7.01, o 7.10. El decimal puede alternativamente + ser separado por espacio como: 6 22, 7 01, o 7 10. + +Notas: + La versi˘n DOS tambi‚n puede ser establecida en el archivo de configuraci˘n + bajo la secci˘n [dos] usando el ajuste "ver = VERSIŕN" . + +Ejemplos: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging versi˘n %s +DOS versi˘n %d.%02d + +. +:SHELL_CMD_VER_INVALID +La versi˘n DOS especificada no es correcta. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/fr/fr_FR.lng dosbox-staging-0.77.0/contrib/translations/fr/fr_FR.lng --- dosbox-staging-0.76.0/contrib/translations/fr/fr_FR.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/fr/fr_FR.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1432 @@ +:CONFIG_FULLSCREEN +D‚marrer DOSBox directement en mode plein ‚cran. +Pressez Alt+Entr‚e pour revenir en mode fenˆtre. +. +:CONFIG_DISPLAY +Nombre d'‚crans … utiliser ; les valeurs d‚pendent de l'OS et des paramŠtres utilisateur. +. +:CONFIG_VSYNC +ParamŠtre de synchro verticale non impl‚ment‚ (paramŠtre ignor‚) +. +:CONFIG_FULLRESOLUTION +R‚solution utiliser pour le mode plein ‚cran : 'original', 'desktop' (bureau) +ou une taille fixe (ex. : 1024x768). +. +:CONFIG_WINDOWRESOLUTION +D‚fini la taille de la fenˆtre pendant l'utilisation en mode fenˆtr‚ : + default: S‚lectionne la meilleure option bas‚e sur + votre environnement et d'autres paramŠtres. + original: Redimensionne la fenˆtre suivant la r‚solution + choisie par le programme ‚mul‚. + resizable: Permet le redimensionnement de la fenˆtre de l'‚mulateur. + Ceci est une option exp‚rimentale, marche seulement avec + output=opengl et glshader=sharp (ou none) + : Redimensionne le contenu de la fenˆtre + aux dimensions indiqu‚es, au format lxh (largeur x hauteur). Par ex. : 1024x768. + Le redimensionnement n'est pas disponible pour output=surface. +. +:CONFIG_OUTPUT +SystŠme vid‚o … utiliser pour la sortie. +. +:CONFIG_TEXTURE_RENDERER +Choisissez un pilote de rendu … utiliser en mode de rendu textur‚. +Utilisez texture_renderer=auto pour un choix automatique. +. +:CONFIG_CAPTURE_MOUSE +M‚thode de contr“le de la souris : + onclick : La souris sera captur‚e aprŠs + le premier clic dans la fenˆtre + onstart : La souris est captur‚e imm‚diatement au d‚marrage + (similaire au vrai DOS). + seamless : La souris peut bouger sans contrainte dans et en-dehors + de la fenˆtre DOSBox et ne peut pas ˆtre captur‚e. + nomouse : La souris est d‚sactiv‚e et cach‚e sans aucun + signal envoy‚ au jeu. +Gestion du clic-milieu (second paramŠtre) : + middlegame : Les clics-milieu sont envoy‚s au jeu + (Ctrl+F10 libŠre la souris). + middlerelease : Les clics-milieu libŠrent la souris + (non envoy‚s au jeu). De plus, les clics-milieu + seront envoy‚s au jeu en mode plein ‚cran ou en mode + seamless. + Ctrl+F10 libŠrera aussi la souris. +Defaults (si non pr‚sent ou incorrect) : seamless middlerelease +. +:CONFIG_SENSITIVITY +Sensibilit‚ de la souris. Le second paramŠtre optionnel sp‚cifie la sensibilit‚ verticale (ex. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Outrepasse les paramŠtres de votre systŠme pour l'acc‚l‚ration et la sensibilit‚ +de la souris. CelA marche en mode plein ‚cran +ou quand la souris est captur‚ en mode fenˆtr‚. +. +:CONFIG_WAITONERROR +Attend avant de fermer la console si DOSBox a une erreur. +. +:CONFIG_PRIORITY +Niveaux de priorit‚ pour DOSBox. La deuxiŠme valeur aprŠs la virgule est lorsque DOSBox n'est pas actif/r‚duit. +pause n'est valable que pour la seconde entr‚e. +. +:CONFIG_MAPPERFILE +Fichier utilis‚ pour charger/sauver les correspondances touche/‚v‚nement. +Resetmapper ne fonctionne qu'avec la valeur par d‚faut. +. +:CONFIG_SCREENSAVER +Utilisez 'allow' (autorise) ou 'block' (bloque) pour outrepasser la variable d'environnement +SDL_VIDEO_ALLOW_SCREENSAVER (qui bloque g‚n‚ralement la capture d'‚cran de l'OS +pendant que l'‚mulateur est lanc‚). +. +:CONFIG_LANGUAGE +S‚lectionner un autre fichier de langue. +. +:CONFIG_MACHINE +Type de machine que DOSBox essaye d'‚muler. +. +:CONFIG_CAPTURES +R‚pertoire o— les objets comme les sons WAVE, musiques MIDI, et captures d'‚cran sont enregistr‚s. +. +:CONFIG_MEMSIZE +Quantit‚ de m‚moire dont DOSBox dispose en m‚gaoctets. +Il est mieux de laisser cette valeur d'origine pour ‚viter les problŠmes avec certains jeux, +bien que quelques jeux puissent n‚cessiter une valeur plus ‚lev‚e. +Il n'y a g‚n‚ralement pas de gain de vitesse en augmentant cette valeur. +. +:CONFIG_STARTUP_VERBOSITY +Contr“le la verbosit‚ avant l'affichage du programme : + | cran de d‚marrage | cran de bienvenue | Sorties ‚cran de d‚marrage +high | oui | oui | oui +medium | non | oui | oui +low | non | non | oui +quiet | non | non | non +splash_only | oui | non | non +auto | 'low' si exec ou dir sont utilis‚s, sinon 'high' +. +:CONFIG_FRAMESKIP +Nombre d'images que DOSBox saute avant d'en afficher une autre. +. +:CONFIG_ASPECT +Met … l'‚chelle la r‚solution verticale pour produire un aspect d'affichage 4:3, +correspondant … celui des moniteurs … d‚finition standard d'origine +pour lequel la majorit‚ des jeux DOS ont ‚t‚ con‡us. Ce paramŠtre +n'affecte que les modes vid‚o qui utilisent des pixels non carr‚s, tels que +320x200 ou 640x400 ; alors que les modes de pixels carr‚s, tels que 640x480 +et 800x600, seront affich‚s tel quel. +. +:CONFIG_MONOCHROME_PALETTE +S‚lectionne la palette par d‚faut pour l'affichage monochrome. +Fonctionne seulement lors de l'‚mulation hercules ou cga_mono. +Vous pouvez aussi faire d‚filer les couleurs disponibles avec F11. +. +:CONFIG_SCALER +Scaler utilis‚ pour agrandir/am‚liorer les modes basse r‚solution. +Si l'option "forced" est ajout‚e, alors le scaler sera utilis‚ mˆme si +le r‚sultat ne semble pas celui escompt‚. +Notez que certains scalers peuvent utiliser des bords noirs pour remplir l'image +dans la r‚solution configur‚. Si ce n'est pas l'effet voulu, +essayez un scaler diff‚rent ou activez le mode plein ‚cran. + +. +:CONFIG_GLSHADER +Aussi bien 'none' (aucun) ou le nom d'un shader GLSL. Marche seulement avec +la sortie OpenGL. Peut-ˆtre un chemin absolu, un fichier +dans le sous-r‚pertoire 'glshaders' du r‚pertoire de configuration +de DOSBox, ou l'un des shaders int‚gr‚s : +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (d‚faut). +. +:CONFIG_CORE +Core CPU utilis‚ dans l'‚mulation. 'auto' bascule de 'normal' … 'dynamic' si c'est disponible et +appropri‚. +. +:CONFIG_CPUTYPE +Coeur de CPU utilis‚ dans l'‚mulation. 'auto' est le choix le plus rapide. +. +:CONFIG_CYCLES +Nombre d'instructions que DOSBox essaye d'‚muler … chaque milliseconde. +Param‚trer une trop grande valeur donne des coupures de son et des saccades. +Les cycles peuvent ˆtre d‚finis de 3 fa‡ons : + 'auto' essaye de deviner ce dont un jeu a besoin. + Cela fonctionne g‚n‚ralement, mais peut ‚chouer avec certains jeux. + '#nombre' d‚finira une quantit‚ fixe de cycles. C'est g‚n‚ralement ce qu'il faut + si 'auto' ‚choue. (Exemple : '4000') + 'max' allouera autant de cycles que votre ordinateur est capable + de g‚rer. + +. +:CONFIG_CYCLEUP +Nombre de cycles … ajouter/soustraire avec la combinaison de touches. (Ctrl+F11/Ctrl+F12) +. +:CONFIG_CYCLEDOWN +Le param‚trer … moins de 100 donnera un pourcentage. +. +:CONFIG_NOSOUND +Activer le mode silencieux, le son ‚tant cependant toujours ‚mul‚. +. +:CONFIG_RATE +Taux d'‚chantillonnage du mixer, param‚trer tout taux d'un p‚riph‚rique plus haut que cela va probablement d‚t‚riorer sa qualit‚ sonore. +. +:CONFIG_BLOCKSIZE +Taille de bloc du mixer, des blocs plus grands peuvent aider pour les saccades de son mais il sera aussi moins en phase. +. +:CONFIG_PREBUFFER +Nombre de millisecondes de donn‚es … garder en amont du paramŠtre blocksize. +. +:CONFIG_MIDIDEVICE +Pr‚iph‚rique qui recevra les donn‚es MIDI (depuis l'interface +‚mul‚e - MPU-401). Choisissez l'un des suivants : +'fluidsynth', pour utiliser le synth‚tiseur MIDI int‚gr‚. Reportez-vous + … la section [fluidsynth] pour la configuration d‚taill‚e. +'mt32', pour utiliser le synth‚tiseur Roland MT-32 int‚gr‚. Reportez-vous + … la section [mt32] pour la configuration d‚taill‚e. +'auto', pour utiliser le premier lecteur MIDI externe disponible. Cela + peut ˆtre un synth‚tiseur logiciel ou un p‚riph‚rique mat‚riel. +. +:CONFIG_MIDICONFIG +Options de configuration pour l'interface MIDI s‚lectionn‚e. +Il s'agit g‚n‚ralement de l'ID ou du nom du synth‚tiseur MIDI que vous voulez +utiliser (trouver son ID/nom avec la commande DOS 'mixer /listmidi'). +- Cette option n'a aucun effet lors de l'utilisation d'un synth‚tiseur int‚gr‚ + (mididevice = 'fluidsynth' ou 'mt32'). +- Lors de l'utilisation d'ALSA, utiliser la commande Linux 'aconnect -l' pour lister + les ports MIDI et en s‚lectionner un (par exemple 'midiconfig=14:0' + pour le s‚quenceur client 14, port 0). +- Si vous utiliser un Roland MT-32 avec un PCB en r‚vision 0, + le mat‚riel peut demander un d‚lai afin d'‚viter que son + tampon ne d‚borde. Dans ce cas, ajoutez 'delaysysex', + par exemple: 'midiconfig=2 delaysysex'. +Reportez vous au README/Manuel pour plus d'informations. +. +:CONFIG_MPU401 +Type de MPU-401 … ‚muler. +. +:CONFIG_SOUNDFONT +Chemin pour un fichier SoundFont au format .sf2. Vous pouvez utiliser +un chemin relatif ou absolu, ou le nom d'un fichier .sf2 dans +le r‚pertoire 'soundfonts' … l'int‚rieur de votre r‚pertoire de configuration +de DOSBox. +Un pourcentage optionnel r‚glera le volume du SoundFont. +Par exemple: 'soundfont.sf2 50' le diminuera de 50 pourcents. +L'‚chelle de pourcentage peut aller de 1 … 500. +. +:CONFIG_MODEL +ModŠle de synth‚tiseur … utiliser. Par d‚faut, pr‚fŠre CM-32L +si les deux sets de ROMs sont fournis. Pour les premiers jeux Sierra et Dune 2, +il est recommand‚ d'utiliser 'mt32', alors qu les jeux r‚cents utilisent +plut“t les effets sonores suppl‚mentaires CM-32L (utilisez 'auto' ou 'cm32l') +. +:CONFIG_ROMDIR +R‚pertoire contenant les ROMs n‚cessaires MT-32 et/ou CM-32L +nomm‚s comme ceci : + MT32_CONTROL.ROM ou CM32L_CONTROL.ROM - fichier(s) de contr“le ROM. + MT32_PCM.ROM ou CM32L_PCM.ROM - fichier(s) PCM ROM. +Le r‚pertoire peut ˆtre absolu ou relatif, ou laisser vide pour +utiliser le r‚pertoire 'mt32-roms' dans le r‚pertoire de configuration +de DOSBox, ou un autre r‚pertoire habituel du systŠme. +. +:CONFIG_SBTYPE +Type de Sound Blaster … ‚muler. 'gb' pour Game Blaster. +. +:CONFIG_SBBASE +Adresse IO de la Sound Blaster. +. +:CONFIG_IRQ +Num‚ro d'IRQ de la Sound Blaster. +. +:CONFIG_DMA +Num‚ro DMA de la Sound Blaster. +. +:CONFIG_HDMA +Num‚ro High DMA de la Sound Blaster. +. +:CONFIG_SBMIXER +Permet au mixer Sound Blaster de modifier le mixer de DOSBox. +. +:CONFIG_OPLRATE +oplrate est d‚pr‚ci‚ . La forme d'onde OPL waveform est maintenant ‚chantillonn‚e + au rythme de lecture du mixer pour ‚viter le r‚‚chantillonnage. +. +:CONFIG_OPLMODE +Type d'‚mulation OPL. Sur 'auto' le mode est d‚termin‚ par 'sbtype'. +Tous les modes OPL sont compatibles AdLib, sauf pour 'cms'. +. +:CONFIG_OPLEMU +Fournisseur de l'‚mulation OPL. 'compat' fournit une meilleure qualit‚, +'nuked' est par d‚faut et le plus pr‚cis (mais le plus gourmand en CPU). +. +:CONFIG_GUS +Activer l'‚mulation Gravis UltraSound. +. +:CONFIG_GUSBASE +Adresse de base IO de la Gravis UltraSound. +. +:CONFIG_GUSIRQ +Num‚ro d'IRQ de la Gravis UltraSound. +. +:CONFIG_GUSDMA +Canal DMA de la Gravis UltraSound. +. +:CONFIG_ULTRADIR +Chemin vers le r‚pertoire UltraSound. Dans ce r‚pertoire, +il devrait y avoir un r‚pertoire MIDI qui contient +les fichiers de patch pour la lecture GUS. Le jeu de patch +utilis‚ avec Timidity devrait bien fonctionner correctement. +. +:CONFIG_PCSPEAKER +Activer l'‚mulation du haut-parleur PC. +. +:CONFIG_PCRATE +Taux d'‚chantillonnage de la g‚n‚ration de son du haut-parleur PC. +. +:CONFIG_ZERO_OFFSET +Neutralise et empˆche DC-offset du haut-parleur PC d'endommager d'autres sources. +'auto' active ceci pour les systŠmes non-Windows et le d‚sactive pour Windows. +Si votre OS corrige lui-mˆme le DC-offset, alors param‚trez ceci … 'false'. +. +:CONFIG_TANDY +Activer l'‚mulation du Tandy Sound System. Pour 'auto', l'‚mulation est pr‚sente seulement si la machine est param‚tr‚e sur 'tandy'. +. +:CONFIG_TANDYRATE +Taux d'‚chantillonnage de la g‚n‚ration 3-Voix Tandy. +. +:CONFIG_DISNEY +Activer l'‚mulation Disney Sound Source. (compatible Covox Voice Master et Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Type de manette … ‚muler : auto (d‚faut), +aucun (d‚sactive l'‚mulation du joystick) +2axis (supporte deux manettes), +4axis (supporte une manette, premiŠre manette utilis‚e), +4axis_2 (supporte une manette, seconde manette utilis‚e), +fcs (Thrustmaster), ch (CH Flightstick). +'none' d‚sactive l'‚mulation de la manette. +'auto' choisit l'‚mulation selon la(les) manette(s) r‚elle(s). +(Rappelez-vous de r‚initialiser le fichier de correspondance des touches DOSBox si vous l'avez sauv‚ plus t“t) +. +:CONFIG_TIMED +Activer des intervalles de temps pour les axes. Tester cette option si votre manette d‚rive. +. +:CONFIG_AUTOFIRE +Tirer continuellement tant que le bouton est press‚. +. +:CONFIG_SWAP34 +changer les 3Šme et 4Šme axes. Peut ˆtre utile avec certaines manettes. +. +:CONFIG_BUTTONWRAP +Activer l'inversion de bouton pour le nombre de boutons ‚mul‚s. +. +:CONFIG_CIRCULARINPUT +Activer la translation d'entr‚e circulaire vers une sortie carr‚e. +Essayez d'activer ceci si votre stick analogique gauche peut seulement bouger dans un cercle. +. +:CONFIG_DEADZONE +Pourcentage de mouvement … ignorer. 100 transforme le stick en un stick digital. +. +:CONFIG_SERIAL1 +D‚finir le type de p‚riph‚rique connect‚ au port s‚rie. +Peut ˆtre 'disabled' (d‚sactiv‚), 'dummy' (factice), 'modem', 'nullmodem', 'directserial'. +Les paramŠtres additionnels doivent ˆtre sur la mˆme ligne sous la forme +paramŠtre:valeur. Le paramŠtre pour tous les types est l'IRQ (optionnel). +Pour 'directserial' : realport (port r‚el, requis), rxdelay (optionnel). + (realport:COM1 realport:ttyS0). +Pour 'modem' : listenport (port d'‚coute, optionnel). +Pour 'nullmodem' : server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (tous optionnels). +Exemple : 'serial1=modem listenport:5000'. +. +:CONFIG_SERIAL2 +Voir serial1 +. +:CONFIG_SERIAL3 +Voir serial1 +. +:CONFIG_SERIAL4 +Voir serial1 +. +:CONFIG_PHONEBOOKFILE +Fichier utilis‚ pour relier de faux num‚ros de t‚l‚phone … des adresses. +. +:CONFIG_XMS +Activer la prise en charge de m‚moire XMS (ou ‚tendue). +. +:CONFIG_EMS +Activer la prise en charge de m‚moire EMS (ou pagin‚e). La valeur par d‚faut (=true) fournie +la meilleure compatibilit‚ mais certaines applications peuvent fonctionner mieux +avec d'autres choix, ou la d‚sactivation de l'EMS (=false) +pour fonctionner. +. +:CONFIG_UMB +Activer la prise en charge des UMB (bloc m‚moire sup‚rieure). +. +:CONFIG_VER +Param‚trer la version de DOS (5.0 par d‚faut). Formater selon majeure.mineure. +Un nombre seul est trait‚ comme une version majeure. +Les paramŠtres communs sont 3.3, 5.0, 6.22, and 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Code langue pour la disposition du clavier (ou aucun). +. +:CONFIG_IPX +Activer l'IPX par ‚mulation UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Les lignes de cette section seront lanc‚es au d‚marrage. +Vous pouvez mettre vos commandes MOUNT ici. + +. +:CONFIGFILE_INTRO +# Ceci est le fichier de configuration pour DOSBox-Staging (%s). +# Les lignes commen‡ant avec un '#' sont des commentaires. + +. +:CONFIG_SUGGESTED_VALUES +Valeurs possibles +. +:PROGRAM_CONFIG_NOCONFIGFILE +Aucun fichier de configuration charg‚ ! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Fichier de configuration primaire : +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Fichiers de configuration additionnels: + +. +:PROGRAM_CONFIG_CONFDIR +R‚pertoire de configuration de DOSBox Staging %s : +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Impossible d'ouvrir le fichier %s + +. +:PROGRAM_CONFIG_FILE_WHICH +criture du fichier de configuration %s + +. +:PROGRAM_CONFIG_USAGE +Outil de configuration : +-writeconf ou -wc sans paramŠtre : ‚crit dans le fichier de configuration primaire charg‚. +-writeconf ou -wc avec un nom de fichier : ‚crit le fichier dans le r‚pertoire de configuration. +Utilisez -writelang ou -wl nom de fichier pour ‚crire les clefs de language courant. +-r [paramŠtres] + Red‚marre DOSBox, soit en utilisant les paramŠtres pr‚c‚dents ou tout autre ajout‚. +-wcp [nom de fichier] + crit le fichier de configuration dans le r‚pertoire du programme, dosbox-staging.conf ou le nom de fichier + sp‚cifi‚. +-wcd + crit dans le fichier de configuration par d‚faut dans le r‚pertoire de configuration. +-l liste les paramŠtres de configuration. +-h, -help, -? sections / nom de section / nom de propri‚t‚ + Sans paramŠtres, affiche cet ‚cran d'aide. Ajoutez "sections" pour une liste de + sections. Pour des infos … propos d'une section sp‚cifique ou d'une propri‚t‚ sp‚cifique ajoutez son nom aprŠs. +-axclear nettoye la section autoexec. +-axadd [ligne] ajoute une ligne … la section autoexec. +-axtype affiche le contenu de la section autoexec. +-securemode bascule en mode s‚curis‚. +-avistart d‚marre l'enregistrement AVI. +-avistop arrˆte l'enregistrement AVI. +-startmapper d‚marre le keymapper. +-get "section propri‚t‚" affiche la valeur de la propri‚t‚. +-set "section propri‚t‚=valeur" change la valeur. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Utilit‚ de la propri‚t‚ "%s" (contenue dans la section "%s") : +%s + +Valeurs possible : %s +Valeur par d‚faut : %s +Valeur actuelle: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Utilit‚ de la section "%s" : +%s +Valeur actuelle : +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +Cette propri‚t‚ ne peut jamais ˆtre chang‚e. + +. +:PROGRAM_CONFIG_HLP_POSINT +nombre entier positif +. +:PROGRAM_CONFIG_HLP_SECTHLP +La section %s contient les propri‚t‚s suivantes : + +. +:PROGRAM_CONFIG_HLP_SECTLIST +La configuration de DOSBox contient les sections suivantes : + + +. +:PROGRAM_CONFIG_SECURE_ON +Bascul‚ en mode s‚curis‚. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Cette op‚ration n'est pas permise en mode s‚curis‚. + +. +:PROGRAM_CONFIG_SECTION_ERROR +La section "%s" n'existe pas. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" n'est pas une valeur correcte pour la propri‚t‚ %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Aucune section ou propri‚t‚.. + +. +:PROGRAM_CONFIG_NO_PROPERTY +Il n'y a aucune propri‚t‚ "%s" dans la section "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Syntaxe correcte : config -set "section propri‚t‚". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Syntaxe correcte : config -get "section propri‚t‚". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox a ‚t‚ lanc‚ avec les paramŠtres de ligne de commande suivants : +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +ParamŠtre manquant. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMs trouv‚s : %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Lecteur +. +:PROGRAM_MOUNT_STATUS_TYPE +Type +. +:PROGRAM_MOUNT_STATUS_LABEL +Nom de volume +. +:PROGRAM_MOUNT_STATUS_2 +Lecteur %c mont‚ en tant que %s + +. +:PROGRAM_MOUNT_STATUS_1 +Les lecteurs mont‚s actuellement sont : + +. +:PROGRAM_MOUNT_ERROR_1 +Le r‚pertoire %s n'existe pas. + +. +:PROGRAM_MOUNT_ERROR_2 +%s n'est pas un r‚pertoire + +. +:PROGRAM_MOUNT_ILL_TYPE +Type ill‚gal %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Lecteur %c d‚j… mont‚ en tant que %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Le lecteur %c n'est pas mont‚. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Le lecteur %c a ‚t‚ enlev‚ avec succŠs. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Les lecteurs virtuels ne peuvent pas ˆtre d‚mont‚s. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' n'est pas un identifiant de lecteur valide. + +. +:PROGRAM_MOUNT_WARNING_WIN +Monter c:\ n'est PAS recommand‚. Veuillez monter un (sous-)r‚pertoire la prochaine fois. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Monter / n'est PAS recommand‚. Veuillez monter un (sous-)r‚pertoire la prochaine fois. + +. +:PROGRAM_MOUNT_NO_OPTION +Attention: option '%s' non support‚e et ignor‚e. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +Un r‚pertoire normal doit ˆtre mont‚ d'abord avant qu'une redirection soit possible. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +Cette redirection n'est PAS compatible avec le lecteur sp‚cifi‚. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +La redirection doit ˆtre sp‚cifi‚e en utilisant le mˆme adressage que le disque sous-jacent. Pas de m‚lange de chemins relatifs et absolus. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +Le r‚pertoire de redirection ne peut pas ˆtre le mˆme que celui du lecteur sous-jacent. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Quelque chose s'est mal d‚roul‚. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Redirection %s sur lecteur %c mont‚e. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Impossible de d‚placer le lecteur Z. Lecteur %c d‚j… mont‚. + +. +:PROGRAM_MEM_CONVEN +%10d kB de m‚moire conventionnelle libres + +. +:PROGRAM_MEM_EXTEND +%10d kB de m‚moire ‚tendue (XMS) libres + +. +:PROGRAM_MEM_EXPAND +%10d kB de m‚moire pagin‚e (EMS) libres + +. +:PROGRAM_MEM_UPPER +%10d kB de m‚moire sup‚rieure (UMB) libres dans %d bloc(s) (plus gros bloc UMB %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kb allou‚s. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kb lib‚r‚s. + +. +:PROGRAM_LOADFIX_DEALLOCALL +M‚moire utilis‚e lib‚r‚e. + +. +:PROGRAM_LOADFIX_ERROR +Erreur d'allocation m‚moire. + +. +:MSCDEX_SUCCESS +MSCDEX install‚. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX : chec : Les lettres de lecteur d'unit‚s CD-ROM multiples doivent ˆtre continues. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX : chec : Pas encore support‚. + +. +:MSCDEX_ERROR_PATH +MSCDEX : La localisation sp‚cifi‚e n'est pas un lecteur CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX : chec : Fichier non valide ou impossible … ouvrir. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX : chec : Trop de lecteurs CD-ROM (max. : 5). L'installation de MSCDEX a ‚chou‚e. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX : Sous-r‚pertoire mont‚ : support limit‚. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX : chec : Le fichier n'est pas une image ISO/CUE ou contient des erreurs. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX : chec : Erreur inconnue. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX : Attention : Option '%s' non support‚e et ignor‚e. + +. +:PROGRAM_RESCAN_SUCCESS +Cache de lecteur vid‚. + +. +:PROGRAM_INTRO +Bienvenue dans DOSBox Staging, un ‚mulateur x86 avec son et graphismes. +DOSBox cr‚e un shell pour vous qui ressemble au vieux DOS ordinaire. + +Pour des informations basqiues … propos du montage tapez intro mount +Pour des informations sur le support des CD-ROM tapez intro cdrom +Pour des informations sur les touches sp‚ciales tapez intro special +Pour acc‚der au wiki de DOSBox Staging, visitez : +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox s'arrˆtera/quittera sans avertissement si une erreur survient ! + +. +:PROGRAM_INTRO_MOUNT_START +Voici quelques commandes pour commencer : +Avant de pouvoir utiliser les fichiers pr‚sents sur votre propre systŠme de fichiers, +vous devez monter les r‚pertoires contenant les fichiers. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosgames\ cr‚era un lecteur C avec c:\dosgames pour contenu. ş +ş ş +ş c:\dosgames\ est un exemple. Remplacez-le par votre propre r‚pertoire de jeux.  +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/jeuxdos cr‚era un lecteur C avec ~/jeuxdos pour contenu. ş +ş ş +ş ~/dosgames est un exemple. Remplacez-le par votre propre r‚pertoire de jeux. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +Quand le montage est compl‚t‚ avec succŠs, tapez c: pour aller your freshly +sur votre nouveau lecteur C mont‚. Taper dir … cet endroit montrera son contenu. cd vous permettra +d'entrer dans un r‚pertoire (reconnaissable par les [] dans le listing du r‚pertoire). +Vous pouvez ex‚cutez des programmes/fichiers finissant par .exe .bat et .com. + +. +:PROGRAM_INTRO_CDROM +Comment monter un lecteur CD-ROM r‚el/virtuel dans DOSBox : +DOSBox supporte l'‚mulation CD-ROM … plusieurs niveaux. + +Ceci fonctionne sur tous les r‚pertoires ordinaires, installe MSCDEX et marque les fichiers +en lecteur seule. G‚n‚ralement c'est suffisant pour la plupart des jeux : + +mount D C:\exemple -t cdrom + +Si cela ne marche pas, vous pouvez pr‚ciser … DOSBox le nom de volume du CD-ROM : + +mount D C:\exemple -t cdrom -label CDLABEL + +Par ailleurs, vous pouvez utiliser IMGMOUNT pour monter des images ISO ou des fichiers CUE : + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Touches sp‚ciales : +Voici les combinaisons des touches par d‚faut. +Elles peuvent ˆtre chang‚es dans le keymapper. + +Alt+Entr‚e : Bascule entre mode plein ‚cran et mode fenˆtr‚. +Alt+Pause : Mettre en pause/relancer l'‚mulateur. +Ctrl+F1 : D‚marrer le keymapper. +Ctrl+F4 : Bascule entre les images disque mont‚es, met … jour le cache des r‚pertoires pour tous les lecteurs. +Ctrl+F5 : Sauvegarde une capture d'‚cran. +Ctrl+F6 : D‚marrer/Arrˆter l'enregistrement de la sortie son dans un fichier WAVE. +Ctrl+F7 : D‚marrer/Arrˆter l'enregistrement de la sortie vid‚o dans un fichier ZMBV. +Ctrl+F9 : Terminer l'‚mulation. +Ctrl+F10 : Capturer/Lib‚rer la souris. +Ctrl+F11 : Ralentir l'‚mulation. +Ctrl+F12 : Acc‚l‚rer l'‚mulation. +Alt+F12 : D‚bloquer la vitesse (bouton turbo/avance rapide). + +. +:PROGRAM_BOOT_NOT_EXIST +Le fichier de disque de d‚marrage n'existe pas. chec. + +. +:PROGRAM_BOOT_NOT_OPEN +Impossible d'ouvrir le fichier de disque de d‚marrage. chec. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Le fichier image est en lecture seule ! Cela peut cr‚er des problŠmes. + +. +:PROGRAM_BOOT_PRINT_ERROR +Cette commande d‚marre DOSBox … partir d'une disquette ou d'une image de disque dur. + +Pour cette commande, on peut sp‚cifier une succession de disquettes et basculer +entre elles avec Ctrl+F4, et -l sp‚cifie le lecteur mont‚ sur lequel d‚marrer. +Sans lettre de lecteur sp‚cifi‚e, le d‚marrage par d‚faut s'effectue sur A. +Les seules lettres de lecteur d‚marrables sont A, C, et D. Pour d‚marrer … partir +d'un disque dur (C ou D), l'image doit avoir au pr‚alable ‚t‚ mont‚e avec la commande +IMGMOUNT. + +La syntaxe de cette commande est : + +BOOT [diskimg1.img diskimg2.img] [-l lettre_de_lecteur] + +. +:PROGRAM_BOOT_UNABLE +Impossible de d‚marrer … partir du lecteur %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Ouverture du fichier image : %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Ne peut pas ouvrir %s +. +:PROGRAM_BOOT_BOOT +D‚marrage depuis le lecteur %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Cartouche PCjr trouv‚e, mais la machine n'est pas un PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Cartouche de commandes PCjr disponible :%s +. +:PROGRAM_BOOT_CART_NO_CMDS +Pas de cartouche PCjr de commande trouv‚e +. +:PROGRAM_LOADROM_SPECIFY_FILE +Vous devez sp‚cifier le fichier ROM … charger. + +. +:PROGRAM_LOADROM_CANT_OPEN +Fichier ROM non accessible. + +. +:PROGRAM_LOADROM_TOO_LARGE +Fichier ROM trop large. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +BIOS vid‚o non support‚ par ce type de machine. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +Fichier ROM non reconnu. + +. +:PROGRAM_LOADROM_BASIC_LOADED +ROM BASIC charg‚. + +. +:SHELL_CMD_IMGMOUNT_HELP +monte la ou les image(s) de disques compacts ou de disquette(s) sur une lettre de lecteur sp‚cifi‚e. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Monte une image CD-ROM, disquette, ou disque dur sur une lettre de lecteur. + +Usage : + imgmount LECTEUR CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount LECTEUR FICHIERIMAGE [FICHIERIMAGE2 [..]] [-fs fat] -t hdd|floppy + imgmount LECTEUR IMAGEDMARRAGE [-fs fat|none] -t hdd -size GEOMETRIE + imgmount -u LECTEUR (d‚monte l'image du LECTEUR) + +Avec : + LECTEUR est la lettre de lecteur o— l'image sera mont‚e : a, c, d, ... + CDROM-SET est ISO, CUE+BIN, CUE+ISO, ou CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + FICHIERIMAGE est une image de disque dur ou disquette format‚ FAT16/FAT12 + IMAGEDMARRAGE est une image de d‚marrage de disque dur avec une taille + -size GEOMETRIE : bytes-par-secteur,secteurs-par-tˆte,tˆtes,cylindres +Notes : + - Ctrl+F4 ‚change & monte le CDROM-SET ou le FICHIERIMAGE suivant si sp‚cifi‚. +Exemples : + imgmount D /home/USERNAME/jeux/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A disquette1.img disquette2.img disquette3.img -t floppy + imgmount C ~/dos/lecteur_c.img -t hdd + imgmount C demarrage.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +relie les dossiers ou lecteurs physiques … une lettre de lecteur virtuel. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Monte un r‚pertoire de l'OS h“te sur une lettre de lecteur. + +Usage : + mount LECTEUR RPERTOIRE [-t TYPE] [-freesize TAILLE] [-label NOM_VOLUME] + mount -u LECTEUR (d‚monte le r‚pertoire du LECTEUR) + +Avec : + LECTEUR la lettre de lecteur o— sera mont‚ le r‚pertoire : A, C, D, ... + RPERTOIRE est le r‚pertoire de l'OS h“te qui sera mont‚ + TYPE type de r‚pertoire … monter : 'dir', 'floppy', 'cdrom', 'overlay' + TAILLE espace libre sur le disque virtuel + (KiB pour les disquettes, MiB sinon) + NOM_VOLUME nom de volume … utiliser + +Notes : + - '-t overlay' redirige les accŠs en ‚criture du disque mont‚ + vers un autre r‚pertoire. + - Options disponibles dans le manuel (fichier README, chapitre 4). + +Exemples : + mount C ~/jeuxdos + mount D "/media/USERNAME/JEU CD" -t cdrom + mount C mes_fichiers_de_sauvegarde -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Vous devez sp‚cifier la lettre de lecteur sur laquelle monter l'image. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Vous devez sp‚cifier le num‚ro de lecteur (0 ou 3) sur lequel monter l'image (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Pour les images CD-ROM : IMGMOUNT lettre-lecteur localisation-image -t iso + +Pour les images de disque dur : vous devez sp‚cifier la g‚om‚trie du disque dur : +bytes_par_secteur, secteurs_par_cylindre, tˆtes_par_cylindre, cylindres. +IMGMOUNT lettre-lecteur localisation-image -size bps,spc,tpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Ne peut pas charger le fichier image. +V‚rifiez que le chemin est correct et que l'image est accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Ne peut pas extraire la g‚om‚trie du lecteur depuis l'image. +Utilisez le paramŠtre -size bps,spc,tpc,cyl pour sp‚cifier la g‚om‚trie. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Type '%s' non support‚. Sp‚cifiez 'floppy' (disquette), 'hdd' (disque dur), 'cdrom', ou 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" non support‚. Sp‚cifiez 'fat' ou 'iso' ou 'none' (aucun). + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Vous devez sp‚cifier un fichier image … monter. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Fichier image non trouv‚. + +. +:PROGRAM_IMGMOUNT_MOUNT +Pour monter des r‚pertoires, utilisez la commande MOUNT, pas la commande IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Lecteur d‚j… mont‚ avec cette lettre. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Ne peut pas cr‚er de lecteur depuis un fichier. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Lecteur num‚ro %d mont‚ comme %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +L'image doit ˆtre sur un h“te ou sur un disque local. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +L'utilisation de fichiers multiples n'est support‚e que pour les images CUE/ISO. + +. +:PROGRAM_KEYB_INFO +La page de code %i a ‚t‚ charg‚e + +. +:PROGRAM_KEYB_INFO_LAYOUT +La page de code %i a ‚t‚ charg‚e pour la disposition %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID disposition clavier[ num‚ro page de code[ fichier page de code]]] + +Quelques exemples : + KEYB: Affiche la page de code actuellement charg‚e. + KEYB sp: Charge la disposition espagnole (SP), utilise une page de code appropri‚e. + KEYB sp 850: Charge la disposition espagnole (SP), utilise la page de code 850. + KEYB sp 850 mycp.cpi: Idem que ci-dessus, mais utilise le fichier mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +La disposition clavier %s est charg‚e pour la page de code %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Fichier de clavier %s non trouv‚ + + +. +:PROGRAM_KEYB_INVALIDFILE +Fichier de clavier %s non valide + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Aucune disposition dans %s pour la page de code %i + +. +:PROGRAM_KEYB_INVCPFILE +Aucun fichier ou fichier de page de code non valide pour la disposition %s + + +. +:SHELL_ILLEGAL_PATH +Chemin incorrect. + +. +:SHELL_CMD_HELP +Pour avoir une liste de toutes les commandes support‚es, tapez help /all . +Liste rapide des commandes les plus utilis‚es : + +. +:SHELL_CMD_ECHO_ON +ECHO est activ‚. + +. +:SHELL_CMD_ECHO_OFF +ECHO est d‚sactiv‚. + +. +:SHELL_ILLEGAL_SWITCH +ParamŠtre incorrect : %s. + +. +:SHELL_MISSING_PARAMETER +ParamŠtre requis manquant. + +. +:SHELL_CMD_CHDIR_ERROR +Impossible de CHanger vers : %s. + +. +:SHELL_CMD_CHDIR_HINT +Astuce : pour changer de lecteur, tapez %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +Le nom de r‚pertoire est plus long que 8 caractŠres et/ou contient des espaces. +Essayez cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Vous ˆtes encore sur le lecteur Z:, changez pour un lecteur mont‚ avec C:. + +. +:SHELL_CMD_DATE_HELP +Affiche ou change la date interne. + +. +:SHELL_CMD_DATE_ERROR +La date sp‚cifi‚e est incorrecte. + +. +:SHELL_CMD_DATE_DAYS +3DimLunMarMerJeuVenSam +. +:SHELL_CMD_DATE_NOW +Date actuelle : +. +:SHELL_CMD_DATE_SETHLP +Tapez 'date MM-JJ-AAAA' pour changer + +. +:SHELL_CMD_DATE_FORMAT +M/J/A +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-JJ-AAAA] + MM-JJ-AAAA: nouvelle date … utiliser + /S: Utilise de fa‡on permanente l'heure et la date de l'h“te pour le DOS + /F: Rebascule sur l'heure interne de DOSBox (contraire de /S) + /T: Affiche seulement la date + /H: Synchronise avec l'h“te + +. +:SHELL_CMD_TIME_HELP +Affiche l'heure interne. + +. +:SHELL_CMD_TIME_NOW +Heure courante : +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Affiche seulement l'heure + /H: Synchronise avec l'h“te + +. +:SHELL_CMD_MKDIR_ERROR +Impossible de cr‚er : %s. + +. +:SHELL_CMD_RMDIR_ERROR +Impossible de supprimer : %s. + +. +:SHELL_CMD_DEL_ERROR +Impossible d'effacer : %s. + +. +:SHELL_SYNTAXERROR +La syntaxe de la commande est incorrecte. + +. +:SHELL_CMD_SET_NOT_SET +La variable d'environnement %s n'est pas d‚finie. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Pas assez d'espace d'environnement disponible. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST : Nom de fichier manquant. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL : Nombre manquant. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL : Num‚ro non valide. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Aucune ‚tiquette indiqu‚e pour la commande GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO : tiquette %s non trouv‚e. + +. +:SHELL_CMD_FILE_NOT_FOUND +Fichier %s non trouv‚. + +. +:SHELL_CMD_FILE_EXISTS +Fichier %s d‚j… existant. + +. +:SHELL_CMD_DIR_VOLUME + Le volume dans le lecteur %c est %s + +. +:SHELL_CMD_DIR_INTRO + Arborescence de %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d fichier(s) %21s bytes + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d r‚pertoire(s) %21s bytes libres + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Le lecteur %c n'existe pas ! +Vous devez le monter auparavant. Tapez intro ou intro mount pour plus d'informations. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Commande invalide : %s. + +. +:SHELL_CMD_PAUSE +Appuyer sur une touche pour continuer... +. +:SHELL_CMD_PAUSE_HELP +Attendre l'appui sur 1 touche pour continuer. + +. +:SHELL_CMD_COPY_FAILURE +chec de la copie : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d fichier(s) copi‚(s). + +. +:SHELL_CMD_SUBST_NO_REMOVE +Impossible d'enlever, lecteur non utilis‚. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST a ‚chou‚. Vous avez fait une erreur dans votre ligne de commande ou le lecteur cible est d‚j… utilis‚. +Il n'est possible d'utiliser SUBST que sur les lecteurs locaux. +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Bienvenue dans DOSBox Staging %-44s ş +ş ş +ş Pour une courte introduction pour les nouveaux utilisateurs, tapez: INTRO ş +ş Pour la liste des commandes support‚es par le shell, tapez : HELP ş +ş ş +ş Pour ajuster la vitesse du CPU ‚mul‚, essayez Ctrl+F11 et Ctrl+F12. ş +ş Pour activer le keymapper Ctrl+F1. ş +ş Pour plus d'informations, lisez le fichier README dans le r‚pertoire de ş +ş DOSBox. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox supporte le mode composite CGA. ş +ş Utilisez F12 pour r‚gler la sortiecomposite sur ON, OFF, ou AUTO (d‚faut). ş +ş (Alt+)F11 change la teinte; Ctrl+Alt+F11 s‚lectionne le premier/dernier modŠle CGA. ş +ş ş + +. +:SHELL_STARTUP_CGA_MONO +ş Utilisez F11 pour passer au vert, ambre, blanc et blanc-papier, ş +ş et Alt+F11 pour changer le contraste/la luminosit‚. ş + +. +:SHELL_STARTUP_HERC +ş Utilisez F11 pour passer au blanc, ambre, et vert monochrome. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Pressez Alt+Pause pour d‚marrer le debugger ou lancez l'ex‚cutable avec DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş https://dosbox-staging.github.io ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Affiche/change le r‚pertoire courant. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [lecteur:][chemin] +CHDIR [..] +CD [lecteur:][chemin] +CD [..] + + .. Indique que vous voulez changer vers le r‚pertoire parent. + +Tapez 'CD lecteur': pour afficher le r‚pertoire courant dans le lecteur sp‚cifi‚. +Tapez 'CD' sans paramŠtres pour afficher le lecteur et le r‚pertoire courant. + +. +:SHELL_CMD_CLS_HELP +Effacer l'‚cran. + +. +:SHELL_CMD_DIR_HELP +Affiche une liste de fichiers et sous-r‚pertoires dans un r‚pertoire. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [lecteur:][chemin][nomdefichier] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [lecteur:][chemin][nomdefichier] + S‚pcifie le lecteur, r‚pertoire, et/ou fichiers … afficher. + /W Utilise le format d'affichage large. + /B Utilise le format minimal (ni en-tˆte ni r‚sum‚). + /P Met en pause l'affichage aprŠs chaque ‚cran rempli. + /AD Affiche tous les r‚pertoires. + /A-D Affiche tous les fichiers. + /O Liste tri‚e. + - Pr‚fixe pour inverser l'ordre de tri + clef de tri N par Nom (alphab‚tique) S par taille (plus petit d'abord) + E par Extension (alphab‚tique) D par date & heure (plus ancien d'abord) + +. +:SHELL_CMD_ECHO_HELP +Affiche des messages et active/d‚sactive la commande ECHO. + +. +:SHELL_CMD_EXIT_HELP +Sortir du shell. + +. +:SHELL_CMD_HELP_HELP +Montrer l'aide. + +. +:SHELL_CMD_MKDIR_HELP +Cr‚er un r‚pertoire. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [lecteur:][chemin] +MD [lecteur:][chemin] + +. +:SHELL_CMD_RMDIR_HELP +Supprimer un r‚pertoire. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [lecteur:][chemin] +RD [lecteur:][chemin] + +. +:SHELL_CMD_SET_HELP +Changer les variables d'environnement. + +. +:SHELL_CMD_IF_HELP +Effectuer un processus avec condition dans les programmes batch. + +. +:SHELL_CMD_GOTO_HELP +Aller … la ligne de l'‚tiquette d‚finie dans un script batch. + +. +:SHELL_CMD_SHIFT_HELP +D‚caler les paramŠtres de ligne de commande vers la gauche dans un script batch. + +. +:SHELL_CMD_TYPE_HELP +Affiche le contenu d'un fichier texte. + +. +:SHELL_CMD_TYPE_HELP_LONG +TAPEZ [lecteur:][chemin][nomdefichier] + +. +:SHELL_CMD_REM_HELP +Ajouter des commentaires dans un fichier batch. + +. +:SHELL_CMD_REM_HELP_LONG +REM [commentaire] + +. +:SHELL_CMD_NO_WILD +C'est une version simple de la commande, aucun joker autoris‚ ! + +. +:SHELL_CMD_RENAME_HELP +Renomme un ou plusieurs fichiers. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [lecteur:][chemin]nomfichier1 nomfichier2. +REN [lecteur:][chemin]nomfichier1 nomfichier2. + +Notez que vous ne pouvez pas sp‚cifier un nouveau lecteur ou chemin pour votre fichier cible. + +. +:SHELL_CMD_DELETE_HELP +Supprimer un ou plusieurs fichiers. + +. +:SHELL_CMD_COPY_HELP +Copier des fichiers. + +. +:SHELL_CMD_CALL_HELP +Lancer un fichier batch … partir d'un autre fichier batch.. + +. +:SHELL_CMD_SUBST_HELP +Assigner un r‚pertoire interne … un lecteur. + +. +:SHELL_CMD_LOADHIGH_HELP +Charger un programme en m‚moire haute (requiert xms=true et umb=true). + +. +:SHELL_CMD_LS_HELP +Liste le contenu du r‚pertoire. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [ARGUMENTS] + +. +:SHELL_CMD_LS_PATH_ERR +ls : ne peut acc‚der … '%s' : Aucun fichier ou r‚pertoire de ce nom + +. +:SHELL_CMD_CHOICE_HELP +Attendre l'appui sur une touche et d‚finir le ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:choix] [/N] [/S] texte + /C[:]choix - Sp‚cifie les touches utilisables. Par d‚faut : yn (oui/non). + /N - N'affiche pas les choix … la fin du prompt. + /S - Active la sensibilit‚ … la casse des choix. + texte - Texte … afficher comme prompt. + +. +:SHELL_CMD_ATTRIB_HELP +Ne fait rien. Fourni pour la compatibilit‚. + +. +:SHELL_CMD_PATH_HELP +Fourni pour la compatibilit‚. + +. +:SHELL_CMD_VER_HELP +Voir ou r‚gler la version de DOS report‚e. + +. +:SHELL_CMD_VER_HELP_LONG +Utilisation : + ver + ver set VERSION + +Avec : + VERSION peut ˆtre un nombre entier, comme 5, ou inclure une valeur d‚cimale + … deux chiffres, comme : 6.22, 7.01, ou 7.10. Les d‚cimales peuvent + aussi ˆtre s‚pares par un espace, comme : 6 22, 7 01, ou 7 10. + +Notes : + La version de DOS peut aussi ˆtre r‚gl‚e dans le fichier de configuration + sous la section [dos] en utilisant le paramŠtre "ver = VERSION". + +Exemples : + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging version %s +DOS version %d.%02d + +. +:SHELL_CMD_VER_INVALID +La version sp‚cifi‚e de DOS n'est pas correcte. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/fr/traduction-lisez-moi.txt dosbox-staging-0.77.0/contrib/translations/fr/traduction-lisez-moi.txt --- dosbox-staging-0.76.0/contrib/translations/fr/traduction-lisez-moi.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/fr/traduction-lisez-moi.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,15 @@ +Traduction française pour dosbox (dosbox-staging) +---- +Auteurs : +- Victor (https://www.abandonware-forums.org/member/10497-victor) : base DOSBox : https://www.abandonware-forums.org/forum/forum-ltf-abandonware-france/aide-de-jeux-probl%C3%A8mes-techniques/20959-dosbox-en-fran%C3%A7ais +- Choum (https://www.abandonware-forums.org/member/38656-choum) : mise Ă  jour 0.74-3 +- Draky50110 : adaptation sur DOSBox-Staging + +Utilisation : +- tĂŠlĂŠchargez et copiez le fichier de langue "fr_FR.lng" dans le rĂŠpertoire de configuration de DOSBox-Staging (Lancez "dosbox -printconf" pour le connaĂŽtre). +- ouvrez le fichier de configuration de base "dosbox-staging.conf" et modifiez "language=" pour y ajouter le nom du fichier. Cela donnera "language=fr_FR.lng". +- lancez DOSBox-Staging : tout doit ĂŞtre en français. + +Aide : +- Issue GitHub pour la traduction française : https://github.com/dosbox-staging/dosbox-staging/issues/776 +- Discussion sur LTF : https://www.abandonware-forums.org/forum/forum-ltf-abandonware-france/le-bar-des-amis/818418-dosbox-staging-traduction-fran%C3%A7aise diff -Nru dosbox-staging-0.76.0/contrib/translations/it/it_IT.lng dosbox-staging-0.77.0/contrib/translations/it/it_IT.lng --- dosbox-staging-0.76.0/contrib/translations/it/it_IT.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/it/it_IT.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1457 @@ +:CONFIG_FULLSCREEN +Avvia DOSBox direttamente a schermo intero. +Premi Alt+Enter per tornare in modalit… finestra. +. +:CONFIG_DISPLAY +Numero dello schermo da utilizzare; Il valore dipende dall'OS e dalle +impostazioni dell'utente. +. +:CONFIG_VSYNC +Impostazione Sincronizzazione Verticale non implementata (parametro ignorato). +. +:CONFIG_FULLRESOLUTION +Risoluzione da usare a schermo intero: 'original', 'desktop' o +dimensione fissa (es. 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Imposta le dimensioni della finestra da utilizzare durante l'esecuzione +in modalit… finestra: + default: Seleziona l'opzione migliore in base al tuo + ambiente e ad altre impostazioni. + original: Ridimensiona la finestra alla risoluzione + scelta dal programma emulato. + resizable: Rendi ridimensionabile la finestra dell'emulatore. + Questa Š un'opzione sperimentale, funziona solo con + output=opengl e glshader=sharp (o none) + : Ridimensiona il contenuto della finestra alle dimensioni + indicate, nel formato LxA (larghezza x altezza). + Per esempio: 1024x768. + Il ridimensionamento non viene eseguito per output=surface. +. +:CONFIG_OUTPUT +Sistema video da usare per l'output. +. +:CONFIG_TEXTURE_RENDERER +Scegli un driver di rendering da utilizzare nella modalit… di rendering +texture. Usa texture_renderer=auto per una scelta automatica. +. +:CONFIG_CAPTURE_MOUSE +Metodo di controllo del mouse: + onclick: Il mouse viene catturato dopo il primo + clic all'interno della finestra. + onstart: Il mouse viene catturato immediatamente all'avvio + (simile al vero DOS). + seamless: Il mouse pu• muoversi senza problemi dentro e fuori + la finestra di DOSBox e non pu• essere catturato. + nomouse: Il mouse Š disabilitato e nascosto senza alcun + segnale inviato al gioco. +Gestione del clic centrale (secondo parametro): + middlegame: I clic centrali vengono inviati al gioco + (Ctrl+F10 rilascia il mouse). + middlerelease: I clic centrali rilasciano il mouse + (non inviati al gioco). Tuttavia, i clic centrali + verranno inviati al gioco in modalit… schermo intero + o quando Š impostato il controllo continuo. + Ctrl+F10 rilascer… anche il mouse. +Defaults (se non Š presente o incorretto): seamless middlerelease +. +:CONFIG_SENSITIVITY +Sensibilit… del mouse. Il secondo parametro opzionale specifica la sensibilit… +verticale (es. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Abilita questa impostazione per bypassare le impostazioni di sensibilit… +e accelerazione del mouse del tuo sistema operativo. Funziona in modalit… +schermo intero o quando il mouse viene catturato in modalit… finestra. +. +:CONFIG_WAITONERROR +Aspetta prima di chiudere la console in caso di errore di DOSBox. +. +:CONFIG_PRIORITY +Livelli di priorit… per DOSBox. La seconda voce dopo la virgola Š per quando +DOSBox Š minimizzato o non in primo piano. 'pause' pu• essere usato solo per +la seconda voce. +. +:CONFIG_MAPPERFILE +File utilizzato per caricare/salvare le corrispondenze tasto/evento. +Resetmapper funziona solo con i valori predefiniti. +. +:CONFIG_SCREENSAVER +Usa 'allow' (consenti) o 'block' (blocca) per sovrascrivere la variabile +d'ambiente SDL_VIDEO_ALLOW_SCREENSAVER (che di solito blocca gli screensaver +del sistema operativo mentre l'emulatore Š in esecuzione). +. +:CONFIG_LANGUAGE +Seleziona un altro file di lingua. +. +:CONFIG_MACHINE +Tipo di macchina che DOSBox sta cercando di emulare. +. +:CONFIG_CAPTURES +Cartella in cui vengono salvati file come suoni WAVE, musica MIDI e screenshot. +. +:CONFIG_MEMSIZE +Quantit… di memoria a disposizione di DOSBox, in megabytes. +Si consiglia di non modificare questo valore per evitare problemi con alcuni +giochi, anche se potrebbe essere necessario aumentarlo per farne funzionare +alcuni. Di solito non vi Š nessun guadagno in velocit… alzando questo valore. +. +:CONFIG_STARTUP_VERBOSITY +Determina il livello di verbosit… prima di visualizzare il programma: +Verbosit… |Schermata iniziale|Schermata di benvenuto|Output DOSBox +high | s | s | s +medium | no | s | s +low | no | no | s +quiet | no | no | no +splash_only | s | no | no +auto | 'low' se exec o dir vengono passati, altrimenti 'high' +. +:CONFIG_FRAMESKIP +Determina il numero di fotogrammi saltati da DOSBox prima di disegnarne uno. +. +:CONFIG_ASPECT +Ridimensiona la risoluzione verticale dello schermo per produrre un rapporto +di aspetto 4:3, corrispondente a quello dei monitor a definizione standard +originali, per i quali sono stati progettati la maggior parte dei giochi DOS. +Questa impostazione ha effetto solo sulle modalit… video che utilizzano pixel +non quadrati, come 320x200 o 640x400; Le modalit… video a pixel quadrato, +come 640x480 e 800x600, verranno visualizzate cos come sono. +. +:CONFIG_MONOCHROME_PALETTE +Seleziona la tavolozza predefinita per la visualizzazione monocromatica. +Funziona solo quando si emula hercules o cga_mono. +Puoi anche scorrere i colori disponibili usando il tasto F11. +. +:CONFIG_SCALER +Scaler usato per ingrandire/migliorare le modalit… a bassa risoluzione. +Se viene aggiunto 'forced', lo scaler sar… usato anche se i risultati +potrebbero essere indesiderati. +Nota che alcuni scaler possono utilizzare bordi neri per adattare l'immagine +alla risoluzione dello schermo configurata. Se questo non Š l'effetto +desiderato, prova uno scaler diverso o attiva la modalit… a schermo intero. +. +:CONFIG_GLSHADER +Imposta 'none' (nessuno) o il nome di uno shader GLSL. Funziona solo con +l'output OpenGL. Pu• essere un percorso assoluto, un file nella sottocartella +'glshaders' della cartella di configurazione di DOSBox, o uno degli shader +incorporati: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (predefinito). +. +:CONFIG_CORE +Core CPU usato nell'emulazione. 'auto' diventer… 'dynamic' quando possibile e +appropriato. + +. +:CONFIG_CPUTYPE +Tipo di CPU usata nell'emulazione. 'auto' Š la scelta pi— veloce. +. +:CONFIG_CYCLES +Quantit… di istruzioni che DOSBox prova a emulare ogni millisecondo. +Un valore troppo alto produrr… perdite nell'audio e ritardi. +I cicli possono essere impostati in 3 modi: + 'auto' prova a indovinare le necessit… del gioco. + Di solito funziona, ma pu• fallire con certi giochi. + 'fixed #number' imposta un numero fisso di cicli. Questo Š ci• che ti serve + quando 'auto' non funziona. (Esempio: fixed 4000) + 'max' allocher… tanti cicli quanti il tuo computer Š in grado di + gestire. +. +:CONFIG_CYCLEUP +Quantit… di cicli di cui aumentare usando gli appositi tasti. (Ctrl+F12) +. +:CONFIG_CYCLEDOWN +Quantit… di cicli di cui diminuire usando gli appositi tasti. (Ctrl+F11) +Un valore pi— basso di 100 indica una percentuale. +. +:CONFIG_NOSOUND +Attiva la modalit… silenziosa, ma il suono viene comunque emulato. +. +:CONFIG_RATE +Frequenza del mixer. Impostare la frequenza di qualsiasi dispositivo +ad un valore pi— alto di questo, ne peggiorer… la qualit… sonora. +. +:CONFIG_BLOCKSIZE +Dimensione blocchi mixer. Blocchi pi— grandi riducono l'audio a singhiozzo, +ma possono introdurre ritardi. +. +:CONFIG_PREBUFFER +Quantit… di dati, in millisecondi, da tenere in cima alla dimensione dei +blocchi. +. +:CONFIG_MIDIDEVICE +Dispositivo che ricever… i dati MIDI (dall'interfaccia MIDI emulata - MPU-401). +Scegli uno dei seguenti: +'fluidsynth', per usare il sintetizzatore MIDI integrato. Fare riferimento + alla sezione [fluidsynth] per una configurazione dettagliata. +'mt32', per usare il sintetizzatore Roland MT-32 integrato. + Fare riferimento alla sezione [mt32] per una configurazione dettagliata. +'auto', per utilizzare il primo lettore MIDI esterno funzionante. Questo + potrebbe essere un sintetizzatore software o un dispositivo fisico. +. +:CONFIG_MIDICONFIG +Opzioni di configurazione per l'interfaccia MIDI selezionata. +Di solito Š l'ID o il nome del sintetizzatore MIDI che desideri utilizzare +(trova l'id/nome con il comando DOS 'mixer /listmidi'). +- Questa opzione non ha effetto quando si utilizzano sintetizzatori intergrati. + (mididevice = fluidsynth o mt32) +- Quando si utilizza ALSA, utilizzare il comando Linux 'aconnect -l' per + elencare le porte MIDI aperte, e selezionarne una. + (ad esempio 'midiconfig=14:0' per il client sequencer 14, porta 0) +- Se stai usando un vero Roland MT-32 con revisione 0 del PCB, l'hardware + potrebbe richiedere un ritardo per evitare che il suo buffer + si sovraccarichi. + In tal caso, aggiungi 'delaysysex', ad esempio: 'midiconfig=2 delaysysex'. +Fare riferimento al README/Manuale per ulteriori dettagli. +. +:CONFIG_MPU401 +Tipo di MPU-401 da emulare. +. +:CONFIG_SOUNDFONT +Percorso del file SoundFont in formato .sf2. Puoi utilizzare un percorso +assoluto o relativo, o il nome di un file .sf2 all'interno della cartella +'soundfonts' situata nella cartella di configurazione di DOSBox. +Una percentuale opzionale ridimensioner… il volume del SoundFont. +Ad esempio: 'soundfont.sf2 50' lo attenuer… del 50 percento. +La percentuale del volume pu• variare da 1 a 500. +. +:CONFIG_MODEL +Modello di sintetizzatore da utilizzare. L'impostazione predefinita (auto) +preferisce CM-32L, se vengono forniti entrambi i set di ROM. +Per i primi giochi Sierra e Dune 2, si consiglia di utilizzare 'mt32', mentre +i giochi pi— recenti in genere utilizzano gli effetti sonori extra del CM-32L +(usa 'auto' o 'cm32l') +. +:CONFIG_ROMDIR +Cartella contenente una o entrambe le coppie di ROM MT-32 e/o CM-32L. +I file devono essere denominati in maiuscolo, come segue: + - ROM MT-32 necessarie: MT32_CONTROL.ROM e MT32_PCM.ROM + - ROM CM-32L necessarie: CM32L_CONTROL.ROM e CM32L_PCM.ROM +Il percorso della cartella pu• essere assoluto o relativo, o lasciato vuoto +per usare la cartella 'mt32-roms' nella cartella di configurazione di DOSBox, +o un'altra directory del sistema. +. +:CONFIG_SBTYPE +Tipo di Sound Blaster da emulare. 'gb' Š il Game Blaster. +. +:CONFIG_SBBASE +Indirizzo IO della scheda audio Sound Blaster. +. +:CONFIG_IRQ +Numero IRQ della scheda audio Sound Blaster. +. +:CONFIG_DMA +Canale DMA della scheda audio Sound Blaster. +. +:CONFIG_HDMA +Canale High DMA della scheda audio Sound Blaster. +. +:CONFIG_SBMIXER +Permetti al mixer della scheda Sound Blaster di modificare il mixer di DOSBox. +. +:CONFIG_OPLRATE +oplrate Š deprecato. La forma d'onda OPL viene ora campionata +alla frequenza di campionamento del mixer per evitare il ricampionamento. +. +:CONFIG_OPLMODE +Tipo di emulazione OPL. Se 'auto', la modalit… Š determinata da 'sbtype'. +Tutte le modalit… OPL sono compatibili con AdLib, eccetto per 'cms'. +. +:CONFIG_OPLEMU +Provider per l'emulazione OPL. 'compat' fornisce una migliore qualit…, 'nuked' +Š l'impostazione predefinita e pi— accurata (ma la pi— intensa per la CPU). +. +:CONFIG_GUS +Abilita l'emulazione della scheda audio Gravis UltraSound. +. +:CONFIG_GUSBASE +Indirizzo base IO della scheda audio Gravis Ultrasound. +. +:CONFIG_GUSIRQ +Numero IRQ della scheda audio Gravis UltraSound. +. +:CONFIG_GUSDMA +Canale DMA della scheda audio Gravis UltraSound. +. +:CONFIG_ULTRADIR +Percorso per la cartella UltraSound. Questa directory dovrebbe contenere una +cartella MIDI con al suo interno i patch file per la riproduzione GUS. +I set di patch utilizzati con Timidity dovrebbero funzionare. +. +:CONFIG_PCSPEAKER +Attiva l'emulazione del PC-Speaker (altoparlante interno del PC). +. +:CONFIG_PCRATE +Frequenza di campionamento della generazione del suono del PC-Speaker. +. +:CONFIG_ZERO_OFFSET +Neutralizza e impedisce che il DC-offset dell'altoparlante del PC danneggi +altre sorgenti. 'auto' lo abilita per i sistemi non Windows e lo disabilita +su Windows. Se il tuo sistema operativo esegue la propria correzione del +DC-offset, impostalo su "false". +. +:CONFIG_TANDY +Attiva l'emulazione di Tandy Sound System. +Se 'auto', l'emulazione Š presente solo se la macchina Š impostata su 'tandy'. +. +:CONFIG_TANDYRATE +Frequenza di campionamento della generazione del suono a 3-voci Tandy. +. +:CONFIG_DISNEY +Attiva l'emulazione Disney Sound Source. +(Compatibile con Covox Voice Master e Speech Thing) +. +:CONFIG_JOYSTICKTYPE +Tipo di joystick da emulare: auto (predefinito), +none (disattiva l'emulazione joystick), +2axis (supporta due joystick), +4axis (supporta un joystick, viene usato il primo), +4axis_2 (supporta un joystick, viene usato il secondo), +fcs (Thrustmaster), ch (CH Flightstick). +auto sceglie l'emulazione in base ai joystick reali. +(Ricorda di resettare il mapperfile di DOSBox se l'hai salvato in precedenza) +. +:CONFIG_TIMED +Attiva gli intervalli temporizzati per gli assi. +Sperimenta con questa opzione, se il tuo joystick soffre di drifting. +. +:CONFIG_AUTOFIRE +Continua a fare fuoco finch‚ tieni il bottone premuto. +. +:CONFIG_SWAP34 +Scambia il 3ř e il 4ř asse. Pu• essere utile per alcuni joystick. +. +:CONFIG_BUTTONWRAP +Abilita il wrapping dei pulsanti al numero di pulsanti emulati. +. +:CONFIG_CIRCULARINPUT +Abilita la traduzione dell'input circolare in output quadrato. +Prova ad abilitarlo se la tua levetta analogica sinistra pu• muoversi solo in +cerchio. +. +:CONFIG_DEADZONE +Percentuale di movimento da ignorare. +100 trasforma la levetta analogica in digitale. +. +:CONFIG_SERIAL1 +Imposta il tipo di dispositivo connesso alla porta com. +Pu• essere disabled, dummy, modem, nullmodem, directserial. +Eventuali parametri aggiuntivi devono essere sulla stessa riga nella forma di +[parametro:valore]. Un parametro per tutti i tipi Š 'irq' (facoltativo). +per directserial: realport (richiesto), rxdelay (facoltativo). + (realport:COM1 realport:ttyS0). +per modem: listenport (facoltativo). +per nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (tutti facoltativi). +Esempio: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +Fare riferimento alla sezione serial1. +. +:CONFIG_SERIAL3 +Fare riferimento alla sezione serial1. +. +:CONFIG_SERIAL4 +Fare riferimento alla sezione serial1. +. +:CONFIG_PHONEBOOKFILE +File utilizzato per mappare numeri di telefono falsi su indirizzi. +. +:CONFIG_XMS +Abilita supporto XMS. +. +:CONFIG_EMS +Abilita supporto EMS. L'impostazione predefinita (=true) fornisce la migliore +compatibilit…, ma alcune applicazioni possono funzionare meglio con +altre scelte, o richiedono che il supporto EMS sia disabilitato (=false) +per funzionare. +. +:CONFIG_UMB +Abilita supporto UMB. +. +:CONFIG_VER +Imposta la versione DOS (5.0 per impostazione predefinita). +Specificare come formato major.minor. +Un singolo numero viene considerato come la versione principale. +I parametri riconosciuti sono 3.3, 5.0, 6.22, e 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Codice linguaggio del layout tastiera (o 'none'). +. +:CONFIG_IPX +Abilita l'emulazione di ipx attraverso UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Le righe in questa sezione verranno eseguite ad ogni avvio. +Puoi inserire i tuoi comandi MOUNT qui. + +. +:CONFIGFILE_INTRO +# Questo Š il file di configurazione di dosbox-staging (%s). +# Le righe che iniziano con '#' sono commenti e sono ignorati da DOSBox. + +. +:CONFIG_SUGGESTED_VALUES +Valori Possibili +. +:PROGRAM_CONFIG_NOCONFIGFILE +Nessun file di configurazione caricato! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +File di configurazione primario: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +File di configurazione aggiuntivi: + +. +:PROGRAM_CONFIG_CONFDIR +Cartella di configurazione di DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Impossibile aprire il file %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Scrittura del file di configurazione in %s + +. +:PROGRAM_CONFIG_USAGE +Strumento di configurazione: +-writeconf o -wc senza parametro: scrive nel file di config. primario caricato. +-writeconf o -wc [nomefile]: scrive il file nella cartella di configurazione. +Usa -writelang o -wl [nomefile] per scrivere le stringhe della lingua corrente. +-r [parametri] + Riavvia DOSBox, utilizzando le impostazioni precedenti o quelle aggiunte. +-wcp [nomefile] + Scrive il file di config. nella cartella del programma, col nome dosbox.conf + o il nome del file specificato. +-wcd + Scrive nel file di config. predefinito nella cartella di configurazione. +-l elenca i parametri di configurazione. +-h, -help, -? sections / nome sezione / nome propriet… + Senza parametri, visualizza questa guida. Aggiungi "sections" per un elenco di + sezioni. Per info su sezione o propriet…, aggiungere il suo nome dopo -help. +-axclear pulisce la sezione autoexec. +-axadd [line] aggiunge una riga alla sezione autoexec. +-axtype stampa il contenuto della sezione autoexec. +-securemode passa alla modalit… sicura. +-avistart avvia la registrazione AVI. +-avistop interrompe la registrazione AVI. +-startmapper avvia il keymapper. +-get "sezione propriet…" restituisce il valore della propriet…. +-set "sezione propriet… = valore" imposta il valore. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Scopo della propriet… "%s" (contenuto nella sezione "%s"): +%s + +Valori Possibili: %s +Valore predefinito: %s +Valore corrente: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Scopo della sezione "%s": +%s +Valore corrente: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +Questa propriet… non pu• essere modificata mentre il programma Š in esecuzione. + +. +:PROGRAM_CONFIG_HLP_POSINT +Numero intero positivo. +. +:PROGRAM_CONFIG_HLP_SECTHLP +La sezione %s contiene le seguenti propriet…: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +La configurazione di DOSBox contiene le seguenti sezioni: + + +. +:PROGRAM_CONFIG_SECURE_ON +Modalit… sicura attivata. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Operazione non consentita in modalit… sicura. + +. +:PROGRAM_CONFIG_SECTION_ERROR +La sezione "%s" non esiste. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" non Š un valore valido per la propriet… %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Sezione o propriet… non trovata. + +. +:PROGRAM_CONFIG_NO_PROPERTY +La propriet… "%s" non Š presente nella sezione "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Sintassi corretta: config -set "sezione propriet… = valore". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Sintassi corretta: config -get "sezione propriet…". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox Š stato avviato con i seguenti parametri della riga di comando: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Parametro mancante. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROM trovati: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Unit… +. +:PROGRAM_MOUNT_STATUS_TYPE +Tipo +. +:PROGRAM_MOUNT_STATUS_LABEL +Etichetta +. +:PROGRAM_MOUNT_STATUS_2 +Unit… %c montata come %s + +. +:PROGRAM_MOUNT_STATUS_1 +Le unit… attualmente montate sono: + +. +:PROGRAM_MOUNT_ERROR_1 +La cartella %s non esiste. + +. +:PROGRAM_MOUNT_ERROR_2 +%s non Š una cartella + +. +:PROGRAM_MOUNT_ILL_TYPE +Tipo non valido %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Unit… %c gi… montata con %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +L'unit… %c non Š montata. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +L'unit… %c Š stata rimossa con successo. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Le unit… virtuali non possono essere smontate. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' non Š un identificatore di unit… valido. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montare c:\ Ô sconsigliato. Si raccomanda di montare una sottocartella. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Montare / Ô sconsigliato. Si raccomanda di montare una sottocartella. + +. +:PROGRAM_MOUNT_NO_OPTION +Attenzione: opzione '%s' non supportata e ignorata. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +Prima che sia possibile un reindirizzamento, Š necessario montare una +directory normale. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +Il reindirizzamento NON Š compatibile con l'unit… specificata. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +Il reindirizzamento deve essere specificato utilizzando lo stesso +indirizzamento dell'unit… sottostante. +Nessuna mescolanza di percorsi relativi e assoluti. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +La cartella di reindirizzamento non pu• essere la stessa dell'unit… sottostante + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Qualcosa Š andato storto. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Reindirizzamento %s nell'unit… %c montato. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Impossibile spostare l'unit… Z. L'unit… %c Š gi… montata. + +. +:PROGRAM_MEM_CONVEN +%10d kB di memoria convenzionale libera + +. +:PROGRAM_MEM_EXTEND +%10d kB di memoria estesa (XMS) libera + +. +:PROGRAM_MEM_EXPAND +%10d kB di memoria espansa (EMS) libera + +. +:PROGRAM_MEM_UPPER +%10d kB di memoria superiore (UMB) libera in %d blocchi +(blocco UMB pi— grande %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB allocati. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB liberati. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Memoria in uso liberata. + +. +:PROGRAM_LOADFIX_ERROR +Errore allocazione di memoria. + +. +:MSCDEX_SUCCESS +MSCDEX installato. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Fallimento: Le lettere di unit… di CD multipli devono essere contigue. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Fallimento: Non ancora supportato. + +. +:MSCDEX_ERROR_PATH +MSCDEX: Il percorso specificato non Š un'unit… CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Fallimento: file non valido o impossibile aprirlo. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Fallimento: troppe unit… CD-ROM (massimo: 5). +Installazione di MSCDEX non riuscita. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Sottocartella montata: supporto limitato. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Fallimento: Il file contiene errori o non Š un'immagine iso/cue. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Fallimento: Errore sconosciuto. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Avviso: si ignora l'opzione non supportata '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +La cache dell'unit… Š stata cancellata. + +. +:PROGRAM_INTRO +Benvenuto in DOSBox Staging, un emulatore di x86 con suono e grafica. +DOSBox crea una shell simile al vecchio DOS. + +Per informazioni sul montaggio delle unit… digita intro mount +Per informazioni sul supporto CD-ROM digita intro cdrom +Per informazioni sui tasti speciali digita intro special +Per ulteriori informazioni su DOSBox Staging, visita: +https://github.com/dosbox-staging/dosbox-staging/wiki + +In caso di errori, DOSBox si interromper… e terminer… senza preavvisi! + +. +:PROGRAM_INTRO_MOUNT_START +Ecco alcuni comandi utili per iniziare: +Prima di poter usare i file nel tuo filesystem, +Devi montare la directory che contiene i file. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosgames\ crea un'unit… C con i contenuti di c:\dosprog. ş +ş ş +ş c:\dosgames\ Š un esempio. Sostituiscilo con la tua cartella dei giochi. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosgames crea un'unit… C con i contenuti di ~/dosprog. ş +ş ş +ş ~/dosgames Š un esempio. Sostituiscilo con la tua cartella dei giochi. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +Dopo aver montato con successo il disco Š possibile digitare c: per spostarti +nella tua nuova unit… C. +Una volta qui, digita dir per visualizzarne il contenuto. +cd ti permette di spostarti all'interno di in una cartella +(riconoscibile dalle [] nell'elenco delle cartelle). +Puoi eseguire programmi/file con estensione .exe, .bat e .com. + +. +:PROGRAM_INTRO_CDROM +Come montare un'unit… CD-ROM virtuale in DOSBox: +DOSBox fornisce un'emulazione CD-ROM a vari livelli. + +Funziona su tutte le cartelle normali, viene installato MSCDEX e impostati +tutti i file in sola lettura. Di solito questo va bene per la maggior parte +dei giochi: + +mount D C:\esempio -t cdrom + +Se non funziona, potresti dover dire a DOSBox l'etichetta del CD-ROM: + +mount D C:\esempio -t cdrom -label ETICHETTA + +Inoltre, puoi usare imgmount per montare immagini iso o cue/bin: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Tasti speciali: +Questi sono i tasti predefiniti. +Possono essere modificati nel keymapper. + +Alt+Enter Passa dalla modalit… a schermo intero a quella a finestra + e viceversa. +Alt+Pause Mette in pausa/riavvia l'emulatore. +Ctrl+F1 Avvia il keymapper. +Ctrl+F4 Passa tra le immagini disco montate, aggiorna la cache della + cartella per tutte le unit…. +Ctrl+F5 Scatta un'istantanea dello schermo (screenshot). +Ctrl+F6 Avvia/ferma la registrazione dell'output audio su un file wave. +Ctrl+F7 Avvia/ferma la registrazione dell'output video su un file zmbv. +Ctrl+F9 Chiudi emulatore. +Ctrl+F10 Cattura/Rilascia il mouse. +Ctrl+F11 Rallenta l'emulazione (Decrementa i Cicli DOSBox). +Ctrl+F12 Accelera l'emulazione (Incrementa i Cicli DOSBox). +Alt+F12 Sblocca la velocit… (pulsante turbo/avanzamento rapido). + +. +:PROGRAM_BOOT_NOT_EXIST +Il file bootdisk non esiste. Fallimento. + +. +:PROGRAM_BOOT_NOT_OPEN +Impossibile aprire il file bootdisk. Fallimento. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Il file immagine Š di sola lettura! Potrebbe creare dei problemi. + +. +:PROGRAM_BOOT_PRINT_ERROR +Questo comando avvia DOSBox da un'immagine floppy o disco rigido. + +Per questo comando, si pu• specificare una successione di floppy disk +selezionabili premendo Ctrl+F4, e -l specifica l'unit… montata da cui eseguire +l'avvio. Se non viene specificata alcuna lettera di unit…, l'impostazione +predefinita prevede l'avvio dall'unit… A. +Le uniche lettere di unit… avviabili sono A, C, e D. Per l'avvio da un disco +rigido (C or D), l'immagine dovrebbe essere gi… stata montata utilizzando il +comando IMGMOUNT. + +La sintassi di questo comando Š: + +BOOT [imgdisco1.img imgdisco2.img] [-l letteraUnit…] + +. +:PROGRAM_BOOT_UNABLE +Impossibile avviare dall'unit… %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Apertura file immagine: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Impossibile aprire %s +. +:PROGRAM_BOOT_BOOT +Avvio dall'unit… %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Trovata cartuccia PCjr, ma la macchina non Š PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Comandi della cartuccia PCjr disponibili: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +Nessun comando della cartuccia PCjr trovato. +. +:PROGRAM_LOADROM_SPECIFY_FILE +Ô necessario specificare il file ROM da caricare. + +. +:PROGRAM_LOADROM_CANT_OPEN +File ROM inaccessibile. + +. +:PROGRAM_LOADROM_TOO_LARGE +File ROM troppo grande. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +BIOS video non supportato dal tipo di macchina. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +File ROM non riconosciuto. + +. +:PROGRAM_LOADROM_BASIC_LOADED +ROM BASIC caricata. + +. +:SHELL_CMD_IMGMOUNT_HELP +Monta un'immagine CD-ROM, floppy o disco su una lettera di unit…. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Monta un'immagine CD-ROM, floppy o disco su una lettera di unit…. + +Utilizzo: + imgmount UNITˇ CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount UNITˇ FILEIMMAGINE [FILEIMMAGINE2 [..]] [-fs fat] -t hdd|floppy + imgmount UNITˇ AVVIABILE [-fs fat|none] -t hdd -size GEOMETRIA + imgmount -u UNITˇ (smonta le immagini) + +Dove: + UNITˇ Š la lettera dell'unit… in cui verr… montata l'immagine: es. D + CDROM-SET Š un file ISO, CUE+BIN, CUE+ISO, o CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + FILEIMMAGINE Š un'immagine disco rigido o floppy in formato FAT16 o FAT12 + AVVIABILE Š un'immagine disco avviabile con GEOMETRIA -size specificata: + bytes-per-sector,sectors-per-head,heads,cylinders +Note: + - Ctrl+F4 scambia e monta il CDROM-SET o FILEIMMAGINE successivo se fornito. + +Esempi: + imgmount D /home/USERNAME/giochi/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A floppy1.img floppy2.img floppy3.img -t floppy + imgmount C ~/dos/disco_c.img -t hdd + imgmount C disco_avviabile.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +Monta una cartella del sistema operativo host su una lettera di unit…. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Monta una cartella del sistema operativo host su una lettera di unit…. + +Utilizzo: + mount UNITˇ CARTELLA [-t TIPO] [-freesize DIMENSIONE] [-label ETICHETTA] + mount -u UNITˇ (smonta le unit…) + +Dove: + UNITˇ Š la lettera dell' unit… in cui verr… montata la cartella: es. C + CARTELLA Š la cartella sul sistema operativo host da montare + TIPO tipo di directory da montare: 'dir', 'floppy', 'cdrom' o 'overlay' + DIMENSIONE spazio libero per l'unit… virtuale (KiB per floppy altrimenti MiB) + ETICHETTA nome etichetta dell'unit… da utilizzare + +Note: + - '-t overlay' reindirizza le scritture per l'unit… montata in un'altra + cartella. + - Ulteriori opzioni sono descritte nel manuale (file README, capitolo 4). + +Esempi: + mount C ~/giochidos + mount D "/media/USERNAME/Gioco CD" -t cdrom + mount C file_di_salvataggio -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Ô necessario specificare la lettera dell'unit… su cui montare l'immagine. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Ô necessario specificare il numero di unit… (0 o 3) su cui montare l'immagine +(0,1 = fda,fdb; 2,3 = hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Per le immagini CD-ROM: IMGMOUNT lettera-unit… posizione-immagine -t iso + +Per le immagini disco rigido: Ô necessario specificare la geometria dell'unit…: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT lettera-unit… posizione-immagine -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Impossibile caricare il file immagine. +Verifica che il percorso sia corretto e che l'immagine sia accessibile. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Impossibile estrarre la geometria dell'unit… dall'immagine. +Utilizzare il parametro -size bps,spc,hpc,cyl per specificare la geometria. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Il tipo '%s' non Š supportato. Specifica 'floppy', 'hdd', 'cdrom', o 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Il Formato "%s" non Š supportato. Specifica "fat", "iso" o "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Devi specificare il file immagine da montare. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +File immagine non trovato. + +. +:PROGRAM_IMGMOUNT_MOUNT +Per montare le cartelle, usa il comando MOUNT, non il comando IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Unit… gi… montata con quella lettera. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Impossibile creare l'unit… dal file. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Unit… numero %d montata come %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +L'immagine deve trovarsi su un'unit… host o locale. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +L'uso di file multipli Š supportato solo per le immagini cue/iso. + +. +:PROGRAM_KEYB_INFO +Tabella codici %i caricata + +. +:PROGRAM_KEYB_INFO_LAYOUT +Tabella codici %i caricata per il layout %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID layout tastiera[ numero tabella codici[ file tabella codici]]] + +Alcuni esempi: + KEYB: Visualizza la tabella codici attualmente caricata. + KEYB sp: Carica il layout spagnolo (SP) usando una tabella codici appropriata. + KEYB sp 850: Carica il layout spagnolo (SP) usando la tabella codici 850. + KEYB sp 850 mycp.cpi: Come sopra, ma usa il file mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Layout tastiera %s caricato con tabella codici %i + +. +:PROGRAM_KEYB_FILENOTFOUND +File di tastiera %s non trovato. + + +. +:PROGRAM_KEYB_INVALIDFILE +File di tastiera %s non valido. + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Impossibile trovare il layout %s per la tabella codici %i. + +. +:PROGRAM_KEYB_INVCPFILE +File tabella codici mancante o non valido per il layout %s. + + +. +:SHELL_ILLEGAL_PATH +Percorso non valido. + +. +:SHELL_CMD_HELP +Per una lista di tutti i comandi supportati digita help /all . +Segue una breve lista dei comandi pi— comuni: + +. +:SHELL_CMD_ECHO_ON +ECHO attivato. + +. +:SHELL_CMD_ECHO_OFF +ECHO disattivato. + +. +:SHELL_ILLEGAL_SWITCH +Opzione non valida: %s. + +. +:SHELL_MISSING_PARAMETER +Parametro richiesto mancante. + +. +:SHELL_CMD_CHDIR_ERROR +Impossibile spostarsi su: %s. + +. +:SHELL_CMD_CHDIR_HINT +Suggerimento: Per spostarsi su un'altra unit…, digita %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +il nome della cartella Š pi— lungo di 8 caratteri e/o contiene spazi. +Prova cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Sei ancora nell'unit… Z:, passa ad un'unit… montata con C:. + +. +:SHELL_CMD_DATE_HELP +Visualizza o imposta la data. + +. +:SHELL_CMD_DATE_ERROR +La data specificata non Š corretta. + +. +:SHELL_CMD_DATE_DAYS +3DomLunMarMerGioVenSab +. +:SHELL_CMD_DATE_NOW +Data corrente: +. +:SHELL_CMD_DATE_SETHLP +Digita 'date MM-GG-AAAA' per cambiare. + +. +:SHELL_CMD_DATE_FORMAT +M/G/A +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-GG-AAAA] + MM-GG-AAAA: nuova data da impostare + /S: Usa permanentemente l'ora e la data dell'host come ora del DOS + /F: Torna all'ora interna di DOSBox (contrario di /S) + /T: Visualizza solo la data + /H: Sincronizza con l'host + +. +:SHELL_CMD_TIME_HELP +Visualizza o imposta l'ora di sistema. + +. +:SHELL_CMD_TIME_NOW +Ora attuale: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Visualizza solo l'ora + /H: Sincronizza con l'host + +. +:SHELL_CMD_MKDIR_ERROR +Impossibile creare: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Impossibile rimuovere: %s. + +. +:SHELL_CMD_DEL_ERROR +Impossibile eliminare: %s. + +. +:SHELL_SYNTAXERROR +La sintassi del comando non Š corretta. + +. +:SHELL_CMD_SET_NOT_SET +Variabile di ambiente %s non definita. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Spazio di ambiente insufficiente. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Manca il nome del file. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Manca il numero. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Numero non valido. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Non Š stata fornita una etichetta al comando GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Impossibile trovare l'etichetta %s. + +. +:SHELL_CMD_FILE_NOT_FOUND +File %s non trovato. + +. +:SHELL_CMD_FILE_EXISTS +File %s gi… esistente. + +. +:SHELL_CMD_DIR_VOLUME + Il volume nell'unit… %c Š %s + +. +:SHELL_CMD_DIR_INTRO + Directory di %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d File %21s byte + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d Directory %21s byte disponibili + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Unit… %c inesistente! +Prima devi montarla mount. Digita intro o intro mount per altre informazioni. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Comando non valido: %s. + +. +:SHELL_CMD_PAUSE +Premere un tasto per continuare... +. +:SHELL_CMD_PAUSE_HELP +Aspetta la pressione di un tasto per continuare. + +. +:SHELL_CMD_COPY_FAILURE +Errore durante la copia : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d File copiato/i. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Impossibile rimuovere, unit… non in uso. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST fallito. Hai commesso un errore nella riga di comando o l'unit… di +destinazione Š gi… in uso. Ô possibile utilizzare SUBST solo su unit… locali. +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Benvenuto in DOSBox Staging %-40s ş +ş ş +ş Per una breve introduzione per i nuovi utenti, digita: INTRO ş +ş Per la lista dei comandi della shell supportati, digita: HELP ş +ş ş +ş Per regolare la velocit… della CPU emulata, usa Ctrl+F11 e Ctrl+F12. ş +ş Per attivare il keymapper, usa Ctrl+F1. ş +ş Ulteriori informazioni nel file README nella cartella di DOSBox. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox supporta la modalit… CGA Composita. ş +ş Usa F12 per impostare l'uscita composita su ON, OFF o AUTO ş +ş (impostazione predefinita). ş +ş Alt+F11 cambia tonalit…; Ctrl+Alt+F11 seleziona il modello CGA. ş +ş ş + +. +:SHELL_STARTUP_CGA_MONO +ş Usa F11 per scorrere le modalit… verde, ambra, bianco e bianco-carta,ş +ş e Alt+F11 per modificare le impostazioni di contrasto/luminosit…. ş + +. +:SHELL_STARTUP_HERC +ş Usa F11 per scorrere i colori monocromatici bianco, ambra e verde. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Premi Alt+Pause per avviare il debugger o avvia l'exe con DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş https://dosbox-staging.github.io ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Visualizza/cambia la directory corrente. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [unit…:][percorso] +CHDIR [..] +CD [unit…:][percorso] +CD [..] + + .. Indica che si desidera passare alla directory padre. + +Scrivi CD [unit…:] per mostrare la directory corrente nell'unit… specificata. +Scrivi CD senza parametri per visualizzare l'unit… e la directory correnti. + +. +:SHELL_CMD_CLS_HELP +Cancella lo schermo. + +. +:SHELL_CMD_DIR_HELP +Visualizza un elenco di file e sottodirectory in una directory. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [unit…:][percorso][nomefile] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [unit…:][percorso][nomefile] + Specifica unit…, directory e/o file da elencare. + /W Visualizza in formato ampio. + /B Utilizza un formato semplice (no intestazione o riepilogo). + /P Mostra elenco una schermata per volta. + /AD Visualizza tutte le directory. + /A-D Visualizza tutti i file. + /O Elenca file ordinandoli. + - Prefisso per invertire l'ordinamento + ordinamento N Per nome, alfabetico S Per dimensione, dal minore + E Per estensione, alfabetico D Per data e ora dal pi— vecchio + +. +:SHELL_CMD_ECHO_HELP +Visualizza messaggi e attiva/disattiva la ripetizione dei comandi. + +. +:SHELL_CMD_EXIT_HELP +Esci dalla shell. + +. +:SHELL_CMD_HELP_HELP +Visualizza la guida. + +. +:SHELL_CMD_MKDIR_HELP +Crea una cartella. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [unit…:][percorso] +MD [unit…:][percorso] + +. +:SHELL_CMD_RMDIR_HELP +Rimuove una cartella. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [unit…:][percorso] +RD [unit…:][percorso] + +. +:SHELL_CMD_SET_HELP +Visualizza, imposta o rimuove le variabili d'ambiente. + +. +:SHELL_CMD_IF_HELP +Esegue un'elaborazione condizionale in programmi batch. + +. +:SHELL_CMD_GOTO_HELP +Salta a una riga etichettata in uno script batch. + +. +:SHELL_CMD_SHIFT_HELP +Cambia la posizione dei parametri sostituibili in un file batch. + +. +:SHELL_CMD_TYPE_HELP +Visualizza il contenuto di uno o pi— file di testo. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [unit…:][percorso]nomefile + +. +:SHELL_CMD_REM_HELP +Registra dei commenti (note) in un file batch. + +. +:SHELL_CMD_REM_HELP_LONG +REM [commento] + +. +:SHELL_CMD_NO_WILD +Questa Š una versione semplificata del comando, non puoi usare asterischi! + +. +:SHELL_CMD_RENAME_HELP +Rinomina uno o pi— file. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [unit…:][percorso]nomefile1 nomefile2. +REN [unit…:][percorso]nomefile1 nomefile2. + +Non puoi specificare una nuova unit… o percorso per il file di destinazione. + +. +:SHELL_CMD_DELETE_HELP +Elimina uno o pi— file. + +. +:SHELL_CMD_COPY_HELP +Copia uno o pi— file in un'altra posizione. + +. +:SHELL_CMD_CALL_HELP +Richiama un programma batch da un altro programma batch. + +. +:SHELL_CMD_SUBST_HELP +Associa un percorso ad una lettera di unit…. + +. +:SHELL_CMD_LOADHIGH_HELP +Carica un programma in memoria superiore (xms=true, umb=true). + +. +:SHELL_CMD_LS_HELP +Elenca il contenuto della cartella. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [MODELLO] + +. +:SHELL_CMD_LS_PATH_ERR +ls: impossibile accedere a '%s': Percorso o file non trovato. + +. +:SHELL_CMD_CHOICE_HELP +Attende la pressione di un tasto e imposta ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:scelte] [/N] [/S] testo + /C[:]scelte - Specifica le scelte consentite. L'elenco predefinito Š: YN. + /N - Nasconde l'elenco delle scelte nel prompt. + /S - Abilita le scelte con distinzione tra maiuscole e minuscole + text - Specifica il messaggio da visualizzare prima del prompt. + +. +:SHELL_CMD_ATTRIB_HELP +Non fa nulla. Fornito per compatibilit…. + +. +:SHELL_CMD_PATH_HELP +Fornito per compatibilit…. + +. +:SHELL_CMD_VER_HELP +Visualizza o imposta la versione DOS. + +. +:SHELL_CMD_VER_HELP_LONG +Utilizzo: + ver + ver set VERSIONE + +Dove: + VERSIONE pu• essere un numero intero, ad esempio 5, o includere un valore + decimale a due cifre, ad esempio: 6.22, 7.01, o 7.10. + In alternativa, il valore decimale pu• essere separato da spazi, + ad esempio: 6 22, 7 01, o 7 10. +Note: + La versione DOS pu• anche essere impostata nel file di configurazione nella + sezione [dos] usando l'impostazione "ver = VERSIONE". + +Esempi: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging versione %s +DOS versione %d.%02d + +. +:SHELL_CMD_VER_INVALID +La versione DOS specificata non Š corretta. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/pl/pl_PL.CP437.lng dosbox-staging-0.77.0/contrib/translations/pl/pl_PL.CP437.lng --- dosbox-staging-0.76.0/contrib/translations/pl/pl_PL.CP437.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/pl/pl_PL.CP437.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1424 @@ +:CONFIG_FULLSCREEN +Wlacz DOSBoxa na pelnym ekranie. +Wcisnij Alt+Enter aby przelaczyc sie do okna. +. +:CONFIG_DISPLAY +Numer ekranu do uzycia; wartosc zalezy od ustawien uzytkownika. +. +:CONFIG_VSYNC +Vertical sync setting not implemented (setting ignored) +. +:CONFIG_FULLRESOLUTION +Jakiej rozdzielczosci uzyc w pelnym ekranie: 'original', 'desktop', +lub dokladna rozdzielczosc (np. 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Ustaw wielkosc okna w trybie okienkowym: + default: Wybierz najlepsza opcje dla twojego + srodowiska. + original: Zmien wielkosc okna do rozdzielczosci wybranej przez + emulowany program. + resizable: Ustaw okno o zmiennej wielkosci. + To jest eksperymentalna opcja, dziala tylko z + output=opengl i glshader=sharp (lub none) + : Skaluj zawartosc okna do wybranej wielkosci, uzyj + wielkosci w formacie XxY, na przyklad: 1024x768. + Skalowanie nie dziala dla output=surface. +. +:CONFIG_OUTPUT +What video system to use for output. +. +:CONFIG_TEXTURE_RENDERER +Choose a renderer driver when using a texture output mode. +Use texture_renderer=auto for an automatic choice. +. +:CONFIG_CAPTURE_MOUSE +Wybierz tryb zachowanie myszy: + onclick: Kursor myszy zostanie zlapany przy pierwszym kliknieciu + w obszarze okna. + onstart: Kursor myszy zostanie zlapany na starcie + (jak w prawdziwym DOS). + seamless: Kursor moze swobodnie opuscic okno DOSBoxa + i nie bedzie zlapany. + nomouse: Emulacja myszy jest wylaczona. +Wybierz jaka role pelni srodkowy przycisk myszy (drugi parametr): + middlegame: Klikniecie srodkowym przyciskiem jest wyslane do gry + (Ctrl+F10 puszcza mysz). + middlerelease: Klikniecie srodkowym przyciskiem puszcza mysz + (zdarzenie nie bedzie wyslane do gry). + W pelnym ekranie lub w trybie 'seamless' klikniecie + zostanie wyslane do gry. + Ctrl+F10 r˘wniez puszcza mysz. +Domyslne ustawienie to: seamless middlerelease +. +:CONFIG_SENSITIVITY +Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Enable this setting to bypass your operating system's mouse +acceleration and sensitivity settings. This works in +fullscreen or when the mouse is captured in window mode. +. +:CONFIG_WAITONERROR +Zatrzymuje przed zamknieciem konsoli, jesli dosbox zglosil blad. +. +:CONFIG_PRIORITY +Priorytety dla DOSBoxa. Druga wartosc po przecinku dotyczy okna DOSBoxa, kt˘re jest +nieaktywne/zminimalizowane. Wartosci 'pause' mozna uzywac tylko na drugiej pozycji. +. +:CONFIG_MAPPERFILE +Plik uzywany do wczytywania/zapisywania skr˘t˘w klawiszowych. +. +:CONFIG_SCREENSAVER +Use 'allow' or 'block' to override the SDL_VIDEO_ALLOW_SCREENSAVER +environment variable (which usually blocks the OS screensaver +while the emulator is running). +. +:CONFIG_LANGUAGE +Wybiera inny plik jezykowy. +. +:CONFIG_MACHINE +Typ maszyny, kt˘ry DOSBox pr˘buje nasladowac. +. +:CONFIG_CAPTURES +Katalog, w kt˘rym sa przechowywane przechwycone pliki wave, midi oraz zrzuty ekranu. +. +:CONFIG_MEMSIZE +Rozmiar pamieci DOSBoxa w megabajtach. +Tej wartosci lepiej nie zmieniac aby uniknac problem˘w z niekt˘rymi grami, +choc czasem gry moga wymagac wiekszej wartosci. +Generalnie podniesienie tej wartosci nie powoduje przyspieszenia. +. +:CONFIG_STARTUP_VERBOSITY +Controls verbosity prior to displaying the program: + | Splash | Welcome | Early stdout +high | yes | yes | yes +medium | no | yes | yes +low | no | no | yes +quiet | no | no | no +splash_only | yes | no | no +auto | 'low' if exec or dir is passed, otherwise 'high' +. +:CONFIG_FRAMESKIP +Jak wiele klatek DOSBox pomija zanim jakas narysuje. +. +:CONFIG_ASPECT +Scales the vertical resolution to produce a 4:3 display aspect +ratio, matching that of the original standard-definition monitors +for which the majority of DOS games were designed. This setting +only affects video modes that use non-square pixels, such as +320x200 or 640x400; where as square-pixel modes, such as 640x480 +and 800x600, will be displayed as-is. +. +:CONFIG_MONOCHROME_PALETTE +Select default palette for monochrome display. +Works only when emulating hercules or cga_mono. +You can also cycle through available colours using F11. +. +:CONFIG_SCALER +Scaler used to enlarge/enhance low resolution modes. +If 'forced' is appended, then the scaler will be used even if +the result might not be desired. +Note that some scalers may use black borders to fit the image +within your configured display resolution. If this is +undesirable, try either a different scaler or enabling +fullresolution output. +. +:CONFIG_GLSHADER +Either 'none' or a GLSL shader name. Works only with +OpenGL output. Can be either an absolute path, a file +in the 'glshaders' subdirectory of the DOSBox +configuration directory, or one of the built-in shaders: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (default). +. +:CONFIG_CORE +CPU Core used in emulation. auto will switch to dynamic if available and +appropriate. +. +:CONFIG_CPUTYPE +CPU Type used in emulation. auto is the fastest choice. +. +:CONFIG_CYCLES +Amount of instructions DOSBox tries to emulate each millisecond. +Setting this value too high results in sound dropouts and lags. +Cycles can be set in 3 ways: + 'auto' tries to guess what a game needs. + It usually works, but can fail for certain games. + 'fixed #number' will set a fixed amount of cycles. This is what you usually + need if 'auto' fails (Example: fixed 4000). + 'max' will allocate as much cycles as your computer is able to + handle. +. +:CONFIG_CYCLEUP +Liczba cykli o kt˘ra wartosc zwieksza/zmniejsza kombinacja klawiszy. (Ctrl+F11/Ctrl+F12) +. +:CONFIG_CYCLEDOWN +Wartosc mniejsza niz 100 jest traktowana jako ustawienie zmiany procentowej. +. +:CONFIG_NOSOUND +Wlacz tryb cichy (dzwiek nadal jest emulowany). +. +:CONFIG_RATE +Czestotliwosc pr˘bkowania miksera, ustawienie czestotliwosci urzadzenia ponad te wartosc prawdopodobnie obnizy jakosc dzwieku. +. +:CONFIG_BLOCKSIZE +Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged. +. +:CONFIG_PREBUFFER +How many milliseconds of data to keep on top of the blocksize. +. +:CONFIG_MIDIDEVICE +Device that will receive the MIDI data (from the emulated MIDI +interface - MPU-401). Choose one of the following: +'fluidsynth', to use the built-in MIDI synthesizer. See the + [fluidsynth] section for detailed configuration. +'mt32', to use the built-in Roland MT-32 synthesizer. + See the [mt32] section for detailed configuration. +'auto', to use the first working external MIDI player. This + might be a software synthesizer or physical device. +. +:CONFIG_MIDICONFIG +Configuration options for the selected MIDI interface. +This is usually the id or name of the MIDI synthesizer you want +to use (find the id/name with DOS command 'mixer /listmidi'). +- This option has no effect when using the built-in synthesizers + (mididevice = fluidsynth or mt32). +- When using ALSA, use Linux command 'aconnect -l' to list open + MIDI ports, and select one (for example 'midiconfig=14:0' + for sequencer client 14, port 0). +- If you're using a physical Roland MT-32 with revision 0 PCB, + the hardware may require a delay in order to prevent its + buffer from overflowing. In that case, add 'delaysysex', + for example: 'midiconfig=2 delaysysex'. +See the README/Manual for more details. +. +:CONFIG_MPU401 +Typ emulowanego MPU-401. +. +:CONFIG_SOUNDFONT +Path to a SoundFont file in .sf2 format. You can use an +absolute or relative path, or the name of an .sf2 inside +the 'soundfonts' directory within your DOSBox configuration +directory. +An optional percentage will scale the SoundFont's volume. +For example: 'soundfont.sf2 50' will attenuate it by 50 percent. +The scaling percentage can range from 1 to 500. +. +:CONFIG_MODEL +Model of synthesizer to use. The default (auto) prefers CM-32L +if both sets of ROMs are provided. For early Sierra games and Dune 2 +it's recommended to use 'mt32', while newer games typically made +use of the CM-32L's extra sound effects (use 'auto' or 'cm32l') +. +:CONFIG_ROMDIR +The directory containing one or both pairs of MT-32 and/or CM-32L ROMs. +The files must be named in capitals, as follows: + - MT-32 ROM pair: MT32_CONTROL.ROM and MT32_PCM.ROM + - CM-32L ROM pair: CM32L_CONTROL.ROM and CM32L_PCM.ROM +The directory can be absolute or relative, or leave it blank to +use the 'mt32-roms' directory in your DOSBox configuration +directory, followed by checking other common system locations. +. +:CONFIG_SBTYPE +Typ emulowanego Sound Blastera 'gb' to Game Blaster. +. +:CONFIG_SBBASE +Adres We/Wy (I/O) Sound Blastera. +. +:CONFIG_IRQ +Numer IRQ Sound Blastera. +. +:CONFIG_DMA +Numer DMA Sound Blastera. +. +:CONFIG_HDMA +Numer HDMA Sound Blastera. +. +:CONFIG_SBMIXER +Allow the Sound Blaster mixer to modify the DOSBox mixer. +. +:CONFIG_OPLRATE +oplrate is deprecated. The OPL waveform is now sampled + at the mixer's playback rate to avoid resampling. +. +:CONFIG_OPLMODE +Type of OPL emulation. On 'auto' the mode is determined by 'sbtype'. +All OPL modes are AdLib-compatible, except for 'cms'. +. +:CONFIG_OPLEMU +Provider for the OPL emulation. 'compat' provides better quality, +'nuked' is the default and most accurate (but the most CPU-intensive). +. +:CONFIG_GUS +Wlacz emulacje karty Gravis UltraSound. +. +:CONFIG_GUSBASE +Bazowe adres We/Wy karty Gravis UltraSound. +. +:CONFIG_GUSIRQ +Numer IRQ karty Gravis UltraSound. +. +:CONFIG_GUSDMA +Kanal DMA karty Gravis UltraSound. +. +:CONFIG_ULTRADIR +Sciezka do katalogu UltraSound. W tym katalogu +powinien znajdowac sie katalog MIDI, zawierajacy +patche dla emulacji MIDI przez GUS. Zestawy patchy +uzywane z Timidity powinny dzialac dobrze. +. +:CONFIG_PCSPEAKER +Wlacz emulacje PC-Speakera. +. +:CONFIG_PCRATE +Czestotliwosc pr˘bkowania dzwieku generowanego przez PC-Speakera. +. +:CONFIG_ZERO_OFFSET +Neutralizes and prevents the PC speaker's DC-offset from harming other sources. +'auto' enables this for non-Windows systems and disables it on Windows. +If your OS performs its own DC-offset correction, then set this to 'false'. +. +:CONFIG_TANDY +Wlacz emulacje Tandy Sound System. Przy 'auto' emulacja odbywa sie tylko jesli maszyna jest ustawiona na 'tandy'.. +. +:CONFIG_TANDYRATE +Czestotliwosc pr˘bkowania Tandy 3-Voice. +. +:CONFIG_DISNEY +Wlacza emulacje Disney Sound Source. (kompatybilne z Covox Voice Master oraz Covox Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Type of joystick to emulate: auto (default), +none (disables joystick emulation), +2axis (supports two joysticks), +4axis (supports one joystick, first joystick used), +4axis_2 (supports one joystick, second joystick used), +fcs (Thrustmaster), ch (CH Flightstick). +auto chooses emulation depending on real joystick(s). +(Remember to reset DOSBox's mapperfile if you saved it earlier) +. +:CONFIG_TIMED +enable timed intervals for axis. Experiment with this option, if your joystick drifts (away). +. +:CONFIG_AUTOFIRE +continuously fires as long as you keep the button pressed. +. +:CONFIG_SWAP34 +swap the 3rd and the 4th axis. Can be useful for certain joysticks. +. +:CONFIG_BUTTONWRAP +enable button wrapping at the number of emulated buttons. +. +:CONFIG_CIRCULARINPUT +enable translation of circular input to square output. +Try enabling this if your left analog stick can only move in a circle. +. +:CONFIG_DEADZONE +the percentage of motion to ignore. 100 turns the stick into a digital one. +. +:CONFIG_SERIAL1 +set type of device connected to com port. +Can be disabled, dummy, modem, nullmodem, directserial. +Additional parameters must be in the same line in the form of +parameter:value. Parameter for all types is irq (optional). +for directserial: realport (required), rxdelay (optional). + (realport:COM1 realport:ttyS0). +for modem: listenport (optional). +for nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (all optional). +Example: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +see serial1 +. +:CONFIG_SERIAL3 +see serial1 +. +:CONFIG_SERIAL4 +see serial1 +. +:CONFIG_PHONEBOOKFILE +File used to map fake phone numbers to addresses. +. +:CONFIG_XMS +Wlacz obsluge XMS. +. +:CONFIG_EMS +Enable EMS support. The default (=true) provides the best +compatibility but certain applications may run better with +other choices, or require EMS support to be disabled (=false) +to work at all. +. +:CONFIG_UMB +Wlacz obsluge UMB. +. +:CONFIG_VER +Set DOS version (5.0 by default). Specify as major.minor format. +A single number is treated as the major version. +Common settings are 3.3, 5.0, 6.22, and 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Kod jezyka ukladu klawiatury (lub none). +. +:CONFIG_IPX +Wlacz emulacje IPX po UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Linie w tej sekcji zostana uruchomione przy starcie. +Mozesz umiescic tu np. komendy MOUNT. + +. +:CONFIGFILE_INTRO +# To jest plik konfiguracyjny dla dosbox-staging (%s). +# Linie zaczynajace sie od # sa komentarzami. +. +:CONFIG_SUGGESTED_VALUES +Mozliwe wartosci. +. +:PROGRAM_CONFIG_NOCONFIGFILE +No config file loaded! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Primary config file: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Additional config files: + +. +:PROGRAM_CONFIG_CONFDIR +Katalog z konfiguracja DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Nie mozna otworzyc pliku %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Writing config file %s + +. +:PROGRAM_CONFIG_USAGE +Config tool: +-writeconf or -wc without parameter: write to primary loaded config file. +-writeconf or -wc with filename: write file to config directory. +Use -writelang or -wl filename to write the current language strings. +-r [parameters] + Restart DOSBox, either using the previous parameters or any that are appended. +-wcp [filename] + Write config file to the program directory, dosbox.conf or the specified + filename. +-wcd + Write to the default config file in the config directory. +-l lists configuration parameters. +-h, -help, -? sections / sectionname / propertyname + Without parameters, displays this help screen. Add "sections" for a list of + sections. For info about a specific section or property add its name behind. +-axclear clears the autoexec section. +-axadd [line] adds a line to the autoexec section. +-axtype prints the content of the autoexec section. +-securemode switches to secure mode. +-avistart starts AVI recording. +-avistop stops AVI recording. +-startmapper starts the keymapper. +-get "section property" returns the value of the property. +-set "section property=value" sets the value. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Purpose of property "%s" (contained in section "%s"): +%s + +Possible Values: %s +Default value: %s +Current value: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Purpose of section "%s": +%s +Current value: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +This property cannot be changed at runtime. + +. +:PROGRAM_CONFIG_HLP_POSINT +positive integer +. +:PROGRAM_CONFIG_HLP_SECTHLP +Section %s contains the following properties: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +DOSBox configuration contains the following sections: + + +. +:PROGRAM_CONFIG_SECURE_ON +Przelaczono w tryb bezpieczny. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Ta operacja nie jest mozliwa w trybie bezpiecznym. + +. +:PROGRAM_CONFIG_SECTION_ERROR +Sekcja %s nie istnieje. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" nie jest poprawna wartoscia parametru %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Brak takiej sekcji lub parametru. + +. +:PROGRAM_CONFIG_NO_PROPERTY +Brak parametru %s w sekcji %s. + +. +:PROGRAM_CONFIG_SET_SYNTAX +Poprawna skladnia: config -set "sekcja parametr". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Poprawna skladnia: config -get "sekcja parametr". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox was started with the following command line parameters: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Zabraklo parametru. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +Znalezione CD-ROMy: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Dysk +. +:PROGRAM_MOUNT_STATUS_TYPE +Typ +. +:PROGRAM_MOUNT_STATUS_LABEL +Etykieta +. +:PROGRAM_MOUNT_STATUS_2 +Dysk %c jest zamontowany jako %s + +. +:PROGRAM_MOUNT_STATUS_1 +Zamontowane dyski: + +. +:PROGRAM_MOUNT_ERROR_1 +Katalog %s nie istnieje. + +. +:PROGRAM_MOUNT_ERROR_2 +%s nie jest katalogiem + +. +:PROGRAM_MOUNT_ILL_TYPE +Nieprawidlowy typ %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Dysk %c jest juz zamontowany jako %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Dysk %c nie jest zamontowany. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Dysk %c zostal pomyslnie odmontowany. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Dyski wirtualne nie moga zostac odmontowane. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' nie jest prawidlowym identyfikatorem dysku. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montowanie dysku C:\ nie jest zalecane. Prosze nastepnym razem zamontowac (pod)katalog. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Montowanie katalogu / nie jest zalecane.Prosze nastepnym razem zamontowac (pod)katalog. + +. +:PROGRAM_MOUNT_NO_OPTION +Warning: Ignoring unsupported option '%s'. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +A normal directory needs to be MOUNTed first before an overlay can be added on top. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +The overlay is NOT compatible with the drive that is specified. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +The overlay needs to be specified using the same addressing as the underlying drive. No mixing of relative and absolute paths. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +The overlay directory can not be the same as underlying drive. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Cos poszlo nie tak. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Overlay %s on drive %c mounted. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Nie mozna przeniesc dysku Z. Dysk %c jest juz zamontowany. + +. +:PROGRAM_MEM_CONVEN +%10d kB wolnej pamieci konwencjonalnej + +. +:PROGRAM_MEM_EXTEND +%10d kB wolnej pamieci rozszerzonej + +. +:PROGRAM_MEM_EXPAND +%10d kB wolnej pamieci stronicowej + +. +:PROGRAM_MEM_UPPER +%10d kB wolnej pamieci g˘rnej w %d blokach (najwiekszy blok %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB zaalokowanych. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB zwolnionych. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Uzyta pamiec zwolniona. + +. +:PROGRAM_LOADFIX_ERROR +Blad alokacji pamieci. + +. +:MSCDEX_SUCCESS +MSCDEX zainstalowany. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Blad: Litery dysk˘w wielu naped˘w CD-ROM musza nastepowac po sobie. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Blad: jeszcze nie obslugiwane. + +. +:MSCDEX_ERROR_PATH +MSCDEX: Blad: Podana sciezka nie prowadzi do napedu CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Blad: Nieprawidlowy plik lub brak dostepu. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Blad: Za duzo naped˘w CD-ROM (maksymalnie: 5). Instalacja MSCDEX nieudana. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Zamontowano podkatalog: ograniczone wsparcie. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Blad: Plik nie jest obrazem ISO/CUE lub zawiera bledy. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Blad: Nieznany blad. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Ostrzezenie: Zignorowano niewspierana opcje '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +Pamiec podreczna dysku wyczyszczona. + +. +:PROGRAM_INTRO +Witaj w DOSBox Staging, emulatorze x86 z dzwiekiem i grafika. +DOSBox tworzy dla Ciebie powloke, kt˘ry wyglada jest stary, prosty DOS. + +Informacje o montowaniu dysk˘w, wpisz: intro mount +Informacje o wsparciu dla CD-ROM, wpisz: intro cdrom +Informacje o klawiszach specjalnych, wpisz: intro special +Wiecej informacji o DOSBox Staging znajdziesz na wiki: +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox zatrzyma/wylaczy sie bez ostrzezenia jesli wystapi blad! + +. +:PROGRAM_INTRO_MOUNT_START +Here are some commands to get you started: +Before you can use the files located on your own filesystem, +You have to mount the directory containing the files. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ utworzy dysk C z c:\dosprog jako zawartoscia. ş +ş ş +ş c:\dosprog\ to przyklad. Zamien go na Tw˘j wlasny katalog z grami.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprog utworzy dysk C z ~/dosprog jako zawartoscia. ş +ş ş +ş ~/dosprog to przyklad. Zamien go na Tw˘j wlasny katalog z grami.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +When the mount has successfully completed you can type c: to go to your freshly +mounted C-drive. Typing dir there will show its contents. cd will allow you to +enter a directory (recognised by the [] in a directory listing). +You can run programs/files which end with .exe .bat and .com. + +. +:PROGRAM_INTRO_CDROM +How to mount a virtual CD-ROM Drive in DOSBox: +DOSBox provides CD-ROM emulation on several levels. + +This works on all normal directories, installs MSCDEX and marks the files +read-only. Usually this is enough for most games: + +mount D C:\example -t cdrom + +If it doesn't work you might have to tell DOSBox the label of the CD-ROM: + +mount D C:\example -t cdrom -label CDLABEL + +Additionally, you can use IMGMOUNT to mount ISO images or CUE files: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Klawisze specjalne: +Domyslne skr˘ty klawiaturowe. +Moga zostac zmienione narzedziem keymapper. + +Alt+Enter Przejdz do trybu pelnoekranowego i z powrotem. +Alt+Pauza Zapauzuj emulator. +Ctrl+F1 Uruchom keymappera. +Ctrl+F4 Zamien zamontowany obraz dysku. Aktualizuj pamiec podreczna zamontowanego katalogu. +Ctrl+F5 Zr˘b zrzut ekranu. +Ctrl+F6 Rozpocznij/zatrzymaj nagrywanie audio do pliku wave. +Ctrl+F7 Rozpocznij/zatrzymaj nagrywanie wideo do pliku zmbv. +Ctrl+F9 Wylacz emulator. +Ctrl+F10 Przechwyc/zwolnij myszke. +Ctrl+F11 Spowolnij emulacje. +Ctrl+F12 Przyspiesz emulacje. +Alt+F12 Uwolnij predkosc (przycisk "turbo" / przyspiesz). + +. +:PROGRAM_BOOT_NOT_EXIST +Bootdisk file does not exist. Failing. + +. +:PROGRAM_BOOT_NOT_OPEN +Cannot open bootdisk file. Failing. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Plik obrazu jest tylko do odczytu! Moze to spowodowac problemy. + +. +:PROGRAM_BOOT_PRINT_ERROR +Ta komenda bootuje DOSBoxa z dyskietki lub obrazu dysku twardego. + +Do tej komendy mozna wlaczyc wyb˘r kolejnosci dysk˘w +kombinacja klawiszy Ctrl+F4, wtedy opcja -l okresla zamontowany dysk do zbootowania. +Jesli nie podano litery dysku, domyslnie bootowany jest dysk A. +Jedynymi literami bootowalnych dysk˘w sa litery A, C i D. Aby zbootowac z dysku +twardego (C lub D), obraz powinien byc zamontowany komenda +IMGMOUNT. + +Skladnia tej komendy jest nastepujaca: + +BOOT [obrazdysku1.img obrazdysku1.img] [-l literadysku] + +. +:PROGRAM_BOOT_UNABLE +Nie udalo sie zbootowac z dysku %c. + +:PROGRAM_BOOT_IMAGE_OPEN +Otwieranie pliku obrazu: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Nie mozna otworzyc %s +. +:PROGRAM_BOOT_BOOT +Bootowanie z dysku %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Znaleziono kartridz PCjr, ale maszyna nie jest typu PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Dostepne komendy kartridzy PCjr: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +Nie znaleziono komend kartidzy PCjr +. +:PROGRAM_LOADROM_SPECIFY_FILE +Must specify ROM file to load. + +. +:PROGRAM_LOADROM_CANT_OPEN +ROM file not accessible. + +. +:PROGRAM_LOADROM_TOO_LARGE +ROM file too large. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +Video BIOS not supported by machine type. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +ROM file not recognized. + +. +:PROGRAM_LOADROM_BASIC_LOADED +BASIC ROM loaded. + +. +:SHELL_CMD_IMGMOUNT_HELP +Zamontuj obraz dysku CD, dyskietki lub dysku twardego do wybranej litery dysku. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Zamontuj obraz dysku CD, dyskietki lub dysku twardego do wybranej litery dysku. + +Uzycie: + imgmount DYSK OBRAZ-CD [OBRAZ-CD2 [..]] [-fs iso] -t cdrom|iso + imgmount DYSK OBRAZ [OBRAZ2 [..]] [-fs fat] -t hdd|floppy + imgmount DYSK OBRAZ-STARTOWY [-fs fat|none] -t hdd -size GEOMETRIA + imgmount -u DYSK (odmontuj obraz DYSKu) + +Gdzie: + DYSK jest litera do kt˘rej obraz bedzie zamontowany: A, C, D, ... + OBRAZ-CD to ISO, CUE+BIN, CUE+ISO lub CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + OBRAZ jest obrazem dysku twardego lub dyskietki (FAT16 lub FAT12) + OBRAZ-STARTOWY jest startowym obrazem dysku ze specyficzna geometria + GEOMETRIA pliki-w-sektorze,sektory-w-glowicy,glowice,cylindry + +Notatki: + - Ctrl+F4 zamienia i montuje nastepny OBRAZ lub OBRAZ-CD. +Przyklady: + imgmount D /home/UZYTKOWNIK/gry/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A dyskietka1.img dyskietka2.img -t floppy + imgmount C ~/dos/dysk_c.img -t hdd + imgmount C bootable.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +maps physical folders or drives to a virtual drive letter. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Mount a directory from the host OS to a drive letter. + +Usage: + mount DRIVE DIRECTORY [-t TYPE] [-freesize SIZE] [-label LABEL] + mount -u DRIVE (unmounts the DRIVE's directory) + +Where: + DRIVE the drive letter where the directory will be mounted: A, C, D, ... + DIRECTORY is the directory on the host OS to be mounted + TYPE type of the directory to mount: dir, floppy, cdrom, or overlay + SIZE free space for the virtual drive (KiB for floppies, MiB otherwise) + LABEL drive label name to be used + +Notes: + - '-t overlay' redirects writes for mounted drive to another directory. + - Additional options are described in the manual (README file, chapter 4). + +Examples: + mount C ~/dosgames + mount D "/media/USERNAME/Game CD" -t cdrom + mount C my_savegame_files -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Musisz podac litere dysku, na kt˘rym zamontowany bedzie obraz. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Musisz podac numer dysku (0 - 3), gdzie zamontowany bedzie obraz (0=fda, 1=fdb, 2=hda, 3=hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +For CD-ROM images: IMGMOUNT drive-letter location-of-image -t iso + +For hardrive images: Must specify drive geometry for hard drives: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT drive-letter location-of-image -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Could not load image file. +Check that the path is correct and the image is accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Could not extract drive geometry from image. +Use parameter -size bps,spc,hpc,cyl to specify the geometry. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Typ '%s' nie jest obslugiwany. Uzyj 'hdd', 'floppy' lub 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" nie jest obslugiwany. Uzyj "fat", "iso" lub "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Musisz podac plik obrazu do zamontowania. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Nie znaleziono pliku obrazu. + +. +:PROGRAM_IMGMOUNT_MOUNT +Do montowania katalog˘w sluzy komenda MOUNT, a nie IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Drive already mounted at that letter. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Nie da sie utworzyc dysku z tego pliku. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Dysku %d jst zamontowany jako %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +The image must be on a host or local drive. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Uzywanie wielu plik˘w jest obslugiwane tylko dla obraz˘w cue/iso. + +. +:PROGRAM_KEYB_INFO +Strona kodowa %i zostala zaladowana + +. +:PROGRAM_KEYB_INFO_LAYOUT +Strona kodowa %i zostala zaladowana dla ukladu klawiatury %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [keyboard layout ID[ codepage number[ codepage file]]] + +Some examples: + KEYB: Display currently loaded codepage. + KEYB sp: Load the spanish (SP) layout, use an appropriate codepage. + KEYB sp 850: Load the spanish (SP) layout, use codepage 850. + KEYB sp 850 mycp.cpi: Same as above, but use file mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Uklad klawiatury %s zostal wczytany dla strony kodowej %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Nie znaleziono pliku klawiatury %s + + +. +:PROGRAM_KEYB_INVALIDFILE +Plik klawiatury %s jest nieprawidlowy + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Brak ukladu klawiatury w %s dla strony kodowej %i + +. +:PROGRAM_KEYB_INVCPFILE +Brak lub nieprawidlowy plik strony kodowej dla ukladu klawiatury %s + + +. +:SHELL_ILLEGAL_PATH +Nieprawidlowa sciezka + +. +:SHELL_CMD_HELP +Jesli chcesz zobaczyc liste wszystkich obslugiwanych komend, wpisz help /all . +Kr˘tka lista najczesciej uzywanych komend: + +. +:SHELL_CMD_ECHO_ON +ECHO jest wlaczone. + +. +:SHELL_CMD_ECHO_OFF +ECHO jest wylaczone. + +. +:SHELL_ILLEGAL_SWITCH +Nieprawidlowy przelacznik: %s. + +. +:SHELL_MISSING_PARAMETER +Brak wymaganego parametru. + +. +:SHELL_CMD_CHDIR_ERROR +Nie mozna przejsc do: %s. + +. +:SHELL_CMD_CHDIR_HINT +Aby przejsc do innego dysku wpisz %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +Nazwa katalogu jest dluzsza niz 8 znak˘w i/lub zawiera spacje. +Spr˘buj cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Ciagle jestes na dysku Z:, Wpisz C: aby przejsc na zamontowany dysk. + +. +:SHELL_CMD_DATE_HELP +Displays or changes the internal date. + +. +:SHELL_CMD_DATE_ERROR +The specified date is not correct. + +. +:SHELL_CMD_DATE_DAYS +3SunMonTueWedThuFriSat +. +:SHELL_CMD_DATE_NOW +Current date: +. +:SHELL_CMD_DATE_SETHLP +Type 'date MM-DD-YYYY' to change. + +. +:SHELL_CMD_DATE_FORMAT +M/D/Y +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-DD-YYYY] + MM-DD-YYYY: new date to set + /S: Permanently use host time and date as DOS time + /F: Switch back to DOSBox internal time (opposite of /S) + /T: Only display date + /H: Synchronize with host + +. +:SHELL_CMD_TIME_HELP +Displays the internal time. + +. +:SHELL_CMD_TIME_NOW +Current time: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Display simple time + /H: Synchronize with host + +. +:SHELL_CMD_MKDIR_ERROR +Nie mozna utworzyc: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Nie mozna usunac: %s. + +. +:SHELL_CMD_DEL_ERROR +Nie mozna usunac: %s. + +. +:SHELL_SYNTAXERROR +Skladnia komendy jest nieprawidlowa. + +. +:SHELL_CMD_SET_NOT_SET +Zmienna srodowiskowa %s nie jest zdefiniowana. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Niewystarczajaca ilosc miejsca w srodowisku. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Brakuje nazwy pliku. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Brakuje numeru. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Nieprawidlowy numer. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Brakuje etykiety dla komendy GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Nie odnaleziono etykiety %s. + +. +:SHELL_CMD_FILE_NOT_FOUND +Nie odnaleziono pliku %s. + +. +:SHELL_CMD_FILE_EXISTS +Plik %s juz istnieje. + +. +:SHELL_CMD_DIR_VOLUME + Wolumin w stacji %c to %s + +. +:SHELL_CMD_DIR_INTRO + Katalog: %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d plik(˘w) %21s bajt˘w + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d katalog(˘w) %21s bajt˘w wolnych + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Dysk %c nie istnieje! +Musisz go najpierw zamontowac . Wpisz intro lub intro mount aby uzyskac wiecej informacji. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Nieprawidlowa komenda: %s. + +. +:SHELL_CMD_PAUSE +Nacisnij dowolny klawisz, aby kontynuowac... +. +:SHELL_CMD_PAUSE_HELP +Czekaj na wcisniecie klawisza aby kontynuowac. + +. +:SHELL_CMD_COPY_FAILURE +Nie udalo sie skopiowac: %s. + +. +:SHELL_CMD_COPY_SUCCESS + skopiowano %d plik(˘w) + +. +:SHELL_CMD_SUBST_NO_REMOVE +Unable to remove, drive not in use. + +. +:SHELL_CMD_SUBST_FAILURE +Wykonanie polecenia SUBST nie powiodlo sie. Moze to byc spowodowane bledem w linii komend lub tym, ze docelowy dysk jest uzywany. +Polecenia SUBST mozna uzyc jedynie na lokalnych dyskach +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Witaj w DOSBox Staging %-43s ş +ş ş +ş Kr˘tki wstep dla nowych uzytkownik˘w, wpisz: INTRO ş +ş Aby zobaczyc liste wspieranych komend, wpisz: HELP ş +ş ş +ş Aby dostosowac predkosc emulatora, uzyj Ctrl+F11 i Ctrl+F12. ş +ş Aby zmienic skr˘ty klawiaturowe Ctrl+F1. ş +ş Wiecej informacji w pliku README w katalogu DOSBoxa. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox wspiera tryb Composite CGA. ş +ş Wcisnij F12 aby wlaczyc lub wylaczyc tryb composite. ş +ş (Alt+)F11 zmienia barwe; Ctrl+Alt+F11 zmienia model CGA. ş +ş ş + +. +:SHELL_STARTUP_CGA_MONO +ş Wcisnij F11 aby zmienic kolor ekaranu: jasny bialy, bialy, pomaranczowy, zielony. ş +ş i Alt+F11 aby zmienic kontrast/jasnosc. ş + +. +:SHELL_STARTUP_HERC +ş Wcisnij F11 aby zmienic kolor ekaranu mono: jasny bialy, bialy, pomaranczowy, zielony. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Wcisnij Alt+Pauza aby wlaczyc debuggera albo wlacz plik exe komenda DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş https://dosbox-staging.github.io ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Wyswietl lub zmien aktualny katalog. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [dysk:][sciezka] +CHDIR [..] +CD [dysk:][sciezka] +CD [..] + + .. oznacza, ze chcesz przejsc do katalogu powyzej. + +Wpisz CD dysk: aby wyswietlic aktualna sciezke na okreslonym dysku. +Wpisz CD bez parametr˘w aby wyswietlic aktualny dysk i katalog. + +. +:SHELL_CMD_CLS_HELP +Wyczysc ekran. + +. +:SHELL_CMD_DIR_HELP +Displays a list of files and subdirectories in a directory. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [drive:][path][filename] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [drive:][path][filename] + Specifies drive, directory, and/or files to list. + /W Uses wide list format. + /B Uses bare format (no heading information or summary). + /P Pauses after each screenful of information. + /AD Displays all directories. + /A-D Displays all files. + /O List by files in sorted order. + - Prefix to reverse order + sortorder N By name (alphabetic) S By size (smallest first) + E By extension (alphabetic) D By date & time (oldest first) + +. +:SHELL_CMD_ECHO_HELP +Wyswietla wiadomosci i wlacza/wylacza wypisywanie wykonywanych komend. + +. +:SHELL_CMD_EXIT_HELP +Wylacz konsole. + +. +:SHELL_CMD_HELP_HELP +Pokaz pomoc. + +. +:SHELL_CMD_MKDIR_HELP +Stw˘rz katalog. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [dysk:][sciezka] +MD [dysk:][sciezka] + +. +:SHELL_CMD_RMDIR_HELP +Usun katalog. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [dysk:][sciezka] +RD [dysk:][sciezka] + +. +:SHELL_CMD_SET_HELP +Zmien wartosci zmiennych srodowiskowych. + +. +:SHELL_CMD_IF_HELP +W skrypcie powoduje warunkowe przetwarzanie. + +. +:SHELL_CMD_GOTO_HELP +W skrypcie przeskakuje do linii o danej etykiecie. + +. +:SHELL_CMD_SHIFT_HELP +Leftshift commandline parameters in a batch script. + +. +:SHELL_CMD_TYPE_HELP +Wyswietl zawartosc pliku testowego. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [DYSK:][SCIEZKA][PLIK] + +. +:SHELL_CMD_REM_HELP +Dodaj komentarz w skrypcie. + +. +:SHELL_CMD_REM_HELP_LONG +REM [komentarz] + +. +:SHELL_CMD_NO_WILD +To prosta wersja komendy, symbole wieloznaczne nie sa dozwolone! + +. +:SHELL_CMD_RENAME_HELP +Zmien nazwe jednego lub wielu plik˘w. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [dysk:][sciezka]nazwapliku1 nazwapliku2. +REN [dysk:][sciezka]nazwapliku1 nazwapliku2. + +Pamietaj, ze nie mozesz okreslic nowego dysku i sciezki dla pliku docelowego. + +. +:SHELL_CMD_DELETE_HELP +Usun pliki. + +. +:SHELL_CMD_COPY_HELP +Kopiuj plik. + +. +:SHELL_CMD_CALL_HELP +Uruchom skrypt z innego skryptu. + +. +:SHELL_CMD_SUBST_HELP +Przyporzadkuj wewnetrzny katalog do dysku. + +. +:SHELL_CMD_LOADHIGH_HELP +Wczytaj program do pamieci g˘rnej (wymaga xms=true, umb=true). + +. +:SHELL_CMD_LS_HELP +Wypisz zawartosc katalogu. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [PATTERN] + +. +:SHELL_CMD_LS_PATH_ERR +ls: nie ma dostepu do '%s': Nie ma takiego pliku ani katalogu + +. +:SHELL_CMD_CHOICE_HELP +Czeka na wcisniecie klawisza i ustawia ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:mozliwosci] [/N] [/S] tekst + /C[:]mozliwosci - Okresla dostepne klawisze. Domyslnie: yn. + /N - Nie wyswietlaj mozliwosci na koniec zgloszenia. + /S - Wlacza rozr˘znianie wielkosci liter mozliwosci. + tekst - Tekst wyswietlany w zgloszeniu. + +. +:SHELL_CMD_ATTRIB_HELP +Nie powoduje zadnego efektu. Dostarczone dla zachowania kompatybilnosci. + +. +:SHELL_CMD_PATH_HELP +Dostarczone dla zachowania kompatybilnosci. + +. +:SHELL_CMD_VER_HELP +Pokaz lub ustaw raportowane wersje DOS. + +. +:SHELL_CMD_VER_HELP_LONG +Uzycie: + ver + ver set WERSJA + +Gdzie: + WERSJA moze zawierac numer gl˘wny, np. 5 lub takze dwucyfrowy numer + dodatkowy, jak np. 6.22, 7.01 lub 7.10. Numer dodatkowy wersji + moze byc r˘wniez odseparowany spacja, np: 6 22, 7 01, lub 7 10. + +Notatki: + Wersja DOS moze byc r˘wniez zmieniona w pliku konfiguracyjnym w sekcji [dos] + ustawiajac "ver = WERSJA". + +Przyklady: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging wersja %s +DOS wersja %d.%02d + +. +:SHELL_CMD_VER_INVALID +Podana wersja DOSa jest nieprawidlowa. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/pl/pl_PL.lng dosbox-staging-0.77.0/contrib/translations/pl/pl_PL.lng --- dosbox-staging-0.76.0/contrib/translations/pl/pl_PL.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/pl/pl_PL.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1424 @@ +:CONFIG_FULLSCREEN +WˆĽcz DOSBoxa na peˆnym ekranie. +Wci˜nij Alt+Enter aby przeˆĽczy† siŠ do okna. +. +:CONFIG_DISPLAY +Numer ekranu do užycia; warto˜† zaležy od ustawieä užytkownika. +. +:CONFIG_VSYNC +Vertical sync setting not implemented (setting ignored) +. +:CONFIG_FULLRESOLUTION +Jakiej rozdzielczo˜ci užy† w peˆnym ekranie: 'original', 'desktop', +lub dokˆadna rozdzielczo˜† (np. 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Ustaw wielko˜† okna w trybie okienkowym: + default: Wybierz najlepszĽ opcjŠ dla twojego + ˜rodowiska. + original: Zmieä wielko˜† okna do rozdzielczo˜ci wybranej przez + emulowany program. + resizable: Ustaw okno o zmiennej wielko˜ci. + To jest eksperymentalna opcja, dziaˆa tylko z + output=opengl i glshader=sharp (lub none) + : Skaluj zawarto˜† okna do wybranej wielko˜ci, užyj + wielko˜ci w formacie XxY, na przykˆad: 1024x768. + Skalowanie nie dziaˆa dla output=surface. +. +:CONFIG_OUTPUT +What video system to use for output. +. +:CONFIG_TEXTURE_RENDERER +Choose a renderer driver when using a texture output mode. +Use texture_renderer=auto for an automatic choice. +. +:CONFIG_CAPTURE_MOUSE +Wybierz tryb zachowanie myszy: + onclick: Kursor myszy zostanie zˆapany przy pierwszym klikniŠciu + w obszarze okna. + onstart: Kursor myszy zostanie zˆapany na starcie + (jak w prawdziwym DOS). + seamless: Kursor može swobodnie opu˜ci† okno DOSBoxa + i nie bŠdzie zˆapany. + nomouse: Emulacja myszy jest wyˆĽczona. +Wybierz jakĽ rolŠ peˆni ˜rodkowy przycisk myszy (drugi parametr): + middlegame: KlikniŠcie ˜rodkowym przyciskiem jest wysˆane do gry + (Ctrl+F10 puszcza mysz). + middlerelease: KlikniŠcie ˜rodkowym przyciskiem puszcza mysz + (zdarzenie nie bŠdzie wysˆane do gry). + W peˆnym ekranie lub w trybie 'seamless' klikniŠcie + zostanie wysˆane do gry. + Ctrl+F10 r˘wniež puszcza mysz. +Domy˜lne ustawienie to: seamless middlerelease +. +:CONFIG_SENSITIVITY +Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Enable this setting to bypass your operating system's mouse +acceleration and sensitivity settings. This works in +fullscreen or when the mouse is captured in window mode. +. +:CONFIG_WAITONERROR +Zatrzymuje przed zamkniŠciem konsoli, je˜li dosbox zgˆosiˆ bˆĽd. +. +:CONFIG_PRIORITY +Priorytety dla DOSBoxa. Druga warto˜† po przecinku dotyczy okna DOSBoxa, kt˘re jest +nieaktywne/zminimalizowane. Warto˜ci 'pause' možna užywa† tylko na drugiej pozycji. +. +:CONFIG_MAPPERFILE +Plik užywany do wczytywania/zapisywania skr˘t˘w klawiszowych. +. +:CONFIG_SCREENSAVER +Use 'allow' or 'block' to override the SDL_VIDEO_ALLOW_SCREENSAVER +environment variable (which usually blocks the OS screensaver +while the emulator is running). +. +:CONFIG_LANGUAGE +Wybiera inny plik jŠzykowy. +. +:CONFIG_MACHINE +Typ maszyny, kt˘ry DOSBox pr˘buje na˜ladowa†. +. +:CONFIG_CAPTURES +Katalog, w kt˘rym sĽ przechowywane przechwycone pliki wave, midi oraz zrzuty ekranu. +. +:CONFIG_MEMSIZE +Rozmiar pamiŠci DOSBoxa w megabajtach. +Tej warto˜ci lepiej nie zmienia† aby uniknĽ† problem˘w z niekt˘rymi grami, +cho† czasem gry mogĽ wymaga† wiŠkszej warto˜ci. +Generalnie podniesienie tej warto˜ci nie powoduje przy˜pieszenia. +. +:CONFIG_STARTUP_VERBOSITY +Controls verbosity prior to displaying the program: + | Splash | Welcome | Early stdout +high | yes | yes | yes +medium | no | yes | yes +low | no | no | yes +quiet | no | no | no +splash_only | yes | no | no +auto | 'low' if exec or dir is passed, otherwise 'high' +. +:CONFIG_FRAMESKIP +Jak wiele klatek DOSBox pomija zanim jakĽ˜ narysuje. +. +:CONFIG_ASPECT +Scales the vertical resolution to produce a 4:3 display aspect +ratio, matching that of the original standard-definition monitors +for which the majority of DOS games were designed. This setting +only affects video modes that use non-square pixels, such as +320x200 or 640x400; where as square-pixel modes, such as 640x480 +and 800x600, will be displayed as-is. +. +:CONFIG_MONOCHROME_PALETTE +Select default palette for monochrome display. +Works only when emulating hercules or cga_mono. +You can also cycle through available colours using F11. +. +:CONFIG_SCALER +Scaler used to enlarge/enhance low resolution modes. +If 'forced' is appended, then the scaler will be used even if +the result might not be desired. +Note that some scalers may use black borders to fit the image +within your configured display resolution. If this is +undesirable, try either a different scaler or enabling +fullresolution output. +. +:CONFIG_GLSHADER +Either 'none' or a GLSL shader name. Works only with +OpenGL output. Can be either an absolute path, a file +in the 'glshaders' subdirectory of the DOSBox +configuration directory, or one of the built-in shaders: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (default). +. +:CONFIG_CORE +CPU Core used in emulation. auto will switch to dynamic if available and +appropriate. +. +:CONFIG_CPUTYPE +CPU Type used in emulation. auto is the fastest choice. +. +:CONFIG_CYCLES +Amount of instructions DOSBox tries to emulate each millisecond. +Setting this value too high results in sound dropouts and lags. +Cycles can be set in 3 ways: + 'auto' tries to guess what a game needs. + It usually works, but can fail for certain games. + 'fixed #number' will set a fixed amount of cycles. This is what you usually + need if 'auto' fails (Example: fixed 4000). + 'max' will allocate as much cycles as your computer is able to + handle. +. +:CONFIG_CYCLEUP +Liczba cykli o kt˘rĽ warto˜† zwiŠksza/zmniejsza kombinacja klawiszy. (Ctrl+F11/Ctrl+F12) +. +:CONFIG_CYCLEDOWN +Warto˜† mniejsza niž 100 jest traktowana jako ustawienie zmiany procentowej. +. +:CONFIG_NOSOUND +WˆĽcz tryb cichy (dŤwiŠk nadal jest emulowany). +. +:CONFIG_RATE +CzŠstotliwo˜† pr˘bkowania miksera, ustawienie czŠstotliwo˜ci urzĽdzenia ponad tŠ warto˜† prawdopodobnie obnižy jako˜† dŤwiŠku. +. +:CONFIG_BLOCKSIZE +Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged. +. +:CONFIG_PREBUFFER +How many milliseconds of data to keep on top of the blocksize. +. +:CONFIG_MIDIDEVICE +Device that will receive the MIDI data (from the emulated MIDI +interface - MPU-401). Choose one of the following: +'fluidsynth', to use the built-in MIDI synthesizer. See the + [fluidsynth] section for detailed configuration. +'mt32', to use the built-in Roland MT-32 synthesizer. + See the [mt32] section for detailed configuration. +'auto', to use the first working external MIDI player. This + might be a software synthesizer or physical device. +. +:CONFIG_MIDICONFIG +Configuration options for the selected MIDI interface. +This is usually the id or name of the MIDI synthesizer you want +to use (find the id/name with DOS command 'mixer /listmidi'). +- This option has no effect when using the built-in synthesizers + (mididevice = fluidsynth or mt32). +- When using ALSA, use Linux command 'aconnect -l' to list open + MIDI ports, and select one (for example 'midiconfig=14:0' + for sequencer client 14, port 0). +- If you're using a physical Roland MT-32 with revision 0 PCB, + the hardware may require a delay in order to prevent its + buffer from overflowing. In that case, add 'delaysysex', + for example: 'midiconfig=2 delaysysex'. +See the README/Manual for more details. +. +:CONFIG_MPU401 +Typ emulowanego MPU-401. +. +:CONFIG_SOUNDFONT +Path to a SoundFont file in .sf2 format. You can use an +absolute or relative path, or the name of an .sf2 inside +the 'soundfonts' directory within your DOSBox configuration +directory. +An optional percentage will scale the SoundFont's volume. +For example: 'soundfont.sf2 50' will attenuate it by 50 percent. +The scaling percentage can range from 1 to 500. +. +:CONFIG_MODEL +Model of synthesizer to use. The default (auto) prefers CM-32L +if both sets of ROMs are provided. For early Sierra games and Dune 2 +it's recommended to use 'mt32', while newer games typically made +use of the CM-32L's extra sound effects (use 'auto' or 'cm32l') +. +:CONFIG_ROMDIR +The directory containing one or both pairs of MT-32 and/or CM-32L ROMs. +The files must be named in capitals, as follows: + - MT-32 ROM pair: MT32_CONTROL.ROM and MT32_PCM.ROM + - CM-32L ROM pair: CM32L_CONTROL.ROM and CM32L_PCM.ROM +The directory can be absolute or relative, or leave it blank to +use the 'mt32-roms' directory in your DOSBox configuration +directory, followed by checking other common system locations. +. +:CONFIG_SBTYPE +Typ emulowanego Sound Blastera 'gb' to Game Blaster. +. +:CONFIG_SBBASE +Adres We/Wy (I/O) Sound Blastera. +. +:CONFIG_IRQ +Numer IRQ Sound Blastera. +. +:CONFIG_DMA +Numer DMA Sound Blastera. +. +:CONFIG_HDMA +Numer HDMA Sound Blastera. +. +:CONFIG_SBMIXER +Allow the Sound Blaster mixer to modify the DOSBox mixer. +. +:CONFIG_OPLRATE +oplrate is deprecated. The OPL waveform is now sampled + at the mixer's playback rate to avoid resampling. +. +:CONFIG_OPLMODE +Type of OPL emulation. On 'auto' the mode is determined by 'sbtype'. +All OPL modes are AdLib-compatible, except for 'cms'. +. +:CONFIG_OPLEMU +Provider for the OPL emulation. 'compat' provides better quality, +'nuked' is the default and most accurate (but the most CPU-intensive). +. +:CONFIG_GUS +WˆĽcz emulacjŠ karty Gravis UltraSound. +. +:CONFIG_GUSBASE +Bazowe adres We/Wy karty Gravis UltraSound. +. +:CONFIG_GUSIRQ +Numer IRQ karty Gravis UltraSound. +. +:CONFIG_GUSDMA +Kanaˆ DMA karty Gravis UltraSound. +. +:CONFIG_ULTRADIR +—ciežka do katalogu UltraSound. W tym katalogu +powinien znajdowa† siŠ katalog MIDI, zawierajĽcy +patche dla emulacji MIDI przez GUS. Zestawy patchy +užywane z Timidity powinny dziaˆa† dobrze. +. +:CONFIG_PCSPEAKER +WˆĽcz emulacjŠ PC-Speakera. +. +:CONFIG_PCRATE +CzŠstotliwo˜† pr˘bkowania dŤwiŠku generowanego przez PC-Speakera. +. +:CONFIG_ZERO_OFFSET +Neutralizes and prevents the PC speaker's DC-offset from harming other sources. +'auto' enables this for non-Windows systems and disables it on Windows. +If your OS performs its own DC-offset correction, then set this to 'false'. +. +:CONFIG_TANDY +WˆĽcz emulacjŠ Tandy Sound System. Przy 'auto' emulacja odbywa siŠ tylko je˜li maszyna jest ustawiona na 'tandy'.. +. +:CONFIG_TANDYRATE +CzŠstotliwo˜† pr˘bkowania Tandy 3-Voice. +. +:CONFIG_DISNEY +WˆĽcza emulacjŠ Disney Sound Source. (kompatybilne z Covox Voice Master oraz Covox Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Type of joystick to emulate: auto (default), +none (disables joystick emulation), +2axis (supports two joysticks), +4axis (supports one joystick, first joystick used), +4axis_2 (supports one joystick, second joystick used), +fcs (Thrustmaster), ch (CH Flightstick). +auto chooses emulation depending on real joystick(s). +(Remember to reset DOSBox's mapperfile if you saved it earlier) +. +:CONFIG_TIMED +enable timed intervals for axis. Experiment with this option, if your joystick drifts (away). +. +:CONFIG_AUTOFIRE +continuously fires as long as you keep the button pressed. +. +:CONFIG_SWAP34 +swap the 3rd and the 4th axis. Can be useful for certain joysticks. +. +:CONFIG_BUTTONWRAP +enable button wrapping at the number of emulated buttons. +. +:CONFIG_CIRCULARINPUT +enable translation of circular input to square output. +Try enabling this if your left analog stick can only move in a circle. +. +:CONFIG_DEADZONE +the percentage of motion to ignore. 100 turns the stick into a digital one. +. +:CONFIG_SERIAL1 +set type of device connected to com port. +Can be disabled, dummy, modem, nullmodem, directserial. +Additional parameters must be in the same line in the form of +parameter:value. Parameter for all types is irq (optional). +for directserial: realport (required), rxdelay (optional). + (realport:COM1 realport:ttyS0). +for modem: listenport (optional). +for nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (all optional). +Example: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +see serial1 +. +:CONFIG_SERIAL3 +see serial1 +. +:CONFIG_SERIAL4 +see serial1 +. +:CONFIG_PHONEBOOKFILE +File used to map fake phone numbers to addresses. +. +:CONFIG_XMS +WˆĽcz obsˆugŠ XMS. +. +:CONFIG_EMS +Enable EMS support. The default (=true) provides the best +compatibility but certain applications may run better with +other choices, or require EMS support to be disabled (=false) +to work at all. +. +:CONFIG_UMB +WˆĽcz obsˆugŠ UMB. +. +:CONFIG_VER +Set DOS version (5.0 by default). Specify as major.minor format. +A single number is treated as the major version. +Common settings are 3.3, 5.0, 6.22, and 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Kod jŠzyka ukˆadu klawiatury (lub none). +. +:CONFIG_IPX +WˆĽcz emulacjŠ IPX po UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Linie w tej sekcji zostanĽ uruchomione przy starcie. +Možesz umie˜ci† tu np. komendy MOUNT. + +. +:CONFIGFILE_INTRO +# To jest plik konfiguracyjny dla dosbox-staging (%s). +# Linie zaczynajĽce siŠ od # sĽ komentarzami. +. +:CONFIG_SUGGESTED_VALUES +Možliwe warto˜ci. +. +:PROGRAM_CONFIG_NOCONFIGFILE +No config file loaded! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Primary config file: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Additional config files: + +. +:PROGRAM_CONFIG_CONFDIR +Katalog z konfiguracjĽ DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Nie možna otworzy† pliku %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Writing config file %s + +. +:PROGRAM_CONFIG_USAGE +Config tool: +-writeconf or -wc without parameter: write to primary loaded config file. +-writeconf or -wc with filename: write file to config directory. +Use -writelang or -wl filename to write the current language strings. +-r [parameters] + Restart DOSBox, either using the previous parameters or any that are appended. +-wcp [filename] + Write config file to the program directory, dosbox.conf or the specified + filename. +-wcd + Write to the default config file in the config directory. +-l lists configuration parameters. +-h, -help, -? sections / sectionname / propertyname + Without parameters, displays this help screen. Add "sections" for a list of + sections. For info about a specific section or property add its name behind. +-axclear clears the autoexec section. +-axadd [line] adds a line to the autoexec section. +-axtype prints the content of the autoexec section. +-securemode switches to secure mode. +-avistart starts AVI recording. +-avistop stops AVI recording. +-startmapper starts the keymapper. +-get "section property" returns the value of the property. +-set "section property=value" sets the value. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Purpose of property "%s" (contained in section "%s"): +%s + +Possible Values: %s +Default value: %s +Current value: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Purpose of section "%s": +%s +Current value: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +This property cannot be changed at runtime. + +. +:PROGRAM_CONFIG_HLP_POSINT +positive integer +. +:PROGRAM_CONFIG_HLP_SECTHLP +Section %s contains the following properties: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +DOSBox configuration contains the following sections: + + +. +:PROGRAM_CONFIG_SECURE_ON +PrzeˆĽczono w tryb bezpieczny. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Ta operacja nie jest možliwa w trybie bezpiecznym. + +. +:PROGRAM_CONFIG_SECTION_ERROR +Sekcja %s nie istnieje. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" nie jest poprawnĽ warto˜ciĽ parametru %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Brak takiej sekcji lub parametru. + +. +:PROGRAM_CONFIG_NO_PROPERTY +Brak parametru %s w sekcji %s. + +. +:PROGRAM_CONFIG_SET_SYNTAX +Poprawna skˆadnia: config -set "sekcja parametr". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Poprawna skˆadnia: config -get "sekcja parametr". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox was started with the following command line parameters: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Zabrakˆo parametru. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +Znalezione CD-ROMy: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Dysk +. +:PROGRAM_MOUNT_STATUS_TYPE +Typ +. +:PROGRAM_MOUNT_STATUS_LABEL +Etykieta +. +:PROGRAM_MOUNT_STATUS_2 +Dysk %c jest zamontowany jako %s + +. +:PROGRAM_MOUNT_STATUS_1 +Zamontowane dyski: + +. +:PROGRAM_MOUNT_ERROR_1 +Katalog %s nie istnieje. + +. +:PROGRAM_MOUNT_ERROR_2 +%s nie jest katalogiem + +. +:PROGRAM_MOUNT_ILL_TYPE +Nieprawidˆowy typ %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Dysk %c jest juž zamontowany jako %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Dysk %c nie jest zamontowany. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Dysk %c zostaˆ pomy˜lnie odmontowany. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Dyski wirtualne nie mogĽ zosta† odmontowane. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' nie jest prawidˆowym identyfikatorem dysku. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montowanie dysku C:\ nie jest zalecane. ProszŠ nastŠpnym razem zamontowa† (pod)katalog. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Montowanie katalogu / nie jest zalecane.ProszŠ nastŠpnym razem zamontowa† (pod)katalog. + +. +:PROGRAM_MOUNT_NO_OPTION +Warning: Ignoring unsupported option '%s'. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +A normal directory needs to be MOUNTed first before an overlay can be added on top. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +The overlay is NOT compatible with the drive that is specified. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +The overlay needs to be specified using the same addressing as the underlying drive. No mixing of relative and absolute paths. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +The overlay directory can not be the same as underlying drive. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Co˜ poszˆo nie tak. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Overlay %s on drive %c mounted. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Nie možna przenie˜† dysku Z. Dysk %c jest juž zamontowany. + +. +:PROGRAM_MEM_CONVEN +%10d kB wolnej pamiŠci konwencjonalnej + +. +:PROGRAM_MEM_EXTEND +%10d kB wolnej pamiŠci rozszerzonej + +. +:PROGRAM_MEM_EXPAND +%10d kB wolnej pamiŠci stronicowej + +. +:PROGRAM_MEM_UPPER +%10d kB wolnej pamiŠci g˘rnej w %d blokach (najwiŠkszy blok %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB zaalokowanych. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB zwolnionych. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Užyta pamiŠ† zwolniona. + +. +:PROGRAM_LOADFIX_ERROR +BˆĽd alokacji pamiŠci. + +. +:MSCDEX_SUCCESS +MSCDEX zainstalowany. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: BˆĽd: Litery dysk˘w wielu napŠd˘w CD-ROM muszĽ nastŠpowa† po sobie. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: BˆĽd: jeszcze nie obsˆugiwane. + +. +:MSCDEX_ERROR_PATH +MSCDEX: BˆĽd: Podana ˜ciežka nie prowadzi do napŠdu CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: BˆĽd: Nieprawidˆowy plik lub brak dostŠpu. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: BˆĽd: Za dužo napŠd˘w CD-ROM (maksymalnie: 5). Instalacja MSCDEX nieudana. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Zamontowano podkatalog: ograniczone wsparcie. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: BˆĽd: Plik nie jest obrazem ISO/CUE lub zawiera bˆŠdy. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: BˆĽd: Nieznany bˆĽd. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Ostrzeženie: Zignorowano niewspieranĽ opcjŠ '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +PamiŠ† podrŠczna dysku wyczyszczona. + +. +:PROGRAM_INTRO +Witaj w DOSBox Staging, emulatorze x86 z dŤwiŠkiem i grafikĽ. +DOSBox tworzy dla Ciebie powˆokŠ, kt˘ry wyglĽda jest stary, prosty DOS. + +Informacje o montowaniu dysk˘w, wpisz: intro mount +Informacje o wsparciu dla CD-ROM, wpisz: intro cdrom +Informacje o klawiszach specjalnych, wpisz: intro special +WiŠcej informacji o DOSBox Staging znajdziesz na wiki: +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox zatrzyma/wyˆĽczy siŠ bez ostrzeženia je˜li wystĽpi bˆĽd! + +. +:PROGRAM_INTRO_MOUNT_START +Here are some commands to get you started: +Before you can use the files located on your own filesystem, +You have to mount the directory containing the files. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosprog\ utworzy dysk C z c:\dosprog jako zawarto˜ciĽ. ş +ş ş +ş c:\dosprog\ to przykˆad. Zamieä go na Tw˘j wˆasny katalog z grami.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosprog utworzy dysk C z ~/dosprog jako zawarto˜ciĽ. ş +ş ş +ş ~/dosprog to przykˆad. Zamieä go na Tw˘j wˆasny katalog z grami.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +When the mount has successfully completed you can type c: to go to your freshly +mounted C-drive. Typing dir there will show its contents. cd will allow you to +enter a directory (recognised by the [] in a directory listing). +You can run programs/files which end with .exe .bat and .com. + +. +:PROGRAM_INTRO_CDROM +How to mount a virtual CD-ROM Drive in DOSBox: +DOSBox provides CD-ROM emulation on several levels. + +This works on all normal directories, installs MSCDEX and marks the files +read-only. Usually this is enough for most games: + +mount D C:\example -t cdrom + +If it doesn't work you might have to tell DOSBox the label of the CD-ROM: + +mount D C:\example -t cdrom -label CDLABEL + +Additionally, you can use IMGMOUNT to mount ISO images or CUE files: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Klawisze specjalne: +Domy˜lne skr˘ty klawiaturowe. +MogĽ zosta† zmienione narzŠdziem keymapper. + +Alt+Enter PrzejdŤ do trybu peˆnoekranowego i z powrotem. +Alt+Pauza Zapauzuj emulator. +Ctrl+F1 Uruchom keymappera. +Ctrl+F4 Zamieä zamontowany obraz dysku. Aktualizuj pamiŠ† podrŠcznĽ zamontowanego katalogu. +Ctrl+F5 Zr˘b zrzut ekranu. +Ctrl+F6 Rozpocznij/zatrzymaj nagrywanie audio do pliku wave. +Ctrl+F7 Rozpocznij/zatrzymaj nagrywanie wideo do pliku zmbv. +Ctrl+F9 WyˆĽcz emulator. +Ctrl+F10 Przechwy†/zwolnij myszkŠ. +Ctrl+F11 Spowolnij emulacjŠ. +Ctrl+F12 Przyspiesz emulacjŠ. +Alt+F12 Uwolnij prŠdko˜† (przycisk "turbo" / przyspiesz). + +. +:PROGRAM_BOOT_NOT_EXIST +Bootdisk file does not exist. Failing. + +. +:PROGRAM_BOOT_NOT_OPEN +Cannot open bootdisk file. Failing. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Plik obrazu jest tylko do odczytu! Može to spowodowa† problemy. + +. +:PROGRAM_BOOT_PRINT_ERROR +Ta komenda bootuje DOSBoxa z dyskietki lub obrazu dysku twardego. + +Do tej komendy možna wˆĽczy† wyb˘r kolejno˜ci dysk˘w +kombinacjĽ klawiszy Ctrl+F4, wtedy opcja -l okre˜la zamontowany dysk do zbootowania. +Je˜li nie podano litery dysku, domy˜lnie bootowany jest dysk A. +Jedynymi literami bootowalnych dysk˘w sĽ litery A, C i D. Aby zbootowa† z dysku +twardego (C lub D), obraz powinien by† zamontowany komendĽ +IMGMOUNT. + +Skˆadnia tej komendy jest nastŠpujĽca: + +BOOT [obrazdysku1.img obrazdysku1.img] [-l literadysku] + +. +:PROGRAM_BOOT_UNABLE +Nie udaˆo siŠ zbootowa† z dysku %c. + +:PROGRAM_BOOT_IMAGE_OPEN +Otwieranie pliku obrazu: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Nie možna otworzy† %s +. +:PROGRAM_BOOT_BOOT +Bootowanie z dysku %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Znaleziono kartridž PCjr, ale maszyna nie jest typu PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +DostŠpne komendy kartridžy PCjr: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +Nie znaleziono komend kartidžy PCjr +. +:PROGRAM_LOADROM_SPECIFY_FILE +Must specify ROM file to load. + +. +:PROGRAM_LOADROM_CANT_OPEN +ROM file not accessible. + +. +:PROGRAM_LOADROM_TOO_LARGE +ROM file too large. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +Video BIOS not supported by machine type. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +ROM file not recognized. + +. +:PROGRAM_LOADROM_BASIC_LOADED +BASIC ROM loaded. + +. +:SHELL_CMD_IMGMOUNT_HELP +Zamontuj obraz dysku CD, dyskietki lub dysku twardego do wybranej litery dysku. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Zamontuj obraz dysku CD, dyskietki lub dysku twardego do wybranej litery dysku. + +Užycie: + imgmount DYSK OBRAZ-CD [OBRAZ-CD2 [..]] [-fs iso] -t cdrom|iso + imgmount DYSK OBRAZ [OBRAZ2 [..]] [-fs fat] -t hdd|floppy + imgmount DYSK OBRAZ-STARTOWY [-fs fat|none] -t hdd -size GEOMETRIA + imgmount -u DYSK (odmontuj obraz DYSKu) + +Gdzie: + DYSK jest literĽ do kt˘rej obraz bŠdzie zamontowany: A, C, D, ... + OBRAZ-CD to ISO, CUE+BIN, CUE+ISO lub CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + OBRAZ jest obrazem dysku twardego lub dyskietki (FAT16 lub FAT12) + OBRAZ-STARTOWY jest startowym obrazem dysku ze specyficznĽ geometriĽ + GEOMETRIA pliki-w-sektorze,sektory-w-gˆowicy,gˆowice,cylindry + +Notatki: + - Ctrl+F4 zamienia i montuje nastŠpny OBRAZ lub OBRAZ-CD. +Przykˆady: + imgmount D /home/UZYTKOWNIK/gry/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A dyskietka1.img dyskietka2.img -t floppy + imgmount C ~/dos/dysk_c.img -t hdd + imgmount C bootable.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +maps physical folders or drives to a virtual drive letter. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Mount a directory from the host OS to a drive letter. + +Usage: + mount DRIVE DIRECTORY [-t TYPE] [-freesize SIZE] [-label LABEL] + mount -u DRIVE (unmounts the DRIVE's directory) + +Where: + DRIVE the drive letter where the directory will be mounted: A, C, D, ... + DIRECTORY is the directory on the host OS to be mounted + TYPE type of the directory to mount: dir, floppy, cdrom, or overlay + SIZE free space for the virtual drive (KiB for floppies, MiB otherwise) + LABEL drive label name to be used + +Notes: + - '-t overlay' redirects writes for mounted drive to another directory. + - Additional options are described in the manual (README file, chapter 4). + +Examples: + mount C ~/dosgames + mount D "/media/USERNAME/Game CD" -t cdrom + mount C my_savegame_files -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Musisz poda† literŠ dysku, na kt˘rym zamontowany bŠdzie obraz. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Musisz poda† numer dysku (0 - 3), gdzie zamontowany bŠdzie obraz (0=fda, 1=fdb, 2=hda, 3=hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +For CD-ROM images: IMGMOUNT drive-letter location-of-image -t iso + +For hardrive images: Must specify drive geometry for hard drives: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT drive-letter location-of-image -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Could not load image file. +Check that the path is correct and the image is accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Could not extract drive geometry from image. +Use parameter -size bps,spc,hpc,cyl to specify the geometry. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Typ '%s' nie jest obsˆugiwany. Užyj 'hdd', 'floppy' lub 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" nie jest obsˆugiwany. Užyj "fat", "iso" lub "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Musisz poda† plik obrazu do zamontowania. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Nie znaleziono pliku obrazu. + +. +:PROGRAM_IMGMOUNT_MOUNT +Do montowania katalog˘w sˆužy komenda MOUNT, a nie IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Drive already mounted at that letter. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Nie da siŠ utworzy† dysku z tego pliku. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Dysku %d jst zamontowany jako %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +The image must be on a host or local drive. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Užywanie wielu plik˘w jest obsˆugiwane tylko dla obraz˘w cue/iso. + +. +:PROGRAM_KEYB_INFO +Strona kodowa %i zostaˆa zaˆadowana + +. +:PROGRAM_KEYB_INFO_LAYOUT +Strona kodowa %i zostaˆa zaˆadowana dla ukˆadu klawiatury %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [keyboard layout ID[ codepage number[ codepage file]]] + +Some examples: + KEYB: Display currently loaded codepage. + KEYB sp: Load the spanish (SP) layout, use an appropriate codepage. + KEYB sp 850: Load the spanish (SP) layout, use codepage 850. + KEYB sp 850 mycp.cpi: Same as above, but use file mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Ukˆad klawiatury %s zostaˆ wczytany dla strony kodowej %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Nie znaleziono pliku klawiatury %s + + +. +:PROGRAM_KEYB_INVALIDFILE +Plik klawiatury %s jest nieprawidˆowy + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Brak ukˆadu klawiatury w %s dla strony kodowej %i + +. +:PROGRAM_KEYB_INVCPFILE +Brak lub nieprawidˆowy plik strony kodowej dla ukˆadu klawiatury %s + + +. +:SHELL_ILLEGAL_PATH +Nieprawidˆowa ˜ciežka + +. +:SHELL_CMD_HELP +Je˜li chcesz zobaczy† listŠ wszystkich obsˆugiwanych komend, wpisz help /all . +Kr˘tka lista najczŠ˜ciej užywanych komend: + +. +:SHELL_CMD_ECHO_ON +ECHO jest wˆĽczone. + +. +:SHELL_CMD_ECHO_OFF +ECHO jest wyˆĽczone. + +. +:SHELL_ILLEGAL_SWITCH +Nieprawidˆowy przeˆĽcznik: %s. + +. +:SHELL_MISSING_PARAMETER +Brak wymaganego parametru. + +. +:SHELL_CMD_CHDIR_ERROR +Nie možna przej˜† do: %s. + +. +:SHELL_CMD_CHDIR_HINT +Aby przej˜† do innego dysku wpisz %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +Nazwa katalogu jest dˆužsza niž 8 znak˘w i/lub zawiera spacje. +Spr˘buj cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +CiĽgle jeste˜ na dysku Z:, Wpisz C: aby przej˜† na zamontowany dysk. + +. +:SHELL_CMD_DATE_HELP +Displays or changes the internal date. + +. +:SHELL_CMD_DATE_ERROR +The specified date is not correct. + +. +:SHELL_CMD_DATE_DAYS +3SunMonTueWedThuFriSat +. +:SHELL_CMD_DATE_NOW +Current date: +. +:SHELL_CMD_DATE_SETHLP +Type 'date MM-DD-YYYY' to change. + +. +:SHELL_CMD_DATE_FORMAT +M/D/Y +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-DD-YYYY] + MM-DD-YYYY: new date to set + /S: Permanently use host time and date as DOS time + /F: Switch back to DOSBox internal time (opposite of /S) + /T: Only display date + /H: Synchronize with host + +. +:SHELL_CMD_TIME_HELP +Displays the internal time. + +. +:SHELL_CMD_TIME_NOW +Current time: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Display simple time + /H: Synchronize with host + +. +:SHELL_CMD_MKDIR_ERROR +Nie možna utworzy†: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Nie možna usunĽ†: %s. + +. +:SHELL_CMD_DEL_ERROR +Nie možna usunĽ†: %s. + +. +:SHELL_SYNTAXERROR +Skˆadnia komendy jest nieprawidˆowa. + +. +:SHELL_CMD_SET_NOT_SET +Zmienna ˜rodowiskowa %s nie jest zdefiniowana. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +NiewystarczajĽca ilo˜† miejsca w ˜rodowisku. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Brakuje nazwy pliku. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Brakuje numeru. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Nieprawidˆowy numer. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Brakuje etykiety dla komendy GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Nie odnaleziono etykiety %s. + +. +:SHELL_CMD_FILE_NOT_FOUND +Nie odnaleziono pliku %s. + +. +:SHELL_CMD_FILE_EXISTS +Plik %s juž istnieje. + +. +:SHELL_CMD_DIR_VOLUME + Wolumin w stacji %c to %s + +. +:SHELL_CMD_DIR_INTRO + Katalog: %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d plik(˘w) %21s bajt˘w + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d katalog(˘w) %21s bajt˘w wolnych + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Dysk %c nie istnieje! +Musisz go najpierw zamontowa† . Wpisz intro lub intro mount aby uzyska† wiŠcej informacji. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Nieprawidˆowa komenda: %s. + +. +:SHELL_CMD_PAUSE +Naci˜nij dowolny klawisz, aby kontynuowa†... +. +:SHELL_CMD_PAUSE_HELP +Czekaj na wci˜niŠcie klawisza aby kontynuowa†. + +. +:SHELL_CMD_COPY_FAILURE +Nie udaˆo siŠ skopiowa†: %s. + +. +:SHELL_CMD_COPY_SUCCESS + skopiowano %d plik(˘w) + +. +:SHELL_CMD_SUBST_NO_REMOVE +Unable to remove, drive not in use. + +. +:SHELL_CMD_SUBST_FAILURE +Wykonanie polecenia SUBST nie powiodˆo siŠ. Može to by† spowodowane bˆŠdem w linii komend lub tym, že docelowy dysk jest užywany. +Polecenia SUBST možna užy† jedynie na lokalnych dyskach +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş Witaj w DOSBox Staging %-43s ş +ş ş +ş Kr˘tki wstŠp dla nowych užytkownik˘w, wpisz: INTRO ş +ş Aby zobaczy† listŠ wspieranych komend, wpisz: HELP ş +ş ş +ş Aby dostosowa† prŠdko˜† emulatora, užyj Ctrl+F11 i Ctrl+F12. ş +ş Aby zmieni† skr˘ty klawiaturowe Ctrl+F1. ş +ş WiŠcej informacji w pliku README w katalogu DOSBoxa. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox wspiera tryb Composite CGA. ş +ş Wci˜nij F12 aby wˆĽczy† lub wyˆĽczy† tryb composite. ş +ş (Alt+)F11 zmienia barwŠ; Ctrl+Alt+F11 zmienia model CGA. ş +ş ş + +. +:SHELL_STARTUP_CGA_MONO +ş Wci˜nij F11 aby zmieni† kolor ekaranu: jasny biaˆy, biaˆy, pomaraäczowy, zielony. ş +ş i Alt+F11 aby zmieni† kontrast/jasno˜†. ş + +. +:SHELL_STARTUP_HERC +ş Wci˜nij F11 aby zmieni† kolor ekaranu mono: jasny biaˆy, biaˆy, pomaraäczowy, zielony. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Wci˜nij Alt+Pauza aby wˆĽczy† debuggera albo wˆĽcz plik exe komendĽ DEBUG. ş +ş ş + +. +:SHELL_STARTUP_END +ş https://dosbox-staging.github.io ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Wy˜wietl lub zmieä aktualny katalog. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [dysk:][˜ciežka] +CHDIR [..] +CD [dysk:][˜ciežka] +CD [..] + + .. oznacza, že chcesz przej˜† do katalogu powyžej. + +Wpisz CD dysk: aby wy˜wietli† aktualnĽ ˜ciežkŠ na okre˜lonym dysku. +Wpisz CD bez parametr˘w aby wy˜wietli† aktualny dysk i katalog. + +. +:SHELL_CMD_CLS_HELP +Wyczy˜† ekran. + +. +:SHELL_CMD_DIR_HELP +Displays a list of files and subdirectories in a directory. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [drive:][path][filename] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [drive:][path][filename] + Specifies drive, directory, and/or files to list. + /W Uses wide list format. + /B Uses bare format (no heading information or summary). + /P Pauses after each screenful of information. + /AD Displays all directories. + /A-D Displays all files. + /O List by files in sorted order. + - Prefix to reverse order + sortorder N By name (alphabetic) S By size (smallest first) + E By extension (alphabetic) D By date & time (oldest first) + +. +:SHELL_CMD_ECHO_HELP +Wy˜wietla wiadomo˜ci i wˆĽcza/wyˆĽcza wypisywanie wykonywanych komend. + +. +:SHELL_CMD_EXIT_HELP +WyˆĽcz konsolŠ. + +. +:SHELL_CMD_HELP_HELP +Pokaž pomoc. + +. +:SHELL_CMD_MKDIR_HELP +Stw˘rz katalog. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [dysk:][˜ciežka] +MD [dysk:][˜ciežka] + +. +:SHELL_CMD_RMDIR_HELP +Usuä katalog. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [dysk:][˜ciežka] +RD [dysk:][˜ciežka] + +. +:SHELL_CMD_SET_HELP +Zmieä warto˜ci zmiennych ˜rodowiskowych. + +. +:SHELL_CMD_IF_HELP +W skrypcie powoduje warunkowe przetwarzanie. + +. +:SHELL_CMD_GOTO_HELP +W skrypcie przeskakuje do linii o danej etykiecie. + +. +:SHELL_CMD_SHIFT_HELP +Leftshift commandline parameters in a batch script. + +. +:SHELL_CMD_TYPE_HELP +Wy˜wietl zawarto˜† pliku testowego. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [DYSK:][—CIE˝KA][PLIK] + +. +:SHELL_CMD_REM_HELP +Dodaj komentarz w skrypcie. + +. +:SHELL_CMD_REM_HELP_LONG +REM [komentarz] + +. +:SHELL_CMD_NO_WILD +To prosta wersja komendy, symbole wieloznaczne nie sĽ dozwolone! + +. +:SHELL_CMD_RENAME_HELP +Zmieä nazwŠ jednego lub wielu plik˘w. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [dysk:][˜ciežka]nazwapliku1 nazwapliku2. +REN [dysk:][˜ciežka]nazwapliku1 nazwapliku2. + +PamiŠtaj, že nie možesz okre˜li† nowego dysku i ˜ciežki dla pliku docelowego. + +. +:SHELL_CMD_DELETE_HELP +Usuä pliki. + +. +:SHELL_CMD_COPY_HELP +Kopiuj plik. + +. +:SHELL_CMD_CALL_HELP +Uruchom skrypt z innego skryptu. + +. +:SHELL_CMD_SUBST_HELP +PrzyporzĽdkuj wewnŠtrzny katalog do dysku. + +. +:SHELL_CMD_LOADHIGH_HELP +Wczytaj program do pamiŠci g˘rnej (wymaga xms=true, umb=true). + +. +:SHELL_CMD_LS_HELP +Wypisz zawarto˜† katalogu. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [PATTERN] + +. +:SHELL_CMD_LS_PATH_ERR +ls: nie ma dostŠpu do '%s': Nie ma takiego pliku ani katalogu + +. +:SHELL_CMD_CHOICE_HELP +Czeka na wci˜niŠcie klawisza i ustawia ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:možliwo˜ci] [/N] [/S] tekst + /C[:]možliwo˜ci - Okre˜la dostŠpne klawisze. Domy˜lnie: yn. + /N - Nie wy˜wietlaj možliwo˜ci na koniec zgˆoszenia. + /S - WˆĽcza rozr˘žnianie wielko˜ci liter možliwo˜ci. + tekst - Tekst wy˜wietlany w zgˆoszeniu. + +. +:SHELL_CMD_ATTRIB_HELP +Nie powoduje žadnego efektu. Dostarczone dla zachowania kompatybilno˜ci. + +. +:SHELL_CMD_PATH_HELP +Dostarczone dla zachowania kompatybilno˜ci. + +. +:SHELL_CMD_VER_HELP +Pokaž lub ustaw raportowanŠ wersjŠ DOS. + +. +:SHELL_CMD_VER_HELP_LONG +Užycie: + ver + ver set WERSJA + +Gdzie: + WERSJA može zawiera† numer gˆ˘wny, np. 5 lub takže dwucyfrowy numer + dodatkowy, jak np. 6.22, 7.01 lub 7.10. Numer dodatkowy wersji + može by† r˘wniež odseparowany spacjĽ, np: 6 22, 7 01, lub 7 10. + +Notatki: + Wersja DOS može by† r˘wniež zmieniona w pliku konfiguracyjnym w sekcji [dos] + ustawiajĽc "ver = WERSJA". + +Przykˆady: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging wersja %s +DOS wersja %d.%02d + +. +:SHELL_CMD_VER_INVALID +Podana wersja DOSa jest nieprawidˆowa. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/ru/ru_RU.lng dosbox-staging-0.77.0/contrib/translations/ru/ru_RU.lng --- dosbox-staging-0.76.0/contrib/translations/ru/ru_RU.lng 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/ru/ru_RU.lng 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1422 @@ +:CONFIG_FULLSCREEN +‡ Żăáâ¨âě DOSBox ˘ ŻŽŤ­ŽíŞŕ ­­ŽŹ ༌¨ŹĽ. + ŚŹ¨âĽ Alt+Enter, çâŽĄë ˘Ľŕ­ăâěáď ŽĄŕ â­Ž ˘ ŽŞŽ­­ëŠ ༌¨Ź. +. +:CONFIG_DISPLAY +ŠŽŤ¨çĽá⢎ ¨áŻŽŤě§ăĽŹëĺ ¤¨áŻŤĽĽ˘. ‡­ çĽ­¨Ľ § ˘¨á¨â Žâ Ž‘ ¨ ­ áâŕŽĽŞ ŻŽŤě§Ž˘ âĽŤď. +. +:CONFIG_VSYNC + áâŕŽŠŞ  ˘Ľŕ⨪ Ťě­ŽŠ ᨭĺ஭¨§ ć¨¨ ­Ľ ༠Ť¨§Ž˘ ­  (­ áâŕŽŠŞ  ¨Ł­Žŕ¨ŕăĽâáď). +. +:CONFIG_FULLRESOLUTION +Š ŞŽĽ ŕ §ŕĽčĽ­¨Ľ ¨áŻŽŤě§Ž˘ âě ¤Ťď ŻŽŤ­ŽíŞŕ ­­ŽŁŽ ༌¨Ź : 'original', 'desktop' +¨Ť¨ 䨪á¨ŕŽ˘ ­­ëŠ ŕ §ŹĽŕ (­ Żŕ¨ŹĽŕ, '1024x768'). +. +:CONFIG_WINDOWRESOLUTION +“áâ ­Ž˘¨âĽ ŕ §ŹĽŕ ŽŞ­ , ŞŽâŽŕŽĽ Ąă¤Ľâ ¨áŻŽŤě§Ž˘ âěáď ˘ ŽŞŽ­­ŽŹ ༌¨ŹĽ: + default: ‚ëĄŽŕ ­ ¨Ťăç輣Ž ˘ ŕ¨ ­â  ˘ § ˘¨á¨ŹŽá⨠Žâ ˘ čĽŁŽ + ŽŞŕ㌼­¨ď ¨ ¤ŕăŁ¨ĺ ­ áâ஥Ş. + original: ˆ§ŹĽ­¨âě ŕ §ŹĽŕ ŽŞ­  ˘ ᎎ⢼âá⢨¨ á ŕ §ŕĽčĽ­¨ĽŹ, ˘ëĄŕ ­­ëŹ + íŹăŤ¨ŕŽ˘ ­­ŽŠ ŻŕŽŁŕ ŹŹŽŠ. + resizable: ‘¤ĽŤ âě ŽŞ­Ž íŹăŤďâŽŕ  ¨§ŹĽ­ďĽŹëŹ. + âŽ íŞáŻĽŕ¨ŹĽ­â Ťě­ëŠ ˘ ŕ¨ ­â, ŕ ĄŽâ Ľâ ⎍쪎 á + output=opengl ¨ glshader=sharp (¨Ť¨ 'none') + '˜x‚': Œ áčâ Ą¨ŕŽ˘ âě ᎤĽŕŚ¨ŹŽĽ ŽŞ­  ¤Ž 㪠§ ­­ŽŁŽ ŕ §ŹĽŕ , + ˘ äŽŕŹ âĽ ˜x‚.  Żŕ¨ŹĽŕ: '1024x768'. + Œ áčâ Ą¨ŕŽ˘ ­¨Ľ ­Ľ ˘ëŻŽŤ­ďĽâáď ¤Ťď output=surface. +. +:CONFIG_OUTPUT +Š Şăî ˘¨¤ĽŽá¨á⼏㠨ᯎŤě§Ž˘ âě ¤Ťď ˘ë˘Ž¤  ¨§ŽĄŕ ŚĽ­¨ď. +. +:CONFIG_TEXTURE_RENDERER +‚를ŕ¨âĽ ¤ŕ Š˘Ľŕ ༭¤Ľŕ  Żŕ¨ ¨áŻŽŤě§Ž˘ ­¨¨ ༌¨Ź  ˘ë˘Ž¤  ⼪áâăŕ. +ˆáŻŽŤě§ăŠâĽ texture_renderer=auto ¤Ťď  ˘âŽŹ â¨çĽáŞŽŁŽ ˘ëĄŽŕ . +. +:CONFIG_CAPTURE_MOUSE +‚를ŕ¨âĽ ŹĽâŽ¤ ăŻŕ ˘ŤĽ­¨ď Źëčěî: + onclick: Œëčě Ąă¤Ľâ § ĺ˘ çĽ­  ŻŽáŤĽ ŻĽŕ˘ŽŁŽ + ­ Ś â¨ď ˘­ăâਠŽŞ­ . + onstart: Œëčě § ĺ˘ â뢠Ľâáď Żŕ¨ áâ ŕ⼠+ (ŻŽ¤ŽĄ­Ž ­ áâŽď鼏ă DOS). + seamless: Œëčě ŹŽŚĽâ ŻŤ ˘­Ž ŻĽŕĽŹĽé âěáď ˘­ăâਠ¨ á­ ŕ㌨ DOSBox + ŽŞ­  ¨ ­Ľ ŹŽŚĽâ Ąëâě § ĺ˘ çĽ­ . + nomouse: Œëčě ŽâŞŤî缭  ¨ áŞŕëâ  ¨ ­Ľ ŽâŻŕ ˘ŤďĽâ + Ꭵëâ¨ď ˘˘Ž¤  ˘ ¨Łŕă. +‚를ŕ¨âĽ ᯎᎥ ŽĄŕ ĄŽâި ­ Ś â¨ď á༤­ĽŠ Ş­ŽŻŞ¨ Źëč¨ (˘âŽŕŽŠ Ż ŕ ŹĽâŕ): + middlegame:  Ś â¨Ľ á༤­ĽŠ Ş­ŽŻŞ¨ ŽâŻŕ ˘ŤďĽâ Ꭵëâ¨ď ˘ ¨Łŕă + (Ctrl+F10 Žá˘ŽĄŽŚ¤ Ľâ Źëčě). + middlerelease:  Ś â¨Ľ á༤­ĽŠ Ş­ŽŻŞ¨ Žá˘ŽĄŽŚ¤ Ľâ Źëčě ­Ľ ŽâŻŕ ˘Ťďď + Ꭵëâ¨ď ˘ ¨Łŕă. Ž¤­ ŞŽ, ­ Ś â¨Ľ á༤­ĽŠ Ş­ŽŻŞ¨ + Ąă¤Ľâ ŽâŻŕ ˘Ťďâě Ꭵëâ¨ď ˘ ¨Łŕă ˘ ŻŽŤ­ŽíŞŕ ­­ŽŹ ༌¨ŹĽ + ¨Ť¨ ŞŽŁ¤  ăáâ ­Ž˘ŤĽ­ ŹĽâŽ¤ ăŻŕ ˘ŤĽ­¨ď 'seamless'. + Ctrl+F10 â ŞŚĽ Žá˘ŽĄŽŚ¤ Ľâ Źëčě. +‡­ çĽ­¨ď ŻŽ ㏎Ťç ­¨î (ĽáŤ¨ ­Ľâ ¨Ť¨ ­ĽŻŕ ˘¨Ťě­ëĽ): 'seamless middlerelease' +. +:CONFIG_SENSITIVITY +—ă˘á⢨⼍쭎áâě Źëč¨. „ŽŻŽŤ­¨âĽŤě­ëŠ ˘âŽŕŽŠ Ż ŕ ŹĽâŕ ŽŻŕĽ¤ĽŤďĽâ ˘Ľŕ⨪ Ťě­ăî çă˘á⢨⼍쭎áâě (­ Żŕ¨ŹĽŕ, '100,-50'). +. +:CONFIG_RAW_MOUSE_INPUT +‚ŞŤî缭¨Ľ í⎊ ­ áâŕŽŠŞ¨, ¨Ł­Žŕ¨ŕăĽâ ­ áâŕŽŠŞ¨ ă᪎༭¨ď ¨ +çă˘á⢨⼍쭎á⨠Źëč¨ ˘ ŽŻĽŕ ć¨Ž­­ŽŠ á¨á⼏Ľ. âŽ ŕ ĄŽâ Ľâ ˘ +ŻŽŤ­ŽíŞŕ ­­ŽŹ ༌¨ŹĽ ¨Ť¨ Żŕ¨ § ĺ˘ âĽ Źëč¨ ˘ ŽŞŽ­­ŽŹ ༌¨ŹĽ. +. +:CONFIG_WAITONERROR +†¤ âě, ŻĽŕĽ¤ § Şŕë⨼Ź ŞŽ­áŽŤ¨ DOSBox, ĽáŤ¨ Ľáâě Žč¨ĄŞ¨. +. +:CONFIG_PRIORITY +“஢­¨ Żŕ¨Žŕ¨âĽâ  ¤Ťď DOSBox. ‚âŽŕŽŠ Ż ŕ ŹĽâŕ ¤ĽŠáâ˘ăĽâ, ŞŽŁ¤  ŽŞ­Ž DOSBox ĄĽ§ 䎪ăá  ¨Ť¨ á˘ńŕ­ăâŽ. +‡­ çĽ­¨Ľ 'pause' ¤Žáâ㯭Ž ⎍쪎 ¤Ťď ˘âŽŕŽŁŽ Ż ŕ ŹĽâŕ . +. +:CONFIG_MAPPERFILE +” ŠŤ, ¨áŻŽŤě§ăĽŹëŠ ¤Ťď § Łŕ㧪¨/áŽĺŕ ­Ľ­¨ď ᎯŽáâ ˘ŤĽ­¨Š ¨§ ŞŤî缊/Ꭵë⨊. +‘ĄŕŽá ᎯŽáâ ˘ŤĽ­¨ď ŕ ĄŽâ Ľâ ⎍쪎 Ꭰ§­ çĽ­¨ĽŹ ŻŽ ㏎Ťç ­¨î. +. +:CONFIG_SCREENSAVER +ˆáŻŽŤě§ăŠâĽ 'allow' ¨Ť¨ 'block' ¤Ťď ŻĽŕĽŽŻŕĽ¤ĽŤĽ­¨ď SDL_VIDEO_ALLOW_SCREENSAVER +ŻĽŕĽŹĽ­­ ď ŽŞŕ㌼­¨ď (ŞŽâŽŕ ď ŽĄëç­Ž ĄŤŽŞ¨ŕăĽâ ĺŕ ­¨âĽŤě íŞŕ ­  Ž‘ +ŻŽŞ  ŕ ĄŽâ Ľâ íŹăŤďâŽŕ). +. +:CONFIG_LANGUAGE +‚를ŕ¨âĽ ¤ŕ㣎Š ď§ëŞŽ˘ŽŠ ä ŠŤ. +. +:CONFIG_MACHINE +’¨Ż íŹăŤ¨ŕ㼏ŽŁŽ ŞŽŹŻěîâĽŕ  ¤Ťď DOSBox. +. +:CONFIG_CAPTURES +„¨ŕĽŞâŽŕ¨ď ¤Ťď § ĺ˘ â  Źă§ëި ¨ á­¨ŹŞŽ˘ íŞŕ ­ . +. +:CONFIG_MEMSIZE +ŽĄęńŹ ¤Žáâ㯭ŽŠ ŽŻĽŕ â¨˘­ŽŠ Ż Źď⨠DOSBox ˘ ŹĽŁ Ą Šâ ĺ. +âŽ §­ çĽ­¨Ľ ŤăçčĽ Žáâ ˘¨âě ŻŽ ㏎Ťç ­¨î, çâŽĄë ¨§ĄĽŚ âě ŻŕŽĄŤĽŹ á ­ĽŞŽâŽŕ돨 ¨Łŕ Ź¨, +ĺŽâď ­ĽáŞŽŤěŞŽ ¨Łŕ ŹŽŁăâ ŻŽâ༥Ž˘ âě ĄŽŤĽĽ ˘ëᎪ¨ĺ §­ çĽ­¨Š. +Š Ş Żŕ ˘¨ŤŽ, ­Ľâ ­¨Ş ŞŽŁŽ ŻŕĽ¨ŹăéĽá⢠ ˘ ᪎ŕŽá⨠Żŕ¨ ŻŽ˘ë輭¨¨ í⎊ ˘ĽŤ¨ç¨­ë. +. +:CONFIG_STARTUP_VERBOSITY +“Żŕ ˘ŤďĽâ ŞŽŤ¨çĽá⢎Ź ¨­äŽŕŹ ć¨¨ ŻĽŕĽ¤ ŽâŽĄŕ ŚĽ­¨ĽŹ ŻŕŽŁŕ ŹŹë: + | ‡ áâ ˘Ş  | ŕ¨˘Ľâá⢨Ľ |  ­­¨Š ˘ë˘Ž¤ +high | ¤  | ¤  | ¤  +medium | ­Ľâ | ¤  | ¤  +low | ­Ľâ | ­Ľâ | ¤  +quiet | ­Ľâ | ­Ľâ | ­Ľâ +splash_only | ¤  | ­Ľâ | ­Ľâ +auto | 'low', ĽáŤ¨ ŻĽŕĽ¤ ­ ¨áŻŽŤ­ďĽŹëŠ ä ŠŤ ¨Ť¨ ¤¨ŕĽŞâŽŕ¨ď, ¨­ çĽ 'high' +. +:CONFIG_FRAMESKIP +‘ŞŽŤěŞŽ Ş ¤ŕŽ˘ DOSBox ŻŕŽŻă᪠Ľâ ŻĽŕĽ¤ Žâŕ¨áŽ˘ŞŽŠ Ž¤­ŽŁŽ Ş ¤ŕ . +. +:CONFIG_ASPECT +Œ áčâ Ą¨ŕăĽâ ˘Ľŕ⨪ Ťě­ŽĽ ŕ §ŕĽčĽ­¨Ľ ¤Ťď ŻŽŤă缭¨ď ¨§ŽĄŕ ŚĽ­¨ď á ᎎ⭎輭¨ĽŹ +áâŽŕŽ­ 4:3. ‘ŽŽâ­ŽčĽ­¨Ľ, ᎢŻ ¤ î鼼 á Žŕ¨Ł¨­ Ťě­ëŹ¨ ŹŽ­¨âŽŕ Ź¨, +¤Ťď ŞŽâŽŕëĺ ĄëŤŽ ࠧࠥŽâ ­Ž ĄŽŤě設á⢎ DOS-¨Łŕ. â  ­ áâŕŽŠŞ  ˘Ť¨ďĽâ +⎍쪎 ­  ༌¨Źë ˘¨¤ĽŽ, ¨áŻŽŤě§ăî騼 ­Ľáâ ­¤ ŕâ­ëĽ ŕ §ŕĽčĽ­¨ď, â Ş¨Ľ Ş Ş +'320x200' ¨Ť¨ '640x400'; Ł¤Ľ ˘ ˘¨¤Ľ Ş˘ ¤ŕ â­ëĺ Ż¨ŞáĽŤĽŠ, ­ Żŕ¨ŹĽŕ, '640x480' +¨ '800x600', Ąă¤ă⠎⎥ࠌ âěáď Ş Ş Ľáâě. +. +:CONFIG_MONOCHROME_PALETTE +‚를ŕ¨âĽ Ż Ť¨âŕă ŻŽ ㏎Ťç ­¨î ¤Ťď ŹŽ­Žĺ஬­ŽŁŽ ¤¨áŻŤĽď. + ĄŽâ Ľâ ⎍쪎 Żŕ¨ íŹăŤď樨 'hercules' ¨Ť¨ 'cga_mono'. +‚ë â ŞŚĽ ŹŽŚĽâĽ ŻĽŕĽŹĽé âěáď ŻŽ ¤ŽáâăŻ­ëŹ ć˘Ľâ Ź, ¨áŻŽŤě§ăď F11. +. +:CONFIG_SCALER +Œ áčâ Ą¨ŕăî騊  ŤŁŽŕ¨âŹ, ¨áŻŽŤě§ăĽŹëŠ ¤Ťď 㢼Ť¨çĽ­¨ď/ŕ áč¨ŕĽ­¨ď +༌¨ŹŽ˘ ­¨§ŞŽŁŽ ŕ §ŕĽčĽ­¨ď. …፨ ¤ŽĄ ˘¨âě 'forced', ⎠Ź áčâ Ą¨ŕăî騊 + ŤŁŽŕ¨âŹ Ąă¤Ľâ ¨áŻŽŤě§Ž˘ âěáď, ¤ ŚĽ ĽáŤ¨ ༧ăŤěâ â ŹŽŚĽâ Ąëâě ­ĽŚĽŤ âĽŤě­ëŹ. +ŽĄŕ â¨âĽ ˘­¨Ź ­¨Ľ, ç⎠­ĽŞŽâŽŕëĽ Ź áčâ Ą¨ŕăî騼  ŤŁŽŕ¨âŹë ŹŽŁă⠨ᯎŤě§Ž˘ âě +çńŕ­ëĽ ŻŽŤď ¤Ťď § ŻŽŤ­Ľ­¨ď ¨§ŽĄŕ ŚĽ­¨ď ˘ ŻŕĽ¤ĽŤ ĺ ­ áâ஥­­ŽŁŽ ŕ §ŕĽčĽ­¨ď +¤¨áŻŤĽď. …፨ í⎠­ĽŚĽŤ âĽŤě­Ž, ŻŽŻŕŽĄăŠâĽ ¤ŕ㣎Š Ź áčâ Ą¨ŕăî騊  ŤŁŽŕ¨âŹ +¨Ť¨ ˘ŞŤîç¨âĽ ˘ë˘Ž¤ ¨§ŽĄŕ ŚĽ­¨ď á ŻŽŤ­ëŹ ŕ §ŕĽčĽ­¨ĽŹ. +. +:CONFIG_GLSHADER +“Ş Ś¨âĽ 'none', ¨Ť¨ GLSL-輊¤Ľŕ.  ĄŽâ Ľâ ⎍쪎 +á ˘ë˘Ž¤ŽŹ ¨§ŽĄŕ ŚĽ­¨ď OpenGL. ŒŽŚĽâ Ąëâě Ş Ş  ĄáŽŤîâ­ëŠ +Żăâě, â Ş ¨ ä ŠŤ ˘ á㥤¨ŕĽŞâŽŕ¨¨ 'glshaders' ˘ ¤¨ŕĽŞâŽŕ¨¨ +ŞŽ­ä¨Łăŕ ć¨¨ DOSBox, ¨Ť¨ Ž¤¨­ ¨§ ˘áâ஥­­ëĺ GLSL-輊¤ĽŕŽ˘: +'advinterp2x', 'advinterp3x', 'advmame2x', 'advmame3x', +'crt-easymode-flat', 'crt-fakelottes-flat', 'rgb2x', 'rgb3x', +'scan2x', 'scan3x', 'tv2x', 'tv3x', 'sharp' ('default'). +. +:CONFIG_CORE +Ÿ¤ŕŽ ŻŕŽćĽááŽŕ , ¨áŻŽŤě§ăĽŹŽĽ ˘ íŹăŤď樨. +‡­ çĽ­¨Ľ 'auto' ŻĽŕĽŞŤîç¨â ˘ ¤¨­ Ź¨çĽáިŠ ༌¨Ź, ĽáŤ¨ í⎠¤Žáâ㯭Ž ¨ 漍ĽáŽŽĄŕ §­Ž. +. +:CONFIG_CPUTYPE +’¨Ż ŻŕŽćĽááŽŕ , ¨áŻŽŤě§ăĽŹëŠ ˘ íŹăŤď樨. ‡­ çĽ­¨Ľ 'auto' - á ŹëŠ ĄëáâŕëŠ ˘ëĄŽŕ. +. +:CONFIG_CYCLES +ŠŽŤ¨çĽá⢎ ¨­áâŕăŞć¨Š DOSBox Żëâ îé¨ĺáď íŹăŤ¨ŕŽ˘ âěáď ˘ Ş Ś¤ăî Ź¨ŤŤ¨áĽŞă­¤ă. +“áâ ­Ž˘Ş  ፨誎Ź ĄŽŤě莣Ž §­ çĽ­¨ď Żŕ¨˘Ž¤¨â Ş ŻŽâĽŕĽ §˘ăŞ  ¨ § Ż §¤ë˘ ­¨î. +–¨ŞŤë ŹŽŚ­Ž ăáâ ­ ˘Ť¨˘ âě â༏ď ᯎᎥ Ź¨: + 'auto': ëâ Ľâáď 㣠¤ âě, ç⎠­ăŚ­Ž ¨ŁŕĽ. + ŽĄëç­Ž í⎠ࠥŽâ Ľâ, ­Ž ¤Ťď ­ĽŞŽâŽŕëĺ ¨Łŕ ŹŽŚĽâ ­Ľ áŕ ĄŽâ âě. + 'fixed ç¨áŤŽ': “áâ ­ ˘Ť¨˘ Ľâ 䨪á¨ŕŽ˘ ­­ŽĽ ŞŽŤ¨çĽá⢎ 横ŤŽ˘. âŽ, ŽĄëç­Ž, âŽ, + ç⎠­ăŚ­Ž, ĽáŤ¨ 'auto' ­Ľ ŻŽŹŽŁ (ŕ¨ŹĽŕ: 'fixed 4000'). + 'max': ‚뤼Ť¨â á⎍쪎 横ŤŽ˘, ᪎ŤěŞŽ ŻŽ§˘ŽŤ¨â ˘ë¤ĽŤ¨âě ŻŕŽćĽááŽŕ. +. +:CONFIG_CYCLEUP +ŠŽŤ¨çĽá⢎ 横ŤŽ˘ ¤Ťď ㏼­ě輭¨ď/㢼Ť¨çĽ­¨ď á ŻŽŹŽéěî "ŁŽŕďç¨ĺ" ŞŤ ˘¨č.(Ctrl+F11/Ctrl+F12) +. +:CONFIG_CYCLEDOWN +‡­ çĽ­¨Ľ ­¨ŚĽ 100 Ąă¤Ľâ ˘ ŻŕŽćĽ­â ĺ. +. +:CONFIG_NOSOUND +‚ŞŤîç Ľâ ĄĽáčăŹ­ëŠ ŕĽŚ¨Ź, §˘ăŞ ŻŕŽ¤ŽŤŚ Ľâ íŹăŤ¨ŕŽ˘ âěáď. +. +:CONFIG_RATE +Œ¨ŞčĽŕ­ ď ç áâŽâ  ¤¨áŞŕĽâ¨§ ć¨¨. ‡­ çĽ­¨Ľ ç áâŽâë, ­Ľ ŻŽ¤¤ĽŕŚ¨˘ ĽŹŽĽ §˘ăŞŽ˘ŽŠ Ş ŕ⎊, á­¨§¨â Ş çĽá⢎ §˘ăŞ . +. +:CONFIG_BLOCKSIZE + §ŹĽŕ ĄŤŽŞ  Ź¨ŞčĽŕ , ĄŽŤě証 ĄŤŽŞ¨ ŹŽŁă⠯༤Žâ˘ŕ â¨âě § ¨Ş ­¨Ľ §˘ăŞ , ­Ž §˘ăŞ Ąă¤Ľâ ĄŽŤěčĽ § Ż §¤ë˘ âě. +. +:CONFIG_PREBUFFER +‘ŞŽŤěŞŽ Ź¨ŤŤ¨áĽŞă­¤ ­ăŚ­Ž 㤥ন˘ âě ¤ ­­ëĽ ­  ˘Ľŕ設Ľ ĄŤŽŞ . +. +:CONFIG_MIDIDEVICE +“áâனá⢎, ŞŽâŽŕŽĽ Ąă¤Ľâ Żŕ¨­¨Ź âě MIDI-¤ ­­ëĽ (Žâ íŹăŤ¨ŕŽ˘ ­­ŽŁŽ MIDI +¨­âĽŕäĽŠá  - MPU-401). ‚를ŕ¨âĽ Ž¤¨­ ¨§ ፼¤ăîé¨ĺ ˘ ŕ¨ ­âŽ˘: + 'fluidsynth': ˆáŻŽŤě§Ž˘ âě ˘áâ஥­­ëŠ MIDI-ᨭ⼧ âŽŕ. + —¨â ŠâĽ ŕ §¤ĽŤ [fluidsynth] ¤Ťď ŻŽ¤ŕŽĄ­ŽŠ ŞŽ­ä¨Łăŕ ć¨¨. + 'mt32': ˆáŻŽŤě§Ž˘ âě ˘áâ஥­­ëŠ Roland MT-32 ᨭ⼧ âŽŕ. + —¨â ŠâĽ ŕ §¤ĽŤ [mt32] ¤Ťď ŻŽ¤ŕŽĄ­ŽŠ ŞŽ­ä¨Łăŕ ć¨¨. + 'auto': ˆáŻŽŤě§Ž˘ âě ŻĽŕ˘ëŠ ŕ ĄŽâ î騊 ˘­Ľč­¨Š MIDI-ŻŕŽ¨Łŕ뢠⼍ě. + ŒŽŚĽâ Ąëâě ŻŕŽŁŕ ŹŹ­ëŹ ᨭ⼧ âŽŕŽŹ ¨Ť¨ 䨧¨çĽáިŹ ăáâனá⢎Ź. +. +:CONFIG_MIDICONFIG +ŽŻć¨¨ ŞŽ­ä¨Łăŕ ć¨¨ ¤Ťď ˘ëĄŕ ­­ŽŁŽ MIDI-¨­âĽŕ伊á . +ŽĄëç­Ž í⎠¨¤Ľ­â¨ä¨Ş âŽŕ ¨Ť¨ ¨Źď MIDI-ᨭ⼧ âŽŕ , ŞŽâŽŕëŠ ‚ Ź ­ăŚĽ­. +¤Ťď ¨áŻŽŤě§Ž˘ ­¨ď (­ Š¤¨âĽ id/¨Źď á ŻŽŹŽéěî ŞŽŹ ­¤ë DOS 'mixer /listmidi'). +- â  ŽŻć¨ď ­Ľ ¨ŹĽĽâ íääĽŞâ  Żŕ¨ ¨áŻŽŤě§Ž˘ ­¨¨ ˘áâ஥­­ëĺ ᨭ⼧ âŽŕŽ˘ + (mididevice = fluidsynth ¨Ť¨ mididevice = mt32). +- ŕ¨ ¨áŻŽŤě§Ž˘ ­¨¨ ALSA, ¨áŻŽŤě§ăŠâĽ Linux ŞŽŹ ­¤ă 'aplaymidi -l' ¤Ťď ŻŽŞ §  + ᯨ᪠ ¤Žáâ㯭ëĺ MIDI-ŻŽŕ⎢, ¨ ˘ëĄĽŕ¨âĽ Ž¤¨­ (­ Żŕ¨ŹĽŕ, 'midiconfig=128:0'). + ¤Ťď ŞŤ¨Ľ­â  Ἢ˘Ľ­áŽŕ  128, ŻŽŕâ 0). +- …፨ ‚ë ¨áŻŽŤě§ăĽâĽ 䨧¨çĽáިŠ Roland MT-32 á ༢¨§¨ĽŠ 0 PCB, +  ŻŻ ŕ â­ŽĽ ŽĄĽáŻĽçĽ­¨Ľ ŹŽŚĽâ ŻŽâ༥Ž˘ âě § ¤ĽŕŚŞ¨, çâŽĄë ŻŕĽ¤Žâ˘ŕ â¨âě + ŻĽŕĽŻŽŤ­Ľ­¨Ľ ĽŁŽ ĄăäĽŕ . ‚ í⎏ áŤăç Ľ ¤ŽĄ ˘ě⼠'delaysysex', + ­ Żŕ¨ŹĽŕ: 'midiconfig=2 delaysysex'. +—¨â ŠâĽ README/Manual ¤Ťď ŻŽŤă缭¨ď ĄŽŤĽĽ ŻŽ¤ŕŽĄ­ŽŠ ¨­äŽŕŹ ć¨¨. +. +:CONFIG_MPU401 +’¨Ż MPU-401 ¤Ťď íŹăŤď樨. +. +:CONFIG_SOUNDFONT +ăâě Ş ä ŠŤă SoundFont ˘ äŽŕŹ âĽ .sf2. ŒŽŚ­Ž ¨áŻŽŤě§Ž˘ âě + ĄáŽŤîâ­ëŠ ¨Ť¨ Žâ­Žá¨âĽŤě­ëŠ Żăâě, ¨Ť¨ ¨Źď .sf2 ˘­ăâਠ+á㥤¨ŕĽŞâŽŕ¨¨ 'soundfonts' ˘ ¤¨ŕĽŞâŽŕ¨¨ ŞŽ­ä¨Łăŕ ć¨¨ DOSBox. +ĽŽĄď§ âĽŤě­ëŠ ŻŕŽćĽ­â Ąă¤Ľâ ¨§ŹĽ­ďâě ŁŕŽŹŞŽáâě SoundFont. + Żŕ¨ŹĽŕ: 'FluidR3_GM.sf2 50' ŽáŤ Ą¨â Ľń ­  50 ŻŕŽćĽ­âŽ˘. +ˆ§ŹĽ­Ľ­¨Ľ ˘ ŻŕŽćĽ­â ĺ ŹŽŚĽâ Ąëâě ˘ ŻŕĽ¤ĽŤ ĺ Žâ 1 ¤Ž 500. +. +:CONFIG_MODEL +ŒŽ¤ĽŤě ᨭ⼧ âŽŕ  ¤Ťď ¨áŻŽŤě§Ž˘ ­¨ď. Ž ㏎Ťç ­¨î 'auto' ŻŕĽ¤ŻŽç¨â Ľâ CM-32L, +ĽáŤ¨ ŽĄ  ­ ĄŽŕ  ‡“ Ąă¤ă⠯༤Žáâ ˘ŤĽ­ë. „Ťď ŕ ­­¨ĺ ¨Łŕ Sierra ¨ Dune 2 +༪ŽŹĽ­¤ăĽâáď ¨áŻŽŤě§Ž˘ âě 'mt32', ˘ ⎠˘ŕĽŹď Ş Ş ĄŽŤĽĽ ­Ž˘ëĽ ¨Łŕë, ŽĄëç­Ž, +¨áŻŽŤě§ăîâ ¤ŽŻŽŤ­¨âĽŤě­ëĽ §˘ăŞŽ˘ëĽ íä伪âë CM-32L (¨áŻŽŤě§ăŠâĽ 'auto' ¨Ť¨ 'cm32l'). +. +:CONFIG_ROMDIR +„¨ŕĽŞâŽŕ¨ď, ᎤĽŕŚ é ď Ž¤­ă ¨§ ¤˘ăĺ Ż ŕ MT-32 ¨/¨Ť¨ CM-32L ‡“, +” ŠŤë ¤ŽŤŚ­ë Ąëâě ­ §˘ ­ë § ŁŤ ˘­ëŹ¨ ĄăŞ˘ Ź¨ ¨ ⎍쪎 â Ş¨Ź ŽĄŕ §ŽŹ: + - MT-32 ‡“ Ż ŕ : MT32_CONTROL.ROM ¨ MT32_PCM.ROM + - CM-32L ‡“ Ż ŕ : CM32L_CONTROL.ROM ¨ CM32L_PCM.ROM +„¨ŕĽŞâŽŕ¨ď ŹŽŚĽâ Ąëâě  ĄáŽŤîâ­ŽŠ ¨Ť¨ Žâ­Žá¨âĽŤě­ŽŠ, ¨Ť¨ Ąëâě Żăá⎊, +¤Ťď ¨áŻŽŤě§Ž˘ ­¨ď á㥤¨ŕĽŞâŽŕ¨¨ 'mt32-roms' ˘ ¤¨ŕĽŞâŽŕ¨¨ ŞŽ­ä¨Łăŕ ć¨¨ +DOSBox, á ŻŽáŤĽ¤ăî鼊 ŻŕŽ˘ĽŕŞŽŠ ¤ŕăŁ¨ĺ ŹĽáâ ˘ á¨á⼏Ľ. +. +:CONFIG_SBTYPE +’¨Ż íŹăŤď樨 ¤Ťď Sound Blaster. ‡­ çĽ­¨Ľ 'gb' - í⎠Game Blaster. +. +:CONFIG_SBBASE +€¤ŕĽá ˘˘Ž¤ -˘ë˘Ž¤  ¤Ťď Sound Blaster. +. +:CONFIG_IRQ +ŽŹĽŕ ŻŕĽŕ뢠­¨ď ¤Ťď Sound Blaster. +. +:CONFIG_DMA +Š ­ Ť ŻŕŁŽ ¤Žáâ㯠 ¤Ťď Sound Blaster. +. +:CONFIG_HDMA +Š ­ Ť áâ ŕ輣Ž ŻŕŁŽ ¤Žáâ㯠 ¤Ťď Sound Blaster. +. +:CONFIG_SBMIXER + §ŕĽč¨âě Ź¨ŞčĽŕă Sound Blaster ¨§ŹĽ­ďâě DOSBox Ź¨ŞčĽŕ. +. +:CONFIG_OPLRATE +ŽŻć¨ď 'oplrate' ăáâ ŕĽŤ . ”ŽŕŹ  ˘ŽŤ­ë Ž‹ ⼯Ľŕě Żŕ¨˘ď§ ­  Ş áŞŽŕŽá⨠+ ˘ŽáŻŕŽ¨§˘Ľ¤Ľ­¨ď Ź¨ŞčĽŕ , çâŽĄë ¨§ĄĽŚ âě ŻĽŕĽ¤¨áŞŕĽâ¨§ ć¨¨. +. +:CONFIG_OPLMODE +’¨Ż íŹăŤď樨 Ž‹.   'auto' ༌¨Ź ŽŻŕĽ¤ĽŤďĽâáď 'sbtype'. +‚ἠ༌¨Źë OPL ᎢŹĽá⨏ë á AdLib, §  ¨áŞŤî缭¨ĽŹ 'cms'. +. +:CONFIG_OPLEMU +ˆáâŽç­¨Ş íŹăŤď樨 OPL. 'compat' ŽĄĽáŻĽç¨˘ Ľâ Ťăç輼 Ş çĽá⢎, +Ž ㏎Ťç ­¨î ¨áŻŽŤě§ăĽâáď 'nuked', Ž­ ­ ¨ĄŽŤĽĽ âŽç­ëŠ, ­Ž á ŹëŠ ŕĽáăŕáŽńŹŞ¨Š. +. +:CONFIG_GUS +‚ŞŤîç¨âě íŹăŤďć¨î Gravis UltraSound. +. +:CONFIG_GUSBASE +€¤ŕĽá ˘˘Ž¤ -˘ë˘Ž¤  ¤Ťď Gravis UltraSound. +. +:CONFIG_GUSIRQ +ŽŹĽŕ ŻŕĽŕ뢠­¨ď ¤Ťď Gravis UltraSound. +. +:CONFIG_GUSDMA +Š ­ Ť ŻŕŁŽ ¤Žáâ㯠 ¤Ťď Gravis UltraSound. +. +:CONFIG_ULTRADIR +ăâě Ş ¤¨ŕĽŞâŽŕ¨¨ UltraSound. ‚ í⎊ ¤¨ŕĽŞâŽŕ¨¨ +¤ŽŤŚ­  Ąëâě MIDI-á㥤¨ŕĽŞâŽŕ¨ď, ᎤĽŕŚ é ď +Ż âç-ä ŠŤë ¤Ťď ˘ŽáŻŕŽ¨§˘Ľ¤Ľ­¨ď GUS.  ĄŽŕë Ż â缊 +¨áŻŽŤě§ăĽŹëĽ á Timidity ¤ŽŤŚ­ë ŕ ĄŽâ âě ĺŽŕŽčŽ. +. +:CONFIG_PCSPEAKER +‚ŞŤîç¨âě íŹăŤďć¨î PC-Speaker. +. +:CONFIG_PCRATE +— áâŽâ  ¤¨áŞŕĽâ¨§ ć¨¨ ŁĽ­Ľŕ ć¨¨ §˘ăŞ  ¤Ťď PC-Speaker. +. +:CONFIG_ZERO_OFFSET +ĽŠâŕ Ť¨§ăĽâ ¨ ŻŕĽ¤Žâ˘ŕ é Ľâ DC-ᏼ鼭¨Ľ PC-Speaker Žâ ˘Ž§¤ĽŠáâ˘¨ď ¤ŕăŁ¨ĺ ¨áâŽç­¨ŞŽ˘. +‡­ çĽ­¨Ľ 'auto' ˘ŞŤîç Ľâ ĽŁŽ ¤Ťď á¨á⼏, ŽâŤ¨ç­ëĺ Žâ Windows, ¨ ŽâŞŤîç Ľâ ĽŁŽ ˘ Windows. +…፨ ˘ č  Ž‘ ˘ëŻŽŤ­ďĽâ ᢎĽ Ꭵá⢼­­ŽĽ DC-ᏼ鼭¨Ľ, ⎠ăáâ ­Ž˘¨âĽ í⎠§­ çĽ­¨Ľ ˘ 'false'. +. +:CONFIG_TANDY +‚ŞŤîç¨âě íŹăŤďć¨î Tandy Sound System. „Ťď 'auto', íŹăŤďć¨ď ˘ŞŤîç Ľâáď ⎍쪎 ⎣¤ , ŞŽŁ¤  'machine = tandy'. +. +:CONFIG_TANDYRATE +— áâŽâ  ¤¨áŞŕĽâ¨§ ć¨¨ ¤Ťď Tandy 3-Voice ŻŽŞŽŤĽ­¨ď. +. +:CONFIG_DISNEY +‚ŞŤî缭¨Ľ íŹăŤď樨 Disney Sound Source. (Covox Voice Master ¨ Speech Thing ᎢŹĽá⨏ëĺ). +. +:CONFIG_JOYSTICKTYPE +’¨Ż ¤ŚŽŠá⨪  ¤Ťď íŹăŤď樨: 'auto' (ŻŽ ㏎Ťç ­¨î), +'none' (ŽâŞŤîç Ľâ íŹăŤďć¨î ¤ŚŽŠá⨪ ), +'2axis' (ŻŽ¤¤ĽŕŚ¨˘ Ľâ ¤˘  ¤ŚŽŠá⨪ ), +'4axis' (ŻŽ¤¤ĽŕŚ¨˘ Ľâ Ž¤¨­ ¤ŚŽŠá⨪, ¨áŻŽŤě§ăĽâáď ŻĽŕ˘ëŠ ¤ŚŽŠá⨪), +'4axis_2' (ŻŽ¤¤ĽŕŚ¨˘ Ľâ Ž¤¨­ ¤ŚŽŠá⨪, ¨áŻŽŤě§ăĽâáď ˘âŽŕŽŠ ¤ŚŽŠá⨪), +'fcs' (Thrustmaster), 'ch' (CH Flighttick). +'auto' ˘ëĄ¨ŕ Ľâ íŹăŤďć¨î ˘ § ˘¨á¨ŹŽá⨠Žâ ༠Ťě­ëĺ ¤ŚŽŠá⨪Ž˘. +(Ľ § Ąă¤ě⼠áĄŕŽá¨âě ä ŠŤ Ź ŻŻĽŕ  DOSBox, ĽáŤ¨ ‚ë áŽĺŕ ­¨Ť¨ ĽŁŽ ŕ ­ĽĽ). +. +:CONFIG_TIMED +‚ŞŤîç¨âě ˘ŕĽŹĽ­­ëĽ ¨­âĽŕ˘ Ťë ¤Ťď Žá¨. ŞáŻĽŕ¨ŹĽ­â¨ŕăŠâĽ á í⎊ ŽŻć¨ĽŠ, ĽáŤ¨ ¤ŚŽŠá⨪ ¤ŕĽŠäăĽâ (˘ áâŽŕŽ­ă). +. +:CONFIG_AUTOFIRE +ĽŻŕĽŕ뢭Ž áâ།ďĽâ, ŻŽŞ  ‚ë ¤ĽŕŚ¨âĽ Ş­ŽŻŞă ­ Ś âŽŠ (âăॎ). +. +:CONFIG_SWAP34 +ŽŹĽ­ďâě ŹĽáâ Ź¨ 3-î ¨ 4-î Žá¨. ŒŽŚĽâ Ąëâě ŻŽŤĽ§­Ž ¤Ťď ­ĽŞŽâŽŕëĺ ¤ŚŽŠá⨪Ž˘. +. +:CONFIG_BUTTONWRAP +‚ŞŤîç¨âě ŽŁŕ ­¨çĽ­¨Ľ Ş­ŽŻŽŞ ŻŽ ŞŽŤ¨çĽáâ˘ă íŹăŤ¨ŕ㼏ëĺ Ş­ŽŻŽŞ. +. +:CONFIG_CIRCULARINPUT +‚ŞŤîç¨âě ŻŕĽŽĄŕ §Ž˘ ­¨Ľ Şŕ㣎˘ŽŁŽ ˘˘Ž¤  ˘ Ş˘ ¤ŕ â­ëŠ ˘ë˘Ž¤. +ŽŻŕŽĄăŠâĽ ˘ŞŤîç¨âě íâă ŽŻć¨î, ĽáŤ¨ ŤĽ˘ëŠ  ­ ŤŽŁŽ˘ëŠ ŕëç ŚŽŞ ŹŽŚĽâ ¤˘¨Ł âěáď ⎍쪎 ŻŽ ŞŕăŁă. +. +:CONFIG_DEADZONE +ŕŽćĽ­â ¤˘¨ŚĽ­¨ď, ŞŽâŽŕëŠ ­ăŚ­Ž ¨Ł­Žŕ¨ŕŽ˘ âě. ‡­ çĽ­¨Ľ '100' ŻŕĽ˘ŕ é Ľâ ŕëç ŚŽŞ ˘ ć¨ä஢ŽŠ. +. +:CONFIG_SERIAL1 +“áâ ­Ž˘¨âĽ ⨯ ăáâனá⢠, ŻŽ¤ŞŤîçń­­ŽŁŽ Ş com-ŻŽŕâă. +ŒŽŚĽâ Ąëâě 'disabled', 'dummy', 'modem', 'nullmodem' ¨ 'directserial'. +„ŽŻŽŤ­¨âĽŤě­ëĽ Ż ŕ ŹĽâŕë ¤ŽŤŚ­ë Ąëâě ˘ ⎊ ŚĽ áâபĽ ˘ ˘¨¤Ľ +Ż ŕ ŹĽâŕ:§­ çĽ­¨Ľ.  ŕ ŹĽâŕ ¤Ťď ˘áĽĺ ⨯Ž˘: 'irq' (ŽŻć¨Ž­ Ťě­ëŠ). +„Ťď 'directctserial': 'realport' (ŽĄď§ âĽŤě­ëŠ), 'rxdelay' (ŽŻć¨Ž­ Ťě­ëŠ). + 'realport:COM1 realport:ttyS0'. +„Ťď 'modem': 'listenport' (ŽŻć¨Ž­ Ťě­ëŠ). +„Ťď 'nullmodem': 'server', 'rxdelay', 'txdelay', 'telnet', 'usetr', + 'transparent', 'port', 'inhsocket' (˘áĽ ŽŻć¨Ž­ Ťě­ëĽ). +ŕ¨ŹĽŕ: 'serial1=modem listenport:5000'. +. +:CONFIG_SERIAL2 +—¨â ŠâĽ serial1. +. +:CONFIG_SERIAL3 +—¨â ŠâĽ serial1. +. +:CONFIG_SERIAL4 +—¨â ŠâĽ serial1. +. +:CONFIG_PHONEBOOKFILE +” ŠŤ, ¨áŻŽŤě§ăĽŹëŠ ¤Ťď Żŕ¨˘ď§Ş¨ 䨪⨢­ëĺ ⼍ĽäŽ­­ëĺ ­ŽŹĽŕŽ˘ Ş  ¤ŕĽá Ź. +. +:CONFIG_XMS +‚ŞŤîç¨âě ŻŽ¤¤ĽŕŚŞă XMS. +. +:CONFIG_EMS +‚ŞŤîç¨âě ŻŽ¤¤ĽŕŚŞă EMS. Ž ㏎Ťç ­¨î ('true') ŽĄĽáŻĽç¨˘ Ľâ Ťăçčăî +ᎢŹĽá⨏Žáâě, ­Ž ­ĽŞŽâŽŕëĽ Żŕ¨ŤŽŚĽ­¨ď ŹŽŁăâ ŕ ĄŽâ âě ŤăçčĽ á +¤ŕ㣨Ź¨ ˘ ŕ¨ ­â Ź¨, ¨Ť¨ â༥Ž˘ âě ŽâŞŤî缭¨ď ŻŽ¤¤ĽŕŚŞ¨ EMS ('false'). +. +:CONFIG_UMB +‚ŞŤîç¨âě ŻŽ¤¤ĽŕŚŞă UMB. +. +:CONFIG_VER +“áâ ­Ž˘¨âě ˘Ľŕá¨î DOS (ŻŽ ㏎Ťç ­¨î 5.0). “Ş Ś¨âĽ ˘ Ş çĽá⢼ äŽŕŹ â  Ź ŚŽŕ.Ź¨­Žŕ. +Ž¤¨­Žç­ëŠ ­ŽŹĽŕ ŕ áᏠâਢ Ľâáď Ş Ş Žá­Ž˘­ ď ˘Ľŕá¨ď. +ŽĄëç­Ž ¨áŻŽŤě§ăîâáď: '3.3', '5.0', '6.22' ¨ '7.1'. +. +:CONFIG_KEYBOARDLAYOUT +Ÿ§ëŞŽ˘ŽŠ ŞŽ¤ ŕ áŞŤ ¤Ş¨ ŞŤ ˘¨ âăŕë (¨Ť¨ 'none'). +. +:CONFIG_IPX +‚ŞŤîç¨âě íŹăŤďć¨î ipx çĽŕĽ§ UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +‘âப¨ ˘ í⎏ ŕ §¤ĽŤĽ Ąă¤ă⠢믎Ť­ďâěáď Żŕ¨ § Żă᪼. +‚ë ŹŽŚĽâĽ ŕ §ŹĽé âě ᢎ¨ áâப¨ 'mount' §¤Ľáě. +. +:CONFIGFILE_INTRO +# âŽ ŞŽ­ä¨Łăŕ ć¨Ž­­ëŠ ä ŠŤ ¤Ťď dosbox-staging (%s). +# ‘âப¨, ­ ç¨­ î騼áď Ꭰ§­ Ş  '#' - íâŽ ŞŽŹŹĽ­â ŕ¨¨. + +. +:CONFIG_SUGGESTED_VALUES +‚Ž§ŹŽŚ­ëĽ §­ çĽ­¨ď +. +:PROGRAM_CONFIG_NOCONFIGFILE +ŠŽ­ä¨Łăŕ ć¨Ž­­ëŠ ä ŠŤ ­Ľ § Łŕ㌼­! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Žá­Ž˘­ŽŠ ä ŠŤ ŞŽ­ä¨Łăŕ ć¨¨: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +„ŽŻŽŤ­¨âĽŤě­ëĽ ä ŠŤë ŞŽ­ä¨Łăŕ ć¨¨: + +. +:PROGRAM_CONFIG_CONFDIR +„¨ŕĽŞâŽŕ¨ď ŞŽ­ä¨Łăŕ ć¨¨ DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Ľ˘Ž§ŹŽŚ­Ž ŽâŞŕëâě ä ŠŤ %s + +. +:PROGRAM_CONFIG_FILE_WHICH +‡ Ż¨áě ŞŽ­ä¨Łăŕ ć¨Ž­­ŽŁŽ ä ŠŤ  %s + +. +:PROGRAM_CONFIG_USAGE +ˆ­áâŕ㏼­â ŞŽ­ä¨Łăŕ ć¨¨: +-writeconf [¨Źď_ä ŠŤ ] ¨Ť¨ -wc [¨Źď_ä ŠŤ ]: ‘Žĺŕ ­¨âě ⼪ăéăî ŞŽ­ä¨Łăŕ ć¨î +˘ Žá­Ž˘­ŽŠ ä ŠŤ ŞŽ­ä¨Łăŕ ć¨¨ ¨Ť¨ ˘ 㪠§ ­­ëŠ ä ŠŤ ˘ ¤¨ŕĽŞâŽŕ¨¨ ŞŽ­ä¨Łăŕ ć¨¨. +-writelang ¨Ť¨ -wl ¨Źď_ä ŠŤ : ‘Žĺŕ ­ďĽâ ⼪ă騼 ď§ëŞŽ˘ëĽ áâப¨ ˘ 㪠§ ­­ëŠ ä ŠŤ. +-r [Ż ŕ ŹĽâŕë]: ĽŕĽ§ Łŕ㧨âě DOSBox, á ŻŕĽ¤ë¤ă騏¨ ¨Ť¨ 㪠§ ­­ëŹ¨ Ż ŕ ŹĽâŕ Ź¨. +-wcp [¨Źď_ä ŠŤ ]: + ‘Žĺŕ ­¨âě ŞŽ­ä¨Łăŕ ć¨î ˘ ä ŠŤ dosbox.conf ¨Ť¨ ˘ 㪠§ ­­ëŠ ä ŠŤ ˘ ⼪ă鼊 ¤¨ŕĽŞâŽŕ¨¨. +-wcd: ‘Žĺŕ ­¨âě ⼪ăéăî ŞŽ­ä¨Łăŕ ć¨î ˘ Žá­Ž˘­ŽŠ ä ŠŤ ŞŽ­ä¨Łăŕ ć¨¨. +-l: ‘Ż¨áި Ż ŕ ŹĽâ஢ ŞŽ­ä¨Łăŕ ć¨¨. +-h, -help, -? sections / ­ §˘ ­¨Ľ_ŕ §¤ĽŤ  / ­ §˘ ­¨Ľ_ᢎŠá⢠: + Ľ§ Ż ŕ ŹĽâ஢, ŽâŽĄŕ Ś Ľâ íâŽâ íŞŕ ­ áŻŕ ˘Ş¨. „ŽĄ ˘ě⼠sections ¤Ťď ᯨ᪠ ŕ §¤ĽŤŽ˘. + „Ťď ŻŽŤă缭¨ď ¨­äŽŕŹ ć¨¨ Ž ŞŽ­ŞŕĽâ­ŽŹ ŕ §¤ĽŤĽ ¨Ť¨ ᢎŠá⢼ ¤ŽĄ ˘ě⼠ĽŁŽ ­ §˘ ­¨Ľ. +-axclear: Žç¨é Ľâ ŕ §¤ĽŤ autoexec. +-axadd áâப : „ŽĄ ˘ŤďĽâ áâப㠢 ŕ §¤ĽŤ autoexec. +-axtype: ‚뢎¤¨â ᎤĽŕŚ¨ŹŽĽ ŕ §¤ĽŤ  autoexec. +-securemode: “áâ ­ ˘Ť¨˘ Ľâ ĄĽ§ŽŻ á­ëŠ ༌¨Ź. +-avistart:  ç¨­ Ľâ ˘¨¤ĽŽ§ Ż¨áě. +-avistop: Žáâ ­ ˘Ť¨˘ Ľâ ˘¨¤ĽŽ§ Ż¨áě. +-startmapper: ‡ Żă᪠Ľâ ŞŤ ˘¨č­ëŠ Ź ŻŻĽŕ. +-get ­ §˘ ­¨Ľ_ᢎŠá⢠: ‚Ž§˘ŕ é Ľâ §­ çĽ­¨Ľ ᢎŠá⢠. +-set ­ §˘ ­¨Ľ_ᢎŠá⢠=§­ çĽ­¨Ľ: “áâ ­ ˘Ť¨˘ Ľâ §­ çĽ­¨Ľ ᢎŠá⢠. + +. +:PROGRAM_CONFIG_HLP_PROPHLP + §­ çĽ­¨Ľ ᢎŠá⢠ "%s" (ᎤĽŕŚ éĽŁŽáď ˘ ŕ §¤ĽŤĽ "%s"): +%s + +‚Ž§ŹŽŚ­ëĽ §­ çĽ­¨ď: %s +‡­ çĽ­¨Ľ ŻŽ ㏎Ťç ­¨î: %s +’ĽŞă鼼 §­ çĽ­¨Ľ: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP + §­ çĽ­¨Ľ ŕ §¤ĽŤ  "%s": +%s +’ĽŞă鼼 §­ çĽ­¨Ľ: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +âŽ ᢎŠá⢎ ­Ľ ŹŽŚĽâ Ąëâě ¨§ŹĽ­Ľ­Ž ˘Ž ˘ŕĽŹď ˘ëŻŽŤ­Ľ­¨ď. + +. +:PROGRAM_CONFIG_HLP_POSINT +–ĽŤŽĽ ŻŽŤŽŚ¨âĽŤě­ŽĽ ç¨áŤŽ. +. +:PROGRAM_CONFIG_HLP_SECTHLP + §¤ĽŤ %s ᎤĽŕŚ¨â ፼¤ăî騼 ᢎŠá⢠: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +ŠŽ­ä¨Łăŕ ć¨ď DOSBox ᎤĽŕŚ¨â ፼¤ăî騼 ŕ §¤ĽŤë: + + +. +:PROGRAM_CONFIG_SECURE_ON +“áâ ­Ž˘ŤĽ­ ĄĽ§ŽŻ á­ëŠ ༌¨Ź. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +â  ŽŻĽŕ ć¨ď ­Ľ ŕ §ŕĽčĽ­  ˘ ĄĽ§ŽŻ á­ŽŹ ༌¨ŹĽ. + +. +:PROGRAM_CONFIG_SECTION_ERROR + §¤ĽŤ "%s" ­Ľ áăéĽáâ˘ăĽâ. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" ­Ľ¤ŽŻăá⨏ŽĽ §­ çĽ­¨Ľ ᢎŠá⢠ "%s". + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Ľâ â ŞŽŁŽ ŕ §¤ĽŤ  ¨Ť¨ ᢎŠá⢠. + +. +:PROGRAM_CONFIG_NO_PROPERTY +‚ ŕ §¤ĽŤĽ "%2$s" ­Ľâ ᢎŠá⢠ "%1$s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +ŕ ˘¨Ťě­ëŠ ᨭ⠪á¨á: config -set "­ §˘ ­¨Ľ_ᢎŠá⢠". + +. +:PROGRAM_CONFIG_GET_SYNTAX +ŕ ˘¨Ťě­ëŠ ᨭ⠪á¨á: config -get "­ §˘ ­¨Ľ_ᢎŠá⢠". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox ĄëŤ § Żă鼭 Ꭰ፼¤ăî騏¨ Ż ŕ ŹĽâŕ Ź¨ ŞŽŹ ­¤­ŽŠ áâப¨: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Žâáăâáâ˘ăĽâ Ż ŕ ŹĽâŕ. + +. +:PROGRAM_MOUNT_CDROMS_FOUND + Š¤Ľ­Ž Żŕ¨˘Ž¤Ž˘ CD-ROM: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +„¨áŞ +. +:PROGRAM_MOUNT_STATUS_TYPE +’¨Ż +. +:PROGRAM_MOUNT_STATUS_LABEL +ŒĽâŞ  +. +:PROGRAM_MOUNT_STATUS_2 +„¨áŞ %c Ꮞ­â¨ŕŽ˘ ­ Ş Ş %s + +. +:PROGRAM_MOUNT_STATUS_1 +‘ŹŽ­â¨ŕŽ˘ ­­ëĽ ¤¨áި: + +. +:PROGRAM_MOUNT_ERROR_1 +„¨ŕĽŞâŽŕ¨¨ %s ­Ľ áăéĽáâ˘ăĽâ. + +. +:PROGRAM_MOUNT_ERROR_2 +%s ­Ľ ďĽâáď ¤¨ŕĽŞâŽŕ¨ĽŠ. + +. +:PROGRAM_MOUNT_ILL_TYPE +Ľ¤ŽŻăáâ¨ŹëŠ â¨Ż %s. + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +„¨áŞ %c ㌼ Ꮞ­â¨ŕŽ˘ ­ ˘ %s. + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +„¨áŞ %c ­Ľ Ꮞ­â¨ŕŽ˘ ­. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +„¨áŞ %c ă᯼譎 ¤ĽŹŽ­â¨ŕŽ˘ ­. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +‚¨ŕâă Ťě­ëĽ ¤¨áި ­Ľ ŹŽŁăâ Ąëâě ¤ĽŹŽ­â¨ŕŽ˘ ­ë. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +%c ­Ľ ďĽâáď Żŕ ˘¨Ťě­ëŹ ¨¤Ľ­â¨ä¨Ş âŽŕŽŹ ¤¨áŞ . + +. +:PROGRAM_MOUNT_WARNING_WIN +ŒŽ­â¨ŕŽ˘ ­¨Ľ C:\ … ༪ŽŹĽ­¤ăĽâáď! ‚ ፼¤ăî騊 ŕ § Ꮞ­â¨ŕăŠâĽ á㥤¨ŕĽŞâŽŕ¨î. + +. +:PROGRAM_MOUNT_WARNING_OTHER +ŒŽ­â¨ŕŽ˘ ­¨Ľ / … ༪ŽŹĽ­¤ăĽâáď! ‚ ፼¤ăî騊 ŕ § Ꮞ­â¨ŕăŠâĽ á㥤¨ŕĽŞâŽŕ¨î. + +. +:PROGRAM_MOUNT_NO_OPTION +‚­¨Ź ­¨Ľ: ˆŁ­Žŕ¨ŕŽ˘ ­¨Ľ ­ĽŻŽ¤¤ĽŕŚ¨˘ ĽŹŽŠ ŽŻć¨¨ %s. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +ĽŕĽ¤ ¤ŽĄ ˘ŤĽ­¨ĽŹ Ž˘ĽŕŤĽď ­ăŚ­Ž Ꮞ­â¨ŕŽ˘ âě ¤¨ŕĽŞâŽŕ¨î ¤Ťď ­ĽŁŽ. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +Ž˘ĽŕŤĽŠ ­Ľ ᎢŹĽá⨏ á 㪠§ ­­ëŹ ¤¨áŞŽŹ. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +Ž˘ĽŕŤĽŠ ¤ŽŤŚĽ­ Ąëâě 㪠§ ­ á ¨áŻŽŤě§Ž˘ ­¨ĽŹ ⎊ ŚĽ  ¤ŕĽá ć¨¨, ç⎠¨ Žá­Ž˘­ŽŠ ¤¨áŞ. ¨Ş ŞŽŁŽ ᏼ訢 ­¨ď Žâ­Žá¨âĽŤě­ŽŁŽ ¨  ĄáŽŤîâ­ŽŁŽ Żă⼊. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +„¨ŕĽŞâŽŕ¨ď Ž˘ĽŕŤĽď ­Ľ ŹŽŚĽâ ᎢŻ ¤ âě á ¤¨áŞŽŹ, ŤĽŚ é¨Ź ˘ Žá­Ž˘Ľ. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +—âŽ-⎠ŻŽčŤŽ ­Ľ â Ş. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Ž˘ĽŕŤĽŠ %s ­  ¤¨áŞĽ %c Ꮞ­â¨ŕŽ˘ ­. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +„¨áŞ Z ­ĽŤě§ď ŻĽŕĽŹĽé âě. „¨áŞ %c ㌼ Ꮞ­â¨ŕŽ˘ ­. + +. +:PROGRAM_MEM_CONVEN +%10d ށ Žá­Ž˘­ŽŠ Ż Źď⨠ᢎĄŽ¤­Ž. + +. +:PROGRAM_MEM_EXTEND +%10d ށ ŕ áč¨ŕĽ­­ŽŠ Ż Źď⨠ᢎĄŽ¤­Ž. + +. +:PROGRAM_MEM_EXPAND +%10d ށ ŕ áč¨ŕ/ŽŠ Ż Źď⨠ᢎĄŽ¤­Ž. + +. +:PROGRAM_MEM_UPPER +%10d ށ ˘Ľŕĺ­ĽŠ Ż Źď⨠ᢎĄŽ¤­Ž ˘ %d ĄŤŽŞ ĺ (á ŹëŠ ĄŽŤě莊 UMB %d ށ). + +. +:PROGRAM_LOADFIX_ALLOC +%d ށ ˘ë¤ĽŤĽ­Ž. + +. +:PROGRAM_LOADFIX_DEALLOC +%d ށ Žá˘ŽĄŽŚ¤Ľ­Ž. + +. +:PROGRAM_LOADFIX_DEALLOCALL +ˆáŻŽŤě§Ž˘ ­­ ď Ż Źďâě Žá˘ŽĄŽŚ¤Ľ­ . + +. +:PROGRAM_LOADFIX_ERROR +Žč¨ĄŞ  ˘ë¤ĽŤĽ­¨ď Ż Źďâ¨. + +. +:MSCDEX_SUCCESS +MSCDEX ăáâ ­Ž˘ŤĽ­. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Žč¨ĄŞ : ăŞ˘ë ¤¨áŞŽ˘ ­ĽáŞŽŤěŞ¨ĺ Żŕ¨˘Ž¤Ž˘ CD-ROM ¤ŽŤŚ­ë Ąëâě ­ĽŻŕĽŕ뢭돨. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Žč¨ĄŞ : …éń ­Ľ ŻŽ¤¤ĽŕŚ¨˘ Ľâáď. + +. +:MSCDEX_ERROR_PATH +MSCDEX: “Ş § ­­ëŠ Żăâě ­Ľ ďĽâáď Żŕ¨˘Ž¤ŽŹ CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Žč¨ĄŞ : Ľ˘Ľŕ­ëŠ ä ŠŤ ¨Ť¨ ­Ľ˘Ž§ŹŽŚ­Ž ŽâŞŕëâě. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Žč¨ĄŞ : ‘Ť¨čŞŽŹ Ź­ŽŁŽ Żŕ¨˘Ž¤Ž˘ CD-ROM (Ź Şá¨ŹăŹ: 5). Ľ 㤠ŤŽáě ăáâ ­Ž˘¨âě MSCDEX. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: ‘ŹŽ­â¨ŕŽ˘ ­­ ď á㥤¨ŕĽŞâŽŕ¨ď: ŽŁŕ ­¨çĽ­­ ď ŻŽ¤¤ĽŕŚŞ . + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Žč¨ĄŞ : ” ŠŤ Ť¨ĄŽ ­Ľ ďĽâáď iso ¨Ť¨ cue/bin ŽĄŕ § Ź¨, Ť¨ĄŽ ᎤĽŕŚ¨â Žč¨ĄŞ¨. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Žč¨ĄŞ : Ľ¨§˘Ľáâ­ ď Žč¨ĄŞ . + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: ‚­¨Ź ­¨Ľ: ˆŁ­Žŕ¨ŕŽ˘ ­¨Ľ ­ĽŻŽ¤¤ĽŕŚ¨˘ ĽŹŽŠ ŽŻć¨¨ %s. + +. +:PROGRAM_RESCAN_SUCCESS +„¨áŞŽ˘ëŠ Şíč Žç¨éĽ­. + +. +:PROGRAM_INTRO +„ŽĄŕŽ ŻŽŚ ŤŽ˘ âě ˘ DOSBox Staging, íŹăŤďâŽŕ x86 Ꭰ§˘ăŞŽŹ ¨ Łŕ ä¨ŞŽŠ. +DOSBox Staging Ꭷ¤ Ľâ ¤Ťď ‚ á ŽĄŽŤŽçŞă, ŞŽâŽŕ ď ˘ëŁŤď¤¨â Ş Ş áâ ŕëŠ ¤ŽĄŕëŠ DOS. + +„Ťď ŻŽŤă缭¨ď ¨­äŽŕŹ ć¨¨ Ž ŹŽ­â¨ŕŽ˘ ­¨¨, ˘˘Ľ¤¨âĽ intro mount +„Ťď ŻŽŤă缭¨ď ¨­äŽŕŹ ć¨¨ Ž ŻŽ¤¤ĽŕŚŞĽ CD-ROM, ˘˘Ľ¤¨âĽ intro cdrom +„Ťď ŻŽŤă缭¨ď ¨­äŽŕŹ ć¨¨ Ž "ŁŽŕďç¨ĺ" ŞŤ ˘¨č ĺ, ˘˘Ľ¤¨âĽ intro special +„Ťď ĄŽŤĽĽ ŻŽ¤ŕŽĄ­ŽŠ ¨­äŽŕŹ ć¨¨ ŻŽáĽâ¨âĽ ˘¨Ş¨-á Šâ DOSBox Staging: +https://github.com/dosbox-staging/dosbox-staging/wiki + +ŕ¨ ˘Ž§­¨Ş­Ž˘Ľ­¨¨ Žč¨ĄŞ¨ DOSBox Staging Ąă¤Ľâ § Şŕëâ ĄĽ§ ŻŕĽ¤ăŻŕĽŚ¤Ľ­¨ď! + +. +:PROGRAM_INTRO_MOUNT_START +‚Žâ ­ĽáŞŽŤěŞŽ ŞŽŹ ­¤ ¤Ťď ­ ç Ť : +ŕĽŚ¤Ľ 缏 ‚ë ᏎŚĽâĽ ¨áŻŽŤě§Ž˘ âě ä ŠŤë ˘ čĽŠ ä ŠŤŽ˘ŽŠ á¨á⼏ë, +‚ë ¤ŽŤŚ­ë Ꮞ­â¨ŕŽ˘ âě ¤¨ŕĽŞâŽŕ¨î, ᎤĽŕŚ éăî í⨠䠊Ťë. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c c:\dosgames\ Ꭷ¤ áâ ¤¨áŞ C á ᎤĽŕŚ¨ŹëŹ ¨§ c:\dosgames. ş +ş ş +ş c:\dosgames\ í⎠Żŕ¨ŹĽŕ. ‡ ŹĽ­¨âĽ ĽŁŽ ᢎĽŠ ¤¨ŕĽŞâŽŕ¨ĽŠ á DOS-¨Łŕ Ź¨.  ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_OTHER +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş mount c ~/dosgames Ꭷ¤ áâ ¤¨áŞ C á ᎤĽŕŚ¨ŹëŹ ¨§ ~/dosgames. ş +ş ş +ş ~/dosgames í⎠Żŕ¨ŹĽŕ. ‡ ŹĽ­¨âĽ ĽŁŽ ᢎĽŠ ¤¨ŕĽŞâŽŕ¨ĽŠ á DOS-¨Łŕ Ź¨. ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + +. +:PROGRAM_INTRO_MOUNT_END +ŽáŤĽ ă᯼譎ŁŽ ŹŽ­â¨ŕŽ˘ ­¨ď ¤¨áŞ  ‚ë ŹŽŚĽâĽ ˘˘Ľá⨠C: çâŽĄë ŻĽŕĽŠâ¨ Ş +Ꮞ­â¨ŕŽ˘ ­­ŽŹă ¤¨áŞă C. ‚˘Ľ¤¨âĽ dir ¤Ťď ŻŽŞ §  ᎤĽŕŚ¨ŹŽŁŽ. cd ŻŽ§˘ŽŤ¨â ‚ Ź +˘ŽŠâ¨ ˘ ¤¨ŕĽŞâŽŕ¨î (ŕ áŻŽ§­ Ľâáď [] ˘ ᯨ᪼ ¤¨ŕĽŞâŽŕ¨Š). +‚ë ŹŽŚĽâĽ § Żă᪠âě ŻŕŽŁŕ ŹŹë/ä ŠŤë á ŕ áč¨ŕĽ­¨ĽŹ .exe .bat ¨ .com. + +. +:PROGRAM_INTRO_CDROM +ŒŽ­â¨ŕŽ˘ ­¨Ľ ˘¨ŕâă Ťě­ŽŁŽ Żŕ¨˘Ž¤  CD-ROM ˘ DOSBox Staging: +DOSBox Staging ŽĄĽáŻĽç¨˘ Ľâ íŹăŤďć¨î CD-ROM ­  ­ĽáŞŽŤěިĺ ă஢­ďĺ. + +âŽ ŕ ĄŽâ Ľâ ˘Ž ˘áĽĺ ¤¨ŕĽŞâŽŕ¨ďĺ, ăáâ ­ ˘Ť¨˘ Ľâáď MSCDEX ¨ ŻŽŹĽç Ľâ ä ŠŤë +⎍쪎 ¤Ťď ç⼭¨ď. ŽĄëç­Ž í⎣Ž ¤Žáâ âŽç­Ž ¤Ťď ĄŽŤě設á⢠ ¨Łŕ: + +mount D C:\example -t cdrom + +…፨ í⎠­Ľ áŕ ĄŽâ Ľâ, ‚ Ź, ˘Ž§ŹŽŚ­Ž, Żŕ¨¤ńâáď ᎎĄé¨âě DOSBox Staging ŹĽâŞă CD-ROM: + +mount D C:\example -t cdrom -label ŹĽâŞ  + +ŠŕŽŹĽ ⎣Ž, ‚ë ŹŽŚĽâĽ ¨áŻŽŤě§Ž˘ âě imgmount ¤Ťď ŹŽ­â¨ŕŽ˘ ­¨ď iso ¨Ť¨ cue/bin ŽĄŕ §Ž˘: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +"ƒŽŕď稼" ŞŤ ˘¨č¨: +"ƒŽŕď稼" ŞŤ ˘¨č¨ ŻŽ ㏎Ťç ­¨î. +Ž­¨ ŹŽŁăâ Ąëâě ¨§ŹĽ­Ľ­ë ˘ ŞŤ ˘¨č­ŽŹ Ź ŻŻĽŕĽ. + +Alt+Enter : ĽŕĽŞŤî缭¨Ľ ŹĽŚ¤ă ŻŽŤ­ŽíŞŕ ­­ëŹ ¨ ŽŞŽ­­ëŹ ༌¨Ź Ź¨. +Alt+Pause : Žáâ ­Ž˘¨âě/‚Ž§ŽĄ­Ž˘¨âě íŹăŤďć¨î. +Ctrl+F1 : ‡ Żăáâ¨âě ŞŤ ˘¨č­ëŠ Ź ŻŻĽŕ. +Ctrl+F4 : ‡ ŹĽ­¨âě Ꮞ­â¨ŕŽ˘ ­­ëŠ ŽĄŕ § ¤¨áŞ , ŽĄ­Ž˘¨âě Şíč ¤¨ŕĽŞâŽŕ¨Š ¤Ťď + ˘áĽĺ ¤¨áŞŽ˘. +Ctrl+F5 : ‘Žĺŕ ­¨âě á­¨ŹŽŞ íŞŕ ­ . +Ctrl+F6 :  ç âě/Žáâ ­Ž˘¨âě §˘ăŞŽ§ Ż¨áě. +Ctrl+F7 :  ç âě/Žáâ ­Ž˘¨âě ˘¨¤ĽŽ§ Ż¨áě. +Ctrl+F9 : ‡ ˘Ľŕč¨âě íŹăŤďć¨î. +Ctrl+F10 : ‡ ĺ˘ â¨âě/Žá˘ŽĄŽ¤¨âě Źëčě. +Ctrl+F11 : Ž­¨§¨âě ᪎ŕŽáâě íŹăŤď樨. +Ctrl+F12 : Ž˘ëá¨âě ᪎ŕŽáâě íŹăŤď樨. +Alt+F12 : Ľ ŽŁŕ ­¨ç¨˘ âě ᪎ŕŽáâě (âăॎ ༌¨Ź/ŻĽŕĽŹŽâŞ  ˘ŻĽŕń¤). + +. +:PROGRAM_BOOT_NOT_EXIST +” ŠŤ § Łŕ㧎筎ŁŽ ¤¨áŞ  ­Ľ áăéĽáâ˘ăĽâ. Žč¨ĄŞ . + +. +:PROGRAM_BOOT_NOT_OPEN +Ľ˘Ž§ŹŽŚ­Ž ŽâŞŕëâě ä ŠŤ § Łŕ㧎筎ŁŽ ¤¨áŞ . Žč¨ĄŞ . + +. +:PROGRAM_BOOT_WRITE_PROTECTED +” ŠŤ ŽĄŕ §  ¤Žáâ㯼­ ⎍쪎 ¤Ťď ç⼭¨ď! âŽ ŹŽŚĽâ Ꭷ¤ âě ŻŕŽĄŤĽŹë. + +. +:PROGRAM_BOOT_PRINT_ERROR +â  ŞŽŹ ­¤  § Łŕ㌠Ľâ DOSBox á ¤¨áŞĽâë ¨Ť¨ á ŽĄŕ §  Śńá⪎ŁŽ ¤¨áŞ . + +„Ťď í⎊ ŞŽŹ ­¤ë ŹŽŚ­Ž 㪠§ âě ŻŽáŤĽ¤Ž˘ âĽŤě­Žáâě ᏼ­­ëĺ ¤¨áŞĽâ Żŕ¨ ­ Ś â¨¨ +Ctrl+F4, ¨ -l 㪠§ë˘ Ľâ Ꮞ­â¨ŕŽ˘ ­­ëŠ ¤¨áŞ ¤Ťď § Łŕ㧪¨. …፨ ĄăŞ˘  ¤¨áŞ  +­Ľ 㪠§ ­ , ŻŽ ㏎Ťç ­¨î § Łŕ㧪  á ¤¨áŞ  A. …¤¨­á⢼­­ëŹ¨ ĄăŞ˘ Ź¨ +§ Łŕ㧎筎ŁŽ ¤¨áŞ  ďîâáď A, C ¨ D. ŕ¨ § Łŕ㧪Ľ á Śńá⪎ŁŽ ¤¨áŞ  (C ¨Ť¨ D), +ŽĄŕ § ¤ŽŤŚĽ­ Ąëâě ㌼ Ꮞ­â¨ŕŽ˘ ­ á ŻŽŹŽéěî ŞŽŹ ­¤ë imgmount. + +‘¨­â Şá¨á í⎊ ŞŽŹ ­¤ë: + +boot [¤¨áŞĽâ _1.img ¤¨áŞĽâ _2.img] [-l „ˆ‘Š] + +. +:PROGRAM_BOOT_UNABLE +Ľ˘Ž§ŹŽŚ­Ž § Łŕ㧨âěáď á ¤¨áŞ  %c +. +:PROGRAM_BOOT_IMAGE_OPEN +ŽâŞŕë⨼ ŽĄŕ § : %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Ľ˘Ž§ŹŽŚ­Ž ŽâŞŕëâě %s +. +:PROGRAM_BOOT_BOOT +‡ Łŕ㧪  á ¤¨áŞ  %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr Ş ŕâਤŚ ­ Š¤Ľ­, ­Ž Ź č¨­  ­Ľ PCjr. +. +:PROGRAM_BOOT_CART_LIST_CMDS +„ŽáâăŻ­ëĽ ŞŽŹ ­¤ë PCjr Ş ŕâਤŚ :%s. +. +:PROGRAM_BOOT_CART_NO_CMDS +ŠŽŹ ­¤ë Ş ŕâਤŚ  PCjr ­Ľ ­ Š¤Ľ­ë. +. +:PROGRAM_LOADROM_SPECIFY_FILE +„ŽŤŚĽ­ Ąëâě 㪠§ ­ ä ŠŤ ‡“ ¤Ťď § Łŕ㧪¨. + +. +:PROGRAM_LOADROM_CANT_OPEN +” ŠŤ ‡“ ­Ľ¤Žáâ㯼­ ¤Ťď ç⼭¨ď. + +. +:PROGRAM_LOADROM_TOO_LARGE +” ŠŤ ‡“ ፨誎Ź ĄŽŤě莊. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +‚¨¤ĽŽ BIOS ­Ľ ŻŽ¤¤ĽŕŚ¨˘ Ľâáď ⨯ŽŹ Ź č¨­ë. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +” ŠŤ ‡“ ­Ľ ŕ áŻŽ§­ ­. + +. +:PROGRAM_LOADROM_BASIC_LOADED + §Ž˘ŽĽ ‡“ § Łŕ㌼­Ž. + +. +:SHELL_CMD_IMGMOUNT_HELP +ŒŽ­â¨ŕŽ˘ âě ŽĄŕ §ë ŞŽŹŻ Şâ-¤¨áŞŽ˘ ¨Ť¨ ¤¨áŞĽâ ­  㪠§ ­­ăî ĄăŞ˘ă ¤¨áŞ . + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +ŒŽ­â¨ŕŽ˘ âě CD-ROM, ¤¨áŞĽâă ¨Ť¨ ŽĄŕ § ¤¨áŞ  ­  㪠§ ­­ăî ĄăŞ˘ă ¤¨áŞ . + +ˆáŻŽŤě§Ž˘ ­¨Ľ: + imgmount „ˆ‘Š CDROM-SET [CDROM-SET_2 [..]] [-fs iso] -t cdrom|iso + imgmount „ˆ‘Š IMAGEFILE [IMAGEFILE_2 [..]] [-fs fat] -t hdd|floppy + imgmount „ˆ‘Š BOOTIMAGE [-fs fat|none] -t hdd -size ŁĽŽŹĽâŕ¨ď + imgmount -u „ˆ‘Š (¤ĽŹŽ­â¨ŕŽ˘ âě ŽĄŕ § ¤¨áŞ ) + +ƒ¤Ľ: + „ˆ‘Š í⎠ĄăŞ˘  ¤¨áŞ , ­  ŞŽâŽŕëŠ Ąă¤Ľâ Ꮞ­â¨ŕŽ˘ ­ ŽĄŕ §: A, C, D, ... + CDROM-SET í⎠iso, cue/bin, ¨Ť¨ cue/iso/flac/opus/ogg/mp3/wav ŽĄŕ §. + IMAGEFILE í⎠ŽĄŕ § Śńá⪎ŁŽ ¤¨áŞ  ¨Ť¨ ¤¨áŞĽâë ˘ äŽŕŹ âĽ fat16 ¨Ť¨ fat12. + BOOTIMAGE í⎠ŽĄŕ § § Łŕ㧎筎ŁŽ ¤¨áŞ  á § ¤ ­­ŽŠ ŁĽŽŹĽâ਼Š: + Ą ŠâŽ˘_­ _ἪâŽŕ,ἪâŽŕŽ˘_­ _ŁŽŤŽ˘Şă,ŁŽŤŽ˘Ş¨,樍¨­¤ŕë. +ŕ¨ŹĽç ­¨ď: + - Ctrl+F4 ᏼ­¨âě ¨ Ꮞ­â¨ŕŽ˘ âě ፼¤ăî騊 CDROM-SET ¨Ť¨ IMAGEFILE, ĽáŤ¨ Ž­ + 㪠§ ­. + +ŕ¨ŹĽŕë: + imgmount D /home/¨Źď_ŻŽŤě§Ž˘ âĽŤď/Games/ŽĄŕ §.iso -t cdrom + imgmount D cd/ŽĄŕ §.cue -t cdrom + imgmount A ¤¨áŞĽâ _1.img ¤¨áŞĽâ _2.img ¤¨áŞĽâ _3.img -t floppy + imgmount C ~/DOS/¤¨áŞ_C.img -t hdd + imgmount C § Łŕ㧎ç­ëŠ_ŽĄŕ §.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +‘ŽŻŽáâ ˘¨âě 䨧¨çĽáŞăî ¤¨ŕĽŞâŽŕ¨î á ĄăŞ˘ŽŠ ˘¨ŕâă Ťě­ŽŁŽ ¤¨áŞ  DOS. + +. +:SHELL_CMD_MOUNT_HELP_LONG +ŒŽ­â¨ŕŽ˘ âě ¤¨ŕĽŞâŽŕ¨î ¨§ ŽŻĽŕ ć¨Ž­­ŽŠ á¨áâĽŹë ­  ĄăŞ˘ă ˘¨ŕâă Ťě­ŽŁŽ ¤¨áŞ  DOS. + +ˆáŻŽŤě§Ž˘ ­¨Ľ: + mount „¨áŞ „¨ŕĽŞâŽŕ¨ď [-t ’¨Ż] [-freesize  §ŹĽŕ] [-label ŒĽâŞ ] + mount -u „¨áŞ (¤ĽŹŽ­â¨ŕŽ˘ âě ¤¨ŕĽŞâŽŕ¨î ¤¨áŞ ) + +ƒ¤Ľ: + „¨áŞ í⎠ĄăŞ˘  ¤¨áŞ , Şă¤  Ąă¤Ľâ Ꮞ­â¨ŕŽ˘ ­  ¤¨ŕĽŞâŽŕ¨ď: A, C, D, ... + „¨ŕĽŞâŽŕ¨ď í⎠¤¨ŕĽŞâŽŕ¨ď ­  Ž‘, ŞŽâŽŕ ď Ąă¤Ľâ Ꮞ­â¨ŕŽ˘ ­ . + ’¨Ż í⎠⨯ ŹŽ­â¨ŕ㼏ŽŠ ¤¨ŕĽŞâŽŕ¨¨: dir, floppy, cdrom, or overlay. +  §ŹĽŕ í⎠ᢎĄŽ¤­ŽĽ ŹĽá⎠˘¨ŕâă Ťě­ŽŁŽ ¤¨áŞ  (ށ ¤Ťď ¤¨áŞĽâ, Œ ¤Ťď + Žáâ Ťě­ŽŁŽ). + ŒĽâŞ  í⎠ŹĽâŞ  ¤¨áŞ , ŞŽâŽŕ ď Ąă¤Ľâ ¨áŻŽŤě§Ž˘ âěáď. + +ŕ¨ŹĽç ­¨ď: + - '-t overlay' ŻĽŕĽ­ Żŕ ˘¨âě § Ż¨áě Ꮞ­â¨ŕŽ˘ ­­ŽŁŽ ¤¨áŞ  ˘ ¤ŕăŁăî ¤¨ŕĽŞâŽŕ¨î. + - „ŽŻŽŤ­¨âĽŤě­ëĽ ŽŻć¨¨ ŽŻ¨á ­ë ˘ ŕ㪎˘Ž¤á⢼ (ä ŠŤ README, ŁŤ ˘  4). + +ŕ¨ŹĽŕë: + mount C ~/DOS-¨Łŕë + mount D "/media/¨Źď_ŻŽŤě§Ž˘ âĽŤď/­ §˘ ­¨Ľ_CD" -t cdrom + mount C ŹŽ¨_áŽĺŕ ­Ľ­¨ď -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +„ŽŤŚ­  Ąëâě 㪠§ ­  ĄăŞ˘  ¤¨áŞ  ¤Ťď ŹŽ­â¨ŕŽ˘ ­¨ď ŽĄŕ § . + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +„ŽŤŚĽ­ Ąëâě 㪠§ ­ ­ŽŹĽŕ ¤¨áŞ  (0 ¨Ť¨ 3) ¤Ťď ŹŽ­â¨ŕŽ˘ ­¨ď ŽĄŕ §  ­  (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +„Ťď ŽĄŕ §Ž˘ ŞŽŹŻ Şâ-¤¨áŞŽ˘: imgmount „ˆ‘Š Żăâě_Ş_ŽĄŕ §ă -t iso + +„Ťď ŽĄŕ §Ž˘ Śńá⪨ĺ_¤¨áŞŽ˘: „ŽŤŚ­  Ąëâě 㪠§ ­  ŁĽŽŹĽâŕ¨ď Śńá⪎ŁŽ ¤¨áŞ : +Ą ŠâŽ˘_­ _ἪâŽŕ, ἪâŽŕŽ˘_­ _ŁŽŤŽ˘Şă, ŁŽŤŽ˘ŽŞ_­ _樍¨­¤ŕ,ŞŽŤ¨çĽá⢎_樍¨­¤ŕŽ˘. +imgmount „ˆ‘Š Żăâě_Ş_ŽĄŕ §ă -size Ą­á,á­Ł,Ł­ć,Şć + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Ľ 㤠ŤŽáě § Łŕ㧨âě ä ŠŤ ŽĄŕ § . +“ĄĽ¤¨âĽáě, ç⎠Żăâě Żŕ ˘¨Ťě­ëŠ ¨ ŽĄŕ § ¤Žáâ㯼­ ¤Ťď ç⼭¨ď. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Ľ 㤠ŤŽáě ¨§˘ŤĽçě ŁĽŽŹĽâŕ¨î ¤¨áŞ  ¨§ ŽĄŕ § . +„Ťď § ¤ ­¨ď ŁĽŽŹĽâਨ ¨áŻŽŤě§ăŠâĽ Ż ŕ ŹĽâŕ -size Ą­á,á­Ł,Ł­ć,Şć. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +’¨Ż '%s' ­Ľ ŻŽ¤¤ĽŕŚ¨˘ Ľâáď. “Ş Ś¨âĽ: 'floppy', 'hdd', 'cdrom' ¨Ť¨ 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +”ŽŕŹ â '%s' ­Ľ ŻŽ¤¤ĽŕŚ¨˘ Ľâáď. “Ş Ś¨âĽ: 'fat', 'iso' ¨Ť¨ 'none'. + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +„ŽŤŚĽ­ Ąëâě 㪠§ ­ ä ŠŤ ŽĄŕ § . + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +” ŠŤ ŽĄŕ §  ­Ľ ­ Š¤Ľ­. + +. +:PROGRAM_IMGMOUNT_MOUNT +„Ťď ŹŽ­â¨ŕŽ˘ ­¨ď ¤¨ŕĽŞâŽŕ¨Š ¨áŻŽŤě§ăŠâĽ ŞŽŹ ­¤ă mount,   ­Ľ ŞŽŹ ­¤ă imgmount. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +„¨áŞ ăŚĽ Ꮞ­â¨ŕŽ˘ ­ ­  í⎊ ĄăŞ˘Ľ. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Ľ˘Ž§ŹŽŚ­Ž Ꭷ¤ âě ¤¨áŞ ¨§ ä ŠŤ . + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +ŽŹĽŕ ¤¨áŞ  %d Ꮞ­â¨ŕŽ˘ ­ Ş Ş %s. + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +ŽĄŕ § ¤ŽŤŚĽ­ Ąëâě ­  ĺŽá⼠¨Ť¨ ŤŽŞ Ťě­ŽŹ ¤¨áŞĽ. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +ˆáŻŽŤě§Ž˘ ­¨Ľ ­ĽáŞŽŤěިĺ ä ŠŤŽ˘ ˘Ž§ŹŽŚ­Ž ⎍쪎 ¤Ťď cue/iso ŽĄŕ §Ž˘. + +. +:PROGRAM_KEYB_INFO +ŠŽ¤Ž˘ ď áâŕ ­¨ć  %i § Łŕ㌼­ . + +. +:PROGRAM_KEYB_INFO_LAYOUT +„Ťď ŕ áŞŤ ¤Ş¨ ŞŤ ˘¨ âăŕë %s § Łŕ㌼­  ŞŽ¤Ž˘ ď áâŕ ­¨ć  %i. + +. +:PROGRAM_KEYB_SHOWHELP +keyb [ID_ŕ áŞŤ ¤Ş¨_ŞŤ ˘¨ âăŕë[ ü_ŞŽ¤Ž˘ŽŠ_áâŕ ­¨ćë[ ä ŠŤ_ŞŽ¤Ž˘ŽŠ_áâŕ ­¨ćë]]] + +ŕ¨ŹĽŕë: + keyb: ŽâŽĄŕ §¨âě ⼪ăéăî ŞŽ¤Ž˘ăî áâŕ ­¨ćă. + keyb ru: ‡ Łŕ㧨âě ŕăááŞăî ŕ áŞŤ ¤Şă (ru), á ŻŽ¤ĺŽ¤ď鼊 ŞŽ¤Ž˘ŽŠ áâŕ ­¨ćĽŠ. + keyb ru 808: ‡ Łŕ㧨âě ŕăááŞăî ŕ áŞŤ ¤Şă (ru), á ŞŽ¤Ž˘ŽŠ áâŕ ­¨ćĽŠ 808. + keyb ru 808 russian.txt: ’Ž ŚĽ á ŹŽĽ, ­Ž ¨áŻŽŤě§Ž˘ âě ä ŠŤ russian.txt. +. +:PROGRAM_KEYB_NOERROR + áŞŤ ¤Ş  ŞŤ ˘¨ âăŕë %s § Łŕ㌼­  ¤Ťď ŞŽ¤Ž˘ŽŠ áâŕ ­¨ćë %i. + +. +:PROGRAM_KEYB_FILENOTFOUND +” ŠŤ ŕ áŞŤ ¤Ş¨ ŞŤ ˘¨ âăŕë %s ­Ľ ­ Š¤Ľ­. + + +. +:PROGRAM_KEYB_INVALIDFILE +Ľ˘Ľŕ­ëŠ ä ŠŤ ŕ áŞŤ ¤Ş¨ ŞŤ ˘¨ âăŕë %s. + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Ľâ ŕ áŞŤ ¤Ş¨ ŞŤ ˘¨ âăŕë ˘ %s ¤Ťď ŞŽ¤Ž˘ŽŠ áâŕ ­¨ćë %i. + +. +:PROGRAM_KEYB_INVCPFILE +Ľâ ¨Ť¨ ­Ľ˘Ľŕ­ëŠ ä ŠŤ ŞŽ¤Ž˘ŽŠ áâŕ ­¨ćë ¤Ťď ŕ áŞŤ ¤Ş¨ ŞŤ ˘¨ âăŕë %s. + + +. +:SHELL_ILLEGAL_PATH +‡ ŻŕĽéń­­ëŠ Żăâě. + +. +:SHELL_CMD_HELP +„Ťď ŻŽŞ §  ᯨ᪠ ˘áĽĺ ¤Žáâ㯭ëĺ ŞŽŹ ­¤, ˘˘Ľ¤¨âĽ help /all. +Šŕ âިŠ ᯨᎪ ç á⎠¨áŻŽŤě§ăĽŹëĺ ŞŽŹ ­¤: + +. +:SHELL_CMD_ECHO_ON +‚ŞŤîçń­ ༌¨Ź ˘ë˘Ž¤  ŞŽŹ ­¤ ­  íŞŕ ­. + +. +:SHELL_CMD_ECHO_OFF +‚몍î缭 ༌¨Ź ˘ë˘Ž¤  ŞŽŹ ­¤ ­  íŞŕ ­. + +. +:SHELL_ILLEGAL_SWITCH +‡ ŻŕĽéń­­ëŠ ŻĽŕĽŞŤîç âĽŤě: %s. + +. +:SHELL_MISSING_PARAMETER +Žâáăâáâ˘ăĽâ ŽĄď§ âĽŤě­ëŠ Ż ŕ ŹĽâŕ. + +. +:SHELL_CMD_CHDIR_ERROR +Ľ˘Ž§ŹŽŚ­Ž ¨§ŹĽ­¨âě ˘: %s. + +. +:SHELL_CMD_CHDIR_HINT +Ž¤áŞ §Ş : „Ťď ŻĽŕĽĺŽ¤  ­  ¤ŕ㣎Š ¤¨áŞ ˘˘Ľ¤¨âĽ %C: + +. +:SHELL_CMD_CHDIR_HINT_2 +ˆŹď ¤¨ŕĽŞâŽŕ¨¨ ¤Ť¨­­ĽĽ ˘Žá쏨 ᨏ˘ŽŤŽ˘ ¨/¨Ť¨ ᎤĽŕŚ¨â ŻŕŽĄĽŤë. +ŽŻŕŽĄăŠâĽ ˘˘Ľá⨠cd %s. + +. +:SHELL_CMD_CHDIR_HINT_3 +‚ë ˘áń Ľéń ­ ĺŽ¤¨âĽáě ­  ¤¨áŞĽ Z, ¤Ťď ŻĽŕĽĺŽ¤  ­  ¤¨áŞ C, ˘˘Ľ¤¨âĽ C:. + +. +:SHELL_CMD_DATE_HELP +ŽâŽĄŕ §¨âě ¨Ť¨ ¨§ŹĽ­¨âě ˘­ăâ༭­îî ¤ âă. + +. +:SHELL_CMD_DATE_ERROR +“Ş § ­­ ď ¤ â  ­ĽŻŕ ˘¨Ťě­ ď. + +. +:SHELL_CMD_DATE_DAYS +2‚Ꮽ‚â‘ŕ—ââ‘Ą +. +:SHELL_CMD_DATE_NOW +‘ĽŁŽ¤­ď: +. +:SHELL_CMD_DATE_SETHLP +„Ťď ¨§ŹĽ­Ľ­¨ď ¤ âë, ˘˘Ľ¤¨âĽ 'date MM-DD-YYYY'. + +. +:SHELL_CMD_DATE_FORMAT +D.M.Y +. +:SHELL_CMD_DATE_HELP_LONG +date [[/t] [/h] [/s] | MM-DD-YYYY] + MM-DD-YYYY: “áâ ­Ž˘¨âě ­Ž˘ăî ¤ âă. + /s: ˆáŻŽŤě§Ž˘ âě ˘ŕĽŹď ¨ ¤ âă ŽŻĽŕ ć¨Ž­­ŽŠ á¨áâĽŹë ¤Ťď ˘ŕĽŹĽ­¨ DOS. + /f: ‚Ľŕ­ăâěáď Ş ˘­ăâ༭­ĽŹă ˘ŕĽŹĽ­¨ DOSBox (ŻŕŽâ¨˘ŽŻŽŤŽŚ­Žáâě /s). + /t: ’ŽŤěŞŽ ŻŽŞ § âě ¤ âă. + /h: ‘¨­ĺ஭¨§¨ŕŽ˘ âě á ŽŻĽŕ ć¨Ž­­ŽŠ á¨á⼏ŽŠ. + +. +:SHELL_CMD_TIME_HELP +ŽâŽĄŕ §¨âě ˘­ăâ༭­ĽĽ ˘ŕĽŹď. + +. +:SHELL_CMD_TIME_NOW +‘ĽŠç á: +. +:SHELL_CMD_TIME_HELP_LONG +time [/t] [/h] + /t: ’ŽŤěŞŽ ŻŽŞ § âě ˘ŕĽŹď. + /h: ‘¨­ĺ஭¨§¨ŕŽ˘ âě á ŽŻĽŕ ć¨Ž­­ŽŠ á¨á⼏ŽŠ. + +. +:SHELL_CMD_MKDIR_ERROR +Ľ˘Ž§ŹŽŚ­Ž Ꭷ¤ âě: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Ľ˘Ž§ŹŽŚ­Ž 㤠Ť¨âě: %s. + +. +:SHELL_CMD_DEL_ERROR +Ľ˘Ž§ŹŽŚ­Ž 㤠Ť¨âě: %s. + +. +:SHELL_SYNTAXERROR +‘¨­â Şá¨á ŞŽŹ ­¤ë ­Ľ˘Ľŕ­ëŠ. + +. +:SHELL_CMD_SET_NOT_SET +ĽŕĽŹĽ­­ ď ŽŞŕ㌼­¨ď %s ­Ľ ŽŻŕĽ¤ĽŤĽ­ . + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Ľ¤Žáâ âŽç­Ž ᢎĄŽ¤­ŽŁŽ ŹĽáâ  ¤Ťď ĺŕ ­Ľ­¨ď ŻĽŕĽŹĽ­­ëĺ ŽŞŕ㌼­¨ď ŽŻĽŕ ć¨Ž­­ŽŠ á¨á⼏ë. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Žâáăâáâ˘ăĽâ ¨Źď ä ŠŤ . + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Žâáăâáâ˘ăĽâ ­ŽŹĽŕ. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Ľ˘Ľŕ­ëŠ ­ŽŹĽŕ. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +No label supplied to GOTO command. +Žâáăâáâ˘ăĽâ ŹĽâŞ  ¤Ťď ŞŽŹ ­¤ë GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: ŒĽâŞ  %s ­Ľ ­ Š¤Ľ­ . + +. +:SHELL_CMD_FILE_NOT_FOUND +” ŠŤ %s ­Ľ ­ Š¤Ľ­. + +. +:SHELL_CMD_FILE_EXISTS +” ŠŤ %s ㌼ áăéĽáâ˘ăĽâ. + +. +:SHELL_CMD_DIR_VOLUME +ŽĄęĽŹ ­  ¤¨áŞĽ %c - %s. + +. +:SHELL_CMD_DIR_INTRO +„¨ŕĽŞâŽŕ¨ď %s. + +. +:SHELL_CMD_DIR_BYTES_USED +%17d ä ŠŤë %21s Ą Šâ. + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d ¤¨ŕĽŞâŽŕ¨¨ %21s Ą Šâ ᢎĄŽ¤­Ž. + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +„¨áŞ %c ­Ľ áăéĽáâ˘ăĽâ! +ăŚ­Ž ¨áŻŽŤě§Ž˘ âě mount. „Ťď ĄŽŤě輊 ¨­äŽŕŹ ć¨¨ ˘˘Ľ¤¨âĽ intro ¨Ť¨ intro mount. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +‡ ŻŕĽéń­­ ď ŞŽŹ ­¤ : %s. + +. +:SHELL_CMD_PAUSE +„Ťď ŻŕŽ¤ŽŤŚĽ­¨ď ­ ŚŹ¨âĽ ŤîĄăî ŞŤ ˘¨čă... +. +:SHELL_CMD_PAUSE_HELP +†¤ńâ Ž¤­Ž ­ Ś â¨Ľ ŞŤ ˘¨č¨, çâŽĄë ŻŕŽ¤ŽŤŚ¨âě. + +. +:SHELL_CMD_COPY_FAILURE +Žč¨ĄŞ  ŞŽŻ¨ŕŽ˘ ­¨ď : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d ä ŠŤŽ˘ ᪎Ż¨ŕŽ˘ ­Ž. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Ľ˘Ž§ŹŽŚ­Ž 㤠Ť¨âě, ¤¨áŞ ­Ľ ¨áŻŽŤě§ăĽâáď. + +. +:SHELL_CMD_SUBST_FAILURE +Žč¨ĄŞ  subst. „ŽŻă鼭  Žč¨ĄŞ  ˘ ŞŽŹ ­¤­ŽŠ áâபĽ, ¨Ť¨ ¤¨áŞ ăŚĽ ¨áŻŽŤě§ăĽâáď. +ˆáŻŽŤě§Ž˘ âě subst ŹŽŚ­Ž ⎍쪎 ­  ŤŽŞ Ťě­ëĺ ¤¨áŞ ĺ. +. +:SHELL_STARTUP_BEGIN +ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍť +ş „ŽĄŕŽ ŻŽŚ ŤŽ˘ âě ˘ DOSBox Staging %-32s ş +ş ş +ş „Ťď ĄëáâணŽ Ž§­ ŞŽŹŤĽ­¨ď ˘˘Ľ¤¨âĽ: intro ş +ş „Ťď ŻŽ¤¤ĽŕŚ¨˘ ĽŹëĺ ŽĄŽŤŽçŞŽŠ ŞŽŹ ­¤ ˘˘Ľ¤¨âĽ: help ş +ş ş +ş —âŽĄë ŻŽ¤áâநâě ᪎ŕŽáâě, ­ ŚŹ¨âĽ Ctrl+F11 ¨ Ctrl+F12. ş +ş —âŽĄë ŻĽŕĽ­ §­ ç¨âě ŞŤ ˘¨č¨, ­ ŚŹ¨âĽ Ctrl+F1. ş +ş —⎥ë 㧭 âě ĄŽŤěčĽ, ŻŕŽçâ¨âĽ ä ŠŤ README ˘ ¤¨ŕĽŞâŽŕ¨¨ DOSBox. ş +ş ş + +. +:SHELL_STARTUP_CGA +ş DOSBox ŻŽ¤¤ĽŕŚ¨˘ Ľâ ŞŽŹŻŽ§¨â­ëŠ CGA-༌¨Ź. ş +ş F12 ¨§ŹĽ­ďĽâ ŞŽŹŻŽ§¨â­ëŠ ˘ë˘Ž¤: ˘ŞŤ, ˘ëŞŤ ¨Ť¨  ˘âŽ (ŻŽ ㏎Ťç ­¨î). ş +ş (Alt+)F11 ŹĽ­ďĽâ Žâ⼭ŽŞ; Ctrl+Alt+F11 ˘ëĄ¨ŕ Ľâ ŕ ­­îî/ŻŽ§¤­îî ŹŽ¤ĽŤě CGA.ş +ş ş + +. +:SHELL_STARTUP_CGA_MONO +ş F11 ¨§ŹĽ­ďĽâ ༌¨Ź: §ĽŤń­ëŠ, ď­â ŕ­ëŠ, ĄĽŤëŠ ¨Ť¨ ĄăŹ Ś­Ž-ĄĽŤëŠ, ş +ş ¨ Alt+F11 ¨§ŹĽ­ďĽâ ­ áâŕŽŠŞ¨ ď઎áâ¨/ŞŽ­âŕ áâ­Žáâ¨. ş + +. +:SHELL_STARTUP_HERC +ş F11 ¨§ŹĽ­ďĽâ ŹŽ­Žĺ஬­ëŠ 梼â: ĄĽŤëŠ, ď­â ŕ­ëŠ ¨Ť¨ §ĽŤń­ëŠ. ş +ş ş + +. +:SHELL_STARTUP_DEBUG +ş Alt+Pause ˘ĺŽ¤¨â ˘ ŽâŤ ¤ç¨Ş ¨Ť¨ § Żă᪠Ľâ Żŕ¨ŤŽŚĽ­¨Ľ çĽŕĽ§ debug. ş +ş ş + +. +:SHELL_STARTUP_END +ş https://dosbox-staging.github.io ş +ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍź + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +ŽŞ §ë˘ Ľâ/¨§ŹĽ­ďĽâ ⼪ăéăî ¤¨ŕĽŞâŽŕ¨î. + +. +:SHELL_CMD_CHDIR_HELP_LONG +chdir [„ˆ‘Š:][Żăâě] +chdir [..] +cd [„ˆ‘Š:][Żăâě] +cd [..] + + .. “Ş § âĽŤě ­  த¨âĽŤěáŞăî ¤¨ŕĽŞâŽŕ¨î. + +cd „ˆ‘Š: ŽâŽĄŕ §¨âě ⼪ăéăî ¤¨ŕĽŞâŽŕ¨î ­  㪠§ ­­ŽŹ ¤¨áŞĽ. +cd: ŽâŽĄŕ §¨âě ⼪ă騊 ¤¨áŞ ¨ ¤¨ŕĽŞâŽŕ¨î. + +. +:SHELL_CMD_CLS_HELP +Žç¨áâ¨âě íŞŕ ­. + +. +:SHELL_CMD_DIR_HELP +ŽâŽĄŕ §¨âě ᯨᎪ ä ŠŤŽ˘ ¨ á㥤¨ŕĽŞâŽŕ¨Š ˘ ¤¨ŕĽŞâŽŕ¨¨. + +. +:SHELL_CMD_DIR_HELP_LONG +dir [„ˆ‘Š:][Żăâě][¨Źď_ä ŠŤ ] [/[w|b]] [/p] [/[ad]|[a-d]] [/o[-][n|e|s|d]] + + [„ˆ‘Š:][Żăâě][¨Źď_ä ŠŤ ] + “Ş § âě ¤¨áŞ, ¤¨ŕĽŞâŽŕ¨î ¨/¨Ť¨ ᯨᎪ ä ŠŤŽ˘. + /w ˆáŻŽŤě§Ž˘ âě ŕ áč¨ŕĽ­­ëŠ äŽŕŹ â. + /b ˆáŻŽŤě§Ž˘ âě Şŕ âިŠ äŽŕŹ â (ĄĽ§ § ŁŽŤŽ˘ŞŽ˘ ¨ ŻŕŽçĽŠ ¨­äŽŕŹ ć¨¨). + /p Žáâ ­ ˘Ť¨˘ âěáď ŻŽáŤĽ Ş Ś¤ŽŁŽ íŞŕ ­ , § ŻŽŤ­Ľ­­ŽŁŽ ¨­äŽŕŹ ć¨ĽŠ. + /ad ŽâŽĄŕ §¨âě ˘áĽ Ş â ŤŽŁ¨. + /a-d ŽâŽĄŕ §¨âě ˘áĽ ä ŠŤë. + /o ‘Žŕâ¨ŕŽ˘ âě ᯨᎪ ä ŠŤŽ˘. + - ŕĽä¨Şá ŽĄŕ â­ŽŠ áŽŕâ¨ŕŽ˘Ş¨ + áŽŕâ¨ŕŽ˘Ş  n Ž ¨ŹĽ­¨ ( Ťä ˘¨â­ ď) s Ž ŕ §ŹĽŕă (Žâ ­ ¨ŹĽ­ě輣Ž) + e Ž ŕ áč¨ŕĽ­¨î ( Ťä ˘¨â­ ď) d Ž ¤ âĽ ¨ ˘ŕĽŹĽ­¨ (Žâ áâ ŕĽŠčĽŁŽ) + +. +:SHELL_CMD_ECHO_HELP +ŽâŽĄŕ Ś âě ᎎĄéĽ­¨ď ¨ ˘ŞŤîç¨âě/˘ëŞŤîç¨âě ༌¨Ź ˘ë˘Ž¤  ŞŽŹ ­¤ ­  íŞŕ ­. + +. +:SHELL_CMD_EXIT_HELP +‚ë厤 ¨§ ŽĄŽŤŽçި. + +. +:SHELL_CMD_HELP_HELP +ŽŞ § âě áŻŕ ˘Žç­ăî ¨­äŽŕŹ ć¨î. + +. +:SHELL_CMD_MKDIR_HELP +‘Ž§¤ âě ¤¨ŕĽŞâŽŕ¨î. + +. +:SHELL_CMD_MKDIR_HELP_LONG +mkdir [„ˆ‘Š:][Żăâě] +md [„ˆ‘Š:][Żăâě] + +. +:SHELL_CMD_RMDIR_HELP +“¤ Ť¨âě ¤¨ŕĽŞâŽŕ¨î. + +. +:SHELL_CMD_RMDIR_HELP_LONG +rmdir [„ˆ‘Š:][Żăâě] +rd [„ˆ‘Š:][Żăâě] + +. +:SHELL_CMD_SET_HELP +ˆ§ŹĽ­¨âě ŻĽŕĽŹĽ­­ëĽ ŽŞŕ㌼­¨ď. + +. +:SHELL_CMD_IF_HELP +‚믎Ť­¨âě ăፎ˘­ăî ŽĄŕ ĄŽâŞă ˘ Ż ŞĽâ­ëĺ ŻŕŽŁŕ ŹŹ ĺ. + +. +:SHELL_CMD_GOTO_HELP +ĽŕĽŠâ¨ Ş ŻŽŹĽçĽ­­ŽŠ áâபĽ ˘ Ż ŞĽâ­ŽŹ áŞŕ¨ŻâĽ. + +. +:SHELL_CMD_SHIFT_HELP + ŕ ŹĽâŕë ŞŽŹ ­¤­ŽŠ áâப¨ ŽĄŕ â­ŽŁŽ ᤢ¨Ł  ˘ Ż ŞĽâ­ŽŹ áŞŕ¨ŻâĽ. + +. +:SHELL_CMD_TYPE_HELP +ŽâŽĄŕ §¨âě ᎤĽŕŚ¨ŹŽĽ ⼪á⎢ŽŁŽ ä ŠŤ . + +. +:SHELL_CMD_TYPE_HELP_LONG +type [„ˆ‘Š:][Żăâě][¨Źď_ä ŠŤ ] + +. +:SHELL_CMD_REM_HELP +„ŽĄ ˘¨âě ŞŽŹŹĽ­â ŕ¨Š ˘ Ż ŞĽâ­ëŠ ä ŠŤ. + +. +:SHELL_CMD_REM_HELP_LONG +rem [ŞŽŹŹĽ­â ŕ¨Š] + +. +:SHELL_CMD_NO_WILD +âŽ ŻŕŽáâ ď ˘Ľŕá¨ď ŞŽŹ ­¤ë, ᯼ćᨏ˘ŽŤë § ŻŕĽéĽ­ë! + +. +:SHELL_CMD_RENAME_HELP +ĽŕĽ¨ŹĽ­Ž˘ âě Ž¤¨­ ¨Ť¨ ­ĽáŞŽŤěŞŽ ä ŠŤŽ˘. + +. +:SHELL_CMD_RENAME_HELP_LONG +rename [„ˆ‘Š:][Żăâě]¨Źď_ä ŠŤ _1 ¨Źď_ä ŠŤ _2. +ren [„ˆ‘Š:][Żăâě]¨Źď_ä ŠŤ _1 ¨Źď_ä ŠŤ _2. + +ŽĄŕ â¨âĽ ˘­¨Ź ­¨Ľ, ç⎠­Ľ˘Ž§ŹŽŚ­Ž 㪠§ âě ­Ž˘ëŠ ¤¨áŞ ¨Ť¨ Żăâě Ş 漍Ľ˘ŽŹă ä ŠŤă. + +. +:SHELL_CMD_DELETE_HELP +“¤ Ť¨âě Ž¤¨­ ¨Ť¨ ­ĽáŞŽŤěŞŽ ä ŠŤŽ˘. + +. +:SHELL_CMD_COPY_HELP +ŠŽŻ¨ŕŽ˘ âě ä ŠŤë. + +. +:SHELL_CMD_CALL_HELP +‡ Żăáâ¨âě Ż ŞĽâ­ëŠ ä ŠŤ ¨§ ¤ŕ㣎ŁŽ Ż ŞĽâ­ŽŁŽ ä ŠŤ . + +. +:SHELL_CMD_SUBST_HELP + §­ ç¨âě ¤¨áŞă ˘­ăâ༭­îî ¤¨ŕĽŞâŽŕ¨î. + +. +:SHELL_CMD_LOADHIGH_HELP +‡ Łŕ㧨âě ŻŕŽŁŕ ŹŹă ˘ ˘Ľŕĺ­îî Ż Źďâě (â༥ăĽâ xms=true,umb=true). + +. +:SHELL_CMD_LS_HELP +‘Ż¨áŽŞ ᎤĽŕŚ¨ŹŽŁŽ ¤¨ŕĽŞâŽŕ¨¨. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [č ĄŤŽ­] + +. +:SHELL_CMD_LS_PATH_ERR +ls: ­Ľ˘Ž§ŹŽŚ­Ž ŻŽŤăç¨âě ¤ŽáâăŻ Ş "%s": Ľâ â ŞŽŁŽ ä ŠŤ  ¨Ť¨ ¤¨ŕĽŞâŽŕ¨¨. + +. +:SHELL_CMD_CHOICE_HELP +†¤ âě ­ Ś â¨ď ŞŤ ˘¨č¨ ¨ ăáâ ­Ž˘Ş¨ ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +choice [/c:ŞŤ ˘¨č¨] [/n] [/s] ⼪áâ + /c[:]ŞŤ ˘¨č¨ - ŽŻŕĽ¤ĽŤďĽâ ¤ŽŻăáâ¨ŹëĽ ŞŤ ˘¨č¨. Ž ㏎Ťç ­¨î: yn. + /n - Ľ ŽâŽĄŕ Ś âě ˘ ŕ¨ ­âë ˘ ŞŽ­ćĽ § ŻŕŽá . + /s - ŽŻŕĽ¤ĽŤ¨âě ༣¨áâ஧ ˘¨á¨ŹëŠ ˘ëĄŽŕ. + ⼪áâ - ’ĽŞáâ, ŽâŽĄŕ Ś ĽŹëŠ ˘ Ş çĽá⢼ ŻŽ¤áŞ §Ş¨. + +. +:SHELL_CMD_ATTRIB_HELP +¨çĽŁŽ ­Ľ ¤ĽŤ Ľâ. ŽĄĽáŻĽçĽ­  ᎢŹĽá⨏Žáâě. + +. +:SHELL_CMD_PATH_HELP +ŽĄĽáŻĽçĽ­  ᎢŹĽá⨏Žáâě. + +. +:SHELL_CMD_VER_HELP +ŽŞ § âě ¨Ť¨ ăáâ ­Ž˘¨âě ˘Ľŕá¨î DOS. + +. +:SHELL_CMD_VER_HELP_LONG +ˆáŻŽŤě§Ž˘ ­¨Ľ: + ver + ver set ˘Ľŕá¨ď + +ƒ¤Ľ: + ˘Ľŕá¨ď ŹŽŚĽâ Ąëâě ćĽŤëŹ ç¨áŤŽŹ, ­ Żŕ¨ŹĽŕ 5, ¨Ť¨ ¤Ľáďâ¨ç­ŽŠ ¤ŕŽĄěî, + ­ Żŕ¨ŹĽŕ: 6.22, 7.01 ¨Ť¨ 7.10. „Ľáďâ¨ç­ ď ¤ŕŽĄě ŹŽŚĽâ + ŕ §¤ĽŤďâěáď ŻŕŽĄĽŤŽŹ, ­ Żŕ¨ŹĽŕ: 6 22 ¨Ť¨ 7 01, ¨Ť¨ 7 10. + +ŕ¨ŹĽç ­¨ď: + ‚Ľŕá¨î DOS ŹŽŚ­Ž, â ŞŚĽ, ăáâ ­Ž˘¨âě ˘ ä ŠŤĽ ŞŽ­ä¨Łăŕ ć¨¨ ˘ ŕ §¤ĽŤĽ [dos] + á ŻŽŹŽéěî ­ áâŕŽŠŞ¨ "ver = ˘Ľŕá¨ď". + +ŕ¨ŹĽŕë: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +‚Ľŕá¨ď DOSBox Staging %s +‚Ľŕá¨ď DOS %d.%02d + +. +:SHELL_CMD_VER_INVALID +ĽŻŕ ˘¨Ťě­ ď ˘Ľŕá¨ď DOS. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/update-en.sh dosbox-staging-0.77.0/contrib/translations/update-en.sh --- dosbox-staging-0.76.0/contrib/translations/update-en.sh 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/update-en.sh 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,23 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020-2021 Patryk Obara + +set -x + +cd "$(git rev-parse --show-toplevel)" || exit + +./build/dosbox \ + -lang '' \ + -c 'config -wl contrib/translations/en/en_US.lng' \ + -c 'exit' \ + > /dev/null + +iconv -f CP437 -t UTF-8 'contrib/translations/en/en_US.lng' \ + > 'contrib/translations/utf-8/en/en-0.77.0-alpha.txt' + +set +x + +echo +echo "Now run 'git add -p' and carefully update the translation files." diff -Nru dosbox-staging-0.76.0/contrib/translations/utf-8/en/en-0.77.0-alpha.txt dosbox-staging-0.77.0/contrib/translations/utf-8/en/en-0.77.0-alpha.txt --- dosbox-staging-0.76.0/contrib/translations/utf-8/en/en-0.77.0-alpha.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/utf-8/en/en-0.77.0-alpha.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1428 @@ +:CONFIG_FULLSCREEN +Start DOSBox directly in fullscreen. +Press " MMOD2_NAME "+Enter to switch back to window. +. +:CONFIG_DISPLAY +Number of display to use; values depend on OS and user settings. +. +:CONFIG_VSYNC +Vertical sync setting not implemented (setting ignored) +. +:CONFIG_FULLRESOLUTION +What resolution to use for fullscreen: 'original', 'desktop' +or a fixed size (e.g. 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Set window size to be used when running in windowed mode: + default: Select the best option based on your + environment and other settings. + original: Resize window to the resolution picked by + the emulated program. + resizable: Make the emulator window resizable. + This is an experimental option, works only with + output=opengl and glshader=sharp (or none) + : Scale the window content to the indicated + dimensions, in WxH format. For example: 1024x768. + Scaling is not performed for output=surface. +. +:CONFIG_OUTPUT +What video system to use for output. +. +:CONFIG_TEXTURE_RENDERER +Choose a renderer driver when using a texture output mode. +Use texture_renderer=auto for an automatic choice. +. +:CONFIG_CAPTURE_MOUSE +Choose a mouse control method: + onclick: The mouse will be captured after the first + click inside the window. + onstart: The mouse is captured immediately on start + (similar to real DOS). + seamless: The mouse can move seamlessly in and out of DOSBox + window and cannot be captured. + nomouse: The mouse is disabled and hidden without any + input sent to the game. +Choose how middle-clicks are handled (second parameter): + middlegame: Middle-clicks are sent to the game + (" PRIMARY_MOD_NAME "+F10 uncaptures the mouse). + middlerelease: Middle-clicks are used to uncapture the mouse + (not sent to the game). However, middle-clicks + will be sent to the game in fullscreen or when + seamless control is set. + " PRIMARY_MOD_NAME "+F10 will also uncapture the mouse. +Defaults (if not present or incorrect): seamless middlerelease +. +:CONFIG_SENSITIVITY +Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Enable this setting to bypass your operating system's mouse +acceleration and sensitivity settings. This works in +fullscreen or when the mouse is captured in window mode. +. +:CONFIG_WAITONERROR +Wait before closing the console if dosbox has an error. +. +:CONFIG_PRIORITY +Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized. +pause is only valid for the second entry. +. +:CONFIG_MAPPERFILE +File used to load/save the key/event mappings from. +Resetmapper only works with the default value. +. +:CONFIG_SCREENSAVER +Use 'allow' or 'block' to override the SDL_VIDEO_ALLOW_SCREENSAVER +environment variable (which usually blocks the OS screensaver +while the emulator is running). +. +:CONFIG_LANGUAGE +Select another language file. +. +:CONFIG_MACHINE +The type of machine DOSBox tries to emulate. +. +:CONFIG_CAPTURES +Directory where things like wave, midi, screenshot get captured. +. +:CONFIG_MEMSIZE +Amount of memory DOSBox has in megabytes. +This value is best left at its default to avoid problems with some games, +though few games might require a higher value. +There is generally no speed advantage when raising this value. +. +:CONFIG_STARTUP_VERBOSITY +Controls verbosity prior to displaying the program: +Verbosity | Splash | Welcome | Early stdout +high | yes | yes | yes +medium | no | yes | yes +low | no | no | yes +quiet | no | no | no +splash_only | yes | no | no +auto | 'low' if exec or dir is passed, otherwise 'high' +. +:CONFIG_FRAMESKIP +How many frames DOSBox skips before drawing one. +. +:CONFIG_ASPECT +Scales the vertical resolution to produce a 4:3 display aspect +ratio, matching that of the original standard-definition monitors +for which the majority of DOS games were designed. This setting +only affects video modes that use non-square pixels, such as +320x200 or 640x400; where as square-pixel modes, such as 640x480 +and 800x600, will be displayed as-is. +. +:CONFIG_MONOCHROME_PALETTE +Select default palette for monochrome display. +Works only when emulating hercules or cga_mono. +You can also cycle through available colours using F11. +. +:CONFIG_SCALER +Scaler used to enlarge/enhance low resolution modes. +If 'forced' is appended, then the scaler will be used even if +the result might not be desired. +Note that some scalers may use black borders to fit the image +within your configured display resolution. If this is +undesirable, try either a different scaler or enabling +fullresolution output. +. +:CONFIG_GLSHADER +Either 'none' or a GLSL shader name. Works only with +OpenGL output. Can be either an absolute path, a file +in the 'glshaders' subdirectory of the DOSBox +configuration directory, or one of the built-in shaders: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (default). +. +:CONFIG_CORE +CPU Core used in emulation. auto will switch to dynamic if available and +appropriate. +. +:CONFIG_CPUTYPE +CPU Type used in emulation. auto is the fastest choice. +. +:CONFIG_CYCLES +Amount of instructions DOSBox tries to emulate each millisecond. +Setting this value too high results in sound dropouts and lags. +Cycles can be set in 3 ways: + 'auto' tries to guess what a game needs. + It usually works, but can fail for certain games. + 'fixed #number' will set a fixed amount of cycles. This is what you usually + need if 'auto' fails (Example: fixed 4000). + 'max' will allocate as much cycles as your computer is able to + handle. +. +:CONFIG_CYCLEUP +Number of cycles to decrease/increase with keycombos. (" PRIMARY_MOD_NAME "+F11/" PRIMARY_MOD_NAME "+F12) +. +:CONFIG_CYCLEDOWN +Setting it lower than 100 will be a percentage. +. +:CONFIG_NOSOUND +Enable silent mode, sound is still emulated though. +. +:CONFIG_RATE +Mixer sample rate, setting any device's rate higher than this will probably lower their sound quality. +. +:CONFIG_BLOCKSIZE +Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged. +. +:CONFIG_PREBUFFER +How many milliseconds of data to keep on top of the blocksize. +. +:CONFIG_MIDIDEVICE +Device that will receive the MIDI data (from the emulated MIDI +interface - MPU-401). Choose one of the following: +'fluidsynth', to use the built-in MIDI synthesizer. See the + [fluidsynth] section for detailed configuration. +'mt32', to use the built-in Roland MT-32 synthesizer. + See the [mt32] section for detailed configuration. +'auto', to use the first working external MIDI player. This + might be a software synthesizer or physical device. +. +:CONFIG_MIDICONFIG +Configuration options for the selected MIDI interface. +This is usually the id or name of the MIDI synthesizer you want +to use (find the id/name with DOS command 'mixer /listmidi'). +- This option has no effect when using the built-in synthesizers + (mididevice = fluidsynth or mt32). +- When using ALSA, use Linux command 'aconnect -l' to list open + MIDI ports, and select one (for example 'midiconfig=14:0' + for sequencer client 14, port 0). +- If you're using a physical Roland MT-32 with revision 0 PCB, + the hardware may require a delay in order to prevent its + buffer from overflowing. In that case, add 'delaysysex', + for example: 'midiconfig=2 delaysysex'. +See the README/Manual for more details. +. +:CONFIG_MPU401 +Type of MPU-401 to emulate. +. +:CONFIG_SOUNDFONT +Path to a SoundFont file in .sf2 format. You can use an +absolute or relative path, or the name of an .sf2 inside +the 'soundfonts' directory within your DOSBox configuration +directory. +An optional percentage will scale the SoundFont's volume. +For example: 'soundfont.sf2 50' will attenuate it by 50 percent. +The scaling percentage can range from 1 to 500. +. +:CONFIG_MODEL +Model of synthesizer to use. The default (auto) prefers CM-32L +if both sets of ROMs are provided. For early Sierra games and Dune 2 +it's recommended to use 'mt32', while newer games typically made +use of the CM-32L's extra sound effects (use 'auto' or 'cm32l') +. +:CONFIG_ROMDIR +The directory containing one or both pairs of MT-32 and/or CM-32L ROMs. +The files must be named in capitals, as follows: + - MT-32 ROM pair: MT32_CONTROL.ROM and MT32_PCM.ROM + - CM-32L ROM pair: CM32L_CONTROL.ROM and CM32L_PCM.ROM +The directory can be absolute or relative, or leave it blank to +use the 'mt32-roms' directory in your DOSBox configuration +directory, followed by checking other common system locations. +. +:CONFIG_SBTYPE +Type of Sound Blaster to emulate. 'gb' is Game Blaster. +. +:CONFIG_SBBASE +The IO address of the Sound Blaster. +. +:CONFIG_IRQ +The IRQ number of the Sound Blaster. +. +:CONFIG_DMA +The DMA number of the Sound Blaster. +. +:CONFIG_HDMA +The High DMA number of the Sound Blaster. +. +:CONFIG_SBMIXER +Allow the Sound Blaster mixer to modify the DOSBox mixer. +. +:CONFIG_OPLRATE +oplrate is deprecated. The OPL waveform is now sampled + at the mixer's playback rate to avoid resampling. +. +:CONFIG_OPLMODE +Type of OPL emulation. On 'auto' the mode is determined by 'sbtype'. +All OPL modes are AdLib-compatible, except for 'cms'. +. +:CONFIG_OPLEMU +Provider for the OPL emulation. 'compat' provides better quality, +'nuked' is the default and most accurate (but the most CPU-intensive). +. +:CONFIG_GUS +Enable Gravis UltraSound emulation. +. +:CONFIG_GUSBASE +The IO base address of the Gravis UltraSound. +. +:CONFIG_GUSIRQ +The IRQ number of the Gravis UltraSound. +. +:CONFIG_GUSDMA +The DMA channel of the Gravis UltraSound. +. +:CONFIG_ULTRADIR +Path to UltraSound directory. In this directory +there should be a MIDI directory that contains +the patch files for GUS playback. Patch sets used +with Timidity should work fine. +. +:CONFIG_PCSPEAKER +Enable PC-Speaker emulation. +. +:CONFIG_PCRATE +Sample rate of the PC-Speaker sound generation. +. +:CONFIG_ZERO_OFFSET +Neutralizes and prevents the PC speaker's DC-offset from harming other sources. +'auto' enables this for non-Windows systems and disables it on Windows. +If your OS performs its own DC-offset correction, then set this to 'false'. +. +:CONFIG_TANDY +Enable Tandy Sound System emulation. For 'auto', emulation is present only if machine is set to 'tandy'. +. +:CONFIG_TANDYRATE +Sample rate of the Tandy 3-Voice generation. +. +:CONFIG_DISNEY +Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible). +. +:CONFIG_JOYSTICKTYPE +Type of joystick to emulate: auto (default), +none (disables joystick emulation), +2axis (supports two joysticks), +4axis (supports one joystick, first joystick used), +4axis_2 (supports one joystick, second joystick used), +fcs (Thrustmaster), ch (CH Flightstick). +auto chooses emulation depending on real joystick(s). +(Remember to reset DOSBox's mapperfile if you saved it earlier) +. +:CONFIG_TIMED +enable timed intervals for axis. Experiment with this option, if your joystick drifts (away). +. +:CONFIG_AUTOFIRE +continuously fires as long as you keep the button pressed. +. +:CONFIG_SWAP34 +swap the 3rd and the 4th axis. Can be useful for certain joysticks. +. +:CONFIG_BUTTONWRAP +enable button wrapping at the number of emulated buttons. +. +:CONFIG_CIRCULARINPUT +enable translation of circular input to square output. +Try enabling this if your left analog stick can only move in a circle. +. +:CONFIG_DEADZONE +the percentage of motion to ignore. 100 turns the stick into a digital one. +. +:CONFIG_SERIAL1 +set type of device connected to com port. +Can be disabled, dummy, modem, nullmodem, directserial. +Additional parameters must be in the same line in the form of +parameter:value. Parameter for all types is irq (optional). +for directserial: realport (required), rxdelay (optional). + (realport:COM1 realport:ttyS0). +for modem: listenport (optional). +for nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (all optional). +Example: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +see serial1 +. +:CONFIG_SERIAL3 +see serial1 +. +:CONFIG_SERIAL4 +see serial1 +. +:CONFIG_PHONEBOOKFILE +File used to map fake phone numbers to addresses. +. +:CONFIG_XMS +Enable XMS support. +. +:CONFIG_EMS +Enable EMS support. The default (=true) provides the best +compatibility but certain applications may run better with +other choices, or require EMS support to be disabled (=false) +to work at all. +. +:CONFIG_UMB +Enable UMB support. +. +:CONFIG_VER +Set DOS version (5.0 by default). Specify as major.minor format. +A single number is treated as the major version. +Common settings are 3.3, 5.0, 6.22, and 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Language code of the keyboard layout (or none). +. +:CONFIG_IPX +Enable ipx over UDP/IP emulation. +. +:AUTOEXEC_CONFIGFILE_HELP +Lines in this section will be run at startup. +You can put your MOUNT lines here. + +. +:CONFIGFILE_INTRO +# This is the configuration file for dosbox-staging (%s). +# Lines starting with a '#' character are comments. + +. +:CONFIG_SUGGESTED_VALUES +Possible values +. +:PROGRAM_CONFIG_NOCONFIGFILE +No config file loaded! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Primary config file: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Additional config files: + +. +:PROGRAM_CONFIG_CONFDIR +DOSBox Staging %s configuration directory: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Can't open file %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Writing config file %s + +. +:PROGRAM_CONFIG_USAGE +Config tool: +-writeconf or -wc without parameter: write to primary loaded config file. +-writeconf or -wc with filename: write file to config directory. +Use -writelang or -wl filename to write the current language strings. +-r [parameters] + Restart DOSBox, either using the previous parameters or any that are appended. +-wcp [filename] + Write config file to the program directory, dosbox.conf or the specified + filename. +-wcd + Write to the default config file in the config directory. +-l lists configuration parameters. +-h, -help, -? sections / sectionname / propertyname + Without parameters, displays this help screen. Add "sections" for a list of + sections. For info about a specific section or property add its name behind. +-axclear clears the autoexec section. +-axadd [line] adds a line to the autoexec section. +-axtype prints the content of the autoexec section. +-securemode switches to secure mode. +-avistart starts AVI recording. +-avistop stops AVI recording. +-startmapper starts the keymapper. +-get "section property" returns the value of the property. +-set "section property=value" sets the value. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Purpose of property "%s" (contained in section "%s"): +%s + +Possible Values: %s +Default value: %s +Current value: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Purpose of section "%s": +%s +Current value: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +This property cannot be changed at runtime. + +. +:PROGRAM_CONFIG_HLP_POSINT +positive integer +. +:PROGRAM_CONFIG_HLP_SECTHLP +Section %s contains the following properties: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +DOSBox configuration contains the following sections: + + +. +:PROGRAM_CONFIG_SECURE_ON +Switched to secure mode. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +This operation is not permitted in secure mode. + +. +:PROGRAM_CONFIG_SECTION_ERROR +Section "%s" doesn't exist. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" is not a valid value for property %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +No such section or property. + +. +:PROGRAM_CONFIG_NO_PROPERTY +There is no property "%s" in section "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Correct syntax: config -set "section property". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Correct syntax: config -get "section property". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox was started with the following command line parameters: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Missing parameter. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMs found: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Drive +. +:PROGRAM_MOUNT_STATUS_TYPE +Type +. +:PROGRAM_MOUNT_STATUS_LABEL +Label +. +:PROGRAM_MOUNT_STATUS_2 +Drive %c is mounted as %s + +. +:PROGRAM_MOUNT_STATUS_1 +The currently mounted drives are: + +. +:PROGRAM_MOUNT_ERROR_1 +Directory %s doesn't exist. + +. +:PROGRAM_MOUNT_ERROR_2 +%s isn't a directory + +. +:PROGRAM_MOUNT_ILL_TYPE +Illegal type %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Drive %c already mounted with %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Drive %c isn't mounted. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Drive %c has successfully been removed. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Virtual Drives can not be unMOUNTed. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' is not a valid drive identifier. + +. +:PROGRAM_MOUNT_WARNING_WIN +Mounting c:\ is NOT recommended. Please mount a (sub)directory next time. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Mounting / is NOT recommended. Please mount a (sub)directory next time. + +. +:PROGRAM_MOUNT_NO_OPTION +Warning: Ignoring unsupported option '%s'. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +A normal directory needs to be MOUNTed first before an overlay can be added on top. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +The overlay is NOT compatible with the drive that is specified. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +The overlay needs to be specified using the same addressing as the underlying drive. No mixing of relative and absolute paths. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +The overlay directory can not be the same as underlying drive. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Something went wrong. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Overlay %s on drive %c mounted. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Can't move drive Z. Drive %c is mounted already. + +. +:PROGRAM_MEM_CONVEN +%10d kB free conventional memory + +. +:PROGRAM_MEM_EXTEND +%10d kB free extended memory + +. +:PROGRAM_MEM_EXPAND +%10d kB free expanded memory + +. +:PROGRAM_MEM_UPPER +%10d kB free upper memory in %d blocks (largest UMB %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB allocated. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB freed. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Used memory freed. + +. +:PROGRAM_LOADFIX_ERROR +Memory allocation error. + +. +:MSCDEX_SUCCESS +MSCDEX installed. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Failure: Drive-letters of multiple CD-ROM drives have to be continuous. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Failure: Not yet supported. + +. +:MSCDEX_ERROR_PATH +MSCDEX: Specified location is not a CD-ROM drive. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Failure: Invalid file or unable to open. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Failure: Too many CD-ROM drives (max: 5). MSCDEX Installation failed. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Mounted subdirectory: limited support. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Failure: File is either no ISO/CUE image or contains errors. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Failure: Unknown error. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Warning: Ignoring unsupported option '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +Drive cache cleared. + +. +:PROGRAM_INTRO +Welcome to DOSBox Staging, an x86 emulator with sound and graphics. +DOSBox creates a shell for you which looks like old plain DOS. + +For information about basic mount type intro mount +For information about CD-ROM support type intro cdrom +For information about special keys type intro special +For more imformation, visit DOSBox Staging wiki: +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox will stop/exit without a warning if an error occurred! + +. +:PROGRAM_INTRO_MOUNT_START +Here are some commands to get you started: +Before you can use the files located on your own filesystem, +You have to mount the directory containing the files. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +╔═════════════════════════════════════════════════════════════════════════╗ +║ mount c c:\dosgames\ will create a C drive with c:\dosgames as contents.║ +║ ║ +║ c:\dosgames\ is an example. Replace it with your own games directory.  ║ +╚═════════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_OTHER +╔══════════════════════════════════════════════════════════════════════╗ +║ mount c ~/dosgames will create a C drive with ~/dosgames as contents.║ +║ ║ +║ ~/dosgames is an example. Replace it with your own games directory. ║ +╚══════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_END +After successfully mounting the disk you can type c: to go to your freshly +mounted C-drive. Typing dir there will show its contents. cd will allow you to +enter a directory (recognised by the [] in a directory listing). +You can run programs/files with extensions .exe .bat and .com. + +. +:PROGRAM_INTRO_CDROM +How to mount a virtual CD-ROM Drive in DOSBox: +DOSBox provides CD-ROM emulation on several levels. + +This works on all normal directories, installs MSCDEX and marks the files +read-only. Usually this is enough for most games: + +mount D C:\example -t cdrom + +If it doesn't work you might have to tell DOSBox the label of the CD-ROM: + +mount D C:\example -t cdrom -label CDLABEL + +Additionally, you can use imgmount to mount iso or cue/bin images: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Special keys: +These are the default keybindings. +They can be changed in the keymapper. + +" MMOD2_NAME "+Enter Switch between fullscreen and window mode. +" MMOD2_NAME "+Pause Pause/Unpause emulator. +" PRIMARY_MOD_NAME "+F1 " PRIMARY_MOD_PAD " Start the keymapper. +" PRIMARY_MOD_NAME "+F4 " PRIMARY_MOD_PAD " Swap mounted disk image, update directory cache for all drives. +" PRIMARY_MOD_NAME "+F5 " PRIMARY_MOD_PAD " Save a screenshot. +" PRIMARY_MOD_NAME "+F6 " PRIMARY_MOD_PAD " Start/Stop recording sound output to a wave file. +" PRIMARY_MOD_NAME "+F7 " PRIMARY_MOD_PAD " Start/Stop recording video output to a zmbv file. +" PRIMARY_MOD_NAME "+F9 " PRIMARY_MOD_PAD " Shutdown emulator. +" PRIMARY_MOD_NAME "+F10 " PRIMARY_MOD_PAD " Capture/Release the mouse. +" PRIMARY_MOD_NAME "+F11 " PRIMARY_MOD_PAD " Slow down emulation. +" PRIMARY_MOD_NAME "+F12 " PRIMARY_MOD_PAD " Speed up emulation. +" MMOD2_NAME "+F12 Unlock speed (turbo button/fast forward). + +. +:PROGRAM_BOOT_NOT_EXIST +Bootdisk file does not exist. Failing. + +. +:PROGRAM_BOOT_NOT_OPEN +Cannot open bootdisk file. Failing. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Image file is read-only! Might create problems. + +. +:PROGRAM_BOOT_PRINT_ERROR +This command boots DOSBox from either a floppy or hard disk image. + +For this command, one can specify a succession of floppy disks swappable +by pressing " PRIMARY_MOD_NAME "+F4, and -l specifies the mounted drive to boot from. If +no drive letter is specified, this defaults to booting from the A drive. +The only bootable drive letters are A, C, and D. For booting from a hard +drive (C or D), the image should have already been mounted using the +IMGMOUNT command. + +The syntax of this command is: + +BOOT [diskimg1.img diskimg2.img] [-l driveletter] + +. +:PROGRAM_BOOT_UNABLE +Unable to boot off of drive %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Opening image file: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Cannot open %s +. +:PROGRAM_BOOT_BOOT +Booting from drive %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr cartridge found, but machine is not PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Available PCjr cartridge commands: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +No PCjr cartridge commands found +. +:PROGRAM_LOADROM_SPECIFY_FILE +Must specify ROM file to load. + +. +:PROGRAM_LOADROM_CANT_OPEN +ROM file not accessible. + +. +:PROGRAM_LOADROM_TOO_LARGE +ROM file too large. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +Video BIOS not supported by machine type. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +ROM file not recognized. + +. +:PROGRAM_LOADROM_BASIC_LOADED +BASIC ROM loaded. + +. +:SHELL_CMD_IMGMOUNT_HELP +mounts compact disc image(s) or floppy disk image(s) to a given drive letter. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Mount a CD-ROM, floppy, or disk image to a drive letter. + +Usage: + imgmount DRIVE CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount DRIVE IMAGEFILE [IMAGEFILE2 [..]] [-fs fat] -t hdd|floppy + imgmount DRIVE BOOTIMAGE [-fs fat|none] -t hdd -size GEOMETRY + imgmount -u DRIVE (unmounts the DRIVE's image) + +Where: + DRIVE is the drive letter where the image will be mounted: a, c, d, ... + CDROM-SET is an ISO, CUE+BIN, CUE+ISO, or CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + IMAGEFILE is a hard drive or floppy image in FAT16 or FAT12 format + BOOTIMAGE is a bootable disk image with specified -size GEOMETRY: + bytes-per-sector,sectors-per-head,heads,cylinders +Notes: + - " PRIMARY_MOD_NAME "+F4 swaps & mounts the next CDROM-SET or IMAGEFILE, if provided. + +Examples: + imgmount D /home/USERNAME/games/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A floppy1.img floppy2.img floppy3.img -t floppy + imgmount C ~/dos/c_drive.img -t hdd + imgmount C bootable.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +maps physical folders or drives to a virtual drive letter. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Mount a directory from the host OS to a drive letter. + +Usage: + mount DRIVE DIRECTORY [-t TYPE] [-freesize SIZE] [-label LABEL] + mount -u DRIVE (unmounts the DRIVE's directory) + +Where: + DRIVE the drive letter where the directory will be mounted: A, C, D, ... + DIRECTORY is the directory on the host OS to be mounted + TYPE type of the directory to mount: dir, floppy, cdrom, or overlay + SIZE free space for the virtual drive (KiB for floppies, MiB otherwise) + LABEL drive label name to be used + +Notes: + - '-t overlay' redirects writes for mounted drive to another directory. + - Additional options are described in the manual (README file, chapter 4). + +Examples: + mount C ~/dosgames + mount D "/media/USERNAME/Game CD" -t cdrom + mount C my_savegame_files -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Must specify drive letter to mount image at. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Must specify drive number (0 or 3) to mount image at (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +For CD-ROM images: IMGMOUNT drive-letter location-of-image -t iso + +For hardrive images: Must specify drive geometry for hard drives: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT drive-letter location-of-image -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Could not load image file. +Check that the path is correct and the image is accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Could not extract drive geometry from image. +Use parameter -size bps,spc,hpc,cyl to specify the geometry. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Type '%s' is unsupported. Specify 'floppy', 'hdd', 'cdrom', or 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" is unsupported. Specify "fat" or "iso" or "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Must specify file-image to mount. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Image file not found. + +. +:PROGRAM_IMGMOUNT_MOUNT +To mount directories, use the MOUNT command, not the IMGMOUNT command. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Drive already mounted at that letter. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Can't create drive from file. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Drive number %d mounted as %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +The image must be on a host or local drive. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Using multiple files is only supported for cue/iso images. + +. +:PROGRAM_KEYB_INFO +Codepage %i has been loaded + +. +:PROGRAM_KEYB_INFO_LAYOUT +Codepage %i has been loaded for layout %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [keyboard layout ID[ codepage number[ codepage file]]] + +Some examples: + KEYB: Display currently loaded codepage. + KEYB sp: Load the spanish (SP) layout, use an appropriate codepage. + KEYB sp 850: Load the spanish (SP) layout, use codepage 850. + KEYB sp 850 mycp.cpi: Same as above, but use file mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Keyboard layout %s loaded for codepage %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Keyboard file %s not found + + +. +:PROGRAM_KEYB_INVALIDFILE +Keyboard file %s invalid + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +No layout in %s for codepage %i + +. +:PROGRAM_KEYB_INVCPFILE +None or invalid codepage file for layout %s + + +. +:SHELL_ILLEGAL_PATH +Illegal Path. + +. +:SHELL_CMD_HELP +If you want a list of all supported commands type help /all . +A short list of the most often used commands: + +. +:SHELL_CMD_ECHO_ON +ECHO is on. + +. +:SHELL_CMD_ECHO_OFF +ECHO is off. + +. +:SHELL_ILLEGAL_SWITCH +Illegal switch: %s. + +. +:SHELL_MISSING_PARAMETER +Required parameter missing. + +. +:SHELL_CMD_CHDIR_ERROR +Unable to change to: %s. + +. +:SHELL_CMD_CHDIR_HINT +Hint: To change to different drive type %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +directoryname is longer than 8 characters and/or contains spaces. +Try cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +You are still on drive Z:, change to a mounted drive with C:. + +. +:SHELL_CMD_DATE_HELP +Displays or changes the internal date. + +. +:SHELL_CMD_DATE_ERROR +The specified date is not correct. + +. +:SHELL_CMD_DATE_DAYS +3SunMonTueWedThuFriSat +. +:SHELL_CMD_DATE_NOW +Current date: +. +:SHELL_CMD_DATE_SETHLP +Type 'date MM-DD-YYYY' to change. + +. +:SHELL_CMD_DATE_FORMAT +M/D/Y +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-DD-YYYY] + MM-DD-YYYY: new date to set + /S: Permanently use host time and date as DOS time + /F: Switch back to DOSBox internal time (opposite of /S) + /T: Only display date + /H: Synchronize with host + +. +:SHELL_CMD_TIME_HELP +Displays the internal time. + +. +:SHELL_CMD_TIME_NOW +Current time: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Display simple time + /H: Synchronize with host + +. +:SHELL_CMD_MKDIR_ERROR +Unable to make: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Unable to remove: %s. + +. +:SHELL_CMD_DEL_ERROR +Unable to delete: %s. + +. +:SHELL_SYNTAXERROR +The syntax of the command is incorrect. + +. +:SHELL_CMD_SET_NOT_SET +Environment variable %s not defined. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Not enough environment space left. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Missing filename. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Missing number. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Invalid number. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +No label supplied to GOTO command. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Label %s not found. + +. +:SHELL_CMD_FILE_NOT_FOUND +File %s not found. + +. +:SHELL_CMD_FILE_EXISTS +File %s already exists. + +. +:SHELL_CMD_DIR_VOLUME + Volume in drive %c is %s + +. +:SHELL_CMD_DIR_INTRO + Directory of %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d file(s) %21s bytes + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d dir(s) %21s bytes free + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Drive %c does not exist! +You must mount it first. Type intro or intro mount for more information. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Illegal command: %s. + +. +:SHELL_CMD_PAUSE +Press any key to continue... +. +:SHELL_CMD_PAUSE_HELP +Waits for 1 keystroke to continue. + +. +:SHELL_CMD_COPY_FAILURE +Copy failure : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d File(s) copied. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Unable to remove, drive not in use. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST failed. You either made an error in your commandline or the target drive is already used. +It's only possible to use SUBST on Local drives +. +:SHELL_STARTUP_BEGIN +╔════════════════════════════════════════════════════════════════════╗ +║ Welcome to DOSBox Staging %-40s ║ +║ ║ +║ For a short introduction for new users type: INTRO ║ +║ For supported shell commands type: HELP ║ +║ ║ +║ To adjust the emulated CPU speed, use " PRIMARY_MOD_NAME "+F11 and " PRIMARY_MOD_NAME "+F12." PRIMARY_MOD_PAD PRIMARY_MOD_PAD " ║ +║ To activate the keymapper " PRIMARY_MOD_NAME "+F1." PRIMARY_MOD_PAD " ║ +║ For more information read the README file in the DOSBox directory. ║ +║ ║ + +. +:SHELL_STARTUP_CGA +║ DOSBox supports Composite CGA mode. ║ +║ Use F12 to set composite output ON, OFF, or AUTO (default). ║ +║ (" MMOD2_NAME "+)F11 changes hue; " MMOD1_NAME "+" MMOD2_NAME "+F11 selects early/late CGA model." PRIMARY_MOD_PAD " ║ +║ ║ + +. +:SHELL_STARTUP_CGA_MONO +║ Use F11 to cycle through green, amber, white and paper-white mode, ║ +║ and " MMOD2_NAME "+F11 to change contrast/brightness settings. ║ + +. +:SHELL_STARTUP_HERC +║ Use F11 to cycle through white, amber, and green monochrome color. ║ +║ ║ + +. +:SHELL_STARTUP_DEBUG +║ Press " MMOD2_NAME "+Pause to enter the debugger or start the exe with DEBUG. ║ +║ ║ + +. +:SHELL_STARTUP_END +║ https://dosbox-staging.github.io ║ +╚════════════════════════════════════════════════════════════════════╝ + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Displays/changes the current directory. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [drive:][path] +CHDIR [..] +CD [drive:][path] +CD [..] + + .. Specifies that you want to change to the parent directory. + +Type CD drive: to display the current directory in the specified drive. +Type CD without parameters to display the current drive and directory. + +. +:SHELL_CMD_CLS_HELP +Clear the screen. + +. +:SHELL_CMD_DIR_HELP +Displays a list of files and subdirectories in a directory. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [drive:][path][filename] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [drive:][path][filename] + Specifies drive, directory, and/or files to list. + /W Uses wide list format. + /B Uses bare format (no heading information or summary). + /P Pauses after each screenful of information. + /AD Displays all directories. + /A-D Displays all files. + /O List by files in sorted order. + - Prefix to reverse order + sortorder N By name (alphabetic) S By size (smallest first) + E By extension (alphabetic) D By date & time (oldest first) + +. +:SHELL_CMD_ECHO_HELP +Display messages and enable/disable command echoing. + +. +:SHELL_CMD_EXIT_HELP +Exit from the shell. + +. +:SHELL_CMD_HELP_HELP +Show help. + +. +:SHELL_CMD_MKDIR_HELP +Make Directory. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [drive:][path] +MD [drive:][path] + +. +:SHELL_CMD_RMDIR_HELP +Remove Directory. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [drive:][path] +RD [drive:][path] + +. +:SHELL_CMD_SET_HELP +Change environment variables. + +. +:SHELL_CMD_IF_HELP +Performs conditional processing in batch programs. + +. +:SHELL_CMD_GOTO_HELP +Jump to a labeled line in a batch script. + +. +:SHELL_CMD_SHIFT_HELP +Leftshift commandline parameters in a batch script. + +. +:SHELL_CMD_TYPE_HELP +Display the contents of a text-file. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [drive:][path][filename] + +. +:SHELL_CMD_REM_HELP +Add comments in a batch file. + +. +:SHELL_CMD_REM_HELP_LONG +REM [comment] + +. +:SHELL_CMD_NO_WILD +This is a simple version of the command, no wildcards allowed! + +. +:SHELL_CMD_RENAME_HELP +Renames one or more files. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [drive:][path]filename1 filename2. +REN [drive:][path]filename1 filename2. + +Note that you can not specify a new drive or path for your destination file. + +. +:SHELL_CMD_DELETE_HELP +Removes one or more files. + +. +:SHELL_CMD_COPY_HELP +Copy files. + +. +:SHELL_CMD_CALL_HELP +Start a batch file from within another batch file. + +. +:SHELL_CMD_SUBST_HELP +Assign an internal directory to a drive. + +. +:SHELL_CMD_LOADHIGH_HELP +Loads a program into upper memory (requires xms=true,umb=true). + +. +:SHELL_CMD_LS_HELP +List directory contents. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [PATTERN] + +. +:SHELL_CMD_LS_PATH_ERR +ls: cannot access '%s': No such file or directory + +. +:SHELL_CMD_CHOICE_HELP +Waits for a keypress and sets ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:choices] [/N] [/S] text + /C[:]choices - Specifies allowable keys. Default is: yn. + /N - Do not display the choices at end of prompt. + /S - Enables case-sensitive choices to be selected. + text - The text to display as a prompt. + +. +:SHELL_CMD_ATTRIB_HELP +Does nothing. Provided for compatibility. + +. +:SHELL_CMD_PATH_HELP +Provided for compatibility. + +. +:SHELL_CMD_VER_HELP +View or set the reported DOS version. + +. +:SHELL_CMD_VER_HELP_LONG +Usage: + ver + ver set VERSION + +Where: + VERSION can be a whole number, such as 5, or include a two-digit decimal + value, such as: 6.22, 7.01, or 7.10. The decimal can alternatively be + space-separated, such as: 6 22, 7 01, or 7 10. + +Notes: + The DOS version can also be set in the configuration file under the [dos] + section using the "ver = VERSION" setting. + +Examples: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging version %s +DOS version %d.%02d + +. +:SHELL_CMD_VER_INVALID +The specified DOS version is not correct. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/utf-8/es/es-0.77.0-alpha.txt dosbox-staging-0.77.0/contrib/translations/utf-8/es/es-0.77.0-alpha.txt --- dosbox-staging-0.76.0/contrib/translations/utf-8/es/es-0.77.0-alpha.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/utf-8/es/es-0.77.0-alpha.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1429 @@ +:CONFIG_FULLSCREEN +Inicia DOSBox directamente en pantalla completa. +Presione " MMOD2_NAME "+Enter para volver a la ventana. +. +:CONFIG_DISPLAY +NĂşmero de pantalla a usar; valores dependen del SO y configuraciĂłn del usuario. +. +:CONFIG_VSYNC +ConfiguraciĂłn de sincronizaciĂłn vertical no implementada (ajuste ignorado) +. +:CONFIG_FULLRESOLUTION +QuĂŠ resoluciĂłn usar para pantalla completa: 'original', 'desktop' +o un tamaĂąo fijo (por ejemplo, 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Establezca tamaĂąo de ventana a utilizar cuando se ejecute en modo ventana: + default: Selecciona la mejor opciĂłn basado en tu + entorno y otras configuraciones. + original: Redimensiona la ventana a la resoluciĂłn elegida por + el programa emulado. + resizable: Hace la ventana del emulador redimensionable. + Esta es una opciĂłn experimental, funciona sĂłlo con + output=opengl y glshader=sharp (o none) + : Escala el contenido de la ventana a las dimensiones + indicadas, en formato LxA. Por ejemplo: 1024x768. + El escalado no se realiza para output=surface. +. +:CONFIG_OUTPUT +QuĂŠ sistema de vĂ­deo utilizar para la salida. +. +:CONFIG_TEXTURE_RENDERER +Elija un controlador de renderizado cuando use un modo de salida de textura. +Use texture_renderer=auto para una elecciĂłn automĂĄtica. +. +:CONFIG_CAPTURE_MOUSE +Elija un mĂŠtodo de control del mouse: + onclick: El mouse se capturarĂĄ despues del primer + clic dentro de la ventana. + onstart: El mouse es capturado inmediatamente al iniciar + (similar al DOS real). + seamless: El mouse puede moverse perfecto dentro y fuera + de la ventana de DOSBox y no puede ser capturado. + nomouse: El mouse esta deshabilitado y oculto sin que se + envĂ­e ninguna entrada al juego. +Elija cĂłmo se manejan los clics centrales (segundo parĂĄmetro): + middlegame: Los clics centrales son enviados al juego + (" PRIMARY_MOD_NAME "+F10 descaptura el mouse). + middlerelease: Los clics centrales son usados para descapturar el mouse + (no se envĂ­a al juego). Sin embargo, los clics centrales + se enviarĂĄn al juego en pantalla completa o cuando + se establece el control seamless. + " PRIMARY_MOD_NAME "+F10 podrĂĄ tambiĂŠn descapturar el mouse. +Defaults (si no estĂĄ presente o errĂłneo): seamless middlerelease +. +:CONFIG_SENSITIVITY +Sensibilidad del mouse. El segundo parĂĄmetro opcional especifica la sensibilidad vertical (por ejemplo, 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Habilite este ajuste para omitir la configuraciĂłn de aceleraciĂłn y sensibilidad +del mouse del sistema operativo. Esto funciona en +pantalla completa o cuando el mouse se captura en modo ventana. +. +:CONFIG_WAITONERROR +Espere antes de cerrar la consola si DOSBox tiene un error. +. +:CONFIG_PRIORITY +Niveles de prioridad para DOSBox. La segunda entrada detrĂĄs de la coma es para cuando DOSBox no estĂĄ enfocado/minimizado. +pausa sĂłlo es vĂĄlida para la segunda entrada. +. +:CONFIG_MAPPERFILE +Archivo usado para cargar/guardar las asignaciones de teclas/eventos. +Resetmapper sĂłlo funciona con el valor por defecto. +. +:CONFIG_SCREENSAVER +Use 'allow' (permitir) o 'block' (bloquear) para anular la variable de entorno +SDL_VIDEO_ALLOW_SCREENSAVER (que normalmente bloquea el protector de pantalla del SO +mientras se ejecuta el emulador). +. +:CONFIG_LANGUAGE +Seleccione otro archivo de idioma. +. +:CONFIG_MACHINE +El tipo de mĂĄquina que DOSBox intenta emular. +. +:CONFIG_CAPTURES +Directorio donde se capturan cosas como sonidos (wav, mid) y capturas de pantalla. +. +:CONFIG_MEMSIZE +Cantidad de memoria que tiene DOSBox en megabytes. +Es mejor dejar este valor por defecto para evitar problemas con algunos juegos, +aunque algunos juegos pueden requerir un valor mĂĄs alto. +Por lo general, no hay ninguna ventaja de velocidad al aumentar este valor. +. +:CONFIG_STARTUP_VERBOSITY +Controla la verbosidad antes de mostrar el programa: +Verbosidad | Inicio | Bienvenida | Salida anticipada +high | SĂ­ | SĂ­ | SĂ­ +medium | No | SĂ­ | SĂ­ +low | No | No | SĂ­ +quiet | No | No | No +splash_only | SĂ­ | No | No +auto | 'low' si exec o dir es pasado, de lo contrario 'high' +. +:CONFIG_FRAMESKIP +CĂşantos fotogramas omite DOSBox antes de dibujar uno. +. +:CONFIG_ASPECT +Escala la resoluciĂłn vertical para producir un aspecto de pantalla 4:3 +que se corresponde con la de los monitores originales de definiciĂłn estĂĄndar +para el que se diseĂąaron la mayorĂ­a de los juegos de DOS. Esta configuraciĂłn +sĂłlo afecta a los modos de vĂ­deo que utilizan pĂ­xeles no cuadrados, como +320x200 or 640x400; mientras que los modos de pĂ­xeles cuadrados, como 640x480 +y 800x600, se mostrarĂĄn tal cual. +. +:CONFIG_MONOCHROME_PALETTE +Seleccione paleta por defecto para pantalla monocromĂĄtica. +Funciona sĂłlo cuando se emula hercules o cga_mono. +TambiĂŠn puedes recorrer los colores disponibles usando F11. +. +:CONFIG_SCALER +Escalador utilizado para ampliar/mejorar modos de baja resoluciĂłn. +Si 'forced' es agregado, el escalador se utilizarĂĄ incluso si +el resultado podrĂ­a no ser el deseado. +Note que algunos escaladores pueden utilizar bordes negros para ajustar la imagen +dentro de la resoluciĂłn de pantalla configurada. Si esto es +indeseable, pruebe con otro escalador o habilite +salida fullresolution. +. +:CONFIG_GLSHADER +Ya sea 'none' o un nombre de shader GLSL. Funciona sĂłlo con +salida OpenGL. Puede ser una ruta absoluta, un archivo +en el subdirectorio 'glshaders' del directorio de configuraciĂłn +de DOSBox, o uno de los shaders incorporados: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (por defecto). +. +:CONFIG_CORE +NĂşcleo de CPU utilizado en emulaciĂłn. auto cambiarĂĄ a dinĂĄmico si esta disponible y +es apropiado. +. +:CONFIG_CPUTYPE +Tipo de CPU utilizado en emulaciĂłn. auto es la opciĂłn mas rĂĄpida. +. +:CONFIG_CYCLES +Cantidad de instrucciones que DOSBox intenta emular cada milisegundo. +Si este valor es muy alto se producen cortes de sonido y retrasos. +Los ciclos se pueden establecer de 3 formas: + 'auto' intenta adivinar lo que un juego necesita. + Suele funcionar, pero puede fallar en algunos juegos. + 'fixed #number' establecerĂĄ una cantidad fija de ciclos. Esto es lo que normalmente + necesita si 'auto' falla (Ejemplo: fixed 4000). + 'max' asignarĂĄ tantos ciclos como su ordenador sea capaz de + manejar. +. +:CONFIG_CYCLEUP +NĂşmero de ciclos para disminuir/incrementar con combinaciones de teclas. (" PRIMARY_MOD_NAME "+F11/" PRIMARY_MOD_NAME "+F12) +. +:CONFIG_CYCLEDOWN +Establecerlo por debajo de 100 serĂĄ un porcentaje. +. +:CONFIG_NOSOUND +Activa modo silencio, aunque el sonido sigue siendo emulado. +. +:CONFIG_RATE +Frecuencia de muestreo del mezclador, ajustar frecuencias superiores a esta en cualquier dispositivo probablemente disminuirĂĄ su calidad de sonido. +. +:CONFIG_BLOCKSIZE +TamaĂąo del bloque mezclador, bloques grandes podrĂ­an ayudar al tartamudeo del sonido pero el sonido tambiĂŠn estarĂĄ mĂĄs retrasado. +. +:CONFIG_PREBUFFER +CuĂĄntos milisegundos de datos para mantener encima del tamaĂąo de bloque. +. +:CONFIG_MIDIDEVICE +Dispositivo que recibirĂĄ los datos MIDI (de la interfaz emulada +MIDI - MPU-401). Elija uno de los siguientes: +'fluidsynth', para utilizar el sintetizador MIDI incorporado. Consulte + la secciĂłn [fluidsynth] para una configuraciĂłn detallada. +'mt32', para utilizar el sintetizador Roland MT-32 incorporado. + Consulte la secciĂłn [mt32] para una configuraciĂłn detallada. +'auto', para utilizar el primer reproductor MIDI externo funcional. Este + puede ser un sintetizador de software o un dispositivo fĂ­sico. +. +:CONFIG_MIDICONFIG +Opciones de configuraciĂłn para la interfaz MIDI seleccionada. +Suele ser el id o nombre del sintetizador MIDI que quieres +utilizar (encuentra el id/nombre con el comando DOS 'mixer /listmidi'). +- Esta opciĂłn no tiene efecto cuando se utilizan los sintetizadores integrados + (mididevice = fluidsynth o mt32). +- Cuando use ALSA, utilice el comando Linux 'aconnect -l' para listar los + puertos MIDI abiertos, y seleccione uno (por ejemplo 'midiconfig=14:0' + para el cliente secuenciador 14, puerto 0). +- Si estĂĄs utilizando un Roland MT-32 fĂ­sico con PCB revisiĂłn 0, + el hardware puede requerir un retraso para evitar que se desborde + su bĂşfer. En ese caso, agregue 'delaysysex', + por ejemplo: 'midiconfig=2 delaysysex'. +Consulte el README/Manual para mas detalles. +. +:CONFIG_MPU401 +Tipo de MPU-401 a emular. +. +:CONFIG_SOUNDFONT +Ruta a un archivo SoundFont en formato .sf2. Puedes utilizar una +ruta absoluta o relativa, o el nombre de un .sf2 dentro de +el directorio 'soundfonts' dentro del directorio de +configuraciĂłn de DOSBox. +Un porcentaje opcional escalarĂĄ el volumen del SoundFont. +Por ejemplo: 'soundfont.sf2 50' lo atenuarĂĄ en un 50%. +El porcentaje de escalado puede ir de 1 a 500. +. +:CONFIG_MODEL +Modelo de sintetizador a utilizar. El valor por defecto (auto) prefiere CM-32L +si ambos conjuntos de ROMs son provistos. Para los primeros juegos de Sierra y Dune 2 +se recomienda utilizar 'mt32', mientras que los juegos mas recientes suelen +usar los efectos de sonido adicionales del CM-32L (use 'auto' o 'cm32l') +. +:CONFIG_ROMDIR +El directorio que contiene uno o ambos pares de ROMs MT-32 y/o CM-32L. +Los archivos deben ser nombrados en mayĂşsculas, de la siguiente manera: + - Par de ROMs MT-32: MT32_CONTROL.ROM y MT32_PCM.ROM + - Par de ROMs CM-32L: CM32L_CONTROL.ROM y CM32L_PCM.ROM +El directorio puede ser absoluto o relativo, o dĂŠjelo en blanco para +utilizar el directorio 'mt32-roms' del directorio de configuraciĂłn de DOSBox, +seguido de la comprobaciĂłn de otras ubicaciones comunes del sistema. +. +:CONFIG_SBTYPE +Tipo de Sound Blaster a emular. 'gb' es Game Blaster. +. +:CONFIG_SBBASE +La direcciĂłn de E/S del Sound Blaster. +. +:CONFIG_IRQ +El nĂşmero de IRQ del Sound Blaster. +. +:CONFIG_DMA +El nĂşmero de canal DMA del Sound Blaster. +. +:CONFIG_HDMA +El nĂşmero de canal DMA mĂĄs alto del Sound Blaster. +. +:CONFIG_SBMIXER +Permite que el mezclador de Sound Blaster modifique el mezclador de DOSBox. +. +:CONFIG_OPLRATE +oplrate estĂĄ obsoleto. La forma de onda OPL es ahora muestreada + a la velocidad de reproducciĂłn del mezclador para evitar el remuestreo. +. +:CONFIG_OPLMODE +Tipo de emulaciĂłn OPL. En 'auto' el modo estĂĄ determinado por 'sbtype'. +Todos los modos OPL son compatibles con AdLib, excepto 'cms'. +. +:CONFIG_OPLEMU +Proveedor para la emulaciĂłn OPL. 'compat' proporciona una mejor calidad, +'nuked' es la opciĂłn por defecto y la mĂĄs precisa (pero la que consume mĂĄs CPU). +. +:CONFIG_GUS +Habilita emulaciĂłn Gravis UltraSound. +. +:CONFIG_GUSBASE +La direcciĂłn base de E/S del Gravis UltraSound. +. +:CONFIG_GUSIRQ +El nĂşmero IRQ del Gravis UltraSound. +. +:CONFIG_GUSDMA +El canal DMA del Gravis UltraSound. +. +:CONFIG_ULTRADIR +Ruta al directorio UltraSound. En este directorio +debe haber un directorio MIDI que contenga los archivos +patch para reproducciĂłn GUS. Conjunto de patchs +usados con Timidity deberĂ­an funcionar bien. +. +:CONFIG_PCSPEAKER +Habilita emulaciĂłn del PC-Speaker. +. +:CONFIG_PCRATE +Frecuencia de muestreo del generador de sonido PC-Speaker. +. +:CONFIG_ZERO_OFFSET +Neutraliza y evita que el DC-offset del PC speaker perjudique a otras fuentes. +'auto' lo habilita en sistemas que no son Windows y lo deshabilita en Windows. +Si tu SO realiza su propia correcciĂłn de DC-offset, entonces establezca esto en 'false'. +. +:CONFIG_TANDY +Habilita emulaciĂłn del sistema de sonido Tandy. Para 'auto', la emulaciĂłn estĂĄ presente sĂłlo si la mĂĄquina estĂĄ establecida en 'tandy'. +. +:CONFIG_TANDYRATE +Frecuencia de muestreo de la generaciĂłn Tandy 3-Voice. +. +:CONFIG_DISNEY +Habilita emulaciĂłn Disney Sound Source. (compatible con Covox Voice Master y Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Tipo de joystick a emular: auto (por defecto), +none (deshabilita emulaciĂłn del joystick), +2axis (soporta dos joysticks), +4axis (soporta un joystick, primer joystick usado), +4axis_2 (soporta un joystick, segundo joystick usado), +fcs (Thrustmaster), ch (CH Flightstick). +auto (elige emulaciĂłn dependiendo de los joysticks reales). +(Recuerda resetear el mapperfile del DOSBox si lo has guardado anteriormente) +. +:CONFIG_TIMED +habilita intervalos cronometrados para ejes. Experimente con esta opciĂłn, si tu joystick se desvĂ­a (se aleja). +. +:CONFIG_AUTOFIRE +dispara continuamente mientras se mantenga el botĂłn presionado. +. +:CONFIG_SWAP34 +intercambia el 3er y el 4to eje. Puede ser Ăştil para ciertos joysticks. +. +:CONFIG_BUTTONWRAP +habilita ajuste de botones al nĂşmero de botones emulados. +. +:CONFIG_CIRCULARINPUT +habilita traducciĂłn de entrada circular a salida cuadrada. +Intenta habilitar esto si tu stick analĂłgico izquierdo sĂłlo puede moverse en cĂ­rculo. +. +:CONFIG_DEADZONE +el porcentaje de movimiento a ignorar. 100 convierte el stick analĂłgico en uno digital. +. +:CONFIG_SERIAL1 +establece tipo de dispositivo conectado al puerto com. +Puede ser: disabled, dummy, modem, nullmodem, directserial. +ParĂĄmetros adicionales deben estar en la misma lĂ­nea en la forma de +parĂĄmetro:valor. ParĂĄmetro para todos los tipos es irq (opcional). +para directserial: realport (requerido), rxdelay (opcional). + (realport:COM1 realport:ttyS0). +para modem: listenport (opcional). +para nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (todos opcional). +Ejemplo: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +consulte serial1 +. +:CONFIG_SERIAL3 +consulte serial1 +. +:CONFIG_SERIAL4 +consulte serial1 +. +:CONFIG_PHONEBOOKFILE +Archivo utilizado para asignar nĂşmeros de telĂŠfono falsos a direcciones. +. +:CONFIG_XMS +Habilita soporte XMS. +. +:CONFIG_EMS +Habilita soporte EMS. El valor por defecto (=true) proporciona la mejor +compatibilidad pero ciertas aplicaciones pueden funcionar mejor con +otras opciones, o requerir que el soporte EMS sea deshabilitado (=false) +para funcionar. +. +:CONFIG_UMB +Habilita soporte UMB. +. +:CONFIG_VER +Establezca versiĂłn DOS (5.0 por defecto). Especificar formato como principal.menor. +Un solo nĂşmero es tratado como la versiĂłn principal. +Los ajustes mĂĄs comunes son 3.3, 5.0, 6.22, y 7.1. +. +:CONFIG_KEYBOARDLAYOUT +CĂłdigo de idioma de la distribuciĂłn del teclado (o "none"). +. +:CONFIG_IPX +Habilita emulaciĂłn ipx sobre UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +LĂ­neas en esta secciĂłn se ejecutarĂĄn al inicio. +Puedes colocar tus lĂ­neas MOUNT aquĂ­. + +. +:CONFIGFILE_INTRO +# Este es el archivo de configuraciĂłn para DOSBox Staging (%s). +# Las lĂ­neas que comienzan con el caracter '#' son comentarios. + +. +:CONFIG_SUGGESTED_VALUES +Valores posibles +. +:PROGRAM_CONFIG_NOCONFIGFILE +No se ha cargado ningĂşn archivo de configuraciĂłn! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Archivo de configuraciĂłn principal: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Archivos de configuraciĂłn adicional: + +. +:PROGRAM_CONFIG_CONFDIR +Directorio de configuraciĂłn de DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +No se puede abrir el archivo %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Escribiendo archivo de configuraciĂłn %s + +. +:PROGRAM_CONFIG_USAGE +Herramienta de configuraciĂłn: +-writeconf o -wc escribe al archivo de configuraciĂłn primario cargado. +-writeconf o -wc [nombre de archivo] escribe archivo al directorio de configuraciĂłn. +Use -writelang o -wl [nombre de archivo] para escribir las cadenas de idioma actuales. +-r [parĂĄmetros] + Reinicie DOSBox, ya sea utilizando los parĂĄmetros anteriores o cualquiera que se agregue. +-wcp [nombre de archivo] + Escribe archivo de configuraciĂłn al directorio de programa, dosbox.conf o al nombre de archivo + especificado. +-wcd + Escribe al archivo de configuraciĂłn por defecto en el directorio de configuraciĂłn. +-l lista los parĂĄmetros de configuraciĂłn. +-h, -help, -? sections / nombre de secciĂłn / nombre de propiedad + Sin parĂĄmetros, muestra esta pantalla de ayuda. Agrega "sections" para una lista de secciones. + Para obtener informaciĂłn sobre una secciĂłn o propiedad especĂ­fica agregue su nombre detrĂĄs. +-axclear limpia la secciĂłn autoexec. +-axadd [lĂ­nea] agrega una lĂ­nea a la secciĂłn autoexec. +-axtype imprime el contenido de la secciĂłn autoexec. +-securemode cambia a modo seguro. +-avistart inicia grabaciĂłn AVI. +-avistop detiene grabaciĂłn AVI. +-startmapper inicia el mapeador de teclas. +-get "propiedad de la secciĂłn" devuelve el valor de la propiedad. +-set "propiedad de la secciĂłn=valor" establece el valor. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +PropĂłsito de la propiedad "%s" (contenido en la secciĂłn "%s"): +%s + +Valores posibles: %s +Valor por defecto: %s +Valor actual: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +PropĂłsito de la secciĂłn "%s": +%s +Valor actual: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +Esta propiedad no se puede cambiar en tiempo de ejecuciĂłn. + +. +:PROGRAM_CONFIG_HLP_POSINT +entero positivo +. +:PROGRAM_CONFIG_HLP_SECTHLP +La secciĂłn %s contiene las siguientes propiedades: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +La configuraciĂłn de DOSBox contiene las siguientes secciones: + + +. +:PROGRAM_CONFIG_SECURE_ON +Cambiado a modo seguro. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Esta operaciĂłn no estĂĄ permitida en modo seguro. + +. +:PROGRAM_CONFIG_SECTION_ERROR +La secciĂłn "%s" no existe. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" no es un valor vĂĄlido para la propiedad %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +No hay tal secciĂłn o propiedad. + +. +:PROGRAM_CONFIG_NO_PROPERTY +No existe la propiedad "%s" en la secciĂłn "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Sintaxis correcta: config -set "propiedad de la secciĂłn". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Sintaxis correcta: config -get "propiedad de la secciĂłn". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox se iniciĂł con los siguientes parĂĄmetros de lĂ­nea de comandos: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Falta un parĂĄmetro. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMs encontrados: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Unidad +. +:PROGRAM_MOUNT_STATUS_TYPE +Tipo +. +:PROGRAM_MOUNT_STATUS_LABEL +Etiqueta +. +:PROGRAM_MOUNT_STATUS_2 +La unidad %c estĂĄ montada como %s + +. +:PROGRAM_MOUNT_STATUS_1 +Las unidades montadas actualmente son: + +. +:PROGRAM_MOUNT_ERROR_1 +El directorio %s no existe. + +. +:PROGRAM_MOUNT_ERROR_2 +%s no es un directorio + +. +:PROGRAM_MOUNT_ILL_TYPE +Tipo ilegal %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +La unidad %c ya estĂĄ montada con %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +La unidad %c no estĂĄ montada. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +La unidad %c se ha removido correctamente. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Las unidades virtuales no pueden ser desmontadas. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' no es un identificador de unidad vĂĄlido. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montar c:\ NO es recomendado. Por favor monte un (sub)directorio la prĂłxima vez. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Montar / NO es recomendado. Por favor monte un (sub)directorio la prĂłxima vez. + +. +:PROGRAM_MOUNT_NO_OPTION +Advertencia: Ignorando opciĂłn no soportada '%s'. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +Un directorio normal necesita ser montado primero antes de que se pueda agregar una superposiciĂłn encima. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +La superposiciĂłn NO es compatible con la unidad especificada. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +La superposiciĂłn necesita ser especificada usando el mismo direccionamiento que la unidad subyacente. No se mezclan rutas relativas y absolutas. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +El directorio de superposiciĂłn no puede ser el mismo que la unidad subyacente. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Algo saliĂł mal. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +SuperposiciĂłn %s en la unidad %c montada. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +No se puede mover la unidad Z. La unidad %c ya estĂĄ montada. + +. +:PROGRAM_MEM_CONVEN +%10d kB de memoria convencional libre + +. +:PROGRAM_MEM_EXTEND +%10d kB de memoria extendida libre + +. +:PROGRAM_MEM_EXPAND +%10d kB de memoria expandida libre + +. +:PROGRAM_MEM_UPPER +%10d kB de memoria superior libre en %d bloques (UMB mĂĄs grande %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB asignados. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB liberados. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Memoria usada liberada. + +. +:PROGRAM_LOADFIX_ERROR +Error de asignaciĂłn de memoria. + +. +:MSCDEX_SUCCESS +MSCDEX instalado. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Error: Las letras de unidad de mĂşltiples unidades de CD-ROM tienen que ser continuas. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Error: AĂşn no es soportado. + +. +:MSCDEX_ERROR_PATH +MSCDEX: La ubicaciĂłn especificada no es una unidad de CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Error: Archivo no vĂĄlido o no se puede abrir. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Error: Demasiadas unidades de CD-ROM (mĂĄx: 5). La instalaciĂłn de MSCDEX ha fallado. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Subdirectorio montado: soporte limitado. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Error: El archivo no es una imagen ISO/CUE o contiene errores. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Error: Error desconocido. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Advertencia: Ignorando opciĂłn no soportada '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +CachĂŠ de la unidad limpiada. + +. +:PROGRAM_INTRO +Bienvenido a DOSBox Staging, un emulador x86 con sonido y grĂĄficos. +DOSBox crea una interfaz para usted que se parece al viejo DOS. + +Para informaciĂłn sobre el tipo de montaje bĂĄsico escriba intro mount +Para informaciĂłn sobre el tipo de soporte de CD-ROM escriba intro cdrom +Para informaciĂłn sobre el tipo de teclas especiales escriba intro special +Para mas informaciĂłn, visite DOSBox Staging wiki: +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox se detendrĂĄ/saldrĂĄ sin previo aviso si se produce un error! + +. +:PROGRAM_INTRO_MOUNT_START +AquĂ­ tienes algunos comandos para empezar: +Antes de poder utilizar los archivos ubicados en tu propio sistema de archivos, +tienes que montar el directorio que contiene los archivos. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +╔═════════════════════════════════════════════════════════════════════════╗ +║ mount c c:\dosgames\ crearĂĄ una unidad C con c:\dosgames como contenido.║ +║ ║ +║ c:\dosgames\ es un ejemplo. ReemplĂĄzalo con tu propio directorio de juegos.  ║ +╚═════════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_OTHER +╔══════════════════════════════════════════════════════════════════════╗ +║ mount c ~/dosgames crearĂĄ una unidad C con ~/dosgames como contenido.║ +║ ║ +║ ~/dosgames es un ejemplo. ReemplĂĄzalo con tu propio directorio de juegos.  ║ +╚══════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_END +DespuĂŠs de montar el disco con ĂŠxito puedes escribir c: para ir a tu unidad C +reciĂŠn montada. Escribiendo dir allĂ­ mostrarĂĄ su contenido. cd le permitirĂĄ +ingresar un directorio (reconocido por el [] en un listado de directorios). +Puedes ejecutar programas/archivos con extensiones .exe .bat y .com. + +. +:PROGRAM_INTRO_CDROM +CĂłmo montar una unidad virtual de CD-ROM en DOSBox: +DOSBox proporciona emulaciĂłn de CD-ROM en varios niveles. + +Esto funciona en todos los directorios normales, instala MSCDEX y marca los archivos +de solo lectura. Normalmente esto es suficiente para la mayorĂ­a de juegos: + +mount D C:\ejemplo -t cdrom + +Si no funciona es posible que tengas que decirle a DOSBox la etiqueta del CD-ROM: + +mount D C:\ejemplo -t cdrom -label ETIQUETACD + +AdemĂĄs, puedes usar imgmount para montar imĂĄgenes iso o cue/bin: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Teclas especiales: +Estas son las combinaciones de teclas por defecto. +Se pueden cambiar en el mapeador de teclas. + +" MMOD2_NAME "+Enter Cambia entre pantalla completa y modo ventana. +" MMOD2_NAME "+Pausa Pausa/Despausa el emulador. +" PRIMARY_MOD_NAME "+F1 " PRIMARY_MOD_PAD " Inicia el mapeador de teclas. +" PRIMARY_MOD_NAME "+F4 " PRIMARY_MOD_PAD " Cambia imagen de disco montada, actualiza la cachĂŠ de directorio para todas las unidades. +" PRIMARY_MOD_NAME "+F5 " PRIMARY_MOD_PAD " Guarda una captura de pantalla. +" PRIMARY_MOD_NAME "+F6 " PRIMARY_MOD_PAD " Inicia/Detiene grabaciĂłn de salida de sonido a un archivo wav. +" PRIMARY_MOD_NAME "+F7 " PRIMARY_MOD_PAD " Inicia/Detiene grabaciĂłn de salida de video a un archivo zmbv. +" PRIMARY_MOD_NAME "+F9 " PRIMARY_MOD_PAD " Apaga el emulador. +" PRIMARY_MOD_NAME "+F10 " PRIMARY_MOD_PAD " Captura/Suelta el mouse. +" PRIMARY_MOD_NAME "+F11 " PRIMARY_MOD_PAD " Ralentiza emulaciĂłn. +" PRIMARY_MOD_NAME "+F12 " PRIMARY_MOD_PAD " Acelera emulaciĂłn. +" MMOD2_NAME "+F12 Desbloquea velocidad (botĂłn turbo/avance rĂĄpido). + +. +:PROGRAM_BOOT_NOT_EXIST +El archivo bootdisk no existe. Error. + +. +:PROGRAM_BOOT_NOT_OPEN +No se puede abrir el archivo bootdisk. Error. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +El archivo de imagen es de sĂłlo lectura! PodrĂ­a crear problemas. + +. +:PROGRAM_BOOT_PRINT_ERROR +Este comando arranca DOSBox desde una imagen de disquete o de disco duro. + +Para este comando, se puede especificar una sucesiĂłn de disquetes intercambiables +presionando " PRIMARY_MOD_NAME "+F4, y -l especifica la unidad montada desde la que arrancar. Si +ninguna letra de unidad es especificada, se arranca por defecto desde la unidad A. +Las Ăşnicas letras de unidad arrancables son A, C, y D. Para arrancar desde un +disco duro (C o D), la imagen ya deberĂ­a haber sido montada utilizando el comando +IMGMOUNT . + +La sintaxis de este comando es: + +BOOT [imagendedisco1.img imagendedisco2.img] [-l letradeunidad] + +. +:PROGRAM_BOOT_UNABLE +No se puede arrancar desde la unidad %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Abriendo archivo de imagen: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +No se puede abrir %s +. +:PROGRAM_BOOT_BOOT +Arrancando desde la unidad %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Cartucho PCjr encontrado, pero la mĂĄquina no es PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Comandos disponibles del cartucho PCjr: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +No se han encontrado comandos del cartucho PCjr +. +:PROGRAM_LOADROM_SPECIFY_FILE +Debes especificar el archivo ROM a cargar. + +. +:PROGRAM_LOADROM_CANT_OPEN +Archivo ROM no accesible. + +. +:PROGRAM_LOADROM_TOO_LARGE +Archivo ROM demasiado grande. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +La BIOS de vĂ­deo no es compatible con el tipo de mĂĄquina. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +Archivo ROM no reconocido. + +. +:PROGRAM_LOADROM_BASIC_LOADED +ROM BASIC cargada. + +. +:SHELL_CMD_IMGMOUNT_HELP +monta imagen(es) de disco compacto o de disquete a una letra de unidad determinada. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Monta un CD-ROM, disquete, o imagen de disco a una letra de unidad. + +Uso: + imgmount UNIDAD CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount UNIDAD ARCHIVOIMAGEN [ARCHIVOIMAGEN2 [..]] [-fs fat] -t hdd|floppy + imgmount UNIDAD IMAGENBOOT [-fs fat|none] -t hdd -size GEOM + imgmount -u UNIDAD (desmonta la imagen de la unidad) + +DĂłnde: + UNIDAD es la letra de la unidad donde la imagen serĂĄ montada: a, c, d, ... + CDROM-SET es un ISO, CUE+BIN, CUE+ISO, o CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + ARCHIVOIMAGEN un disco duro o una imagen de disquete en formato FAT16/FAT12 + IMAGENBOOT es una imagen de disco de arranque con especificado -size GEOM: + bytes-por-sector,sectores-por-cabeza,cabezas,cilindros +Notas: + - " PRIMARY_MOD_NAME "+F4 intercambia & monta el siguiente CDROM-SET o ARCHIVOIMAGEN, si se + proporciona. + +Ejemplos: + imgmount D /Usuarios/NombredeUsuario/juegos/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A disquete1.img disquete2.img disquete3.img -t floppy + imgmount C ~/dos/unidad_c.img -t hdd + imgmount C arranque.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +asigna carpetas fĂ­sicas o unidades a una letra de unidad virtual. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Monta un directorio del SO anfitriĂłn a una letra de unidad. + +Uso: + mount UNIDAD DIRECTORIO [-t TIPO] [-freesize TAMAÑO] [-label ETIQUETA] + mount -u UNIDAD (desmonta el directorio de la unidad) + +DĂłnde: + UNIDAD es la letra de la unidad donde el directorio serĂĄ montado: A, C, D, ... + DIRECTORIO es el directorio sobre el SO anfitriĂłn a ser montado + TIPO es el tipo del directorio a montar: dir, floppy, cdrom, o overlay + TAMAÑO es el espacio libre para la unidad virtual (KiB para disquetes, MiB en caso contrario) + ETIQUETA es el nombre de la etiqueta de la unidad a ser usada + +Notas: + - '-t overlay' redirige las escrituras para la unidad montada a otro directorio. + - Opciones adicionales son descritas en el manual (archivo README, capĂ­tulo 4). + +Ejemplos: + mount C ~/juegosdos + mount D "/medio/NombredeUsuario/CD Juego" -t cdrom + mount C mis_archivos_savegame -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Debes especificar la letra de unidad en la que montar la imagen. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Debes especificar el nĂşmero de unidad (0 o 3) para montar la imagen a (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Para imĂĄgenes CD-ROM : IMGMOUNT letra-de-unidad ubicaciĂłn-de-imagen -t iso + +Para imĂĄgenes Disco Duro : Debes especificar la geometrĂ­a de la unidad para discos duros: +bytes_por_sector, sectores_por_cilindro, cabezas_por_cilindro, recuento_de_cilindros. +IMGMOUNT letra-de-unidad ubicaciĂłn-de-imagen -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +No se ha podido cargar el archivo de imagen. +Compruebe que la ruta sea correcta y que la imagen sea accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +No se ha podido extraer la geometrĂ­a de la unidad desde la imagen. +Use parĂĄmetro -size bps,spc,hpc,cyl para especificar la geometrĂ­a. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +El tipo '%s' no es soportado. Especifique 'floppy', 'hdd', 'cdrom', o 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +El formato "%s" no es soportado. Especifique "fat" o "iso" o "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Debes especificar el archivo imagen a montar. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Archivo imagen no encontrado. + +. +:PROGRAM_IMGMOUNT_MOUNT +Para montar directorios, use el comando MOUNT , no el comando IMGMOUNT . + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Unidad ya montada en esa letra. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +No se puede crear la unidad desde el archivo. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Unidad nĂşmero %d montada como %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +La imagen debe estar en una unidad anfitriona o local. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Usar mĂşltiples archivos sĂłlo es soportado para imĂĄgenes cue/iso. + +. +:PROGRAM_KEYB_INFO +PĂĄgina de cĂłdigo %i ha sido cargada + +. +:PROGRAM_KEYB_INFO_LAYOUT +PĂĄgina de cĂłdigo %i ha sido cargada para distribuciĂłn %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID de distribuciĂłn de teclado[ numero de pĂĄgina de cĂłdigo[ archivo de pĂĄgina de cĂłdigo]]] + +Algunos ejemplos: + KEYB: Muestra la pĂĄgina de cĂłdigo cargada actualmente. + KEYB sp: Carga la distribuciĂłn espaĂąol (ES), usa una pĂĄgina de cĂłdigo apropiada. + KEYB sp 850: Carga la distribuciĂłn espaĂąol (ES), usa pĂĄgina de cĂłdigo 850. + KEYB sp 850 mycp.cpi: Igual que el anterior, pero utilizando el archivo mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +DistribuciĂłn de teclado %s cargado para la pĂĄgina de cĂłdigo %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Archivo de teclado %s no encontrado + + +. +:PROGRAM_KEYB_INVALIDFILE +Archivo de teclado %s no vĂĄlido + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +No hay distribuciĂłn en %s para la pĂĄgina de cĂłdigo %i + +. +:PROGRAM_KEYB_INVCPFILE +Archivo de pĂĄgina de cĂłdigo no vĂĄlido o no existe para la distribuciĂłn %s + + +. +:SHELL_ILLEGAL_PATH +Ruta no vĂĄlida. + +. +:SHELL_CMD_HELP +Si buscas una lista de todos los comandos soportados escribe help /all . +Una breve lista de los comandos mas utilizados: + +. +:SHELL_CMD_ECHO_ON +ECHO estĂĄ encendido. + +. +:SHELL_CMD_ECHO_OFF +ECHO estĂĄ apagado. + +. +:SHELL_ILLEGAL_SWITCH +Interruptor no vĂĄlido: %s. + +. +:SHELL_MISSING_PARAMETER +Requerido parĂĄmetro faltante. + +. +:SHELL_CMD_CHDIR_ERROR +No se puede cambiar a: %s. + +. +:SHELL_CMD_CHDIR_HINT +Sugerencia: Para cambiar a una unidad diferente escriba %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +El nombre de directorio es superior a 8 caracteres y/o contiene espacios. +Intente cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +TodavĂ­a estĂĄs en la unidad Z:, cambia a una unidad montada con C:. + +. +:SHELL_CMD_DATE_HELP +Muestra o cambia la fecha interna. + +. +:SHELL_CMD_DATE_ERROR +La fecha especificada no es correcta. + +. +:SHELL_CMD_DATE_DAYS +3DomLunMarMieJueVieSab +. +:SHELL_CMD_DATE_NOW +Fecha actual: +. +:SHELL_CMD_DATE_SETHLP +Escriba 'date MM-DD-AAAA' para cambiar la fecha. + +. +:SHELL_CMD_DATE_FORMAT +M/D/A +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-DD-AAAA] + MM-DD-AAAA: nueva fecha a establecer + /S: Usa permanentemente la hora y fecha del anfitriĂłn como tiempo del DOS + /F: Vuelve a la hora interna de DOSBox (lo opuesto de /S) + /T: Muestra sĂłlo la fecha + /H: Sincroniza con el anfitriĂłn + +. +:SHELL_CMD_TIME_HELP +Muestra la hora interna. + +. +:SHELL_CMD_TIME_NOW +Hora actual: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Muestra sĂłlo la hora + /H: Sincroniza con el anfitriĂłn + +. +:SHELL_CMD_MKDIR_ERROR +No se puede crear: %s. + +. +:SHELL_CMD_RMDIR_ERROR +No se puede eliminar: %s. + +. +:SHELL_CMD_DEL_ERROR +No se puede borrar: %s. + +. +:SHELL_SYNTAXERROR +La sintaxis del comando es incorrecta. + +. +:SHELL_CMD_SET_NOT_SET +La variable de entorno %s no estĂĄ definida. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +No queda suficiente espacio en el entorno. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Falta el nombre del archivo. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Falta el nĂşmero. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: NĂşmero no vĂĄlido. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +No hay etiqueta suministrada al comando GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Etiqueta %s no encontrada. + +. +:SHELL_CMD_FILE_NOT_FOUND +Archivo %s no encontrado. + +. +:SHELL_CMD_FILE_EXISTS +Archivo %s ya existe. + +. +:SHELL_CMD_DIR_VOLUME + Volumen en unidad %c es %s + +. +:SHELL_CMD_DIR_INTRO + Directorio de %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d archivo(s) %21s bytes + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d directorio(s) %21s bytes libres + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +La unidad %c no existe! +Debes montar esto primero. Escribe intro o intro mount para mĂĄs informaciĂłn. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Comando no vĂĄlido: %s. + +. +:SHELL_CMD_PAUSE +Presiona cualquier tecla para continuar... +. +:SHELL_CMD_PAUSE_HELP +Esperando 1 pulsaciĂłn de tecla para continuar. + +. +:SHELL_CMD_COPY_FAILURE +Error de copia : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d Archivo(s) copiado(s). + +. +:SHELL_CMD_SUBST_NO_REMOVE +No se puede remover, la unidad no estĂĄ en uso. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST fallĂł. Has cometido un error en la lĂ­nea de comandos o la unidad de destino ya estĂĄ siendo utilizada. +SĂłlo es posible utilizar SUBST en unidades locales +. +:SHELL_STARTUP_BEGIN +╔═══════════════════════════════════════════════════════════════════════════╗ +║ Bienvenido a DOSBox Staging %-40s ║ +║ ║ +║ Para una breve introducciĂłn para nuevos usuarios escriba: INTRO ║ +║ Para comandos de interfaz soportados escriba: HELP ║ +║ ║ +║ Para ajustar la velocidad de la CPU emulada, use " PRIMARY_MOD_NAME "+F11 y " PRIMARY_MOD_NAME "+F12." PRIMARY_MOD_PAD PRIMARY_MOD_PAD " ║ +║ Para activar el mapeador de teclas use " PRIMARY_MOD_NAME "+F1." PRIMARY_MOD_PAD " ║ +║ Para mĂĄs informaciĂłn lea el archivo README en el directorio de DOSBox. ║ +║ ║ + +. +:SHELL_STARTUP_CGA +║ DOSBox soporta el modo CGA compuesto. ║ +║ Use F12 para establecer salida compuesta ON, OFF, o AUTO (por defecto). ║ +║ (" MMOD2_NAME "+)F11 cambia tono; " MMOD1_NAME "+" MMOD2_NAME "+F11 selecciona modelo CGA inicial/final." PRIMARY_MOD_PAD " ║ +║ ║ + +. +:SHELL_STARTUP_CGA_MONO +║ Use F11 para rotar entre los modos verde, ĂĄmbar, blanco y blanco papel, ║ +║ y " MMOD2_NAME "+F11 para cambiar los ajustes de contraste/brillo. ║ + +. +:SHELL_STARTUP_HERC +║ Use F11 para rotar entre los colores blanco, ĂĄmbar, y verde monocromĂĄtico.║ +║ ║ + +. +:SHELL_STARTUP_DEBUG +║ Pulsa " MMOD2_NAME "+Pausa para entrar en el depurador o iniciar el exe con DEPURADO.║ +║ ║ + +. +:SHELL_STARTUP_END +║ https://dosbox-staging.github.io ║ +╚═══════════════════════════════════════════════════════════════════════════╝ + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Muestra/cambia el directorio actual. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [unidad:][ruta] +CHDIR [..] +CD [unidad:][ruta] +CD [..] + + .. Especifica que quieres cambiar al directorio principal. + +Escribe CD [unidad:] para mostrar el directorio actual en la unidad especificada. +Escribe CD sin parĂĄmetros para mostrar la unidad y directorio actuales. + +. +:SHELL_CMD_CLS_HELP +Limpia la pantalla. + +. +:SHELL_CMD_DIR_HELP +Muestra una lista de archivos y subdirectorios de un directorio. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [unidad:][ruta][nombre de archivo] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [unidad:][ruta][nombre de archivo] + Especifica unidad, directorio, y/o archivos a listar. + /W Usa formato de lista ancha. + /B Usa formato simple (sin informaciĂłn de encabezado o resumen). + /P Pausa despuĂŠs de cada pantalla llena de informaciĂłn. + /AD Muestra todos los directorios. + /A-D Muestra todos los archivos. + /O Lista archivos en orden segĂşn clasificaciĂłn. + - Prefijo para invertir el orden + clasificaciĂłn N Por nombre (alfabĂŠtico) S Por tamaĂąo (el mĂĄs pequeĂąo primero) + E Por extensiĂłn (alfabĂŠtica) D Por fecha & hora (la mĂĄs antigua primero) + +. +:SHELL_CMD_ECHO_HELP +Muestra mensajes y habilita/deshabilita comando echo. + +. +:SHELL_CMD_EXIT_HELP +Sale de la interfaz. + +. +:SHELL_CMD_HELP_HELP +Muestra ayuda. + +. +:SHELL_CMD_MKDIR_HELP +Crea un directorio. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [unidad:][ruta] +MD [unidad:][ruta] + +. +:SHELL_CMD_RMDIR_HELP +Elimina un directorio. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [unidad:][ruta] +RD [unidad:][ruta] + +. +:SHELL_CMD_SET_HELP +Cambia variables de entorno. + +. +:SHELL_CMD_IF_HELP +Realiza procesamiento condicional en programas por lotes. + +. +:SHELL_CMD_GOTO_HELP +Salta a una lĂ­nea etiquetada en un script por lotes. + +. +:SHELL_CMD_SHIFT_HELP +ParĂĄmetros de lĂ­nea de comandos Left Shift en un script por lotes. + +. +:SHELL_CMD_TYPE_HELP +Muestra el contenido de un archivo de texto. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [unidad:][ruta][nombre de archivo] + +. +:SHELL_CMD_REM_HELP +Agrega comentarios en un archivo por lotes. + +. +:SHELL_CMD_REM_HELP_LONG +REM [comentario] + +. +:SHELL_CMD_NO_WILD +Esta es una versiĂłn simple del comando, no se permiten comodines! + +. +:SHELL_CMD_RENAME_HELP +Renombra uno o mĂĄs archivos. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [unidad:][ruta]nombredearchivo1 nombredearchivo2. +REN [unidad:][ruta]nombredearchivo1 nombredearchivo2. + +Note que no se puede especificar una nueva unidad o ruta para el archivo destino. + +. +:SHELL_CMD_DELETE_HELP +Elimina uno o mĂĄs archivos. + +. +:SHELL_CMD_COPY_HELP +Copia archivos. + +. +:SHELL_CMD_CALL_HELP +Inicia un archivo por lotes desde otro archivo por lotes. + +. +:SHELL_CMD_SUBST_HELP +Asigna un directorio interno a una unidad. + +. +:SHELL_CMD_LOADHIGH_HELP +Carga un programa en la memoria superior (requiere xms=true,umb=true). + +. +:SHELL_CMD_LS_HELP +Lista el contenido del directorio. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [PATRÓN] + +. +:SHELL_CMD_LS_PATH_ERR +ls: no se puede acceder a '%s': No hay tal archivo o directorio + +. +:SHELL_CMD_CHOICE_HELP +Espera a que se presione una tecla y establece un ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:opciones] [/N] [/S] texto + /C[:]opciones - Especifica teclas permitidas. Por defecto es: yn. + /N - No muestra las opciones al final del prompt. + /S - Habilita selecciĂłn de opciones sensibles a mayĂşsculas y minĂşsculas. + text - El texto a mostrar como un prompt. + +. +:SHELL_CMD_ATTRIB_HELP +No hace nada. Provisto para compatibilidad. + +. +:SHELL_CMD_PATH_HELP +Provisto para compatibilidad. + +. +:SHELL_CMD_VER_HELP +Ve o establece la versiĂłn DOS reportada. + +. +:SHELL_CMD_VER_HELP_LONG +Uso: + ver + ver set VERSIÓN + +DĂłnde: + VERSIÓN puede ser un nĂşmero entero como 5, o incluir un valor decimal de dos + dĂ­gitos como: 6.22, 7.01, o 7.10. El decimal puede alternativamente + ser separado por espacio como: 6 22, 7 01, o 7 10. + +Notas: + La versiĂłn DOS tambiĂŠn puede ser establecida en el archivo de configuraciĂłn + bajo la secciĂłn [dos] usando el ajuste "ver = VERSIÓN" . + +Ejemplos: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging versiĂłn %s +DOS versiĂłn %d.%02d + +. +:SHELL_CMD_VER_INVALID +La versiĂłn DOS especificada no es correcta. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/utf-8/fr/fr-0.77.0-alpha.txt dosbox-staging-0.77.0/contrib/translations/utf-8/fr/fr-0.77.0-alpha.txt --- dosbox-staging-0.76.0/contrib/translations/utf-8/fr/fr-0.77.0-alpha.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/utf-8/fr/fr-0.77.0-alpha.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1432 @@ +:CONFIG_FULLSCREEN +DĂŠmarrer DOSBox directement en mode plein ĂŠcran. +Pressez " MMOD2_NAME "EntrĂŠe pour revenir en mode fenĂŞtre. +. +:CONFIG_DISPLAY +Nombre d'ĂŠcrans Ă  utiliser ; les valeurs dĂŠpendent de l'OS et des paramètres utilisateur. +. +:CONFIG_VSYNC +Paramètre de synchro verticale non implĂŠmentĂŠ (paramètre ignorĂŠ) +. +:CONFIG_FULLRESOLUTION +RĂŠsolution utiliser pour le mode plein ĂŠcran : 'original', 'desktop' (bureau) +ou une taille fixe (ex. : 1024x768). +. +:CONFIG_WINDOWRESOLUTION +DĂŠfini la taille de la fenĂŞtre pendant l'utilisation en mode fenĂŞtrĂŠ : + default: SĂŠlectionne la meilleure option basĂŠe sur + votre environnement et d'autres paramètres. + original: Redimensionne la fenĂŞtre suivant la rĂŠsolution + choisie par le programme ĂŠmulĂŠ. + resizable: Permet le redimensionnement de la fenĂŞtre de l'ĂŠmulateur. + Ceci est une option expĂŠrimentale, marche seulement avec + output=opengl et glshader=sharp (ou none) + : Redimensionne le contenu de la fenĂŞtre + aux dimensions indiquĂŠes, au format lxh (largeur x hauteur). Par ex. : 1024x768. + Le redimensionnement n'est pas disponible pour output=surface. +. +:CONFIG_OUTPUT +Système vidĂŠo Ă  utiliser pour la sortie. +. +:CONFIG_TEXTURE_RENDERER +Choisissez un pilote de rendu Ă  utiliser en mode de rendu texturĂŠ. +Utilisez texture_renderer=auto pour un choix automatique. +. +:CONFIG_CAPTURE_MOUSE +MĂŠthode de contrĂ´le de la souris : + onclick : La souris sera capturĂŠe après + le premier clic dans la fenĂŞtre + onstart : La souris est capturĂŠe immĂŠdiatement au dĂŠmarrage + (similaire au vrai DOS). + seamless : La souris peut bouger sans contrainte dans et en-dehors + de la fenĂŞtre DOSBox et ne peut pas ĂŞtre capturĂŠe. + nomouse : La souris est dĂŠsactivĂŠe et cachĂŠe sans aucun + signal envoyĂŠ au jeu. +Gestion du clic-milieu (second paramètre) : + middlegame : Les clics-milieu sont envoyĂŠs au jeu + (" PRIMARY_MOD_NAME "+F10 libère la souris). + middlerelease : Les clics-milieu libèrent la souris + (non envoyĂŠs au jeu). De plus, les clics-milieu + seront envoyĂŠs au jeu en mode plein ĂŠcran ou en mode + seamless. + " PRIMARY_MOD_NAME "+F10 libèrera aussi la souris. +Defaults (si non prĂŠsent ou incorrect) : seamless middlerelease +. +:CONFIG_SENSITIVITY +SensibilitĂŠ de la souris. Le second paramètre optionnel spĂŠcifie la sensibilitĂŠ verticale (ex. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Outrepasse les paramètres de votre système pour l'accĂŠlĂŠration et la sensibilitĂŠ +de la souris. CelA marche en mode plein ĂŠcran +ou quand la souris est capturĂŠ en mode fenĂŞtrĂŠ. +. +:CONFIG_WAITONERROR +Attend avant de fermer la console si DOSBox a une erreur. +. +:CONFIG_PRIORITY +Niveaux de prioritĂŠ pour DOSBox. La deuxième valeur après la virgule est lorsque DOSBox n'est pas actif/rĂŠduit. +pause n'est valable que pour la seconde entrĂŠe. +. +:CONFIG_MAPPERFILE +Fichier utilisĂŠ pour charger/sauver les correspondances touche/ĂŠvĂŠnement. +Resetmapper ne fonctionne qu'avec la valeur par dĂŠfaut. +. +:CONFIG_SCREENSAVER +Utilisez 'allow' (autorise) ou 'block' (bloque) pour outrepasser la variable d'environnement +SDL_VIDEO_ALLOW_SCREENSAVER (qui bloque gĂŠnĂŠralement la capture d'ĂŠcran de l'OS +pendant que l'ĂŠmulateur est lancĂŠ). +. +:CONFIG_LANGUAGE +SĂŠlectionner un autre fichier de langue. +. +:CONFIG_MACHINE +Type de machine que DOSBox essaye d'ĂŠmuler. +. +:CONFIG_CAPTURES +RĂŠpertoire oĂš les objets comme les sons WAVE, musiques MIDI, et captures d'ĂŠcran sont enregistrĂŠs. +. +:CONFIG_MEMSIZE +QuantitĂŠ de mĂŠmoire dont DOSBox dispose en mĂŠgaoctets. +Il est mieux de laisser cette valeur d'origine pour ĂŠviter les problèmes avec certains jeux, +bien que quelques jeux puissent nĂŠcessiter une valeur plus ĂŠlevĂŠe. +Il n'y a gĂŠnĂŠralement pas de gain de vitesse en augmentant cette valeur. +. +:CONFIG_STARTUP_VERBOSITY +ContrĂ´le la verbositĂŠ avant l'affichage du programme : + | Écran de dĂŠmarrage | Écran de bienvenue | Sorties ĂŠcran de dĂŠmarrage +high | oui | oui | oui +medium | non | oui | oui +low | non | non | oui +quiet | non | non | non +splash_only | oui | non | non +auto | 'low' si exec ou dir sont utilisĂŠs, sinon 'high' +. +:CONFIG_FRAMESKIP +Nombre d'images que DOSBox saute avant d'en afficher une autre. +. +:CONFIG_ASPECT +Met Ă  l'ĂŠchelle la rĂŠsolution verticale pour produire un aspect d'affichage 4:3, +correspondant Ă  celui des moniteurs Ă  dĂŠfinition standard d'origine +pour lequel la majoritĂŠ des jeux DOS ont ĂŠtĂŠ conçus. Ce paramètre +n'affecte que les modes vidĂŠo qui utilisent des pixels non carrĂŠs, tels que +320x200 ou 640x400 ; alors que les modes de pixels carrĂŠs, tels que 640x480 +et 800x600, seront affichĂŠs tel quel. +. +:CONFIG_MONOCHROME_PALETTE +SĂŠlectionne la palette par dĂŠfaut pour l'affichage monochrome. +Fonctionne seulement lors de l'ĂŠmulation hercules ou cga_mono. +Vous pouvez aussi faire dĂŠfiler les couleurs disponibles avec F11. +. +:CONFIG_SCALER +Scaler utilisĂŠ pour agrandir/amĂŠliorer les modes basse rĂŠsolution. +Si l'option "forced" est ajoutĂŠe, alors le scaler sera utilisĂŠ mĂŞme si +le rĂŠsultat ne semble pas celui escomptĂŠ. +Notez que certains scalers peuvent utiliser des bords noirs pour remplir l'image +dans la rĂŠsolution configurĂŠ. Si ce n'est pas l'effet voulu, +essayez un scaler diffĂŠrent ou activez le mode plein ĂŠcran. + +. +:CONFIG_GLSHADER +Aussi bien 'none' (aucun) ou le nom d'un shader GLSL. Marche seulement avec +la sortie OpenGL. Peut-ĂŞtre un chemin absolu, un fichier +dans le sous-rĂŠpertoire 'glshaders' du rĂŠpertoire de configuration +de DOSBox, ou l'un des shaders intĂŠgrĂŠs : +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (dĂŠfaut). +. +:CONFIG_CORE +Core CPU utilisĂŠ dans l'ĂŠmulation. 'auto' bascule de 'normal' Ă  'dynamic' si c'est disponible et +appropriĂŠ. +. +:CONFIG_CPUTYPE +Coeur de CPU utilisĂŠ dans l'ĂŠmulation. 'auto' est le choix le plus rapide. +. +:CONFIG_CYCLES +Nombre d'instructions que DOSBox essaye d'ĂŠmuler Ă  chaque milliseconde. +ParamĂŠtrer une trop grande valeur donne des coupures de son et des saccades. +Les cycles peuvent ĂŞtre dĂŠfinis de 3 façons : + 'auto' essaye de deviner ce dont un jeu a besoin. + Cela fonctionne gĂŠnĂŠralement, mais peut ĂŠchouer avec certains jeux. + '#nombre' dĂŠfinira une quantitĂŠ fixe de cycles. C'est gĂŠnĂŠralement ce qu'il faut + si 'auto' ĂŠchoue. (Exemple : '4000') + 'max' allouera autant de cycles que votre ordinateur est capable + de gĂŠrer. + +. +:CONFIG_CYCLEUP +Nombre de cycles Ă  ajouter/soustraire avec la combinaison de touches. (" PRIMARY_MOD_NAME "+F11/" PRIMARY_MOD_NAME "+F12) +. +:CONFIG_CYCLEDOWN +Le paramĂŠtrer Ă  moins de 100 donnera un pourcentage. +. +:CONFIG_NOSOUND +Activer le mode silencieux, le son ĂŠtant cependant toujours ĂŠmulĂŠ. +. +:CONFIG_RATE +Taux d'ĂŠchantillonnage du mixer, paramĂŠtrer tout taux d'un pĂŠriphĂŠrique plus haut que cela va probablement dĂŠtĂŠriorer sa qualitĂŠ sonore. +. +:CONFIG_BLOCKSIZE +Taille de bloc du mixer, des blocs plus grands peuvent aider pour les saccades de son mais il sera aussi moins en phase. +. +:CONFIG_PREBUFFER +Nombre de millisecondes de donnĂŠes Ă  garder en amont du paramètre blocksize. +. +:CONFIG_MIDIDEVICE +PrĂŠiphĂŠrique qui recevra les donnĂŠes MIDI (depuis l'interface +ĂŠmulĂŠe - MPU-401). Choisissez l'un des suivants : +'fluidsynth', pour utiliser le synthĂŠtiseur MIDI intĂŠgrĂŠ. Reportez-vous + Ă  la section [fluidsynth] pour la configuration dĂŠtaillĂŠe. +'mt32', pour utiliser le synthĂŠtiseur Roland MT-32 intĂŠgrĂŠ. Reportez-vous + Ă  la section [mt32] pour la configuration dĂŠtaillĂŠe. +'auto', pour utiliser le premier lecteur MIDI externe disponible. Cela + peut ĂŞtre un synthĂŠtiseur logiciel ou un pĂŠriphĂŠrique matĂŠriel. +. +:CONFIG_MIDICONFIG +Options de configuration pour l'interface MIDI sĂŠlectionnĂŠe. +Il s'agit gĂŠnĂŠralement de l'ID ou du nom du synthĂŠtiseur MIDI que vous voulez +utiliser (trouver son ID/nom avec la commande DOS 'mixer /listmidi'). +- Cette option n'a aucun effet lors de l'utilisation d'un synthĂŠtiseur intĂŠgrĂŠ + (mididevice = 'fluidsynth' ou 'mt32'). +- Lors de l'utilisation d'ALSA, utiliser la commande Linux 'aconnect -l' pour lister + les ports MIDI et en sĂŠlectionner un (par exemple 'midiconfig=14:0' + pour le sĂŠquenceur client 14, port 0). +- Si vous utiliser un Roland MT-32 avec un PCB en rĂŠvision 0, + le matĂŠriel peut demander un dĂŠlai afin d'ĂŠviter que son + tampon ne dĂŠborde. Dans ce cas, ajoutez 'delaysysex', + par exemple: 'midiconfig=2 delaysysex'. +Reportez vous au README/Manuel pour plus d'informations. +. +:CONFIG_MPU401 +Type de MPU-401 Ă  ĂŠmuler. +. +:CONFIG_SOUNDFONT +Chemin pour un fichier SoundFont au format .sf2. Vous pouvez utiliser +un chemin relatif ou absolu, ou le nom d'un fichier .sf2 dans +le rĂŠpertoire 'soundfonts' Ă  l'intĂŠrieur de votre rĂŠpertoire de configuration +de DOSBox. +Un pourcentage optionnel rĂŠglera le volume du SoundFont. +Par exemple: 'soundfont.sf2 50' le diminuera de 50 pourcents. +L'ĂŠchelle de pourcentage peut aller de 1 Ă  500. +. +:CONFIG_MODEL +Modèle de synthĂŠtiseur Ă  utiliser. Par dĂŠfaut, prĂŠfère CM-32L +si les deux sets de ROMs sont fournis. Pour les premiers jeux Sierra et Dune 2, +il est recommandĂŠ d'utiliser 'mt32', alors qu les jeux rĂŠcents utilisent +plutĂ´t les effets sonores supplĂŠmentaires CM-32L (utilisez 'auto' ou 'cm32l') +. +:CONFIG_ROMDIR +RĂŠpertoire contenant les ROMs nĂŠcessaires MT-32 et/ou CM-32L +nommĂŠs comme ceci : + MT32_CONTROL.ROM ou CM32L_CONTROL.ROM - fichier(s) de contrĂ´le ROM. + MT32_PCM.ROM ou CM32L_PCM.ROM - fichier(s) PCM ROM. +Le rĂŠpertoire peut ĂŞtre absolu ou relatif, ou laisser vide pour +utiliser le rĂŠpertoire 'mt32-roms' dans le rĂŠpertoire de configuration +de DOSBox, ou un autre rĂŠpertoire habituel du système. +. +:CONFIG_SBTYPE +Type de Sound Blaster Ă  ĂŠmuler. 'gb' pour Game Blaster. +. +:CONFIG_SBBASE +Adresse IO de la Sound Blaster. +. +:CONFIG_IRQ +NumĂŠro d'IRQ de la Sound Blaster. +. +:CONFIG_DMA +NumĂŠro DMA de la Sound Blaster. +. +:CONFIG_HDMA +NumĂŠro High DMA de la Sound Blaster. +. +:CONFIG_SBMIXER +Permet au mixer Sound Blaster de modifier le mixer de DOSBox. +. +:CONFIG_OPLRATE +oplrate est dĂŠprĂŠciĂŠ . La forme d'onde OPL waveform est maintenant ĂŠchantillonnĂŠe + au rythme de lecture du mixer pour ĂŠviter le rĂŠĂŠchantillonnage. +. +:CONFIG_OPLMODE +Type d'ĂŠmulation OPL. Sur 'auto' le mode est dĂŠterminĂŠ par 'sbtype'. +Tous les modes OPL sont compatibles AdLib, sauf pour 'cms'. +. +:CONFIG_OPLEMU +Fournisseur de l'ĂŠmulation OPL. 'compat' fournit une meilleure qualitĂŠ, +'nuked' est par dĂŠfaut et le plus prĂŠcis (mais le plus gourmand en CPU). +. +:CONFIG_GUS +Activer l'ĂŠmulation Gravis UltraSound. +. +:CONFIG_GUSBASE +Adresse de base IO de la Gravis UltraSound. +. +:CONFIG_GUSIRQ +NumĂŠro d'IRQ de la Gravis UltraSound. +. +:CONFIG_GUSDMA +Canal DMA de la Gravis UltraSound. +. +:CONFIG_ULTRADIR +Chemin vers le rĂŠpertoire UltraSound. Dans ce rĂŠpertoire, +il devrait y avoir un rĂŠpertoire MIDI qui contient +les fichiers de patch pour la lecture GUS. Le jeu de patch +utilisĂŠ avec Timidity devrait bien fonctionner correctement. +. +:CONFIG_PCSPEAKER +Activer l'ĂŠmulation du haut-parleur PC. +. +:CONFIG_PCRATE +Taux d'ĂŠchantillonnage de la gĂŠnĂŠration de son du haut-parleur PC. +. +:CONFIG_ZERO_OFFSET +Neutralise et empĂŞche DC-offset du haut-parleur PC d'endommager d'autres sources. +'auto' active ceci pour les systèmes non-Windows et le dĂŠsactive pour Windows. +Si votre OS corrige lui-mĂŞme le DC-offset, alors paramĂŠtrez ceci Ă  'false'. +. +:CONFIG_TANDY +Activer l'ĂŠmulation du Tandy Sound System. Pour 'auto', l'ĂŠmulation est prĂŠsente seulement si la machine est paramĂŠtrĂŠe sur 'tandy'. +. +:CONFIG_TANDYRATE +Taux d'ĂŠchantillonnage de la gĂŠnĂŠration 3-Voix Tandy. +. +:CONFIG_DISNEY +Activer l'ĂŠmulation Disney Sound Source. (compatible Covox Voice Master et Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Type de manette Ă  ĂŠmuler : auto (dĂŠfaut), +aucun (dĂŠsactive l'ĂŠmulation du joystick) +2axis (supporte deux manettes), +4axis (supporte une manette, première manette utilisĂŠe), +4axis_2 (supporte une manette, seconde manette utilisĂŠe), +fcs (Thrustmaster), ch (CH Flightstick). +'none' dĂŠsactive l'ĂŠmulation de la manette. +'auto' choisit l'ĂŠmulation selon la(les) manette(s) rĂŠelle(s). +(Rappelez-vous de rĂŠinitialiser le fichier de correspondance des touches DOSBox si vous l'avez sauvĂŠ plus tĂ´t) +. +:CONFIG_TIMED +Activer des intervalles de temps pour les axes. Tester cette option si votre manette dĂŠrive. +. +:CONFIG_AUTOFIRE +Tirer continuellement tant que le bouton est pressĂŠ. +. +:CONFIG_SWAP34 +Échanger les 3ème et 4ème axes. Peut ĂŞtre utile avec certaines manettes. +. +:CONFIG_BUTTONWRAP +Activer l'inversion de bouton pour le nombre de boutons ĂŠmulĂŠs. +. +:CONFIG_CIRCULARINPUT +Activer la translation d'entrĂŠe circulaire vers une sortie carrĂŠe. +Essayez d'activer ceci si votre stick analogique gauche peut seulement bouger dans un cercle. +. +:CONFIG_DEADZONE +Pourcentage de mouvement Ă  ignorer. 100 transforme le stick en un stick digital. +. +:CONFIG_SERIAL1 +DĂŠfinir le type de pĂŠriphĂŠrique connectĂŠ au port sĂŠrie. +Peut ĂŞtre 'disabled' (dĂŠsactivĂŠ), 'dummy' (factice), 'modem', 'nullmodem', 'directserial'. +Les paramètres additionnels doivent ĂŞtre sur la mĂŞme ligne sous la forme +paramètre:valeur. Le paramètre pour tous les types est l'IRQ (optionnel). +Pour 'directserial' : realport (port rĂŠel, requis), rxdelay (optionnel). + (realport:COM1 realport:ttyS0). +Pour 'modem' : listenport (port d'ĂŠcoute, optionnel). +Pour 'nullmodem' : server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (tous optionnels). +Exemple : 'serial1=modem listenport:5000'. +. +:CONFIG_SERIAL2 +Voir serial1 +. +:CONFIG_SERIAL3 +Voir serial1 +. +:CONFIG_SERIAL4 +Voir serial1 +. +:CONFIG_PHONEBOOKFILE +Fichier utilisĂŠ pour relier de faux numĂŠros de tĂŠlĂŠphone Ă  des adresses. +. +:CONFIG_XMS +Activer la prise en charge de mĂŠmoire XMS (ou ĂŠtendue). +. +:CONFIG_EMS +Activer la prise en charge de mĂŠmoire EMS (ou paginĂŠe). La valeur par dĂŠfaut (=true) fournie +la meilleure compatibilitĂŠ mais certaines applications peuvent fonctionner mieux +avec d'autres choix, ou la dĂŠsactivation de l'EMS (=false) +pour fonctionner. +. +:CONFIG_UMB +Activer la prise en charge des UMB (bloc mĂŠmoire supĂŠrieure). +. +:CONFIG_VER +ParamĂŠtrer la version de DOS (5.0 par dĂŠfaut). Formater selon majeure.mineure. +Un nombre seul est traitĂŠ comme une version majeure. +Les paramètres communs sont 3.3, 5.0, 6.22, and 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Code langue pour la disposition du clavier (ou aucun). +. +:CONFIG_IPX +Activer l'IPX par ĂŠmulation UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Les lignes de cette section seront lancĂŠes au dĂŠmarrage. +Vous pouvez mettre vos commandes MOUNT ici. + +. +:CONFIGFILE_INTRO +# Ceci est le fichier de configuration pour DOSBox-Staging (%s). +# Les lignes commençant avec un '#' sont des commentaires. + +. +:CONFIG_SUGGESTED_VALUES +Valeurs possibles +. +:PROGRAM_CONFIG_NOCONFIGFILE +Aucun fichier de configuration chargĂŠ ! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Fichier de configuration primaire : +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Fichiers de configuration additionnels: + +. +:PROGRAM_CONFIG_CONFDIR +RĂŠpertoire de configuration de DOSBox Staging %s : +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Impossible d'ouvrir le fichier %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Écriture du fichier de configuration %s + +. +:PROGRAM_CONFIG_USAGE +Outil de configuration : +-writeconf ou -wc sans paramètre : ĂŠcrit dans le fichier de configuration primaire chargĂŠ. +-writeconf ou -wc avec un nom de fichier : ĂŠcrit le fichier dans le rĂŠpertoire de configuration. +Utilisez -writelang ou -wl nom de fichier pour ĂŠcrire les clefs de language courant. +-r [paramètres] + RedĂŠmarre DOSBox, soit en utilisant les paramètres prĂŠcĂŠdents ou tout autre ajoutĂŠ. +-wcp [nom de fichier] + Écrit le fichier de configuration dans le rĂŠpertoire du programme, dosbox-staging.conf ou le nom de fichier + spĂŠcifiĂŠ. +-wcd + Écrit dans le fichier de configuration par dĂŠfaut dans le rĂŠpertoire de configuration. +-l liste les paramètres de configuration. +-h, -help, -? sections / nom de section / nom de propriĂŠtĂŠ + Sans paramètres, affiche cet ĂŠcran d'aide. Ajoutez "sections" pour une liste de + sections. Pour des infos Ă  propos d'une section spĂŠcifique ou d'une propriĂŠtĂŠ spĂŠcifique ajoutez son nom après. +-axclear nettoye la section autoexec. +-axadd [ligne] ajoute une ligne Ă  la section autoexec. +-axtype affiche le contenu de la section autoexec. +-securemode bascule en mode sĂŠcurisĂŠ. +-avistart dĂŠmarre l'enregistrement AVI. +-avistop arrĂŞte l'enregistrement AVI. +-startmapper dĂŠmarre le keymapper. +-get "section propriĂŠtĂŠ" affiche la valeur de la propriĂŠtĂŠ. +-set "section propriĂŠtĂŠ=valeur" change la valeur. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +UtilitĂŠ de la propriĂŠtĂŠ "%s" (contenue dans la section "%s") : +%s + +Valeurs possible : %s +Valeur par dĂŠfaut : %s +Valeur actuelle: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +UtilitĂŠ de la section "%s" : +%s +Valeur actuelle : +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +Cette propriĂŠtĂŠ ne peut jamais ĂŞtre changĂŠe. + +. +:PROGRAM_CONFIG_HLP_POSINT +nombre entier positif +. +:PROGRAM_CONFIG_HLP_SECTHLP +La section %s contient les propriĂŠtĂŠs suivantes : + +. +:PROGRAM_CONFIG_HLP_SECTLIST +La configuration de DOSBox contient les sections suivantes : + + +. +:PROGRAM_CONFIG_SECURE_ON +BasculĂŠ en mode sĂŠcurisĂŠ. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Cette opĂŠration n'est pas permise en mode sĂŠcurisĂŠ. + +. +:PROGRAM_CONFIG_SECTION_ERROR +La section "%s" n'existe pas. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" n'est pas une valeur correcte pour la propriĂŠtĂŠ %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Aucune section ou propriĂŠtĂŠ.. + +. +:PROGRAM_CONFIG_NO_PROPERTY +Il n'y a aucune propriĂŠtĂŠ "%s" dans la section "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Syntaxe correcte : config -set "section propriĂŠtĂŠ". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Syntaxe correcte : config -get "section propriĂŠtĂŠ". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox a ĂŠtĂŠ lancĂŠ avec les paramètres de ligne de commande suivants : +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Paramètre manquant. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROMs trouvĂŠs : %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Lecteur +. +:PROGRAM_MOUNT_STATUS_TYPE +Type +. +:PROGRAM_MOUNT_STATUS_LABEL +Nom de volume +. +:PROGRAM_MOUNT_STATUS_2 +Lecteur %c montĂŠ en tant que %s + +. +:PROGRAM_MOUNT_STATUS_1 +Les lecteurs montĂŠs actuellement sont : + +. +:PROGRAM_MOUNT_ERROR_1 +Le rĂŠpertoire %s n'existe pas. + +. +:PROGRAM_MOUNT_ERROR_2 +%s n'est pas un rĂŠpertoire + +. +:PROGRAM_MOUNT_ILL_TYPE +Type illĂŠgal %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Lecteur %c dĂŠjĂ  montĂŠ en tant que %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Le lecteur %c n'est pas montĂŠ. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Le lecteur %c a ĂŠtĂŠ enlevĂŠ avec succès. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Les lecteurs virtuels ne peuvent pas ĂŞtre dĂŠmontĂŠs. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' n'est pas un identifiant de lecteur valide. + +. +:PROGRAM_MOUNT_WARNING_WIN +Monter c:\ n'est PAS recommandĂŠ. Veuillez monter un (sous-)rĂŠpertoire la prochaine fois. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Monter / n'est PAS recommandĂŠ. Veuillez monter un (sous-)rĂŠpertoire la prochaine fois. + +. +:PROGRAM_MOUNT_NO_OPTION +Attention: option '%s' non supportĂŠe et ignorĂŠe. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +Un rĂŠpertoire normal doit ĂŞtre montĂŠ d'abord avant qu'une redirection soit possible. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +Cette redirection n'est PAS compatible avec le lecteur spĂŠcifiĂŠ. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +La redirection doit ĂŞtre spĂŠcifiĂŠe en utilisant le mĂŞme adressage que le disque sous-jacent. Pas de mĂŠlange de chemins relatifs et absolus. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +Le rĂŠpertoire de redirection ne peut pas ĂŞtre le mĂŞme que celui du lecteur sous-jacent. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Quelque chose s'est mal dĂŠroulĂŠ. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Redirection %s sur lecteur %c montĂŠe. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Impossible de dĂŠplacer le lecteur Z. Lecteur %c dĂŠjĂ  montĂŠ. + +. +:PROGRAM_MEM_CONVEN +%10d kB de mĂŠmoire conventionnelle libres + +. +:PROGRAM_MEM_EXTEND +%10d kB de mĂŠmoire ĂŠtendue (XMS) libres + +. +:PROGRAM_MEM_EXPAND +%10d kB de mĂŠmoire paginĂŠe (EMS) libres + +. +:PROGRAM_MEM_UPPER +%10d kB de mĂŠmoire supĂŠrieure (UMB) libres dans %d bloc(s) (plus gros bloc UMB %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kb allouĂŠs. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kb libĂŠrĂŠs. + +. +:PROGRAM_LOADFIX_DEALLOCALL +MĂŠmoire utilisĂŠe libĂŠrĂŠe. + +. +:PROGRAM_LOADFIX_ERROR +Erreur d'allocation mĂŠmoire. + +. +:MSCDEX_SUCCESS +MSCDEX installĂŠ. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX : Échec : Les lettres de lecteur d'unitĂŠs CD-ROM multiples doivent ĂŞtre continues. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX : Échec : Pas encore supportĂŠ. + +. +:MSCDEX_ERROR_PATH +MSCDEX : La localisation spĂŠcifiĂŠe n'est pas un lecteur CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX : Échec : Fichier non valide ou impossible Ă  ouvrir. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX : Échec : Trop de lecteurs CD-ROM (max. : 5). L'installation de MSCDEX a ĂŠchouĂŠe. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX : Sous-rĂŠpertoire montĂŠ : support limitĂŠ. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX : Échec : Le fichier n'est pas une image ISO/CUE ou contient des erreurs. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX : Échec : Erreur inconnue. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX : Attention : Option '%s' non supportĂŠe et ignorĂŠe. + +. +:PROGRAM_RESCAN_SUCCESS +Cache de lecteur vidĂŠ. + +. +:PROGRAM_INTRO +Bienvenue dans DOSBox Staging, un ĂŠmulateur x86 avec son et graphismes. +DOSBox crĂŠe un shell pour vous qui ressemble au vieux DOS ordinaire. + +Pour des informations basqiues Ă  propos du montage tapez intro mount +Pour des informations sur le support des CD-ROM tapez intro cdrom +Pour des informations sur les touches spĂŠciales tapez intro special +Pour accĂŠder au wiki de DOSBox Staging, visitez : +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox s'arrĂŞtera/quittera sans avertissement si une erreur survient ! + +. +:PROGRAM_INTRO_MOUNT_START +Voici quelques commandes pour commencer : +Avant de pouvoir utiliser les fichiers prĂŠsents sur votre propre système de fichiers, +vous devez monter les rĂŠpertoires contenant les fichiers. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +╔═════════════════════════════════════════════════════════════════════════╗ +║ mount c c:\dosgames\ crĂŠera un lecteur C avec c:\dosgames pour contenu. ║ +║ ║ +║ c:\dosgames\ est un exemple. Remplacez-le par votre propre rĂŠpertoire de jeux.  +╚═════════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_OTHER +╔══════════════════════════════════════════════════════════════════════╗ +║ mount c ~/jeuxdos crĂŠera un lecteur C avec ~/jeuxdos pour contenu. ║ +║ ║ +║ ~/dosgames est un exemple. Remplacez-le par votre propre rĂŠpertoire de jeux. ║ +╚══════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_END +Quand le montage est complĂŠtĂŠ avec succès, tapez c: pour aller your freshly +sur votre nouveau lecteur C montĂŠ. Taper dir Ă  cet endroit montrera son contenu. cd vous permettra +d'entrer dans un rĂŠpertoire (reconnaissable par les [] dans le listing du rĂŠpertoire). +Vous pouvez exĂŠcutez des programmes/fichiers finissant par .exe .bat et .com. + +. +:PROGRAM_INTRO_CDROM +Comment monter un lecteur CD-ROM rĂŠel/virtuel dans DOSBox : +DOSBox supporte l'ĂŠmulation CD-ROM Ă  plusieurs niveaux. + +Ceci fonctionne sur tous les rĂŠpertoires ordinaires, installe MSCDEX et marque les fichiers +en lecteur seule. GĂŠnĂŠralement c'est suffisant pour la plupart des jeux : + +mount D C:\exemple -t cdrom + +Si cela ne marche pas, vous pouvez prĂŠciser Ă  DOSBox le nom de volume du CD-ROM : + +mount D C:\exemple -t cdrom -label CDLABEL + +Par ailleurs, vous pouvez utiliser IMGMOUNT pour monter des images ISO ou des fichiers CUE : + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Touches spĂŠciales : +Voici les combinaisons des touches par dĂŠfaut. +Elles peuvent ĂŞtre changĂŠes dans le keymapper. + +" MMOD2_NAME "EntrĂŠe : Bascule entre mode plein ĂŠcran et mode fenĂŞtrĂŠ. +" MMOD2_NAME "Pause : Mettre en pause/relancer l'ĂŠmulateur. +" PRIMARY_MOD_NAME "+F1 " PRIMARY_MOD_PAD " : DĂŠmarrer le keymapper. +" PRIMARY_MOD_NAME "+F4 " PRIMARY_MOD_PAD " : Bascule entre les images disque montĂŠes, met Ă  jour le cache des rĂŠpertoires pour tous les lecteurs. +" PRIMARY_MOD_NAME "+F5 " PRIMARY_MOD_PAD " : Sauvegarde une capture d'ĂŠcran. +" PRIMARY_MOD_NAME "+F6 " PRIMARY_MOD_PAD " : DĂŠmarrer/ArrĂŞter l'enregistrement de la sortie son dans un fichier WAVE. +" PRIMARY_MOD_NAME "+F7 " PRIMARY_MOD_PAD " : DĂŠmarrer/ArrĂŞter l'enregistrement de la sortie vidĂŠo dans un fichier ZMBV. +" PRIMARY_MOD_NAME "+F9 " PRIMARY_MOD_PAD " : Terminer l'ĂŠmulation. +" PRIMARY_MOD_NAME "+F10 " PRIMARY_MOD_PAD " : Capturer/LibĂŠrer la souris. +" PRIMARY_MOD_NAME "+F11 " PRIMARY_MOD_PAD " : Ralentir l'ĂŠmulation. +" PRIMARY_MOD_NAME "+F12 " PRIMARY_MOD_PAD " : AccĂŠlĂŠrer l'ĂŠmulation. +" MMOD2_NAME "F12 : DĂŠbloquer la vitesse (bouton turbo/avance rapide). + +. +:PROGRAM_BOOT_NOT_EXIST +Le fichier de disque de dĂŠmarrage n'existe pas. Échec. + +. +:PROGRAM_BOOT_NOT_OPEN +Impossible d'ouvrir le fichier de disque de dĂŠmarrage. Échec. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Le fichier image est en lecture seule ! Cela peut crĂŠer des problèmes. + +. +:PROGRAM_BOOT_PRINT_ERROR +Cette commande dĂŠmarre DOSBox Ă  partir d'une disquette ou d'une image de disque dur. + +Pour cette commande, on peut spĂŠcifier une succession de disquettes et basculer +entre elles avec " PRIMARY_MOD_NAME "+F4, et -l spĂŠcifie le lecteur montĂŠ sur lequel dĂŠmarrer. +Sans lettre de lecteur spĂŠcifiĂŠe, le dĂŠmarrage par dĂŠfaut s'effectue sur A. +Les seules lettres de lecteur dĂŠmarrables sont A, C, et D. Pour dĂŠmarrer Ă  partir +d'un disque dur (C ou D), l'image doit avoir au prĂŠalable ĂŠtĂŠ montĂŠe avec la commande +IMGMOUNT. + +La syntaxe de cette commande est : + +BOOT [diskimg1.img diskimg2.img] [-l lettre_de_lecteur] + +. +:PROGRAM_BOOT_UNABLE +Impossible de dĂŠmarrer Ă  partir du lecteur %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Ouverture du fichier image : %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Ne peut pas ouvrir %s +. +:PROGRAM_BOOT_BOOT +DĂŠmarrage depuis le lecteur %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Cartouche PCjr trouvĂŠe, mais la machine n'est pas un PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Cartouche de commandes PCjr disponible :%s +. +:PROGRAM_BOOT_CART_NO_CMDS +Pas de cartouche PCjr de commande trouvĂŠe +. +:PROGRAM_LOADROM_SPECIFY_FILE +Vous devez spĂŠcifier le fichier ROM Ă  charger. + +. +:PROGRAM_LOADROM_CANT_OPEN +Fichier ROM non accessible. + +. +:PROGRAM_LOADROM_TOO_LARGE +Fichier ROM trop large. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +BIOS vidĂŠo non supportĂŠ par ce type de machine. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +Fichier ROM non reconnu. + +. +:PROGRAM_LOADROM_BASIC_LOADED +ROM BASIC chargĂŠ. + +. +:SHELL_CMD_IMGMOUNT_HELP +monte la ou les image(s) de disques compacts ou de disquette(s) sur une lettre de lecteur spĂŠcifiĂŠe. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Monte une image CD-ROM, disquette, ou disque dur sur une lettre de lecteur. + +Usage : + imgmount LECTEUR CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount LECTEUR FICHIERIMAGE [FICHIERIMAGE2 [..]] [-fs fat] -t hdd|floppy + imgmount LECTEUR IMAGEDÉMARRAGE [-fs fat|none] -t hdd -size GEOMETRIE + imgmount -u LECTEUR (dĂŠmonte l'image du LECTEUR) + +Avec : + LECTEUR est la lettre de lecteur oĂš l'image sera montĂŠe : a, c, d, ... + CDROM-SET est ISO, CUE+BIN, CUE+ISO, ou CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + FICHIERIMAGE est une image de disque dur ou disquette formatĂŠ FAT16/FAT12 + IMAGEDÉMARRAGE est une image de dĂŠmarrage de disque dur avec une taille + -size GEOMETRIE : bytes-par-secteur,secteurs-par-tĂŞte,tĂŞtes,cylindres +Notes : + - " PRIMARY_MOD_NAME "+F4 ĂŠchange & monte le CDROM-SET ou le FICHIERIMAGE suivant si spĂŠcifiĂŠ. +Exemples : + imgmount D /home/USERNAME/jeux/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A disquette1.img disquette2.img disquette3.img -t floppy + imgmount C ~/dos/lecteur_c.img -t hdd + imgmount C demarrage.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +relie les dossiers ou lecteurs physiques Ă  une lettre de lecteur virtuel. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Monte un rĂŠpertoire de l'OS hĂ´te sur une lettre de lecteur. + +Usage : + mount LECTEUR RÉPERTOIRE [-t TYPE] [-freesize TAILLE] [-label NOM_VOLUME] + mount -u LECTEUR (dĂŠmonte le rĂŠpertoire du LECTEUR) + +Avec : + LECTEUR la lettre de lecteur oĂš sera montĂŠ le rĂŠpertoire : A, C, D, ... + RÉPERTOIRE est le rĂŠpertoire de l'OS hĂ´te qui sera montĂŠ + TYPE type de rĂŠpertoire Ă  monter : 'dir', 'floppy', 'cdrom', 'overlay' + TAILLE espace libre sur le disque virtuel + (KiB pour les disquettes, MiB sinon) + NOM_VOLUME nom de volume Ă  utiliser + +Notes : + - '-t overlay' redirige les accès en ĂŠcriture du disque montĂŠ + vers un autre rĂŠpertoire. + - Options disponibles dans le manuel (fichier README, chapitre 4). + +Exemples : + mount C ~/jeuxdos + mount D "/media/USERNAME/JEU CD" -t cdrom + mount C mes_fichiers_de_sauvegarde -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Vous devez spĂŠcifier la lettre de lecteur sur laquelle monter l'image. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Vous devez spĂŠcifier le numĂŠro de lecteur (0 ou 3) sur lequel monter l'image (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Pour les images CD-ROM : IMGMOUNT lettre-lecteur localisation-image -t iso + +Pour les images de disque dur : vous devez spĂŠcifier la gĂŠomĂŠtrie du disque dur : +bytes_par_secteur, secteurs_par_cylindre, tĂŞtes_par_cylindre, cylindres. +IMGMOUNT lettre-lecteur localisation-image -size bps,spc,tpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Ne peut pas charger le fichier image. +VĂŠrifiez que le chemin est correct et que l'image est accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Ne peut pas extraire la gĂŠomĂŠtrie du lecteur depuis l'image. +Utilisez le paramètre -size bps,spc,tpc,cyl pour spĂŠcifier la gĂŠomĂŠtrie. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Type '%s' non supportĂŠ. SpĂŠcifiez 'floppy' (disquette), 'hdd' (disque dur), 'cdrom', ou 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" non supportĂŠ. SpĂŠcifiez 'fat' ou 'iso' ou 'none' (aucun). + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Vous devez spĂŠcifier un fichier image Ă  monter. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Fichier image non trouvĂŠ. + +. +:PROGRAM_IMGMOUNT_MOUNT +Pour monter des rĂŠpertoires, utilisez la commande MOUNT, pas la commande IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Lecteur dĂŠjĂ  montĂŠ avec cette lettre. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Ne peut pas crĂŠer de lecteur depuis un fichier. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Lecteur numĂŠro %d montĂŠ comme %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +L'image doit ĂŞtre sur un hĂ´te ou sur un disque local. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +L'utilisation de fichiers multiples n'est supportĂŠe que pour les images CUE/ISO. + +. +:PROGRAM_KEYB_INFO +La page de code %i a ĂŠtĂŠ chargĂŠe + +. +:PROGRAM_KEYB_INFO_LAYOUT +La page de code %i a ĂŠtĂŠ chargĂŠe pour la disposition %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID disposition clavier[ numĂŠro page de code[ fichier page de code]]] + +Quelques exemples : + KEYB: Affiche la page de code actuellement chargĂŠe. + KEYB sp: Charge la disposition espagnole (SP), utilise une page de code appropriĂŠe. + KEYB sp 850: Charge la disposition espagnole (SP), utilise la page de code 850. + KEYB sp 850 mycp.cpi: Idem que ci-dessus, mais utilise le fichier mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +La disposition clavier %s est chargĂŠe pour la page de code %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Fichier de clavier %s non trouvĂŠ + + +. +:PROGRAM_KEYB_INVALIDFILE +Fichier de clavier %s non valide + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Aucune disposition dans %s pour la page de code %i + +. +:PROGRAM_KEYB_INVCPFILE +Aucun fichier ou fichier de page de code non valide pour la disposition %s + + +. +:SHELL_ILLEGAL_PATH +Chemin incorrect. + +. +:SHELL_CMD_HELP +Pour avoir une liste de toutes les commandes supportĂŠes, tapez help /all . +Liste rapide des commandes les plus utilisĂŠes : + +. +:SHELL_CMD_ECHO_ON +ECHO est activĂŠ. + +. +:SHELL_CMD_ECHO_OFF +ECHO est dĂŠsactivĂŠ. + +. +:SHELL_ILLEGAL_SWITCH +Paramètre incorrect : %s. + +. +:SHELL_MISSING_PARAMETER +Paramètre requis manquant. + +. +:SHELL_CMD_CHDIR_ERROR +Impossible de CHanger vers : %s. + +. +:SHELL_CMD_CHDIR_HINT +Astuce : pour changer de lecteur, tapez %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +Le nom de rĂŠpertoire est plus long que 8 caractères et/ou contient des espaces. +Essayez cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Vous ĂŞtes encore sur le lecteur Z:, changez pour un lecteur montĂŠ avec C:. + +. +:SHELL_CMD_DATE_HELP +Affiche ou change la date interne. + +. +:SHELL_CMD_DATE_ERROR +La date spĂŠcifiĂŠe est incorrecte. + +. +:SHELL_CMD_DATE_DAYS +3DimLunMarMerJeuVenSam +. +:SHELL_CMD_DATE_NOW +Date actuelle : +. +:SHELL_CMD_DATE_SETHLP +Tapez 'date MM-JJ-AAAA' pour changer + +. +:SHELL_CMD_DATE_FORMAT +M/J/A +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-JJ-AAAA] + MM-JJ-AAAA: nouvelle date Ă  utiliser + /S: Utilise de façon permanente l'heure et la date de l'hĂ´te pour le DOS + /F: Rebascule sur l'heure interne de DOSBox (contraire de /S) + /T: Affiche seulement la date + /H: Synchronise avec l'hĂ´te + +. +:SHELL_CMD_TIME_HELP +Affiche l'heure interne. + +. +:SHELL_CMD_TIME_NOW +Heure courante : +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Affiche seulement l'heure + /H: Synchronise avec l'hĂ´te + +. +:SHELL_CMD_MKDIR_ERROR +Impossible de crĂŠer : %s. + +. +:SHELL_CMD_RMDIR_ERROR +Impossible de supprimer : %s. + +. +:SHELL_CMD_DEL_ERROR +Impossible d'effacer : %s. + +. +:SHELL_SYNTAXERROR +La syntaxe de la commande est incorrecte. + +. +:SHELL_CMD_SET_NOT_SET +La variable d'environnement %s n'est pas dĂŠfinie. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Pas assez d'espace d'environnement disponible. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST : Nom de fichier manquant. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL : Nombre manquant. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL : NumĂŠro non valide. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Aucune ĂŠtiquette indiquĂŠe pour la commande GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO : Étiquette %s non trouvĂŠe. + +. +:SHELL_CMD_FILE_NOT_FOUND +Fichier %s non trouvĂŠ. + +. +:SHELL_CMD_FILE_EXISTS +Fichier %s dĂŠjĂ  existant. + +. +:SHELL_CMD_DIR_VOLUME + Le volume dans le lecteur %c est %s + +. +:SHELL_CMD_DIR_INTRO + Arborescence de %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d fichier(s) %21s bytes + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d rĂŠpertoire(s) %21s bytes libres + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Le lecteur %c n'existe pas ! +Vous devez le monter auparavant. Tapez intro ou intro mount pour plus d'informations. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Commande invalide : %s. + +. +:SHELL_CMD_PAUSE +Appuyer sur une touche pour continuer... +. +:SHELL_CMD_PAUSE_HELP +Attendre l'appui sur 1 touche pour continuer. + +. +:SHELL_CMD_COPY_FAILURE +Échec de la copie : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d fichier(s) copiĂŠ(s). + +. +:SHELL_CMD_SUBST_NO_REMOVE +Impossible d'enlever, lecteur non utilisĂŠ. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST a ĂŠchouĂŠ. Vous avez fait une erreur dans votre ligne de commande ou le lecteur cible est dĂŠjĂ  utilisĂŠ. +Il n'est possible d'utiliser SUBST que sur les lecteurs locaux. +. +:SHELL_STARTUP_BEGIN +╔════════════════════════════════════════════════════════════════════════════╗ +║ Bienvenue dans DOSBox Staging %-44s ║ +║ ║ +║ Pour une courte introduction pour les nouveaux utilisateurs, tapez: INTRO ║ +║ Pour la liste des commandes supportĂŠes par le shell, tapez : HELP ║ +║ ║ +║ Pour ajuster la vitesse du CPU ĂŠmulĂŠ, essayez " PRIMARY_MOD_NAME "+F11 et " PRIMARY_MOD_NAME "+F12." PRIMARY_MOD_PAD PRIMARY_MOD_PAD " ║ +║ Pour activer le keymapper " PRIMARY_MOD_NAME "+F1." PRIMARY_MOD_PAD " ║ +║ Pour plus d'informations, lisez le fichier README dans le rĂŠpertoire de ║ +║ DOSBox. ║ +║ ║ + +. +:SHELL_STARTUP_CGA +║ DOSBox supporte le mode composite CGA. ║ +║ Utilisez F12 pour rĂŠgler la sortiecomposite sur ON, OFF, ou AUTO (dĂŠfaut). ║ +║ (" MMOD2_NAME "+)F11 change la teinte; " MMOD1_NAME "+" MMOD2_NAME "+F11 sĂŠlectionne le premier/dernier modèle CGA." PRIMARY_MOD_PAD "║ +║ ║ + +. +:SHELL_STARTUP_CGA_MONO +║ Utilisez F11 pour passer au vert, ambre, blanc et blanc-papier, ║ +║ et " MMOD2_NAME "F11 pour changer le contraste/la luminositĂŠ. ║ + +. +:SHELL_STARTUP_HERC +║ Utilisez F11 pour passer au blanc, ambre, et vert monochrome. ║ +║ ║ + +. +:SHELL_STARTUP_DEBUG +║ Pressez " MMOD2_NAME "Pause pour dĂŠmarrer le debugger ou lancez l'exĂŠcutable avec DEBUG. ║ +║ ║ + +. +:SHELL_STARTUP_END +║ https://dosbox-staging.github.io ║ +╚════════════════════════════════════════════════════════════════════════════╝ + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Affiche/change le rĂŠpertoire courant. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [lecteur:][chemin] +CHDIR [..] +CD [lecteur:][chemin] +CD [..] + + .. Indique que vous voulez changer vers le rĂŠpertoire parent. + +Tapez 'CD lecteur': pour afficher le rĂŠpertoire courant dans le lecteur spĂŠcifiĂŠ. +Tapez 'CD' sans paramètres pour afficher le lecteur et le rĂŠpertoire courant. + +. +:SHELL_CMD_CLS_HELP +Effacer l'ĂŠcran. + +. +:SHELL_CMD_DIR_HELP +Affiche une liste de fichiers et sous-rĂŠpertoires dans un rĂŠpertoire. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [lecteur:][chemin][nomdefichier] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [lecteur:][chemin][nomdefichier] + SĂŠpcifie le lecteur, rĂŠpertoire, et/ou fichiers Ă  afficher. + /W Utilise le format d'affichage large. + /B Utilise le format minimal (ni en-tĂŞte ni rĂŠsumĂŠ). + /P Met en pause l'affichage après chaque ĂŠcran rempli. + /AD Affiche tous les rĂŠpertoires. + /A-D Affiche tous les fichiers. + /O Liste triĂŠe. + - PrĂŠfixe pour inverser l'ordre de tri + clef de tri N par Nom (alphabĂŠtique) S par taille (plus petit d'abord) + E par Extension (alphabĂŠtique) D par date & heure (plus ancien d'abord) + +. +:SHELL_CMD_ECHO_HELP +Affiche des messages et active/dĂŠsactive la commande ECHO. + +. +:SHELL_CMD_EXIT_HELP +Sortir du shell. + +. +:SHELL_CMD_HELP_HELP +Montrer l'aide. + +. +:SHELL_CMD_MKDIR_HELP +CrĂŠer un rĂŠpertoire. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [lecteur:][chemin] +MD [lecteur:][chemin] + +. +:SHELL_CMD_RMDIR_HELP +Supprimer un rĂŠpertoire. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [lecteur:][chemin] +RD [lecteur:][chemin] + +. +:SHELL_CMD_SET_HELP +Changer les variables d'environnement. + +. +:SHELL_CMD_IF_HELP +Effectuer un processus avec condition dans les programmes batch. + +. +:SHELL_CMD_GOTO_HELP +Aller Ă  la ligne de l'ĂŠtiquette dĂŠfinie dans un script batch. + +. +:SHELL_CMD_SHIFT_HELP +DĂŠcaler les paramètres de ligne de commande vers la gauche dans un script batch. + +. +:SHELL_CMD_TYPE_HELP +Affiche le contenu d'un fichier texte. + +. +:SHELL_CMD_TYPE_HELP_LONG +TAPEZ [lecteur:][chemin][nomdefichier] + +. +:SHELL_CMD_REM_HELP +Ajouter des commentaires dans un fichier batch. + +. +:SHELL_CMD_REM_HELP_LONG +REM [commentaire] + +. +:SHELL_CMD_NO_WILD +C'est une version simple de la commande, aucun joker autorisĂŠ ! + +. +:SHELL_CMD_RENAME_HELP +Renomme un ou plusieurs fichiers. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [lecteur:][chemin]nomfichier1 nomfichier2. +REN [lecteur:][chemin]nomfichier1 nomfichier2. + +Notez que vous ne pouvez pas spĂŠcifier un nouveau lecteur ou chemin pour votre fichier cible. + +. +:SHELL_CMD_DELETE_HELP +Supprimer un ou plusieurs fichiers. + +. +:SHELL_CMD_COPY_HELP +Copier des fichiers. + +. +:SHELL_CMD_CALL_HELP +Lancer un fichier batch Ă  partir d'un autre fichier batch.. + +. +:SHELL_CMD_SUBST_HELP +Assigner un rĂŠpertoire interne Ă  un lecteur. + +. +:SHELL_CMD_LOADHIGH_HELP +Charger un programme en mĂŠmoire haute (requiert xms=true et umb=true). + +. +:SHELL_CMD_LS_HELP +Liste le contenu du rĂŠpertoire. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [ARGUMENTS] + +. +:SHELL_CMD_LS_PATH_ERR +ls : ne peut accĂŠder Ă  '%s' : Aucun fichier ou rĂŠpertoire de ce nom + +. +:SHELL_CMD_CHOICE_HELP +Attendre l'appui sur une touche et dĂŠfinir le ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:choix] [/N] [/S] texte + /C[:]choix - SpĂŠcifie les touches utilisables. Par dĂŠfaut : yn (oui/non). + /N - N'affiche pas les choix Ă  la fin du prompt. + /S - Active la sensibilitĂŠ Ă  la casse des choix. + texte - Texte Ă  afficher comme prompt. + +. +:SHELL_CMD_ATTRIB_HELP +Ne fait rien. Fourni pour la compatibilitĂŠ. + +. +:SHELL_CMD_PATH_HELP +Fourni pour la compatibilitĂŠ. + +. +:SHELL_CMD_VER_HELP +Voir ou rĂŠgler la version de DOS reportĂŠe. + +. +:SHELL_CMD_VER_HELP_LONG +Utilisation : + ver + ver set VERSION + +Avec : + VERSION peut ĂŞtre un nombre entier, comme 5, ou inclure une valeur dĂŠcimale + Ă  deux chiffres, comme : 6.22, 7.01, ou 7.10. Les dĂŠcimales peuvent + aussi ĂŞtre sĂŠpares par un espace, comme : 6 22, 7 01, ou 7 10. + +Notes : + La version de DOS peut aussi ĂŞtre rĂŠglĂŠe dans le fichier de configuration + sous la section [dos] en utilisant le paramètre "ver = VERSION". + +Exemples : + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging version %s +DOS version %d.%02d + +. +:SHELL_CMD_VER_INVALID +La version spĂŠcifiĂŠe de DOS n'est pas correcte. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/utf-8/it/it-0.77.0-alpha.txt dosbox-staging-0.77.0/contrib/translations/utf-8/it/it-0.77.0-alpha.txt --- dosbox-staging-0.76.0/contrib/translations/utf-8/it/it-0.77.0-alpha.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/utf-8/it/it-0.77.0-alpha.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1457 @@ +:CONFIG_FULLSCREEN +Avvia DOSBox direttamente a schermo intero. +Premi " MMOD2_NAME "Enter per tornare in modalitĂ  finestra. +. +:CONFIG_DISPLAY +Numero dello schermo da utilizzare; Il valore dipende dall'OS e dalle +impostazioni dell'utente. +. +:CONFIG_VSYNC +Impostazione Sincronizzazione Verticale non implementata (parametro ignorato). +. +:CONFIG_FULLRESOLUTION +Risoluzione da usare a schermo intero: 'original', 'desktop' o +dimensione fissa (es. 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Imposta le dimensioni della finestra da utilizzare durante l'esecuzione +in modalitĂ  finestra: + default: Seleziona l'opzione migliore in base al tuo + ambiente e ad altre impostazioni. + original: Ridimensiona la finestra alla risoluzione + scelta dal programma emulato. + resizable: Rendi ridimensionabile la finestra dell'emulatore. + Questa è un'opzione sperimentale, funziona solo con + output=opengl e glshader=sharp (o none) + : Ridimensiona il contenuto della finestra alle dimensioni + indicate, nel formato LxA (larghezza x altezza). + Per esempio: 1024x768. + Il ridimensionamento non viene eseguito per output=surface. +. +:CONFIG_OUTPUT +Sistema video da usare per l'output. +. +:CONFIG_TEXTURE_RENDERER +Scegli un driver di rendering da utilizzare nella modalitĂ  di rendering +texture. Usa texture_renderer=auto per una scelta automatica. +. +:CONFIG_CAPTURE_MOUSE +Metodo di controllo del mouse: + onclick: Il mouse viene catturato dopo il primo + clic all'interno della finestra. + onstart: Il mouse viene catturato immediatamente all'avvio + (simile al vero DOS). + seamless: Il mouse può muoversi senza problemi dentro e fuori + la finestra di DOSBox e non può essere catturato. + nomouse: Il mouse è disabilitato e nascosto senza alcun + segnale inviato al gioco. +Gestione del clic centrale (secondo parametro): + middlegame: I clic centrali vengono inviati al gioco + (" PRIMARY_MOD_NAME "+F10 rilascia il mouse). + middlerelease: I clic centrali rilasciano il mouse + (non inviati al gioco). Tuttavia, i clic centrali + verranno inviati al gioco in modalitĂ  schermo intero + o quando è impostato il controllo continuo. + " PRIMARY_MOD_NAME "+F10 rilascerĂ  anche il mouse. +Defaults (se non è presente o incorretto): seamless middlerelease +. +:CONFIG_SENSITIVITY +SensibilitĂ  del mouse. Il secondo parametro opzionale specifica la sensibilitĂ  +verticale (es. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Abilita questa impostazione per bypassare le impostazioni di sensibilitĂ  +e accelerazione del mouse del tuo sistema operativo. Funziona in modalitĂ  +schermo intero o quando il mouse viene catturato in modalitĂ  finestra. +. +:CONFIG_WAITONERROR +Aspetta prima di chiudere la console in caso di errore di DOSBox. +. +:CONFIG_PRIORITY +Livelli di prioritĂ  per DOSBox. La seconda voce dopo la virgola è per quando +DOSBox è minimizzato o non in primo piano. 'pause' può essere usato solo per +la seconda voce. +. +:CONFIG_MAPPERFILE +File utilizzato per caricare/salvare le corrispondenze tasto/evento. +Resetmapper funziona solo con i valori predefiniti. +. +:CONFIG_SCREENSAVER +Usa 'allow' (consenti) o 'block' (blocca) per sovrascrivere la variabile +d'ambiente SDL_VIDEO_ALLOW_SCREENSAVER (che di solito blocca gli screensaver +del sistema operativo mentre l'emulatore è in esecuzione). +. +:CONFIG_LANGUAGE +Seleziona un altro file di lingua. +. +:CONFIG_MACHINE +Tipo di macchina che DOSBox sta cercando di emulare. +. +:CONFIG_CAPTURES +Cartella in cui vengono salvati file come suoni WAVE, musica MIDI e screenshot. +. +:CONFIG_MEMSIZE +QuantitĂ  di memoria a disposizione di DOSBox, in megabytes. +Si consiglia di non modificare questo valore per evitare problemi con alcuni +giochi, anche se potrebbe essere necessario aumentarlo per farne funzionare +alcuni. Di solito non vi è nessun guadagno in velocitĂ  alzando questo valore. +. +:CONFIG_STARTUP_VERBOSITY +Determina il livello di verbositĂ  prima di visualizzare il programma: +VerbositĂ  |Schermata iniziale|Schermata di benvenuto|Output DOSBox +high | sĂŹ | sĂŹ | sĂŹ +medium | no | sĂŹ | sĂŹ +low | no | no | sĂŹ +quiet | no | no | no +splash_only | sĂŹ | no | no +auto | 'low' se exec o dir vengono passati, altrimenti 'high' +. +:CONFIG_FRAMESKIP +Determina il numero di fotogrammi saltati da DOSBox prima di disegnarne uno. +. +:CONFIG_ASPECT +Ridimensiona la risoluzione verticale dello schermo per produrre un rapporto +di aspetto 4:3, corrispondente a quello dei monitor a definizione standard +originali, per i quali sono stati progettati la maggior parte dei giochi DOS. +Questa impostazione ha effetto solo sulle modalitĂ  video che utilizzano pixel +non quadrati, come 320x200 o 640x400; Le modalitĂ  video a pixel quadrato, +come 640x480 e 800x600, verranno visualizzate cosĂŹ come sono. +. +:CONFIG_MONOCHROME_PALETTE +Seleziona la tavolozza predefinita per la visualizzazione monocromatica. +Funziona solo quando si emula hercules o cga_mono. +Puoi anche scorrere i colori disponibili usando il tasto F11. +. +:CONFIG_SCALER +Scaler usato per ingrandire/migliorare le modalitĂ  a bassa risoluzione. +Se viene aggiunto 'forced', lo scaler sarĂ  usato anche se i risultati +potrebbero essere indesiderati. +Nota che alcuni scaler possono utilizzare bordi neri per adattare l'immagine +alla risoluzione dello schermo configurata. Se questo non è l'effetto +desiderato, prova uno scaler diverso o attiva la modalitĂ  a schermo intero. +. +:CONFIG_GLSHADER +Imposta 'none' (nessuno) o il nome di uno shader GLSL. Funziona solo con +l'output OpenGL. Può essere un percorso assoluto, un file nella sottocartella +'glshaders' della cartella di configurazione di DOSBox, o uno degli shader +incorporati: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (predefinito). +. +:CONFIG_CORE +Core CPU usato nell'emulazione. 'auto' diventerĂ  'dynamic' quando possibile e +appropriato. + +. +:CONFIG_CPUTYPE +Tipo di CPU usata nell'emulazione. 'auto' è la scelta piĂš veloce. +. +:CONFIG_CYCLES +QuantitĂ  di istruzioni che DOSBox prova a emulare ogni millisecondo. +Un valore troppo alto produrrĂ  perdite nell'audio e ritardi. +I cicli possono essere impostati in 3 modi: + 'auto' prova a indovinare le necessitĂ  del gioco. + Di solito funziona, ma può fallire con certi giochi. + 'fixed #number' imposta un numero fisso di cicli. Questo è ciò che ti serve + quando 'auto' non funziona. (Esempio: fixed 4000) + 'max' allocherĂ  tanti cicli quanti il tuo computer è in grado di + gestire. +. +:CONFIG_CYCLEUP +QuantitĂ  di cicli di cui aumentare usando gli appositi tasti. (" PRIMARY_MOD_NAME "+F12) +. +:CONFIG_CYCLEDOWN +QuantitĂ  di cicli di cui diminuire usando gli appositi tasti. (" PRIMARY_MOD_NAME "+F11) +Un valore piĂš basso di 100 indica una percentuale. +. +:CONFIG_NOSOUND +Attiva la modalitĂ  silenziosa, ma il suono viene comunque emulato. +. +:CONFIG_RATE +Frequenza del mixer. Impostare la frequenza di qualsiasi dispositivo +ad un valore piĂš alto di questo, ne peggiorerĂ  la qualitĂ  sonora. +. +:CONFIG_BLOCKSIZE +Dimensione blocchi mixer. Blocchi piĂš grandi riducono l'audio a singhiozzo, +ma possono introdurre ritardi. +. +:CONFIG_PREBUFFER +QuantitĂ  di dati, in millisecondi, da tenere in cima alla dimensione dei +blocchi. +. +:CONFIG_MIDIDEVICE +Dispositivo che riceverĂ  i dati MIDI (dall'interfaccia MIDI emulata - MPU-401). +Scegli uno dei seguenti: +'fluidsynth', per usare il sintetizzatore MIDI integrato. Fare riferimento + alla sezione [fluidsynth] per una configurazione dettagliata. +'mt32', per usare il sintetizzatore Roland MT-32 integrato. + Fare riferimento alla sezione [mt32] per una configurazione dettagliata. +'auto', per utilizzare il primo lettore MIDI esterno funzionante. Questo + potrebbe essere un sintetizzatore software o un dispositivo fisico. +. +:CONFIG_MIDICONFIG +Opzioni di configurazione per l'interfaccia MIDI selezionata. +Di solito è l'ID o il nome del sintetizzatore MIDI che desideri utilizzare +(trova l'id/nome con il comando DOS 'mixer /listmidi'). +- Questa opzione non ha effetto quando si utilizzano sintetizzatori intergrati. + (mididevice = fluidsynth o mt32) +- Quando si utilizza ALSA, utilizzare il comando Linux 'aconnect -l' per + elencare le porte MIDI aperte, e selezionarne una. + (ad esempio 'midiconfig=14:0' per il client sequencer 14, porta 0) +- Se stai usando un vero Roland MT-32 con revisione 0 del PCB, l'hardware + potrebbe richiedere un ritardo per evitare che il suo buffer + si sovraccarichi. + In tal caso, aggiungi 'delaysysex', ad esempio: 'midiconfig=2 delaysysex'. +Fare riferimento al README/Manuale per ulteriori dettagli. +. +:CONFIG_MPU401 +Tipo di MPU-401 da emulare. +. +:CONFIG_SOUNDFONT +Percorso del file SoundFont in formato .sf2. Puoi utilizzare un percorso +assoluto o relativo, o il nome di un file .sf2 all'interno della cartella +'soundfonts' situata nella cartella di configurazione di DOSBox. +Una percentuale opzionale ridimensionerĂ  il volume del SoundFont. +Ad esempio: 'soundfont.sf2 50' lo attenuerĂ  del 50 percento. +La percentuale del volume può variare da 1 a 500. +. +:CONFIG_MODEL +Modello di sintetizzatore da utilizzare. L'impostazione predefinita (auto) +preferisce CM-32L, se vengono forniti entrambi i set di ROM. +Per i primi giochi Sierra e Dune 2, si consiglia di utilizzare 'mt32', mentre +i giochi piĂš recenti in genere utilizzano gli effetti sonori extra del CM-32L +(usa 'auto' o 'cm32l') +. +:CONFIG_ROMDIR +Cartella contenente una o entrambe le coppie di ROM MT-32 e/o CM-32L. +I file devono essere denominati in maiuscolo, come segue: + - ROM MT-32 necessarie: MT32_CONTROL.ROM e MT32_PCM.ROM + - ROM CM-32L necessarie: CM32L_CONTROL.ROM e CM32L_PCM.ROM +Il percorso della cartella può essere assoluto o relativo, o lasciato vuoto +per usare la cartella 'mt32-roms' nella cartella di configurazione di DOSBox, +o un'altra directory del sistema. +. +:CONFIG_SBTYPE +Tipo di Sound Blaster da emulare. 'gb' è il Game Blaster. +. +:CONFIG_SBBASE +Indirizzo IO della scheda audio Sound Blaster. +. +:CONFIG_IRQ +Numero IRQ della scheda audio Sound Blaster. +. +:CONFIG_DMA +Canale DMA della scheda audio Sound Blaster. +. +:CONFIG_HDMA +Canale High DMA della scheda audio Sound Blaster. +. +:CONFIG_SBMIXER +Permetti al mixer della scheda Sound Blaster di modificare il mixer di DOSBox. +. +:CONFIG_OPLRATE +oplrate è deprecato. La forma d'onda OPL viene ora campionata +alla frequenza di campionamento del mixer per evitare il ricampionamento. +. +:CONFIG_OPLMODE +Tipo di emulazione OPL. Se 'auto', la modalitĂ  è determinata da 'sbtype'. +Tutte le modalitĂ  OPL sono compatibili con AdLib, eccetto per 'cms'. +. +:CONFIG_OPLEMU +Provider per l'emulazione OPL. 'compat' fornisce una migliore qualitĂ , 'nuked' +è l'impostazione predefinita e piĂš accurata (ma la piĂš intensa per la CPU). +. +:CONFIG_GUS +Abilita l'emulazione della scheda audio Gravis UltraSound. +. +:CONFIG_GUSBASE +Indirizzo base IO della scheda audio Gravis Ultrasound. +. +:CONFIG_GUSIRQ +Numero IRQ della scheda audio Gravis UltraSound. +. +:CONFIG_GUSDMA +Canale DMA della scheda audio Gravis UltraSound. +. +:CONFIG_ULTRADIR +Percorso per la cartella UltraSound. Questa directory dovrebbe contenere una +cartella MIDI con al suo interno i patch file per la riproduzione GUS. +I set di patch utilizzati con Timidity dovrebbero funzionare. +. +:CONFIG_PCSPEAKER +Attiva l'emulazione del PC-Speaker (altoparlante interno del PC). +. +:CONFIG_PCRATE +Frequenza di campionamento della generazione del suono del PC-Speaker. +. +:CONFIG_ZERO_OFFSET +Neutralizza e impedisce che il DC-offset dell'altoparlante del PC danneggi +altre sorgenti. 'auto' lo abilita per i sistemi non Windows e lo disabilita +su Windows. Se il tuo sistema operativo esegue la propria correzione del +DC-offset, impostalo su "false". +. +:CONFIG_TANDY +Attiva l'emulazione di Tandy Sound System. +Se 'auto', l'emulazione è presente solo se la macchina è impostata su 'tandy'. +. +:CONFIG_TANDYRATE +Frequenza di campionamento della generazione del suono a 3-voci Tandy. +. +:CONFIG_DISNEY +Attiva l'emulazione Disney Sound Source. +(Compatibile con Covox Voice Master e Speech Thing) +. +:CONFIG_JOYSTICKTYPE +Tipo di joystick da emulare: auto (predefinito), +none (disattiva l'emulazione joystick), +2axis (supporta due joystick), +4axis (supporta un joystick, viene usato il primo), +4axis_2 (supporta un joystick, viene usato il secondo), +fcs (Thrustmaster), ch (CH Flightstick). +auto sceglie l'emulazione in base ai joystick reali. +(Ricorda di resettare il mapperfile di DOSBox se l'hai salvato in precedenza) +. +:CONFIG_TIMED +Attiva gli intervalli temporizzati per gli assi. +Sperimenta con questa opzione, se il tuo joystick soffre di drifting. +. +:CONFIG_AUTOFIRE +Continua a fare fuoco finchĂŠ tieni il bottone premuto. +. +:CONFIG_SWAP34 +Scambia il 3° e il 4° asse. Può essere utile per alcuni joystick. +. +:CONFIG_BUTTONWRAP +Abilita il wrapping dei pulsanti al numero di pulsanti emulati. +. +:CONFIG_CIRCULARINPUT +Abilita la traduzione dell'input circolare in output quadrato. +Prova ad abilitarlo se la tua levetta analogica sinistra può muoversi solo in +cerchio. +. +:CONFIG_DEADZONE +Percentuale di movimento da ignorare. +100 trasforma la levetta analogica in digitale. +. +:CONFIG_SERIAL1 +Imposta il tipo di dispositivo connesso alla porta com. +Può essere disabled, dummy, modem, nullmodem, directserial. +Eventuali parametri aggiuntivi devono essere sulla stessa riga nella forma di +[parametro:valore]. Un parametro per tutti i tipi è 'irq' (facoltativo). +per directserial: realport (richiesto), rxdelay (facoltativo). + (realport:COM1 realport:ttyS0). +per modem: listenport (facoltativo). +per nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (tutti facoltativi). +Esempio: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +Fare riferimento alla sezione serial1. +. +:CONFIG_SERIAL3 +Fare riferimento alla sezione serial1. +. +:CONFIG_SERIAL4 +Fare riferimento alla sezione serial1. +. +:CONFIG_PHONEBOOKFILE +File utilizzato per mappare numeri di telefono falsi su indirizzi. +. +:CONFIG_XMS +Abilita supporto XMS. +. +:CONFIG_EMS +Abilita supporto EMS. L'impostazione predefinita (=true) fornisce la migliore +compatibilitĂ , ma alcune applicazioni possono funzionare meglio con +altre scelte, o richiedono che il supporto EMS sia disabilitato (=false) +per funzionare. +. +:CONFIG_UMB +Abilita supporto UMB. +. +:CONFIG_VER +Imposta la versione DOS (5.0 per impostazione predefinita). +Specificare come formato major.minor. +Un singolo numero viene considerato come la versione principale. +I parametri riconosciuti sono 3.3, 5.0, 6.22, e 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Codice linguaggio del layout tastiera (o 'none'). +. +:CONFIG_IPX +Abilita l'emulazione di ipx attraverso UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Le righe in questa sezione verranno eseguite ad ogni avvio. +Puoi inserire i tuoi comandi MOUNT qui. + +. +:CONFIGFILE_INTRO +# Questo è il file di configurazione di dosbox-staging (%s). +# Le righe che iniziano con '#' sono commenti e sono ignorati da DOSBox. + +. +:CONFIG_SUGGESTED_VALUES +Valori Possibili +. +:PROGRAM_CONFIG_NOCONFIGFILE +Nessun file di configurazione caricato! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +File di configurazione primario: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +File di configurazione aggiuntivi: + +. +:PROGRAM_CONFIG_CONFDIR +Cartella di configurazione di DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Impossibile aprire il file %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Scrittura del file di configurazione in %s + +. +:PROGRAM_CONFIG_USAGE +Strumento di configurazione: +-writeconf o -wc senza parametro: scrive nel file di config. primario caricato. +-writeconf o -wc [nomefile]: scrive il file nella cartella di configurazione. +Usa -writelang o -wl [nomefile] per scrivere le stringhe della lingua corrente. +-r [parametri] + Riavvia DOSBox, utilizzando le impostazioni precedenti o quelle aggiunte. +-wcp [nomefile] + Scrive il file di config. nella cartella del programma, col nome dosbox.conf + o il nome del file specificato. +-wcd + Scrive nel file di config. predefinito nella cartella di configurazione. +-l elenca i parametri di configurazione. +-h, -help, -? sections / nome sezione / nome proprietĂ  + Senza parametri, visualizza questa guida. Aggiungi "sections" per un elenco di + sezioni. Per info su sezione o proprietĂ , aggiungere il suo nome dopo -help. +-axclear pulisce la sezione autoexec. +-axadd [line] aggiunge una riga alla sezione autoexec. +-axtype stampa il contenuto della sezione autoexec. +-securemode passa alla modalitĂ  sicura. +-avistart avvia la registrazione AVI. +-avistop interrompe la registrazione AVI. +-startmapper avvia il keymapper. +-get "sezione proprietĂ " restituisce il valore della proprietĂ . +-set "sezione proprietĂ  = valore" imposta il valore. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Scopo della proprietĂ  "%s" (contenuto nella sezione "%s"): +%s + +Valori Possibili: %s +Valore predefinito: %s +Valore corrente: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Scopo della sezione "%s": +%s +Valore corrente: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +Questa proprietĂ  non può essere modificata mentre il programma è in esecuzione. + +. +:PROGRAM_CONFIG_HLP_POSINT +Numero intero positivo. +. +:PROGRAM_CONFIG_HLP_SECTHLP +La sezione %s contiene le seguenti proprietĂ : + +. +:PROGRAM_CONFIG_HLP_SECTLIST +La configurazione di DOSBox contiene le seguenti sezioni: + + +. +:PROGRAM_CONFIG_SECURE_ON +ModalitĂ  sicura attivata. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Operazione non consentita in modalitĂ  sicura. + +. +:PROGRAM_CONFIG_SECTION_ERROR +La sezione "%s" non esiste. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" non è un valore valido per la proprietĂ  %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Sezione o proprietĂ  non trovata. + +. +:PROGRAM_CONFIG_NO_PROPERTY +La proprietĂ  "%s" non è presente nella sezione "%s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Sintassi corretta: config -set "sezione proprietĂ  = valore". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Sintassi corretta: config -get "sezione proprietĂ ". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox è stato avviato con i seguenti parametri della riga di comando: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Parametro mancante. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +CDROM trovati: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +UnitĂ  +. +:PROGRAM_MOUNT_STATUS_TYPE +Tipo +. +:PROGRAM_MOUNT_STATUS_LABEL +Etichetta +. +:PROGRAM_MOUNT_STATUS_2 +UnitĂ  %c montata come %s + +. +:PROGRAM_MOUNT_STATUS_1 +Le unitĂ  attualmente montate sono: + +. +:PROGRAM_MOUNT_ERROR_1 +La cartella %s non esiste. + +. +:PROGRAM_MOUNT_ERROR_2 +%s non è una cartella + +. +:PROGRAM_MOUNT_ILL_TYPE +Tipo non valido %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +UnitĂ  %c giĂ  montata con %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +L'unitĂ  %c non è montata. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +L'unitĂ  %c è stata rimossa con successo. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Le unitĂ  virtuali non possono essere smontate. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' non è un identificatore di unitĂ  valido. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montare c:\ È sconsigliato. Si raccomanda di montare una sottocartella. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Montare / È sconsigliato. Si raccomanda di montare una sottocartella. + +. +:PROGRAM_MOUNT_NO_OPTION +Attenzione: opzione '%s' non supportata e ignorata. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +Prima che sia possibile un reindirizzamento, è necessario montare una +directory normale. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +Il reindirizzamento NON è compatibile con l'unitĂ  specificata. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +Il reindirizzamento deve essere specificato utilizzando lo stesso +indirizzamento dell'unitĂ  sottostante. +Nessuna mescolanza di percorsi relativi e assoluti. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +La cartella di reindirizzamento non può essere la stessa dell'unitĂ  sottostante + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Qualcosa è andato storto. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Reindirizzamento %s nell'unitĂ  %c montato. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Impossibile spostare l'unitĂ  Z. L'unitĂ  %c è giĂ  montata. + +. +:PROGRAM_MEM_CONVEN +%10d kB di memoria convenzionale libera + +. +:PROGRAM_MEM_EXTEND +%10d kB di memoria estesa (XMS) libera + +. +:PROGRAM_MEM_EXPAND +%10d kB di memoria espansa (EMS) libera + +. +:PROGRAM_MEM_UPPER +%10d kB di memoria superiore (UMB) libera in %d blocchi +(blocco UMB piĂš grande %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB allocati. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB liberati. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Memoria in uso liberata. + +. +:PROGRAM_LOADFIX_ERROR +Errore allocazione di memoria. + +. +:MSCDEX_SUCCESS +MSCDEX installato. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Fallimento: Le lettere di unitĂ  di CD multipli devono essere contigue. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Fallimento: Non ancora supportato. + +. +:MSCDEX_ERROR_PATH +MSCDEX: Il percorso specificato non è un'unitĂ  CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Fallimento: file non valido o impossibile aprirlo. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Fallimento: troppe unitĂ  CD-ROM (massimo: 5). +Installazione di MSCDEX non riuscita. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Sottocartella montata: supporto limitato. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Fallimento: Il file contiene errori o non è un'immagine iso/cue. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Fallimento: Errore sconosciuto. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Avviso: si ignora l'opzione non supportata '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +La cache dell'unitĂ  è stata cancellata. + +. +:PROGRAM_INTRO +Benvenuto in DOSBox Staging, un emulatore di x86 con suono e grafica. +DOSBox crea una shell simile al vecchio DOS. + +Per informazioni sul montaggio delle unitĂ  digita intro mount +Per informazioni sul supporto CD-ROM digita intro cdrom +Per informazioni sui tasti speciali digita intro special +Per ulteriori informazioni su DOSBox Staging, visita: +https://github.com/dosbox-staging/dosbox-staging/wiki + +In caso di errori, DOSBox si interromperĂ  e terminerĂ  senza preavvisi! + +. +:PROGRAM_INTRO_MOUNT_START +Ecco alcuni comandi utili per iniziare: +Prima di poter usare i file nel tuo filesystem, +Devi montare la directory che contiene i file. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +╔══════════════════════════════════════════════════════════════════════════╗ +║ mount c c:\dosgames\ crea un'unitĂ  C con i contenuti di c:\dosprog. ║ +║ ║ +║ c:\dosgames\ è un esempio. Sostituiscilo con la tua cartella dei giochi. ║ +╚══════════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_OTHER +╔════════════════════════════════════════════════════════════════════════╗ +║ mount c ~/dosgames crea un'unitĂ  C con i contenuti di ~/dosprog. ║ +║ ║ +║ ~/dosgames è un esempio. Sostituiscilo con la tua cartella dei giochi. ║ +╚════════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_END +Dopo aver montato con successo il disco è possibile digitare c: per spostarti +nella tua nuova unitĂ  C. +Una volta qui, digita dir per visualizzarne il contenuto. +cd ti permette di spostarti all'interno di in una cartella +(riconoscibile dalle [] nell'elenco delle cartelle). +Puoi eseguire programmi/file con estensione .exe, .bat e .com. + +. +:PROGRAM_INTRO_CDROM +Come montare un'unitĂ  CD-ROM virtuale in DOSBox: +DOSBox fornisce un'emulazione CD-ROM a vari livelli. + +Funziona su tutte le cartelle normali, viene installato MSCDEX e impostati +tutti i file in sola lettura. Di solito questo va bene per la maggior parte +dei giochi: + +mount D C:\esempio -t cdrom + +Se non funziona, potresti dover dire a DOSBox l'etichetta del CD-ROM: + +mount D C:\esempio -t cdrom -label ETICHETTA + +Inoltre, puoi usare imgmount per montare immagini iso o cue/bin: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Tasti speciali: +Questi sono i tasti predefiniti. +Possono essere modificati nel keymapper. + +" MMOD2_NAME "Enter Passa dalla modalitĂ  a schermo intero a quella a finestra + e viceversa. +" MMOD2_NAME "Pause Mette in pausa/riavvia l'emulatore. +" PRIMARY_MOD_NAME "+F1 " PRIMARY_MOD_PAD " Avvia il keymapper. +" PRIMARY_MOD_NAME "+F4 " PRIMARY_MOD_PAD " Passa tra le immagini disco montate, aggiorna la cache della + cartella per tutte le unitĂ . +" PRIMARY_MOD_NAME "+F5 " PRIMARY_MOD_PAD " Scatta un'istantanea dello schermo (screenshot). +" PRIMARY_MOD_NAME "+F6 " PRIMARY_MOD_PAD " Avvia/ferma la registrazione dell'output audio su un file wave. +" PRIMARY_MOD_NAME "+F7 " PRIMARY_MOD_PAD " Avvia/ferma la registrazione dell'output video su un file zmbv. +" PRIMARY_MOD_NAME "+F9 " PRIMARY_MOD_PAD " Chiudi emulatore. +" PRIMARY_MOD_NAME "+F10 " PRIMARY_MOD_PAD " Cattura/Rilascia il mouse. +" PRIMARY_MOD_NAME "+F11 " PRIMARY_MOD_PAD " Rallenta l'emulazione (Decrementa i Cicli DOSBox). +" PRIMARY_MOD_NAME "+F12 " PRIMARY_MOD_PAD " Accelera l'emulazione (Incrementa i Cicli DOSBox). +" MMOD2_NAME "F12 Sblocca la velocitĂ  (pulsante turbo/avanzamento rapido). + +. +:PROGRAM_BOOT_NOT_EXIST +Il file bootdisk non esiste. Fallimento. + +. +:PROGRAM_BOOT_NOT_OPEN +Impossibile aprire il file bootdisk. Fallimento. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Il file immagine è di sola lettura! Potrebbe creare dei problemi. + +. +:PROGRAM_BOOT_PRINT_ERROR +Questo comando avvia DOSBox da un'immagine floppy o disco rigido. + +Per questo comando, si può specificare una successione di floppy disk +selezionabili premendo " PRIMARY_MOD_NAME "+F4, e -l specifica l'unitĂ  montata da cui eseguire +l'avvio. Se non viene specificata alcuna lettera di unitĂ , l'impostazione +predefinita prevede l'avvio dall'unitĂ  A. +Le uniche lettere di unitĂ  avviabili sono A, C, e D. Per l'avvio da un disco +rigido (C or D), l'immagine dovrebbe essere giĂ  stata montata utilizzando il +comando IMGMOUNT. + +La sintassi di questo comando è: + +BOOT [imgdisco1.img imgdisco2.img] [-l letteraUnitĂ ] + +. +:PROGRAM_BOOT_UNABLE +Impossibile avviare dall'unitĂ  %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Apertura file immagine: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Impossibile aprire %s +. +:PROGRAM_BOOT_BOOT +Avvio dall'unitĂ  %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Trovata cartuccia PCjr, ma la macchina non è PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Comandi della cartuccia PCjr disponibili: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +Nessun comando della cartuccia PCjr trovato. +. +:PROGRAM_LOADROM_SPECIFY_FILE +È necessario specificare il file ROM da caricare. + +. +:PROGRAM_LOADROM_CANT_OPEN +File ROM inaccessibile. + +. +:PROGRAM_LOADROM_TOO_LARGE +File ROM troppo grande. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +BIOS video non supportato dal tipo di macchina. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +File ROM non riconosciuto. + +. +:PROGRAM_LOADROM_BASIC_LOADED +ROM BASIC caricata. + +. +:SHELL_CMD_IMGMOUNT_HELP +Monta un'immagine CD-ROM, floppy o disco su una lettera di unitĂ . + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Monta un'immagine CD-ROM, floppy o disco su una lettera di unitĂ . + +Utilizzo: + imgmount UNITÀ CDROM-SET [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso + imgmount UNITÀ FILEIMMAGINE [FILEIMMAGINE2 [..]] [-fs fat] -t hdd|floppy + imgmount UNITÀ AVVIABILE [-fs fat|none] -t hdd -size GEOMETRIA + imgmount -u UNITÀ (smonta le immagini) + +Dove: + UNITÀ è la lettera dell'unitĂ  in cui verrĂ  montata l'immagine: es. D + CDROM-SET è un file ISO, CUE+BIN, CUE+ISO, o CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + FILEIMMAGINE è un'immagine disco rigido o floppy in formato FAT16 o FAT12 + AVVIABILE è un'immagine disco avviabile con GEOMETRIA -size specificata: + bytes-per-sector,sectors-per-head,heads,cylinders +Note: + - " PRIMARY_MOD_NAME "+F4 scambia e monta il CDROM-SET o FILEIMMAGINE successivo se fornito. + +Esempi: + imgmount D /home/USERNAME/giochi/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A floppy1.img floppy2.img floppy3.img -t floppy + imgmount C ~/dos/disco_c.img -t hdd + imgmount C disco_avviabile.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +Monta una cartella del sistema operativo host su una lettera di unitĂ . + +. +:SHELL_CMD_MOUNT_HELP_LONG +Monta una cartella del sistema operativo host su una lettera di unitĂ . + +Utilizzo: + mount UNITÀ CARTELLA [-t TIPO] [-freesize DIMENSIONE] [-label ETICHETTA] + mount -u UNITÀ (smonta le unitĂ ) + +Dove: + UNITÀ è la lettera dell' unitĂ  in cui verrĂ  montata la cartella: es. C + CARTELLA è la cartella sul sistema operativo host da montare + TIPO tipo di directory da montare: 'dir', 'floppy', 'cdrom' o 'overlay' + DIMENSIONE spazio libero per l'unitĂ  virtuale (KiB per floppy altrimenti MiB) + ETICHETTA nome etichetta dell'unitĂ  da utilizzare + +Note: + - '-t overlay' reindirizza le scritture per l'unitĂ  montata in un'altra + cartella. + - Ulteriori opzioni sono descritte nel manuale (file README, capitolo 4). + +Esempi: + mount C ~/giochidos + mount D "/media/USERNAME/Gioco CD" -t cdrom + mount C file_di_salvataggio -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +È necessario specificare la lettera dell'unitĂ  su cui montare l'immagine. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +È necessario specificare il numero di unitĂ  (0 o 3) su cui montare l'immagine +(0,1 = fda,fdb; 2,3 = hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Per le immagini CD-ROM: IMGMOUNT lettera-unitĂ  posizione-immagine -t iso + +Per le immagini disco rigido: È necessario specificare la geometria dell'unitĂ : +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT lettera-unitĂ  posizione-immagine -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Impossibile caricare il file immagine. +Verifica che il percorso sia corretto e che l'immagine sia accessibile. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Impossibile estrarre la geometria dell'unitĂ  dall'immagine. +Utilizzare il parametro -size bps,spc,hpc,cyl per specificare la geometria. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Il tipo '%s' non è supportato. Specifica 'floppy', 'hdd', 'cdrom', o 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Il Formato "%s" non è supportato. Specifica "fat", "iso" o "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Devi specificare il file immagine da montare. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +File immagine non trovato. + +. +:PROGRAM_IMGMOUNT_MOUNT +Per montare le cartelle, usa il comando MOUNT, non il comando IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +UnitĂ  giĂ  montata con quella lettera. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Impossibile creare l'unitĂ  dal file. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +UnitĂ  numero %d montata come %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +L'immagine deve trovarsi su un'unitĂ  host o locale. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +L'uso di file multipli è supportato solo per le immagini cue/iso. + +. +:PROGRAM_KEYB_INFO +Tabella codici %i caricata + +. +:PROGRAM_KEYB_INFO_LAYOUT +Tabella codici %i caricata per il layout %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [ID layout tastiera[ numero tabella codici[ file tabella codici]]] + +Alcuni esempi: + KEYB: Visualizza la tabella codici attualmente caricata. + KEYB sp: Carica il layout spagnolo (SP) usando una tabella codici appropriata. + KEYB sp 850: Carica il layout spagnolo (SP) usando la tabella codici 850. + KEYB sp 850 mycp.cpi: Come sopra, ma usa il file mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Layout tastiera %s caricato con tabella codici %i + +. +:PROGRAM_KEYB_FILENOTFOUND +File di tastiera %s non trovato. + + +. +:PROGRAM_KEYB_INVALIDFILE +File di tastiera %s non valido. + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Impossibile trovare il layout %s per la tabella codici %i. + +. +:PROGRAM_KEYB_INVCPFILE +File tabella codici mancante o non valido per il layout %s. + + +. +:SHELL_ILLEGAL_PATH +Percorso non valido. + +. +:SHELL_CMD_HELP +Per una lista di tutti i comandi supportati digita help /all . +Segue una breve lista dei comandi piĂš comuni: + +. +:SHELL_CMD_ECHO_ON +ECHO attivato. + +. +:SHELL_CMD_ECHO_OFF +ECHO disattivato. + +. +:SHELL_ILLEGAL_SWITCH +Opzione non valida: %s. + +. +:SHELL_MISSING_PARAMETER +Parametro richiesto mancante. + +. +:SHELL_CMD_CHDIR_ERROR +Impossibile spostarsi su: %s. + +. +:SHELL_CMD_CHDIR_HINT +Suggerimento: Per spostarsi su un'altra unitĂ , digita %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +il nome della cartella è piĂš lungo di 8 caratteri e/o contiene spazi. +Prova cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Sei ancora nell'unitĂ  Z:, passa ad un'unitĂ  montata con C:. + +. +:SHELL_CMD_DATE_HELP +Visualizza o imposta la data. + +. +:SHELL_CMD_DATE_ERROR +La data specificata non è corretta. + +. +:SHELL_CMD_DATE_DAYS +3DomLunMarMerGioVenSab +. +:SHELL_CMD_DATE_NOW +Data corrente: +. +:SHELL_CMD_DATE_SETHLP +Digita 'date MM-GG-AAAA' per cambiare. + +. +:SHELL_CMD_DATE_FORMAT +M/G/A +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-GG-AAAA] + MM-GG-AAAA: nuova data da impostare + /S: Usa permanentemente l'ora e la data dell'host come ora del DOS + /F: Torna all'ora interna di DOSBox (contrario di /S) + /T: Visualizza solo la data + /H: Sincronizza con l'host + +. +:SHELL_CMD_TIME_HELP +Visualizza o imposta l'ora di sistema. + +. +:SHELL_CMD_TIME_NOW +Ora attuale: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Visualizza solo l'ora + /H: Sincronizza con l'host + +. +:SHELL_CMD_MKDIR_ERROR +Impossibile creare: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Impossibile rimuovere: %s. + +. +:SHELL_CMD_DEL_ERROR +Impossibile eliminare: %s. + +. +:SHELL_SYNTAXERROR +La sintassi del comando non è corretta. + +. +:SHELL_CMD_SET_NOT_SET +Variabile di ambiente %s non definita. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Spazio di ambiente insufficiente. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Manca il nome del file. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Manca il numero. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Numero non valido. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Non è stata fornita una etichetta al comando GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Impossibile trovare l'etichetta %s. + +. +:SHELL_CMD_FILE_NOT_FOUND +File %s non trovato. + +. +:SHELL_CMD_FILE_EXISTS +File %s giĂ  esistente. + +. +:SHELL_CMD_DIR_VOLUME + Il volume nell'unitĂ  %c è %s + +. +:SHELL_CMD_DIR_INTRO + Directory di %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d File %21s byte + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d Directory %21s byte disponibili + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +UnitĂ  %c inesistente! +Prima devi montarla mount. Digita intro o intro mount per altre informazioni. + +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Comando non valido: %s. + +. +:SHELL_CMD_PAUSE +Premere un tasto per continuare... +. +:SHELL_CMD_PAUSE_HELP +Aspetta la pressione di un tasto per continuare. + +. +:SHELL_CMD_COPY_FAILURE +Errore durante la copia : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d File copiato/i. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Impossibile rimuovere, unitĂ  non in uso. + +. +:SHELL_CMD_SUBST_FAILURE +SUBST fallito. Hai commesso un errore nella riga di comando o l'unitĂ  di +destinazione è giĂ  in uso. È possibile utilizzare SUBST solo su unitĂ  locali. +. +:SHELL_STARTUP_BEGIN +╔══════════════════════════════════════════════════════════════════════╗ +║ Benvenuto in DOSBox Staging %-40s ║ +║ ║ +║ Per una breve introduzione per i nuovi utenti, digita: INTRO ║ +║ Per la lista dei comandi della shell supportati, digita: HELP ║ +║ ║ +║ Per regolare la velocitĂ  della CPU emulata, usa " PRIMARY_MOD_NAME "+F11 e " PRIMARY_MOD_NAME "+F12." PRIMARY_MOD_PAD PRIMARY_MOD_PAD " ║ +║ Per attivare il keymapper, usa " PRIMARY_MOD_NAME "+F1." PRIMARY_MOD_PAD " ║ +║ Ulteriori informazioni nel file README nella cartella di DOSBox. ║ +║ ║ + +. +:SHELL_STARTUP_CGA +║ DOSBox supporta la modalitĂ  CGA Composita. ║ +║ Usa F12 per impostare l'uscita composita su ON, OFF o AUTO ║ +║ (impostazione predefinita). ║ +║ " MMOD2_NAME "+F11 cambia tonalitĂ ; " MMOD1_NAME "+" MMOD2_NAME "+F11 seleziona il modello CGA." PRIMARY_MOD_PAD " ║ +║ ║ + +. +:SHELL_STARTUP_CGA_MONO +║ Usa F11 per scorrere le modalitĂ  verde, ambra, bianco e bianco-carta,║ +║ e " MMOD2_NAME "F11 per modificare le impostazioni di contrasto/luminositĂ . ║ + +. +:SHELL_STARTUP_HERC +║ Usa F11 per scorrere i colori monocromatici bianco, ambra e verde. ║ +║ ║ + +. +:SHELL_STARTUP_DEBUG +║ Premi " MMOD2_NAME "Pause per avviare il debugger o avvia l'exe con DEBUG. ║ +║ ║ + +. +:SHELL_STARTUP_END +║ https://dosbox-staging.github.io ║ +╚══════════════════════════════════════════════════════════════════════╝ + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Visualizza/cambia la directory corrente. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [unitĂ :][percorso] +CHDIR [..] +CD [unitĂ :][percorso] +CD [..] + + .. Indica che si desidera passare alla directory padre. + +Scrivi CD [unitĂ :] per mostrare la directory corrente nell'unitĂ  specificata. +Scrivi CD senza parametri per visualizzare l'unitĂ  e la directory correnti. + +. +:SHELL_CMD_CLS_HELP +Cancella lo schermo. + +. +:SHELL_CMD_DIR_HELP +Visualizza un elenco di file e sottodirectory in una directory. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [unitĂ :][percorso][nomefile] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [unitĂ :][percorso][nomefile] + Specifica unitĂ , directory e/o file da elencare. + /W Visualizza in formato ampio. + /B Utilizza un formato semplice (no intestazione o riepilogo). + /P Mostra elenco una schermata per volta. + /AD Visualizza tutte le directory. + /A-D Visualizza tutti i file. + /O Elenca file ordinandoli. + - Prefisso per invertire l'ordinamento + ordinamento N Per nome, alfabetico S Per dimensione, dal minore + E Per estensione, alfabetico D Per data e ora dal piĂš vecchio + +. +:SHELL_CMD_ECHO_HELP +Visualizza messaggi e attiva/disattiva la ripetizione dei comandi. + +. +:SHELL_CMD_EXIT_HELP +Esci dalla shell. + +. +:SHELL_CMD_HELP_HELP +Visualizza la guida. + +. +:SHELL_CMD_MKDIR_HELP +Crea una cartella. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [unitĂ :][percorso] +MD [unitĂ :][percorso] + +. +:SHELL_CMD_RMDIR_HELP +Rimuove una cartella. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [unitĂ :][percorso] +RD [unitĂ :][percorso] + +. +:SHELL_CMD_SET_HELP +Visualizza, imposta o rimuove le variabili d'ambiente. + +. +:SHELL_CMD_IF_HELP +Esegue un'elaborazione condizionale in programmi batch. + +. +:SHELL_CMD_GOTO_HELP +Salta a una riga etichettata in uno script batch. + +. +:SHELL_CMD_SHIFT_HELP +Cambia la posizione dei parametri sostituibili in un file batch. + +. +:SHELL_CMD_TYPE_HELP +Visualizza il contenuto di uno o piĂš file di testo. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [unitĂ :][percorso]nomefile + +. +:SHELL_CMD_REM_HELP +Registra dei commenti (note) in un file batch. + +. +:SHELL_CMD_REM_HELP_LONG +REM [commento] + +. +:SHELL_CMD_NO_WILD +Questa è una versione semplificata del comando, non puoi usare asterischi! + +. +:SHELL_CMD_RENAME_HELP +Rinomina uno o piĂš file. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [unitĂ :][percorso]nomefile1 nomefile2. +REN [unitĂ :][percorso]nomefile1 nomefile2. + +Non puoi specificare una nuova unitĂ  o percorso per il file di destinazione. + +. +:SHELL_CMD_DELETE_HELP +Elimina uno o piĂš file. + +. +:SHELL_CMD_COPY_HELP +Copia uno o piĂš file in un'altra posizione. + +. +:SHELL_CMD_CALL_HELP +Richiama un programma batch da un altro programma batch. + +. +:SHELL_CMD_SUBST_HELP +Associa un percorso ad una lettera di unitĂ . + +. +:SHELL_CMD_LOADHIGH_HELP +Carica un programma in memoria superiore (xms=true, umb=true). + +. +:SHELL_CMD_LS_HELP +Elenca il contenuto della cartella. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [MODELLO] + +. +:SHELL_CMD_LS_PATH_ERR +ls: impossibile accedere a '%s': Percorso o file non trovato. + +. +:SHELL_CMD_CHOICE_HELP +Attende la pressione di un tasto e imposta ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:scelte] [/N] [/S] testo + /C[:]scelte - Specifica le scelte consentite. L'elenco predefinito è: YN. + /N - Nasconde l'elenco delle scelte nel prompt. + /S - Abilita le scelte con distinzione tra maiuscole e minuscole + text - Specifica il messaggio da visualizzare prima del prompt. + +. +:SHELL_CMD_ATTRIB_HELP +Non fa nulla. Fornito per compatibilitĂ . + +. +:SHELL_CMD_PATH_HELP +Fornito per compatibilitĂ . + +. +:SHELL_CMD_VER_HELP +Visualizza o imposta la versione DOS. + +. +:SHELL_CMD_VER_HELP_LONG +Utilizzo: + ver + ver set VERSIONE + +Dove: + VERSIONE può essere un numero intero, ad esempio 5, o includere un valore + decimale a due cifre, ad esempio: 6.22, 7.01, o 7.10. + In alternativa, il valore decimale può essere separato da spazi, + ad esempio: 6 22, 7 01, o 7 10. +Note: + La versione DOS può anche essere impostata nel file di configurazione nella + sezione [dos] usando l'impostazione "ver = VERSIONE". + +Esempi: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging versione %s +DOS versione %d.%02d + +. +:SHELL_CMD_VER_INVALID +La versione DOS specificata non è corretta. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/utf-8/pl/pl-0.77.0-alpha.txt dosbox-staging-0.77.0/contrib/translations/utf-8/pl/pl-0.77.0-alpha.txt --- dosbox-staging-0.76.0/contrib/translations/utf-8/pl/pl-0.77.0-alpha.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/utf-8/pl/pl-0.77.0-alpha.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1424 @@ +:CONFIG_FULLSCREEN +Włącz DOSBoxa na pełnym ekranie. +Wciśnij " MMOD2_NAME "Enter aby przełączyć się do okna. +. +:CONFIG_DISPLAY +Numer ekranu do uĹźycia; wartość zaleĹźy od ustawień uĹźytkownika. +. +:CONFIG_VSYNC +Vertical sync setting not implemented (setting ignored) +. +:CONFIG_FULLRESOLUTION +Jakiej rozdzielczości uĹźyć w pełnym ekranie: 'original', 'desktop', +lub dokładna rozdzielczość (np. 1024x768). +. +:CONFIG_WINDOWRESOLUTION +Ustaw wielkość okna w trybie okienkowym: + default: Wybierz najlepszą opcję dla twojego + środowiska. + original: Zmień wielkość okna do rozdzielczości wybranej przez + emulowany program. + resizable: Ustaw okno o zmiennej wielkości. + To jest eksperymentalna opcja, działa tylko z + output=opengl i glshader=sharp (lub none) + : Skaluj zawartość okna do wybranej wielkości, uĹźyj + wielkości w formacie XxY, na przykład: 1024x768. + Skalowanie nie działa dla output=surface. +. +:CONFIG_OUTPUT +What video system to use for output. +. +:CONFIG_TEXTURE_RENDERER +Choose a renderer driver when using a texture output mode. +Use texture_renderer=auto for an automatic choice. +. +:CONFIG_CAPTURE_MOUSE +Wybierz tryb zachowanie myszy: + onclick: Kursor myszy zostanie złapany przy pierwszym kliknięciu + w obszarze okna. + onstart: Kursor myszy zostanie złapany na starcie + (jak w prawdziwym DOS). + seamless: Kursor moĹźe swobodnie opuścić okno DOSBoxa + i nie będzie złapany. + nomouse: Emulacja myszy jest wyłączona. +Wybierz jaką rolę pełni środkowy przycisk myszy (drugi parametr): + middlegame: Kliknięcie środkowym przyciskiem jest wysłane do gry + (" PRIMARY_MOD_NAME "+F10 puszcza mysz). + middlerelease: Kliknięcie środkowym przyciskiem puszcza mysz + (zdarzenie nie będzie wysłane do gry). + W pełnym ekranie lub w trybie 'seamless' kliknięcie + zostanie wysłane do gry. + " PRIMARY_MOD_NAME "+F10 rĂłwnieĹź puszcza mysz. +Domyślne ustawienie to: seamless middlerelease +. +:CONFIG_SENSITIVITY +Mouse sensitivity. The optional second parameter specifies vertical sensitivity (e.g. 100,-50). +. +:CONFIG_RAW_MOUSE_INPUT +Enable this setting to bypass your operating system's mouse +acceleration and sensitivity settings. This works in +fullscreen or when the mouse is captured in window mode. +. +:CONFIG_WAITONERROR +Zatrzymuje przed zamknięciem konsoli, jeśli dosbox zgłosił błąd. +. +:CONFIG_PRIORITY +Priorytety dla DOSBoxa. Druga wartość po przecinku dotyczy okna DOSBoxa, ktĂłre jest +nieaktywne/zminimalizowane. Wartości 'pause' moĹźna uĹźywać tylko na drugiej pozycji. +. +:CONFIG_MAPPERFILE +Plik uĹźywany do wczytywania/zapisywania skrĂłtĂłw klawiszowych. +. +:CONFIG_SCREENSAVER +Use 'allow' or 'block' to override the SDL_VIDEO_ALLOW_SCREENSAVER +environment variable (which usually blocks the OS screensaver +while the emulator is running). +. +:CONFIG_LANGUAGE +Wybiera inny plik językowy. +. +:CONFIG_MACHINE +Typ maszyny, ktĂłry DOSBox prĂłbuje naśladować. +. +:CONFIG_CAPTURES +Katalog, w ktĂłrym są przechowywane przechwycone pliki wave, midi oraz zrzuty ekranu. +. +:CONFIG_MEMSIZE +Rozmiar pamięci DOSBoxa w megabajtach. +Tej wartości lepiej nie zmieniać aby uniknąć problemĂłw z niektĂłrymi grami, +choć czasem gry mogą wymagać większej wartości. +Generalnie podniesienie tej wartości nie powoduje przyśpieszenia. +. +:CONFIG_STARTUP_VERBOSITY +Controls verbosity prior to displaying the program: + | Splash | Welcome | Early stdout +high | yes | yes | yes +medium | no | yes | yes +low | no | no | yes +quiet | no | no | no +splash_only | yes | no | no +auto | 'low' if exec or dir is passed, otherwise 'high' +. +:CONFIG_FRAMESKIP +Jak wiele klatek DOSBox pomija zanim jakąś narysuje. +. +:CONFIG_ASPECT +Scales the vertical resolution to produce a 4:3 display aspect +ratio, matching that of the original standard-definition monitors +for which the majority of DOS games were designed. This setting +only affects video modes that use non-square pixels, such as +320x200 or 640x400; where as square-pixel modes, such as 640x480 +and 800x600, will be displayed as-is. +. +:CONFIG_MONOCHROME_PALETTE +Select default palette for monochrome display. +Works only when emulating hercules or cga_mono. +You can also cycle through available colours using F11. +. +:CONFIG_SCALER +Scaler used to enlarge/enhance low resolution modes. +If 'forced' is appended, then the scaler will be used even if +the result might not be desired. +Note that some scalers may use black borders to fit the image +within your configured display resolution. If this is +undesirable, try either a different scaler or enabling +fullresolution output. +. +:CONFIG_GLSHADER +Either 'none' or a GLSL shader name. Works only with +OpenGL output. Can be either an absolute path, a file +in the 'glshaders' subdirectory of the DOSBox +configuration directory, or one of the built-in shaders: +advinterp2x, advinterp3x, advmame2x, advmame3x, +crt-easymode-flat, crt-fakelottes-flat, rgb2x, rgb3x, +scan2x, scan3x, tv2x, tv3x, sharp (default). +. +:CONFIG_CORE +CPU Core used in emulation. auto will switch to dynamic if available and +appropriate. +. +:CONFIG_CPUTYPE +CPU Type used in emulation. auto is the fastest choice. +. +:CONFIG_CYCLES +Amount of instructions DOSBox tries to emulate each millisecond. +Setting this value too high results in sound dropouts and lags. +Cycles can be set in 3 ways: + 'auto' tries to guess what a game needs. + It usually works, but can fail for certain games. + 'fixed #number' will set a fixed amount of cycles. This is what you usually + need if 'auto' fails (Example: fixed 4000). + 'max' will allocate as much cycles as your computer is able to + handle. +. +:CONFIG_CYCLEUP +Liczba cykli o ktĂłrą wartość zwiększa/zmniejsza kombinacja klawiszy. (" PRIMARY_MOD_NAME "+F11/" PRIMARY_MOD_NAME "+F12) +. +:CONFIG_CYCLEDOWN +Wartość mniejsza niĹź 100 jest traktowana jako ustawienie zmiany procentowej. +. +:CONFIG_NOSOUND +Włącz tryb cichy (dĹşwięk nadal jest emulowany). +. +:CONFIG_RATE +Częstotliwość prĂłbkowania miksera, ustawienie częstotliwości urządzenia ponad tę wartość prawdopodobnie obniĹźy jakość dĹşwięku. +. +:CONFIG_BLOCKSIZE +Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged. +. +:CONFIG_PREBUFFER +How many milliseconds of data to keep on top of the blocksize. +. +:CONFIG_MIDIDEVICE +Device that will receive the MIDI data (from the emulated MIDI +interface - MPU-401). Choose one of the following: +'fluidsynth', to use the built-in MIDI synthesizer. See the + [fluidsynth] section for detailed configuration. +'mt32', to use the built-in Roland MT-32 synthesizer. + See the [mt32] section for detailed configuration. +'auto', to use the first working external MIDI player. This + might be a software synthesizer or physical device. +. +:CONFIG_MIDICONFIG +Configuration options for the selected MIDI interface. +This is usually the id or name of the MIDI synthesizer you want +to use (find the id/name with DOS command 'mixer /listmidi'). +- This option has no effect when using the built-in synthesizers + (mididevice = fluidsynth or mt32). +- When using ALSA, use Linux command 'aconnect -l' to list open + MIDI ports, and select one (for example 'midiconfig=14:0' + for sequencer client 14, port 0). +- If you're using a physical Roland MT-32 with revision 0 PCB, + the hardware may require a delay in order to prevent its + buffer from overflowing. In that case, add 'delaysysex', + for example: 'midiconfig=2 delaysysex'. +See the README/Manual for more details. +. +:CONFIG_MPU401 +Typ emulowanego MPU-401. +. +:CONFIG_SOUNDFONT +Path to a SoundFont file in .sf2 format. You can use an +absolute or relative path, or the name of an .sf2 inside +the 'soundfonts' directory within your DOSBox configuration +directory. +An optional percentage will scale the SoundFont's volume. +For example: 'soundfont.sf2 50' will attenuate it by 50 percent. +The scaling percentage can range from 1 to 500. +. +:CONFIG_MODEL +Model of synthesizer to use. The default (auto) prefers CM-32L +if both sets of ROMs are provided. For early Sierra games and Dune 2 +it's recommended to use 'mt32', while newer games typically made +use of the CM-32L's extra sound effects (use 'auto' or 'cm32l') +. +:CONFIG_ROMDIR +The directory containing one or both pairs of MT-32 and/or CM-32L ROMs. +The files must be named in capitals, as follows: + - MT-32 ROM pair: MT32_CONTROL.ROM and MT32_PCM.ROM + - CM-32L ROM pair: CM32L_CONTROL.ROM and CM32L_PCM.ROM +The directory can be absolute or relative, or leave it blank to +use the 'mt32-roms' directory in your DOSBox configuration +directory, followed by checking other common system locations. +. +:CONFIG_SBTYPE +Typ emulowanego Sound Blastera 'gb' to Game Blaster. +. +:CONFIG_SBBASE +Adres We/Wy (I/O) Sound Blastera. +. +:CONFIG_IRQ +Numer IRQ Sound Blastera. +. +:CONFIG_DMA +Numer DMA Sound Blastera. +. +:CONFIG_HDMA +Numer HDMA Sound Blastera. +. +:CONFIG_SBMIXER +Allow the Sound Blaster mixer to modify the DOSBox mixer. +. +:CONFIG_OPLRATE +oplrate is deprecated. The OPL waveform is now sampled + at the mixer's playback rate to avoid resampling. +. +:CONFIG_OPLMODE +Type of OPL emulation. On 'auto' the mode is determined by 'sbtype'. +All OPL modes are AdLib-compatible, except for 'cms'. +. +:CONFIG_OPLEMU +Provider for the OPL emulation. 'compat' provides better quality, +'nuked' is the default and most accurate (but the most CPU-intensive). +. +:CONFIG_GUS +Włącz emulację karty Gravis UltraSound. +. +:CONFIG_GUSBASE +Bazowe adres We/Wy karty Gravis UltraSound. +. +:CONFIG_GUSIRQ +Numer IRQ karty Gravis UltraSound. +. +:CONFIG_GUSDMA +Kanał DMA karty Gravis UltraSound. +. +:CONFIG_ULTRADIR +ŚcieĹźka do katalogu UltraSound. W tym katalogu +powinien znajdować się katalog MIDI, zawierający +patche dla emulacji MIDI przez GUS. Zestawy patchy +uĹźywane z Timidity powinny działać dobrze. +. +:CONFIG_PCSPEAKER +Włącz emulację PC-Speakera. +. +:CONFIG_PCRATE +Częstotliwość prĂłbkowania dĹşwięku generowanego przez PC-Speakera. +. +:CONFIG_ZERO_OFFSET +Neutralizes and prevents the PC speaker's DC-offset from harming other sources. +'auto' enables this for non-Windows systems and disables it on Windows. +If your OS performs its own DC-offset correction, then set this to 'false'. +. +:CONFIG_TANDY +Włącz emulację Tandy Sound System. Przy 'auto' emulacja odbywa się tylko jeśli maszyna jest ustawiona na 'tandy'.. +. +:CONFIG_TANDYRATE +Częstotliwość prĂłbkowania Tandy 3-Voice. +. +:CONFIG_DISNEY +Włącza emulację Disney Sound Source. (kompatybilne z Covox Voice Master oraz Covox Speech Thing). +. +:CONFIG_JOYSTICKTYPE +Type of joystick to emulate: auto (default), +none (disables joystick emulation), +2axis (supports two joysticks), +4axis (supports one joystick, first joystick used), +4axis_2 (supports one joystick, second joystick used), +fcs (Thrustmaster), ch (CH Flightstick). +auto chooses emulation depending on real joystick(s). +(Remember to reset DOSBox's mapperfile if you saved it earlier) +. +:CONFIG_TIMED +enable timed intervals for axis. Experiment with this option, if your joystick drifts (away). +. +:CONFIG_AUTOFIRE +continuously fires as long as you keep the button pressed. +. +:CONFIG_SWAP34 +swap the 3rd and the 4th axis. Can be useful for certain joysticks. +. +:CONFIG_BUTTONWRAP +enable button wrapping at the number of emulated buttons. +. +:CONFIG_CIRCULARINPUT +enable translation of circular input to square output. +Try enabling this if your left analog stick can only move in a circle. +. +:CONFIG_DEADZONE +the percentage of motion to ignore. 100 turns the stick into a digital one. +. +:CONFIG_SERIAL1 +set type of device connected to com port. +Can be disabled, dummy, modem, nullmodem, directserial. +Additional parameters must be in the same line in the form of +parameter:value. Parameter for all types is irq (optional). +for directserial: realport (required), rxdelay (optional). + (realport:COM1 realport:ttyS0). +for modem: listenport (optional). +for nullmodem: server, rxdelay, txdelay, telnet, usedtr, + transparent, port, inhsocket (all optional). +Example: serial1=modem listenport:5000 +. +:CONFIG_SERIAL2 +see serial1 +. +:CONFIG_SERIAL3 +see serial1 +. +:CONFIG_SERIAL4 +see serial1 +. +:CONFIG_PHONEBOOKFILE +File used to map fake phone numbers to addresses. +. +:CONFIG_XMS +Włącz obsługę XMS. +. +:CONFIG_EMS +Enable EMS support. The default (=true) provides the best +compatibility but certain applications may run better with +other choices, or require EMS support to be disabled (=false) +to work at all. +. +:CONFIG_UMB +Włącz obsługę UMB. +. +:CONFIG_VER +Set DOS version (5.0 by default). Specify as major.minor format. +A single number is treated as the major version. +Common settings are 3.3, 5.0, 6.22, and 7.1. +. +:CONFIG_KEYBOARDLAYOUT +Kod języka układu klawiatury (lub none). +. +:CONFIG_IPX +Włącz emulację IPX po UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Linie w tej sekcji zostaną uruchomione przy starcie. +MoĹźesz umieścić tu np. komendy MOUNT. + +. +:CONFIGFILE_INTRO +# To jest plik konfiguracyjny dla dosbox-staging (%s). +# Linie zaczynające się od # są komentarzami. +. +:CONFIG_SUGGESTED_VALUES +MoĹźliwe wartości. +. +:PROGRAM_CONFIG_NOCONFIGFILE +No config file loaded! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Primary config file: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Additional config files: + +. +:PROGRAM_CONFIG_CONFDIR +Katalog z konfiguracją DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Nie moĹźna otworzyć pliku %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Writing config file %s + +. +:PROGRAM_CONFIG_USAGE +Config tool: +-writeconf or -wc without parameter: write to primary loaded config file. +-writeconf or -wc with filename: write file to config directory. +Use -writelang or -wl filename to write the current language strings. +-r [parameters] + Restart DOSBox, either using the previous parameters or any that are appended. +-wcp [filename] + Write config file to the program directory, dosbox.conf or the specified + filename. +-wcd + Write to the default config file in the config directory. +-l lists configuration parameters. +-h, -help, -? sections / sectionname / propertyname + Without parameters, displays this help screen. Add "sections" for a list of + sections. For info about a specific section or property add its name behind. +-axclear clears the autoexec section. +-axadd [line] adds a line to the autoexec section. +-axtype prints the content of the autoexec section. +-securemode switches to secure mode. +-avistart starts AVI recording. +-avistop stops AVI recording. +-startmapper starts the keymapper. +-get "section property" returns the value of the property. +-set "section property=value" sets the value. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Purpose of property "%s" (contained in section "%s"): +%s + +Possible Values: %s +Default value: %s +Current value: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Purpose of section "%s": +%s +Current value: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +This property cannot be changed at runtime. + +. +:PROGRAM_CONFIG_HLP_POSINT +positive integer +. +:PROGRAM_CONFIG_HLP_SECTHLP +Section %s contains the following properties: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +DOSBox configuration contains the following sections: + + +. +:PROGRAM_CONFIG_SECURE_ON +Przełączono w tryb bezpieczny. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Ta operacja nie jest moĹźliwa w trybie bezpiecznym. + +. +:PROGRAM_CONFIG_SECTION_ERROR +Sekcja %s nie istnieje. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" nie jest poprawną wartością parametru %s. + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Brak takiej sekcji lub parametru. + +. +:PROGRAM_CONFIG_NO_PROPERTY +Brak parametru %s w sekcji %s. + +. +:PROGRAM_CONFIG_SET_SYNTAX +Poprawna składnia: config -set "sekcja parametr". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Poprawna składnia: config -get "sekcja parametr". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox was started with the following command line parameters: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Zabrakło parametru. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +Znalezione CD-ROMy: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Dysk +. +:PROGRAM_MOUNT_STATUS_TYPE +Typ +. +:PROGRAM_MOUNT_STATUS_LABEL +Etykieta +. +:PROGRAM_MOUNT_STATUS_2 +Dysk %c jest zamontowany jako %s + +. +:PROGRAM_MOUNT_STATUS_1 +Zamontowane dyski: + +. +:PROGRAM_MOUNT_ERROR_1 +Katalog %s nie istnieje. + +. +:PROGRAM_MOUNT_ERROR_2 +%s nie jest katalogiem + +. +:PROGRAM_MOUNT_ILL_TYPE +Nieprawidłowy typ %s + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Dysk %c jest juĹź zamontowany jako %s + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Dysk %c nie jest zamontowany. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Dysk %c został pomyślnie odmontowany. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Dyski wirtualne nie mogą zostać odmontowane. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +'%c' nie jest prawidłowym identyfikatorem dysku. + +. +:PROGRAM_MOUNT_WARNING_WIN +Montowanie dysku C:\ nie jest zalecane. Proszę następnym razem zamontować (pod)katalog. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Montowanie katalogu / nie jest zalecane.Proszę następnym razem zamontować (pod)katalog. + +. +:PROGRAM_MOUNT_NO_OPTION +Warning: Ignoring unsupported option '%s'. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +A normal directory needs to be MOUNTed first before an overlay can be added on top. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +The overlay is NOT compatible with the drive that is specified. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +The overlay needs to be specified using the same addressing as the underlying drive. No mixing of relative and absolute paths. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +The overlay directory can not be the same as underlying drive. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Coś poszło nie tak. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Overlay %s on drive %c mounted. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Nie moĹźna przenieść dysku Z. Dysk %c jest juĹź zamontowany. + +. +:PROGRAM_MEM_CONVEN +%10d kB wolnej pamięci konwencjonalnej + +. +:PROGRAM_MEM_EXTEND +%10d kB wolnej pamięci rozszerzonej + +. +:PROGRAM_MEM_EXPAND +%10d kB wolnej pamięci stronicowej + +. +:PROGRAM_MEM_UPPER +%10d kB wolnej pamięci gĂłrnej w %d blokach (największy blok %d kB) + +. +:PROGRAM_LOADFIX_ALLOC +%d kB zaalokowanych. + +. +:PROGRAM_LOADFIX_DEALLOC +%d kB zwolnionych. + +. +:PROGRAM_LOADFIX_DEALLOCALL +UĹźyta pamięć zwolniona. + +. +:PROGRAM_LOADFIX_ERROR +Błąd alokacji pamięci. + +. +:MSCDEX_SUCCESS +MSCDEX zainstalowany. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Błąd: Litery dyskĂłw wielu napędĂłw CD-ROM muszą następować po sobie. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Błąd: jeszcze nie obsługiwane. + +. +:MSCDEX_ERROR_PATH +MSCDEX: Błąd: Podana ścieĹźka nie prowadzi do napędu CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Błąd: Nieprawidłowy plik lub brak dostępu. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Błąd: Za duĹźo napędĂłw CD-ROM (maksymalnie: 5). Instalacja MSCDEX nieudana. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Zamontowano podkatalog: ograniczone wsparcie. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Błąd: Plik nie jest obrazem ISO/CUE lub zawiera błędy. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Błąd: Nieznany błąd. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: OstrzeĹźenie: Zignorowano niewspieraną opcję '%s'. + +. +:PROGRAM_RESCAN_SUCCESS +Pamięć podręczna dysku wyczyszczona. + +. +:PROGRAM_INTRO +Witaj w DOSBox Staging, emulatorze x86 z dĹşwiękiem i grafiką. +DOSBox tworzy dla Ciebie powłokę, ktĂłry wygląda jest stary, prosty DOS. + +Informacje o montowaniu dyskĂłw, wpisz: intro mount +Informacje o wsparciu dla CD-ROM, wpisz: intro cdrom +Informacje o klawiszach specjalnych, wpisz: intro special +Więcej informacji o DOSBox Staging znajdziesz na wiki: +https://github.com/dosbox-staging/dosbox-staging/wiki + +DOSBox zatrzyma/wyłączy się bez ostrzeĹźenia jeśli wystąpi błąd! + +. +:PROGRAM_INTRO_MOUNT_START +Here are some commands to get you started: +Before you can use the files located on your own filesystem, +You have to mount the directory containing the files. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +╔════════════════════════════════════════════════════════════════════════╗ +║ mount c c:\dosprog\ utworzy dysk C z c:\dosprog jako zawartością. ║ +║ ║ +║ c:\dosprog\ to przykład. Zamień go na TwĂłj własny katalog z grami.  ║ +╚════════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_OTHER +╔═════════════════════════════════════════════════════════════════════╗ +║ mount c ~/dosprog utworzy dysk C z ~/dosprog jako zawartością. ║ +║ ║ +║ ~/dosprog to przykład. Zamień go na TwĂłj własny katalog z grami.  ║ +╚═════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_END +When the mount has successfully completed you can type c: to go to your freshly +mounted C-drive. Typing dir there will show its contents. cd will allow you to +enter a directory (recognised by the [] in a directory listing). +You can run programs/files which end with .exe .bat and .com. + +. +:PROGRAM_INTRO_CDROM +How to mount a virtual CD-ROM Drive in DOSBox: +DOSBox provides CD-ROM emulation on several levels. + +This works on all normal directories, installs MSCDEX and marks the files +read-only. Usually this is enough for most games: + +mount D C:\example -t cdrom + +If it doesn't work you might have to tell DOSBox the label of the CD-ROM: + +mount D C:\example -t cdrom -label CDLABEL + +Additionally, you can use IMGMOUNT to mount ISO images or CUE files: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +Klawisze specjalne: +Domyślne skrĂłty klawiaturowe. +Mogą zostać zmienione narzędziem keymapper. + +" MMOD2_NAME "Enter PrzejdĹş do trybu pełnoekranowego i z powrotem. +" MMOD2_NAME "Pauza Zapauzuj emulator. +" PRIMARY_MOD_NAME "+F1 " PRIMARY_MOD_PAD " Uruchom keymappera. +" PRIMARY_MOD_NAME "+F4 " PRIMARY_MOD_PAD " Zamień zamontowany obraz dysku. Aktualizuj pamięć podręczną zamontowanego katalogu. +" PRIMARY_MOD_NAME "+F5 " PRIMARY_MOD_PAD " ZrĂłb zrzut ekranu. +" PRIMARY_MOD_NAME "+F6 " PRIMARY_MOD_PAD " Rozpocznij/zatrzymaj nagrywanie audio do pliku wave. +" PRIMARY_MOD_NAME "+F7 " PRIMARY_MOD_PAD " Rozpocznij/zatrzymaj nagrywanie wideo do pliku zmbv. +" PRIMARY_MOD_NAME "+F9 " PRIMARY_MOD_PAD " Wyłącz emulator. +" PRIMARY_MOD_NAME "+F10 " PRIMARY_MOD_PAD " Przechwyć/zwolnij myszkę. +" PRIMARY_MOD_NAME "+F11 " PRIMARY_MOD_PAD " Spowolnij emulację. +" PRIMARY_MOD_NAME "+F12 " PRIMARY_MOD_PAD " Przyspiesz emulację. +" MMOD2_NAME "F12 Uwolnij prędkość (przycisk "turbo" / przyspiesz). + +. +:PROGRAM_BOOT_NOT_EXIST +Bootdisk file does not exist. Failing. + +. +:PROGRAM_BOOT_NOT_OPEN +Cannot open bootdisk file. Failing. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +Plik obrazu jest tylko do odczytu! MoĹźe to spowodować problemy. + +. +:PROGRAM_BOOT_PRINT_ERROR +Ta komenda bootuje DOSBoxa z dyskietki lub obrazu dysku twardego. + +Do tej komendy moĹźna włączyć wybĂłr kolejności dyskĂłw +kombinacją klawiszy " PRIMARY_MOD_NAME "+F4, wtedy opcja -l określa zamontowany dysk do zbootowania. +Jeśli nie podano litery dysku, domyślnie bootowany jest dysk A. +Jedynymi literami bootowalnych dyskĂłw są litery A, C i D. Aby zbootować z dysku +twardego (C lub D), obraz powinien być zamontowany komendą +IMGMOUNT. + +Składnia tej komendy jest następująca: + +BOOT [obrazdysku1.img obrazdysku1.img] [-l literadysku] + +. +:PROGRAM_BOOT_UNABLE +Nie udało się zbootować z dysku %c. + +:PROGRAM_BOOT_IMAGE_OPEN +Otwieranie pliku obrazu: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Nie moĹźna otworzyć %s +. +:PROGRAM_BOOT_BOOT +Bootowanie z dysku %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +Znaleziono kartridĹź PCjr, ale maszyna nie jest typu PCjr +. +:PROGRAM_BOOT_CART_LIST_CMDS +Dostępne komendy kartridĹźy PCjr: %s +. +:PROGRAM_BOOT_CART_NO_CMDS +Nie znaleziono komend kartidĹźy PCjr +. +:PROGRAM_LOADROM_SPECIFY_FILE +Must specify ROM file to load. + +. +:PROGRAM_LOADROM_CANT_OPEN +ROM file not accessible. + +. +:PROGRAM_LOADROM_TOO_LARGE +ROM file too large. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +Video BIOS not supported by machine type. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +ROM file not recognized. + +. +:PROGRAM_LOADROM_BASIC_LOADED +BASIC ROM loaded. + +. +:SHELL_CMD_IMGMOUNT_HELP +Zamontuj obraz dysku CD, dyskietki lub dysku twardego do wybranej litery dysku. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Zamontuj obraz dysku CD, dyskietki lub dysku twardego do wybranej litery dysku. + +UĹźycie: + imgmount DYSK OBRAZ-CD [OBRAZ-CD2 [..]] [-fs iso] -t cdrom|iso + imgmount DYSK OBRAZ [OBRAZ2 [..]] [-fs fat] -t hdd|floppy + imgmount DYSK OBRAZ-STARTOWY [-fs fat|none] -t hdd -size GEOMETRIA + imgmount -u DYSK (odmontuj obraz DYSKu) + +Gdzie: + DYSK jest literą do ktĂłrej obraz będzie zamontowany: A, C, D, ... + OBRAZ-CD to ISO, CUE+BIN, CUE+ISO lub CUE+ISO+FLAC/OPUS/OGG/MP3/WAV + OBRAZ jest obrazem dysku twardego lub dyskietki (FAT16 lub FAT12) + OBRAZ-STARTOWY jest startowym obrazem dysku ze specyficzną geometrią + GEOMETRIA pliki-w-sektorze,sektory-w-głowicy,głowice,cylindry + +Notatki: + - " PRIMARY_MOD_NAME "+F4 zamienia i montuje następny OBRAZ lub OBRAZ-CD. +Przykłady: + imgmount D /home/UZYTKOWNIK/gry/doom.iso -t cdrom + imgmount D cd/quake1.cue -t cdrom + imgmount A dyskietka1.img dyskietka2.img -t floppy + imgmount C ~/dos/dysk_c.img -t hdd + imgmount C bootable.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +maps physical folders or drives to a virtual drive letter. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Mount a directory from the host OS to a drive letter. + +Usage: + mount DRIVE DIRECTORY [-t TYPE] [-freesize SIZE] [-label LABEL] + mount -u DRIVE (unmounts the DRIVE's directory) + +Where: + DRIVE the drive letter where the directory will be mounted: A, C, D, ... + DIRECTORY is the directory on the host OS to be mounted + TYPE type of the directory to mount: dir, floppy, cdrom, or overlay + SIZE free space for the virtual drive (KiB for floppies, MiB otherwise) + LABEL drive label name to be used + +Notes: + - '-t overlay' redirects writes for mounted drive to another directory. + - Additional options are described in the manual (README file, chapter 4). + +Examples: + mount C ~/dosgames + mount D "/media/USERNAME/Game CD" -t cdrom + mount C my_savegame_files -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Musisz podać literę dysku, na ktĂłrym zamontowany będzie obraz. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Musisz podać numer dysku (0 - 3), gdzie zamontowany będzie obraz (0=fda, 1=fdb, 2=hda, 3=hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +For CD-ROM images: IMGMOUNT drive-letter location-of-image -t iso + +For hardrive images: Must specify drive geometry for hard drives: +bytes_per_sector, sectors_per_cylinder, heads_per_cylinder, cylinder_count. +IMGMOUNT drive-letter location-of-image -size bps,spc,hpc,cyl + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Could not load image file. +Check that the path is correct and the image is accessible. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Could not extract drive geometry from image. +Use parameter -size bps,spc,hpc,cyl to specify the geometry. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Typ '%s' nie jest obsługiwany. UĹźyj 'hdd', 'floppy' lub 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Format "%s" nie jest obsługiwany. UĹźyj "fat", "iso" lub "none". + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Musisz podać plik obrazu do zamontowania. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +Nie znaleziono pliku obrazu. + +. +:PROGRAM_IMGMOUNT_MOUNT +Do montowania katalogĂłw słuĹźy komenda MOUNT, a nie IMGMOUNT. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Drive already mounted at that letter. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Nie da się utworzyć dysku z tego pliku. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Dysku %d jst zamontowany jako %s + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +The image must be on a host or local drive. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +UĹźywanie wielu plikĂłw jest obsługiwane tylko dla obrazĂłw cue/iso. + +. +:PROGRAM_KEYB_INFO +Strona kodowa %i została załadowana + +. +:PROGRAM_KEYB_INFO_LAYOUT +Strona kodowa %i została załadowana dla układu klawiatury %s + +. +:PROGRAM_KEYB_SHOWHELP +KEYB [keyboard layout ID[ codepage number[ codepage file]]] + +Some examples: + KEYB: Display currently loaded codepage. + KEYB sp: Load the spanish (SP) layout, use an appropriate codepage. + KEYB sp 850: Load the spanish (SP) layout, use codepage 850. + KEYB sp 850 mycp.cpi: Same as above, but use file mycp.cpi. + +. +:PROGRAM_KEYB_NOERROR +Układ klawiatury %s został wczytany dla strony kodowej %i + +. +:PROGRAM_KEYB_FILENOTFOUND +Nie znaleziono pliku klawiatury %s + + +. +:PROGRAM_KEYB_INVALIDFILE +Plik klawiatury %s jest nieprawidłowy + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Brak układu klawiatury w %s dla strony kodowej %i + +. +:PROGRAM_KEYB_INVCPFILE +Brak lub nieprawidłowy plik strony kodowej dla układu klawiatury %s + + +. +:SHELL_ILLEGAL_PATH +Nieprawidłowa ścieĹźka + +. +:SHELL_CMD_HELP +Jeśli chcesz zobaczyć listę wszystkich obsługiwanych komend, wpisz help /all . +KrĂłtka lista najczęściej uĹźywanych komend: + +. +:SHELL_CMD_ECHO_ON +ECHO jest włączone. + +. +:SHELL_CMD_ECHO_OFF +ECHO jest wyłączone. + +. +:SHELL_ILLEGAL_SWITCH +Nieprawidłowy przełącznik: %s. + +. +:SHELL_MISSING_PARAMETER +Brak wymaganego parametru. + +. +:SHELL_CMD_CHDIR_ERROR +Nie moĹźna przejść do: %s. + +. +:SHELL_CMD_CHDIR_HINT +Aby przejść do innego dysku wpisz %c: + +. +:SHELL_CMD_CHDIR_HINT_2 +Nazwa katalogu jest dłuĹźsza niĹź 8 znakĂłw i/lub zawiera spacje. +SprĂłbuj cd %s + +. +:SHELL_CMD_CHDIR_HINT_3 +Ciągle jesteś na dysku Z:, Wpisz C: aby przejść na zamontowany dysk. + +. +:SHELL_CMD_DATE_HELP +Displays or changes the internal date. + +. +:SHELL_CMD_DATE_ERROR +The specified date is not correct. + +. +:SHELL_CMD_DATE_DAYS +3SunMonTueWedThuFriSat +. +:SHELL_CMD_DATE_NOW +Current date: +. +:SHELL_CMD_DATE_SETHLP +Type 'date MM-DD-YYYY' to change. + +. +:SHELL_CMD_DATE_FORMAT +M/D/Y +. +:SHELL_CMD_DATE_HELP_LONG +DATE [[/T] [/H] [/S] | MM-DD-YYYY] + MM-DD-YYYY: new date to set + /S: Permanently use host time and date as DOS time + /F: Switch back to DOSBox internal time (opposite of /S) + /T: Only display date + /H: Synchronize with host + +. +:SHELL_CMD_TIME_HELP +Displays the internal time. + +. +:SHELL_CMD_TIME_NOW +Current time: +. +:SHELL_CMD_TIME_HELP_LONG +TIME [/T] [/H] + /T: Display simple time + /H: Synchronize with host + +. +:SHELL_CMD_MKDIR_ERROR +Nie moĹźna utworzyć: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Nie moĹźna usunąć: %s. + +. +:SHELL_CMD_DEL_ERROR +Nie moĹźna usunąć: %s. + +. +:SHELL_SYNTAXERROR +Składnia komendy jest nieprawidłowa. + +. +:SHELL_CMD_SET_NOT_SET +Zmienna środowiskowa %s nie jest zdefiniowana. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Niewystarczająca ilość miejsca w środowisku. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Brakuje nazwy pliku. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Brakuje numeru. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Nieprawidłowy numer. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +Brakuje etykiety dla komendy GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Nie odnaleziono etykiety %s. + +. +:SHELL_CMD_FILE_NOT_FOUND +Nie odnaleziono pliku %s. + +. +:SHELL_CMD_FILE_EXISTS +Plik %s juĹź istnieje. + +. +:SHELL_CMD_DIR_VOLUME + Wolumin w stacji %c to %s + +. +:SHELL_CMD_DIR_INTRO + Katalog: %s + +. +:SHELL_CMD_DIR_BYTES_USED +%17d plik(Ăłw) %21s bajtĂłw + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d katalog(Ăłw) %21s bajtĂłw wolnych + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Dysk %c nie istnieje! +Musisz go najpierw zamontować . Wpisz intro lub intro mount aby uzyskać więcej informacji. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Nieprawidłowa komenda: %s. + +. +:SHELL_CMD_PAUSE +Naciśnij dowolny klawisz, aby kontynuować... +. +:SHELL_CMD_PAUSE_HELP +Czekaj na wciśnięcie klawisza aby kontynuować. + +. +:SHELL_CMD_COPY_FAILURE +Nie udało się skopiować: %s. + +. +:SHELL_CMD_COPY_SUCCESS + skopiowano %d plik(Ăłw) + +. +:SHELL_CMD_SUBST_NO_REMOVE +Unable to remove, drive not in use. + +. +:SHELL_CMD_SUBST_FAILURE +Wykonanie polecenia SUBST nie powiodło się. MoĹźe to być spowodowane błędem w linii komend lub tym, Ĺźe docelowy dysk jest uĹźywany. +Polecenia SUBST moĹźna uĹźyć jedynie na lokalnych dyskach +. +:SHELL_STARTUP_BEGIN +╔════════════════════════════════════════════════════════════════════╗ +║ Witaj w DOSBox Staging %-43s ║ +║ ║ +║ KrĂłtki wstęp dla nowych uĹźytkownikĂłw, wpisz: INTRO ║ +║ Aby zobaczyć listę wspieranych komend, wpisz: HELP ║ +║ ║ +║ Aby dostosować prędkość emulatora, uĹźyj " PRIMARY_MOD_NAME "+F11 i " PRIMARY_MOD_NAME "+F12." PRIMARY_MOD_PAD PRIMARY_MOD_PAD " ║ +║ Aby zmienić skrĂłty klawiaturowe " PRIMARY_MOD_NAME "+F1." PRIMARY_MOD_PAD " ║ +║ Więcej informacji w pliku README w katalogu DOSBoxa. ║ +║ ║ + +. +:SHELL_STARTUP_CGA +║ DOSBox wspiera tryb Composite CGA. ║ +║ Wciśnij F12 aby włączyć lub wyłączyć tryb composite. ║ +║ (" MMOD2_NAME "+)F11 zmienia barwę; " MMOD1_NAME "+" MMOD2_NAME "+F11 zmienia model CGA." PRIMARY_MOD_PAD " ║ +║ ║ + +. +:SHELL_STARTUP_CGA_MONO +║ Wciśnij F11 aby zmienić kolor ekaranu: jasny biały, biały, pomarańczowy, zielony. ║ +║ i " MMOD2_NAME "F11 aby zmienić kontrast/jasność. ║ + +. +:SHELL_STARTUP_HERC +║ Wciśnij F11 aby zmienić kolor ekaranu mono: jasny biały, biały, pomarańczowy, zielony. ║ +║ ║ + +. +:SHELL_STARTUP_DEBUG +║ Wciśnij " MMOD2_NAME "Pauza aby włączyć debuggera albo włącz plik exe komendą DEBUG. ║ +║ ║ + +. +:SHELL_STARTUP_END +║ https://dosbox-staging.github.io ║ +╚════════════════════════════════════════════════════════════════════╝ + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Wyświetl lub zmień aktualny katalog. + +. +:SHELL_CMD_CHDIR_HELP_LONG +CHDIR [dysk:][ścieĹźka] +CHDIR [..] +CD [dysk:][ścieĹźka] +CD [..] + + .. oznacza, Ĺźe chcesz przejść do katalogu powyĹźej. + +Wpisz CD dysk: aby wyświetlić aktualną ścieĹźkę na określonym dysku. +Wpisz CD bez parametrĂłw aby wyświetlić aktualny dysk i katalog. + +. +:SHELL_CMD_CLS_HELP +Wyczyść ekran. + +. +:SHELL_CMD_DIR_HELP +Displays a list of files and subdirectories in a directory. + +. +:SHELL_CMD_DIR_HELP_LONG +DIR [drive:][path][filename] [/[W|B]] [/P] [/[AD]|[A-D]] [/O[-][N|E|S|D]] + + [drive:][path][filename] + Specifies drive, directory, and/or files to list. + /W Uses wide list format. + /B Uses bare format (no heading information or summary). + /P Pauses after each screenful of information. + /AD Displays all directories. + /A-D Displays all files. + /O List by files in sorted order. + - Prefix to reverse order + sortorder N By name (alphabetic) S By size (smallest first) + E By extension (alphabetic) D By date & time (oldest first) + +. +:SHELL_CMD_ECHO_HELP +Wyświetla wiadomości i włącza/wyłącza wypisywanie wykonywanych komend. + +. +:SHELL_CMD_EXIT_HELP +Wyłącz konsolę. + +. +:SHELL_CMD_HELP_HELP +PokaĹź pomoc. + +. +:SHELL_CMD_MKDIR_HELP +StwĂłrz katalog. + +. +:SHELL_CMD_MKDIR_HELP_LONG +MKDIR [dysk:][ścieĹźka] +MD [dysk:][ścieĹźka] + +. +:SHELL_CMD_RMDIR_HELP +Usuń katalog. + +. +:SHELL_CMD_RMDIR_HELP_LONG +RMDIR [dysk:][ścieĹźka] +RD [dysk:][ścieĹźka] + +. +:SHELL_CMD_SET_HELP +Zmień wartości zmiennych środowiskowych. + +. +:SHELL_CMD_IF_HELP +W skrypcie powoduje warunkowe przetwarzanie. + +. +:SHELL_CMD_GOTO_HELP +W skrypcie przeskakuje do linii o danej etykiecie. + +. +:SHELL_CMD_SHIFT_HELP +Leftshift commandline parameters in a batch script. + +. +:SHELL_CMD_TYPE_HELP +Wyświetl zawartość pliku testowego. + +. +:SHELL_CMD_TYPE_HELP_LONG +TYPE [DYSK:][ŚCIEĹťKA][PLIK] + +. +:SHELL_CMD_REM_HELP +Dodaj komentarz w skrypcie. + +. +:SHELL_CMD_REM_HELP_LONG +REM [komentarz] + +. +:SHELL_CMD_NO_WILD +To prosta wersja komendy, symbole wieloznaczne nie są dozwolone! + +. +:SHELL_CMD_RENAME_HELP +Zmień nazwę jednego lub wielu plikĂłw. + +. +:SHELL_CMD_RENAME_HELP_LONG +RENAME [dysk:][ścieĹźka]nazwapliku1 nazwapliku2. +REN [dysk:][ścieĹźka]nazwapliku1 nazwapliku2. + +Pamiętaj, Ĺźe nie moĹźesz określić nowego dysku i ścieĹźki dla pliku docelowego. + +. +:SHELL_CMD_DELETE_HELP +Usuń pliki. + +. +:SHELL_CMD_COPY_HELP +Kopiuj plik. + +. +:SHELL_CMD_CALL_HELP +Uruchom skrypt z innego skryptu. + +. +:SHELL_CMD_SUBST_HELP +Przyporządkuj wewnętrzny katalog do dysku. + +. +:SHELL_CMD_LOADHIGH_HELP +Wczytaj program do pamięci gĂłrnej (wymaga xms=true, umb=true). + +. +:SHELL_CMD_LS_HELP +Wypisz zawartość katalogu. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [PATTERN] + +. +:SHELL_CMD_LS_PATH_ERR +ls: nie ma dostępu do '%s': Nie ma takiego pliku ani katalogu + +. +:SHELL_CMD_CHOICE_HELP +Czeka na wciśnięcie klawisza i ustawia ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +CHOICE [/C:moĹźliwości] [/N] [/S] tekst + /C[:]moĹźliwości - Określa dostępne klawisze. Domyślnie: yn. + /N - Nie wyświetlaj moĹźliwości na koniec zgłoszenia. + /S - Włącza rozróşnianie wielkości liter moĹźliwości. + tekst - Tekst wyświetlany w zgłoszeniu. + +. +:SHELL_CMD_ATTRIB_HELP +Nie powoduje Ĺźadnego efektu. Dostarczone dla zachowania kompatybilności. + +. +:SHELL_CMD_PATH_HELP +Dostarczone dla zachowania kompatybilności. + +. +:SHELL_CMD_VER_HELP +PokaĹź lub ustaw raportowanę wersję DOS. + +. +:SHELL_CMD_VER_HELP_LONG +UĹźycie: + ver + ver set WERSJA + +Gdzie: + WERSJA moĹźe zawierać numer główny, np. 5 lub takĹźe dwucyfrowy numer + dodatkowy, jak np. 6.22, 7.01 lub 7.10. Numer dodatkowy wersji + moĹźe być rĂłwnieĹź odseparowany spacją, np: 6 22, 7 01, lub 7 10. + +Notatki: + Wersja DOS moĹźe być rĂłwnieĹź zmieniona w pliku konfiguracyjnym w sekcji [dos] + ustawiając "ver = WERSJA". + +Przykłady: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +DOSBox Staging wersja %s +DOS wersja %d.%02d + +. +:SHELL_CMD_VER_INVALID +Podana wersja DOSa jest nieprawidłowa. + +. diff -Nru dosbox-staging-0.76.0/contrib/translations/utf-8/ru/ru-0.77.0-alpha.txt dosbox-staging-0.77.0/contrib/translations/utf-8/ru/ru-0.77.0-alpha.txt --- dosbox-staging-0.76.0/contrib/translations/utf-8/ru/ru-0.77.0-alpha.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/contrib/translations/utf-8/ru/ru-0.77.0-alpha.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1422 @@ +:CONFIG_FULLSCREEN +Запустить DOSBox в полноэкранном режиме. +Нажмите " MMOD2_NAME "Enter, чтобы вернуться обратно в оконный режим. +. +:CONFIG_DISPLAY +Количество используемых диспНоов. Значение зависит от ОС и настроек пользователя. +. +:CONFIG_VSYNC +Настройка вертикальной синхронизации но реализована (настройка игнорируется). +. +:CONFIG_FULLRESOLUTION +Какое разрешение использовать для полноэкранного режима: 'original', 'desktop' +иНи фиксированный размер (например, '1024x768'). +. +:CONFIG_WINDOWRESOLUTION +Установите размер Окна, которое будет использоваться в ОкОннОП режиме: + default: Выбор наилучшего варианта в зависимости от вашогО + окружения и других настроек. + original: Изменить размер Окна в соответствии с разрешением, выбранным + эмулированной программой. + resizable: Сделать ОкнО эмулятора изменяемым. + Это экспериментальный вариант, работает только с + output=opengl и glshader=sharp (иНи 'none') + 'ШxВ': Масштабировать содержимое Окна Đ´Đž укаСаннОгО размера, + в формате ШxВ. Например: '1024x768'. + Масштабирование но выполняется для output=surface. +. +:CONFIG_OUTPUT +Какую видеосистему использовать для вывода изображения. +. +:CONFIG_TEXTURE_RENDERER +Выберите драйвер рендера при использовании режима вывода текстур. +Используйте texture_renderer=auto для автоматического выбора. +. +:CONFIG_CAPTURE_MOUSE +Выберите метод управления мышью: + onclick: Мышь будет захвачена пОсНо первого + нажатия внутри Окна. + onstart: Мышь захватывается при старте + (пОдОйнО настоящему DOS). + seamless: Мышь может пНавнО перемещаться внутри и снаружи DOSBox + Окна и но может быть захвачена. + nomouse: Мышь отключена и скрыта и но отправляет + события ввОда в игру. +Выберите спОсОй обработки нажатия средней кнОпки мыши (второй параметр): + middlegame: Нажатие средней кнОпки отправляет события в игру + (" PRIMARY_MOD_NAME "+F10 освобождает мышь). + middlerelease: Нажатие средней кнОпки освобождает мышь но отправляя + события в игру. Однако, нажатие средней кнОпки + будет отправлять события в игру в полноэкранном режиме + иНи кОгда установлен метод управления 'seamless'. + " PRIMARY_MOD_NAME "+F10 также освобождает мышь. +Значения пО умолчанию (осНи нет иНи неправильные): 'seamless middlerelease' +. +:CONFIG_SENSITIVITY +Чувствительность мыши. Дополнительный второй параметр определяет вертикальную чувствительность (например, '100,-50'). +. +:CONFIG_RAW_MOUSE_INPUT +Включение этой настройки, игнорирует настройки ускорения и +чувствительности мыши в операционной системе. Это работает в +полноэкранном режиме иНи при захвате мыши в ОкОннОП режиме. +. +:CONFIG_WAITONERROR +Ждать, перед закрытием кОнсОНи DOSBox, осНи есть Ошийки. +. +:CONFIG_PRIORITY +Уровни приоритета для DOSBox. Второй параметр действует, кОгда ОкнО DOSBox йоС фокуса иНи свёрнуто. +Значение 'pause' доступно только для второго параметра. +. +:CONFIG_MAPPERFILE +ФаКН, используемый для загрузки/сохранения сопоставлений иС ключей/событий. +Сброс сопоставления работает только сО значением пО умолчанию. +. +:CONFIG_SCREENSAVER +Используйте 'allow' иНи 'block' для переопределения SDL_VIDEO_ALLOW_SCREENSAVER +переменная окружения (которая обычно блокирует хранитель экрана ОС +пОка работает эмулятор). +. +:CONFIG_LANGUAGE +Выберите другой языковой файл. +. +:CONFIG_MACHINE +Тип эмулируемого компьютера для DOSBox. +. +:CONFIG_CAPTURES +Директория для захвата музыки и сниПкОв экрана. +. +:CONFIG_MEMSIZE +Объём доступной оперативной памяти DOSBox в мегабайтах. +Это значение лучше оставить пО умолчанию, чтобы избежать проблем с некоторыми играми, +хотя несколько игр могут потребовать йОНоо высоких значений. +Как правило, нет никакОгО преимущества в скорости при повышении этой величины. +. +:CONFIG_STARTUP_VERBOSITY +Управляет количеством информации перед отображением программы: + | Заставка | Приветствие | РанниК вывод +high | Đ´Đ° | Đ´Đ° | Đ´Đ° +medium | нет | Đ´Đ° | Đ´Đ° +low | нет | нет | Đ´Đ° +quiet | нет | нет | нет +splash_only | Đ´Đ° | нет | нет +auto | 'low', осНи передан исполняемый файл иНи директория, иначе 'high' +. +:CONFIG_FRAMESKIP +Сколько кадров DOSBox пропускает перед отрисовкой ОднОгО кадра. +. +:CONFIG_ASPECT +Масштабирует вертикальное разрешение для получения изображения с соотношением +сторон 4:3. Соотношение, совпадающее с оригинальными мониторами, +для которых было разработано большинство DOS-игр. Эта настройка влияет +только на режимы видоО, использующие нестандартные разрешения, такие как +'320x200' иНи '640x400'; гдо в видо квадратных пиксоНоК, например, '640x480' +и '800x600', будут отображаться как есть. +. +:CONFIG_MONOCHROME_PALETTE +Выберите палитру пО умолчанию для монохромного дисплея. +Работает только при эмуляции 'hercules' иНи 'cga_mono'. +Вы также можете перемещаться пО доступным цветам, используя F11. +. +:CONFIG_SCALER +Масштабирующий алгоритм, используемый для увеличения/расширения +режимов ниСкОгО разрешения. Если добавить 'forced', то масштабирующий +алгоритм будет использоваться, даМо осНи результат может быть нежелательным. +Обратите вниПанио, что некоторые масштабирующие алгоритмы могут использовать +чёрные поля для заполнения изображения в пределах настроенного разрешения +дисплея. Если это нежелательно, попробуйте другой масштабирующий алгоритм +иНи включите вывод изображения с полным разрешением. +. +:CONFIG_GLSHADER +Укажите 'none', иНи GLSL-шейдер. Работает только +с выводом изображения OpenGL. Может быть как абсолютный +путь, так и файл в субдиректории 'glshaders' в директории +конфигурации DOSBox, иНи Один иС встроенных GLSL-шейдеров: +'advinterp2x', 'advinterp3x', 'advmame2x', 'advmame3x', +'crt-easymode-flat', 'crt-fakelottes-flat', 'rgb2x', 'rgb3x', +'scan2x', 'scan3x', 'tv2x', 'tv3x', 'sharp' ('default'). +. +:CONFIG_CORE +Ядро процессора, используемое в эмуляции. +Значение 'auto' переключит в динамический режим, осНи это доступно и целесообразно. +. +:CONFIG_CPUTYPE +Тип процессора, используемый в эмуляции. Значение 'auto' - самый быстрый выбор. +. +:CONFIG_CYCLES +Количество инструкций DOSBox пытающихся эмулироваться в каждую ПиННисокунду. +Установка сНишкОП большого значения приводит Đş потере Свука и запаздыванию. +Циклы ПОМнО устанавливать тремя спОсОйаПи: + 'auto': Пытается угадать, что нуМнО игре. + Обычно это работает, нО для некоторых игр может но сработать. + 'fixed число': Устанавливает фиксированное количество циклов. Это, обычно, то, + что нуМнО, осНи 'auto' но пОПОг (Пример: 'fixed 4000'). + 'max': Выделит столько циклов, сколько позволит выделить процессор. +. +:CONFIG_CYCLEUP +Количество циклов для уменьшения/увеличения с помощью "горячих" кНавиш.(" PRIMARY_MOD_NAME "+F11/" PRIMARY_MOD_NAME "+F12) +. +:CONFIG_CYCLEDOWN +Значение ниМо 100 будет в процентах. +. +:CONFIG_NOSOUND +Включает бесшумный режим, Свук продолжает эмулироваться. +. +:CONFIG_RATE +Микшерная частота дискретизации. Значение частоты, но поддерживаемое СвукОвОК картой, снизит качество Свука. +. +:CONFIG_BLOCKSIZE +Размер йНОка микшера, большие йНОки могут предотвратить Саиканио Свука, нО Свук будет больше запаздывать. +. +:CONFIG_PREBUFFER +Сколько ПиННисокунд нуМнО удерживать данные на вершине йНОка. +. +:CONFIG_MIDIDEVICE +Устройство, которое будет принимать MIDI-данные (от эмулированного MIDI +интерфейса - MPU-401). Выберите Один иС следующих вариантов: + 'fluidsynth': Использовать встроенный MIDI-синтезатор. + Читайте раздел [fluidsynth] для подробной конфигурации. + 'mt32': Использовать встроенный Roland MT-32 синтезатор. + Читайте раздел [mt32] для подробной конфигурации. + 'auto': Использовать первый работающий вношниК MIDI-проигрыватель. + Может быть программным синтезатором иНи физическим устройством. +. +:CONFIG_MIDICONFIG +Опции конфигурации для выбранного MIDI-интерфейса. +Обычно это идентификатор иНи имя MIDI-синтезатора, который Вам нуМон. +для использования (найдите id/имя с помощью команды DOS 'mixer /listmidi'). +- Эта опция но имеет эффекта при использовании встроенных синтезаторов + (mididevice = fluidsynth иНи mididevice = mt32). +- При использовании ALSA, используйте Linux кОПанду 'aplaymidi -l' для пОкаСа + списка доступных MIDI-портов, и выберите Один (например, 'midiconfig=128:0'). + для клиента секвенсора 128, порт 0). +- Если Вы используете физический Roland MT-32 с ревизией 0 PCB, + аппаратное обеспечение может потребовать задержки, чтобы предотвратить + переполнение огО буфера. В этом случае добавьте 'delaysysex', + например: 'midiconfig=2 delaysysex'. +Читайте README/Manual для получения йОНоо подробной информации. +. +:CONFIG_MPU401 +Тип MPU-401 для эмуляции. +. +:CONFIG_SOUNDFONT +Путь Đş файлу SoundFont в формате .sf2. Можно использовать +абсолютный иНи относительный путь, иНи имя .sf2 внутри +субдиректории 'soundfonts' в директории конфигурации DOSBox. +Необязательный процент будет изменять громкость SoundFont. +Например: 'FluidR3_GM.sf2 50' ослабит её на 50 процентов. +ИСПононио в процентах может быть в пределах от 1 Đ´Đž 500. +. +:CONFIG_MODEL +Модель синтезатора для использования. По умолчанию 'auto' предпочитает CM-32L, +осНи Ойа набора ПЗУ будут предоставлены. Для ранних игр Sierra и Dune 2 +рекомендуется использовать 'mt32', в то время как йОНоо новые игры, обычно, +используют дополнительные звуковые эффекты CM-32L (используйте 'auto' иНи 'cm32l'). +. +:CONFIG_ROMDIR +Директория, содержащая Одну иС двух пар MT-32 и/иНи CM-32L ПЗУ, +Файлы должны быть названы заглавными йукваПи и только таким образом: + - MT-32 ПЗУ пара: MT32_CONTROL.ROM и MT32_PCM.ROM + - CM-32L ПЗУ пара: CM32L_CONTROL.ROM и CM32L_PCM.ROM +Директория может быть абсолютной иНи относительной, иНи быть пустой, +для использования субдиректории 'mt32-roms' в директории конфигурации +DOSBox, с последующей проверкой других мест в системе. +. +:CONFIG_SBTYPE +Тип эмуляции для Sound Blaster. Значение 'gb' - это Game Blaster. +. +:CONFIG_SBBASE +Адрес ввОда-вывода для Sound Blaster. +. +:CONFIG_IRQ +Номер прерывания для Sound Blaster. +. +:CONFIG_DMA +Канал прямого доступа для Sound Blaster. +. +:CONFIG_HDMA +Канал старшего прямого доступа для Sound Blaster. +. +:CONFIG_SBMIXER +Разрешить микшеру Sound Blaster изменять DOSBox микшер. +. +:CONFIG_OPLRATE +Опция 'oplrate' устарела. Форма волны ОПЛ теперь привязана Đş скорости + воспроизведения микшера, чтобы избежать передискретизации. +. +:CONFIG_OPLMODE +Тип эмуляции ОПЛ. На 'auto' режим определяется 'sbtype'. +Все режимы OPL совместимы с AdLib, Са исключением 'cms'. +. +:CONFIG_OPLEMU +Источник эмуляции OPL. 'compat' обеспечивает лучшее качество, +По умолчанию используется 'nuked', Он наийОНоо точный, нО самый ресурсоёмкий. +. +:CONFIG_GUS +Включить эмуляцию Gravis UltraSound. +. +:CONFIG_GUSBASE +Адрес ввОда-вывода для Gravis UltraSound. +. +:CONFIG_GUSIRQ +Номер прерывания для Gravis UltraSound. +. +:CONFIG_GUSDMA +Канал прямого доступа для Gravis UltraSound. +. +:CONFIG_ULTRADIR +Путь Đş директории UltraSound. В этой директории +дОНМна быть MIDI-субдиректория, содержащая +патч-файлы для воспроизведения GUS. Наборы патчей +используемые с Timidity должны работать хорошо. +. +:CONFIG_PCSPEAKER +Включить эмуляцию PC-Speaker. +. +:CONFIG_PCRATE +Частота дискретизации генерации Свука для PC-Speaker. +. +:CONFIG_ZERO_OFFSET +Нейтрализует и предотвращает DC-смещение PC-Speaker от воздействия других источников. +Значение 'auto' включает огО для систем, отличных от Windows, и отключает огО в Windows. +Если ваша ОС выполняет свОо собственное DC-смещение, то установите это значение в 'false'. +. +:CONFIG_TANDY +Включить эмуляцию Tandy Sound System. Для 'auto', эмуляция включается только тогда, кОгда 'machine = tandy'. +. +:CONFIG_TANDYRATE +Частота дискретизации для Tandy 3-Voice поколения. +. +:CONFIG_DISNEY +Включение эмуляции Disney Sound Source. (Covox Voice Master и Speech Thing совместимых). +. +:CONFIG_JOYSTICKTYPE +Тип джойстика для эмуляции: 'auto' (пО умолчанию), +'none' (отключает эмуляцию джойстика), +'2axis' (поддерживает два джойстика), +'4axis' (поддерживает Один джойстик, используется первый джойстик), +'4axis_2' (поддерживает Один джойстик, используется второй джойстик), +'fcs' (Thrustmaster), 'ch' (CH Flighttick). +'auto' выбирает эмуляцию в зависимости от реальных джойстиков. +(Не забудьте сбросить файл маппера DOSBox, осНи Вы сохранили огО ранее). +. +:CONFIG_TIMED +Включить временные интервалы для Оси. Экспериментируйте с этой опцией, осНи джойстик дрейфует (в сторону). +. +:CONFIG_AUTOFIRE +Непрерывно стреляет, пОка Вы держите кнОпку нажатой (турбо). +. +:CONFIG_SWAP34 +Поменять местами 3-ю и 4-ю Оси. Может быть пОНоСнО для некоторых джойстиков. +. +:CONFIG_BUTTONWRAP +Включить ограничение кнОпОк пО количеству эмулируемых кнОпОк. +. +:CONFIG_CIRCULARINPUT +Включить преобразование кругового ввОда в квадратный вывод. +Попробуйте включить эту опцию, осНи левый аналоговый рычажок может двигаться только пО кругу. +. +:CONFIG_DEADZONE +Процент движения, который нуМнО игнорировать. Значение '100' превращает рычажок в цифровой. +. +:CONFIG_SERIAL1 +Установите тип устройства, подключённого Đş com-порту. +Может быть 'disabled', 'dummy', 'modem', 'nullmodem' и 'directserial'. +Дополнительные параметры должны быть в той Мо строке в видо +параметр:значение. Параметр для всех типов: 'irq' (опциональный). +Для 'directctserial': 'realport' (обязательный), 'rxdelay' (опциональный). + 'realport:COM1 realport:ttyS0'. +Для 'modem': 'listenport' (опциональный). +Для 'nullmodem': 'server', 'rxdelay', 'txdelay', 'telnet', 'usetr', + 'transparent', 'port', 'inhsocket' (всо опциональные). +Пример: 'serial1=modem listenport:5000'. +. +:CONFIG_SERIAL2 +Читайте serial1. +. +:CONFIG_SERIAL3 +Читайте serial1. +. +:CONFIG_SERIAL4 +Читайте serial1. +. +:CONFIG_PHONEBOOKFILE +ФаКН, используемый для привязки фиктивных телефонных номеров Đş адресам. +. +:CONFIG_XMS +Включить поддержку XMS. +. +:CONFIG_EMS +Включить поддержку EMS. По умолчанию ('true') обеспечивает лучшую +совместимость, нО некоторые приложения могут работать лучше с +другими вариантами, иНи требовать отключения поддержки EMS ('false'). +. +:CONFIG_UMB +Включить поддержку UMB. +. +:CONFIG_VER +Установить версию DOS (пО умолчанию 5.0). Укажите в качестве формата мажор.минор. +Одиночный номер рассматривается как основная версия. +Обычно используются: '3.3', '5.0', '6.22' и '7.1'. +. +:CONFIG_KEYBOARDLAYOUT +Языковой кОд раскладки клавиатуры (иНи 'none'). +. +:CONFIG_IPX +Включить эмуляцию ipx через UDP/IP. +. +:AUTOEXEC_CONFIGFILE_HELP +Строки в этом разделе будут выполняться при Сапуско. +Вы можете размещать свОи строки 'mount' здесь. +. +:CONFIGFILE_INTRO +# Это конфигурационный файл для dosbox-staging (%s). +# Строки, начинающиеся сО Снака '#' - это комментарии. + +. +:CONFIG_SUGGESTED_VALUES +Возможные значения +. +:PROGRAM_CONFIG_NOCONFIGFILE +Конфигурационный файл но загружен! + +. +:PROGRAM_CONFIG_PRIMARY_CONF +Основной файл конфигурации: +%s + +. +:PROGRAM_CONFIG_ADDITIONAL_CONF +Дополнительные файлы конфигурации: + +. +:PROGRAM_CONFIG_CONFDIR +Директория конфигурации DOSBox Staging %s: +%s + + +. +:PROGRAM_CONFIG_FILE_ERROR + +Невозможно открыть файл %s + +. +:PROGRAM_CONFIG_FILE_WHICH +Запись конфигурационного файла %s + +. +:PROGRAM_CONFIG_USAGE +Инструмент конфигурации: +-writeconf [имя_файла] иНи -wc [имя_файла]: Сохранить текущую конфигурацию +в ОснОвнОК файл конфигурации иНи в указанный файл в директории конфигурации. +-writelang иНи -wl имя_файла: Сохраняет текущие языковые строки в указанный файл. +-r [параметры]: Перезагрузить DOSBox, с предыдущими иНи указанными параметрами. +-wcp [имя_файла]: + Сохранить конфигурацию в файл dosbox.conf иНи в указанный файл в текущей директории. +-wcd: Сохранить текущую конфигурацию в ОснОвнОК файл конфигурации. +-l: Хписки параметров конфигурации. +-h, -help, -? sections / наСванио_раздела / наСванио_свойства: + Без параметров, отображает этот экран справки. Добавьте sections для списка разделов. + Для получения информации Đž конкретном разделе иНи свойстве добавьте огО наСванио. +-axclear: Очищает раздел autoexec. +-axadd строка: Добавляет строку в раздел autoexec. +-axtype: Выводит содержимое раздела autoexec. +-securemode: Устанавливает безопасный режим. +-avistart: Начинает видеозапись. +-avistop: Останавливает видеозапись. +-startmapper: Запускает клавишный маппер. +-get наСванио_свойства: Возвращает значение свойства. +-set наСванио_свойства=значение: Устанавливает значение свойства. + +. +:PROGRAM_CONFIG_HLP_PROPHLP +Назначение свойства "%s" (содержащегося в разделе "%s"): +%s + +Возможные значения: %s +Значение пО умолчанию: %s +Текущее значение: %s + +. +:PROGRAM_CONFIG_HLP_LINEHLP +Назначение раздела "%s": +%s +Текущее значение: +%s + +. +:PROGRAM_CONFIG_HLP_NOCHANGE +Это свойство но может быть иСПононО вО время выполнения. + +. +:PROGRAM_CONFIG_HLP_POSINT +ЌоНОо положительное число. +. +:PROGRAM_CONFIG_HLP_SECTHLP +РаСдоН %s содержит следующие свойства: + +. +:PROGRAM_CONFIG_HLP_SECTLIST +Конфигурация DOSBox содержит следующие разделы: + + +. +:PROGRAM_CONFIG_SECURE_ON +Установлен безопасный режим. + +. +:PROGRAM_CONFIG_SECURE_DISALLOW +Эта операция но разрешена в йоСОпаснОП режиме. + +. +:PROGRAM_CONFIG_SECTION_ERROR +РаСдоН "%s" но существует. + +. +:PROGRAM_CONFIG_VALUE_ERROR +"%s" недопустимое значение свойства "%s". + +. +:PROGRAM_CONFIG_PROPERTY_ERROR +Нет такого раздела иНи свойства. + +. +:PROGRAM_CONFIG_NO_PROPERTY +В разделе "%2$s" нет свойства "%1$s". + +. +:PROGRAM_CONFIG_SET_SYNTAX +Правильный синтаксис: config -set "наСванио_свойства". + +. +:PROGRAM_CONFIG_GET_SYNTAX +Правильный синтаксис: config -get "наСванио_свойства". + +. +:PROGRAM_CONFIG_PRINT_STARTUP + +DOSBox был запущен сО следующими параметрами кОПанднОК строки: +%s + +. +:PROGRAM_CONFIG_MISSINGPARAM +Отсутствует параметр. + +. +:PROGRAM_MOUNT_CDROMS_FOUND +Найдено приводов CD-ROM: %d + +. +:PROGRAM_MOUNT_STATUS_DRIVE +Диск +. +:PROGRAM_MOUNT_STATUS_TYPE +Тип +. +:PROGRAM_MOUNT_STATUS_LABEL +Метка +. +:PROGRAM_MOUNT_STATUS_2 +Диск %c смонтирован как %s + +. +:PROGRAM_MOUNT_STATUS_1 +Смонтированные диски: + +. +:PROGRAM_MOUNT_ERROR_1 +Директории %s но существует. + +. +:PROGRAM_MOUNT_ERROR_2 +%s но является директорией. + +. +:PROGRAM_MOUNT_ILL_TYPE +Недопустимый тип %s. + +. +:PROGRAM_MOUNT_ALREADY_MOUNTED +Диск %c уМо смонтирован в %s. + +. +:PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED +Диск %c но смонтирован. + +. +:PROGRAM_MOUNT_UMOUNT_SUCCESS +Диск %c успошнО демонтирован. + +. +:PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL +Виртуальные диски но могут быть демонтированы. + +. +:PROGRAM_MOUNT_DRIVEID_ERROR +%c но является правильным идентификатором диска. + +. +:PROGRAM_MOUNT_WARNING_WIN +Монтирование C:\ НЕ рекомендуется! В следующий раз смонтируйте субдиректорию. + +. +:PROGRAM_MOUNT_WARNING_OTHER +Монтирование / НЕ рекомендуется! В следующий раз смонтируйте субдиректорию. + +. +:PROGRAM_MOUNT_NO_OPTION +Внимание: Игнорирование неподдерживаемой опции %s. + +. +:PROGRAM_MOUNT_OVERLAY_NO_BASE +Перед дОйавНониоП оверлея нуМнО смонтировать директорию для ногО. + +. +:PROGRAM_MOUNT_OVERLAY_INCOMPAT_BASE +Оверлей но совместим с указанным дискОП. + +. +:PROGRAM_MOUNT_OVERLAY_MIXED_BASE +Оверлей дОНМон быть укаСан с использованием той Мо адресации, что и ОснОвнОК диск. Никакого смешивания относительного и абсолютного путей. +. +:PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE +Директория оверлея но может совпадать с дискОП, лежащим в ОснОво. + +. +:PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR +Что-то пОшНО но так. + +. +:PROGRAM_MOUNT_OVERLAY_STATUS +Оверлей %s на диско %c смонтирован. + +. +:PROGRAM_MOUNT_MOVE_Z_ERROR_1 +Диск Z нельзя перемещать. Диск %c уМо смонтирован. + +. +:PROGRAM_MEM_CONVEN +%10d кБ ОснОвнОК памяти свОйОднО. + +. +:PROGRAM_MEM_EXTEND +%10d кБ расширенной памяти свОйОднО. + +. +:PROGRAM_MEM_EXPAND +%10d кБ расширяемой памяти свОйОднО. + +. +:PROGRAM_MEM_UPPER +%10d кБ верхней памяти свОйОднО в %d блоках (самый большой UMB %d кБ). + +. +:PROGRAM_LOADFIX_ALLOC +%d кБ выделено. + +. +:PROGRAM_LOADFIX_DEALLOC +%d кБ ОсвОйОМдонО. + +. +:PROGRAM_LOADFIX_DEALLOCALL +Использованная память ОсвОйОМдона. + +. +:PROGRAM_LOADFIX_ERROR +Ошибка выделения памяти. + +. +:MSCDEX_SUCCESS +MSCDEX установлен. + +. +:MSCDEX_ERROR_MULTIPLE_CDROMS +MSCDEX: Ошибка: Буквы дискОв нескольких приводов CD-ROM должны быть непрерывными. + +. +:MSCDEX_ERROR_NOT_SUPPORTED +MSCDEX: Ошибка: Ещё но поддерживается. + +. +:MSCDEX_ERROR_PATH +MSCDEX: Указанный путь но является приводом CD-ROM. + +. +:MSCDEX_ERROR_OPEN +MSCDEX: Ошибка: Неверный файл иНи новОСПОМнО открыть. + +. +:MSCDEX_TOO_MANY_DRIVES +MSCDEX: Ошибка: ХНишкОП ПнОгО приводов CD-ROM (ПаксиПуП: 5). Не удалось установить MSCDEX. + +. +:MSCDEX_LIMITED_SUPPORT +MSCDEX: Смонтированная субдиректория: ограниченная поддержка. + +. +:MSCDEX_INVALID_FILEFORMAT +MSCDEX: Ошибка: ФаКН НийО но является iso иНи cue/bin образами, НийО содержит Ошийки. + +. +:MSCDEX_UNKNOWN_ERROR +MSCDEX: Ошибка: Неизвестная Ошийка. + +. +:MSCDEX_WARNING_NO_OPTION +MSCDEX: Внимание: Игнорирование неподдерживаемой опции %s. + +. +:PROGRAM_RESCAN_SUCCESS +Дисковый кэш очищен. + +. +:PROGRAM_INTRO +Добро пожаловать в DOSBox Staging, эмулятор x86 сО СвукОП и графикой. +DOSBox Staging создает для Вас оболочку, которая выглядит как старый добрый DOS. + +Для получения информации Đž монтировании, введите intro mount +Для получения информации Đž поддержке CD-ROM, введите intro cdrom +Для получения информации Đž "горячих" клавишах, введите intro special +Для йОНоо подробной информации посетите вики-сайт DOSBox Staging: +https://github.com/dosbox-staging/dosbox-staging/wiki + +При вОСникнОвонии Ошийки DOSBox Staging будет закрыт йоС предупреждения! + +. +:PROGRAM_INTRO_MOUNT_START +Вот несколько кОПанд для начала: +Прежде чем Вы сможете использовать файлы вашоК файловой системы, +Вы должны смонтировать директорию, содержащую эти файлы. + + +. +:PROGRAM_INTRO_MOUNT_WINDOWS +╔═════════════════════════════════════════════════════════════════════════╗ +║ mount c c:\dosgames\ создаст диск C с содержимым иС c:\dosgames. ║ +║ ║ +║ c:\dosgames\ это пример. Замените огО свОоК директорией с DOS-играми.  ║ +╚═════════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_OTHER +╔══════════════════════════════════════════════════════════════════════╗ +║ mount c ~/dosgames создаст диск C с содержимым иС ~/dosgames. ║ +║ ║ +║ ~/dosgames это пример. Замените огО свОоК директорией с DOS-играми. ║ +╚══════════════════════════════════════════════════════════════════════╝ + +. +:PROGRAM_INTRO_MOUNT_END +После успошнОгО монтирования диска Вы можете ввести C: чтобы перейти Đş +смонтированному диску C. Введите dir для пОкаСа содержимого. cd позволит Вам +войти в директорию (распознается [] в списко директорий). +Вы можете запускать программы/файлы с расширением .exe .bat и .com. + +. +:PROGRAM_INTRO_CDROM +Монтирование виртуального привода CD-ROM в DOSBox Staging: +DOSBox Staging обеспечивает эмуляцию CD-ROM на нескольких уровнях. + +Это работает вО всех директориях, устанавливается MSCDEX и помечает файлы +только для чтения. Обычно этого достаточно для большинства игр: + +mount D C:\example -t cdrom + +Если это но сработает, Вам, вОСПОМнО, придётся сообщить DOSBox Staging метку CD-ROM: + +mount D C:\example -t cdrom -label метка + +Кроме того, Вы можете использовать imgmount для монтирования iso иНи cue/bin образов: + +imgmount D C:\cd.iso -t cdrom + +. +:PROGRAM_INTRO_SPECIAL +"Горячие" кНавиши: +"Горячие" кНавиши пО умолчанию. +Они могут быть изменены в кНавишнОП маппере. + +" MMOD2_NAME "Enter : Переключение ПоМду полноэкранным и оконным режимами. +" MMOD2_NAME "Pause : Остановить/Возобновить эмуляцию. +" PRIMARY_MOD_NAME "+F1 " PRIMARY_MOD_PAD " : Запустить клавишный маппер. +" PRIMARY_MOD_NAME "+F4 " PRIMARY_MOD_PAD " : Заменить смонтированный образ диска, обновить кэш директорий для + всех дискОв. +" PRIMARY_MOD_NAME "+F5 " PRIMARY_MOD_PAD " : Сохранить сниПОк экрана. +" PRIMARY_MOD_NAME "+F6 " PRIMARY_MOD_PAD " : Начать/Остановить звукозапись. +" PRIMARY_MOD_NAME "+F7 " PRIMARY_MOD_PAD " : Начать/Остановить видеозапись. +" PRIMARY_MOD_NAME "+F9 " PRIMARY_MOD_PAD " : Завершить эмуляцию. +" PRIMARY_MOD_NAME "+F10 " PRIMARY_MOD_PAD " : Захватить/Освободить мышь. +" PRIMARY_MOD_NAME "+F11 " PRIMARY_MOD_PAD " : Понизить скорость эмуляции. +" PRIMARY_MOD_NAME "+F12 " PRIMARY_MOD_PAD " : Повысить скорость эмуляции. +" MMOD2_NAME "F12 : Не ограничивать скорость (турбо режим/перемотка вперёд). + +. +:PROGRAM_BOOT_NOT_EXIST +ФаКН загрузочного диска но существует. Ошибка. + +. +:PROGRAM_BOOT_NOT_OPEN +Невозможно открыть файл загрузочного диска. Ошибка. + +. +:PROGRAM_BOOT_WRITE_PROTECTED +ФаКН образа доступен только для чтения! Это может создать проблемы. + +. +:PROGRAM_BOOT_PRINT_ERROR +Эта кОПанда загружает DOSBox с дискеты иНи с образа жёсткого диска. + +Для этой команды ПОМнО указать последовательность сменных дискет при нажатии +" PRIMARY_MOD_NAME "+F4, и -l указывает смонтированный диск для загрузки. Если йуква диска +но укаСана, пО умолчанию загрузка с диска A. Единственными йукваПи +загрузочного диска являются A, C и D. При загрузке с жёсткого диска (C иНи D), +образ дОНМон быть уМо смонтирован с помощью команды imgmount. + +Синтаксис этой команды: + +boot [дискета_1.img дискета_2.img] [-l ДИСК] + +. +:PROGRAM_BOOT_UNABLE +Невозможно загрузиться с диска %c +. +:PROGRAM_BOOT_IMAGE_OPEN +Открытие образа: %s + +. +:PROGRAM_BOOT_IMAGE_NOT_OPEN +Невозможно открыть %s +. +:PROGRAM_BOOT_BOOT +Загрузка с диска %c... + +. +:PROGRAM_BOOT_CART_WO_PCJR +PCjr картридж наКдон, нО Пашина но PCjr. +. +:PROGRAM_BOOT_CART_LIST_CMDS +Доступные команды PCjr картриджа:%s. +. +:PROGRAM_BOOT_CART_NO_CMDS +Команды картриджа PCjr но найдены. +. +:PROGRAM_LOADROM_SPECIFY_FILE +Должен быть укаСан файл ПЗУ для загрузки. + +. +:PROGRAM_LOADROM_CANT_OPEN +ФаКН ПЗУ недоступен для чтения. + +. +:PROGRAM_LOADROM_TOO_LARGE +ФаКН ПЗУ сНишкОП большой. + +. +:PROGRAM_LOADROM_INCOMPATIBLE +Видео BIOS но поддерживается типом машины. + +. +:PROGRAM_LOADROM_UNRECOGNIZED +ФаКН ПЗУ но распознан. + +. +:PROGRAM_LOADROM_BASIC_LOADED +Базовое ПЗУ загружено. + +. +:SHELL_CMD_IMGMOUNT_HELP +Монтировать образы компакт-дискОв иНи дискет на указанную йукву диска. + +. +:SHELL_CMD_IMGMOUNT_HELP_LONG +Монтировать CD-ROM, дискету иНи образ диска на указанную йукву диска. + +Использование: + imgmount ДИСК CDROM-SET [CDROM-SET_2 [..]] [-fs iso] -t cdrom|iso + imgmount ДИСК IMAGEFILE [IMAGEFILE_2 [..]] [-fs fat] -t hdd|floppy + imgmount ДИСК BOOTIMAGE [-fs fat|none] -t hdd -size геометрия + imgmount -u ДИСК (демонтировать образ диска) + +Где: + ДИСК это йуква диска, на который будет смонтирован образ: A, C, D, ... + CDROM-SET это iso, cue/bin, иНи cue/iso/flac/opus/ogg/mp3/wav образ. + IMAGEFILE это образ жёсткого диска иНи дискеты в формате fat16 иНи fat12. + BOOTIMAGE это образ загрузочного диска с СаданнОК геометрией: + байтов_на_сектор,секторов_на_гОНОвку,гОНОвки,цилиндры. +Примечания: + - " PRIMARY_MOD_NAME "+F4 сменить и смонтировать следующий CDROM-SET иНи IMAGEFILE, осНи Он + укаСан. + +Примеры: + imgmount D /home/имя_пользователя/Games/образ.iso -t cdrom + imgmount D cd/образ.cue -t cdrom + imgmount A дискета_1.img дискета_2.img дискета_3.img -t floppy + imgmount C ~/DOS/диск_C.img -t hdd + imgmount C загрузочный_образ.img -t hdd -fs none -size 512,63,32,1023 + +. +:SHELL_CMD_MOUNT_HELP +Сопоставить физическую директорию с йуквОК виртуального диска DOS. + +. +:SHELL_CMD_MOUNT_HELP_LONG +Монтировать директорию иС операционной системы на йукву виртуального диска DOS. + +Использование: + mount Диск Директория [-t Тип] [-freesize Размер] [-label Метка] + mount -u Диск (демонтировать директорию диска) + +Где: + Диск это йуква диска, куда будет смонтирована директория: A, C, D, ... + Директория это директория на ОС, которая будет смонтирована. + Тип это тип монтируемой директории: dir, floppy, cdrom, or overlay. + Размер это свОйОднОо место виртуального диска (кБ для дискет, МБ для + остального). + Метка это метка диска, которая будет использоваться. + +Примечания: + - '-t overlay' перенаправить запись смонтированного диска в другую директорию. + - Дополнительные опции описаны в руководстве (файл README, гНава 4). + +Примеры: + mount C ~/DOS-игры + mount D "/media/имя_пользователя/наСванио_CD" -t cdrom + mount C ПОи_сохранения -t overlay + +. +:PROGRAM_IMGMOUNT_SPECIFY_DRIVE +Должна быть укаСана йуква диска для монтирования образа. + +. +:PROGRAM_IMGMOUNT_SPECIFY2 +Должен быть укаСан номер диска (0 иНи 3) для монтирования образа на (0,1=fda,fdb;2,3=hda,hdb). + +. +:PROGRAM_IMGMOUNT_SPECIFY_GEOMETRY +Для образов компакт-дискОв: imgmount ДИСК путь_Đş_образу -t iso + +Для образов жёстких_дискОв: Должна быть укаСана геометрия жёсткого диска: +байтов_на_сектор, секторов_на_гОНОвку, гОНОвОк_на_цилиндр,количество_цилиндров. +imgmount ДИСК путь_Đş_образу -size йнс,снг,гнц,кц + +. +:PROGRAM_IMGMOUNT_INVALID_IMAGE +Не удалось загрузить файл образа. +Убедитесь, что путь правильный и образ доступен для чтения. + +. +:PROGRAM_IMGMOUNT_INVALID_GEOMETRY +Не удалось извлечь геометрию диска иС образа. +Для задания геометрии используйте параметр -size йнс,снг,гнц,кц. + +. +:PROGRAM_IMGMOUNT_TYPE_UNSUPPORTED +Тип '%s' но поддерживается. Укажите: 'floppy', 'hdd', 'cdrom' иНи 'iso'. + +. +:PROGRAM_IMGMOUNT_FORMAT_UNSUPPORTED +Формат '%s' но поддерживается. Укажите: 'fat', 'iso' иНи 'none'. + +. +:PROGRAM_IMGMOUNT_SPECIFY_FILE +Должен быть укаСан файл образа. + +. +:PROGRAM_IMGMOUNT_FILE_NOT_FOUND +ФаКН образа но наКдон. + +. +:PROGRAM_IMGMOUNT_MOUNT +Для монтирования директорий используйте кОПанду mount, Đ° но кОПанду imgmount. + +. +:PROGRAM_IMGMOUNT_ALREADY_MOUNTED +Диск уМо смонтирован на этой йукво. + +. +:PROGRAM_IMGMOUNT_CANT_CREATE +Невозможно создать диск иС файла. + +. +:PROGRAM_IMGMOUNT_MOUNT_NUMBER +Номер диска %d смонтирован как %s. + +. +:PROGRAM_IMGMOUNT_NON_LOCAL_DRIVE +Образ дОНМон быть на хосте иНи локальном диско. + +. +:PROGRAM_IMGMOUNT_MULTIPLE_NON_CUEISO_FILES +Использование нескольких файлов вОСПОМнО только для cue/iso образов. + +. +:PROGRAM_KEYB_INFO +Кодовая страница %i загружена. + +. +:PROGRAM_KEYB_INFO_LAYOUT +Для раскладки клавиатуры %s загружена кодовая страница %i. + +. +:PROGRAM_KEYB_SHOWHELP +keyb [ID_раскладки_клавиатуры[ №_кОдОвОК_страницы[ файл_кОдОвОК_страницы]]] + +Примеры: + keyb: Отобразить текущую кодовую страницу. + keyb ru: Загрузить русскую раскладку (ru), с подходящей кОдОвОК страницей. + keyb ru 808: Загрузить русскую раскладку (ru), с кОдОвОК страницей 808. + keyb ru 808 russian.txt: ТО Мо саПОо, нО использовать файл russian.txt. +. +:PROGRAM_KEYB_NOERROR +РаскНадка клавиатуры %s загружена для кОдОвОК страницы %i. + +. +:PROGRAM_KEYB_FILENOTFOUND +ФаКН раскладки клавиатуры %s но наКдон. + + +. +:PROGRAM_KEYB_INVALIDFILE +Неверный файл раскладки клавиатуры %s. + +. +:PROGRAM_KEYB_LAYOUTNOTFOUND +Нет раскладки клавиатуры в %s для кОдОвОК страницы %i. + +. +:PROGRAM_KEYB_INVCPFILE +Нет иНи неверный файл кОдОвОК страницы для раскладки клавиатуры %s. + + +. +:SHELL_ILLEGAL_PATH +Запрещённый путь. + +. +:SHELL_CMD_HELP +Для пОкаСа списка всех доступных кОПанд, введите help /all. +Краткий списОк часто используемых кОПанд: + +. +:SHELL_CMD_ECHO_ON +Включён режим вывода кОПанд на экран. + +. +:SHELL_CMD_ECHO_OFF +Выключен режим вывода кОПанд на экран. + +. +:SHELL_ILLEGAL_SWITCH +Запрещённый переключатель: %s. + +. +:SHELL_MISSING_PARAMETER +Отсутствует обязательный параметр. + +. +:SHELL_CMD_CHDIR_ERROR +Невозможно изменить в: %s. + +. +:SHELL_CMD_CHDIR_HINT +Подсказка: Для перехода на другой диск введите %C: + +. +:SHELL_CMD_CHDIR_HINT_2 +Имя директории дНинноо восьми сиПвОНОв и/иНи содержит пробелы. +Попробуйте ввести cd %s. + +. +:SHELL_CMD_CHDIR_HINT_3 +Вы всё ещё находитесь на диско Z, для перехода на диск C, введите C:. + +. +:SHELL_CMD_DATE_HELP +Отобразить иНи изменить внутреннюю дату. + +. +:SHELL_CMD_DATE_ERROR +Указанная дата неправильная. + +. +:SHELL_CMD_DATE_DAYS +2ВсПнВтСрЧтПтСб +. +:SHELL_CMD_DATE_NOW +Сегодня: +. +:SHELL_CMD_DATE_SETHLP +Для изменения даты, введите 'date MM-DD-YYYY'. + +. +:SHELL_CMD_DATE_FORMAT +D.M.Y +. +:SHELL_CMD_DATE_HELP_LONG +date [[/t] [/h] [/s] | MM-DD-YYYY] + MM-DD-YYYY: Установить новую дату. + /s: Использовать время и дату операционной системы для времени DOS. + /f: Вернуться Đş внутреннему времени DOSBox (противоположность /s). + /t: Только показать дату. + /h: Синхронизировать с операционной системой. + +. +:SHELL_CMD_TIME_HELP +Отобразить внутреннее время. + +. +:SHELL_CMD_TIME_NOW +Сейчас: +. +:SHELL_CMD_TIME_HELP_LONG +time [/t] [/h] + /t: Только показать время. + /h: Синхронизировать с операционной системой. + +. +:SHELL_CMD_MKDIR_ERROR +Невозможно создать: %s. + +. +:SHELL_CMD_RMDIR_ERROR +Невозможно удалить: %s. + +. +:SHELL_CMD_DEL_ERROR +Невозможно удалить: %s. + +. +:SHELL_SYNTAXERROR +Синтаксис команды неверный. + +. +:SHELL_CMD_SET_NOT_SET +Переменная окружения %s но определена. + +. +:SHELL_CMD_SET_OUT_OF_SPACE +Недостаточно свОйОднОгО места для хранения переменных окружения операционной системы. + +. +:SHELL_CMD_IF_EXIST_MISSING_FILENAME +IF EXIST: Отсутствует имя файла. + +. +:SHELL_CMD_IF_ERRORLEVEL_MISSING_NUMBER +IF ERRORLEVEL: Отсутствует номер. + +. +:SHELL_CMD_IF_ERRORLEVEL_INVALID_NUMBER +IF ERRORLEVEL: Неверный номер. + +. +:SHELL_CMD_GOTO_MISSING_LABEL +No label supplied to GOTO command. +Отсутствует метка для команды GOTO. + +. +:SHELL_CMD_GOTO_LABEL_NOT_FOUND +GOTO: Метка %s но наКдона. + +. +:SHELL_CMD_FILE_NOT_FOUND +ФаКН %s но наКдон. + +. +:SHELL_CMD_FILE_EXISTS +ФаКН %s уМо существует. + +. +:SHELL_CMD_DIR_VOLUME +Объем на диско %c - %s. + +. +:SHELL_CMD_DIR_INTRO +Директория %s. + +. +:SHELL_CMD_DIR_BYTES_USED +%17d файлы %21s байт. + +. +:SHELL_CMD_DIR_BYTES_FREE +%17d директории %21s байт свОйОднО. + +. +:SHELL_EXECUTE_DRIVE_NOT_FOUND +Диск %c но существует! +Нужно использовать mount. Для большей информации введите intro иНи intro mount. +. +:SHELL_EXECUTE_ILLEGAL_COMMAND +Запрещённая кОПанда: %s. + +. +:SHELL_CMD_PAUSE +Для продолжения нажмите любую кНавишу... +. +:SHELL_CMD_PAUSE_HELP +Ждёт ОднО нажатие кНавиши, чтобы продолжить. + +. +:SHELL_CMD_COPY_FAILURE +Ошибка копирования : %s. + +. +:SHELL_CMD_COPY_SUCCESS + %d файлов скопировано. + +. +:SHELL_CMD_SUBST_NO_REMOVE +Невозможно удалить, диск но используется. + +. +:SHELL_CMD_SUBST_FAILURE +Ошибка subst. Допущена Ошийка в кОПанднОК строке, иНи диск уМо используется. +Использовать subst ПОМнО только на локальных дисках. +. +:SHELL_STARTUP_BEGIN +╔════════════════════════════════════════════════════════════════════╗ +║ Добро пожаловать в DOSBox Staging %-32s ║ +║ ║ +║ Для быстрого ознакомления введите: intro ║ +║ Для поддерживаемых оболочкой кОПанд введите: help ║ +║ ║ +║ Чтобы подстроить скорость, нажмите " PRIMARY_MOD_NAME "+F11 и " PRIMARY_MOD_NAME "+F12." PRIMARY_MOD_PAD PRIMARY_MOD_PAD " ║ +║ Чтобы переназначить кНавиши, нажмите " PRIMARY_MOD_NAME "+F1." PRIMARY_MOD_PAD " ║ +║ Чтобы узнать больше, прочтите файл README в директории DOSBox. ║ +║ ║ + +. +:SHELL_STARTUP_CGA +║ DOSBox поддерживает композитный CGA-режим. ║ +║ F12 изменяет композитный вывод: вкН, выкл иНи авто (пО умолчанию). ║ +║ (" MMOD2_NAME "+)F11 меняет оттенок; " MMOD1_NAME "+" MMOD2_NAME "+F11 выберите ранний/пОСдниК тип CGA." PRIMARY_MOD_PAD " ║ +║ ║ + +. +:SHELL_STARTUP_CGA_MONO +║ F11 изменяет режим: зелёный, янтарный, белый иНи йуПаМнО-белый, ║ +║ и " MMOD2_NAME "F11 изменяет настройки яркости/контрастности. ║ + +. +:SHELL_STARTUP_HERC +║ F11 изменяет монохромный цвет: белый, янтарный иНи зелёный. ║ +║ ║ + +. +:SHELL_STARTUP_DEBUG +║ " MMOD2_NAME "Pause входит в отладчик иНи запускает приложение через debug. ║ +║ ║ + +. +:SHELL_STARTUP_END +║ https://dosbox-staging.github.io ║ +╚════════════════════════════════════════════════════════════════════╝ + + +. +:SHELL_STARTUP_SUB +dosbox-staging %s + +. +:SHELL_CMD_CHDIR_HELP +Показывает/изменяет текущую директорию. + +. +:SHELL_CMD_CHDIR_HELP_LONG +chdir [ДИСК:][путь] +chdir [..] +cd [ДИСК:][путь] +cd [..] + + .. Указатель на родительскую директорию. + +cd ДИСК: отобразить текущую директорию на укаСаннОП диско. +cd: отобразить текущий диск и директорию. + +. +:SHELL_CMD_CLS_HELP +Очистить экран. + +. +:SHELL_CMD_DIR_HELP +Отобразить списОк файлов и субдиректорий в директории. + +. +:SHELL_CMD_DIR_HELP_LONG +dir [ДИСК:][путь][имя_файла] [/[w|b]] [/p] [/[ad]|[a-d]] [/o[-][n|e|s|d]] + + [ДИСК:][путь][имя_файла] + Указать диск, директорию и/иНи списОк файлов. + /w Использовать расширенный формат. + /b Использовать краткий формат (йоС СагОНОвкОв и прочей информации). + /p Останавливаться пОсНо каМдОгО экрана, СапОНноннОгО информацией. + /ad Отобразить всо каталоги. + /a-d Отобразить всо файлы. + /o Сортировать списОк файлов. + - Префикс обратной сортировки + сортировка n По иПони (алфавитная) s По размеру (от наименьшего) + e По расширению (алфавитная) d По дате и времени (от старейшего) + +. +:SHELL_CMD_ECHO_HELP +Отображать сообщения и включить/выключить режим вывода кОПанд на экран. + +. +:SHELL_CMD_EXIT_HELP +Выход иС оболочки. + +. +:SHELL_CMD_HELP_HELP +Показать справочную информацию. + +. +:SHELL_CMD_MKDIR_HELP +Создать директорию. + +. +:SHELL_CMD_MKDIR_HELP_LONG +mkdir [ДИСК:][путь] +md [ДИСК:][путь] + +. +:SHELL_CMD_RMDIR_HELP +Удалить директорию. + +. +:SHELL_CMD_RMDIR_HELP_LONG +rmdir [ДИСК:][путь] +rd [ДИСК:][путь] + +. +:SHELL_CMD_SET_HELP +Изменить переменные окружения. + +. +:SHELL_CMD_IF_HELP +Выполнить условную обработку в пакетных программах. + +. +:SHELL_CMD_GOTO_HELP +Перейти Đş помеченной строке в пакетном скрипте. + +. +:SHELL_CMD_SHIFT_HELP +Параметры кОПанднОК строки обратного сдвига в пакетном скрипте. + +. +:SHELL_CMD_TYPE_HELP +Отобразить содержимое текстового файла. + +. +:SHELL_CMD_TYPE_HELP_LONG +type [ДИСК:][путь][имя_файла] + +. +:SHELL_CMD_REM_HELP +Добавить комментарий в пакетный файл. + +. +:SHELL_CMD_REM_HELP_LONG +rem [комментарий] + +. +:SHELL_CMD_NO_WILD +Это простая версия команды, спецсимволы запрещены! + +. +:SHELL_CMD_RENAME_HELP +Переименовать Один иНи несколько файлов. + +. +:SHELL_CMD_RENAME_HELP_LONG +rename [ДИСК:][путь]имя_файла_1 имя_файла_2. +ren [ДИСК:][путь]имя_файла_1 имя_файла_2. + +Обратите вниПанио, что новОСПОМнО указать новый диск иНи путь Đş целевому файлу. + +. +:SHELL_CMD_DELETE_HELP +Удалить Один иНи несколько файлов. + +. +:SHELL_CMD_COPY_HELP +Копировать файлы. + +. +:SHELL_CMD_CALL_HELP +Запустить пакетный файл иС другого пакетного файла. + +. +:SHELL_CMD_SUBST_HELP +Назначить диску внутреннюю директорию. + +. +:SHELL_CMD_LOADHIGH_HELP +Загрузить программу в верхнюю память (требует xms=true,umb=true). + +. +:SHELL_CMD_LS_HELP +ХписОк содержимого директории. + +. +:SHELL_CMD_LS_HELP_LONG +ls [/?] [шайНОн] + +. +:SHELL_CMD_LS_PATH_ERR +ls: новОСПОМнО получить доступ Đş "%s": Нет такого файла иНи директории. + +. +:SHELL_CMD_CHOICE_HELP +Ждать нажатия кНавиши и установки ERRORLEVEL. + +. +:SHELL_CMD_CHOICE_HELP_LONG +choice [/c:кНавиши] [/n] [/s] текст + /c[:]кНавиши - Определяет допустимые кНавиши. По умолчанию: yn. + /n - Не отображать варианты в конце запроса. + /s - Определить регистрозависимый выбор. + текст - Текст, отображаемый в качестве пОдскаСки. + +. +:SHELL_CMD_ATTRIB_HELP +Ничего но делает. Обеспечена совместимость. + +. +:SHELL_CMD_PATH_HELP +Обеспечена совместимость. + +. +:SHELL_CMD_VER_HELP +Показать иНи установить версию DOS. + +. +:SHELL_CMD_VER_HELP_LONG +Использование: + ver + ver set версия + +Где: + версия может быть целым числом, например 5, иНи десятичной дробью, + например: 6.22, 7.01 иНи 7.10. Десятичная дробь может + разделяться пробелом, например: 6 22 иНи 7 01, иНи 7 10. + +Примечания: + Версию DOS ПОМнО, также, установить в файле конфигурации в разделе [dos] + с помощью настройки "ver = версия". + +Примеры: + ver set 6.22 + ver set 7 10 + +. +:SHELL_CMD_VER_VER +Версия DOSBox Staging %s +Версия DOS %d.%02d + +. +:SHELL_CMD_VER_INVALID +Неправильная версия DOS. + +. diff -Nru dosbox-staging-0.76.0/CONTRIBUTING.md dosbox-staging-0.77.0/CONTRIBUTING.md --- dosbox-staging-0.76.0/CONTRIBUTING.md 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/CONTRIBUTING.md 2021-07-02 15:47:39.000000000 +0000 @@ -6,18 +6,17 @@ - [1. Feature requests and bug reports](#feature-requests-and-bug-reports) - [2. Find something to work on](#find-something-to-work-on) -- [3. Build dosbox-staging](#build-dosbox-staging) -- [4. Contributing code](#contributing-code) - - [4.1. Coding style](#coding-style) - - [4.1.1. Language](#language) - - [4.1.2. Code Formatting](#code-formatting) - - [4.1.3. Additional Style Rules](#additional-style-rules) - - [4.2. Submitting patches / Pull Requests](#submitting-patches--pull-requests) - - [4.2.1. Commit messages](#commit-messages) - - [4.2.2. Commit messages for patches authored by someone else](#commit-messages-for-patches-authored-by-someone-else) -- [5. Tools](#tools) - - [5.1. Using clang-format](#using-clang-format) - - [5.2. Summarize warnings](#summarize-warnings) +- [3. Contributing code](#contributing-code) + - [3.1. Coding style](#coding-style) + - [3.1.1. Language](#language) + - [3.1.2. Code Formatting](#code-formatting) + - [3.1.3. Additional Style Rules](#additional-style-rules) + - [3.2. Submitting patches / Pull Requests](#submitting-patches--pull-requests) + - [3.2.1. Commit messages](#commit-messages) + - [3.2.2. Commit messages for patches authored by someone else](#commit-messages-for-patches-authored-by-someone-else) +- [4. Tools](#tools) + - [4.1. Using clang-format](#using-clang-format) + - [4.2. Summarize warnings](#summarize-warnings) # Feature requests and bug reports @@ -46,8 +45,8 @@ of potential code improvements), and try to eliminate them. - Look through our static analysis reports, pick an issue, investigate if the problem is true-positive or false-positive and if the code can be improved. - See artifacts/reports in: [Clang][code-analysis], [Coverity][coverity], - [PVS][pvs] + See artifacts/reports in: [Clang][clanga], [Coverity][coverity], + [PVS][pvs], [LGTM]. - Look at our groomed list of features we want implemented in the [Backlog](https://github.com/dosbox-staging/dosbox-staging/projects/3) - if the issue is not assigned to anyone, then it's for the pickings! Leave a @@ -65,37 +64,10 @@ If you plan to work on a new, bigger feature - then it might be good idea to discuss it with us early, e.g. by creating a new bugtracker issue. -[pvs]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22PVS-Studio+analysis%22 -[code-analysis]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Code+analysis%22 -[coverity]: https://scan.coverity.com/projects/dosbox-staging - -# Build dosbox-staging - -Install dependencies listed in [README.md][readme-b]; take a moment to read -[INSTALL][install] file as well. You can also learn longer list of dependencies -for other build systems by running script `./scripts/list-build-dependencies.sh`. - -Detailed build instructions are in [BUILD.md][build-doc] file. - -Example build instructions appropriate for development: - -``` shell -./autogen.sh -./configure CFLAGS="-g -fdiagnostics-color -O0 -Wall -Weffc++" \ - CXXFLAGS="-g -fdiagnostics-color -O0 -Wall -Weffc++" -make -j$(nproc) |& tee build.log -./scripts/count-warnings.py build.log -``` - -You can also use `./scripts/build.sh` script, which includes configurations -for various build types and operating systems. - -For development, it's recommended to use `ccache` - it can speed up your clean -builds by up to 60x. - -[readme-b]: https://github.com/dosbox-staging/dosbox-staging#build-instructions -[install]: https://github.com/dosbox-staging/dosbox-staging/blob/master/INSTALL -[build-doc]: https://github.com/dosbox-staging/dosbox-staging/blob/master/BUILD.md +[coverity]: https://scan.coverity.com/projects/dosbox-staging/ +[lgtm]: https://lgtm.com/projects/g/dosbox-staging/dosbox-staging/ +[clanga]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Code+analysis%22 +[pvs]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22PVS-Studio+analysis%22 # Contributing code @@ -106,7 +78,7 @@ have their own coding conventions). Rules outlined below apply to new code landing in master branch. -Do not do mass reformating or renaming of existing code. +Do not do mass reformatting or renaming of existing code. ### Language @@ -178,7 +150,7 @@ "the seven rules" :) The only exception to these rules are commits landing from our upstream project, -so occassionally you might find a commit originating from `svn/trunk` branch, +so occasionally you might find a commit originating from `svn/trunk` branch, that does not follow them. There are no other exceptions. [How to Write a Git Commit Message]:https://chris.beams.io/posts/git-commit/ @@ -232,7 +204,7 @@ Download `clang-format.py` file somewhere, and make it executable: - $ curl "https://raw.githubusercontent.com/llvm/llvm-project/master/clang/tools/clang-format/clang-format.py" > ~/.vim/clang-format.py + $ curl "https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/clang-format.py" > ~/.vim/clang-format.py $ chmod +x ~/.vim/clang-format.py Then add following lines to your `.vimrc` file: diff -Nru dosbox-staging-0.76.0/debian/changelog dosbox-staging-0.77.0/debian/changelog --- dosbox-staging-0.76.0/debian/changelog 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/changelog 2021-07-03 03:39:07.000000000 +0000 @@ -1,4 +1,46 @@ -dosbox-staging (0.76.0-1+ubuntu20.10) groovy; urgency=medium +dosbox-staging (0.77.0-1+ubuntu20.10) groovy; urgency=medium + + * [478cf263] d/patches,control,rules: + + patches: Drop add-leading-PATH-to-hicolor-in... + New Makefile available upstream + + control: Remove Build-Depends: librsvg2-bin + Generation of icon files no longer required + + rules: Amend contrib/icons make command + * [0177e2e4] Update debian/copyright + * [ebe2d86d] d/patches: Include sf3 in soundfont search + - Drop fluidsynth/set-fluidsynth-soundfont.patch + + Add fluidsynth/add-sf3-soundfont-search.patch + searching for soundfont appends {,-GM}.sf{2,3} + * [aa42fa59] Update debian/copyright + * [0ededc32] d/patches: Add Prioritise-SF3-over-SF2-SoundFont + * [e48d9178] d/control: + - Remove Suggests: fluid-soundfont-gm + Appears to be unmaintained. + + Add Recommends: musescore-general-soundfont | + musescore-general-soundfont-lossless | + musescore-general-soundfont-small + * [74148d80] Refresh debian/patches + * [b541dd21] d/patches: Add bash completion script + * [05d431fa] Refresh debian/patches + * [332f70c9] Refresh SF3-with-static-fluidsynth.patch + * [b07841e4] d/rules: Use pkg-config feature in contrib/static-fluidsynth + * [df2f3580] d/control: Fixes and Cleanup + * [f1587d20] d/rules: Set DEB_BUILD_MAINT_OPTIONS=hardening=+all + * [57a602db] d/rules: Simplify DEB_CFLAGS_MAINT_STRIP + * [d1fbd6ab] d/patches: Refresh FluidSynth SoundFont patches + * [3e70f6ca] d/rules,control/: Switch to Meson Build System + * [26f17760] d/patches: + + Refresh patches + + New Patch: set_debugger_conf_suffix.patch + * [b56a9893] Rediff patches + * [d3205962] d/control: Build-Depends: libmt32emu-dev (>= 2.5.0) + + * DOSBox Staging 0.77.0 release + - https://dosbox-staging.github.io/v0-77-0/ + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Sat, 03 Jul 2021 03:39:07 +0000 + +dosbox-staging (0.76.0-1) unstable; urgency=medium [ Feignint ] * [f6224878] d/*: generate hicolor icons diff -Nru dosbox-staging-0.76.0/debian/changelog-weekly dosbox-staging-0.77.0/debian/changelog-weekly --- dosbox-staging-0.76.0/debian/changelog-weekly 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/changelog-weekly 2021-07-03 03:39:07.000000000 +0000 @@ -1,3 +1,1432 @@ +dosbox-staging (0.77.0~alpha~921~gf07d-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @5af5273a1afbc1e0a2e0627f2efa3e6d0f6422c7 ** + + * UNRELEASED + + [ kcgen ] + * [c8379962] Use pure integer arithmetic in residfp's SincResampler + * [8add4da4] Mitigate an incorrect optimization by Clang in STB Vorbis + * [b1fff0f6] Fix undefined behavior (integer overflow) in STB Vorbis + * [a41ece1c] Sync STB Vorbis with upstream v1.20 + * [89776e2d] Move the notification about non-standard characters to DEBUG_LOG + * [df687daa] Allow static linking for mt32emu in Meson + + [ Patryk Obara ] + * [f07d78f1] Adjust formatting of mixer midi list + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 02 Jul 2021 04:16:30 +0000 + +dosbox-staging (0.77.0~alpha~906~g689b2-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @5cedad02e06dc5b3685213bee1760b386dec143c ** + + * UNRELEASED + + [ Kirk ] + * [aee45d46] minor cleanup and add microsecond functions + * [71a61ca0] backwards-compatible precise delay + * [a0bda0c1] use our own function + * [7abd9005] better variable name + * [adbac2cd] loosen interval and remove testing flag + * [1eb48a84] fix incorrect seed values + * [7d2bc2c6] include cmath header and use namespace + * [6ab32bd8] minor cleanup + * [30e07c58] PR feedback + + [ Otto Urpelainen ] + * [8aae97ff] Fix test crash when using GLIBCXX_ASSERTIONS + + [ drfiemost ] + * [d232e955] Sync PVS Studio fixes in residfp from upstream + + [ kcgen ] + * [82d5d250] Add an "auto" setting for the Innovation SID chip + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 25 Jun 2021 04:09:55 +0000 + +dosbox-staging (0.77.0~alpha~893~gb8ef-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @1bc690bab63b2507c42d2d4b146d199b44ba6a36 ** + + * UNRELEASED + + [ ripsaw8080 ] + * [920c1db6] Remove unused class template. + + [ David Reid ] + * [7a3b2806] Sync dr_wav with upstream (v0.12.20) + + [ kcgen ] + * [48b14105] Adjust MT-32 settings based on listening tests + * [55582db8] Reinstate static analysis link to PVS Studio runs README.md + + [ Patryk Obara ] + * [b8efb8c8] Adjust URL to LLVM's clang-format.py script + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 18 Jun 2021 04:16:43 +0000 + +dosbox-staging (0.77.0~alpha~888~gaccf8-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @6d2354340888b0b9b3bbe653b8889b0a03a842a7 ** + + * UNRELEASED + + [ Wengier ] + * [9c12b735] Expand environment variables in the DOS shell + + [ kcgen ] + * [dad52f84] Add a TODO statement regarding improving env-expansions + + [ ripsaw8080 ] + * [044f3557] Adjust BP debugger command to work in real mode (Fixes: #960) + + [ Patryk Obara ] + * [dc3f84e8] Do small cleanup in CheckBreakpoint method + + [ Kirk ] + * [f720d887] Add "auto" priority value + * [2033d23a] remove whitespace to fix "inactive" priority value + * [e28602b9] cleanup a few issues in dyn_cache.h + + [ kcgen ] + * [ba14208e] Move handling of MT-32 service, model, and dirs to functions + * [7d783458] Add a model name-match fn to LASynth Model + * [09ce0b69] Add feature to list MT-32 directories and models + * [8fb07dea] Adjust MT-32 auto-loading order + * [7778dade] Fix a small typo in the 'mt32' config model names. + + [ Kirk ] + * [bd011619] implement W^X logic for Win32 + + [ ripsaw8080 ] + * [48df9eb1] Fix regression in r4444: Hercules machine type cursor translation. + + [ kcgen ] + * [dae0f5c9] Fix spacing in CGA hotkey line of intro banner + * [403879ca] Use PS/1 BIOS identifiers when PS/1 Audio is enabled + * [ef7af26d] Fix a potential memory out-of-bounds access in PS/1 Audio + * [498da348] Add to and fixup some grammar in THANKS + * [3481bb73] Fix and expand thanks to supporters + + [ Wengier ] + * [d6da7df7] Use regular expression to expand shell variables + + [ Kirk ] + * [9a8ba76b] fix high competing CPU load sluggishness + * [7f6297a1] convert SDL to STL functions for GetTicks and Delay + * [2cdd5397] fix slow dynamic core + * [a2bfe33a] experimental dynamic codegen optimization + + [ kcgen ] + * [accf8cfa] Filter residfp sources in vs-package solution + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 11 Jun 2021 04:18:01 +0000 + +dosbox-staging (0.77.0~alpha~857~g2e93f-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @bafdd6e787ebcd6488d6b6763ca41796cb121275 ** + + * UNRELEASED + + [ Dennis LĂźhring ] + * [9dbd08a4] Add unit tests to the VS2019 solution + + [ kcgen ] + * [f05f2226] Add GoogleTest to the list of vcpkg's in README + + [ Sjoerd van der Berg ] + * [a29ce37f] Enable A20 routines in bios + + [ kcgen ] + * [f4f03497] Explicitly fallthrough in FixEA16's switch + + [ ripsaw8080 ] + * [a26e20d1] Function for video BIOS Display Combination Code. + * [306280bd] Additive to r4344, use rawch() variant with pdcurses + + [ kcgen ] + * [7af75b66] Finalize all dangling child classes + * [370ab962] Handle the keyboard 'GUI' or 'command ⌘' key as MMOD3 + * [1581a0a4] Use the 'command ⌘' key on macOS for F-key actions + * [31aebd57] Add a FAQ entry describing modern F1-F12 key activation issues + * [4e706702] Differentiate macOS Cmd-F vs. Ctrl-F in help screens + * [f64c4799] Update README describing use of Cmd+F and Opt on macOS + * [5bf6f4ea] Describe how to fix common key conflicts on macOS + * [2e9fee44] Localize the VisualStudio gitignore rules for the unit tests + * [73daa092] Tailor VisualStudio release and debug build settings + * [d6825d34] Locate unit test outputs in VisualStudio similar to the main project + * [48d0a941] Build and run the unit tests under VisualStudio and CI + * [ab9b7bef] Move dangling VisualStudio sources into respective filter trees + * [e242f9bb] Work-around the known-bugged VS2019 16.10 version + * [7ade3242] Work-around the known-bugged VS2019 16.10 version + * [95a85ba0] Fix segfault on initialization of MAME OPL3 + * [89b9d9f8] Check device pointer before logging in MAME OPL + * [bb6be32a] Remove dead-code from MAME OPL destroy calls + * [5118bd23] Add a left-shift support function for signed values + * [cbecc069] Perform safe left-shift of signed values in MAME OPL + * [197dcd78] Add support tests to Visual Studio tests solution + * [42a09f5e] Fix shifting of negative samples in DB OPL + * [4aac3e9e] Ensure input is focused when fullscreen to avoid stranding + * [5e120466] Don't shift negative values (undefined behavior) + * [9fd81a79] Use a lookup table to convert 8-to-16 bit samples + * [ff42c8e4] Process SDL's event queue prior to each host video frame + * [baba5ab9] Eliminate existing poll-throttling counters + + [ Kirk ] + * [649a428d] Dynamic core support for W^X systems + * [bcaf765b] Generalize texture format selection for SCREEN_TEXTURE + + [ kcgen ] + * [f27f635d] Use write_unaligned* in decode_* functions + * [a7be3802] Multiply the index value instead of shifting negative values + * [5669f694] Reinterpret-cast the table address to a CodePageHandler + + [ Joshua Krämer ] + * [630cecf1] Use overloaded function to handle strerror_r variants + + [ kcgen ] + * [44181510] Make minor style adjustment to strerror_r result + * [a3589cd3] Import PS/1 Audio support from DOSBox-X + * [7bd8812f] Rename PS/1 Sound to PS/1 Audio for consistency + * [05479834] Reorder PS/1 Audio headers + * [bdf83ba6] Use the standard configuration setup for PS/1 Audio + * [f0d32ce3] Localize BIOS check for PS/1 Audio presence + * [0b1342cd] Add PS/1 Audio to build system + * [b2969a80] Toggle the PS/1 Audio on-and-off using a bool paramater + * [cc4b5d69] Reorganize PS/1 Audio setup, reset, and destroy functions + * [d6bde870] Replace PS/1 Audio defines with constexpr + * [0cf244ea] Use snake-case for PS/1 Audio channel members + * [6c8ba0be] Rename and group PS/1 Audio struct members + * [c9a9c1c5] Group the PS/1 DAC, Synth, and Register members in structs + * [ea13a9ca] Reorganize PS/1 Audio functions into class members + * [c81a7a7e] Drop the PS/1 Audio ineffective size thresholds + * [726456ca] Drop more dead PS/1 Audio code and unhelpful comments + * [0ddcc2e8] Move PS/1 Audio synth clock rate and comment to constexpr + * [29f4e165] Fully separate PS/1 into DAC and Synth + * [81c0427a] Localize PS/1 Audio constants inside either the Dac or Synth + * [4295ccd6] Group and enable Synth functionality within PS/1 Audio + * [d4a09eec] Remove non-standard debugging from PS/1 Audio + * [0cb5e1c2] Limit PS/1 Audio sizes on ports, data, and samples + * [777d81ce] Reformat PS/1 Audio whitespace + * [867da7a1] Add The DOSBox Staging Team to the PS/1 Audio Copyright header + * [ed709d32] Reduce PS/1 Audio counter types based on actual limits + * [e9b54487] Assign PS/1 Audio IRQ to a variable + * [2b46a016] Drop "rate" as a member from PS/1 Audio DAC + * [7a5242d3] Replace C-casts in PS/1 Audio + * [33c86b38] Turn PS/1 Audio channel wake and sleep routine into functions + * [542f5d7a] Toggle PS/1 Audio using constructors and destructors + * [09dda48e] Detect and correct PS/1 Audio signal bias + * [2aa93d87] Improve descriptions of variables in PS/1 Audio + * [09704fbd] Breakout PS/1 Audio DAC port calls into separate functions + * [7e8b2932] Squash a couple type-conversion warnings in PS/1 Audio + * [658567ef] Fix an array vs singleton issue in PS/1 Audio + + [ Dag Lem ] + * [215764a4] Import reSIDfp from libsidplayfp, a C64 music player library + + [ kcgen ] + * [a9ddaff2] Exclude VisualStudio from reSIDfp's EXPECT define + * [3774ad12] Fix include path in reSIDfp + * [130c18df] Remove C++11 differentations from reSIDfp + * [d0bbac00] Fix effective C++ warnings in reSIDfp + * [b0f9f5f7] Fix unused variable warnings in reSIDfp + * [f45360bc] Fix loss-of-precision warnings in reSIDfp + + [ Jonathan Campbell ] + * [bf46cc89] Import Innovation SSI-2001 implementation + + [ kcgen ] + * [42c0beff] Refactor, thread, and update Innovation to support reSIDfp + * [a4d148bd] Add reSIDfp and Innovation SSI-2001 to the buildsystem + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 04 Jun 2021 05:35:40 +0000 + +dosbox-staging (0.77.0~alpha~761~gdc029-1) unstable; urgency=medium + + * UNRELEASED + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 28 May 2021 05:31:09 +0000 + +dosbox-staging (0.77.0~alpha~759~g77b4-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @8e78a52a1899ed7ec6f5164633d136e8c9380af1 ** + + * UNRELEASED + + [ kcgen ] + * [f497a0f4] Don't underflow when removing trailing spaces + + [ nukeykt ] + * [994084c8] Eliminate left shift of negative-value in Nuked OPL emulator + + [ kcgen ] + * [77b480b1] Clarify feature differences are without patches + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 21 May 2021 04:25:15 +0000 + +dosbox-staging (0.77.0~alpha~755~gba21-1) unstable; urgency=medium + + * UNRELEASED + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 14 May 2021 04:25:28 +0000 + +dosbox-staging (0.77.0~alpha~755~gba21-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @c7078cd5fd6e620461a14cf82fc0310f3941ed90 ** + + * UNRELEASED + + [ ripsaw8080 ] + * [fea35234] Add support for DMF floppy disk images. + * [29148ec5] Function for setting BIOS equipment word. Correct floppy disk density notes. + * [80b3c676] Preserve DOS error code when checking file existence on the FAT drive. Fixes regression related to r4442. + + [ kcgen ] + * [f7cad621] Format the shell's < redirect handler + * [86d8fe73] Fix input < redirect handling in shell + + [ IPeluchito ] + * [39a0bda8] Create new es_ES translation + + [ Patryk Obara ] + * [82e806c1] Add es_ES to encoding script + * [673a9723] Remove old Spanish translation file + + [ kcgen ] + * [f59031db] Refresh the FluidSynth wrap to use 2.2.0 + + [ Patryk Obara ] + * [cdc11675] Fix formatting of few strings in es_ES translation + * [caca8b34] Generate new translation files + + [ kcgen ] + * [b3acc39b] Document how to build a debugger-enabled binary in Visual Studio + + [ Peter Veenstra ] + * [669c5f55] Make compilation easier with certain compilers and file systems. + * [88278c99] win64 changes. (jmarsh) + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 07 May 2021 04:20:09 +0000 + +dosbox-staging (0.77.0~alpha~740~gd8a1-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @2606f26c06541e016eaf6b6b13494a409665923c ** + + * UNRELEASED + + [ ripsaw8080 ] + * [dab6a7c8] Attribute Controller port alias on EGA machine. Fixes EGA display of older Super Pac-Man release. + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 30 Apr 2021 04:18:49 +0000 + +dosbox-staging (0.77.0~alpha~737~ged8c7-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @d32059626a597e24de09ebede4d9b8a0d350d9f8 ** + + * [d3205962] d/control: Build-Depends: libmt32emu-dev (>= 2.5.0) + + [ ripsaw8080 ] + * [4a4ebc25] Small adjustment of S3 rectangle pattern fill. Fixes display glitch in Creative Writer and Fine Artist. + + [ kcgen ] + * [fff64a55] Add mt32emu to Windows builds + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 23 Apr 2021 04:22:31 +0000 + +dosbox-staging (0.77.0~alpha~732~g4c0a9-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @005a7a21dc18faffebb62b7d72f921b15d5592d5 ** + + * [b56a9893] Rediff patches + * [005a7a21] d/patches: Revert mt32emu version bump (Closes: #15) + + [ Peter Veenstra ] + * [30ee7bff] Fix and improve index and index_add after r4408. (used when reduce and need are not the same) + + [ Patryk Obara ] + * [b0c4433f] Remove trailing space from dosbox.cpp + + [ Brandon Munger ] + * [4c0a9c49] Seperate out intro cdrom command for Windows and other OSes. Also add example for mounting cue files. (#972) + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 16 Apr 2021 04:22:31 +0000 + +dosbox-staging (0.77.0~alpha~727~g26bc85-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @8e919dd22813b3446749664accb2c2f6e233ce6a ** + + * UNRELEASED + + [ Patryk Obara ] + * [7027e469] Move badge URLs to the bottom of README.md file + + [ David Reid ] + * [b4838fa2] Sync dr_flac with upstream (v0.12.29) + + [ Kappa971 ] + * [ea43d6df] Create new it_IT translation + + [ Patryk Obara ] + * [09483f74] Add it_IT to encoding script + * [b5f43103] Fix formatting of few strings in it_IT translation + * [df3e5b00] Generate new translation files + * [db9eb3ec] Remove old Italian translation file + * [92266e32] Update mt32emu wrap dependency to 2.5.0 + * [c220c7b6] Remove unused parameter from Mouse_BeforeNewVideoMode + * [86cd107a] Remove unused parameter from render.cpp + * [e04909d2] Remove unused parameters from XGA implementation + * [ddf73bea] Add fluidsynth to try_static_libs list (Fixes: #968) + * [668e6ef2] Update pl_PL translation + * [3ac7f8cd] Generate new translation files + * [aae3c392] Highlight soundfont when fluidsynth is active + * [b56d73cd] Provide option for selecting ALSA port by name + * [d8296838] Update manual regarding 'mixer /listmidi' + * [962c8245] Convert parse_addr private method to static function + + [ kcgen ] + * [9dc57485] Add a class to manage full and partial MT-32 Model ROMs + * [0fc90599] Manage the ROMs and Models using the new LASynth Model + + [ Kappa971 ] + * [37f5b8e4] Update it_IT translation + + [ Patryk Obara ] + * [26bc8562] Generate new translation files + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 09 Apr 2021 04:21:14 +0000 + +dosbox-staging (0.77.0~alpha~705~g7c4b-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @6829751a874eaca13baf1282ae788ac26a30de4b ** + + * UNRELEASED + + [ Patryk Obara ] + * [b337f7fb] Remove hardcoded default MIDI ports in ALSA backnd + * [880057e4] Adjust connection logic + * [099fe934] Provide better names for sequencer and port + * [56551eb8] Detect input ALSA MIDI port + * [2f132395] Filter MIDI ports to list only the usable ones + * [d8934f37] Reset used sequencer address when disconnecting + * [401ff2b2] Highlight ALSA port we're connected to + * [d6bfa2f2] Log ALSA MIDI client name after successfull connection + * [809d8b27] Prefer ALSA ports marked with type synthesizer + * [300cad4f] Group seq_client and seq_port together + + [ ripsaw8080 ] + * [9a1a0045] Support detection of non-EGA/VGA machine types with elements of BIOS. Fixes the CGA version of Robomaze III, Road Runner, et al. + + [ Patryk Obara ] + * [9d0073a2] Avoid using direct memory lookup to read the terminal size + * [2f41a42c] Update pl_PL translation + * [7c4bb6ff] Generate new translation files + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 02 Apr 2021 04:24:36 +0000 + +dosbox-staging (0.77.0~alpha~690~g7637-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @8eedc7d54ef2d44391d09f3bd87e6454182b435f ** + + * UNRELEASED + + [ kcgen ] + * [61e6f680] Fix an unused variable warning in Envelope + * [72d06d4a] Fix an unused variable warning in the SoftLimiter + + [ Patryk Obara ] + * [7489a693] List info about all available MIDI devices + * [19c985d6] List all detected sf2 files for built-in FluidSynth + * [a2c31bb8] List all ALSA MIDI sequencer ports + * [66b13824] Remove usage of deprecated ALSA API + * [00e9705e] Change default ALSA MIDI sequencer name to "default" + * [a5b85e26] Avoid dereferencing std::string end() iterator + * [e78efa57] Fix extra-semi warnings in DEBUG command + * [39d18e08] Fix format-pedantic warning when logging memory base + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 26 Mar 2021 05:14:41 +0000 + +dosbox-staging (0.77.0~alpha~679~g0b41-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @5c1d45921370893b9ca1b3b502a25c3e91b7889b ** + + * UNRELEASED + + [ kcgen ] + * [c01634b3] Add informational-only support for naming std::threads + * [08106eb9] Name the autotype, MT-32, and FluidSynth std::threads + + [ Patryk Obara ] + * [9d25c500] Add fluidsynth dependency meson wrap fallback + * [72c9b841] Use Meson summary to communicate configuration result + * [41004277] Reformat meson_options file + * [1ab66b5e] Revert "Use Meson summary to communicate configuration result" + * [00291d50] Split implementation out of midi_alsa header + + [ Wengier ] + * [49148e60] Add a delay between AUTOTYPE key down and up events + + [ Patryk Obara ] + * [d9b2346c] Update fluidsynth wrap to 2.1.8 + * [684b9783] Mark two parameters as unused in saa1099 + + [ kcgen ] + * [5c800f96] Fix mapping of trigger-switches on six-axis controllers + + [ ripsaw8080 ] + * [9bbbc911] Move video BIOS signature code to where it should be. Improve detection of Paradise SVGA in some installers with additional signature. + + [ Patryk Obara ] + * [0b410031] Add missing enum value to swith handling Video BIOS signature + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 19 Mar 2021 04:16:26 +0000 + +dosbox-staging (0.77.0~alpha~662~g6107-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @26f17760964ade3fcd8c9821e1a06d40fae2f610 ** + + * [26f17760] d/patches: + + Refresh patches + + New Patch: set_debugger_conf_suffix.patch + + [ kcgen ] + * [52a7e24b] Use rwqueue instead of the Moody-queue in FluidSynth + * [3ea2a9b7] Use rwqueue instead of the Moody-queue in MT-32 + * [8d8907ce] Drop the moodycamel readerwriter queue + + [ Илья ИндигО ] + * [f54a4fdd] Update ru_RU translation + + [ Patryk Obara ] + * [5f9a86e1] Adjust whitespace in ru_RU translation + * [adb3e345] Generate new ru_RU translation + * [f879e6f9] Remove old fr franslation + * [faa1630a] Remove old ru translation + * [899013b5] Convert old Russian documentation to UTF-8 + * [f455022c] Convert old Korean documentation to UTF-8 + * [bde996c6] Convert old Danish documentation to UTF-8 + * [aa5764e0] Separate old translation files from new ones + + [ kcgen ] + * [2c969cc1] Always support Opus CD-DA tracks + + [ Patryk Obara ] + * [7568f785] Convert old German documentation to UTF-8 + * [275fe40e] Update pl_PL translation + + [ Gilles ] + * [921deca4] Update fr_FR translation + + [ Patryk Obara ] + * [27456566] Generate new translation files + * [8bf4e810] Use consistent style for key names + * [dcd9e1b9] Update English source translation strings + + [ kcgen ] + * [f7effa7e] Simplify the SoftLimiter by moving the mixer levels to function + * [b0e28def] Use an atomic to manager the SoftLimiter's pre-scalar + * [dbc8231a] Make access to mt32emu's service-pointer mutually exclusive + + [ Patryk Obara ] + * [ba50cefe] Update pl_PL translation + * [c6eee65f] Generate new translation files + * [3a28421a] Convert old Spanish documentation to UTF-8 + * [fbaa97f0] Convert old Italian documentation to UTF-8 + * [be04e5f0] Convert old Norwegian documentation to UTF-8 + * [b25b25d3] Convert old Brazilian Portugese documentation to UTF-8 + * [230fa1d1] Convert old Turkish documentation to UTF-8 + + [ ripsaw8080 ] + * [ce6608e7] Improve DOS Create Temporary File function: don't use same sequence of filenames each session; don't overwrite existing files. + + [ Patryk Obara ] + * [00629007] Silence MSVC warning about converting to 32-bit value + * [810ce76d] Remove "-git" suffix from .conf file in release + * [6107217f] Rename CONF_BRAND to CONF_SUFFIX + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 12 Mar 2021 04:16:19 +0000 + +dosbox-staging (0.77.0~alpha~621~g3bf0-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @0f074d2c649c27585953023ef182c94a6e77a28b ** + + * UNRELEASED + + [ Sebastian Strohhäcker ] + * [faa11dfa] some strange people are offended by chdir hints that are not always fully correct in all imaginable situations; removed + + [ Dean Beeler ] + * [778617b3] NE2000 Ethernet Patch + + [ Patryk Obara ] + * [c245aa5d] Add NE2000 to the buildsystem, but keep it disabled + + [ Jonathan Campbell ] + * [b362c971] Cleanup in NE2000 code + * [52566735] Fix Bochs stubs with actual logging code + * [3f0b811a] Set IRQ and base in NE2000 + * [b4688232] Fix mcast lookup to truncate CRC to 32-bit in NE2000 + * [604ce0e5] Make it CLEAR the problem is failure to mask the CRC to 32 bits + + [ Allofich ] + * [ecf5dfce] Remove undefined function declarations + + [ Jonathan Campbell ] + * [b1cacc28] Fix VS2017 compiler warnings + + [ Allofich ] + * [868a8181] Remove unnecessary semicolons and parentheses + + [ Emmanuel Gil Peyrot ] + * [8ce82db0] Replace Bit8u with uint8_t + * [a6357e5a] Replace Bit16u with uint16_t + * [197a7a75] Replace Bit32u with uint32_t + + [ Patryk Obara ] + * [eeabd4b9] Update copyright statement for NE2000 + * [e3840d1e] Fix header guards and include order in ne2000 + * [dcc08e81] Add slirp dependency and use_slirp setup option + * [69018852] Sort dependencies in hardware module + * [10067a78] Add pcap dependency to make ne2000 buildable + + [ kcgen ] + * [53a75de9] Make building of unit tests automatic or configurable + + [ Patryk Obara ] + * [7a13c0d9] Bring back previous solution for detecting gtest + + [ kcgen ] + * [29f79d6d] Disambiguate the CONFIG_ROMDIR versus its ROM files + + [ Patryk Obara ] + * [3e3b471a] Fix ignored-qualifiers warning + * [24f20b4b] Remove url field from Sound_DecoderInfo + * [aaea2d5c] Fix missing-field-initializer in struct tm + * [05aafd4d] Fix missing-field-initializer in adlib.cpp + * [7866d830] Remove trailing whitespace from translation strings + * [3c00585f] Move mt-32 translation back to cpp file + + [ Илья ИндигО ] + * [addab42e] Update unicode file with ru_RU translation + + [ Patryk Obara ] + * [9d173cd4] Generate new ru_RU translation + * [43eb7d6e] Generate new en_US translation source + * [4294d854] Update unicode file with pl_PL translation + * [7f172bc0] Generate new pl_PL translation + * [ecfc9e10] Remove always-true comparison in INT10_VideoState_GetSize + + [ Gilles ] + * [1588dad0] Update fr_FR translation + + [ Patryk Obara ] + * [33c227a9] Sync SHELL_CMD_VER_VER in all translations + * [21255b30] Update pl_PL translation + * [c774e6bc] Generate new translation files + * [e73ec113] Remove redundant sanity check in DOS_FCBRead + * [e091b615] Replace FIXME with TODO + + [ kcgen ] + * [365e0564] Check for the exit_requested state inside the endless CHOICE loop + * [42576b1e] Add a rote-implemented blocking read-write queue + + [ Илья ИндигО ] + * [2cd5acbf] Update ru_RU translation + + [ Patryk Obara ] + * [d2295454] Adjust whitespace in ru_RU translation + * [c57c48e9] Update english source translation strings + * [8c05880d] Update pl_PL translation + * [8a7fa8d2] Generate new translation files + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 05 Mar 2021 04:15:46 +0000 + +dosbox-staging (0.77.0~alpha~572~g39fd6-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @3e70f6ca13a87e6147960f4354fd61f389eeb8d9 ** + + * [df2f3580] d/control: Fixes and Cleanup + * [f1587d20] d/rules: Set DEB_BUILD_MAINT_OPTIONS=hardening=+all + * [57a602db] d/rules: Simplify DEB_CFLAGS_MAINT_STRIP + * [d1fbd6ab] d/patches: Refresh FluidSynth SoundFont patches + * [3e70f6ca] d/rules,control/: Switch to Meson Build System + + [ Patryk Obara ] + * [57d8062b] Start migration to meson buildsystem + * [4fad1d4f] Add CI jobs to exercise warning_level=3 + * [12388987] Add debugger feature to meson buildsystem + * [4bb2cc2b] Add unit tests to meson buildsystem + * [0b91c9a3] Convert gtest dependency to subproject + * [9f2e01a4] Add some Meson usage snippets to BUILD.md + * [6845223e] Add new OSS file to meson buildsystem + * [5c14ee1d] Handle dynrec defines depending on host architecture + * [99bbd6d7] Define endianness via meson + * [b233663c] Port C_FPU* defines to meson + * [7dacb401] Update copyright statement in config template + * [2446d865] Move cpu-related build defines to src/cpu subdir + * [8016c439] Reorganize cpu core selection in the buildsystem + * [8b00b5fa] Put old/tricky architectures back in the table + * [cc2a28f0] Simplify buildsystem message summary for target cpu + * [ce3579bc] Port PAGESIZE define for PPC64LE to meson + * [a11338ba] Port C_HAVE_MPROTECT define + * [1bd9d149] Update to use new define names + * [4c7f68ea] Add define for mt32emu to config template + * [b6a1da1a] Check for availability of realpath function via meson + * [c0981a04] Add meson checks for several headers + * [c792c81c] Port OS defines to meson buildsystem + * [a2204752] Port C_SET_PRIORITY define to meson + * [9bfae123] Replace explicit checks for headers with a loop + * [2a5a032b] Add unit test for rwcircularbuffer to meson + * [30eac170] Add unit test for setup.cpp to meson + * [ed519db0] Fix absolute-value warning in envelope.cpp + * [4ee13172] Fix linking error in unit tests + * [e081213f] Fix include order for MSVC + * [ef4cb0ae] Rename 'dummy_dep' to 'optional_dep' in meson + * [c77a7d47] Detect CoreAudio, CoreMIDI dependencies on macOS + * [403616a0] Adapt to cleaned defines from master branch + * [ff2df2b6] Detect ALSA dependency using meson + * [62a4b5f9] Port C_HAS_BUILTIN_EXPECT compiler check to meson + * [0863b2c7] Adjust comments for few config.h sections + * [68f006c1] Move C_DIRECTSERIAL check to meson + * [be47e704] Port NOMINMAX define to meson + * [30a68e19] Enable math constants in math.h header on Windows + * [05369770] Add Windows Sockets and Windows Multimedia dependencies + * [089d3aa6] Include SDL.h before main for Windows builds + * [b87b77bc] Be more precise about ppc64/ppc64le names + * [f8fbc9f7] Document invoking ninja with -C flag + * [97b96d78] List ccache tool with other dependencies + * [a453f880] Add BUILD.md section about disabling dependencies + * [689358cf] Add warning when using buildtype=plain on meson < 0.51.0 + * [292914ec] Fix typo in documentation + * [f184e5f8] Fix instructions on test coverage report + * [694355a8] Document running static analysis + * [7b39439f] Document list of buildsystem improvements + * [0a71c022] Upgrade minimum meson version to 0.49.0 + * [6737dbf3] Add unitial support for installation via meson + * [f3ff7678] Simplify mapping of OS names to defines + * [b37b098a] Add mt32emu dependency with meson wrap fallback + * [74f0c172] Prevent effc++ warnings from affecting subprojects + * [d197d78e] Port missing C_ALSA define to meson + * [3fc7d92e] Provide an option for disabling ALSA dependency + * [ae5c910a] Add missing Opus dependency + * [b2a0a4ad] Switch linux release job to meson + * [7cd6b2e9] Use Git tag description for emulator version (Fixes: #543) + * [3b5381b1] Link SDL2 statically for macOS release build (Fixes: #837) + * [08813834] Update version and license in meson project function + * [51516108] Disable PPC and PPC64 dynrec backends for now + * [231cb085] Revert broken parts of SVN r4429 + * [9b71aac2] Update mt32emu wrap to 2.4.2-2 + * [036e8c58] Remove zlib dependency + * [17e675fe] Rewrite documentation about build types + * [82a5660d] Remove requirements section from BUILD.md + * [cbd106d5] Remove redundant build doc in CONTRIBUTING.md + * [1965ada7] Move macOS-specific instructions to separate file + * [d46d6f42] Move Haiku-specific instructions to separate file + * [3a28128d] Move Windows-specific instructions to separate file + * [5a7648dd] Move AutoFDO-specific instructions to separate file + * [70bfe2a4] Remove outdated instructions from BUILD.md + * [fffa76e1] Write shorter introduction for BUILD.md + * [ccc61f8f] Cleanup and tighten instructions in README.md + * [08425ed7] Mention how to open test coverage report + * [53be5ef5] Make LGTM links more prominent + * [896017c2] Reorganize badges in README.md file + * [0800f7d9] Raise the minimum meson version to 0.51.0 + + [ kcgen ] + * [f90046b7] Manage FluidSynth rendering and playback using the RW queue + * [ad709be2] Improve the log message regarding FluidSynth sound-font scaling + * [7f69351a] Re-order FluidSynth copyrights by ascending contributions + + [ Patryk Obara ] + * [d3a0c528] Update script generating translation file + * [9d0f7c77] Remove translation string for fluidsynth.synth_threads + * [7a7e2cde] Reset language when updating en_US translation file + + [ Gilles ] + * [0473a589] Update fr_FR translation for ver cmd help + + [ Patryk Obara ] + * [2f73b726] Remove Autotools-based buildsystem + * [a1b637ab] Link SDL2_net statically in macOS release CI job + * [740a4ec2] Link libpng statically in Linux and macOS releases + * [612a02dc] Link opusfile statically in macOS release + * [3cac0413] Make a note of feature in meson 0.53.0 + * [6ea6dffb] Move zypper packages list to README.md + + [ Gilles ] + * [c4b660e0] Synchronize section names in fr_FR help message + + [ kcgen ] + * [ee1b350e] Make the SoftLimiter operate on a reference and not temporary + * [e321bab9] Move the audio buffers into the rw-queue instead of copying + * [f4a4e88b] Use a second rw-queue in FluidSynth to recycle used buffers + * [f987707a] Use a second rw-queue in MT-32 to recycle used buffers + * [2fb7d1e4] Fix a spelling mistake in FluidSynth + + [ Patryk Obara ] + * [85c0be8e] Update README.md + * [0f128c06] Update documentation for old branches + * [1891e088] Remove spurious semi-colons + + [ Feignint ] + * [c8b84e41] Fix spelling in various documents + * [761cb2db] Fix spelling in dosbox binary + + [ kcgen ] + * [23858377] Move the sysex message size constant into the MIDI header + * [1306122f] Inject the MIDI halt sequence when closing external MIDI handlers + * [c0ae7657] Add a startup verbosity option to only show the splash screen + + [ Patryk Obara ] + * [e0a1e578] Fix potential buffer out of bound access when drawing cursor + * [b2740773] Organize duplicated sanity cursor checks + * [39fd620c] Reuse SkipCursor check in VGA_TEXT_Xlat16_Draw_Line + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 26 Feb 2021 09:02:02 +0000 + +dosbox-staging (0.77.0~alpha~385~g26cc3-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @b07841e4b3eaf0fd9d032587027261c7f6c30951 ** + + * [332f70c9] Refresh SF3-with-static-fluidsynth.patch + * [b07841e4] d/rules: Use pkg-config feature in contrib/static-fluidsynth + + [ Peter Veenstra ] + * [ad53ebb3] Slight reordering in GFX_SetupSurfaceScaled, so that the clip.x and y are always updated in fullscreen mode, this way the fix of 4147 is not needed anymore. + * [9bdbdfa9] Make all references to cache const, use cache_adds instead of direct access. (jmarsh) + * [f3cda47d] style and warnings + * [5c8119dc] Emulate debug register 6 during trap flag emulation (and normal int 1). Fixes 544 (jmarsh) + + [ Patryk Obara ] + * [46d15674] Revert "Slight reordering in GFX_SetupSurfaceScaled (…)" + + [ Peter Veenstra ] + * [5ccc5ef2] Update to new bitfs + * [c852ebd1] A few more + * [9365d110] Add patch #271 Remove redundant glBindTexture calls Allow in OpenGL mode and aspect=true resolutions to be used if the resulting ratio is close to 4:3 and width and height are integer multiples of the input data. Use for example with: output=opengl, scaler=none, glshader=sharp, aspect=true, fullresolution=1280*1000 (the * of r4415), windowresolution=1280x1000 and a 320x200 game (this code is not finished) + * [593de66c] Add Some automake stuff so we can ran custom commands for mac os x + * [fa94c624] Some changes to fix a warning due to sign mismatch + * [4b114154] Some reordering to make gcc happy + * [f37ddbe7] a few more sBitfs changes + * [8318a901] Slight speed up in heavy debug mode + * [eca61eb1] Add mac icon to make things a bit more complete (thanks rhoenie and dominus) + * [565b24d9] Rewrite store integer instructions to check if the result fits.(vogons 78127) Went with the explicit size comparisons because of the undefined values on NaN and inf for frexp. Thanks M-HT and jmarsh. + * [728ad540] One of my compilers likes this a lot better. + * [17d65d5c] Add the new folder to automake files + * [f9b43dec] fix log messates with sbitfs in debug mode + * [ab8aa756] Convert to sBitfs logging. + * [39e19939] Start moving the running of instructions out of the check keys loop so it can be scripted in the future. + + [ Patryk Obara ] + * [5138f7ba] Prepare new source translation file for russian + * [ea56f893] Translate part of banner to russian + + [ Илья ИндигО ] + * [44fb3d96] Update ru_RU translation for SHELL_STARTUP_BEGIN + + [ Feignint ] + * [5920a8a8] Add pkg-config support to contrib/static-fluidsynth + + [ Patryk Obara ] + * [40733427] Fix compilation issues introduced by SVN r4424 + + [ kcgen ] + * [e165c274] Fix CD-DA pregap start calculation instead of clamping-to-sanity + + [ Dugan Chen ] + * [a0323042] Remove redundant glBindTexture calls + + [ kcgen ] + * [d3010f0a] Make the SoftLimiter return a temporary buffer + * [43972608] Migrate soft-limiter and audio buffers from std:array to std::vector + * [ab2bf8e1] Apply further improvements relating to the SoftLimiter + * [cd0bad9a] Use a ratio instead of time when printing SoftLimiter's stats + * [e9f8b96a] Print peak-amplitude and mixer suggestions for the MT-32 channel + + [ Patryk Obara ] + * [26cc3ca8] Revert broken parts of SVN r4429 + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 19 Feb 2021 04:10:55 +0000 + +dosbox-staging (0.77.0~alpha~347~g7e5b-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @05d431fadef9a288f051ad7e366e109ce7264db4 ** + + * [05d431fa] Refresh debian/patches + + [ kcgen ] + * [a3a761a3] Shorten the directory name for the RW queue (#864) + + [ Gilles ] + * [f260b0fb] Update french translation + * [0d7c6a8b] Update french translation + + [ kcgen ] + * [fc697733] Disable OpenMP and others when building FluidSynth statically (#867) + * [cdf42b43] Close the MT-32 device first-thing on Open + * [8aec6a14] Manage MT-32 rendering and playback using the ReaderWriterCircularBuffer + + [ Patryk Obara ] + * [79710ec3] Use ARRAY_LEN macro to avoid maybe-unused variable + + [ kcgen ] + * [77862ab8] Replace deprecated FluidSynth effect calls (#870) + + [ Wengier ] + * [98c3ac45] Adjust VER help message to new style + * [16c8f01f] Color the version examples + + [ Patryk Obara ] + * [4b87e8b0] Adjust new ver /? message to fit the screen width + * [36b54563] Add a script to simplify translation drop + * [9a379a55] Update translation file with new ver/? text + + [ kcgen ] + * [513db36c] Move the joystick type conf-parsing to a function + * [06dc8664] Determine if the joystick-type has been parsed + * [26e8ba9d] Move mapper's joystick type handling to where it's used + * [3758eeeb] Assert that the mapperfile has been parsed + * [22302b92] Colapse the mapper's ConfigureBindings and bind keys + * [dfe03b63] Ensure the Disney leading-channel is always valid (#876) + * [ff6b00a7] Use mt32emu's floating-point synthesis with the soft-limiter + * [7e5b4d4e] Use mt32emu's nice panning and partial mixing settings + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 12 Feb 2021 04:10:47 +0000 + +dosbox-staging (0.77.0~alpha~325~g0541-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @84a6a7a6238870164ee59244686090e7109bc753 ** + + * UNRELEASED + + [ David Reid ] + * [d65f2e6f] Sync dr_flac to v0.12.27 + * [6f880256] Sync dr_wav to v0.12.18 + * [dd072e9f] Sync dr_mp3 to v0.6.26 + + [ kcgen ] + * [b0ef7b34] Fix increment of unintialized deque iterator in Debug Winx64 + * [42755963] Squash an Opus printf-type warning in debug-chatter output + * [a962087b] Clarify Opus track-open return result + * [07e935f4] Check Opus track length before down-casting + * [35efa548] Clarify that Opus rate is in frames per interval + * [6490fbf9] Squash warnings in Opus debug chatter time calculation + * [6723963b] Don't unnecessarily downcast seek offset in Opus + * [a2855b07] Populate the URL field in the Opus callback signature + * [f5ffe082] Check audio track length before down-casting + + [ Patryk Obara ] + * [14877916] Fix assert for checking file size for formatting (Fixes: #799) + + [ kcgen ] + * [5d232060] Move Disney state #defines to enum + * [898ac605] Move Disney port base and size from #define to constexpr + * [9da7dfe3] Clarify Disney_size is number of audio buffer samples + * [7f3bc42a] Re-order headers in Disney + * [1f64babf] Reduce the Disney input frequency type to uint32_t + * [3ed0ecc3] Replace Bit8u's in Disney with uint8_t + * [24e968e7] Move Disney buffer-used tally to uint8_t + * [e621a2ef] Manage Disney mixer chan in Init() and Shutdown() + * [45f71f9e] Manage the IO handlers in Init() and Destroy() + * [bd4881d8] Manage the Disney states in Init() and Destroy() + * [394e3932] Move Disney conf checkto Init() and drop class DISNEY + * [58ae1da3] Remove the Disney interrupt handler during shutdown + * [7a7413f9] Move Disney frequency calculation to a function + * [f3b207e4] Use the DAC freq calculation during Disney analysis + * [240cb869] Simplify Disney's stereo-mode determination + * [4b1b4b25] Operate on 8-bit value in Disney write method + * [3fb629a1] Operate on 8-bit return value in Disney read method + * [6f60396f] Limit the Disney Callback length to uint16_t + * [8e85ce50] Flag section parameter as unused in Disney Shutdown + * [f001c53e] Move the implied Disney struct to explicit variable + * [d3d0843a] Explicitly initialize Disney status in the struct + * [3bdc342f] Cleanup effc++ warnings by initializing struct members + * [9bcba50c] Simplify Disney leading channel determination + * [0637a6a1] Demote Disney counters from Bitu to uint32_t + * [07bdd959] Use const on one value in Disney + * [edb74c90] Tighten up a Disney for-loop based on fixed iterations + * [7635f1b2] Clarify that "STATE" is the Disney runtime state + + [ Patryk Obara ] + * [80eecc43] Improve input checking when unmounting + * [a52aefa8] Show error messages when moving Z drive fails + * [12d41165] Record new translation strings for mount command + * [736655b8] Fix whitespace issues in rescan command + * [054100f3] Rename variable newz_drive to new_drive_z + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 05 Feb 2021 04:10:38 +0000 + +dosbox-staging (0.77.0~alpha~277~ge131-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @323f63ef3ff31fb3d1aa98d669d1c18c44a5eb19 ** + + * UNRELEASED + + [ Peter Veenstra ] + * [dba4cb70] Update it for when neither screenshots or avi making is selected. + * [6314d580] warnings and such + * [26158fae] Update the template for more complicated scalers to potentially support higher scale factors as well + + [ Patryk Obara ] + * [25de173f] Fix includes order in numerous files + + [ Peter Veenstra ] + * [f02ae91a] Rewrite dynamic core port handling so only one call is made instead of 2. (jmarsh) + * [c393d3a3] Some warnings and spaces cleanup + + [ Patryk Obara ] + * [ca898d91] Remove some old translation files + * [05003921] Describe machine types in README and man page + * [a827baa1] Update fedora spec file to package 0.76.0 + * [e131d562] Tighten dependency checks in fedora spec file + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 29 Jan 2021 04:16:50 +0000 + +dosbox-staging (0.77.0~alpha~264~gafdf-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @b541dd21a8121db9a6635bc28a165d22b029013c ** + + * [74148d80] Refresh debian/patches + * [b541dd21] d/patches: Add bash completion script + + [ Peter Veenstra ] + * [9d9159cb] Merge 2 cache files together, using the oldest as base. Thanks jmarsh + * [0cd1b1b6] Bring OS/2 port up to date. Thanks Jochen (patch #290) + * [2ae4d36f] Split the position updating from the cache adding. (jmarsh) + * [162d4fe0] Finish up and add LOOP_NE and LOOP_E (jmarsh). + * [676e90eb] Some warnings. + * [fa0cd823] Improve xchg to handle unwritable memory better. (jmarsh) + * [6de8e1ee] Slight reordering so that none isn't present twice + * [567a14d1] replace some loops with memset and cleanup a lot of weird spaces + * [28d6f866] Do full aggregate initialization in order to fix some warnings. + * [e4e21965] Be smarter when clearing the cache. (jmarsh) + * [10741618] It seems compilers prefer FALLTHROUGH else some start complaining. + * [e768df91] Extend SDL Xorg fix to also check for erroneous key up events. Fixes key loss in fullscreen mode. (thanks jmarsh) + * [a5bd9714] Change shift for ticks to 24 to reduce calculation error and init the counter with non-zero on most occasions. + * [071d2fec] Fix the usual warnings and a mix ups between | and || + * [d0518340] Reduce warnings + * [d67fb1db] More warning and unify if spacing a bit + * [7c4ca1eb] A new and hopeful better year + + [ kcgen ] + * [7dd030ff] Make the exit request bool accessible outside Shell + * [95881d36] Quit the command loop when exit is requested + * [b8aab5a1] Use a conditional instead of exception for normal exits + * [71924dd5] Honor the exit request in the machine loop + * [78655c02] Simplify the RunMachine loop + + [ Peter Veenstra ] + * [8fa23e84] Make the blitting surface a bit larger in ddraw mode. Fixes graphics problems in fullscreen mode when there is large border. + + [ Patryk Obara ] + * [79819138] Remove PCSPEAKER module destructor + + [ cameron314 ] + * [5f65a15c] Add the moodycamel::ReaderWriterCircularBuffer single-header library + + [ kcgen ] + * [ab7448c9] Add unit tests for moodycamel::ReaderWriterCircularBuffer + + [ Peter Veenstra ] + * [25268d1d] a few more warnings + + [ Patryk Obara ] + * [082393e0] Move safe_strcpy and safe_strcat to string_utils + + [ Peter Veenstra ] + * [33034b75] Add experimental option to use a smaller window in fullscreen mode and correct surface to center properly. Might be removed again. + + [ Patryk Obara ] + * [8cb7ba42] Remove commented-out function + * [6086f947] Sort includes in setup.cpp + * [55ae4d73] Add missing includes in hardware module + * [c5e38959] Implement new function for parsing dosbox env variables + * [0e760da2] Use new implementation for filtering environment + * [9fe39483] Assert section and property names formats + * [811adb6a] Move environ pointer out of sdlmain + * [501d28d0] Document environment variables handling + * [2481798f] Move test stubs to a separate file + * [f9eca4a4] Revert "Bring OS/2 port up to date. Thanks Jochen (patch #290)" + + [ kcgen ] + * [00aaefae] Update glib to 2.67.2 in static builder + + [ Patryk Obara ] + * [a8778212] Fix absolute-value warning in envelope.cpp + * [fa9ef07f] Fix linking error in unit tests + * [5af937fc] Revert "Extend SDL Xorg fix to also check for erroneous key up events. Fixes key loss in fullscreen mode. (thanks jmarsh)" + + [ Peter Veenstra ] + * [81c0d8ea] Add modified and updated version of patch #262 to start and stop avi recording with config. Add way to start keymapper from config as well. + + [ kcgen ] + * [c98c2570] Add the maximum pixel size for use instead of magic-num + * [076c4f1b] Fix an overflow warning with texture frame calculation + * [8ef5db71] Fix a multiplication overflow warning in ZMBV + * [968dc605] Organize headers in ZMBC source + * [10f0bd1c] Provide description of MT-32 control and PCM ROMs + + [ Patryk Obara ] + * [3ad92ff1] Mark variable used only in an assert with maybe_unused + * [19e5563f] Fix regex verifying section names + + [ kcgen ] + * [13431ffb] Fix an SDL2 version comparison bug in autotools + + [ Patryk Obara ] + * [248d1448] Revert "Make the blitting surface a bit larger in ddraw mode. Fixes graphics problems in fullscreen mode when there is large border." + * [6af43010] Revert "Add experimental option to use (…)" + * [4f9ac9fa] Add new strings for translators + * [45cf3234] Rename define HAVE_ALSA to C_ALSA + * [fb95bcdc] Adjust Core MIDI, Core Audio defines + * [afdf5bd9] Move C_HAS_ATTRIBUTE to compiler.h + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 22 Jan 2021 04:37:58 +0000 + +dosbox-staging (0.77.0~alpha~191~gf532-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @e48d9178d24da61ecd6a9d5fc3fcb954f9dfbec2 ** + + * [aa42fa59] Update debian/copyright + * [0ededc32] d/patches: Add Prioritise-SF3-over-SF2-SoundFont + * [e48d9178] d/control: + - Remove Suggests: fluid-soundfont-gm + Appears to be unmaintained. + + Add Recommends: musescore-general-soundfont | + musescore-general-soundfont-lossless | + musescore-general-soundfont-small + + [ Jonathan Campbell ] + * [edc7297a] Mask and compare &cpu_regs to determine if it resides above 4GB + + [ kcgen ] + * [8c96654d] Use a boolean compare to check if &cpu_regs resides above 4GB + * [21f68377] Inialize Shell member pointers + * [ffaf7c44] Replace all (void)'s with () in shell classes + * [1b6435a3] Cleanup the autoexec module's memory on close + * [74e201f5] Cleanup any allocated batch file memory on close + * [58b4842a] Cleanup management of callback descriptions using stings + * [cb8dc7c6] Cleanup the serial port members on destruction + * [9f271b09] Cleanup GUS channel and IO handlers when inactive or shutdown + * [f8298c11] Cleanup a precision-loss warning in GUS + * [acb4aab5] Migrate Config and Section lists to deques + * [b5b944b4] Make defition of a SectionFunction generally accessible + * [537730e1] Use SectionFunction type in existing prototypes + * [f68529ce] Add early-init function handing to the Section class + * [7414b1d9] Add early-section handling to the Config class + + [ Patryk Obara ] + * [ca417e93] Remove unused Config::const_reverse_it + * [a99efc67] Remove unnecessary Config::reverse_it + * [387b7c8f] Remove harmful Config::iterator + * [169b0a0b] Remove unnecessary Config::const_it + * [e7a3e223] Split OSS MIDI backend into header and cpp file + * [165142c2] Simplify opening OSS MIDI handler + * [11dfa44b] Implement missing destructor for OSS MIDI handler + * [7ae25da3] Fix and simplify OSS device reopening + * [d6b6d035] Decorate internal buffers in OSS with asserts + * [fa19f869] Prevent potential infinite loop in dc_silencer + * [1eec2391] Replace link to PVS with link to LGTM + * [582b4ee6] Rename DB_HAVE_CLOCK_GETTIME to HAVE_CLOCK_GETTIME + * [4055d69b] Rename DIRENT_HAS_D_TYPE to HAVE_STRUCT_DIRENT_D_TYPE + * [446afaa7] Rename C_HAVE_MPROTECT to HAVE_MPROTECT + * [1e3b9481] Rename C_SET_PRIORITY to HAVE_SETPRIORITY + * [5d92a878] Replace autoconf check to define C_ATTRIBUTE_ALWAYS_INLINE + * [f5328558] Fix grammar in documentation for XSTR macro + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 15 Jan 2021 04:35:35 +0000 + +dosbox-staging (0.77.0~alpha~155~gd6ed-1) unstable; urgency=medium + + * UNRELEASED + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 08 Jan 2021 04:30:25 +0000 + +dosbox-staging (0.77.0~alpha~153~g0a36-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @85c1580efc53f41cf17dc8eaa89fa43b047b7a4c ** + + * [ebe2d86d] d/patches: Include sf3 in soundfont search + - Drop fluidsynth/set-fluidsynth-soundfont.patch + + Add fluidsynth/add-sf3-soundfont-search.patch + searching for soundfont appends {,-GM}.sf{2,3} + + [ kcgen ] + * [ee389fb1] Add a string split-on-delim function and unit tests + * [9acbbf62] Add a string split-on-whitespace supporting function + * [4261681c] Include XDG_DATA_DIRS in FluidSynth SF2 paths + * [a93b22f2] Include XDG_DATA_DIRS in MT-32 ROM paths + + [ Patryk Obara ] + * [d66272e5] Sort includes in support (header and cpp file) + * [2c34b089] Sort includes in dos.cpp + * [b1ef7dd3] New functions for DOS_PackTime/Date + * [95c63221] Implement Windows wrapper for POSIX localtime_r + * [b77f0778] Replace several uses of localtime with safe equivalent + * [74b678a9] Document and simplify 'time /h' implementation + * [b888228f] Prevent CWE-835 vulnerability + * [dcfc4ec8] Avoid false-positive Coverity issue + * [0e93a8ad] Silence MSVC warnings for conversion from size_t to Bit16u + * [a66fceb5] Limit reimplementation of localtime_r only to MSVC + * [3b5560f1] Hide our implementation of localtime_r in a namespace + * [bc5d60b8] Use cross::localtime_r in CMOS emulator + * [ab8e094a] Update comment regarding OpenGL extension loading + + [ kcgen ] + * [5cfbe838] Manage MT-32 mixer channel using a unique_mtr + * [ca12b2ba] Manage MT-32 service using a unique_ptr + * [994fd4c8] Manage MT-32 threading objects using unique_ptrs + * [0d5c3949] Manage MT-32 audio buffer using a std::vector + * [5c5338ba] Remove MT-32 non-threaded branches + * [948133b4] Rename MT-32 'open' bool member to 'is_open' + * [2d8193da] Clarify calculation of "samples to render" in MT-32 + * [e3a0e442] Scope the MT-32 managed types inside the class + + [ Patryk Obara ] + * [7d528470] Remove outdated FIXME comment + * [0d2ebe9a] Fix column formatting of mount listing + * [eed393a0] Format volume label printed by DIR command + * [e6c41842] fixup! Fix column formatting of mount listing + * [a51d8f20] Simplify loop obtaining info about mount points + * [d6530bde] Describe the issue with setting/reading drive labels + * [6323683c] Leave a more precise comment regarding hat binding + * [c16e7d9c] Translate few more strings in Polish + * [0a36c373] Adjust copyright statements for 2021 + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 01 Jan 2021 04:22:41 +0000 + +dosbox-staging (0.77.0~alpha~116~g2e93-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @922d2ea0ee347e136a0b1ca91e9ec6e7ec01a5d9 ** + + * UNRELEASED + + [ sergm ] + * [5ff39f31] Update mt-32 patch to apply cleanly to dosbox-staging + + [ kcgen ] + * [be6e6acd] Add C_MT32EMU guards around MT-32 header and source + * [5b762daf] Standardize MT-32 global instance similar to FluidSynth + * [fc9c4ba9] Standardize MT-32 config handling like FluidSynth + * [95843a8e] Ensure MT-32 is opt-in only and not auto-selected + * [525a0304] Add MT-32 support as an opt-in ./configure feature + * [f3f56f66] Move MT-32 static-member func to basic C function + * [da867b1a] Make MT-32 verbosity level public for static-access + * [2079b02d] Move MT-32 static member report func to basic C function + * [b70ac82b] Cleanup spelling of synthesize[r] + * [2b9d67e6] Clarify delaysysex recommendation is for pyhsical MT-32 + * [d23dffb4] Cleanup MT-32 formatting (no-code changes) + * [552b6630] Use stdint type for MT-32 audio buffer + * [a47b1edb] Initialize MT-32 pointers with nullptr + * [f1a1c378] Use safe_printf in MT-32 + * [7ac635d0] Use millisecond and channels-per-frame constexprs in MT-32 + * [c8182f6b] Cleanup MT-32 function interfaces + * [af46264c] Move MT-32 timestamp generation out of header + * [2ca4af1f] Use uint16_t to manager buffer offsets in MT-32 + * [0142afc8] Use a 32-bit sysex MT-32 message size, matching the API + * [bc98d862] Reintepret 8-bit MT-32 buffers as larger types (don't C-cast) + * [0d552064] Perform rote type replacements for Bit* in MT-32 + * [7ad84443] Remove MT-32 reverse-stereo (should be done by mixer) + * [a590a834] Replace MT-32 verbose option with DEBUG_LOG_MSG + * [b4d79838] Move MT-32 threaded rendering option to constexpr + * [bb57b6c6] Organize MT-32 class members + * [61e49bca] Move MT-32 rendering max and mins to constxpr + * [fdd241bc] Prefer MT-32 upstream configuration of "partials" limit + * [5fcaddbe] Move MT-32 DAC emulation mode to constexpr + * [38396b63] Move MT-32 analog circuit mode to constexpr + * [044213e4] Remove MT-32 reverb setting in favour of those set by the control ROM + * [9dbc2c2a] Tie MT-32 playback rate to the mixer rate without resampling + * [48f96e01] Move MT-32 rate conversion quality to constexpr + * [3910c373] Move MT-32 amplitude ramp choice to a constexpr + * [018173f0] Indicate MAYBE_UNUSED for some MT-32 paramters + * [fd28a403] Improve titles and wording of MT-32 comments + + [ Patryk Obara ] + * [3fe42736] Add "Unlicense" SPDX license identifier to archive.h + * [0ae79a98] Add SPDX tags to mp3_seek_table + * [3ff112a9] Prepare setup for easier translations + * [15b763e1] Translate several messages to test the workflow + + [ kcgen ] + * [e73b18b4] Look for MT-32 ROMs in the /mt32-roms directory + * [89c0ad39] Allow a specific MT-32 model to be selected via configuration setting + + [ Patryk Obara ] + * [b18a73c1] Rename generated language files to include dialects + * [9955e5b4] Remove encoding from default language file names + * [1a98db0c] Add pl_PL.CP437 (transliterated) language file + * [16e4db2b] Translate few more strings to polish + * [a804b832] Replace std::list with std::vector for ROM path lookup + + [ Gilles ] + * [640e651f] Update french translation + + [ Patryk Obara ] + * [b7f6a375] Replace makefile converting .lng files with a script + + [ Gilles ] + * [ed1855a9] Fill-in french translation for overlay feature + + [ Patryk Obara ] + * [43f205b5] Rename sources for translations to use .txt extension + * [dc2e11ef] Adjust help message to mount and imgmount + * [f9f6f40a] Add missing string translations for mount command + * [d7b84eb7] Update english source for translations + * [7c03eb0e] Translate few more strings to polish + + [ kcgen ] + * [941f5236] Rename the MT-32 report handler's message buffer + * [17ff9c02] Move MT-32 return code to where it's assigned + * [e9dc6c0a] Clarify that the MT-32 callback operates on frames + * [a1855f2a] Rename and case-fix MT-32 current rendering position + * [c56833ed] Rename and case-fix MT-32 current play position + * [13188563] Case-fix MT-32 samples to render + * [d193ab89] Case-fix MT-32 frames to render + * [b0d5f6a4] Remove excess parens in MT-32 render-not-needed check + + [ Gilles ] + * [9757dfef] Update the french translation with new strings + + [ Patryk Obara ] + * [2b54d07e] Adjust spacing in few translated strings + + [ Gilles ] + * [ee90787d] Avoid using 'fixed' keyword in french translation + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 25 Dec 2020 04:17:08 +0000 + +dosbox-staging (0.77.0~alpha~47~gfea8-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @0177e2e4f570e09147d1b17df4c354a847c06e56 ** + + * [478cf263] d/patches,control,rules: + + patches: Drop add-leading-PATH-to-hicolor-in... + New Makefile available upstream + + control: Remove Build-Depends: librsvg2-bin + Generation of icon files no longer required + + rules: Amend contrib/icons make command + * [0177e2e4] Update debian/copyright + + [ Patryk Obara ] + * [fa4b74c7] Add safe wrapper macro for sprintf + * [b48349fa] Future-proof function for formatting file sizes + * [467801cd] Use larger file size fields in dir cmd + * [3b9b0cbe] Fix integer overflow issue in dir command + * [7df4276b] Prevent hiding a global variable + + [ Peter Veenstra ] + * [df2842e1] switch to WAVE_SH instead of LFO_SH (harekiet). Thanks for bringing it up psyraven. + * [8c41c329] Another attempt + + [ Patryk Obara ] + * [fb3254ba] Remove two MEM_* function declarations inside blocks + + [ kcgen ] + * [c57ba6a6] Refactor the serial port's Putchar wait logic + * [68892b2d] Refactor the serial port's Getchar wait logic + + [ Patryk Obara ] + * [ed2316a5] Add 'install' target for pre-rendered png icons + * [5d594ebd] Prevent hiding a global variable in hardware module + * [d7460ef4] Add missing header guard in debug.h + * [695a3aa6] Remove MAPPER_CheckEvent declaration inside block + * [fea88071] Cleanup MAPPER_CheckEvent implementation + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 18 Dec 2020 04:13:01 +0000 + +dosbox-staging (0.77.0~alpha~25~gcbd1-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @3085805c962ceb052b394fc23b5286088f15b153 ** + + * UNRELEASED + + [ kcgen ] + * [61f6c7b8] Fix build error using SteamRT default gcc-5.4.0 + + [ Patryk Obara ] + * [08aae4fd] Dump all known translation files for old versions + + [ David Reid ] + * [1c89bd6f] Sync dr_flac with upsteam (v0.12.24) + * [a230bfa5] Sync dr_mp3 with upsteam (v0.6.22) + * [2c80a234] Sync dr_wav with upsteam (v0.12.16) + + [ Patryk Obara ] + * [e71a7a86] Sync Nuked-OPL3 with upstream repo + + [ David Reid ] + * [dc17133c] Sync dr_mp3 with upsteam (v0.6.24) + + [ Patryk Obara ] + * [747d2456] Work around MSYS2/MinGW build issues (Fixes: #753) + + [ kcgen ] + * [56d7016c] Contribute a static glib-2.0 builder + * [bd339916] Add checksum verification to static Glib builder + + [ Patryk Obara ] + * [04ff1705] Add release in metainfo.xml + + [ kcgen ] + * [ae440178] Check and report negotiated audio channels + + [ Patryk Obara ] + * [cbd1ae54] Cleanup some duplicated stuff in opl + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 11 Dec 2020 04:12:59 +0000 + +dosbox-staging (0.77.0~alpha~3~g973e-1) unstable; urgency=medium + + [ Feignint ] + ** SNAPSHOT build @a22c78228261f9010de14bb2e1666b930483fc7a ** + + * [738b2860] d/patches: + + Add patch to set default fluidsynth soundfont + default.sf2 => default-GM.sf2 + * [d8d07311] d/patches: drop metainfo-typo-fix applied upstream + * [b14bb9f6] Add debian/watch file + * [d1f18937] Update standards version to 4.5.0, no changes needed. + * [30f6a615] Update changelog for 0.76.0-1 release + + [ ripsaw8080 ] + * [67f517f7] Remove video page check when drawing internal mouse pointer, as the BIOS current page is not updated in some cases. Fixes QQP games: Lost Admiral, Conquered Kingdoms, and Solitaire's Journey. Also be a bit smarter about enabling autolock, supporting more cases where the mouse is used for input without resetting it. + + [ Patryk Obara ] + * [48511e7f] Cleanup detect_window_size function + * [4ce9cf21] Update hardcoded version strings to 0.77.0 + + [ Feignint ] + * [973e1df0] Fix spelling in src/gui/render_crt_glsl.h + + -- Feignint <37488595+FeignInt@users.noreply.github.com> Fri, 04 Dec 2020 06:36:05 +0000 + dosbox-staging (0.76.0~alpha~1008~ga703-1) unstable; urgency=medium [ Feignint ] diff -Nru dosbox-staging-0.76.0/debian/control dosbox-staging-0.77.0/debian/control --- dosbox-staging-0.76.0/debian/control 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/control 2021-07-03 03:39:07.000000000 +0000 @@ -2,20 +2,33 @@ Section: otherosfs Priority: optional Maintainer: Feignint <37488595+FeignInt@users.noreply.github.com> -Homepage: https://dosbox-staging.github.io/about/ -Build-Depends: debhelper-compat (= 13), libsdl2-dev, libsdl2-net-dev, - libasound2-dev, libopusfile-dev, libpng-dev, libncurses-dev | libncurses5-dev, - librsvg2-bin, libfluidsynth-dev, curl, ca-certificates, cmake +Build-Depends: debhelper-compat (= 13), + libsdl2-dev (>= 2.0.2), + libsdl2-net-dev (>= 2.0.0), + libasound2-dev, + libopusfile-dev, + libpng-dev, +# ncurses needed for debugger only. + libncurses-dev | libncurses5-dev, + libfluidsynth-dev (>= 2.1.1), + meson (>= 0.51), +# Git required for Meson's subprojects feature + git, + cmake, + libmt32emu2-dev (>= 2.5.0), Standards-Version: 4.5.0 -Vcs-Git: https://github.com/dosbox-staging/dosbox-staging.git -Vcs-Browser: https://github.com/dosbox-staging/dosbox-staging/ +Homepage: https://dosbox-staging.github.io/about/ +Vcs-Git: https://github.com/feignint/dosbox-staging-deb.git +Vcs-Browser: https://github.com/feignint/dosbox-staging-deb/ Rules-Requires-Root: no Package: dosbox-staging Architecture: any Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} -Suggests: fluid-soundfont-gm +Recommends: musescore-general-soundfont | + musescore-general-soundfont-lossless | + musescore-general-soundfont-small Conflicts: dosbox Description: DOS/x86 emulator focusing on ease of use DOSBox Staging is a full x86 CPU emulator (independent of host architecture), diff -Nru dosbox-staging-0.76.0/debian/copyright dosbox-staging-0.77.0/debian/copyright --- dosbox-staging-0.76.0/debian/copyright 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/copyright 2021-07-03 03:39:07.000000000 +0000 @@ -4,210 +4,502 @@ Source: https://github.com/dosbox-staging/dosbox-staging Files: * -Copyright: 2002-2020, The DOSBox Team License: GPL-2+ +Copyright: 2002-2020, The DOSBox Team +Comment: No explicit license found, using license(s) from: + COPYING -Files: .github/* -Copyright: 2019, 2020, Kevin R Croft +Files: include/bios.h + include/bios_disk.h + include/callback.h + include/control.h + include/cpu.h + include/cross.h + include/debug.h + include/dma.h + include/dos_system.h + include/dosbox.h + include/drives.h + include/fpu.h + include/hardware.h + include/ipx.h + include/ipxserver.h + include/joystick.h + include/keyboard.h + include/logging.h + include/mouse.h + include/paging.h + include/pci_bus.h + include/pic.h + include/programs.h + include/regs.h + include/render.h + include/serialport.h + include/shell.h + include/timer.h + include/vga.h + include/video.h + src/cpu/callback.cpp + src/cpu/core_dyn_x86.cpp + src/cpu/core_dyn_x86/decoder.h + src/cpu/core_dyn_x86/dyn_fpu.h + src/cpu/core_dyn_x86/dyn_fpu_dh.h + src/cpu/core_dyn_x86/helpers.h + src/cpu/core_dyn_x86/risc_x64.h + src/cpu/core_dyn_x86/risc_x86.h + src/cpu/core_dyn_x86/string.h + src/cpu/core_dynrec.cpp + src/cpu/core_dynrec/decoder.h + src/cpu/core_dynrec/decoder_basic.h + src/cpu/core_dynrec/decoder_opcodes.h + src/cpu/core_dynrec/dyn_fpu.h + src/cpu/core_dynrec/operators.h + src/cpu/core_dynrec/risc_armv4le-common.h + src/cpu/core_dynrec/risc_armv4le-o3.h + src/cpu/core_dynrec/risc_armv4le-thumb-iw.h + src/cpu/core_dynrec/risc_armv4le-thumb-niw.h + src/cpu/core_dynrec/risc_armv4le-thumb.h + src/cpu/core_dynrec/risc_armv4le.h + src/cpu/core_dynrec/risc_armv8le.h + src/cpu/core_dynrec/risc_mipsel32.h + src/cpu/core_dynrec/risc_x64.h + src/cpu/core_dynrec/risc_x86.h + src/cpu/core_full.cpp + src/cpu/core_full/ea_lookup.h + src/cpu/core_full/load.h + src/cpu/core_full/loadwrite.h + src/cpu/core_full/op.h + src/cpu/core_full/optable.h + src/cpu/core_full/save.h + src/cpu/core_full/string.h + src/cpu/core_full/support.h + src/cpu/core_normal.cpp + src/cpu/core_normal/helpers.h + src/cpu/core_normal/prefix_0f.h + src/cpu/core_normal/prefix_66.h + src/cpu/core_normal/prefix_66_0f.h + src/cpu/core_normal/prefix_none.h + src/cpu/core_normal/string.h + src/cpu/core_normal/support.h + src/cpu/core_normal/table_ea.h + src/cpu/core_prefetch.cpp + src/cpu/core_simple.cpp + src/cpu/cpu.cpp + src/cpu/flags.cpp + src/cpu/instructions.h + src/cpu/lazyflags.h + src/cpu/modrm.cpp + src/cpu/modrm.h + src/cpu/paging.cpp + src/debug/debug.cpp + src/debug/debug_gui.cpp + src/debug/debug_inc.h + src/debug/debug_win32.cpp + src/dos/cdrom.cpp + src/dos/dev_con.h + src/dos/dos.cpp + src/dos/dos_devices.cpp + src/dos/dos_execute.cpp + src/dos/dos_files.cpp + src/dos/dos_ioctl.cpp + src/dos/dos_keyboard_layout.cpp + src/dos/dos_memory.cpp + src/dos/dos_misc.cpp + src/dos/dos_mscdex.cpp + src/dos/dos_mscdex.h + src/dos/dos_programs.cpp + src/dos/dos_tables.cpp + src/dos/drive_cache.cpp + src/dos/drive_fat.cpp + src/dos/drive_iso.cpp + src/dos/drive_overlay.cpp + src/dos/drive_virtual.cpp + src/dos/drives.cpp + src/fpu/fpu.cpp + src/fpu/fpu_instructions.h + src/fpu/fpu_instructions_x86.h + src/gui/dosbox_logo.h + src/gui/render.cpp + src/gui/render_loops.h + src/gui/render_scalers.cpp + src/gui/render_scalers.h + src/gui/render_simple.h + src/gui/render_templates.h + src/gui/render_templates_hq.h + src/gui/render_templates_hq2x.h + src/gui/render_templates_hq3x.h + src/gui/render_templates_sai.h + src/gui/sdl_gui.cpp + src/hardware/adlib.cpp + src/hardware/adlib.h + src/hardware/cmos.cpp + src/hardware/dbopl.cpp + src/hardware/dbopl.h + src/hardware/disney.cpp + src/hardware/dma.cpp + src/hardware/gameblaster.cpp + src/hardware/hardware.cpp + src/hardware/ipx.cpp + src/hardware/ipxserver.cpp + src/hardware/joystick.cpp + src/hardware/keyboard.cpp + src/hardware/memory.cpp + src/hardware/mpu401.cpp + src/hardware/pci_bus.cpp + src/hardware/pci_devices.h + src/hardware/pic.cpp + src/hardware/serialport/directserial.cpp + src/hardware/serialport/directserial.h + src/hardware/serialport/libserial.cpp + src/hardware/serialport/libserial.h + src/hardware/serialport/misc_util.cpp + src/hardware/serialport/misc_util.h + src/hardware/serialport/nullmodem.cpp + src/hardware/serialport/nullmodem.h + src/hardware/serialport/serialdummy.cpp + src/hardware/serialport/serialdummy.h + src/hardware/serialport/serialport.cpp + src/hardware/serialport/softmodem.cpp + src/hardware/serialport/softmodem.h + src/hardware/tandy_sound.cpp + src/hardware/timer.cpp + src/hardware/vga.cpp + src/hardware/vga_attr.cpp + src/hardware/vga_crtc.cpp + src/hardware/vga_dac.cpp + src/hardware/vga_draw.cpp + src/hardware/vga_gfx.cpp + src/hardware/vga_memory.cpp + src/hardware/vga_misc.cpp + src/hardware/vga_other.cpp + src/hardware/vga_paradise.cpp + src/hardware/vga_s3.cpp + src/hardware/vga_seq.cpp + src/hardware/vga_tseng.cpp + src/hardware/vga_xga.cpp + src/ints/bios.cpp + src/ints/bios_disk.cpp + src/ints/bios_keyboard.cpp + src/ints/ems.cpp + src/ints/int10.cpp + src/ints/int10.h + src/ints/int10_char.cpp + src/ints/int10_memory.cpp + src/ints/int10_misc.cpp + src/ints/int10_modes.cpp + src/ints/int10_pal.cpp + src/ints/int10_put_pixel.cpp + src/ints/int10_vesa.cpp + src/ints/int10_video_state.cpp + src/ints/int10_vptable.cpp + src/ints/mouse.cpp + src/ints/xms.cpp + src/ints/xms.h + src/libs/zmbv/zmbv.cpp + src/libs/zmbv/zmbv.h + src/misc/cross.cpp + src/misc/messages.cpp + src/misc/programs.cpp + src/misc/setup.cpp + src/shell/shell.cpp + src/shell/shell_batch.cpp + src/shell/shell_misc.cpp +Copyright: 2002-2020, The DOSBox Team License: GPL-2+ -Files: CODE_OF_CONDUCT.md -Copyright: 2020, Kevin R Croft -License: CC0-1.0 +Files: include/dos_inc.h + include/inout.h + include/mapper.h + include/mem.h + include/midi.h + include/mixer.h + include/setup.h + include/support.h + src/cpu/core_dynrec/risc_ppc.h + src/cpu/core_dynrec/risc_ppc64le.h + src/cpu/dyn_cache.h + src/dos/cdrom.h + src/dos/cdrom_image.cpp + src/dos/dos_classes.cpp + src/dos/drive_local.cpp + src/dosbox.cpp + src/gui/render_glsl.h + src/gui/sdl_mapper.cpp + src/gui/sdlmain.cpp + src/hardware/gus.cpp + src/hardware/iohandler.cpp + src/hardware/mame/emu.h + src/hardware/mixer.cpp + src/hardware/pcspeaker.cpp + src/midi/midi.cpp + src/midi/midi_alsa.h + src/midi/midi_coreaudio.h + src/midi/midi_coremidi.h + src/midi/midi_handler.h + src/midi/midi_oss.h + src/midi/midi_win32.h + src/misc/support.cpp + src/shell/shell_cmds.cpp +Copyright: 2019-2021, The DOSBox Staging Team + 2002-2020, The DOSBox Team +License: GPL-2+ + +Files: configure.ac + include/byteorder.h + include/compiler.h + include/fs_utils.h + include/mem_host.h + include/mem_unaligned.h + include/string_utils.h + include/types.h + src/dos/program_autotype.cpp + src/dos/program_autotype.h + src/dos/program_ls.cpp + src/dos/program_ls.h + src/gui/gui_msgs.h + src/gui/render_crt_glsl.h + src/misc/fs_utils_posix.cpp + src/misc/fs_utils_win32.cpp + tests/example.cpp + tests/fs_utils.cpp + tests/soft_limiter.cpp + tests/string_utils.cpp + tests/support.cpp +Copyright: 2019-2021, The DOSBox Staging Team +License: GPL-2+ + +Files: .github/scripts/build-and-run-sanitizers.sh + .github/scripts/build-autofdo.sh + .github/scripts/download-and-build-macports.sh + .github/scripts/fetch-and-merge-afdo.sh + .github/scripts/fetch-and-merge-profraw.sh + .github/scripts/install-and-update-macports.sh + .github/scripts/prepare-for-macports-cachehit.sh + .github/scripts/reset-brew.sh + .github/scripts/shrink-brew.sh + .github/scripts/shrink-macports.sh + .github/scripts/shrink-msys2.sh + scripts/automator/main.sh + scripts/build.sh + scripts/count-pvs-bugs.py + scripts/dump-preprocessor-defines.sh + scripts/fetch-workflows.sh + scripts/has-commits-since.sh + scripts/list-build-dependencies.sh + scripts/verify-ctype-algorithm-include-order.sh + scripts/verify-markdown.sh +Copyright: 2019-2021, Kevin R. Croft +License: GPL-2+ + +Files: contrib/translations/encode.sh + scripts/count-clang-bugs.py + scripts/count-warnings.py + scripts/count-xsan-issues.py + scripts/format-commit.sh + scripts/git-rlog.sh + scripts/import-from-svn/import-from-svn.sh + scripts/import-from-svn/import-svn-ignore.sh + scripts/msys-bash.py + scripts/verify-bash.sh + scripts/verify-python.sh +Copyright: 2019-2021, Patryk Obara +License: GPL-2+ + +Files: include/envelope.h + include/soft_limiter.h + src/hardware/dc_silencer.cpp + src/hardware/dc_silencer.h + src/hardware/envelope.cpp + src/libs/decoders/mp3_seek_table.cpp + src/libs/decoders/mp3_seek_table.h + src/libs/decoders/opus.cpp +Copyright: 2018-2021, Kevin R. Croft + 2020-2021, The DOSBox Staging Team +License: GPL-2+ + +Files: src/libs/decoders/SDL_sound.c + src/libs/decoders/SDL_sound.h + src/libs/decoders/SDL_sound_internal.h + src/libs/decoders/flac.c + src/libs/decoders/mp3.cpp + src/libs/decoders/vorbis.c + src/libs/decoders/wav.c +Copyright: 2018-2021, Kevin R. Croft + 2001-2017, Ryan C. Gordon + 2020-2021, The DOSBox Staging Team +License: GPL-2+ + +Files: contrib/icons/dosbox-staging.svg + contrib/icons/small-svg/* + src/dosbox_splash.svg + src/dosbox_staging_splash.svg +Copyright: 2020-2021, The DOSBox Staging Team +License: CC-BY-SA-4 -Files: contrib/linux/dosbox-staging.metainfo.xml -Copyright: 2020, The DOSBox Staging Team -License: CC0-1.0 +Files: contrib/fedora/dosbox-staging.spec +Copyright: 2020, Patryk Obara (pbo) +License: GPL-2+ -Files: INSTALL -Copyright: no-info-found -License: LGPL - -Files: include/byteorder.h -Copyright: 2020, The dosbox-staging team -License: GPL-2+ - -Files: m4/* -Copyright: 2016, 2018, Krzesimir Nowak - 2015, Paul Norman - 2015, Moritz Klammler - 2014, 2015, Google Inc.; contributed by Alexey Sokolov - 2013, Roy Stogner - 2012, Zack Weinberg - 2008, Benjamin Kosnik -License: FSFAP +Files: src/midi/midi_fluidsynth.cpp + src/midi/midi_fluidsynth.h +Copyright: 2020-2021, Nikos Chantziaras + 2020-2021, The DOSBox Staging Team + 2002-2011, The DOSBox Team +License: GPL-2+ -Files: m4/ax_cxx_compile_stdcxx_11.m4 -Copyright: 2015, Paul Norman - 2015, Moritz Klammler - 2014, 2015, Google Inc.; contributed by Alexey Sokolov - 2013, Roy Stogner - 2012, Zack Weinberg - 2008, Benjamin Kosnik -License: FSFAP +Files: src/hardware/opl.cpp + src/hardware/opl.h +Copyright: 1998-2001, Ken Silverman + 2002-2020, The DOSBox Team +License: LGPL-2.1+ -Files: m4/ax_pthread.m4 -Copyright: 2011, Daniel Richard G - 2019, Marc Stevens - 2008, Steven G. Johnson -License: GPL-3+ with AutoConf exception +Files: src/libs/decoders/dr_flac.h + src/libs/decoders/dr_wav.h +Copyright: 2020, David Reid +License: MIT/X11 or Unlicense -Files: scripts/* -Copyright: 2019, 2020, Patryk Obara -License: GPL-2+ +Files: src/libs/decoders/stb.h + src/libs/decoders/stb_vorbis.h +Copyright: 2017, Sean Barrett +License: Expat or Unlicense -Files: scripts/automator/* -Copyright: 2019, 2020, Kevin R Croft +Files: src/libs/zmbv/drvproc.cpp + src/libs/zmbv/zmbv_vfw.cpp +Copyright: 1993, Microsoft Corporation + 2002-2020, The DOSBox Team License: GPL-2+ -Files: scripts/build.sh - scripts/fetch-workflows.sh - scripts/list-build-dependencies.sh -Copyright: 2019, 2020, Kevin R Croft -License: GPL-2+ +Files: src/libs/nuked/opl3.c + src/libs/nuked/opl3.h +Copyright: 2013-2020, Nuke.YKT +License: LGPL-2.1+ -Files: scripts/count-pvs-bugs.py - scripts/dump-preprocessor-defines.sh - scripts/has-commits-since.sh - scripts/verify-ctype-algorithm-include-order.sh - scripts/verify-markdown.sh -Copyright: 2020, Kevin Croft -License: GPL-2+ +Files: src/libs/gui_tk/gui_tk.cpp + src/libs/gui_tk/gui_tk.h +Copyright: 2005-2007, JĂśrg Walter +License: GPL-3+ -Files: scripts/git-prehook-whitespace.sh -Copyright: Oldman and contributors: -License: GPL-2+ +Files: src/libs/ppscale/ppscale.c + src/libs/ppscale/ppscale.h +Copyright: 2018-2020, Anton Shepelev +License: Fair -Files: src/debug/debug_disasm.cpp -Copyright: no-info-found -License: GPL +Files: m4/ax_cxx_compile_stdcxx.m4 +Copyright: 2008, Benjamin Kosnik + 2014-2015, Google Inc.; contributed by Alexey Sokolov + 2016-2018, Krzesimir Nowak + 2015, Moritz Klammler + 2015, Paul Norman + 2013, Roy Stogner + 2012, Zack Weinberg +License: FSFAP Files: src/dos/dos_codepages.h - src/dos/dos_keyboard_layout_data.h -Copyright: Henrique Peron -License: GPL-2+ - -Files: src/dos/program_autotype.cpp - src/dos/program_autotype.h -Copyright: 2020, The dosbox-staging team +Copyright: 1993-1996, Kosta Kostis + 2002-2019, Henrique Peron + 1996-2020, Markus Oberhumer, Laszlo Molnar & John Reiser + 2020-2021, The DOSBox Staging Team License: GPL-2+ -Files: src/gui/midi_coremidi.h -Copyright: no-info-found +Files: src/midi/midi_mt32.cpp +Copyright: 2020-2021, Nikos Chantziaras + 2020-2021, The DOSBox Staging Team + 2012-2021, sergm License: GPL-2+ -Files: src/gui/sdlmain.cpp -Copyright: 2019, 2020, The dosbox-staging team - 2002-2020, The DOSBox Team +Files: src/dos/dos_keyboard_layout_data.h +Copyright: 2006-2019, Henrique Peron + 2020-2021, The DOSBox Staging Team License: GPL-2+ -Files: src/hardware/mame/* -Copyright: Jarek Burczynski -License: BSD-3-Clause +Files: m4/ax_pthread.m4 +Copyright: 2011, Daniel Richard G + 2019, Marc Stevens + 2008, Steven G. Johnson +License: GPL-3+ with AutoConf exception Files: src/hardware/mame/fmopl.cpp - src/hardware/mame/fmopl.h -Copyright: Jarek Burczynski,Tatsuyuki Satoh -License: BSD-3-Clause - -Files: src/hardware/mame/saa1099.cpp - src/hardware/mame/saa1099.h -Copyright: Juergen Buchmueller, Manuel Abadia -License: BSD-3-Clause - -Files: src/hardware/mame/sn76496.cpp - src/hardware/mame/sn76496.h -Copyright: Nicola Salmoria -License: BSD-3-Clause - -Files: src/hardware/opl.cpp - src/hardware/opl.h -Copyright: 2002-2020, The DOSBox Team -License: LGPL-2.1+ + src/hardware/mame/fmopl.h +Copyright: Jarek Burczynski + Tatsuyuki Satoh +License: GPL-2+ -Files: src/libs/* -Copyright: 2020, The DOSBox Team - 2018, 2019, Kevin R. Croft - 2001-2017, Ryan C. Gordon +Files: src/hardware/mame/ymdeltat.cpp + src/hardware/mame/ymdeltat.h + src/hardware/mame/ymf262.cpp + src/hardware/mame/ymf262.h +Copyright: Jarek Burczynski License: GPL-2+ -Files: src/libs/decoders/archive.h -Copyright: Public Domain -License: Unlicense +Files: src/hardware/sblaster.cpp +Copyright: 1992, CREATIVE TECHNOLOGY LTD + 2002-2020, The DOSBox Team +License: GPL-2+ -Files: src/libs/decoders/dr_flac.h - src/libs/decoders/dr_mp3.h - src/libs/decoders/dr_wav.h +Files: src/libs/decoders/dr_mp3.h Copyright: 2020, David Reid License: MIT-0 or Unlicense -Files: src/libs/decoders/flac.c - src/libs/decoders/mp3.cpp -Copyright: 2020, The dosbox-staging team - 2018, 2019, Kevin R. Croft - 2001-2017, Ryan C. Gordon -License: GPL-2+ - -Files: src/libs/decoders/mp3_seek_table.cpp -Copyright: 2020, The DOSBox Team - 2018, 2019, Kevin R. Croft -License: GPL-2+ - -Files: src/libs/decoders/mp3_seek_table.h - src/libs/decoders/opus.cpp -Copyright: 2020, The DOSBox Team - 2018, 2019, Kevin R. Croft +Files: src/midi/midi_mt32.h +Copyright: 2020-2021, The DOSBox Staging Team + 2012-2021, sergm License: GPL-2+ -Files: src/libs/decoders/stb.h - src/libs/decoders/stb_vorbis.h -Copyright: 2017, Sean Barrett -License: Expat or Unlicense - -Files: src/libs/decoders/vorbis.c -Copyright: 2018-2020, The DOSBox Team - 2001-2017, Ryan C. Gordon +Files: scripts/git-prehook-whitespace.sh +Copyright: Oldman License: GPL-2+ +Comment: No explicit license found, using license(s) from: + COPYING -Files: src/libs/decoders/xxh3.h -Copyright: 2019, 2020, Yann Collet -License: BSD-2-clause +Files: src/libs/decoders/docs/* +Copyright: 1991-1999, Free Software Foundation, Inc +License: LGPL-2.1+ + +Files: src/libs/decoders/archive.h +Copyright: laws, the author or authors +License: Unlicense Files: src/libs/decoders/xxhash.h Copyright: 2012-2020, Yann Collet License: BSD-2-clause -Files: src/libs/gui_tk/* -Copyright: 2005-2007, JĂśrg Walter -License: GPL-3+ +Files: src/libs/zmbv/zmbv_vfw.h +Copyright: 2000, Ben Rudiak-Gould +License: GPL-2+ +Comment: No explicit license found, using license(s) from: + COPYING -Files: src/libs/nuked/* -Copyright: 2013-2020, Alexey Khokholov +Files: src/winres.rc +Copyright: 2020, DOSBox Staging Team License: GPL-2+ +Comment: No explicit license found, using license(s) from: + COPYING -Files: src/libs/ppscale/* -Copyright: 2018-2020, Anton Shepelev -License: Fair +Files: m4/ax_cxx_compile_stdcxx_14.m4 +Copyright: 2015, Moritz Klammler +License: FSFAP -Files: src/libs/zmbv/* -Copyright: 2002-2020, The DOSBox Team -License: GPL-2+ +Files: contrib/linux/dosbox-staging.metainfo.xml +Copyright: 2020-2021, The DOSBox Staging Team +License: CC0-1.0 -Files: src/libs/zmbv/zmbv_vfw.h -Copyright: 2000, Ben Rudiak-Gould +Files: scripts/dosbox-installer.nsi +Copyright: 2002-2020, DOSBox Team License: GPL-2+ +Comment: No explicit license found, using license(s) from: + COPYING + +Files: src/debug/debug_disasm.cpp +Copyright: 1992, Robin Hilliard +License: GPL Files: debian/* -Copyright: 2003, Peter Veenstra +Copyright: 2020-2021, Feignint 2009-2014, Jan Dittberner + 2003, Peter Veenstra 2018-2019, Stephen Kitt - 2020, FeignInt <8937-Feignint@users.noreply.salsa.debian.org> License: GPL-2 -Files: debian/icons/hicolor/scalable/* -Copyright: 2020, The dosbox-staging team -License: CC-BY-SA-4 - License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -230,31 +522,6 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -License: BSD-3-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - License: CC-BY-SA-4 Attribution-ShareAlike 4.0 International . @@ -279,36 +546,36 @@ following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. . - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - . - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + . + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees . ======================================================================= . @@ -328,157 +595,157 @@ . Section 1 -- Definitions. . - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - . - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - . - c. BY-SA Compatible License means a license listed at - creativecommons.org/compatiblelicenses, approved by Creative - Commons as essentially the equivalent of this Public License. - . - d. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - . - e. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - . - f. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - . - g. License Elements means the license attributes listed in the name - of a Creative Commons Public License. The License Elements of this - Public License are Attribution and ShareAlike. - . - h. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - . - i. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - . - j. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - . - k. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - . - l. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + . + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + . + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + . + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + . + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + . + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + . + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + . + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + . + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + . + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + . + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + . + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. . - m. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. . . Section 2 -- Scope. . - a. License grant. + a. License grant. . - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - . - a. reproduce and Share the Licensed Material, in whole or - in part; and - . - b. produce, reproduce, and Share Adapted Material. - . - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - . - 3. Term. The term of this Public License is specified in Section - 6(a). - . - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - . - 5. Downstream recipients. - . - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - . - b. Additional offer from the Licensor -- Adapted Material. - Every recipient of Adapted Material from You - automatically receives an offer from the Licensor to - exercise the Licensed Rights in the Adapted Material - under the conditions of the Adapter's License You apply. - . - c. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - . - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - . - b. Other rights. - . - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - . - 2. Patent and trademark rights are not licensed under this - Public License. - . - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + . + a. reproduce and Share the Licensed Material, in whole or + in part; and + . + b. produce, reproduce, and Share Adapted Material. + . + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + . + 3. Term. The term of this Public License is specified in Section + 6(a). + . + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + . + 5. Downstream recipients. + . + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + . + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + . + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + . + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + . + b. Other rights. + . + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + . + 2. Patent and trademark rights are not licensed under this + Public License. + . + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. . . Section 3 -- License Conditions. @@ -486,66 +753,66 @@ Your exercise of the Licensed Rights is expressly made subject to the following conditions. . - a. Attribution. + a. Attribution. . - 1. If You Share the Licensed Material (including in modified - form), You must: + 1. If You Share the Licensed Material (including in modified + form), You must: . - a. retain the following if it is supplied by the Licensor - with the Licensed Material: + a. retain the following if it is supplied by the Licensor + with the Licensed Material: . - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); . - ii. a copyright notice; + ii. a copyright notice; . - iii. a notice that refers to this Public License; + iii. a notice that refers to this Public License; . - iv. a notice that refers to the disclaimer of - warranties; + iv. a notice that refers to the disclaimer of + warranties; . - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; . - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and . - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. . - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. . - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. . - b. ShareAlike. + b. ShareAlike. . - In addition to the conditions in Section 3(a), if You Share - Adapted Material You produce, the following conditions also apply. + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. . - 1. The Adapter's License You apply must be a Creative Commons - license with the same License Elements, this version or - later, or a BY-SA Compatible License. + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. . - 2. You must include the text of, or the URI or hyperlink to, the - Adapter's License You apply. You may satisfy this condition - in any reasonable manner based on the medium, means, and - context in which You Share Adapted Material. + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. . - 3. You may not offer or impose any additional or different terms - or conditions on, or apply any Effective Technological - Measures to, Adapted Material that restrict exercise of the - rights granted under the Adapter's License You apply. + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. . . Section 4 -- Sui Generis Database Rights. @@ -553,18 +820,18 @@ Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: . - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - . - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material, - . - including for purposes of Section 3(b); and - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + . + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + . + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. . For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed @@ -573,105 +840,103 @@ . Section 5 -- Disclaimer of Warranties and Limitation of Liability. . - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - . - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - . - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + . + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + . + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. . . Section 6 -- Term and Termination. . - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - . - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - . - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - . - 2. upon express reinstatement by the Licensor. - . - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - . - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + . + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + . + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + . + 2. upon express reinstatement by the Licensor. + . + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + . + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. . - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. . . Section 7 -- Other Terms and Conditions. . - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. . - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. . . Section 8 -- Interpretation. . - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - . - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - . - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - . - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + . + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + . + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + . + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. . . ======================================================================= . - Creative Commons is not a party to its public - licenses. Notwithstanding, Creative Commons may elect to apply one of - its public licenses to material it publishes and in those instances - will be considered the “Licensor.” The text of the Creative Commons - public licenses is dedicated to the public domain under the CC0 Public - Domain Dedication. Except for the limite purpose of indicating that - material is shared under a Creative Commons public license or as + Creative Commons is not a party to its public licenses. + Notwithstanding, Creative Commons may elect to apply one of its public + licenses to material it publishes and in those instances will be + considered the "Licensor." Except for the limited purpose of indicating + that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo @@ -679,14 +944,21 @@ without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For - the avoidance of doubt, this paragraph does not form part of the - public licenses. + the avoidance of doubt, this paragraph does not form part of the public + licenses. . Creative Commons may be contacted at creativecommons.org. License: CC0-1.0 - On Debian systems, the complete text of the Creative Commons 1.0 Universal - License can be found in "/usr/share/common-licenses/CC0-1.0". + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + . + You should have received a copy of the CC0 Public Domain Dedication along with + this software. If not, see . + . + On Debian systems, the complete text of the CC0 1.0 Universal license can be + found in ‘/usr/share/common-licenses/CC0-1.0’. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -789,15 +1061,29 @@ On Debian systems, the complete text of the GNU General Public License, version 3 can be found in "/usr/share/common-licenses/GPL-3". -License: LGPL - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation. +License: GPL-3+ with AutoConf exception + This file is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program; if not, see . + . + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a + configuration script generated by Autoconf, you may include it under + the same distribution terms that you use for the rest of that + program. This Exception is an additional permission under section 7 + of the GNU General Public License, version 3 ("GPLv3"). + . + On Debian GNU/Linux systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL-3. License: LGPL-2.1+ This library is free software; you can redistribute it and/or @@ -816,6 +1102,31 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . +License: MIT/X11 + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, distribute with modifications, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + THE USE OR OTHER DEALINGS IN THE SOFTWARE. + . + Except as contained in this notice, the name(s) of the above copyright + holders shall not be used in advertising or otherwise to promote the + sale, use or other dealings in this Software without prior written + authorization. + License: Unlicense This is free and unencumbered software released into the public domain. . @@ -842,26 +1153,3 @@ . For more information, please refer to -License: GPL-3+ with AutoConf exception - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program; if not, see . - . - As a special exception to the GNU General Public License, if you - distribute this file as part of a program that contains a - configuration script generated by Autoconf, you may include it under - the same distribution terms that you use for the rest of that - program. This Exception is an additional permission under section 7 - of the GNU General Public License, version 3 ("GPLv3"). - . - On Debian GNU/Linux systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL-3. diff -Nru dosbox-staging-0.76.0/debian/dosbox-staging.install dosbox-staging-0.77.0/debian/dosbox-staging.install --- dosbox-staging-0.76.0/debian/dosbox-staging.install 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/dosbox-staging.install 2021-07-03 03:39:07.000000000 +0000 @@ -1,4 +1,5 @@ contrib/linux/dosbox-staging.desktop usr/share/applications contrib/linux/dosbox-staging.metainfo.xml usr/share/metainfo +contrib/linux/bash-completion/dosbox usr/share/bash-completion/completions usr/bin/dosbox usr/share diff -Nru dosbox-staging-0.76.0/debian/patches/add-leading-PATH-to-hicolor-in-icons-Makefile.patch dosbox-staging-0.77.0/debian/patches/add-leading-PATH-to-hicolor-in-icons-Makefile.patch --- dosbox-staging-0.76.0/debian/patches/add-leading-PATH-to-hicolor-in-icons-Makefile.patch 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/add-leading-PATH-to-hicolor-in-icons-Makefile.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -From: FeignInt <8937-Feignint@users.noreply.salsa.debian.org> -Date: Wed, 28 Oct 2020 23:34:47 +0000 -Subject: add leading PATH to hicolor in icons/Makefile - -With %hicolor, debian/rules can use: - $(MAKE) -C contrib/icons \ - $(CURDIR)/debian/tmp/usr/share/icons/hicolor \ - clean - -Replaces: - $(MAKE) -C contrib/icons hicolor - mkdir -p $(CURDIR)/debian/tmp/usr/share/icons - mv contrib/icons/hicolor \ - $(CURDIR)/debian/tmp/usr/share/icons/ - $(MAKE) -C contrib/icons clean - -Note, this breaks a straight "hicolor" target. -One workaround is to lead target with an escaped space - make \ hicolor - -I guess another would be to use "%icolor", -but that would be more prone to typos. ---- - contrib/icons/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/contrib/icons/Makefile b/contrib/icons/Makefile -index b26de6b..6f760fa 100644 ---- a/contrib/icons/Makefile -+++ b/contrib/icons/Makefile -@@ -77,7 +77,7 @@ dosbox-staging.iconset: \ - # This is not strictly necessary (just placing scalable icon is enough, - # but some there are some corner cases where small raster icon looks better). - # --hicolor: \ -+%hicolor: \ - dosbox-staging.svg \ - icon_32.png \ - icon_24.png \ diff -Nru dosbox-staging-0.76.0/debian/patches/bash-completion/Experimental-bash-completion.patch dosbox-staging-0.77.0/debian/patches/bash-completion/Experimental-bash-completion.patch --- dosbox-staging-0.76.0/debian/patches/bash-completion/Experimental-bash-completion.patch 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/bash-completion/Experimental-bash-completion.patch 2021-07-03 03:39:07.000000000 +0000 @@ -0,0 +1,177 @@ +From: Feignint <37488595+FeignInt@users.noreply.github.com> +Date: Thu, 21 Jan 2021 20:14:35 +0000 +Subject: Experimental bash completion + +Forwarded: https://github.com/dosbox-staging/dosbox-staging/pull/712 +--- + contrib/linux/bash-completion/dosbox | 161 +++++++++++++++++++++++++++++++++++ + 1 file changed, 161 insertions(+) + create mode 100644 contrib/linux/bash-completion/dosbox + +diff --git a/contrib/linux/bash-completion/dosbox b/contrib/linux/bash-completion/dosbox +new file mode 100644 +index 0000000..f12a8fd +--- /dev/null ++++ b/contrib/linux/bash-completion/dosbox +@@ -0,0 +1,161 @@ ++# dosbox(1) completion -*- shell-script -*- ++# shellcheck shell=bash ++### EDITING NOTES: ++# As this is a bash function, when adding variables or arrays it is important ++# to initialise with local. This prevents the var./array polluting the users ++# env. Please check output of: ++# declare -x ; declare -a ++# after testing your new completion script ++# ++# Notable exception is COMPREPLY, this needs to persist for communication with ++# bash_completion ++#### ++_dosbox() ++{ ++ COMPREPLY=() ++ local cur prev words cword ++ _init_completion -s || return ++ local IFS=$'|\t\n' ++ local words_filter="${words[*]:1:$(( cword - 1 ))}" ++ ++ ### Main options, note the \ line cont. ++ # using nameref ++ # shellcheck disable=SC2034 ++ local -a \ ++ _main_opts=( ++ -h --help -fullscreen -startmapper -noautoexec -securemode ++ -scaler -forcescaler -lang -machine -socket -exit -userconf ++ )\ ++ _repeat_opts=( ++ -conf -c ++ )\ ++ _exclusive_opts=( ++ --version --printconf --editconf -resetconf -eraseconf ++ -erasemapper -resetmapper ++ ) ++ #### ++ ++ # setup nameref to point to array ++ [[ ${prev:0:1} == - ]] && local -n _sub_opts=${prev//+(-)/_} ++ ++ ### Arrays holding sub. options ++ # The name should be the trigger option with leading "-"s replaced with "_" ++ # for example, --machine => _machine ++ # latter parts of the script will reference these arrays via a "nameref" ++ # i.e. The last option dictates the available sub. options ++ ++ # ++ # shellcheck disable=SC2034 ++ local -a \ ++ _machine=( ++ hercules cga cga_mono tandy pcjr ega vgaonly svga_s3 ++ svga_et3000 svga_et4000 svga_paradise vesa_nolfb ++ )\ ++ _scaler=( ++ none normal2x normal3x advmame2x advmame3x advinterp2x ++ advinterp3x hq2x hq3x 2xsai super2xsai supereagle tv2x ++ tv3x rgb2x rgb3x scan2x scan3x ++ ) ++ ### Offer ability for the user to override the default .conf dir. ++ # shellcheck disable=SC2034 ++ local _conf="${DOSBOX_STAGING_CONF_DIR:-$XDG_CONFIG_HOME/dosbox/}" ++ #TODO validate the dir exists ++ #TODO document DOSBOX_STAGING_CONF_DIR var. ++ #### ++ ++ # forcescaler uses same sub. options as scaler, so setup a nameref to it ++ # using nameref _sub_opts ++ # shellcheck disable=SC2034 ++ local -n _forcescaler=_scaler ++ ++ # can we get hints from manpage? ++ man -w dosbox >/dev/null 2>&1 && local manpage_hints=true ++ ++ # pager may not exist, README might not be where I expect ++ local -a _pager ++ readarray -t -O 0 _pager < <( type -p zless zmore || true; ) ++ ++ local -a _help_opts ++ readarray -t -O 0 _help_opts < <( ++ [[ ${manpage_hints} == true ]] && ++ printf "%s\n" "--MANPAGE" ++ ++ [[ ${_pager[*]} ]] && ++ [[ -e /usr/share/doc/dosbox-staging/README.gz ]] && ++ printf "%s\n" "--README" ++ #TODO try harder to find README ++ ) ++ ++ case "$cur" in ++ --M*) ++ compopt -o nospace ++ # have to hope they tabbed ++ man dosbox ++ # replace cur with space ++ COMPREPLY=( " " ) ++ return;; ++ --R*) ++ compopt -o nospace ++ "${_pager[0]}" /usr/share/doc/dosbox-staging/README.gz ++ # replace cur with space ++ COMPREPLY=( " " ) ++ return;; ++ esac ++ ++ case "$prev" in ++ -?(-)conf) ++ compopt -o plusdirs ++ readarray -t -O ${#COMPREPLY[@]} COMPREPLY \ ++ < <( compgen -f -X '!*.@(conf|CONF)' -- "${cur}" ) ++ ++ # skip configured conf dir if cur looks like it contains a path ++ [[ ${cur} =~ ^[.]|[/\~] ]] || ++ readarray -t -O ${#COMPREPLY[@]} COMPREPLY \ ++ < <( compgen -f -X '!*.@(conf|CONF)' -- "${_sub_opts%/}/${cur##*/}" ) ++ ++ # filter out previously selected confs ++ COMPREPLY=( "${COMPREPLY[@]#@(${words_filter})}" ) ++ return;; ++ -?(-)@(?(force)scaler|machine)) ++ readarray -t -O 0 COMPREPLY \ ++ < <( compgen -W "${_sub_opts[*]}" -- "${cur}" ) ++ return;; ++ -socket|-lang|-c) ++ # man and the manpage required for hints ++ [[ ${manpage_hints} == true && -z ${cur} ]] && ++ readarray -t -O ${#COMPREPLY[@]} COMPREPLY \ ++ < <( ++ # shellcheck disable=SC2046 ++ # using IFS=$'|\t\n" I want sed's output split ++ printf "Âť %s\n" \ ++ "no completion support for $prev yet" \ ++ "hint from manpage:" \ ++ $( < <( man dosbox 2>/dev/null ) \ ++ sed -n -E '/ '"${prev#[-]/[-]}"' /,/^$/{s/^ +//p}' ) ++ ) ++ ;; ++ esac ++ ++ # Some options are exclusive, no more options should be available ++ [[ ${words[*]} =~ (${_exclusive_opts[*]}) ]] && return ++ ++ # Turn dir listing on ++ compopt -o plusdirs ++ ++ readarray -t -O ${#COMPREPLY[@]} COMPREPLY < <( ++ # Only show exclusive options in initial pass ++ [[ $cword -gt 1 ]] || compgen -W "${_exclusive_opts[*]}" -- "${cur}" ++ ++ # May not be supported ( missing document or reader program ) ++ [[ ${_help_opts[*]} ]] && compgen -W "${_help_opts[*]}" -- "${cur}" ++ ++ # Should only be used once, so filtered ++ compgen -W "${_main_opts[*]#@(${words_filter})}" -- "${cur}" ++ ++ # can be used more than once ++ compgen -W "${_repeat_opts[*]}" -- "${cur}" ++ ++ compgen -f -X '!*.@(bat|BAT|com|COM|exe|EXE)' -- "${cur}" ++ ) ++} ++complete -F _dosbox -o nosort dosbox diff -Nru dosbox-staging-0.76.0/debian/patches/contrib/static-fluidsynth/SF3-with-static-fluidsynth.patch dosbox-staging-0.77.0/debian/patches/contrib/static-fluidsynth/SF3-with-static-fluidsynth.patch --- dosbox-staging-0.76.0/debian/patches/contrib/static-fluidsynth/SF3-with-static-fluidsynth.patch 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/contrib/static-fluidsynth/SF3-with-static-fluidsynth.patch 2021-07-03 03:39:07.000000000 +0000 @@ -0,0 +1,39 @@ +From: Feignint <37488595+FeignInt@users.noreply.github.com> +Date: Thu, 31 Dec 2020 16:15:01 +0000 +Subject: Add SF3 support to static-fluidsynth + +Forwarded: PlaceHolder + +This is only used when fluidsynth version <2.0.0 + +SF3 SoundFonts are available to Debian Buster via +buster-backports, I imagine the same is true of +Ubuntu's Bionic. +--- + contrib/static-fluidsynth/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/contrib/static-fluidsynth/Makefile b/contrib/static-fluidsynth/Makefile +index f158e6e..73f55bb 100644 +--- a/contrib/static-fluidsynth/Makefile ++++ b/contrib/static-fluidsynth/Makefile +@@ -91,7 +91,7 @@ fluidsynth/build/Makefile: fluidsynth/build + -Denable-ladspa=0 \ + -Denable-lash=0 \ + -Denable-libinstpatch=0 \ +- -Denable-libsndfile=0 \ ++ -Denable-libsndfile=1 \ + -Denable-midishare=0 \ + -Denable-network=0 \ + -Denable-oss=0 \ +@@ -129,8 +129,8 @@ Export the following to configure dosbox-staging with pkg-config + export PKG_CONFIG_PATH="$(CURDIR)/fluidsynth/build" + endef + +-GLIB_LIBS = $(shell pkg-config --libs gthread-2.0 glib-2.0) +-GLIB_CFLAGS = $(shell pkg-config --cflags gthread-2.0 glib-2.0) ++GLIB_LIBS = $(shell pkg-config --libs gthread-2.0 glib-2.0 sndfile) ++GLIB_CFLAGS = $(shell pkg-config --cflags gthread-2.0 glib-2.0 sndfile) + .PHONY: fluidsynth-message + fluidsynth-message: lib/libfluidsynth.a + $(info $(FLUIDSYNTH_EXPORTS)) diff -Nru dosbox-staging-0.76.0/debian/patches/fix-macro-error-in-docs-dosbox.1.patch dosbox-staging-0.77.0/debian/patches/fix-macro-error-in-docs-dosbox.1.patch --- dosbox-staging-0.76.0/debian/patches/fix-macro-error-in-docs-dosbox.1.patch 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/fix-macro-error-in-docs-dosbox.1.patch 2021-07-03 03:39:07.000000000 +0000 @@ -2,18 +2,30 @@ Date: Tue, 27 Oct 2020 19:59:35 +0000 Subject: fix macro error in docs/dosbox.1 -Fixes -line 242: 'R' is a string (producing the - registered sign), not a macro. +Fixes lines 112,242,360 + 'R' is a string (producing the + registered sign), not a macro. --- - docs/dosbox.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + docs/dosbox.1 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/dosbox.1 b/docs/dosbox.1 -index f9241f5..ccb350d 100644 +index 10c5848..0390a40 100644 --- a/docs/dosbox.1 +++ b/docs/dosbox.1 -@@ -239,7 +239,7 @@ this as well!) +@@ -144,9 +144,9 @@ an Internal Program, a DOS command or an executable on a mounted drive. + Output version information and exit. Useful for frontends. + .TP + .BI "\-\-editconf ["editor ] +-.R Open the default configuration file in a text editor. If no editor name ++.RI "Open the default configuration file in a text editor. If no editor name + is given, then use the program from EDITOR environment variable, +-otherwise DOSBox will try to guess the name. ++otherwise DOSBox will try to guess the name." + .TP + .BI \-opencaptures " program" + .RI "calls " program " with as first parameter the location of the captures folder." +@@ -273,7 +273,7 @@ this as well!) .RS .TP .B \-All @@ -22,3 +34,12 @@ .TP .B Drive: .RB "Reread directory structure for drive " Drive: +@@ -392,7 +392,7 @@ Any configuration option can be override using an environment variable. + interpreted as follows: + .B DOSBOX_SECTIONNAME_PROPERTYNAME=value + .PP +-.R For example, you can override render aspect this way: ++.RB "For example, you can override render aspect this way:" + .PP + .B $ DOSBOX_RENDER_ASPECT=false dosbox + .SH NOTES diff -Nru dosbox-staging-0.76.0/debian/patches/fluidsynth/add-sf3-soundfont-search.patch dosbox-staging-0.77.0/debian/patches/fluidsynth/add-sf3-soundfont-search.patch --- dosbox-staging-0.76.0/debian/patches/fluidsynth/add-sf3-soundfont-search.patch 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/fluidsynth/add-sf3-soundfont-search.patch 2021-07-03 03:39:07.000000000 +0000 @@ -0,0 +1,96 @@ +From: Feignint <37488595+FeignInt@users.noreply.github.com> +Date: Mon, 7 Dec 2020 09:51:30 +0000 +Subject: Include sf3 SoundFont search in midi_fluidsynth.cpp + +Forwarded: PlaceHolder + +Broader search for SoundFonts + +Initial configured soundfont switched: + + default.sf2 => default + +Search in dirs. + + sound{,font}s/{,sf{2,3}/} + +And for filenames ending .sf{2,3} and -GM.sf{2,3} +instead of just .sf2 +Note: the -GM is Debian specific, the rational is +it is easier to add future, none GM SoundFonts. + +This catches + + default.sf2 default-GM.sf2 + default.sf3 default-GM.sf3 + +in dirs. + + soundfonts/ sounds/sf2/ sounds/sf3/ + +Which +I think covers most, if not all distributions +--- + src/midi/midi_fluidsynth.cpp | 26 +++++++++++++++++--------- + 1 file changed, 17 insertions(+), 9 deletions(-) + +diff --git a/src/midi/midi_fluidsynth.cpp b/src/midi/midi_fluidsynth.cpp +index b438643..c277311 100644 +--- a/src/midi/midi_fluidsynth.cpp ++++ b/src/midi/midi_fluidsynth.cpp +@@ -46,16 +46,18 @@ static void init_fluid_dosbox_settings(Section_prop &secprop) + { + constexpr auto when_idle = Property::Changeable::WhenIdle; + +- // Name 'default.sf2' picks the default soundfont if it's installed +- // in the OS. Usually it's Fluid_R3. +- auto *str_prop = secprop.Add_string("soundfont", when_idle, "default.sf2"); ++ // Name 'default' picks the default soundfont if it is installed ++ // Usually it is a symlink, note: file extension appended when searching ++ auto *str_prop = secprop.Add_string("soundfont", when_idle, "default"); + str_prop->Set_help( +- "Path to a SoundFont file in .sf2 format. You can use an\n" +- "absolute or relative path, or the name of an .sf2 inside\n" +- "the 'soundfonts' directory within your DOSBox configuration\n" +- "directory.\n" ++ "Path to a SoundFont file. You can use an absolute or relative path,\n" ++ "or simply the name of a soundfont and known directories will be searched\n" ++ "sf2 (uncompressed) format has priority over sf3 (compressed)\n" ++ "explicitly including the file extension overrides this\n" ++ "e.g. 'MuseScore_General_Full.sf3'\n" ++ "But in general is not required\n" + "An optional percentage will scale the SoundFont's volume.\n" +- "For example: 'soundfont.sf2 50' will attenuate it by 50 percent.\n" ++ "For example: 'soundfont 50' will attenuate it by 50 percent.\n" + "The scaling percentage can range from 1 to 500."); + } + +@@ -139,6 +141,7 @@ static std::deque get_data_dirs() + xdg_data_home + "/dosbox/soundfonts/", + xdg_data_home + "/soundfonts/", + xdg_data_home + "/sounds/sf2/", ++ xdg_data_home + "/sounds/sf3/", + }; + + // Second priority are the $XDG_DATA_DIRS +@@ -154,6 +157,7 @@ static std::deque get_data_dirs() + const auto resolved_dir = CROSS_ResolveHome(xdg_data_dir); + dirs.emplace_back(resolved_dir + "/soundfonts/"); + dirs.emplace_back(resolved_dir + "/sounds/sf2/"); ++ dirs.emplace_back(resolved_dir + "/sounds/sf3/"); + } + + // Third priority is $XDG_CONF_HOME, for convenience +@@ -170,7 +174,11 @@ static std::string find_sf_file(const std::string &name) + if (path_exists(sf_path)) + return sf_path; + for (const auto &dir : get_data_dirs()) { +- for (const auto &sf : {dir + name, dir + name + ".sf2"}) { ++ for (const auto &sf : {dir + name, ++ dir + name + ".sf2", ++ dir + name + "-GM.sf2", ++ dir + name + ".sf3", ++ dir + name + "-GM.sf3"}) { + // DEBUG_LOG_MSG("MIDI: FluidSynth checking if '%s' exists", sf.c_str()); + if (path_exists(sf)) + return sf; diff -Nru dosbox-staging-0.76.0/debian/patches/fluidsynth/Prioritise-SF3-over-SF2-SoundFont.patch dosbox-staging-0.77.0/debian/patches/fluidsynth/Prioritise-SF3-over-SF2-SoundFont.patch --- dosbox-staging-0.76.0/debian/patches/fluidsynth/Prioritise-SF3-over-SF2-SoundFont.patch 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/fluidsynth/Prioritise-SF3-over-SF2-SoundFont.patch 2021-07-03 03:39:07.000000000 +0000 @@ -0,0 +1,82 @@ +From: Feignint <37488595+FeignInt@users.noreply.github.com> +Date: Fri, 8 Jan 2021 14:05:44 +0000 +Subject: Prioritise SF3 over SF2 SoundFont + +Forwarded: PlaceHolder + +When searching for SoundFont look for SF3 before +SF2. + +On Debian SF2 (uncompresssed) SoundFonts are +symlinked to SF3 equivalent filename (the SF2 +format is understood by clients supporting SF3) + +Not prioritising SF3 could result in the inferior +`timgm6mb-soundfont` being used as the 'default' +when a superior, albeit compressed, SF3 format +e.g. `musescore-general-soundfont` is installed. +--- + src/midi/midi_fluidsynth.cpp | 22 +++++++++++++--------- + 1 file changed, 13 insertions(+), 9 deletions(-) + +diff --git a/src/midi/midi_fluidsynth.cpp b/src/midi/midi_fluidsynth.cpp +index c277311..8c507a9 100644 +--- a/src/midi/midi_fluidsynth.cpp ++++ b/src/midi/midi_fluidsynth.cpp +@@ -52,13 +52,14 @@ static void init_fluid_dosbox_settings(Section_prop &secprop) + str_prop->Set_help( + "Path to a SoundFont file. You can use an absolute or relative path,\n" + "or simply the name of a soundfont and known directories will be searched\n" +- "sf2 (uncompressed) format has priority over sf3 (compressed)\n" +- "explicitly including the file extension overrides this\n" +- "e.g. 'MuseScore_General_Full.sf3'\n" +- "But in general is not required\n" ++ "SF3 (compressed) has priority over SF2 (uncompressed) SoundFonts\n" ++ "explicitly include the .sf2 file extension to override this\n" + "An optional percentage will scale the SoundFont's volume.\n" + "For example: 'soundfont 50' will attenuate it by 50 percent.\n" + "The scaling percentage can range from 1 to 500."); ++ // TODO: Feignint: clean up wording regards SF2 vs SF3 with respect to non-Debian ++ // or more specifically non-Linux (I imagine most Linux distros have similar symlink ++ // strategy to Debian) + } + + // SetMixerLevel is a callback that's given the user-desired mixer level, +@@ -140,8 +141,8 @@ static std::deque get_data_dirs() + std::deque dirs = { + xdg_data_home + "/dosbox/soundfonts/", + xdg_data_home + "/soundfonts/", +- xdg_data_home + "/sounds/sf2/", + xdg_data_home + "/sounds/sf3/", ++ xdg_data_home + "/sounds/sf2/", + }; + + // Second priority are the $XDG_DATA_DIRS +@@ -156,8 +157,8 @@ static std::deque get_data_dirs() + } + const auto resolved_dir = CROSS_ResolveHome(xdg_data_dir); + dirs.emplace_back(resolved_dir + "/soundfonts/"); +- dirs.emplace_back(resolved_dir + "/sounds/sf2/"); + dirs.emplace_back(resolved_dir + "/sounds/sf3/"); ++ dirs.emplace_back(resolved_dir + "/sounds/sf2/"); + } + + // Third priority is $XDG_CONF_HOME, for convenience +@@ -174,11 +175,14 @@ static std::string find_sf_file(const std::string &name) + if (path_exists(sf_path)) + return sf_path; + for (const auto &dir : get_data_dirs()) { ++ // sf3 has priority over sf2 since on Debian a sf2 file is symlinked ++ // to sf3 (sf2 is compatible with sf3 aware clients) ++ // TODO: Feignint: confirm non-debian employ similar symlink strategy. + for (const auto &sf : {dir + name, +- dir + name + ".sf2", +- dir + name + "-GM.sf2", + dir + name + ".sf3", +- dir + name + "-GM.sf3"}) { ++ dir + name + "-GM.sf3", ++ dir + name + ".sf2", ++ dir + name + "-GM.sf2"}) { + // DEBUG_LOG_MSG("MIDI: FluidSynth checking if '%s' exists", sf.c_str()); + if (path_exists(sf)) + return sf; diff -Nru dosbox-staging-0.76.0/debian/patches/fluidsynth/set-fluidsynth-soundfont.patch dosbox-staging-0.77.0/debian/patches/fluidsynth/set-fluidsynth-soundfont.patch --- dosbox-staging-0.76.0/debian/patches/fluidsynth/set-fluidsynth-soundfont.patch 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/fluidsynth/set-fluidsynth-soundfont.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -From: Feignint <37488595+FeignInt@users.noreply.github.com> -Date: Sat, 28 Nov 2020 08:01:06 +0000 -Subject: Set soundfont to default-GM.sf2 in midi_fluidsynth.cpp -Forwarded: not-needed - -On Debian libfluidsynth2 depends on: - - timgm6mb-soundfont | sf3-soundfont-gm - -Either will prime the Debian Alternatives system -with default-GM.sf2 - -This patch changes the default soundfont from -default.sf2 to default-GM.sf2 ---- - src/midi/midi_fluidsynth.cpp | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/src/midi/midi_fluidsynth.cpp b/src/midi/midi_fluidsynth.cpp -index e9aacdb..9e57b2f 100644 ---- a/src/midi/midi_fluidsynth.cpp -+++ b/src/midi/midi_fluidsynth.cpp -@@ -38,9 +38,8 @@ static void init_fluid_dosbox_settings(Section_prop &secprop) - { - constexpr auto when_idle = Property::Changeable::WhenIdle; - -- // Name 'default.sf2' picks the default soundfont if it's installed -- // it the OS. Usually it's Fluid_R3. -- auto *str_prop = secprop.Add_string("soundfont", when_idle, "default.sf2"); -+ // Name 'default-GM.sf2' Debian alternatives system for sf2-soundfont-gm -+ auto *str_prop = secprop.Add_string("soundfont", when_idle, "default-GM.sf2"); - str_prop->Set_help( - "Path to a SoundFont file in .sf2 format. You can use an\n" - "absolute or relative path, or the name of an .sf2 inside\n" diff -Nru dosbox-staging-0.76.0/debian/patches/meson_build/set_debugger_conf_suffix.patch dosbox-staging-0.77.0/debian/patches/meson_build/set_debugger_conf_suffix.patch --- dosbox-staging-0.76.0/debian/patches/meson_build/set_debugger_conf_suffix.patch 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/meson_build/set_debugger_conf_suffix.patch 2021-07-03 03:39:07.000000000 +0000 @@ -0,0 +1,31 @@ +From: Feignint <37488595+FeignInt@users.noreply.github.com> +Date: Thu, 11 Mar 2021 06:13:57 +0000 +Subject: Set .conf suffix to debugger when building debugger + +break_to_nag_me_via_lint Forwarded: not-needed? + +Inspired by: +810ce76d7ed4d5bdffc4a2f821e54d7b763062ca + +The above commit causes the debugger build to use +the -git.conf suffix for debugger, which got me +thinking it might be nice to have a different one +for the debugger. Not that I actually use the +debugger, I have only ran it a few times to check +it at least runs. +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/meson.build b/meson.build +index 6c9ee88..23b6e40 100644 +--- a/meson.build ++++ b/meson.build +@@ -69,6 +69,7 @@ endif + + if get_option('enable_debugger') == 'heavy' + conf_data.set10('C_HEAVY_DEBUG', true) ++ conf_data.set('conf_suffix', '-staging-debugger') + endif + + foreach osdef : ['LINUX', 'WIN32', 'MACOSX', 'BSD'] diff -Nru dosbox-staging-0.76.0/debian/patches/series dosbox-staging-0.77.0/debian/patches/series --- dosbox-staging-0.76.0/debian/patches/series 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/patches/series 2021-07-03 03:39:07.000000000 +0000 @@ -1,3 +1,6 @@ fix-macro-error-in-docs-dosbox.1.patch -add-leading-PATH-to-hicolor-in-icons-Makefile.patch -fluidsynth/set-fluidsynth-soundfont.patch +fluidsynth/add-sf3-soundfont-search.patch +contrib/static-fluidsynth/SF3-with-static-fluidsynth.patch +fluidsynth/Prioritise-SF3-over-SF2-SoundFont.patch +bash-completion/Experimental-bash-completion.patch +meson_build/set_debugger_conf_suffix.patch diff -Nru dosbox-staging-0.76.0/debian/rules dosbox-staging-0.77.0/debian/rules --- dosbox-staging-0.76.0/debian/rules 2020-12-04 03:36:20.000000000 +0000 +++ dosbox-staging-0.77.0/debian/rules 2021-07-03 03:39:07.000000000 +0000 @@ -1,62 +1,62 @@ #!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk -export DEB_CPPFLAGS_MAINT_APPEND = -D_FILE_OFFSET_BITS=64 -DNDEBUG -export DEB_LDFLAGS_MAINT_APPEND = -flto=$(shell nproc) -default_opt_level := $(shell dpkg-buildflags --get CFLAGS | grep -E -o [-]O[0-3] ) - new_opt_level = -O3 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_CPPFLAGS_MAINT_APPEND = -D_FILE_OFFSET_BITS=64 +export DEB_LDFLAGS_MAINT_APPEND = -flto=$(shell nproc) +export DEB_CXXFLAGS_MAINT_APPEND = $(DEB_CFLAGS_MAINT_APPEND) -export DEB_CFLAGS_MAINT_STRIP = -g $(default_opt_level) +# Let meson's buildtype set optimisation (release defaults to -O3) +export DEB_CFLAGS_MAINT_STRIP = -g -O0 -O1 -O2 -O3 export DEB_CXXFLAGS_MAINT_STRIP = $(DEB_CFLAGS_MAINT_STRIP) -export DEB_CFLAGS_MAINT_PREPEND = -g $(new_opt_level) -flto -export DEB_CXXFLAGS_MAINT_PREPEND = $(DEB_CFLAGS_MAINT_PREPEND) - -debugger = \ - DEB_CFLAGS_MAINT_PREPEND="$(DEB_CFLAGS_MAINT_PREPEND:$(new_opt_level)=)" \ - DEB_CXXFLAGS_MAINT_PREPEND="$(DEB_CFLAGS_MAINT_PREPEND:$(new_opt_level)=)" \ - DEB_CPPFLAGS_MAINT_APPEND="$(DEB_CPPFLAGS_MAINT_APPEND:-DNDEBUG=)" \ - dpkg-buildflags --export=configure - # fluidsynth >= 2.0.0 required -FLUIDSYNTH_V2=$(shell pkg-config fluidsynth --atleast-version=2 && echo true ) +FLUIDSYNTH_V2:=$(shell pkg-config fluidsynth --atleast-version=2 && echo true ) ifneq ($(FLUIDSYNTH_V2), true) fluidsynth_src = $(CURDIR)/contrib/static-fluidsynth + PKG_CONFIG_PATH = $(fluidsynth_src)/fluidsynth/build + export PKG_CONFIG_PATH ifneq ("$(wildcard $(fluidsynth_src)/Makefile)","") fluidsynth = static-fluidsynth - GLIB_LIBS = $(shell pkg-config --libs gthread-2.0 glib-2.0) - GLIB_CFLAGS = $(shell pkg-config --cflags gthread-2.0 glib-2.0) - FLUIDSYNTH_CFLAGS = -I$(fluidsynth_src)/include $(GLIB_CFLAGS) - FLUIDSYNTH_LIBS = $(fluidsynth_src)/lib/libfluidsynth.a $(GLIB_LIBS) -lm - export FLUIDSYNTH_CFLAGS FLUIDSYNTH_LIBS endif endif +meson_flags := --backend ninja +meson_flags += -Ddefault_library=static + +release_flags := --buildtype=release +debugger_flags := --buildtype=debugoptimized -Denable_debugger=heavy + %: - dh $@ + dh $@ --buildsystem=meson override_dh_auto_clean: dh_auto_clean -Bbuild-release - dh_auto_clean -Bbuild-debug + dh_auto_clean -Bbuild-debugger static-fluidsynth: $(MAKE) -C $(fluidsynth_src) override_dh_auto_configure: $(fluidsynth) - # re-set version string, useful for gbp snapshot builds - sed -E 's/(AC_INIT.+,[[]?)[^])]+/\1v$(subst ~,-,$(DEB_VERSION))/' configure.ac \ - | autoconf -o configure - - # - dh_auto_configure -Bbuild-release -- $(configure_extra) - dh_auto_configure -Bbuild-debug -- $(configure_extra) \ - $(shell $(debugger) ) --enable-debug=heavy + # see: debian/copyright + sed -i '/licenses_dir/d' $(CURDIR)/meson.build + # set version + sed -i -E "s/^( +version : ')[^']+/\1$(subst ~,-,$(DEB_VERSION))/" $(CURDIR)/meson.build + dh_auto_configure -Bbuild-release -- $(meson_flags) $(release_flags) + dh_auto_configure -Bbuild-debugger -- $(meson_flags) $(debugger_flags) override_dh_auto_build: dh_auto_build -Bbuild-release - dh_auto_build -Bbuild-debug + dh_auto_build -Bbuild-debugger + +override_dh_auto_test: +# dh_auto_test -Bbuild-release +# dh_auto_test -Bbuild-debugger override_dh_auto_install: - dh_auto_install -Bbuild-debug + dh_auto_install -Bbuild-debugger mv debian/tmp/usr/bin/dosbox debian/tmp/usr/bin/dosbox-debug dh_auto_install -Bbuild-release - $(MAKE) -C contrib/icons $(CURDIR)/debian/tmp/usr/share/icons/hicolor clean + +override_dh_dwz: +# diff -Nru dosbox-staging-0.76.0/docs/build-autofdo.md dosbox-staging-0.77.0/docs/build-autofdo.md --- dosbox-staging-0.76.0/docs/build-autofdo.md 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/docs/build-autofdo.md 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,118 @@ +*Warning: this information is partially outdated.* + +## AutoFDO Procedures + +Feedback Directed Optimization (FDO) involves recording performance data from +the Linux kernel and using it to direct the compiler's optimizer. + +### Prerequisites for AutoFDO + +- An **Intel processor** that supports the last branch record (LBR) instruction. +- A Linux **kernel** built with Branch Profiling tracers enabled: + + ``` shell + CONFIG_PM_TRACE=y + CONFIG_TRACE_BRANCH_PROFILING=y + CONFIG_BRANCH_TRACER=y + ``` + + These can be enable directly in your kernel's `.config` file or using `make + menuconfig` via the following menu options: + 1. `Kernel hacking --->` + 1. `[*] Tracers --->` + 1. `Branch Profiling (Trace likely/unlikely profiler)` + 1. `(X) Trace likely/unlikely profiler` + +- The **AutoFDO** software package. It may be available via your package + manager or built from sources . + + - **Note about compiler versions** the autofdo binaries need to be compiled + with the exact version of the compiler that will later be used to compile + our final optimized version of dosbox-staging. + + So for example, if you install autofdo via package-manager, then it will be + valid for the default version of gcc and clang also installed by your + package manager. Where as if you plan to build with `gcc-`, then + you will need to compile autofdo from sources using `gcc-` by + pointing the `CC` and `CXX` environment variables to the newer gcc + binaries. + + - **Note about clang** If you plan to compile with a version of clang newer + than your package manager's default version, then you will need to compile + autofdo from source and configure it with the corresponding version of + `llvm-config`. For example, if I want to build with clang-10, then I would + configure autofdo with: `./configure --with-llvm=/usr/bin/llvm-config-10`. + + - The included `.github/scripts/build-autofdo.sh` script can be used to build + and install autofdo, for example: + + - default GCC: + + `sudo .github/scripts/build-autofdo.sh` + - newer GCC: + + ``` shell + export CC=/usr/bin/gcc-9 + export CXX=/usr/bin/g++-9 + sudo .github/scripts/build-autofdo.sh + ``` + + - Clang version 10: + + `sudo .github/scripts/build-autofdo.sh` + +- The **pmu-tools** software package, which can be downloaded from + This is a collection of python + scripts used to assist in capturing sampling data. + +### Record Data for AutoFDO Builds + +1. Ensure the custom Linux Kernel supporting LBR tracing is running. + +2. Build `dosbox-staging` from source using the `fdotrain` target: + `./scripts/build.h -c gcc -t fdotrain` + +3. Record kernel sample profiles while running dosbox-staging: + + `/path/to/pmu-tools/ocperf.py record -F max -o "samples-1.prof" -b -e + br_inst_retired.near_taken:pp -- /path/to/fdo-trained/dosbox ARGS` + + Where `samples-1.prof` is the file that will be filled with samples. + + Repeat this for multiple training runs, each time saving the output to a new + `-o samples-N.prof` file. Ideally you want to exercise all code paths in + dosbox-staging (core types, video cards, video modes, sound cards, and audio + codecs). + +4. Convert your sample profiles into compiler-specific records using tools + provided in the `autofdo` package: + + For GCC, run: + - `create_gcov --binary=/path/to/fdo-trained/dosbox + --profile=samples-1.prof -gcov=samples-1.afdo -gcov_version=1` + + ... for each `.prof` file, creating a corresponding `.afdo` file. + + - At this point, you now have an `.afdo` file for each `.prof` file. Merge + the `.afdo`s into a single `curren.afdo` file with: + + `profile_merger -gcov_version=1 -output_file=current.afdo *.afdo` + + For Clang, run: + + - `create_llvm_prof --binary=/path/to/fdo-trained/dosbox + --profile=samples-1.prof --out=samples-1.profraw` + + ... for each `*.prof` file, creating a corresponding `.profraw` file. + + - At this point, you now have a `.profraw` file for each `.prof` file. Merge + them into a single `current.profraw` file with: + + `llvm-profdata- merge -sample -output=current.profraw *.profraw` + +### Build Using AutoFDO Data + +You can now use your merged `.afdo` or `.profraw` file to build with the `-m +fdo` modifier by placing your `current.afdo/.profraw` file in the repo's root +directory, or point to it using the FDO_FILE environment variable, and launch +the build with `./scripts/build.sh -c -t release -m lto -m fdo`. diff -Nru dosbox-staging-0.76.0/docs/build-haiku.md dosbox-staging-0.77.0/docs/build-haiku.md --- dosbox-staging-0.76.0/docs/build-haiku.md 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/docs/build-haiku.md 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,44 @@ +Haiku builds can be created with Clang or GCC using the Meson buildsystem. + +## Build on Haiku + +Install dependencies: + +``` shell +pkgman install -y meson ccache libpng libsdl2_devel sdl2_net_devel \ + libogg_devel opus_devel opusfile_devel gcc_syslibs_devel \ + opus_tools fluidsynth2_devel llvm_clang +``` + +Clone and enter the repository's directory: + +``` shell +git clone https://github.com/dosbox-staging/dosbox-staging.git +cd dosbox-staging +``` + +Build with OpenGL disabled (Haiku supports OpenGL only via software fallback): + +``` shell +meson setup -Duse_opengl=false build +ninja -C build +``` + +Detailed instructions and build options are documented in [BUILD.md](/BUILD.md). + +## Run + +Edit your configuration file by running: `dosbox -editconf` and make the +following suggested changes (leave all other settings as-is): + +``` ini +[sdl] +output = texture +texture_renderer = software + +[cpu] +core = normal +``` + +The state of Haiku's GPU Hardware-acceleration is being discussed here: +https://discuss.haiku-os.org/t/state-of-accelerated-opengl/4163 diff -Nru dosbox-staging-0.76.0/docs/build-macos.md dosbox-staging-0.77.0/docs/build-macos.md --- dosbox-staging-0.76.0/docs/build-macos.md 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/docs/build-macos.md 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,50 @@ +macOS builds can be created using the Meson buildsystem, compiled using +the Clang or GCC compilers, and provided with dependencies using the Homebrew +or MacPorts package managers. + +We're recommending using Homebrew and Clang, because Apple's Core SDKs can be +used only with Apple's fork of Clang compiler. + +## Install Dependencies under macOS + +Before installing either Homebrew or MacPorts, the Apple's Xcode tools need +to be installed and the license agreed to: + +## Xcode Installation + +1. Install the command line tools: `xcode-select --install` +2. Accept the license agreement: `sudo xcodebuild -license` +3. Install build dependencies using either Homebrew or MacPorts. + +### Install dependencies (Homebrew) + +1. Install Homebrew: . +2. Install dependencies: + + ``` shell + brew install ccache meson libpng sdl2 sdl2_net opusfile fluid-synth + ``` + +### Install dependencies (MacPorts) + +1. Install MacPorts: +2. Install dependencies: + + ``` shell + sudo port -q install meson ccache libpng libsdl2 libsdl2_net \ + opusfile fluidsynth + ``` + +## Build + +Once you have depenendcies installed using either environment, clone and +enter the repository's directory: + +``` shell +git clone https://github.com/dosbox-staging/dosbox-staging.git +cd dosbox-staging +meson setup build +ninja -C build +``` + +Detailed instructions and build options are documented in [BUILD.md](/BUILD.md). diff -Nru dosbox-staging-0.76.0/docs/build-windows.md dosbox-staging-0.77.0/docs/build-windows.md --- dosbox-staging-0.76.0/docs/build-windows.md 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/docs/build-windows.md 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,54 @@ +Windows builds can be created using: + +- MSVC compiler, Visual Studio 2019 IDE suite, and vcpkg to provide dependencies + *(recommended)*. +- The Clang or GCC compilers using the Meson buildsystem running within the + MSYS2 environment to provide dependencies. + +## Build using Visual Studio + +1. Install Visual Studio Community 2019: . +2. Install vcpkg: . +3. Follow instructions in [README.md](/README.md). + +### Create a Debugger build using Visual Studio + +Note that the debugger imposes a significant runtime performance penalty. +If you're not planning to use the debugger then the steps above will help +you build a binary optimized for gaming. + +1. Follow the steps above to setup a working build environment. +2. Install and integrate `pdcurses` using vcpkg: + + ``` shell + cd \vcpkg + .\vcpkg install --triplet pdcurses + .\vcpkg integrate install + ``` + +3. Edit `src\platform\visualc\config.h` and enable `C_DEBUG` and optionally + `C_HEAVY_DEBUG` by setting them to `1` instead of `0`. +4. Select a **Release** build type in Visual Studio, and run the build. + +## Build using MSYS2 + +1. Install MSYS2: +2. Install dependencies: + + ``` shell + pacman -S meson mingw-w64-x86_64-ccache mingw-w64-x86_64-fluidsynth \ + mingw-w64-x86_64-gcc mingw-w64-x86_64-libpng \ + mingw-w64-x86_64-opusfile mingw-w64-x86_64-pkg-config \ + mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_net \ + mingw-w64-x86_64-zlib + ``` + +3. Clone and enter the repository's directory: + + ``` shell + git clone https://github.com/dosbox-staging/dosbox-staging.git + cd dosbox-staging + ``` + +4. Follow instructions in [BUILD.md](/BUILD.md). Disable the dependencies + that are problematic on your system. diff -Nru dosbox-staging-0.76.0/docs/dosbox.1 dosbox-staging-0.77.0/docs/dosbox.1 --- dosbox-staging-0.76.0/docs/dosbox.1 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/docs/dosbox.1 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ .\" Hey, EMACS: -*- nroff -*- -.TH DOSBOX 1 "Apr 21, 2020" +.TH DOSBOX 1 "Jan 23, 2021" .\" Please adjust this date whenever revising the manpage. .SH NAME dosbox \- an x86/DOS emulator with sound/graphics @@ -87,10 +87,45 @@ .IR langfile . .TP .BI \-machine " machinetype" -.RB "Setup " dosbox " to emulate a specific type of machine." -.RI "Valid choices are: " "hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3(default), svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe". -The machinetype has influence on both the videocard and the available -soundcards. +.RS +.PP +Setup DOSBox to emulate a specific type of machine. +Valid choices are: +.IP hercules +Hercules Graphics Card (monochrome) +.IP cga +IBM Color Graphics Adapter +.IP cga_mono +IBM CGA attached to monochrome display (monochrome) +.IP pcjr +IBM PCjr +.IP tandy +Tandy Graphics Adapter (Tandy 1000) +.IP ega +IBM Enhanced Graphics Adapter +.IP vgaonly +IBM Video Graphics Array (see below) +.IP vesa_oldvbe +VESA SVGA - VESA BIOS Extensions (VBE) 1.2 +.IP vesa_nolfb +VESA SVGA - VBE 2.0 with Linear Frame Buffer disabled +.IP svga_paradise +VESA SVGA - Paradise Systems PVGA1A - VBE 2.0 +.IP svga_et3000 +VESA SVGA - Tseng ET3000 - VBE 2.0 +.IP svga_et4000 +VESA SVGA - Tseng ET4000 - VBE 2.0 +.IP svga_s3 +VESA SVGA - S3 Trio - VBE 2.0 +.PP +.RI "The default is " svga_s3 "." +.PP +.RI "For some special VGA effects the machinetype " vgaonly " can be used, +note that this disables SVGA capabilities and might be slower due to the +higher emulation precision." +.PP +The machinetype affects the video card and the available sound cards. +.RE .TP .BI \-socket " socketnumber" .RI "Passes the socket number " socketnumber " to the nullmodem emulation. See README for details." @@ -233,7 +268,7 @@ .B RESCAN [\-All] [Drive:] .LP .RB "Make " dosbox " reread the directory structure. Useful if you changed -.RB "something on a mounted drive outside " dosbox ".(CTRL\-F4 does" +.RB "something on a mounted drive outside " dosbox ". (Ctrl+F4 does" this as well!) .RS .TP @@ -289,30 +324,30 @@ new default config file if it does not exist yet. .SH "SPECIAL KEYS" .TP 12m -.IP ALT\-ENTER +.IP Alt+Enter Switch between fullscreen and window mode. -.IP ALT\-PAUSE +.IP Alt+Pause Pause/Unpause emulator. -.IP CTRL\-F1 +.IP Ctrl+F1 Start the keymapper. -.IP CTRL\-F4 -Swap mounted disk\(hyimage (Only used with imgmount). Update directory cache -for all drives! -.IP CTRL\-F5 +.IP Ctrl+F4 +Swap mounted disk\(hyimage (only used with imgmount). Update directory cache +for all drives. +.IP Ctrl+F5 Save a screenshot.(png) -.IP CTRL\-F6 +.IP Ctrl+F6 Start/Stop recording sound output to a wave file. -.IP CTRL\-F7 +.IP Ctrl+F7 Start/Stop recording video output to a zmbv file. -.IP CTRL\-F9 +.IP Ctrl+F9 Kill dosbox. -.IP CTRL\-F10 +.IP Ctrl+F10 Capture/Release the mouse. -.IP CTRL\-F11 +.IP Ctrl+F11 Slow down emulation (Increase dosbox Cycles). -.IP CTRL\-F12 +.IP Ctrl+F12 Speed up emulation (Decrease dosbox Cycles). -.IP ALT\-F12 +.IP Alt+F12 Unlock speed (turbo button). .PP These are the default keybindings. They can be changed in the keymapper. @@ -333,7 +368,7 @@ it up somewhat. .SS "To run resource\-demanding games" .BR dosbox " emulates the CPU, the sound and graphic cards, and some other" -.RB " stuff, all at the same time. You can overclock " dosbox " by using CTRL\-F12, but" +.RB " stuff, all at the same time. You can overclock " dosbox " by using Ctrl+F12, but" you'll be limited by the power of your actual CPU. You can see how much free time your true CPU has by various utils (top). Once 100% of your real CPU time is .RB "used there is no further way to speed up " dosbox " unless you reduce the load" @@ -343,14 +378,23 @@ .PP .RB "Close every program but " dosbox . .PP -.RB "Overclock " dosbox " until 100% of your CPU is used.(CTRL\-F12)" +.RB "Overclock " dosbox " until 100% of your CPU is used. (Ctrl+F12)" .PP .RB "Since VGA emulation is the most demanding part of " dosbox " in terms of actual" CPU usage, we'll start here. Increase the number of frames skipped (in -increments of one) by pressing CTRL\-F8. Your CPU usage should decrease. +increments of one) by pressing Ctrl+F8. Your CPU usage should decrease. Go back one step and repeat this until the game runs fast enough for you. Please note that this is a trade off: you lose in fluidity of video what you gain in speed. +.SH ENVIRONMENT +Any configuration option can be override using an environment variable. +.RB "Environment variables starting with prefix " DOSBOX " are processed and +interpreted as follows: +.B DOSBOX_SECTIONNAME_PROPERTYNAME=value +.PP +.R For example, you can override render aspect this way: +.PP +.B $ DOSBOX_RENDER_ASPECT=false dosbox .SH NOTES .RB "While we hope that, one day, " dosbox " will run virtually all programs ever made for the PC..." .RB "we are not there yet. At present, " dosbox " run on a 1.7 Gigahertz PC is roughly the equivalent of a 25MHz 386 PC." @@ -365,7 +409,7 @@ You'll find long and detailed manual in README file in /usr/share/doc/dosbox-staging .SH AUTHOR -.RI "dosbox-staging project is maintained by the dosbox-staging team (" https://dosbox-staging.github.io/ ") +.RI "DOSBox Staging project is maintained by the DOSBox Staging Team (" https://dosbox-staging.github.io/ ") This manual page was written by Peter Veenstra and James Oakley , for the Debian system (but may be used by others), updated by Patryk Obara for dosbox-staging diff -Nru dosbox-staging-0.76.0/docs/.gitignore dosbox-staging-0.77.0/docs/.gitignore --- dosbox-staging-0.76.0/docs/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/docs/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/docs/Makefile.am dosbox-staging-0.77.0/docs/Makefile.am --- dosbox-staging-0.76.0/docs/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/docs/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# Main Makefile for DOSBox - -man_MANS = dosbox.1 -EXTRA_DIST = $(man_MANS) README.video PORTING - - - - diff -Nru dosbox-staging-0.76.0/docs/README.template dosbox-staging-0.77.0/docs/README.template --- dosbox-staging-0.76.0/docs/README.template 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/docs/README.template 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ +This is the development snapshot build of dosbox-staging project. + Please report any bugs or issues to: https://github.com/%GITHUB_REPO% -You can find detailed instructions on using DOSBox Staging in file: -docs/manual.txt +You can find detailed instructions on using DOSBox in file: doc/manual.txt branch: %GIT_BRANCH% commit: %GIT_COMMIT% diff -Nru dosbox-staging-0.76.0/docs/upstream/VERSION dosbox-staging-0.77.0/docs/upstream/VERSION --- dosbox-staging-0.76.0/docs/upstream/VERSION 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/docs/upstream/VERSION 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -0.74-2 diff -Nru dosbox-staging-0.76.0/.github/FUNDING.yml dosbox-staging-0.77.0/.github/FUNDING.yml --- dosbox-staging-0.76.0/.github/FUNDING.yml 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/FUNDING.yml 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +open_collective: dosbox-staging diff -Nru dosbox-staging-0.76.0/.github/meson/native-clang.ini dosbox-staging-0.77.0/.github/meson/native-clang.ini --- dosbox-staging-0.76.0/.github/meson/native-clang.ini 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/meson/native-clang.ini 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,3 @@ +[binaries] +c = ['ccache', 'clang'] +cpp = ['ccache', 'clang++'] diff -Nru dosbox-staging-0.76.0/.github/meson/native-gcc-5.ini dosbox-staging-0.77.0/.github/meson/native-gcc-5.ini --- dosbox-staging-0.76.0/.github/meson/native-gcc-5.ini 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/meson/native-gcc-5.ini 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,3 @@ +[binaries] +c = ['ccache', 'gcc-5'] +cpp = ['ccache', 'g++-5'] diff -Nru dosbox-staging-0.76.0/.github/meson/native-gcc-9.ini dosbox-staging-0.77.0/.github/meson/native-gcc-9.ini --- dosbox-staging-0.76.0/.github/meson/native-gcc-9.ini 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/meson/native-gcc-9.ini 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,3 @@ +[binaries] +c = ['ccache', 'gcc-9'] +cpp = ['ccache', 'g++-9'] diff -Nru dosbox-staging-0.76.0/.github/packages/.gitattributes dosbox-staging-0.77.0/.github/packages/.gitattributes --- dosbox-staging-0.76.0/.github/packages/.gitattributes 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/packages/.gitattributes 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +*.txt text eol=lf diff -Nru dosbox-staging-0.76.0/.github/packages/macos-latest-brew.txt dosbox-staging-0.77.0/.github/packages/macos-latest-brew.txt --- dosbox-staging-0.76.0/.github/packages/macos-latest-brew.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/packages/macos-latest-brew.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,7 @@ +ccache +fluid-synth +libpng +meson +opusfile +sdl2 +sdl2_net diff -Nru dosbox-staging-0.76.0/.github/packages/ubuntu-16.04-apt.txt dosbox-staging-0.77.0/.github/packages/ubuntu-16.04-apt.txt --- dosbox-staging-0.76.0/.github/packages/ubuntu-16.04-apt.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/packages/ubuntu-16.04-apt.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,7 @@ +build-essential +ccache +libasound2-dev +libopusfile-dev +libpng-dev +libsdl2-dev +libsdl2-net-dev diff -Nru dosbox-staging-0.76.0/.github/packages/ubuntu-18.04-apt.txt dosbox-staging-0.77.0/.github/packages/ubuntu-18.04-apt.txt --- dosbox-staging-0.76.0/.github/packages/ubuntu-18.04-apt.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/packages/ubuntu-18.04-apt.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,7 @@ +build-essential +ccache +libasound2-dev +libopusfile-dev +libpng-dev +libsdl2-dev +libsdl2-net-dev diff -Nru dosbox-staging-0.76.0/.github/packages/ubuntu-20.04-apt.txt dosbox-staging-0.77.0/.github/packages/ubuntu-20.04-apt.txt --- dosbox-staging-0.76.0/.github/packages/ubuntu-20.04-apt.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/packages/ubuntu-20.04-apt.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,10 @@ +build-essential +ccache +libasound2-dev +libfluidsynth-dev +libgtest-dev +libopusfile-dev +libpng-dev +libsdl2-dev +libsdl2-net-dev +meson diff -Nru dosbox-staging-0.76.0/.github/packages/windows-latest-msys2.txt dosbox-staging-0.77.0/.github/packages/windows-latest-msys2.txt --- dosbox-staging-0.76.0/.github/packages/windows-latest-msys2.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/packages/windows-latest-msys2.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,11 @@ +meson +mingw-w64-x86_64-ccache +mingw-w64-x86_64-fluidsynth +mingw-w64-x86_64-gcc +mingw-w64-x86_64-libpng +mingw-w64-x86_64-ncurses +mingw-w64-x86_64-opusfile +mingw-w64-x86_64-pkg-config +mingw-w64-x86_64-SDL2 +mingw-w64-x86_64-SDL2_net +mingw-w64-x86_64-zlib diff -Nru dosbox-staging-0.76.0/.github/scripts/build-and-run-sanitizers.sh dosbox-staging-0.77.0/.github/scripts/build-and-run-sanitizers.sh --- dosbox-staging-0.76.0/.github/scripts/build-and-run-sanitizers.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/build-and-run-sanitizers.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019-2020 Kevin R Croft -# SPDX-License-Identifier: GPL-2.0-or-later - -# This simple script is used to build, test, and archive the log output from -# various sanitizer-builds. -# -# Usage: -# ./build-and-run-sanitizers.sh COMPILER VERSION SANITIZER [SANITIZER [...]]" -# -# Examples: -# ./build-and-run-sanitizers.sh clang 8 msan usan -# ./build-and-run-sanitizers.sh gcc 9 asan uasan usan tsan -# -set -euo pipefail - -# Check the arguments -if [[ "$#" -lt 3 ]]; then - echo "Usage: $0 COMPILER VERSION SANITIZER [SANITIZER [...]]" - exit 1 -fi - -# Defaults and arguments -compiler="${1}" -compiler_version="${2}" -logs="${compiler}-logs" -shift 2 -sanitizers=("$@") - -# Move to the top of our source directory -cd "$(dirname "${0}")/../.." - -# Make a directory to hold our build and run output -mkdir -p "${logs}" - -for sanitizer in "${sanitizers[@]}"; do - - # Build DOSBox for each sanitizer - time ./scripts/build.sh \ - --compiler "${compiler}" \ - --version-postfix "${compiler_version}" \ - --build-type "${sanitizer}" \ - &> "${logs}/${compiler}-${sanitizer}-compile.log" - - # Exercise the testcase(s) for each sanitizer - # Sanitizers return non-zero if one or more issues were found, - # so we or-to-true to ensure our script doesn't end here. - time xvfb-run ./src/dosbox -c exit \ - &> "${logs}/${compiler}-${sanitizer}-EnterExit.log" || true - -done - -# Compress the logs -( - cd "${logs}" - xz -T0 -e ./*.log -) diff -Nru dosbox-staging-0.76.0/.github/scripts/build-autofdo.sh dosbox-staging-0.77.0/.github/scripts/build-autofdo.sh --- dosbox-staging-0.76.0/.github/scripts/build-autofdo.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/build-autofdo.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020-2021 Kevin R. Croft # Builds and installs the AutoFDO package from # https://github.com/google/autofdo diff -Nru dosbox-staging-0.76.0/.github/scripts/download-and-build-macports.sh dosbox-staging-0.77.0/.github/scripts/download-and-build-macports.sh --- dosbox-staging-0.76.0/.github/scripts/download-and-build-macports.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/download-and-build-macports.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2019-2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Kevin R. Croft # This script downloads and builds MacPorts from source. # Usage: ./download-and-build-macports.sh diff -Nru dosbox-staging-0.76.0/.github/scripts/fetch-and-merge-afdo.sh dosbox-staging-0.77.0/.github/scripts/fetch-and-merge-afdo.sh --- dosbox-staging-0.76.0/.github/scripts/fetch-and-merge-afdo.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/fetch-and-merge-afdo.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2019-2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Kevin R. Croft # A helper script that fetches, converts, and merges kernel sample # (.prof) files (collected during prior DOSBox testing) into a single diff -Nru dosbox-staging-0.76.0/.github/scripts/fetch-and-merge-profraw.sh dosbox-staging-0.77.0/.github/scripts/fetch-and-merge-profraw.sh --- dosbox-staging-0.76.0/.github/scripts/fetch-and-merge-profraw.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/fetch-and-merge-profraw.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020-2021 Kevin R. Croft # A helper script that fetches, converts, and merges kernel sample # (.prof) files (collected during prior DOSBox testing) into a single diff -Nru dosbox-staging-0.76.0/.github/scripts/install-and-update-macports.sh dosbox-staging-0.77.0/.github/scripts/install-and-update-macports.sh --- dosbox-staging-0.76.0/.github/scripts/install-and-update-macports.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/install-and-update-macports.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2019-2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Kevin R. Croft # This script installs and updates MacPorts from an already-compiled # source tree assumed to be located n a directory called diff -Nru dosbox-staging-0.76.0/.github/scripts/prepare-for-macports-cachehit.sh dosbox-staging-0.77.0/.github/scripts/prepare-for-macports-cachehit.sh --- dosbox-staging-0.76.0/.github/scripts/prepare-for-macports-cachehit.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/prepare-for-macports-cachehit.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2019-2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Kevin R. Croft # This script creates a new writable /opt/local directory with # sane ownership, permissions, and attributes on the directory. diff -Nru dosbox-staging-0.76.0/.github/scripts/reset-brew.sh dosbox-staging-0.77.0/.github/scripts/reset-brew.sh --- dosbox-staging-0.76.0/.github/scripts/reset-brew.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/reset-brew.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019-2020 Kevin R Croft -# SPDX-License-Identifier: GPL-2.0-or-later - -# This script removes all existing brew packages, and then -# re-installs some important basic packages (listed below). -# -# Usage: ./reset-brew.sh -# -set -xuo pipefail -set +e - -# Pre-cleanup size -sudo du -sch /usr/local 2> /dev/null - -# Uninstall all packages -# shellcheck disable=SC2046 -brew remove --force $(brew list) --ignore-dependencies -# shellcheck disable=SC2046 -brew cask remove --force $(brew cask list) - -# Reinstall important packages -brew install git git-lfs python curl wget jq binutils zstd gnu-tar - -# Clean the brew cache -rm -rf "$(brew --cache)" - -# Post-clean up size -sudo du -sch /usr/local 2> /dev/null - -# This script is best-effort, so always return success -exit 0 - diff -Nru dosbox-staging-0.76.0/.github/scripts/run-sanitizers.sh dosbox-staging-0.77.0/.github/scripts/run-sanitizers.sh --- dosbox-staging-0.76.0/.github/scripts/run-sanitizers.sh 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/run-sanitizers.sh 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,48 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Kevin R. Croft + +# This simple script is used to test, and archive the log output from +# various sanitizer-builds. +# +# Usage: +# ./run-sanitizers.sh BUILDDIR LOGDIR" +# +set -euo pipefail + +# let run logs be printed to the output, we don't need them stored in artifacts +set -x + +# Check the arguments +if [[ "$#" -lt 2 ]]; then + echo "Usage: $0 BUILDDIR LOGDIR" + exit 1 +fi + +# Defaults and arguments +build_dir="$1" +logs="$2" + +# Move to the top of our source directory +cd "$(git rev-parse --show-toplevel)" + +# Make a directory to hold our run output +mkdir -p "${logs}" + +# SAN-specific environment variables +export LSAN_OPTIONS="suppressions=.lsan-suppress:verbosity=0" + +# Sanitizers return non-zero if one or more issues were found, +# so we or-to-true to ensure our script doesn't end here. +# We'll detect issues by analyzing logs instead. +time xvfb-run "./${build_dir}/dosbox" \ + -c "autotype -w 0.1 e x i t enter" \ + &> "${logs}/EnterExit.log" || true + +# Compress the logs +( + cd "${logs}" + xz -T0 -e ./*.log +) diff -Nru dosbox-staging-0.76.0/.github/scripts/shrink-brew.sh dosbox-staging-0.77.0/.github/scripts/shrink-brew.sh --- dosbox-staging-0.76.0/.github/scripts/shrink-brew.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/shrink-brew.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019-2020 Kevin R Croft -# SPDX-License-Identifier: GPL-2.0-or-later - -# This script reduces the size of a brew-managed installation on macOS. -# Its main use is to shrink this area to fit within GitHub's cache -# limits however it can also be used by end-users wanting to save space. -# -# Note that this script remove a lot of content deemed unnecessary for our -# purposes such as ruby, go, grade, azure, etc..) so using on your -# home system is probably not what you want :-) -# -# Usage: ./shrink-brew.sh -# -set -xuo pipefail -set +e - -# Ensure we have sudo rights -if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi -user="${SUDO_USER}" -group="$(id -g "${user}")" - -# If we don't have /usr/local then brew hasn't installed anything yet -cd /usr/local || exit 0 - -# Purge unnecessary bloat -for dir in lib/ruby Cellar/go Cellar/gradle Cellar/azure-cli lib/node_modules \ -share/powershell Caskroom/fastlane Cellar/ruby opt/AGPM Caskroom Cellar/node \ -miniconda Cellar/python@2 Cellar/git lib/python2.7 Cellar/git-lfs Cellar/subversion \ -Cellar/maven Cellar/aria2 Homebrew/Library/Homebrew/os/mac/pkgconfig/fuse \ -.com.apple.installer.keep microsoft; do - rm -rf "${dir}" || true -done - -# Cleanup permissions and attributes -chflags nouchg . -find . -type d -exec xattr -c {} + -find . -type f -exec xattr -c {} + -chown -R "${user}:${group}" ./* -find . ! -path . -type d -exec chmod 770 {} + - -# Binary-stripping is *extremely* verbose, so we send these to the ether -find Cellar -name '*' -a ! -iname 'strip' -type f -perm +111 -exec strip {} + &> /dev/null -find Cellar -name '*.a' -type f -exec strip {} + &> /dev/null - -# Post-cleanup size check -du -sch . 2> /dev/null - -# This entire script is best-effort, so always return success -exit 0 - diff -Nru dosbox-staging-0.76.0/.github/scripts/shrink-macports.sh dosbox-staging-0.77.0/.github/scripts/shrink-macports.sh --- dosbox-staging-0.76.0/.github/scripts/shrink-macports.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/shrink-macports.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2019-2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Kevin R. Croft # This script reduces the size of a MacPorts installation # under macOS. Its main use is to shrink this area to fit within diff -Nru dosbox-staging-0.76.0/.github/scripts/shrink-msys2.sh dosbox-staging-0.77.0/.github/scripts/shrink-msys2.sh --- dosbox-staging-0.76.0/.github/scripts/shrink-msys2.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/scripts/shrink-msys2.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (c) 2019-2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Kevin R. Croft # This script reduces the size of an MSYS2 and MinGW installation # under Windows. Its main use is to shrink these areas to fit within diff -Nru dosbox-staging-0.76.0/.github/workflows/analysis.yml dosbox-staging-0.77.0/.github/workflows/analysis.yml --- dosbox-staging-0.76.0/.github/workflows/analysis.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/analysis.yml 2021-07-02 15:47:39.000000000 +0000 @@ -42,11 +42,12 @@ needs: run_linters steps: - uses: actions/checkout@v2 + - run: sudo apt-get update - - name: Install C++ compiler and libraries - run: sudo apt-get install python3-setuptools $(./scripts/list-build-dependencies.sh -m apt -c gcc) - - name: Install scan-build (Python version) - run: sudo pip3 install scan-build beautifulsoup4 html5lib + + - name: Install dependencies + run: sudo apt-get install clang-tools python3-bs4 + $(cat .github/packages/ubuntu-20.04-apt.txt) - name: Prepare compiler cache id: prep-ccache @@ -56,6 +57,7 @@ echo "::set-output name=dir::$CCACHE_DIR" echo "::set-output name=today::$(date -I)" echo "::set-output name=yesterday::$(date --date=yesterday -I)" + - uses: actions/cache@v2 id: cache-ccache with: @@ -63,59 +65,82 @@ key: ccache-static-clang-${{ steps.prep-ccache.outputs.today }} restore-keys: | ccache-static-clang-${{ steps.prep-ccache.outputs.yesterday }} + + - name: Cache subprojects + uses: actions/cache@v2 + with: + path: subprojects/packagecache + key: subprojects-${{ hashFiles('subprojects/*.wrap') }} + - name: Log environment run: ./scripts/log-env.sh - - name: Build + + - run: meson setup build + + - name: Build and run scan-build run: | - # build steps set -x - g++ --version - ./autogen.sh - ./configure CC="ccache gcc" CXX="ccache g++" - intercept-build make -j "$(nproc)" - - name: Analyze - run: analyze-build -v -o report --html-title="dosbox-staging (${GITHUB_SHA:0:8})" + ninja -C build scan-build + mv build/meson-logs/scanbuild report + - name: Upload report uses: actions/upload-artifact@v2 with: name: clang-analysis-report path: report + - name: Summarize report env: - MAX_BUGS: 192 + MAX_BUGS: 185 run: | # summary echo "Full report is included in build Artifacts" echo ./scripts/count-clang-bugs.py report/*/index.html + dynamic_matrix: - name: ${{ matrix.conf.name }} dynamic sanitizers + name: ${{ matrix.conf.name }} needs: run_linters runs-on: ubuntu-20.04 strategy: matrix: conf: - - name: Clang - sanitizers: USAN - usan: 0 # cleared out in our existing tests - tsan: -1 - uasan: -1 - - name: GCC - sanitizers: TSAN UASAN - usan: -1 - tsan: 0 # our test does not trigger multiple threads yet - uasan: 14 + # AddressSanitizer is a fast memory error detector. Memory access + # instructions are instrumented to detect out-of-bounds and + # use-after-free bugs. + # See GCC manual to learn more. + - name: GCC address sanitizer + build_flags: -Db_sanitize=address + logs: gcc-asan-logs + max_issues: 0 + + # UndefinedBehaviorSanitizer is a fast undefined behavior detector. + # Various computations are instrumented to detect undefined behavior + # at runtime, such as shift operation correctness, integer division by + # zero, null-pointer dereference, signed integer overflow, + # dereferencing memory with wrong alignment, and more. + # See GCC manual to learn more. + - name: GCC undefined sanitizer + build_flags: -Db_sanitize=undefined + logs: gcc-usan-logs + max_issues: 0 + + # Clang allows enabling both AddressSanitizer and + # UndefinedBehaviorSanitizer at the same time. + # See Clang manual to learn more. + - name: Clang undefined+address sanitizer + build_flags: -Db_sanitize=address,undefined --native-file=.github/meson/native-clang.ini -Duse_mt32emu=false + logs: clang-uasan-logs + max_issues: 4 steps: - uses: actions/checkout@v2 + - run: sudo apt-get update + - name: Install C++ compiler and libraries - env: - VERSION_GCC: 9 - VERSION_Clang: 8 - run: > - sudo apt-get install -y $(./scripts/list-build-dependencies.sh -m apt - -c ${{ matrix.conf.name }} -v $VERSION_${{ matrix.conf.name }}) + run: sudo apt-get install $(cat .github/packages/ubuntu-20.04-apt.txt) + - name: Prepare compiler cache id: prep-ccache shell: bash @@ -124,55 +149,37 @@ echo "::set-output name=dir::$CCACHE_DIR" echo "::set-output name=today::$(date -I)" echo "::set-output name=yesterday::$(date --date=yesterday -I)" + - uses: actions/cache@v2 id: cache-ccache with: path: ${{ steps.prep-ccache.outputs.dir }} - key: ccache-sanitizers-${{ matrix.conf.name }}-${{ steps.prep-ccache.outputs.today }} - restore-keys: | - ccache-sanitizers-${{ matrix.conf.name }}-${{ steps.prep-ccache.outputs.yesterday }} + key: ccache-sanitizers-${{ steps.prep-ccache.outputs.today }} + restore-keys: ccache-sanitizers-${{ steps.prep-ccache.outputs.yesterday }} + + - name: Cache subprojects + uses: actions/cache@v2 + with: + path: subprojects/packagecache + key: subprojects-${{ hashFiles('subprojects/*.wrap') }} + - name: Log environment run: ./scripts/log-env.sh - - name: Build and run sanitizers - env: - VERSION_GCC: 9 - VERSION_Clang: 8 - run: | - ./.github/scripts/build-and-run-sanitizers.sh \ - ${{ matrix.conf.name }} \ - $VERSION_${{ matrix.conf.name }} \ - ${{ matrix.conf.sanitizers }} + + - run: meson setup ${{ matrix.conf.build_flags }} build + + - run: ninja -C build + + - name: Run sanitizer test cases + run: ./.github/scripts/run-sanitizers.sh build sanitizer-logs + - name: Upload logs uses: actions/upload-artifact@v2 with: - name: ${{ matrix.conf.name }}-sanitizer-logs - path: ${{ matrix.conf.name }}-logs - - name: Summarize issues - env: - USAN_LOG: ${{ matrix.conf.name }}-logs/${{ matrix.conf.name }}-USAN-EnterExit.log.xz - TSAN_LOG: ${{ matrix.conf.name }}-logs/${{ matrix.conf.name }}-TSAN-EnterExit.log.xz - UASAN_LOG: ${{ matrix.conf.name }}-logs/${{ matrix.conf.name }}-UASAN-EnterExit.log.xz - run: | - # summary + name: ${{ matrix.conf.logs }} + path: sanitizer-logs - echo_bold () { - echo -e "\\033[1m$*\\033[0m" - } - - if [[ -f "$USAN_LOG" ]] ; then - echo_bold "Undefined Behaviour sanitizer:" - echo - xzcat "$USAN_LOG" | MAX_ISSUES=${{ matrix.conf.usan }} ./scripts/count-xsan-issues.py - - fi - - if [[ -f "$TSAN_LOG" ]] ; then - echo_bold "Thread sanitizer:" - echo - xzcat "$TSAN_LOG" | MAX_ISSUES=${{ matrix.conf.tsan }} ./scripts/count-xsan-issues.py - - fi - - if [[ -f "$UASAN_LOG" ]] ; then - echo_bold "Undefined Behaviour + Address sanitizers:" - echo - xzcat "$UASAN_LOG" | MAX_ISSUES=${{ matrix.conf.uasan }} ./scripts/count-xsan-issues.py - - fi + - name: Summarize issues + run: > + xzcat sanitizer-logs/EnterExit.log.xz | + MAX_ISSUES=${{ matrix.conf.max_issues }} ./scripts/count-xsan-issues.py - diff -Nru dosbox-staging-0.76.0/.github/workflows/config.yml dosbox-staging-0.77.0/.github/workflows/config.yml --- dosbox-staging-0.76.0/.github/workflows/config.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/config.yml 2021-07-02 15:47:39.000000000 +0000 @@ -15,7 +15,7 @@ has-commits: ${{ steps.commit-check.outputs.has-commits }} config_all: - name: ${{ matrix.system.name }} ${{ matrix.conf.configure_flags }} ${{ matrix.conf.without_packages }} + name: ${{ matrix.system.name }} ${{ matrix.conf.configure_flags }} runs-on: ${{ matrix.system.os }} needs: repo-check if: needs.repo-check.outputs.has-commits == 'true' @@ -25,40 +25,28 @@ system: - name: Windows os: windows-latest - compiler: gcc - name: macOS os: macos-latest - compiler: clang - missing_packages: --disable-fluidsynth - name: Linux os: ubuntu-20.04 - compiler: gcc conf: - - configure_flags: --enable-debug - - configure_flags: --enable-debug=heavy - - configure_flags: --enable-alsa-midi - - configure_flags: --enable-png-static - - configure_flags: --enable-sdl-static - - configure_flags: --enable-png-static --enable-sdl-static - - configure_flags: --disable-alsa-midi - - configure_flags: --disable-core-inline - - configure_flags: --disable-dynamic-x86 - - configure_flags: --disable-dynrec - - configure_flags: --disable-fpu - - configure_flags: --disable-fpu-x64 - - configure_flags: --disable-fpu-x86 - - configure_flags: --disable-opengl - - configure_flags: --disable-opus-cdda - - configure_flags: --disable-screenshots - - configure_flags: --disable-unaligned-memory - - configure_flags: --disable-fluidsynth - - without_packages: -x net - - without_packages: -x curses - - without_packages: -x net -x curses + - configure_flags: -Duse_sdl2_net=false + - configure_flags: -Duse_opengl=false # TODO opengl is always disabled on msys2 + - configure_flags: -Duse_fluidsynth=false + - configure_flags: -Duse_opusfile=false + - configure_flags: -Duse_png=false + # - configure_flags: -Denable_debugger=normal # TODO broken on msys2 + # - configure_flags: -Denable_debugger=heavy # TODO broken on msys2 + - configure_flags: -Ddynamic_core=dyn-x86 + - configure_flags: -Ddynamic_core=dynrec + - configure_flags: -Ddynamic_core=none + env: CHERE_INVOKING: yes + steps: - uses: actions/checkout@v2 + - name: Check repo for commits id: repo-meta shell: bash @@ -75,7 +63,7 @@ if: matrix.system.name == 'Windows' with: path: 'C:/tools/msys64' - key: msys2-64-${{ steps.get-date.outputs.date }}-3 + key: msys2-64-${{ steps.get-date.outputs.date }}-6 - name: Install MSYS2 (Windows) if: > @@ -89,35 +77,50 @@ steps.cache-msys2.outputs.cache-hit != 'true' shell: python scripts\msys-bash.py {0} run: | - scripts/list-build-dependencies.sh -m msys2 -c clang ${{ matrix.conf.without_packages }} | xargs pacman -S --noconfirm + pacman -S --noconfirm $(cat .github/packages/windows-latest-msys2.txt) .github/scripts/shrink-msys2.sh - - name: Install dependencies ${{ matrix.conf.without_packages }} (Linux) + - name: Install dependencies (Linux) if: matrix.system.name == 'Linux' run: | sudo apt-get -y update - sudo apt-get install -y $(./scripts/list-build-dependencies.sh -m apt -c gcc ${{ matrix.conf.without_packages }}) + sudo apt-get install $(cat .github/packages/ubuntu-20.04-apt.txt) - - name: Install dependencies ${{ matrix.conf.without_packages }} (macOS) + - name: Install dependencies (macOS) if: matrix.system.name == 'macOS' - run: brew install $(./scripts/list-build-dependencies.sh -m brew -c clang ${{ matrix.conf.without_packages }}) + run: | + brew install $(cat .github/packages/macos-latest-brew.txt) - name: Build ${{ matrix.conf.configure_flags }} (Windows) if: matrix.system.name == 'Windows' shell: python scripts\msys-bash.py {0} - run: > - scripts/build.sh -c ${{ matrix.system.compiler }} -t debug --bin-path /mingw64/bin - ${{ matrix.conf.configure_flags }} ${{ matrix.system.missing_packages }} + run: | + export PATH="/mingw64/bin:$PATH" + meson setup \ + --wrap-mode=nofallback \ + -Duse_mt32emu=false \ + -Duse_opengl=false \ + ${{ matrix.conf.configure_flags }} \ + build + cat build/meson-logs/meson-log.txt + ninja -C build - name: Build ${{ matrix.conf.configure_flags }} (macOS) if: matrix.system.name == 'macOS' - run: > - export PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig:$PKG_CONFIG_PATH" && - ./scripts/build.sh -c ${{ matrix.system.compiler }} -t debug - ${{ matrix.conf.configure_flags }} ${{ matrix.system.missing_packages }} + run: | + meson setup \ + --wrap-mode=nofallback \ + -Duse_mt32emu=false \ + ${{ matrix.conf.configure_flags }} \ + build + ninja -C build - name: Build ${{ matrix.conf.configure_flags }} (Linux) if: matrix.system.name == 'Linux' - run: > - ./scripts/build.sh -c ${{ matrix.system.compiler }} -t debug - ${{ matrix.conf.configure_flags }} ${{ matrix.system.missing_packages }} + run: | + meson setup \ + --wrap-mode=nofallback \ + -Duse_mt32emu=false \ + ${{ matrix.conf.configure_flags }} \ + build + ninja -C build diff -Nru dosbox-staging-0.76.0/.github/workflows/coverity.yml dosbox-staging-0.77.0/.github/workflows/coverity.yml --- dosbox-staging-0.76.0/.github/workflows/coverity.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/coverity.yml 2021-07-02 15:47:39.000000000 +0000 @@ -30,7 +30,7 @@ - name: Install C++ compiler and dependencies run: | - sudo apt-get install curl zstd $(./scripts/list-build-dependencies.sh -m apt -c gcc) + sudo apt-get install curl zstd $(cat .github/packages/ubuntu-20.04-apt.txt) - name: Prepare the Coverity package cache uses: actions/cache@v2 @@ -51,13 +51,9 @@ - name: Build and instrument the project run: | set -xeu - g++ --version - ./autogen.sh - export CFLAGS="-g -Og" - export CXXFLAGS="${CFLAGS}" - ./configure + meson setup -Duse_mt32emu=false -Dunit_tests=disabled build PATH="${BASE_DIR}/cov-analysis-linux64-${PACKAGE_VERSION}/bin:${PATH}" - cov-build --dir cov-int make -j "$(nproc)" + cov-build --dir cov-int ninja -C build tar -cvaf package.tar.gz cov-int - name: Upload the package to Coverity diff -Nru dosbox-staging-0.76.0/.github/workflows/linux.yml dosbox-staging-0.77.0/.github/workflows/linux.yml --- dosbox-staging-0.76.0/.github/workflows/linux.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/linux.yml 2021-07-02 15:47:39.000000000 +0000 @@ -14,60 +14,87 @@ runs-on: ${{ matrix.conf.os }} if: github.event_name != 'pull_request' || contains('dreamer,kcgen,ant-222,Wengier', github.actor) == false strategy: - max-parallel: 3 matrix: conf: - name: Clang, Ubuntu 20.04 os: ubuntu-20.04 - flags: -c clang -v 10 + packages: clang + build_flags: --native-file=.github/meson/native-clang.ini max_warnings: 0 + - name: GCC, Ubuntu 20.04 os: ubuntu-20.04 - flags: -c gcc max_warnings: 0 + - name: GCC, Ubuntu 18.04 os: ubuntu-18.04 - flags: -c gcc - config_flags: --disable-fluidsynth + build_flags: -Duse_fluidsynth=false max_warnings: 0 - - name: GCC, Ubuntu 16.04 - os: ubuntu-16.04 - flags: -c gcc - config_flags: --disable-fluidsynth + + - name: GCC 5, Ubuntu 18.04 + os: ubuntu-18.04 + packages: g++-5 + build_flags: --native-file=.github/meson/native-gcc-5.ini --wrap-mode=nofallback -Dunit_tests=disabled -Duse_fluidsynth=false -Duse_mt32emu=false max_warnings: 0 + - name: GCC, +tests os: ubuntu-20.04 - config_flags: --enable-tests - add_packages: libgtest-dev - flags: -c gcc run_tests: true max_warnings: -1 - - name: GCC, +debug + + - name: GCC, +debugger os: ubuntu-20.04 - flags: -c gcc - config_flags: --enable-debug - max_warnings: 107 - - name: GCC, +dynrec, -dyn_x86 + build_flags: -Denable_debugger=normal + max_warnings: 80 + + - name: GCC, -dyn-x86 os: ubuntu-20.04 - flags: -c gcc - config_flags: --disable-dynamic-x86 + build_flags: -Ddynamic_core=dynrec max_warnings: 0 - - name: GCC, +dynrec, +debug, -dyn_x86 + + - name: GCC, -dyn-x86, +debugger os: ubuntu-20.04 - flags: -c gcc - config_flags: --disable-dynamic-x86 --enable-debug - max_warnings: 144 + build_flags: -Ddynamic_core=dynrec -Denable_debugger=normal + max_warnings: 116 + - name: GCC, -network os: ubuntu-20.04 - flags: -c gcc - config_flags: --disable-network + build_flags: -Duse_sdl2_net=false max_warnings: 0 + - name: GCC, warning_level=3 + os: ubuntu-20.04 + build_flags: -Dwarning_level=3 + max_warnings: 64 + + - name: GCC, minimum build + os: ubuntu-20.04 + build_flags: --wrap-mode=nofallback -Dunit_tests=disabled -Duse_fluidsynth=false -Duse_sdl2_net=false -Duse_opengl=false -Duse_fluidsynth=false -Duse_mt32emu=false -Duse_png=false -Duse_alsa=false + min_dependencies: true + max_warnings: -1 + steps: - uses: actions/checkout@v2 - run: sudo apt-get update - - name: Install C++ compiler and libraries - run: sudo apt-get install -y $(./scripts/list-build-dependencies.sh -m apt ${{ matrix.conf.flags }}) ${{ matrix.conf.add_packages }} + + - name: Install dependencies (minimum set) + if: matrix.conf.min_dependencies + run: | + sudo apt-get install -y build-essential ccache meson libsdl2-dev libopusfile-dev + + - name: Install dependencies + if: matrix.conf.min_dependencies != true + run: | + sudo apt-get install -y \ + ${{ matrix.conf.packages }} \ + $(cat ./.github/packages/${{ matrix.conf.os }}-apt.txt) + + - name: Install Meson via pip3 + if: matrix.conf.os != 'ubuntu-20.04' + run: | + sudo apt-get install python3-setuptools + sudo pip3 install meson ninja + - name: Prepare compiler cache id: prep-ccache shell: bash @@ -76,35 +103,64 @@ echo "::set-output name=dir::$CCACHE_DIR" echo "::set-output name=today::$(date -I)" echo "::set-output name=yesterday::$(date --date=yesterday -I)" + echo "::set-output name=name_hash::$(echo '${{ matrix.conf.name }}' | shasum | cut -b-8)" + - uses: actions/cache@v2 id: cache-ccache with: path: ${{ steps.prep-ccache.outputs.dir }} - key: ccache-${{ matrix.conf.os }}-${{ steps.prep-ccache.outputs.today }} + key: ccache-${{ matrix.conf.os }}-${{ steps.prep-ccache.outputs.name_hash }}-${{ steps.prep-ccache.outputs.today }} restore-keys: | - ccache-${{ matrix.conf.os }}-${{ steps.prep-ccache.outputs.yesterday }} + ccache-${{ matrix.conf.os }}-${{ steps.prep-ccache.outputs.name_hash }}-${{ steps.prep-ccache.outputs.yesterday }} + + - name: Cache subprojects + uses: actions/cache@v2 + with: + path: subprojects/packagecache + key: subprojects-${{ hashFiles('subprojects/*.wrap') }} + - name: Log environment run: ./scripts/log-env.sh + + - run: meson setup ${{ matrix.conf.build_flags }} build + - name: Build - run: ./scripts/build.sh -t Debug ${{ matrix.conf.flags }} ${{ matrix.conf.config_flags }} + run: | + set -xo pipefail + ninja -C build |& tee build.log + ccache -s + - name: Run tests if: matrix.conf.run_tests - run: ./tests/tests + run: meson test -C build --print-errorlogs + - name: Summarize warnings if: matrix.conf.run_tests != true env: MAX_WARNINGS: ${{ matrix.conf.max_warnings }} run: ./scripts/count-warnings.py -lf build.log + build_linux_release_dynamic: name: Release build runs-on: ubuntu-18.04 if: github.event_name != 'pull_request' || contains('dreamer,kcgen,ant-222,Wengier', github.actor) == false steps: - uses: actions/checkout@v2 + - run: sudo apt-get update + - name: Install C++ compiler and libraries - run: sudo apt-get install -y tree libpng-dev librsvg2-bin $(./scripts/list-build-dependencies.sh -m apt -c gcc) + run: | + sudo apt-get install -y tree \ + $(cat ./.github/packages/ubuntu-18.04-apt.txt) + + - name: Install Meson via pip3 + if: matrix.conf.os != 'ubuntu-20.04' + run: | + sudo apt-get install python3-setuptools + sudo pip3 install meson ninja + - name: Prepare compiler cache id: prep-ccache shell: bash @@ -113,6 +169,7 @@ echo "::set-output name=dir::$CCACHE_DIR" echo "::set-output name=today::$(date -I)" echo "::set-output name=yesterday::$(date --date=yesterday -I)" + - uses: actions/cache@v2 id: cache-ccache with: @@ -120,55 +177,55 @@ key: ccache-linux-release-${{ steps.prep-ccache.outputs.today }} restore-keys: | ccache-linux-release-${{ steps.prep-ccache.outputs.yesterday }} + + - name: Cache subprojects + uses: actions/cache@v2 + with: + path: subprojects/packagecache + key: subprojects-${{ hashFiles('subprojects/*.wrap') }} + - name: Log environment run: ./scripts/log-env.sh + - name: Inject version string run: | set -x git fetch --prune --unshallow - export VERSION=$(git describe --abbrev=4) - sed -i "s/AC_INIT(dosbox,git)/AC_INIT(dosbox,$VERSION)/" configure.ac + export VERSION=$(git describe --abbrev=5) echo "VERSION=$VERSION" >> $GITHUB_ENV - - name: Build - env: - AR: gcc-ar - CC: ccache gcc - CXX: ccache g++ - LD: gcc - RANLIB: gcc-ranlib - FLAGS: >- - -O3 -fstrict-aliasing -fno-signed-zeros -fno-trapping-math - -fassociative-math -mfpmath=sse -msse4.2 -flto -ffunction-sections - -fdata-sections -DNDEBUG -pipe - LINKFLAGS: -Wl,--as-needed + + - name: Setup release build run: | - set -x - ./autogen.sh - ./configure \ - --enable-png-static \ - --disable-fluidsynth \ - CFLAGS="$FLAGS" \ - CXXFLAGS="$FLAGS" \ - LDFLAGS="$FLAGS $LINKFLAGS -flto=$(nproc)" - make -j "$(nproc)" - strip src/dosbox + meson setup \ + -Dbuildtype=release \ + -Ddefault_library=static \ + -Db_asneeded=true \ + -Db_lto=true \ + -Dtry_static_libs=png \ + -Dfluidsynth:enable-floats=true \ + -Dfluidsynth:try-static-deps=true \ + build + + - name: Build + run: ninja -C build + - name: Package run: | set -x + # Print shared object dependencies + ldd build/dosbox + # Prepare content - install -DT src/dosbox dest/dosbox + install -DT build/dosbox dest/dosbox install -DT -m 644 docs/README.template dest/README install -DT -m 644 COPYING dest/COPYING install -DT -m 644 README dest/doc/manual.txt - install -DT -m 644 docs/README.video dest/doc/video.txt install -DT -m 644 docs/dosbox.1 dest/man/dosbox.1 - # Generate .desktop entry and icon files + # Install .desktop entry and icon files install -DT contrib/linux/dosbox-staging.desktop dest/desktop/dosbox-staging.desktop - make -C contrib/icons/ hicolor - mkdir -p dest/icons - mv contrib/icons/hicolor dest/icons + DESTDIR="$PWD" make -C contrib/icons/ install datadir=dest # Fill README template file sed -i "s|%GIT_COMMIT%|$GITHUB_SHA|" dest/README @@ -215,11 +272,15 @@ path: dosbox-staging-linux-${{ env.VERSION }}.tar.xz + # This job exists only to publish an artifact with version info when building + # from master branch, so snapshot build version will be visible on: + # https://dosbox-staging.github.io/downloads/devel/ + # publish_additional_artifacts: name: Publish additional artifacts needs: build_linux_release_dynamic - runs-on: ubuntu-latest - if: github.event_name != 'pull_request' || contains('dreamer,kcgen,ant-222,Wengier', github.actor) == false + runs-on: ubuntu-18.04 + if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 - name: Generate changelog diff -Nru dosbox-staging-0.76.0/.github/workflows/macos.yml dosbox-staging-0.77.0/.github/workflows/macos.yml --- dosbox-staging-0.76.0/.github/workflows/macos.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/macos.yml 2021-07-02 15:47:39.000000000 +0000 @@ -14,107 +14,174 @@ runs-on: macos-latest if: github.event_name != 'pull_request' || contains('dreamer,kcgen,ant-222,Wengier', github.actor) == false strategy: + max-parallel: 3 matrix: conf: + - name: Clang - flags: -c clang + packages: meson max_warnings: 0 - - name: GCC-9 - flags: -c gcc -v 9 + + - name: GCC + packages: gcc@9 + build_flags: --native-file=.github/meson/native-gcc-9.ini max_warnings: 0 + + - name: Clang, +tests + run_tests: true + max_warnings: -1 + + - name: Clang, +debugger + build_flags: -Denable_debugger=normal + max_warnings: 108 + + - name: Clang, warning_level=3 + build_flags: -Dwarning_level=3 + max_warnings: 179 + steps: - uses: actions/checkout@v2 - - name: Install C++ compiler and libraries - run: brew install $(./scripts/list-build-dependencies.sh -m brew ${{ matrix.conf.flags}}) - - name: Prepare compiler cache - id: prep-ccache + + - name: Prepare brew and compiler caches + id: prep-caches shell: bash run: | - mkdir -p "${CCACHE_DIR}" - echo "::set-output name=dir::$CCACHE_DIR" - echo "::set-output name=today::$(gdate -I)" - echo "::set-output name=yesterday::$(gdate --date=yesterday -I)" + set -eu + BREW_DIR="$(brew --cache)" + DISCARD_DIR="${{ github.workspace }}/discard" + mkdir -p "$DISCARD_DIR" + mv -f "$BREW_DIR"/* "$DISCARD_DIR" + mkdir -p "$CCACHE_DIR" + echo "::set-output name=brew_dir::$BREW_DIR" + echo "::set-output name=ccache_dir::$CCACHE_DIR" + echo "::set-output name=today::$(date +%F)" + echo "::set-output name=name_hash::$(echo '${{ matrix.conf.name }}' | shasum | cut -b-8)" + + - uses: actions/cache@v2 + with: + path: ${{ steps.prep-caches.outputs.brew_dir }} + key: brew-cache-${{ steps.prep-caches.outputs.today }} + restore-keys: brew-cache- + + - name: Install C++ compiler and libraries + run: | + brew install \ + ${{ matrix.conf.packages }} \ + $(cat ./.github/packages/macos-latest-brew.txt) + - uses: actions/cache@v2 - id: cache-ccache with: - path: ${{ steps.prep-ccache.outputs.dir }} - key: ccache-macos-${{ matrix.conf.name }}-${{ steps.prep-ccache.outputs.today }} + path: ${{ steps.prep-caches.outputs.ccache_dir }} + key: ccache-macos-debug-${{ steps.prep-caches.outputs.name_hash }}-${{ steps.prep-caches.outputs.today }} restore-keys: | - ccache-macos-${{ matrix.conf.name }}-${{ steps.prep-ccache.outputs.yesterday }} + ccache-macos-debug-${{ steps.prep-caches.outputs.name_hash }}- + ccache-macos-debug- + + - name: Cache subprojects + uses: actions/cache@v2 + with: + path: subprojects/packagecache + key: subprojects-${{ hashFiles('subprojects/*.wrap') }} + - name: Log environment run: ./scripts/log-env.sh + + - run: meson setup ${{ matrix.conf.build_flags }} build + - name: Build - run: ./scripts/build.sh --build-type Debug ${{ matrix.conf.flags }} + run: | + set -xo pipefail + meson compile -C build 2>&1 | tee build.log + + - name: Run tests + if: matrix.conf.run_tests + run: meson test -C build --print-errorlogs + - name: Summarize warnings + if: matrix.conf.run_tests != true env: MAX_WARNINGS: ${{ matrix.conf.max_warnings }} run: python3 ./scripts/count-warnings.py -lf build.log + build_macos_release: name: Release build runs-on: macos-latest if: github.event_name != 'pull_request' || contains('dreamer,kcgen,ant-222,Wengier', github.actor) == false - env: - CC: ccache clang - CXX: ccache clang++ - FLAGS: -DNDEBUG -O3 -fno-math-errno -fstrict-aliasing -march=nehalem -flto=thin -pipe steps: - uses: actions/checkout@v2 - - name: Install C++ compiler and libraries - run: brew install librsvg $(./scripts/list-build-dependencies.sh -m brew -c clang) - - name: Prepare compiler cache - id: prep-ccache + + - name: Prepare brew and compiler caches + id: prep-caches shell: bash run: | - mkdir -p "${CCACHE_DIR}" - echo "::set-output name=dir::$CCACHE_DIR" - echo "::set-output name=today::$(gdate -I)" - echo "::set-output name=yesterday::$(gdate --date=yesterday -I)" + set -eu + BREW_DIR="$(brew --cache)" + DISCARD_DIR="${{ github.workspace }}/discard" + mkdir -p "$DISCARD_DIR" + mv -f "$BREW_DIR"/* "$DISCARD_DIR" + mkdir -p "$CCACHE_DIR" + echo "::set-output name=brew_dir::$BREW_DIR" + echo "::set-output name=ccache_dir::$CCACHE_DIR" + echo "::set-output name=today::$(date +%F)" + - uses: actions/cache@v2 - id: cache-ccache with: - path: ${{ steps.prep-ccache.outputs.dir }} - key: ccache-macos-release-${{ steps.prep-ccache.outputs.today }} - restore-keys: | - ccache-macos-release-${{ steps.prep-ccache.outputs.yesterday }} + path: ${{ steps.prep-caches.outputs.brew_dir }} + key: brew-cache-${{ steps.prep-caches.outputs.today }} + restore-keys: brew-cache- + + - name: Install C++ compiler and libraries + run: | + brew install librsvg tree \ + $(cat ./.github/packages/macos-latest-brew.txt) + + - uses: actions/cache@v2 + with: + path: ${{ steps.prep-caches.outputs.ccache_dir }} + key: ccache-macos-release-${{ steps.prep-caches.outputs.today }} + restore-keys: ccache-macos-release- + + - name: Cache subprojects + uses: actions/cache@v2 + with: + path: subprojects/packagecache + key: subprojects-${{ hashFiles('subprojects/*.wrap') }} + - name: Log environment run: ./scripts/log-env.sh - - name: Build FluidSynth library - run: cd contrib/static-fluidsynth && gmake - - name: Build Opus libraries - run: | - set -x - cd contrib/static-opus - export CFLAGS="$FLAGS" - export CXXFLAGS="$FLAGS" - gmake -j "$(sysctl -n hw.physicalcpu)" + - name: Inject version string run: | set -x git fetch --prune --unshallow export VERSION=$(git describe --abbrev=5) - sed -i -e "s/AC_INIT(dosbox,git)/AC_INIT(dosbox,$VERSION)/" configure.ac echo "VERSION=$VERSION" >> $GITHUB_ENV - - name: Build - env: - FLUIDSYNTH_CFLAGS: -I${{ github.workspace }}/contrib/static-fluidsynth/include - FLUIDSYNTH_LIBS: ${{ github.workspace }}/contrib/static-fluidsynth/lib/libfluidsynth.a -lm -L/usr/local/Cellar/glib/$(pkg-config --modversion glib-2.0)/lib -L/usr/local/opt/gettext/lib -lgthread-2.0 -lglib-2.0 -lintl - OPUSFILE_CFLAGS: -I${{ github.workspace }}/contrib/static-opus/include -I${{ github.workspace }}/contrib/static-opus/include/opus - OPUSFILE_LIBS: ${{ github.workspace }}/contrib/static-opus/lib/libopusfile.a ${{ github.workspace }}/contrib/static-opus/lib/libogg.a ${{ github.workspace }}/contrib/static-opus/lib/libopus.a -lm + + - name: Setup release build run: | - set -x - ./autogen.sh - ./configure \ - --enable-png-static \ - --enable-sdl-static \ - CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" - gmake -j "$(sysctl -n hw.physicalcpu)" - strip src/dosbox - otool -L src/dosbox + meson setup \ + --wrap-mode=forcefallback \ + -Dbuildtype=release \ + -Ddefault_library=static \ + -Db_asneeded=true \ + -Db_lto=true \ + -Dtry_static_libs=opusfile,png,sdl2,sdl2_net \ + -Dfluidsynth:enable-floats=true \ + -Dfluidsynth:try-static-deps=true \ + build + + - name: Build + run: ninja -C build + - name: Package run: | set -x + # Print shared object dependencies + otool -L build/dosbox + python3 scripts/verify-macos-dylibs.py build/dosbox + # Generate icon make -C contrib/icons/ dosbox-staging.icns @@ -125,7 +192,7 @@ install -d "$dst/Resources/" install -d "$dst/SharedSupport/" - install "src/dosbox" "$dst/MacOS/" + install "build/dosbox" "$dst/MacOS/" install -m 644 "contrib/macos/Info.plist.template" "$dst/Info.plist" install -m 644 "contrib/macos/PkgInfo" "$dst/PkgInfo" install -m 644 "contrib/icons/dosbox-staging.icns" "$dst/Resources/" @@ -134,33 +201,6 @@ install -m 644 "README" "$dst/SharedSupport/manual.txt" install -m 644 "docs/README.video" "$dst/SharedSupport/video.txt" - # Inventory the brew dependencies residing in /usr/local - gthread="/usr/local/opt/glib/lib/libgthread-2.0.0.dylib" - glib="/usr/local/opt/glib/lib/libglib-2.0.0.dylib" - glib_version="$(pkg-config --modversion glib-2.0)" - glib_cellar="/usr/local/Cellar/glib/${glib_version}_1/lib/libglib-2.0.0.dylib" - intl="/usr/local/opt/gettext/lib/libintl.8.dylib" - pcre="/usr/local/opt/pcre/lib/libpcre.1.dylib" - - # Bundle brew dependencies along-side the dosbox executable - install -m 644 "$gthread" "$dst/MacOS/" - install -m 644 "$glib" "$dst/MacOS/" - install -m 644 "$intl" "$dst/MacOS/" - install -m 644 "$pcre" "$dst/MacOS/" - install_name_tool -change "$glib_cellar" "@executable_path/${glib##*/}" "$dst/MacOS/${gthread##*/}" - install_name_tool -change "$intl" "@executable_path/${intl##*/}" "$dst/MacOS/${glib##*/}" - install_name_tool -change "$pcre" "@executable_path/${pcre##*/}" "$dst/MacOS/${glib##*/}" - install_name_tool -change "$gthread" "@executable_path/${gthread##*/}" "$dst/MacOS/dosbox" - install_name_tool -change "$glib" "@executable_path/${glib##*/}" "$dst/MacOS/dosbox" - install_name_tool -change "$intl" "@executable_path/${intl##*/}" "$dst/MacOS/dosbox" - - # Perform a stand-alone execution test with /usr/local dependencies temporarily removed - dep_archive="/tmp/$$-deps.tar" - tar -cvPf "$dep_archive" "$gthread" "$glib" "$glib_cellar" "$intl" "$pcre" - rm -f "$gthread" "$glib" "$glib_cellar" "$intl" "$pcre" - "$dst/MacOS/dosbox" -c exit - tar -xvPf "$dep_archive" -C / - # Fill README template file sed -i -e "s|%VERSION%|${{ env.VERSION }}|" "$dst/Info.plist" sed -i -e "s|%GIT_COMMIT%|$GITHUB_SHA|" "$dst/SharedSupport/README" @@ -183,21 +223,20 @@ mv -f "$clamconf".sample "$clamconf" sed -ie 's/^Example/#Example/g' "$clamconf" sed -ie 's/30/20000/g' "$clamconf" - echo "::set-output name=today::$(gdate -I)" - echo "::set-output name=yesterday::$(gdate --date=yesterday -I)" + echo "::set-output name=today::$(date +%F)" - uses: actions/cache@v2 id: cache-clamdb with: path: ${{ env.CLAMDB_DIR }}/**/*.cvd - key: clamdb-macos-${{ steps.prep-clamdb.outputs.today }}-2 + key: clamdb-macos-${{ steps.prep-clamdb.outputs.today }} restore-keys: | - clamdb-macos-${{ steps.prep-clamdb.outputs.yesterday }}-2 + clamdb-macos- - name: Clam AV scan run: | set -x freshclam --foreground - clamscan --heuristic-scan-precedence=yes --recursive --infected . + clamscan --heuristic-scan-precedence=yes --recursive --infected dist - name: Upload disk image uses: actions/upload-artifact@v2 @@ -208,11 +247,15 @@ path: dosbox-staging-macOS-${{ env.VERSION }}.dmg + # This job exists only to publish an artifact with version info when building + # from master branch, so snapshot build version will be visible on: + # https://dosbox-staging.github.io/downloads/devel/ + # publish_additional_artifacts: name: Publish additional artifacts needs: build_macos_release runs-on: macos-latest - if: github.event_name != 'pull_request' || contains('dreamer,kcgen,ant-222,Wengier', github.actor) == false + if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 - name: Generate changelog diff -Nru dosbox-staging-0.76.0/.github/workflows/platforms.yml dosbox-staging-0.77.0/.github/workflows/platforms.yml --- dosbox-staging-0.76.0/.github/workflows/platforms.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/platforms.yml 2021-07-02 15:47:39.000000000 +0000 @@ -22,88 +22,40 @@ strategy: matrix: conf: - - name: ARMv6 (Debian Buster) - architecture: armv6 - distribution: buster - - name: ARMv7 (Debian Buster) - architecture: armv7 - distribution: buster - - name: ARMv8 AArch64 (Ubuntu 18.04) - architecture: aarch64 - distribution: ubuntu18.04 - - name: s390x (Ubuntu 18.04) - architecture: s390x - distribution: ubuntu18.04 - - name: ppc64le (Ubuntu 18.04) - architecture: ppc64le - distribution: ubuntu18.04 + # - name: ARMv6 (Debian Buster) + # arch: armv6 + # distro: buster + # - name: ARMv7 (Debian Buster) + # arch: armv7 + # distro: buster + # - name: ARMv8 AArch64 (Ubuntu 18.04) + # arch: aarch64 + # distro: ubuntu18.04 + - name: s390x (Ubuntu 20.04) + arch: s390x + distro: ubuntu20.04 + - name: ppc64le (Ubuntu 20.04) + arch: ppc64le + distro: ubuntu20.04 steps: - name: Checkout uses: actions/checkout@v2 - - name: Inject version string - run: | - set -x - git fetch --prune --unshallow - export VERSION=$(git describe --abbrev=4) - sed -i "s/AC_INIT(dosbox,git)/AC_INIT(dosbox,$VERSION)/" configure.ac - echo "VERSION=$VERSION" >> $GITHUB_ENV - - name: Build uses: uraimo/run-on-arch-action@master with: - architecture: ${{ matrix.conf.architecture }} - distribution: ${{ matrix.conf.distribution }} + arch: ${{ matrix.conf.arch }} + distro: ${{ matrix.conf.distro }} run: | - set -x + set -xo pipefail apt-get update - apt-get install -y libpng-dev $(./scripts/list-build-dependencies.sh -c gcc -m apt) + apt-get install -y $(cat ./.github/packages/ubuntu-20.04-apt.txt) ./scripts/log-env.sh - ./scripts/build.sh -c gcc -t release -m lto --disable-fluidsynth + meson build \ + -Duse_fluidsynth=false \ + -Duse_mt32emu=false \ + --wrap-mode=nofallback + ninja -C build |& tee build.log - name: Summarize warnings run: ./scripts/count-warnings.py --max-warnings -1 build.log - - - name: Package - run: | - set -x - - # Prepare content - install -DT src/dosbox dest/dosbox - install -DT -m 644 docs/README.template dest/README - install -DT -m 644 COPYING dest/COPYING - install -DT -m 644 README dest/doc/manual.txt - install -DT -m 644 docs/README.video dest/doc/video.txt - install -DT -m 644 docs/dosbox.1 dest/man/dosbox.1 - # skip icon generation for now because rsvg-convert isn't available - - # Fill README template file - sed -i "s|%GIT_COMMIT%|$GITHUB_SHA|" dest/README - sed -i "s|%GIT_BRANCH%|${GITHUB_REF#refs/heads/}|" dest/README - sed -i "s|%GITHUB_REPO%|$GITHUB_REPOSITORY|" dest/README - - # Inventory the package - PACKAGE="dosbox-staging-linux-${{ matrix.conf.architecture }}-$VERSION" - mv dest "$PACKAGE" - ls -1lh "$PACKAGE" - - # Create tarball - tar -cJf "$PACKAGE.tar.xz" "$PACKAGE" - echo "PACKAGE=$PACKAGE" >> $GITHUB_ENV - - - name: Clam AV scan - run: | - set -x - sudo apt-get install clamav > /dev/null - sudo systemctl stop clamav-freshclam - sudo freshclam --quiet && sudo freshclam - clamscan --heuristic-scan-precedence=yes --recursive --infected . - - - name: Upload tarball - uses: actions/upload-artifact@v2 - # GitHub automatically zips the artifacts (there's no way to create - # a tarball), and it removes all executable flags while zipping. - # Letting it zip a tarball preserves flags in the compressed files. - with: - name: ${{ env.PACKAGE }} - path: ${{ env.PACKAGE }}.tar.xz diff -Nru dosbox-staging-0.76.0/.github/workflows/pvs-studio.yml dosbox-staging-0.77.0/.github/workflows/pvs-studio.yml --- dosbox-staging-0.76.0/.github/workflows/pvs-studio.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/pvs-studio.yml 2021-07-02 15:47:39.000000000 +0000 @@ -2,73 +2,112 @@ on: push -env: - CCACHE_DIR: "/dev/shm/.ccache" - CCACHE_MAXSIZE: "64M" - CCACHE_COMPRESS: "true" - jobs: pvs_studio_analyzer: name: PVS-Studio static analyzer runs-on: ubuntu-20.04 env: - debfile: pvs-studio-7.10.43167.79-amd64.deb + debfile: pvs-studio-7.13.48133.129-amd64.deb steps: - uses: actions/checkout@v2 + - run: sudo apt-get update + - name: Log and setup environment run: | ./scripts/log-env.sh mkdir -p pvs-package + - uses: actions/cache@v2 id: cache-pvs with: path: pvs-package key: ${{ env.debfile }} + - name: Fetch PVS-Studio package if: steps.cache-pvs.outputs.cache-hit != 'true' run: wget "https://files.viva64.com/${debfile}" -O "pvs-package/pvs.deb" + - name: Install packages run: | set -xeu - sudo apt-get install strace $(./scripts/list-build-dependencies.sh -m apt -c gcc) + sudo apt-get install -y strace $(cat .github/packages/ubuntu-20.04-apt.txt) sudo dpkg -i "pvs-package/pvs.deb" pvs-studio-analyzer credentials "${{ secrets.PvsStudioName }}" "${{ secrets.PvsStudioKey }}" + + - name: Cache subprojects + uses: actions/cache@v2 + with: + path: subprojects/packagecache + key: subprojects-${{ hashFiles('subprojects/*.wrap') }} + - name: Build run: | set -xeu - ./autogen.sh - export FLAGS="-Og" - ./configure CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" - pvs-studio-analyzer trace -- make + + CC=clang CXX=clang++ \ + meson setup \ + -Dbuildtype=debug \ + -Dunit_tests=disabled \ + -Ddefault_library=static \ + -Dfluidsynth:enable-floats=true \ + -Dfluidsynth:try-static-deps=true \ + build + + pvs-studio-analyzer trace -- ninja -C build + - name: Analyze run: | set -xeu log="pvs-analysis.log" - mirsa_criteria="MISRA:1,2" general_criteria="GA:1,2;64:1;OP:1,2,3;CS:1" stamp="$(date +'%Y-%m-%d_T%H%M')-${GITHUB_SHA:0:8}" reportdir="pvs-report/pvs-report-${stamp}" + disable_warnings="V002,V1042,V826,V802,V2008,V1071" + mkdir -p "${reportdir}" - pvs-studio-analyzer analyze -a 63 -s .pvs-suppress -o "${log}" -j "$(nproc)" - plog-converter -a "${general_criteria}" -d V1042,V826 -t fullhtml -p dosbox-staging \ - -v "${GITHUB_SHA:0:8}" -o "${reportdir}" "${log}" + + pvs-studio-analyzer analyze \ + -a 63 \ + -e subprojects \ + -s .pvs-suppress \ + -j "$(nproc)" \ + -o "${log}" + + plog-converter \ + -p dosbox-staging \ + -v "${GITHUB_SHA:0:8}" \ + -a "${general_criteria}" \ + -d "${disable_warnings}" \ + -t fullhtml \ + -o "${reportdir}" \ + "${log}" + mv "${reportdir}/fullhtml" "${reportdir}/general" - plog-converter -a "${mirsa_criteria}" -d V1042,V826 -t fullhtml -p dosbox-staging \ - -v "${GITHUB_SHA:0:8}" -o "${reportdir}" "${log}" - mv "${reportdir}/fullhtml" "${reportdir}/mirsa" - plog-converter -a "${general_criteria}" -d V1042,V826 -t csv -o pvs-report.csv "${log}" + + plog-converter \ + -a "${general_criteria}" \ + -d "${disable_warnings}" \ + -t csv \ + -o pvs-report.csv \ + "${log}" + cp -l pvs-report.csv "${reportdir}/general/" - pvs-studio-analyzer suppress -a "${general_criteria}" \ - -o "${reportdir}/general/supressible-list.json" "${log}" + + pvs-studio-analyzer suppress \ + -a "${general_criteria}" \ + -o "${reportdir}/general/supressible-list.json" \ + "${log}" + - name: Upload report uses: actions/upload-artifact@v2 with: name: pvs-analysis-report path: pvs-report + - name: Summarize report env: - MAX_BUGS: 458 + MAX_BUGS: 351 run: | echo "Full report is included in build Artifacts" echo diff -Nru dosbox-staging-0.76.0/.github/workflows/windows.yml dosbox-staging-0.77.0/.github/workflows/windows.yml --- dosbox-staging-0.76.0/.github/workflows/windows.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.github/workflows/windows.yml 2021-07-02 15:47:39.000000000 +0000 @@ -12,10 +12,10 @@ conf: - name: MSVC 32-bit arch: x86 - max_warnings: 295 + max_warnings: 270 - name: MSVC 64-bit arch: x64 - max_warnings: 2009 + max_warnings: 1965 steps: - name: Backup existing vcpkg installation shell: pwsh @@ -34,7 +34,7 @@ id: cache-vcpkg with: path: c:\vcpkg - key: vcpkg-${{ matrix.conf.arch }}-${{ steps.prep-vcpkg.outputs.year_and_week }}-1 + key: vcpkg-${{ matrix.conf.arch }}-${{ steps.prep-vcpkg.outputs.year_and_week }} - name: Install new packages using vcpkg if: steps.cache-vcpkg.outputs.cache-hit != 'true' @@ -42,7 +42,7 @@ run: | rm -R c:\vcpkg mv c:\vcpkg-bak c:\vcpkg - vcpkg install --triplet ${{ matrix.conf.arch }}-windows libpng sdl2 sdl2-net opusfile fluidsynth + vcpkg install --triplet ${{ matrix.conf.arch }}-windows libpng sdl2 sdl2-net libmt32emu opusfile fluidsynth gtest if (-not $?) { throw "vcpkg failed to install library dependencies" } - name: Integrate packages @@ -56,18 +56,28 @@ shell: pwsh run: .\scripts\log-env.ps1 + - name: Run tests + shell: pwsh + env: + PATH: '${env:PATH};C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64' + run: | + cd vs + # TODO: get unit tests working in Debug-mode; for now use release flags (better than nothing) + MSBuild -m dosbox.sln -t:tests:Rebuild -p:Configuration=Release -p:Platform=${{ matrix.conf.arch }} + - name: Build shell: pwsh env: PATH: '${env:PATH};C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64' run: | cd vs - MSBuild -m dosbox.sln -p:Configuration=Debug -p:Platform=${{ matrix.conf.arch }} | Tee-Object build.log + MSBuild -m dosbox.sln -t:dosbox:Rebuild -p:Configuration=Debug -p:Platform=${{ matrix.conf.arch }} | Tee-Object build.log + - name: Summarize warnings shell: pwsh env: MAX_WARNINGS: ${{ matrix.conf.max_warnings }} - run: python scripts\count-warnings.py -lf --msvc vs\build.log + run: python scripts\count-warnings.py -f --msvc vs\build.log build_windows_vs_release: @@ -83,19 +93,26 @@ - name: Release build (64-bit) arch: x64 vs-release-dirname: x64 + steps: + - name: Prepare vcpkg for cache restore - id: prep-vcpkg shell: pwsh run: | mv c:\vcpkg c:\vcpkg-bak md c:\vcpkg -ea 0 + - name: Generate vcpkg cache key + id: prep-vcpkg + shell: bash + run: | + echo "::set-output name=year_and_week::$(date '+%Y%W')" + - name: Restore the most recent cache of vcpkg uses: actions/cache@v2 with: path: c:\vcpkg - key: vcpkg-${{ matrix.conf.arch }}- + key: vcpkg-${{ matrix.conf.arch }}-${{ steps.prep-vcpkg.outputs.year_and_week }} - name: Integrate packages shell: pwsh @@ -108,14 +125,17 @@ shell: pwsh run: .\scripts\log-env.ps1 - - name: Inject version string + - name: Adjust config.h shell: bash run: | set -x git fetch --prune --unshallow export VERSION=$(git describe --abbrev=4) - sed -i "s|VERSION \"git\"|VERSION \"$VERSION\"|" src/platform/visualc/config.h + # inject version based on vcs + sed -i "s|DOSBOX_DETAILED_VERSION \"git\"|DOSBOX_DETAILED_VERSION \"$VERSION\"|" src/platform/visualc/config.h echo "VERSION=$VERSION" >> $GITHUB_ENV + # overwrite .conf file branding for release build + sed -i "s|CONF_SUFFIX \"-staging-git\"|CONF_SUFFIX \"-staging\"|" src/platform/visualc/config.h - name: Build shell: pwsh @@ -123,7 +143,7 @@ PATH: '${env:PATH};C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64' run: | cd vs - MSBuild -m dosbox.sln -p:Configuration=Release -p:Platform=${{ matrix.conf.arch }} + MSBuild -m dosbox.sln -t:dosbox:Rebuild -p:Configuration=Release -p:Platform=${{ matrix.conf.arch }} - name: Package shell: bash @@ -134,6 +154,7 @@ # Prepare content readonly RELEASE_DIR=${{ matrix.conf.vs-release-dirname }}/Release + ls "vs/$RELEASE_DIR" mkdir -p dest/doc cp vs/$RELEASE_DIR/dosbox.exe dest/ cp COPYING dest/COPYING.txt @@ -142,11 +163,11 @@ cp docs/vc_redist.txt dest/doc/vc_redist.txt cp README dest/doc/manual.txt cp vs/$RELEASE_DIR/libfluidsynth-2.dll dest/ - cp vs/$RELEASE_DIR/glib-2.dll dest/ # fluidsynth dependency - cp vs/$RELEASE_DIR/libintl.dll dest/ # glib dependency + cp vs/$RELEASE_DIR/glib-2.0-0.dll dest/ # fluidsynth dependency + cp vs/$RELEASE_DIR/intl-8.dll dest/ # glib dependency cp vs/$RELEASE_DIR/pcre.dll dest/ # glib dependency - cp vs/$RELEASE_DIR/libiconv.dll dest/ # glib dependency - cp vs/$RELEASE_DIR/libcharset.dll dest/ # iconv dependency + cp vs/$RELEASE_DIR/iconv-2.dll dest/ # glib dependency + cp vs/$RELEASE_DIR/mt32emu-2.dll dest/ cp vs/$RELEASE_DIR/ogg.dll dest/ cp vs/$RELEASE_DIR/opus.dll dest/ cp vs/$RELEASE_DIR/SDL2.dll dest/ @@ -159,7 +180,7 @@ ls -l "$VC_REDIST_PATH" # Include the necessary dlls from one of available versions - readonly VC_REDIST_VERSION="14.28.29325" + readonly VC_REDIST_VERSION="14.29.30036" readonly VC_REDIST_DIR="$VC_REDIST_PATH/$VC_REDIST_VERSION/${{ matrix.conf.arch }}/Microsoft.VC142.CRT" cp "$VC_REDIST_DIR/msvcp140.dll" dest/ cp "$VC_REDIST_DIR/vcruntime140.dll" dest/ @@ -191,11 +212,15 @@ path: dosbox-staging-windows-${{ matrix.conf.arch }}-${{ env.VERSION }} + # This job exists only to publish an artifact with version info when building + # from master branch, so snapshot build version will be visible on: + # https://dosbox-staging.github.io/downloads/devel/ + # publish_additional_artifacts: name: Publish additional artifacts needs: build_windows_vs_release runs-on: windows-latest - if: github.event_name != 'pull_request' || contains('dreamer,kcgen,ant-222,Wengier', github.actor) == false + if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v2 - name: Generate changelog diff -Nru dosbox-staging-0.76.0/.gitignore dosbox-staging-0.77.0/.gitignore --- dosbox-staging-0.76.0/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.gitignore 2021-07-02 15:47:39.000000000 +0000 @@ -1,60 +1,7 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - # Precompiled Headers *.gch *.pch -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app - -# svn:ignore -aclocal.m4 -autom4te.cache -ar-lib -config.h -config.h.in -config.h.in~ -config.log -config.status -config.guess -config.sub -configure -depcomp -install-sh -Makefile -Makefile.in -missing -mkinstalldirs -stamp-h1 - -# autotools configuration ephemerals -confdefs.h -conftest.dir - # Other compile build.log @@ -65,6 +12,10 @@ *.defines missed.txt +# Common names for meson build dirs +build +builddir + # Visual Studio .vs .vscode @@ -81,6 +32,7 @@ !pvs-studio.yml strace_out suppress_base.json +.PVS-Studio # macOS directory prefs .DS_Store diff -Nru dosbox-staging-0.76.0/include/bios_disk.h dosbox-staging-0.77.0/include/bios_disk.h --- dosbox-staging-0.76.0/include/bios_disk.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/bios_disk.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,18 +19,15 @@ #ifndef DOSBOX_BIOS_DISK_H #define DOSBOX_BIOS_DISK_H +#include "dosbox.h" + #include #include #include -#ifndef DOSBOX_MEM_H -#include "mem.h" -#endif -#ifndef DOSBOX_DOS_INC_H -#include "dos_inc.h" -#endif -#ifndef DOSBOX_BIOS_H + #include "bios.h" -#endif +#include "dos_inc.h" +#include "mem.h" /* The Section handling Bios Disk Access */ #define BIOS_MAX_DISK 10 diff -Nru dosbox-staging-0.76.0/include/bios.h dosbox-staging-0.77.0/include/bios.h --- dosbox-staging-0.76.0/include/bios.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/bios.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,8 @@ #ifndef DOSBOX_BIOS_H #define DOSBOX_BIOS_H +#include "dosbox.h" + #define BIOS_BASE_ADDRESS_COM1 0x400 #define BIOS_BASE_ADDRESS_COM2 0x402 #define BIOS_BASE_ADDRESS_COM3 0x404 @@ -108,7 +110,7 @@ #define BIOS_DEFAULT_IRQ0_LOCATION (RealMake(0xf000,0xfea5)) #define BIOS_DEFAULT_IRQ1_LOCATION (RealMake(0xf000,0xe987)) #define BIOS_DEFAULT_IRQ2_LOCATION (RealMake(0xf000,0xff55)) -#define BIOS_DEFAULT_RESET_LOCATION (RealMake(0xf000,0xe05b)) +#define BIOS_DEFAULT_RESET_LOCATION (RealMake(0xf000,(machine==MCH_PCJR)?0x0043:0xe05b)) /* maximum of scancodes handled by keyboard bios routines */ #define MAX_SCAN_CODE 0x58 diff -Nru dosbox-staging-0.76.0/include/byteorder.h dosbox-staging-0.77.0/include/byteorder.h --- dosbox-staging-0.76.0/include/byteorder.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/byteorder.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/callback.h dosbox-staging-0.77.0/include/callback.h --- dosbox-staging-0.76.0/include/callback.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/callback.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/compiler.h dosbox-staging-0.77.0/include/compiler.h --- dosbox-staging-0.76.0/include/compiler.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/compiler.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,7 @@ /* - * Copyright (C) 2019-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2019-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +21,8 @@ #ifndef DOSBOX_COMPILER_H #define DOSBOX_COMPILER_H +#include "config.h" + // This header wraps compiler-specific features, so they won't need to // be hacked into the buildsystem. @@ -31,6 +35,17 @@ #define __has_cpp_attribute(x) 0 #endif +// Function-like macro __has_attribute was introduced in GCC 5.x and Clang, +// alongside __has_cpp_attribute, and with the same logic. +// See: https://clang.llvm.org/docs/LanguageExtensions.html#has-attribute + +#ifdef __has_attribute +#define C_HAS_ATTRIBUTE 1 +#else +#define C_HAS_ATTRIBUTE 0 +#define __has_attribute(x) 0 // for compatibility with non-supporting compilers +#endif + // When passing the -Wunused flag to GCC or Clang, entities that are unused by // the program may be diagnosed. The MAYBE_UNUSED attribute can be used to // silence such diagnostics when the entity cannot be removed. @@ -67,6 +82,32 @@ #define GCC_ATTRIBUTE(x) /* attribute not supported */ #endif +// Wrapper for various compiler extensions for inlining aggresively. +// +// There is NO way to truly FORCE compiler to do inlining, therefore all these +// methods are only strong hints, usually non-preferrable over simple +// 'inline' keyword. +// +// Normal C++ 'inline' is indicator that there might be more than one +// definition for the function (as long as all definitions are the same). +// It's used to define functions in C++ headers. Compiler will automatically +// try to inline (embed compiled code without function call) any function +// defined in a header. +// +// For details about GCC/Clang always_inline, see: +// https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes +// +// For details about MSVC __forceinline, see: +// https://docs.microsoft.com/en-us/cpp/cpp/inline-functions-cpp#inline-__inline-and-__forceinline + +#if __has_attribute(always_inline) +#define INLINE inline __attribute__((always_inline)) +#elif defined(_MSC_VER) +#define INLINE __forceinline +#else +#define INLINE inline +#endif + // GCC_LIKELY macro is incorrectly named, because other compilers support // this feature as well (e.g. Clang, Intel); leave it be for now, at // least until full support for C++20 [[likely]] attribute will start arriving @@ -84,7 +125,7 @@ #define GCC_UNLIKELY #endif -// XSTR and STR macros can be used turning defines into string literals: +// XSTR and STR macros can be used for turning defines into string literals: // // #define FOO 4 // printf("It's a " STR(FOO)); // prints "It's a FOO" diff -Nru dosbox-staging-0.76.0/include/control.h dosbox-staging-0.77.0/include/control.h --- dosbox-staging-0.76.0/include/control.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/control.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,8 @@ #include "dosbox.h" #include -#include +#include +#include #include #include @@ -30,22 +31,19 @@ #include "setup.h" enum class Verbosity : int8_t { - // Show Splash | Show Welcome | Show Early Stdout | - High = 3, // yes | yes | yes | - Medium = 2, // no | yes | yes | - Low = 1, // no | no | yes | - Quiet = 0 // no | no | no | + // Splash | Welcome | Early Stdout | + High = 4, // yes | yes | yes | + Medium = 3, // no | yes | yes | + Low = 2, // no | no | yes | + SplashOnly = 1, // yes | no | no | + Quiet = 0 // no | no | no | }; class Config { public: CommandLine * cmdline; private: - std::list sectionlist; - typedef std::list::iterator it; - typedef std::list::reverse_iterator reverse_it; - typedef std::list::const_iterator const_it; - typedef std::list::const_reverse_iterator const_reverse_it; + std::deque sectionlist; void (* _start_function)(void); bool secure_mode; //Sandbox mode public: @@ -70,20 +68,29 @@ ~Config(); - Section_line * AddSection_line(char const * const _name,void (*_initfunction)(Section*)); - Section_prop * AddSection_prop(char const * const _name,void (*_initfunction)(Section*),bool canchange=false); - - Section* GetSection(int index); - Section* GetSection(std::string const&_sectionname) const; - Section* GetSectionFromProperty(char const * const prop) const; + Section_prop *AddEarlySectionProp(const char *name, + SectionFunction func, + bool changeable_at_runtime = false); + + Section_line *AddSection_line(const char *section_name, SectionFunction func); + + Section_prop *AddSection_prop(const char *section_name, + SectionFunction func, + bool changeable_at_runtime = false); + + auto begin() { return sectionlist.begin(); } + auto end() { return sectionlist.end(); } + + Section *GetSection(const std::string §ion_name) const; + Section *GetSectionFromProperty(const char *prop) const; void SetStartUp(void (*_function)(void)); - void Init(); + void Init() const; void ShutDown(); void StartUp(); bool PrintConfig(const std::string &filename) const; bool ParseConfigFile(char const * const configfilename); - void ParseEnv(char ** envp); + void ParseEnv(); bool SecureMode() const { return secure_mode; } void SwitchToSecureMode() { secure_mode = true; }//can't be undone Verbosity GetStartupVerbosity() const; diff -Nru dosbox-staging-0.76.0/include/cpu.h dosbox-staging-0.77.0/include/cpu.h --- dosbox-staging-0.76.0/include/cpu.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/cpu.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,13 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_CPU_H #define DOSBOX_CPU_H -#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#endif + #ifndef DOSBOX_REGS_H #include "regs.h" #endif @@ -156,6 +154,7 @@ bool CPU_PrepareException(Bitu which,Bitu error); void CPU_Exception(Bitu which,Bitu error=0); +void CPU_DebugException(Bit32u triggers,Bitu oldeip); bool CPU_SetSegGeneral(SegNames seg,Bitu value); bool CPU_PopSeg(SegNames seg,bool use32); @@ -168,7 +167,7 @@ void CPU_SetFlags(Bitu word,Bitu mask); - +#define EXCEPTION_DB 1 #define EXCEPTION_UD 6 #define EXCEPTION_TS 10 #define EXCEPTION_NP 11 @@ -183,6 +182,14 @@ #define CR0_FPUPRESENT 0x00000010 #define CR0_PAGING 0x80000000 +// reasons for triggering a debug exception +#define DBINT_BP0 0x00000001 +#define DBINT_BP1 0x00000002 +#define DBINT_BP2 0x00000004 +#define DBINT_BP3 0x00000008 +#define DBINT_GD 0x00002000 +#define DBINT_STEP 0x00004000 +#define DBINT_TASKSWITCH 0x00008000 // ********************************************************************* // Descriptor @@ -383,7 +390,7 @@ Bitu table_limit; }; -class GDTDescriptorTable : public DescriptorTable { +class GDTDescriptorTable final : public DescriptorTable { public: bool GetDescriptor(Bitu selector, Descriptor& desc) { Bitu address=selector & ~7; @@ -434,7 +441,7 @@ Bitu ldt_value; }; -class TSS_Descriptor : public Descriptor { +class TSS_Descriptor final : public Descriptor { public: Bitu IsBusy(void) { return saved.seg.type & 2; @@ -488,5 +495,4 @@ CPU_SetFlags(word,mask); } - #endif diff -Nru dosbox-staging-0.76.0/include/cross.h dosbox-staging-0.77.0/include/cross.h --- dosbox-staging-0.76.0/include/cross.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/cross.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -69,6 +70,20 @@ #define cross_fileno(s) fileno(s) #endif +namespace cross { + +#if defined(WIN32) + +struct tm *localtime_r(const time_t *timep, struct tm *result); + +#else + +constexpr auto localtime_r = ::localtime_r; + +#endif + +} // namespace cross + void CROSS_DetermineConfigPaths(); std::string CROSS_GetPlatformConfigDir(); std::string CROSS_ResolveHome(const std::string &str); diff -Nru dosbox-staging-0.76.0/include/debug.h dosbox-staging-0.77.0/include/debug.h --- dosbox-staging-0.76.0/include/debug.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/debug.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef DOSBOX_DEBUG_H +#define DOSBOX_DEBUG_H + +#include "dosbox.h" + void DEBUG_SetupConsole(void); void DEBUG_DrawScreen(void); bool DEBUG_Breakpoint(void); @@ -33,3 +38,5 @@ bool DEBUG_HeavyIsBreakpoint(void); void DEBUG_HeavyWriteLogInstruction(void); #endif + +#endif diff -Nru dosbox-staging-0.76.0/include/dma.h dosbox-staging-0.77.0/include/dma.h --- dosbox-staging-0.76.0/include/dma.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/dma.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/dosbox.h dosbox-staging-0.77.0/include/dosbox.h --- dosbox-staging-0.76.0/include/dosbox.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/dosbox.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,14 @@ #include "compiler.h" #include "types.h" +int sdl_main(int argc, char *argv[]); + +// The exit_requested bool is a conditional break in the parse-loop and +// machine-loop. Set it to true to gracefully quit in expected circumstances. +extern bool exit_requested; + +// The E_Exit function throws an exception to quit. Call it in unexpected +// circumstances. [[noreturn]] void E_Exit(const char *message, ...) GCC_ATTRIBUTE(__format__(__printf__, 1, 2)); @@ -33,6 +41,8 @@ typedef Bitu (LoopHandler)(void); +const char *DOSBOX_GetDetailedVersion() noexcept; + void DOSBOX_RunMachine(); void DOSBOX_SetLoop(LoopHandler * handler); void DOSBOX_SetNormalLoop(); diff -Nru dosbox-staging-0.76.0/include/dos_inc.h dosbox-staging-0.77.0/include/dos_inc.h --- dosbox-staging-0.76.0/include/dos_inc.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/dos_inc.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -118,8 +121,10 @@ bool DOS_SetFileDate(uint16_t entry, uint16_t ntime, uint16_t ndate); // Date and Time Conversion -uint16_t DOS_PackTime(uint16_t hour, uint16_t min, uint16_t sec); -uint16_t DOS_PackDate(uint16_t year, uint16_t mon, uint16_t day); +uint16_t DOS_PackTime(uint16_t hour, uint16_t min, uint16_t sec) noexcept; +uint16_t DOS_PackTime(const struct tm &datetime) noexcept; +uint16_t DOS_PackDate(uint16_t year, uint16_t mon, uint16_t day) noexcept; +uint16_t DOS_PackDate(const struct tm &datetime) noexcept; /* Routines for Drive Class */ bool DOS_OpenFile(char const * name,Bit8u flags,Bit16u * entry,bool fcb = false); @@ -298,7 +303,7 @@ /* Program Segment Prefix */ -class DOS_PSP : public MemStruct { +class DOS_PSP final : public MemStruct { public: DOS_PSP(uint16_t segment) : seg(segment) { SetPt(seg); } @@ -381,7 +386,7 @@ static Bit16u rootpsp; }; -class DOS_ParamBlock : public MemStruct { +class DOS_ParamBlock final : public MemStruct { public: DOS_ParamBlock(PhysPt addr) : exec{0, 0, 0, 0, 0, 0}, @@ -416,7 +421,7 @@ sOverlay overlay; }; -class DOS_InfoBlock : public MemStruct { +class DOS_InfoBlock final : public MemStruct { public: DOS_InfoBlock() : seg(0) {} @@ -507,7 +512,7 @@ * Some documents refer to it also as Data Transfer Address or Disk Transfer Area. */ -class DOS_DTA : public MemStruct { +class DOS_DTA final : public MemStruct { public: DOS_DTA(RealPt addr) : MemStruct(addr) {} @@ -557,7 +562,7 @@ /* File Control Block */ -class DOS_FCB : public MemStruct { +class DOS_FCB final : public MemStruct { public: DOS_FCB(uint16_t seg, uint16_t off, bool allow_extended = true); @@ -628,7 +633,7 @@ /* Memory Control Block */ -class DOS_MCB : public MemStruct { +class DOS_MCB final : public MemStruct { public: DOS_MCB(uint16_t seg) : MemStruct(seg, 0) {} @@ -660,7 +665,7 @@ #endif }; -class DOS_SDA : public MemStruct { +class DOS_SDA final : public MemStruct { public: DOS_SDA(uint16_t seg, uint16_t off) : MemStruct(seg, off) {} diff -Nru dosbox-staging-0.76.0/include/dos_system.h dosbox-staging-0.77.0/include/dos_system.h --- dosbox-staging-0.76.0/include/dos_system.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/dos_system.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -293,7 +293,7 @@ virtual bool FileExists(const char* name)=0; virtual bool FileStat(const char* name, FileStat_Block * const stat_block)=0; virtual Bit8u GetMediaByte(void)=0; - virtual void SetDir(const char *path) { safe_strcpy(curdir, path); } + virtual void SetDir(const char *path); virtual void EmptyCache() { dirCache.EmptyCache(); } virtual bool isRemote(void)=0; virtual bool isRemovable(void)=0; diff -Nru dosbox-staging-0.76.0/include/drives.h dosbox-staging-0.77.0/include/drives.h --- dosbox-staging-0.76.0/include/drives.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/drives.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -153,7 +153,7 @@ #endif //Forward class imageDisk; -class fatDrive : public DOS_Drive { +class fatDrive final : public DOS_Drive { public: fatDrive(const char * sysFilename, Bit32u bytesector, Bit32u cylsector, Bit32u headscyl, Bit32u cylinders, Bit32u startSector); fatDrive(const fatDrive&) = delete; // prevent copying @@ -216,7 +216,7 @@ Bit32u curFatSect; }; -class cdromDrive : public localDrive +class cdromDrive final : public localDrive { public: cdromDrive(const char _driveLetter, const char * startdir,Bit16u _bytes_sector,Bit8u _sectors_cluster,Bit16u _total_clusters,Bit16u _free_clusters,Bit8u _mediaid, int& error); @@ -314,7 +314,7 @@ #define IS_HIDDEN(fileFlags) (fileFlags & ISO_HIDDEN) #define ISO_MAX_HASH_TABLE_SIZE 100 -class isoDrive : public DOS_Drive { +class isoDrive final : public DOS_Drive { public: isoDrive(char driveLetter, const char* device_name, Bit8u mediaid, int &error); ~isoDrive(); @@ -378,7 +378,7 @@ struct VFILE_Block; -class Virtual_Drive: public DOS_Drive { +class Virtual_Drive final : public DOS_Drive { public: Virtual_Drive(); bool FileOpen(DOS_File * * file,char * name,Bit32u flags); @@ -406,7 +406,7 @@ VFILE_Block * search_file; }; -class Overlay_Drive : public localDrive { +class Overlay_Drive final : public localDrive { public: Overlay_Drive(const char *startdir, const char *overlay, diff -Nru dosbox-staging-0.76.0/include/envelope.h dosbox-staging-0.77.0/include/envelope.h --- dosbox-staging-0.76.0/include/envelope.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/envelope.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team - * Copyright (c) 2019-2020 Kevin R Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2019-2021 Kevin R. Croft * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -54,11 +54,11 @@ * do work. */ +#include "dosbox.h" + #include #include -#include "compiler.h" - class Envelope { public: Envelope(const char* name); @@ -95,7 +95,7 @@ using process_f = std::function; process_f process = &Envelope::Apply; - const char* channel_name = nullptr; + const char *channel_name = nullptr; uint32_t expire_after_frames = 0u; // Stop enveloping when this many // frames have been processed. uint32_t frames_done = 0u; // A tally of processed frames. diff -Nru dosbox-staging-0.76.0/include/fpu.h dosbox-staging-0.77.0/include/fpu.h --- dosbox-staging-0.76.0/include/fpu.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/fpu.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/fs_utils.h dosbox-staging-0.77.0/include/fs_utils.h --- dosbox-staging-0.76.0/include/fs_utils.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/fs_utils.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2019-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,6 +21,8 @@ #ifndef DOSBOX_FS_UTILS_H #define DOSBOX_FS_UTILS_H +#include "config.h" + #include #include diff -Nru dosbox-staging-0.76.0/include/.gitignore dosbox-staging-0.77.0/include/.gitignore --- dosbox-staging-0.76.0/include/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/include/hardware.h dosbox-staging-0.77.0/include/hardware.h --- dosbox-staging-0.76.0/include/hardware.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/hardware.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,10 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_HARDWARE_H #define DOSBOX_HARDWARE_H +#include "dosbox.h" + #include class Section; @@ -39,6 +40,7 @@ void OPL_ShutDown(Section* sec); void CMS_ShutDown(Section* sec); +bool PS1AUDIO_IsEnabled(); bool SB_Get_Address(Bitu& sbaddr, Bitu& sbirq, Bitu& sbdma); bool TS_Get_Address(Bitu& tsaddr, Bitu& tsirq, Bitu& tsdma); @@ -50,9 +52,14 @@ #define CAPTURE_FLAG_DBLH 0x2 void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags, float fps, Bit8u * data, Bit8u * pal); void CAPTURE_AddMidi(bool sysex, Bitu len, Bit8u * data); +void CAPTURE_VideoStart(); +void CAPTURE_VideoStop(); class Config; // Gravis UltraSound configuration and initialization void GUS_AddConfigSection(Config *conf); +// Innovation SSI-2001 configuration and initialization +void INNOVATION_AddConfigSection(Config *conf); + #endif diff -Nru dosbox-staging-0.76.0/include/inout.h dosbox-staging-0.77.0/include/inout.h --- dosbox-staging-0.76.0/include/inout.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/inout.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,10 +19,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_INOUT_H #define DOSBOX_INOUT_H +#include "dosbox.h" + #include #include diff -Nru dosbox-staging-0.76.0/include/ipx.h dosbox-staging-0.77.0/include/ipx.h --- dosbox-staging-0.76.0/include/ipx.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/ipx.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/ipxserver.h dosbox-staging-0.77.0/include/ipxserver.h --- dosbox-staging-0.76.0/include/ipxserver.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/ipxserver.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/joystick.h dosbox-staging-0.77.0/include/joystick.h --- dosbox-staging-0.76.0/include/joystick.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/joystick.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +18,9 @@ #ifndef DOSBOX_JOYSTICK_H #define DOSBOX_JOYSTICK_H + +#include "dosbox.h" + void JOYSTICK_Enable(Bitu which,bool enabled); void JOYSTICK_Button(Bitu which,Bitu num,bool pressed); @@ -34,7 +37,10 @@ float JOYSTICK_GetMove_Y(Bitu which); +void JOYSTICK_ParseConfiguredType(); + enum JoystickType { + JOY_UNSET, JOY_NONE, JOY_AUTO, JOY_2AXIS, @@ -46,4 +52,5 @@ extern JoystickType joytype; extern bool button_wrapping_enabled; + #endif diff -Nru dosbox-staging-0.76.0/include/keyboard.h dosbox-staging-0.77.0/include/keyboard.h --- dosbox-staging-0.76.0/include/keyboard.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/keyboard.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,29 +21,117 @@ enum KBD_KEYS { KBD_NONE, - KBD_1, KBD_2, KBD_3, KBD_4, KBD_5, KBD_6, KBD_7, KBD_8, KBD_9, KBD_0, - KBD_q, KBD_w, KBD_e, KBD_r, KBD_t, KBD_y, KBD_u, KBD_i, KBD_o, KBD_p, - KBD_a, KBD_s, KBD_d, KBD_f, KBD_g, KBD_h, KBD_j, KBD_k, KBD_l, KBD_z, - KBD_x, KBD_c, KBD_v, KBD_b, KBD_n, KBD_m, - KBD_f1, KBD_f2, KBD_f3, KBD_f4, KBD_f5, KBD_f6, KBD_f7, KBD_f8, KBD_f9, KBD_f10,KBD_f11,KBD_f12, - - /*Now the weirder keys */ + KBD_1, + KBD_2, + KBD_3, + KBD_4, + KBD_5, + KBD_6, + KBD_7, + KBD_8, + KBD_9, + KBD_0, + KBD_q, + KBD_w, + KBD_e, + KBD_r, + KBD_t, + KBD_y, + KBD_u, + KBD_i, + KBD_o, + KBD_p, + KBD_a, + KBD_s, + KBD_d, + KBD_f, + KBD_g, + KBD_h, + KBD_j, + KBD_k, + KBD_l, + KBD_z, + KBD_x, + KBD_c, + KBD_v, + KBD_b, + KBD_n, + KBD_m, + KBD_f1, + KBD_f2, + KBD_f3, + KBD_f4, + KBD_f5, + KBD_f6, + KBD_f7, + KBD_f8, + KBD_f9, + KBD_f10, + KBD_f11, + KBD_f12, - KBD_esc,KBD_tab,KBD_backspace,KBD_enter,KBD_space, - KBD_leftalt,KBD_rightalt,KBD_leftctrl,KBD_rightctrl,KBD_leftshift,KBD_rightshift, - KBD_capslock,KBD_scrolllock,KBD_numlock, - - KBD_grave,KBD_minus,KBD_equals,KBD_backslash,KBD_leftbracket,KBD_rightbracket, - KBD_semicolon,KBD_quote,KBD_period,KBD_comma,KBD_slash,KBD_extra_lt_gt, - - KBD_printscreen,KBD_pause, - KBD_insert,KBD_home,KBD_pageup,KBD_delete,KBD_end,KBD_pagedown, - KBD_left,KBD_up,KBD_down,KBD_right, + /*Now the weirder keys */ - KBD_kp1,KBD_kp2,KBD_kp3,KBD_kp4,KBD_kp5,KBD_kp6,KBD_kp7,KBD_kp8,KBD_kp9,KBD_kp0, - KBD_kpdivide,KBD_kpmultiply,KBD_kpminus,KBD_kpplus,KBD_kpenter,KBD_kpperiod, + KBD_esc, + KBD_tab, + KBD_backspace, + KBD_enter, + KBD_space, + KBD_leftalt, + KBD_rightalt, + KBD_leftctrl, + KBD_rightctrl, + KBD_leftgui, + KBD_rightgui, + KBD_leftshift, + KBD_rightshift, + KBD_capslock, + KBD_scrolllock, + KBD_numlock, + + KBD_grave, + KBD_minus, + KBD_equals, + KBD_backslash, + KBD_leftbracket, + KBD_rightbracket, + KBD_semicolon, + KBD_quote, + KBD_period, + KBD_comma, + KBD_slash, + KBD_extra_lt_gt, + + KBD_printscreen, + KBD_pause, + KBD_insert, + KBD_home, + KBD_pageup, + KBD_delete, + KBD_end, + KBD_pagedown, + KBD_left, + KBD_up, + KBD_down, + KBD_right, + + KBD_kp1, + KBD_kp2, + KBD_kp3, + KBD_kp4, + KBD_kp5, + KBD_kp6, + KBD_kp7, + KBD_kp8, + KBD_kp9, + KBD_kp0, + KBD_kpdivide, + KBD_kpmultiply, + KBD_kpminus, + KBD_kpplus, + KBD_kpenter, + KBD_kpperiod, - KBD_LAST }; diff -Nru dosbox-staging-0.76.0/include/logging.h dosbox-staging-0.77.0/include/logging.h --- dosbox-staging-0.76.0/include/logging.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/logging.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/Makefile.am dosbox-staging-0.77.0/include/Makefile.am --- dosbox-staging-0.76.0/include/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -noinst_HEADERS = \ - bios.h \ - bios_disk.h \ - byteorder.h \ - callback.h \ - compiler.h \ - control.h \ - cpu.h \ - cross.h \ - debug.h \ - dma.h \ - dos_inc.h \ - dos_system.h \ - dosbox.h \ - drives.h \ - envelope.h \ - fpu.h \ - fs_utils.h \ - hardware.h \ - inout.h \ - ipx.h \ - ipxserver.h \ - joystick.h \ - keyboard.h \ - logging.h \ - mapper.h \ - mem.h \ - mem_host.h \ - mem_unaligned.h \ - midi.h \ - mixer.h \ - mouse.h \ - paging.h \ - pci_bus.h \ - pic.h \ - programs.h \ - regs.h \ - render.h \ - serialport.h \ - setup.h \ - shell.h \ - soft_limiter.h \ - string_utils.h \ - support.h \ - timer.h \ - types.h \ - vga.h \ - video.h diff -Nru dosbox-staging-0.76.0/include/mapper.h dosbox-staging-0.77.0/include/mapper.h --- dosbox-staging-0.76.0/include/mapper.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/mapper.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,10 +30,27 @@ #include constexpr uint32_t MMOD1 = 0x1; +#define MMOD1_NAME "Ctrl" constexpr uint32_t MMOD2 = 0x2; constexpr uint32_t MMOD3 = 0x4; -typedef void (MAPPER_Handler)(bool pressed); +// Linux, Windows, BSD, etc. +#if !defined(MACOSX) +#define MMOD2_NAME "Alt" +#define MMOD3_NAME "GUI" +#define PRIMARY_MOD MMOD1 +#define PRIMARY_MOD_PAD "" +#define PRIMARY_MOD_NAME MMOD1_NAME +// macOS +#else +#define MMOD2_NAME "Opt" +#define MMOD3_NAME "Cmd" +#define PRIMARY_MOD MMOD3 +#define PRIMARY_MOD_PAD " " +#define PRIMARY_MOD_NAME MMOD3_NAME +#endif + +typedef void(MAPPER_Handler)(bool pressed); /* Associate function handler with a key combination * @@ -48,8 +68,8 @@ const char *event_name, const char *button_name); -void MAPPER_BindKeys(); -void MAPPER_StartUp(Section * sec); +void MAPPER_BindKeys(Section *sec); +void MAPPER_StartUp(Section *sec); void MAPPER_Run(bool pressed); void MAPPER_DisplayUI(); void MAPPER_LosingFocus(); @@ -58,5 +78,6 @@ void MAPPER_AutoType(std::vector &sequence, const uint32_t wait_ms, const uint32_t pacing_ms); +void MAPPER_CheckEvent(SDL_Event *event); #endif diff -Nru dosbox-staging-0.76.0/include/mem.h dosbox-staging-0.77.0/include/mem.h --- dosbox-staging-0.76.0/include/mem.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/mem.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2019-2020 The dosbox-staging team + * Copyright (C) 2019-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,6 +52,8 @@ PhysPt MEM_AllocatePage(); void MEM_ReleasePages(MemHandle handle); bool MEM_ReAllocatePages(MemHandle &handle, Bitu pages, bool sequence); +void MEM_RemoveEMSPageFrame(); +void MEM_PreparePCJRCartRom(); MemHandle MEM_NextHandle(MemHandle handle); MemHandle MEM_NextHandleAt(MemHandle handle, Bitu where); @@ -124,7 +126,7 @@ /* These don't check for alignment, better be sure it's correct */ -void MEM_BlockWrite(PhysPt pt, const void *data, Bitu size); +void MEM_BlockWrite(PhysPt pt, const void *data, size_t size); void MEM_BlockRead(PhysPt pt, void *data, Bitu size); void MEM_BlockCopy(PhysPt dest, PhysPt src, Bitu size); void MEM_StrCopy(PhysPt pt, char *data, Bitu size); diff -Nru dosbox-staging-0.76.0/include/mem_host.h dosbox-staging-0.77.0/include/mem_host.h --- dosbox-staging-0.76.0/include/mem_host.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/mem_host.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/mem_unaligned.h dosbox-staging-0.77.0/include/mem_unaligned.h --- dosbox-staging-0.76.0/include/mem_unaligned.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/mem_unaligned.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/midi.h dosbox-staging-0.77.0/include/midi.h --- dosbox-staging-0.76.0/include/midi.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/midi.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,10 @@ class Program; +extern uint8_t MIDI_evt_len[256]; + +constexpr auto MIDI_SYSEX_SIZE = 8192; + void MIDI_Init(Section *sec); bool MIDI_Available(); void MIDI_ListAll(Program *output_handler); @@ -37,4 +41,8 @@ void FLUID_AddConfigSection(Config *conf); #endif +#if C_MT32EMU +void MT32_AddConfigSection(Config *conf); +#endif + #endif diff -Nru dosbox-staging-0.76.0/include/mixer.h dosbox-staging-0.77.0/include/mixer.h --- dosbox-staging-0.76.0/include/mixer.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/mixer.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,13 +19,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_MIXER_H #define DOSBOX_MIXER_H -#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#endif #include diff -Nru dosbox-staging-0.76.0/include/mouse.h dosbox-staging-0.77.0/include/mouse.h --- dosbox-staging-0.76.0/include/mouse.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/mouse.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,11 +16,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - - #ifndef DOSBOX_MOUSE_H #define DOSBOX_MOUSE_H +#include "dosbox.h" void Mouse_ShowCursor(void); void Mouse_HideCursor(void); @@ -36,7 +35,7 @@ void Mouse_ButtonReleased(Bit8u button); void Mouse_AutoLock(bool enable); -void Mouse_BeforeNewVideoMode(bool setmode); +void Mouse_BeforeNewVideoMode(); void Mouse_AfterNewVideoMode(bool setmode); #endif diff -Nru dosbox-staging-0.76.0/include/ne2000.h dosbox-staging-0.77.0/include/ne2000.h --- dosbox-staging-0.76.0/include/ne2000.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/include/ne2000.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,247 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * Copyright (C) 2008-2010 Ralf Grillenberger + * Copyright (C) 2004-2008 Dean Beeler + * Copyright (C) 2001-2003 Peter Grehan + * Copyright (C) 2001-2003 MandrakeSoft S.A. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// +// An implementation of an ne2000 ISA ethernet adapter. This part uses +// a National Semiconductor DS-8390 ethernet MAC chip, with some h/w +// to provide a windowed memory region for the chip and a MAC address. +// + +#ifndef DOSBOX_NE2000_H +#define DOSBOX_NE2000_H + +#include "dosbox.h" + +#define bx_bool int +#define bx_param_c uint8_t + + +# define BX_NE2K_SMF +# define BX_NE2K_THIS_PTR +# define BX_NE2K_THIS +//#define BX_INFO +//LOG_MSG +//#define BX_DEBUG +//LOG_MSG + +#define BX_NE2K_MEMSIZ (32*1024) +#define BX_NE2K_MEMSTART (16*1024) +#define BX_NE2K_MEMEND (BX_NE2K_MEMSTART + BX_NE2K_MEMSIZ) + +typedef struct { + // + // ne2k register state + + // + // Page 0 + // + // Command Register - 00h read/write + struct CR_t { + bx_bool stop; // STP - Software Reset command + bx_bool start; // START - start the NIC + bx_bool tx_packet; // TXP - initiate packet transmission + uint8_t rdma_cmd; // RD0,RD1,RD2 - Remote DMA command + uint8_t pgsel; // PS0,PS1 - Page select + } CR; + // Interrupt Status Register - 07h read/write + struct ISR_t { + bx_bool pkt_rx; // PRX - packet received with no errors + bx_bool pkt_tx; // PTX - packet transmitted with no errors + bx_bool rx_err; // RXE - packet received with 1 or more errors + bx_bool tx_err; // TXE - packet tx'd " " " " " + bx_bool overwrite; // OVW - rx buffer resources exhausted + bx_bool cnt_oflow; // CNT - network tally counter MSB's set + bx_bool rdma_done; // RDC - remote DMA complete + bx_bool reset; // RST - reset status + } ISR; + // Interrupt Mask Register - 0fh write + struct IMR_t { + bx_bool rx_inte; // PRXE - packet rx interrupt enable + bx_bool tx_inte; // PTXE - packet tx interrput enable + bx_bool rxerr_inte; // RXEE - rx error interrupt enable + bx_bool txerr_inte; // TXEE - tx error interrupt enable + bx_bool overw_inte; // OVWE - overwrite warn int enable + bx_bool cofl_inte; // CNTE - counter o'flow int enable + bx_bool rdma_inte; // RDCE - remote DMA complete int enable + bx_bool reserved; // D7 - reserved + } IMR; + // Data Configuration Register - 0eh write + struct DCR_t { + bx_bool wdsize; // WTS - 8/16-bit select + bx_bool endian; // BOS - byte-order select + bx_bool longaddr; // LAS - long-address select + bx_bool loop; // LS - loopback select + bx_bool auto_rx; // AR - auto-remove rx packets with remote DMA + uint8_t fifo_size; // FT0,FT1 - fifo threshold + } DCR; + // Transmit Configuration Register - 0dh write + struct TCR_t { + bx_bool crc_disable; // CRC - inhibit tx CRC + uint8_t loop_cntl; // LB0,LB1 - loopback control + bx_bool ext_stoptx; // ATD - allow tx disable by external mcast + bx_bool coll_prio; // OFST - backoff algorithm select + uint8_t reserved; // D5,D6,D7 - reserved + } TCR; + // Transmit Status Register - 04h read + struct TSR_t { + bx_bool tx_ok; // PTX - tx complete without error + bx_bool reserved; // D1 - reserved + bx_bool collided; // COL - tx collided >= 1 times + bx_bool aborted; // ABT - aborted due to excessive collisions + bx_bool no_carrier; // CRS - carrier-sense lost + bx_bool fifo_ur; // FU - FIFO underrun + bx_bool cd_hbeat; // CDH - no tx cd-heartbeat from transceiver + bx_bool ow_coll; // OWC - out-of-window collision + } TSR; + // Receive Configuration Register - 0ch write + struct RCR_t { + bx_bool errors_ok; // SEP - accept pkts with rx errors + bx_bool runts_ok; // AR - accept < 64-byte runts + bx_bool broadcast; // AB - accept eth broadcast address + bx_bool multicast; // AM - check mcast hash array + bx_bool promisc; // PRO - accept all packets + bx_bool monitor; // MON - check pkts, but don't rx + uint8_t reserved; // D6,D7 - reserved + } RCR; + // Receive Status Register - 0ch read + struct RSR_t { + bx_bool rx_ok; // PRX - rx complete without error + bx_bool bad_crc; // CRC - Bad CRC detected + bx_bool bad_falign; // FAE - frame alignment error + bx_bool fifo_or; // FO - FIFO overrun + bx_bool rx_missed; // MPA - missed packet error + bx_bool rx_mbit; // PHY - unicast or mcast/bcast address match + bx_bool rx_disabled; // DIS - set when in monitor mode + bx_bool deferred; // DFR - collision active + } RSR; + + uint16_t local_dma; // 01,02h read ; current local DMA addr + uint8_t page_start; // 01h write ; page start register + uint8_t page_stop; // 02h write ; page stop register + uint8_t bound_ptr; // 03h read/write ; boundary pointer + uint8_t tx_page_start; // 04h write ; transmit page start register + uint8_t num_coll; // 05h read ; number-of-collisions register + uint16_t tx_bytes; // 05,06h write ; transmit byte-count register + uint8_t fifo; // 06h read ; FIFO + uint16_t remote_dma; // 08,09h read ; current remote DMA addr + uint16_t remote_start; // 08,09h write ; remote start address register + uint16_t remote_bytes; // 0a,0bh write ; remote byte-count register + uint8_t tallycnt_0; // 0dh read ; tally counter 0 (frame align errors) + uint8_t tallycnt_1; // 0eh read ; tally counter 1 (CRC errors) + uint8_t tallycnt_2; // 0fh read ; tally counter 2 (missed pkt errors) + + // + // Page 1 + // + // Command Register 00h (repeated) + // + uint8_t physaddr[6]; // 01-06h read/write ; MAC address + uint8_t curr_page; // 07h read/write ; current page register + uint8_t mchash[8]; // 08-0fh read/write ; multicast hash array + + // + // Page 2 - diagnostic use only + // + // Command Register 00h (repeated) + // + // Page Start Register 01h read (repeated) + // Page Stop Register 02h read (repeated) + // Current Local DMA Address 01,02h write (repeated) + // Transmit Page start address 04h read (repeated) + // Receive Configuration Register 0ch read (repeated) + // Transmit Configuration Register 0dh read (repeated) + // Data Configuration Register 0eh read (repeated) + // Interrupt Mask Register 0fh read (repeated) + // + uint8_t rempkt_ptr; // 03h read/write ; remote next-packet pointer + uint8_t localpkt_ptr; // 05h read/write ; local next-packet pointer + uint16_t address_cnt; // 06,07h read/write ; address counter + + // + // Page 3 - should never be modified. + // + + // Novell ASIC state + uint8_t macaddr[32]; // ASIC ROM'd MAC address, even bytes + uint8_t mem[BX_NE2K_MEMSIZ]; // on-chip packet memory + + // ne2k internal state + uint32_t base_address; + int base_irq; + int tx_timer_index; + int tx_timer_active; +} bx_ne2k_t; + + + +class bx_ne2k_c { +public: + bx_ne2k_c(void); + virtual ~bx_ne2k_c(void); + virtual void init(void); + virtual void reset(unsigned type); + +public: + bx_ne2k_t s; + + /* TODO: Setup SDL */ + //eth_pktmover_c *ethdev; + + BX_NE2K_SMF uint32_t read_cr(void); + BX_NE2K_SMF void write_cr(uint32_t value); + + BX_NE2K_SMF uint32_t chipmem_read(uint32_t address, unsigned int io_len); + BX_NE2K_SMF uint32_t asic_read(uint32_t offset, unsigned int io_len); + BX_NE2K_SMF uint32_t page0_read(uint32_t offset, unsigned int io_len); + BX_NE2K_SMF uint32_t page1_read(uint32_t offset, unsigned int io_len); + BX_NE2K_SMF uint32_t page2_read(uint32_t offset, unsigned int io_len); + BX_NE2K_SMF uint32_t page3_read(uint32_t offset, unsigned int io_len); + + BX_NE2K_SMF void chipmem_write(uint32_t address, uint32_t value, unsigned io_len); + BX_NE2K_SMF void asic_write(uint32_t address, uint32_t value, unsigned io_len); + BX_NE2K_SMF void page0_write(uint32_t address, uint32_t value, unsigned io_len); + BX_NE2K_SMF void page1_write(uint32_t address, uint32_t value, unsigned io_len); + BX_NE2K_SMF void page2_write(uint32_t address, uint32_t value, unsigned io_len); + BX_NE2K_SMF void page3_write(uint32_t address, uint32_t value, unsigned io_len); + +public: + static void tx_timer_handler(void *); + BX_NE2K_SMF void tx_timer(void); + + //static void rx_handler(void *arg, const void *buf, unsigned len); + BX_NE2K_SMF unsigned mcast_index(const void *dst); + BX_NE2K_SMF void rx_frame(const void *buf, unsigned io_len); + + + static uint32_t read_handler(void *this_ptr, uint32_t address, unsigned io_len); + static void write_handler(void *this_ptr, uint32_t address, uint32_t value, unsigned io_len); +#if !BX_USE_NE2K_SMF + uint32_t read(uint32_t address, unsigned io_len); + void write(uint32_t address, uint32_t value, unsigned io_len); +#endif + + +}; + +#endif diff -Nru dosbox-staging-0.76.0/include/paging.h dosbox-staging-0.77.0/include/paging.h --- dosbox-staging-0.76.0/include/paging.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/paging.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/pci_bus.h dosbox-staging-0.77.0/include/pci_bus.h --- dosbox-staging-0.76.0/include/pci_bus.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/pci_bus.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/pic.h dosbox-staging-0.77.0/include/pic.h --- dosbox-staging-0.76.0/include/pic.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/pic.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/programs.h dosbox-staging-0.77.0/include/programs.h --- dosbox-staging-0.76.0/include/programs.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/programs.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,26 +16,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_PROGRAMS_H #define DOSBOX_PROGRAMS_H -#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#endif -#ifndef DOSBOX_DOS_INC_H -#include "dos_inc.h" -#endif -#ifndef CH_LIST -#define CH_LIST #include -#endif - -#ifndef CH_STRING -#define CH_STRING #include -#endif + +#include "dos_inc.h" class CommandLine { public: diff -Nru dosbox-staging-0.76.0/include/regs.h dosbox-staging-0.77.0/include/regs.h --- dosbox-staging-0.76.0/include/regs.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/regs.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/render.h dosbox-staging-0.77.0/include/render.h --- dosbox-staging-0.76.0/include/render.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/render.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/rwqueue.h dosbox-staging-0.77.0/include/rwqueue.h --- dosbox-staging-0.76.0/include/rwqueue.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/include/rwqueue.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DOSBOX_RWQUEUE_H +#define DOSBOX_RWQUEUE_H + +#include "dosbox.h" + +#include +#include +#include + +template +class RWQueue { +private: + std::deque queue{}; // faster than: vector, queue, and list + std::mutex mutex = {}; + std::condition_variable has_room = {}; + std::condition_variable has_items = {}; + const size_t capacity = 0; + +public: + RWQueue() = delete; + RWQueue(const RWQueue &other) = delete; + RWQueue &operator=(const RWQueue &other) = delete; + + RWQueue(size_t queue_capacity); + + bool IsEmpty(); + size_t Size(); + size_t MaxCapacity() const; + + void Enqueue(const T &item); + void Enqueue(T &&item); // item will be empty (moved-out) after call + T Dequeue(); +}; + +#endif diff -Nru dosbox-staging-0.76.0/include/serialport.h dosbox-staging-0.77.0/include/serialport.h --- dosbox-staging-0.76.0/include/serialport.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/serialport.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,16 +16,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_SERIALPORT_H #define DOSBOX_SERIALPORT_H +#include "dosbox.h" + #include #include -#ifndef DOSBOX_DOSBOX_H -#include "dosbox.h" -#endif #ifndef DOSBOX_INOUT_H #include "inout.h" #endif @@ -51,7 +49,7 @@ #endif // Serial port interface - +#define SERIAL_IO_HANDLERS 8 #define SERIAL_MAX_FIFO_SIZE 256 /* Note: Almost all DOS-era universal asynchronous receiver-transmitter * (UART)'s permitted up to a 16-byte receive and transmit @@ -175,8 +173,8 @@ CSerial(const uint8_t port_idx, CommandLine *cmd); virtual ~CSerial(); - IO_ReadHandleObject ReadHandler[8]; - IO_WriteHandleObject WriteHandler[8]; + IO_ReadHandleObject ReadHandler[SERIAL_IO_HANDLERS]; + IO_WriteHandleObject WriteHandler[SERIAL_IO_HANDLERS]; float bytetime = 0.0f; // how long a byte takes to transmit/receive in // milliseconds @@ -465,7 +463,7 @@ // the COM devices -class device_COM : public DOS_Device { +class device_COM final : public DOS_Device { public: device_COM(const device_COM &) = delete; // prevent copying device_COM &operator=(const device_COM &) = delete; // prevent assignment diff -Nru dosbox-staging-0.76.0/include/setup.h dosbox-staging-0.77.0/include/setup.h --- dosbox-staging-0.76.0/include/setup.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/setup.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,13 +22,19 @@ #ifndef DOSBOX_SETUP_H #define DOSBOX_SETUP_H +#include "dosbox.h" + #include +#include #include #include #include +#include #include -#include "support.h" +using parse_environ_result_t = std::list>; + +parse_environ_result_t parse_environ(const char * const * envp) noexcept; class Hex { private: @@ -135,15 +144,7 @@ const std::string propname; - Property(const std::string &name, Changeable::Value when) - : propname(name), - value(), - suggested_values{}, - default_value(), - change(when) - { - assertm(!name.empty(), "Property name can't be empty."); - } + Property(const std::string &name, Changeable::Value when); virtual ~Property() = default; @@ -184,7 +185,7 @@ const Changeable::Value change; }; -class Prop_int : public Property { +class Prop_int final : public Property { public: Prop_int(const std::string &name, Changeable::Value when, int val) : Property(name, when), @@ -220,7 +221,7 @@ Value max_value; }; -class Prop_double:public Property { +class Prop_double final : public Property { public: Prop_double(std::string const & _propname, Changeable::Value when, double _value) :Property(_propname,when){ @@ -230,7 +231,7 @@ ~Prop_double(){ } }; -class Prop_bool:public Property { +class Prop_bool final : public Property { public: Prop_bool(std::string const& _propname, Changeable::Value when, bool _value) :Property(_propname,when) { @@ -256,7 +257,7 @@ bool CheckValue(const Value &in, bool warn) override; }; -class Prop_path : public Prop_string { +class Prop_path final : public Prop_string { public: Prop_path(const std::string &name, Changeable::Value when, const char *val) : Prop_string(name, when, val), @@ -270,7 +271,7 @@ std::string realpath; }; -class Prop_hex:public Property { +class Prop_hex final : public Property { public: Prop_hex(std::string const& _propname, Changeable::Value when, Hex _value) :Property(_propname,when) { @@ -282,32 +283,39 @@ #define NO_SUCH_PROPERTY "PROP_NOT_EXIST" +typedef void (*SectionFunction)(Section *); + class Section { private: - typedef void (*SectionFunction)(Section*); - /* Wrapper class around startup and shutdown functions. the variable - * canchange indicates it can be called on configuration changes */ + * changeable_at_runtime indicates it can be called on configuration + * changes */ struct Function_wrapper { SectionFunction function; - bool canchange; + bool changeable_at_runtime; Function_wrapper(SectionFunction const fn, bool ch) : function(fn), - canchange(ch) + changeable_at_runtime(ch) {} }; - std::list initfunctions = {}; - std::list destroyfunctions = {}; + std::deque early_init_functions = {}; + std::deque initfunctions = {}; + std::deque destroyfunctions = {}; std::string sectionname; public: Section(const std::string &name) : sectionname(name) {} virtual ~Section() = default; // Children must call executedestroy! - void AddInitFunction(SectionFunction func, bool canchange = false); - void AddDestroyFunction(SectionFunction func, bool canchange = false); + void AddEarlyInitFunction(SectionFunction func, + bool changeable_at_runtime = false); + void AddInitFunction(SectionFunction func, bool changeable_at_runtime = false); + void AddDestroyFunction(SectionFunction func, + bool changeable_at_runtime = false); + + void ExecuteEarlyInit(bool initall = true); void ExecuteInit(bool initall=true); void ExecuteDestroy(bool destroyall=true); const char* GetName() const {return sectionname.c_str();} @@ -320,11 +328,11 @@ class Prop_multival; class Prop_multival_remain; -class Section_prop : public Section { +class Section_prop final : public Section { private: - std::list properties = {}; - typedef std::list::iterator it; - typedef std::list::const_iterator const_it; + std::deque properties = {}; + typedef std::deque::iterator it; + typedef std::deque::const_iterator const_it; public: Section_prop(const std::string &name) : Section(name) {} @@ -382,14 +390,14 @@ const std::vector &GetValues() const override; }; -class Prop_multival_remain:public Prop_multival{ +class Prop_multival_remain final : public Prop_multival{ public: Prop_multival_remain(std::string const& _propname, Changeable::Value when,std::string const& sep):Prop_multival(_propname,when,sep){ } virtual bool SetValue(std::string const& input); }; -class Section_line : public Section { +class Section_line final : public Section { public: Section_line(std::string const &name) : Section(name), data() {} diff -Nru dosbox-staging-0.76.0/include/shell.h dosbox-staging-0.77.0/include/shell.h --- dosbox-staging-0.76.0/include/shell.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/shell.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,21 +16,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_SHELL_H #define DOSBOX_SHELL_H -#include -#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#endif + +#include +#include +#include + #ifndef DOSBOX_PROGRAMS_H #include "programs.h" #endif -#include -#include - #define CMD_MAXLINE 4096 #define CMD_MAXCMDS 20 #define CMD_OLDSIZE 4096 @@ -50,36 +48,39 @@ virtual ~BatchFile(); virtual bool ReadLine(char * line); bool Goto(char * where); - void Shift(void); - Bit16u file_handle; - Bit32u location; - bool echo; - DOS_Shell * shell; - BatchFile * prev; - CommandLine * cmd; - std::string filename; + void Shift(); + uint16_t file_handle = 0; + uint32_t location = 0; + bool echo = false; + DOS_Shell *shell = nullptr; + BatchFile *prev = nullptr; + CommandLine *cmd = nullptr; + std::string filename{}; }; class AutoexecEditor; -class DOS_Shell : public Program { +class DOS_Shell final : public Program { private: friend class AutoexecEditor; - std::list l_history, l_completion; + std::list l_history{}; + std::list l_completion{}; + + char *completion_start = nullptr; + uint16_t completion_index = 0; - char *completion_start; - Bit16u completion_index; - public: DOS_Shell(); + ~DOS_Shell() override; DOS_Shell(const DOS_Shell&) = delete; // prevent copy DOS_Shell& operator=(const DOS_Shell&) = delete; // prevent assignment - void Run(void); - void RunInternal(void); //for command /C -/* A load of subfunctions */ + void Run() override; + void RunInternal(); // for command /C + /* A load of subfunctions */ void ParseLine(char * line); Bitu GetRedirection(char *s, char **ifn, char **ofn,bool * append); void InputCommand(char * line); + void ProcessCmdLineEnvVarStitution(char *line); void ShowPrompt(); void DoCommand(char * cmd); bool Execute(char * name,char * args); @@ -109,7 +110,7 @@ void CMD_REM(char * args); void CMD_RENAME(char * args); void CMD_CALL(char * args); - void SyntaxError(void); + void SyntaxError(); void CMD_PAUSE(char * args); void CMD_SUBST(char* args); void CMD_LOADHIGH(char* args); @@ -120,18 +121,17 @@ void CMD_VER(char * args); void CMD_LS(char *args); /* The shell's variables */ - Bit16u input_handle; - BatchFile * bf; - bool echo; - bool exit_flag; - bool call; + uint16_t input_handle = 0; + BatchFile *bf = nullptr; + bool echo = false; + bool call = false; }; struct SHELL_Cmd { - const char * name; /* Command name*/ - Bit32u flags; /* Flags about the command */ - void (DOS_Shell::*handler)(char * args); /* Handler for this command */ - const char * help; /* String with command help */ + const char *name = nullptr; /* Command name*/ + uint32_t flags = 0; /* Flags about the command */ + void (DOS_Shell::*handler)(char *args); /* Handler for this command */ + const char *help = nullptr; /* String with command help */ }; /* Object to manage lines in the autoexec.bat The lines get removed from @@ -139,8 +139,9 @@ * as well if the line set a a variable */ class AutoexecObject{ private: - bool installed; - std::string buf; + bool installed = false; + std::string buf{}; + public: AutoexecObject() : installed(false), @@ -150,7 +151,7 @@ void InstallBefore(std::string const &in); ~AutoexecObject(); private: - void CreateAutoexec(void); + void CreateAutoexec(); }; #endif diff -Nru dosbox-staging-0.76.0/include/soft_limiter.h dosbox-staging-0.77.0/include/soft_limiter.h --- dosbox-staging-0.76.0/include/soft_limiter.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/soft_limiter.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 Kevin R Croft - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 Kevin R. Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,11 +22,19 @@ #ifndef DOSBOX_SOFT_LIMITER_H #define DOSBOX_SOFT_LIMITER_H +#include "dosbox.h" + +#include +#include +#include + +#include "mixer.h" + /* Zero-Latency Soft Limiter ------------------------- -Given an input array of floats, the Soft Limiter scales sequences that -exceed the bounds of a standard 16-bit signal. +Given an input vector of floats, the Soft Limiter scales sequences that +exceed the bounds of a signed 16-bit signal. This scale-down effect continues to be applied to subsequent sequences, each time with less effect (provided even greater peaks aren't detected), @@ -41,10 +49,10 @@ - Left and right channels are independently handled - Zero-latency: it does not require a pre-buffer or aprior knowledge to - perform seamless scaling both on the front-end and back-end of the signal + perform seamless scaling both on the front and back-end of the signal - - Permits a pre-scaling factor be applied to the 32-bit float source samples - before detection and scaling (performed on-the-fly without pre-pass). + - Permits a pre-scaling factor be applied to the input samples + before peak detection and scaling (see UpdateLevels). - Informs the user if the source signal was significantly under the allowed bounds in which case it suggests a suitable scale-up factor, or if excessive @@ -60,388 +68,92 @@ Use: -Instantiate the Soft Limiter template object with the maximum number of frames -you plan to pass it. Construct it with the name of the channel that's being -operated on and prescalar frames (one frame = left and right samples) in a given -sequence of audio. For example: - - AudioFrame prescale = {1.0f, 1.0f}; - SoftLimiter<48> limiter("channel name", prescale); +Instantiate the Soft Limiter object with the name of the channel that's +being operated on, for example: + SoftLimiter limiter("channel name"); You can then repeatedly call: - const auto out_array = limiter.Apply(in_array, num_frames); + limiter.Process(in, num_frames, out); Where: - - in_array is a std::array - - num_frames is some number of frames from zero up to 48. - - out_array is a const reference to std::array - -The limiter will either copy or scale-limit num_frames into the out_array. - -The PrintStats function will make mixer suggestions if the in_array samples were -either significantly under or over the allowed bounds for the entire playback -duration. + - 'in' is a std::vector + - 'num_frames' is some number of frames from zero up the maximum + previously passed into the Soft Limiter's constructor + - 'out' is a a std::vector of samples (num_frames * 2). + +The limiter will either copy or soft-limit num_frames into the out vector. + +The PrintStats function will indicate the peak amplitude as a percent +of the allow maximum detected during the entire processing period. It +will also provide mixer-level suggestions if the peak samples was +significantly below the maximum or if a significant percent of the overall +sequence required limiting. */ -#include "dosbox.h" -#include "logging.h" -#include "mixer.h" -#include "support.h" - -#include -#include -#include -#include -#include -#include - -template class SoftLimiter { public: - SoftLimiter(const std::string &name, const AudioFrame &scale); + using in_iterator_t = typename std::vector::const_iterator; // Prevent default object construction, copy, and assignment SoftLimiter() = delete; - SoftLimiter(const SoftLimiter &) = delete; - SoftLimiter &operator=(const SoftLimiter &) = delete; + SoftLimiter(const SoftLimiter &) = delete; + SoftLimiter &operator=(const SoftLimiter &) = delete; - constexpr static size_t array_samples = array_frames * 2; // 2 for stereo - using in_array_t = std::array; - using out_array_t = std::array; + SoftLimiter(const std::string &name); - const out_array_t &Apply(const in_array_t &in, uint16_t frames) noexcept; + void Process(const std::vector &in, + uint16_t req_frames, + std::vector &out) noexcept; const AudioFrame &GetPeaks() const noexcept { return global_peaks; } void PrintStats() const; void Reset() noexcept; + void UpdateLevels(const AudioFrame &desired_levels, float desired_multiplier); private: - using in_array_iterator_t = typename std::array::const_iterator; - using out_array_iterator_t = typename std::array::iterator; - using out_limits = std::numeric_limits; - - void FindPeaksAndZeroCrosses(const in_array_t &stream, uint16_t frames) noexcept; - - void FindPeakAndCross(const in_array_iterator_t in_end, - const in_array_iterator_t pos, - in_array_iterator_t &prev_pos, - const float prescalar, - float &local_peak, - in_array_iterator_t &precross_peak_pos, - in_array_iterator_t &zero_cross_pos, - float &global_peak) noexcept; - - void LinearScale(in_array_iterator_t in_pos, - const in_array_iterator_t in_end, - out_array_iterator_t out_pos, - const float scalar) noexcept; - - void PolyFit(in_array_iterator_t in_pos, - const in_array_iterator_t in_end, - out_array_iterator_t out_pos, - const float prescalar, - const float poly_a, - const float poly_b) noexcept; + using out_iterator_t = typename std::vector::iterator; + + void FindPeaksAndZeroCrosses(const std::vector &in, + in_iterator_t &precross_peak_pos_left, + in_iterator_t &precross_peak_pos_right, + in_iterator_t &zero_cross_left, + in_iterator_t &zero_cross_right, + uint16_t samples) noexcept; + + void LinearScale(in_iterator_t in_pos, + in_iterator_t in_end, + out_iterator_t out_pos, + float scalar) const noexcept; + + void PolyFit(in_iterator_t in_pos, + in_iterator_t in_end, + out_iterator_t out_pos, + float prescalar, + float poly_a, + float poly_b) const noexcept; void Release() noexcept; - void SaveTailFrame(const uint16_t frames) noexcept; + void SaveTailFrame(uint16_t req_frames, + const std::vector &out) noexcept; - template - void ScaleOrCopy(const in_array_t &in, - const size_t samples, - const float prescalar, - const in_array_iterator_t precross_peak_pos, - const in_array_iterator_t zero_cross_pos, - const float global_peak, - const float tail); - - // Const members - constexpr static size_t left = 0; - constexpr static size_t right = 1; - constexpr static float bounds = static_cast(out_limits::max() - 1); + template + void ScaleOrCopy(const std::vector &in, + uint16_t samples, + float prescalar, + in_iterator_t precross_peak_pos, + in_iterator_t zero_cross_pos, + float global_peak, + float tail, + std::vector &out); // Mutable members - out_array_t out{}; std::string channel_name = {}; - const AudioFrame &prescale; // values inside struct are mutable - in_array_iterator_t zero_cross_left = {}; - in_array_iterator_t zero_cross_right = {}; - in_array_iterator_t precross_peak_pos_left = {}; - in_array_iterator_t precross_peak_pos_right = {}; + std::atomic prescale = {}; AudioFrame global_peaks = {0, 0}; AudioFrame tail_frame = {0, 0}; - int limited_ms = 0; - int non_limited_ms = 0; + float range_multiplier = 1.0f; + int limited_tally = 0; + int non_limited_tally = 0; }; -template -SoftLimiter::SoftLimiter(const std::string &name, const AudioFrame &scale) - : channel_name(name), - prescale(scale) -{ - static_assert(array_frames > 0, "need some quantity of frames"); - static_assert(array_frames < 16385, "consider using a smaller sequence"); -} - -// Applies the Soft Limiter to the given input sequence and returns the results -// as a reference to a std::array of 16-bit ints the same length as the input. -template -const typename SoftLimiter::out_array_t &SoftLimiter::Apply( - const in_array_t &in, const uint16_t frames) noexcept -{ - // Ensure the buffers are large enough to handle the request - const uint16_t samples = frames * 2; // left and right channels - assert(samples <= in.size()); - - FindPeaksAndZeroCrosses(in, samples); - - // Given the local peaks found in each side channel, scale or copy the - // input array into the output array - ScaleOrCopy(in, samples, prescale.left, precross_peak_pos_left, - zero_cross_left, global_peaks.left, tail_frame.left); - - ScaleOrCopy(in, samples, prescale.right, precross_peak_pos_right, - zero_cross_right, global_peaks.right, tail_frame.right); - - SaveTailFrame(frames); - Release(); - return out; -} - -// Helper function to evaluate the existing peaks and prior values. -// Saves new local and global peaks, and the input-array iterator of any new -// peaks before the first zero-crossing, along with the first zero-crossing -// position. -template -void SoftLimiter::FindPeakAndCross(const in_array_iterator_t in_end, - const in_array_iterator_t pos, - in_array_iterator_t &prev_pos, - const float prescalar, - float &local_peak, - in_array_iterator_t &precross_peak_pos, - in_array_iterator_t &zero_cross_pos, - float &global_peak) noexcept -{ - const auto val = fabsf(*pos) * prescalar; - if (val > bounds && val > local_peak) { - local_peak = val; - if (zero_cross_pos == in_end) { - precross_peak_pos = pos; - } - } - if (val > global_peak) { - global_peak = val; - } - // Detect and save the first zero-crossing position (if any) - if (zero_cross_pos == in_end && prev_pos != in_end && - std::signbit(*prev_pos) != std::signbit(*pos)) { - zero_cross_pos = pos; - } - prev_pos = pos; -} - -// Sequentially scans the input channels to find new peaks, their positions, and -// the first zero crossings (saved in member variables). -template -void SoftLimiter::FindPeaksAndZeroCrosses(const in_array_t &in, - const uint16_t samples) noexcept -{ - auto pos = in.begin(); - const auto pos_end = in.begin() + samples; - - precross_peak_pos_left = in.end(); - precross_peak_pos_right = in.end(); - zero_cross_left = in.end(); - zero_cross_right = in.end(); - in_array_iterator_t prev_pos_left = in.end(); - in_array_iterator_t prev_pos_right = in.end(); - AudioFrame local_peaks = global_peaks; - - while (pos != pos_end) { - FindPeakAndCross(in.end(), pos++, prev_pos_left, prescale.left, - local_peaks.left, precross_peak_pos_left, - zero_cross_left, global_peaks.left); - - FindPeakAndCross(in.end(), pos++, prev_pos_right, prescale.right, - local_peaks.right, precross_peak_pos_right, - zero_cross_right, global_peaks.right); - } -} - -// Scale or copy the given channel's samples into the output array -template -template -void SoftLimiter::ScaleOrCopy(const in_array_t &in, - const size_t samples, - const float prescalar, - const in_array_iterator_t precross_peak_pos, - const in_array_iterator_t zero_cross_pos, - const float global_peak, - const float tail) -{ - assert(samples >= 2); // need at least one frame - auto in_start = in.begin() + channel; - const auto in_end = in.begin() + channel + samples; - auto out_start = out.begin() + channel; - - // We have a new peak, so ... - if (precross_peak_pos != in.end()) { - const auto tail_abs = fabsf(tail); - const auto prepeak_scalar = (bounds - tail_abs) / - (prescalar * fabsf(*precross_peak_pos) - - tail_abs); - // fit the frontside of the waveform to the tail up to the peak. - PolyFit(in_start, precross_peak_pos, out_start, prescalar, - prepeak_scalar, tail); - - // Then scale the backend of the waveform from its peak ... - out_start = out.begin() + (precross_peak_pos - in.begin()); - const auto postpeak_scalar = bounds / fabsf(*precross_peak_pos); - // down to the zero-crossing ... - if (zero_cross_pos != in.end()) { - LinearScale(precross_peak_pos, zero_cross_pos, - out_start, postpeak_scalar); - - // and from the zero-crossing to the end of the sequence. - out_start = out.begin() + (zero_cross_pos - in.begin()); - const auto postcross_scalar = prescalar * bounds / global_peak; - LinearScale(zero_cross_pos, in_end, out_start, - postcross_scalar); - } - // down to the end of the sequence. - else { - LinearScale(precross_peak_pos, in_end, out_start, - postpeak_scalar); - } - limited_ms++; - - // We have an existing peak ... - } else if (global_peak > bounds) { - // so scale the entire sequence a a ratio of the peak. - const auto current_scalar = prescalar * bounds / global_peak; - LinearScale(in_start, in_end, out_start, current_scalar); - limited_ms++; - - // The current sequence is fully inbounds ... - } else { - // so simply prescale the entire sequence. - LinearScale(in_start, in_end, out_start, prescalar); - ++non_limited_ms; - } -} - -// Apply the polynomial coefficients to the sequence -template -void SoftLimiter::PolyFit(in_array_iterator_t in_pos, - const in_array_iterator_t in_end, - out_array_iterator_t out_pos, - const float prescalar, - const float poly_a, - const float poly_b) noexcept -{ - while (in_pos != in_end) { - const auto fitted = poly_a * (*in_pos * prescalar - poly_b) + poly_b; - assert(fabsf(fitted) <= out_limits::max()); - *out_pos = static_cast(fitted); - out_pos += 2; - in_pos += 2; - } -} - -// Apply the scalar to the sequence -template -void SoftLimiter::LinearScale(in_array_iterator_t in_pos, - const in_array_iterator_t in_end, - out_array_iterator_t out_pos, - const float scalar) noexcept -{ - while (in_pos != in_end) { - const auto scaled = (*in_pos) * scalar; - assert(fabsf(scaled) <= out_limits::max()); - *out_pos = static_cast(scaled); - out_pos += 2; - in_pos += 2; - } -} - -template -void SoftLimiter::SaveTailFrame(const uint16_t frames) noexcept -{ - const size_t i = (frames - 1) * 2; - tail_frame.left = static_cast(out[i]); - tail_frame.right = static_cast(out[i + 1]); -} - -// If either channel was out of bounds, then decrement their peak -template -void SoftLimiter::Release() noexcept -{ - // Decrement the peak(s) one step - constexpr float delta_db = 0.002709201f; // 0.0235 dB increments - constexpr float release_amplitude = bounds * delta_db; - if (global_peaks.left > bounds) - global_peaks.left -= release_amplitude; - if (global_peaks.right > bounds) - global_peaks.right -= release_amplitude; -} - -// Print helpful statistics about the signal thus-far -template -void SoftLimiter::PrintStats() const -{ - // Only print information if we have more than 30 seconds of data - constexpr auto ms_per_minute = 1000 * 60; - const auto ms_total = static_cast(limited_ms) + non_limited_ms; - const auto minutes_total = ms_total / ms_per_minute; - if (minutes_total < 0.5) - return; - - // Only print information if there was at least some amplitude - const auto peak_sample = std::max(global_peaks.left, global_peaks.right); - constexpr auto two_percent_of_max = 0.02f * bounds; - if (peak_sample < two_percent_of_max) - return; - - // Inform the user what percent of the dynamic-range was used - auto peak_ratio = peak_sample / bounds; - peak_ratio = std::min(peak_ratio, 1.0f); - LOG_MSG("%s: Peak amplitude reached %.0f%% of max", - channel_name.c_str(), 100 * static_cast(peak_ratio)); - - // Inform when the stream fell short of using the full dynamic-range - const auto scale = std::max(prescale.left, prescale.right); - constexpr auto well_below_3db = 0.6f; - if (peak_ratio < well_below_3db) { - const auto suggested_mix_val = 100 * scale / peak_ratio; - LOG_MSG("%s: If it should be louder, use: mixer %s %.0f", - channel_name.c_str(), channel_name.c_str(), - static_cast(suggested_mix_val)); - } - // Inform if more than 20% of the stream required limiting - const auto time_ratio = limited_ms / (ms_total + 1); // one ms avoids div-by-0 - if (time_ratio > 0.2) { - const auto minutes_limited = static_cast(limited_ms) / ms_per_minute; - const auto suggested_mix_val = 100 * (1 - time_ratio) * - static_cast(scale); - LOG_MSG("%s: %.1f%% or %.2f of %.2f minutes needed limiting, consider: mixer %s %.0f", - channel_name.c_str(), 100 * time_ratio, minutes_limited, - minutes_total, channel_name.c_str(), suggested_mix_val); - } -} - -// A paused audio source should Reset() the limiter so it starts with -// fresh peaks and a zero-tail if/when the stream is restarted. -template -void SoftLimiter::Reset() noexcept -{ - // if the current peaks are over the upper bounds, then we simply save - // the upper bound because we want retain information about the peak - // amplitude when printing statistics. - - constexpr auto upper = bounds; // (workaround to prevent link-errors) - global_peaks.left = std::min(global_peaks.left, upper); - global_peaks.right = std::min(global_peaks.right, upper); - tail_frame = {0, 0}; -} - #endif diff -Nru dosbox-staging-0.76.0/include/string_utils.h dosbox-staging-0.77.0/include/string_utils.h --- dosbox-staging-0.76.0/include/string_utils.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/string_utils.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2019-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,9 +21,66 @@ #ifndef DOSBOX_STRING_UTILS_H #define DOSBOX_STRING_UTILS_H +#include "dosbox.h" + +#include +#include #include #include +/* Copy a string into C array + * + * This function copies string pointed by src to a fixed-size buffer dst. + * At most N bytes from src are copied, where N is size of dst. If exactly + * N bytes are copied, then terminating null byte is put into dst, thus + * buffer overrun is prevented. + * + * Function returns pointer to buffer to be compatible with strcpy. + * + * This is a safer drop-in replacement for strcpy function (when used to fill + * buffers, whose size is known at compilation time), however some caveats + * still apply: + * + * - src cannot be null, otherwise the behaviour is undefined + * - dst and src strings must not overlap, otherwise the behaviour is undefined + * - src string must be null-terminated, otherwise the behaviour is undefined + * + * Usage: + * + * char buffer[2]; + * safe_strcpy(buffer, "abc"); + * // buffer is filled with "a" + */ +template +char *safe_strcpy(char (&dst)[N], const char *src) noexcept +{ + assert(src != nullptr); + assert(src < &dst[0] || src > &dst[N - 1]); + snprintf(dst, N, "%s", src); + return &dst[0]; +} + +template +char *safe_strcat(char (&dst)[N], const char *src) noexcept +{ + strncat(dst, src, N - strnlen(dst, N) - 1); + return &dst[0]; +} + +template +int safe_sprintf(char (&dst)[N], const char *fmt, ...) + GCC_ATTRIBUTE(format(printf, 2, 3)); + +template +int safe_sprintf(char (&dst)[N], const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + const int ret = vsnprintf(dst, N, fmt, args); + va_end(args); + return ret; +} + template bool starts_with(const char (&pfx)[N], const char *str) noexcept { diff -Nru dosbox-staging-0.76.0/include/support.h dosbox-staging-0.77.0/include/support.h --- dosbox-staging-0.76.0/include/support.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/support.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,15 +27,17 @@ #include #include #include +#include #include -#include +#include #include -#include +#include #include -#include #include - -#include +#include +#include +#include +#include #ifdef _MSC_VER #define strcasecmp(a, b) _stricmp(a, b) @@ -103,49 +108,66 @@ return static_cast(round(x)); } -// Include a message in assert, similar to static_assert: -#define assertm(exp, msg) assert(((void)msg, exp)) -// Use (void) to silent unused warnings. -// https://en.cppreference.com/w/cpp/error/assert +// Select the next larger signed integer type +template +using next_int_t = typename std::conditional< + sizeof(T) == sizeof(int8_t), + int16_t, + typename std::conditional::type>::type; -/* Copy a string into C array - * - * This function copies string pointed by src to a fixed-size buffer dst. - * At most N bytes from src are copied, where N is size of dst. If exactly - * N bytes are copied, then terminating null byte is put into dst, thus - * buffer overrun is prevented. - * - * Function returns pointer to buffer to be compatible with strcpy. - * - * This is a safer drop-in replacement for strcpy function (when used to fill - * buffers, whose size is known at compilation time), however some caveats - * still apply: - * - * - src cannot be null, otherwise the behaviour is undefined - * - dst and src strings must not overlap, otherwise the behaviour is undefined - * - src string must be null-terminated, otherwise the behaviour is undefined - * - * Usage: - * - * char buffer[2]; - * safe_strcpy(buffer, "abc"); - * // buffer is filled with "a" - */ -template -char *safe_strcpy(char (&dst)[N], const char *src) noexcept +// Select the next large unsigned integer type +template +using next_uint_t = typename std::conditional< + sizeof(T) == sizeof(uint8_t), + uint16_t, + typename std::conditional::type>::type; + +// Left-shifts a signed value by a given amount, with overflow detection +template +constexpr T1 left_shift_signed(T1 value, T2 amount) { - assert(src != nullptr); - assert(src < &dst[0] || src > &dst[N - 1]); - snprintf(dst, N, "%s", src); - return &dst[0]; -} + // Ensure we're using a signed type + static_assert(std::is_signed::value, "T1 must be signed"); -template -char * safe_strcat(char (& dst)[N], const char * src) noexcept { - strncat(dst, src, N - strnlen(dst, N) - 1); - return & dst[0]; + // Ensure the two types are integers + static_assert(std::numeric_limits::is_integer, "T1 must be an integer type"); + static_assert(std::numeric_limits::is_integer, "T2 must be an integer type"); + + // Ensure the amount we're shifting isn't negative + assert(amount >= 0); + + // Ensure the amount we're shifting doesn't exceed the value's bit-size + assert(amount <= std::numeric_limits::digits); + +#if defined(NDEBUG) + // For release builds, simply cast the value to the unsigned-equivalent + // to ensure performance isn't impacted. Debug and UBSAN builds catch issues. + typedef typename std::make_unsigned::type unsigned_T1; + const auto shifted = static_cast(value) << amount; + +#else + // Ensure we can accommodate the value being shifted + static_assert(sizeof(T1) <= sizeof(next_uint_t), + "T1 cannot be a larger than its next larger type"); + + // cast the value to the next larger unsigned-type before shifting + const auto shifted = static_cast>(value) << amount; + + // Ensure the value is in-bounds of its signed limits + assert(static_cast>(shifted) >= (std::numeric_limits::min)()); + assert(static_cast>(shifted) <= (std::numeric_limits::max)()); +#endif + + // Cast it back to its original type + return static_cast(shifted); } +// Include a message in assert, similar to static_assert: +#define assertm(exp, msg) assert(((void)msg, exp)) +// Use (void) to silent unused warnings. +// https://en.cppreference.com/w/cpp/error/assert + +// TODO review all remaining uses of this macro #define safe_strncpy(a,b,n) do { strncpy((a),(b),(n)-1); (a)[(n)-1] = 0; } while (0) #ifdef HAVE_STRINGS_H @@ -185,6 +207,30 @@ void lowcase(std::string &str); void strip_punctuation(std::string &str); +// Split a string on an arbitrary character delimiter. Absent string content on +// either side of a delimiter is treated as an empty string. For example: +// split("abc:", ':') returns {"abc", ""} +// split(":def", ':') returns {"", "def"} +// split(":", ':') returns {"", ""} +// split("::", ':') returns {"", "", ""} +std::vector split(const std::string &seq, const char delim); + +// Split a string on whitespace, where whitespace can be any of the following: +// ' ' (0x20) space (SPC) +// '\t' (0x09) horizontal tab (TAB) +// '\n' (0x0a) newline (LF) +// '\v' (0x0b) vertical tab (VT) +// '\f' (0x0c) feed (FF) +// '\r' (0x0d) carriage return (CR) +// Absent string content on either side of a delimiter is omitted. For example: +// split("abc") returns {"abc"} +// split(" a b c ") returns {"a", "b", "c"} +// split("\t \n abc \r \v def \f \v ") returns {"abc", "def"} +// split("a\tb\nc\vd e\rf") returns {"a", "b", "c", "d", "e", "f"} +// split(" ") returns {} +// split(" ") returns {} +std::vector split(const std::string &seq); + bool is_executable_filename(const std::string &filename) noexcept; // Coarse but fast sine and cosine approximations. Accuracy ranges from 0.0005 @@ -241,3 +287,5 @@ std::string safe_strerror(int err) noexcept; #endif + +void set_thread_name(std::thread &thread, const char *name); diff -Nru dosbox-staging-0.76.0/include/timer.h dosbox-staging-0.77.0/include/timer.h --- dosbox-staging-0.76.0/include/timer.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/timer.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,13 +19,18 @@ #ifndef DOSBOX_TIMER_H #define DOSBOX_TIMER_H +#include +#include +#include + +#include +#include +#include + /* underlying clock rate in HZ */ -#include #define PIT_TICK_RATE 1193182 -#define GetTicks() SDL_GetTicks() - typedef void (*TIMER_TickHandler)(void); /* Register a function that gets called every time if 1 or more ticks pass */ @@ -35,4 +40,106 @@ /* This will add 1 milliscond to all timers */ void TIMER_AddTick(void); +static inline int64_t GetTicks() +{ + return std::chrono::duration_cast( + std::chrono::steady_clock::now().time_since_epoch()) + .count(); +} + +static inline int64_t GetTicksUs() +{ + return std::chrono::duration_cast( + std::chrono::steady_clock::now().time_since_epoch()) + .count(); +} + +static inline int GetTicksDiff(const int64_t new_ticks, const int64_t old_ticks) +{ + assert(new_ticks >= old_ticks); + assert((new_ticks - old_ticks) <= std::numeric_limits::max()); + return static_cast(new_ticks - old_ticks); +} + +static inline int GetTicksSince(const int64_t old_ticks) +{ + const auto now = GetTicks(); + assert((now - old_ticks) <= std::numeric_limits::max()); + return GetTicksDiff(now, old_ticks); +} + +static inline int GetTicksUsSince(const int64_t old_ticks) +{ + const auto now = GetTicksUs(); + assert((now - old_ticks) <= std::numeric_limits::max()); + return GetTicksDiff(now, old_ticks); +} + +static inline void Delay(const int milliseconds) +{ + std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds)); +} + +static inline void DelayUs(const int microseconds) +{ + std::this_thread::sleep_for(std::chrono::microseconds(microseconds)); +} + +// The duration to use for precise sleep +static constexpr int precise_delay_duration_us = 100; + +// based on work from: +// https://blat-blatnik.github.io/computerBear/making-accurate-sleep-function/ +static inline void DelayPrecise(const int milliseconds) +{ + // The estimate of how long the sleep should take (microseconds) + static double estimate = 5e-5; + // Use the estimate value as the default mean time taken + static double mean = 5e-5; + static double m2 = 0; + static int64_t count = 1; + + // Original code operated on seconds, convert + double seconds = milliseconds / 1e3; + + // sleep as long as we can, then spinlock the rest + while (seconds > estimate) { + const auto start = GetTicksUs(); + DelayUs(precise_delay_duration_us); + // Original code operated on seconds, convert + const double observed = GetTicksUsSince(start) / 1e6; + seconds -= observed; + + ++count; + const double delta = observed - mean; + mean += delta / count; + m2 += delta * (observed - mean); + const double stddev = std::sqrt(m2 / (count - 1)); + estimate = mean + stddev; + } + + // spin lock + const auto spin_start = GetTicksUs(); + const int spin_remain = static_cast(seconds * 1e6); + while (GetTicksUsSince(spin_start) <= spin_remain); +} + +static inline bool CanDelayPrecise() +{ + // The tolerance to allow for sleep variation + constexpr int precise_delay_tolerance_us = precise_delay_duration_us; + + bool is_precise = true; + + for (int i=0;i<10;i++) { + const auto start = GetTicksUs(); + DelayUs(precise_delay_duration_us); + const auto elapsed = GetTicksUsSince(start); + if (std::abs(elapsed - precise_delay_duration_us) > + precise_delay_tolerance_us) + is_precise = false; + } + + return is_precise; +} #endif diff -Nru dosbox-staging-0.76.0/include/types.h dosbox-staging-0.77.0/include/types.h --- dosbox-staging-0.76.0/include/types.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/types.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2019-2020 The dosbox-staging team + * Copyright (C) 2019-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/include/vga.h dosbox-staging-0.77.0/include/vga.h --- dosbox-staging-0.76.0/include/vga.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/vga.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,13 +16,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_VGA_H #define DOSBOX_VGA_H -#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#endif //Don't enable keeping changes and mapping lfb probably... #define VGA_LFB_MAPPED @@ -533,5 +530,4 @@ extern Bit32u Expand16Table[4][16]; extern Bit32u Expand16BigTable[0x10000]; - #endif diff -Nru dosbox-staging-0.76.0/include/video.h dosbox-staging-0.77.0/include/video.h --- dosbox-staging-0.76.0/include/video.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/include/video.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,8 +21,6 @@ #include "types.h" -#define REDUCE_JOYSTICK_POLLING - typedef enum { GFX_CallBackReset, GFX_CallBackStop, @@ -51,7 +49,11 @@ #define GFX_CAN_RANDOM 0x4000 //If the interface can also do random access surface #define GFX_UNITY_SCALE 0x8000 /* turn of all scaling in render.cpp */ -void GFX_Events(void); +// return code of: +// - true means event loop can keep running. +// - false means event loop wants to quit. +bool GFX_MaybeProcessEvents(); + Bitu GFX_GetBestMode(Bitu flags); Bitu GFX_GetRGB(Bit8u red,Bit8u green,Bit8u blue); void GFX_SetShader(const char* src); @@ -69,8 +71,6 @@ void GFX_GetSize(int &width, int &height, bool &fullscreen); void GFX_LosingFocus(void); -#if defined (REDUCE_JOYSTICK_POLLING) void MAPPER_UpdateJoysticks(void); -#endif #endif diff -Nru dosbox-staging-0.76.0/INSTALL dosbox-staging-0.77.0/INSTALL --- dosbox-staging-0.76.0/INSTALL 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/INSTALL 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -DOSBox uses the following libraries: - -SDL 2.0 - The Simple DirectMedia Layer available at https://www.libsdl.org/ - SDL provides many essential cross-platform functionalities and - hardware accelerated rendering via OpenGL or Direct3D. - License: zlib - -Opusfile, by Xiph - For compressed audio tracks (.opus) used with CDROM images. - Sources are available at https://opus-codec.org, however it is - also conveniently packages by all popular package managers for - Windows (MSYS2, MinGW, and Chocolatey), Linux (apt, dnf, zypper, - pacman), and OS X (Homebrew and MacPorts). Opus is today's - leading compression format and has replaced Vorbis as Ogg's - recommended lossy format. Is widely used in the largest audio and - video distribution platforms such as YouTube. - License: three-clause BSD - -FluidSynth 2.0 (optional) - FluidSynth is a real-time software synthesizer. - http://www.fluidsynth.org/ - License: GNU LGPL v2.1 - -Curses (optional) - If you want to enable the debugger you need a curses library. - On Linux, install ncurses-devel via your distro package manager. - On macOS, install ncurses via brew or macports. - On Windows, install pdcurses at https://pdcurses.org/, or ncurses - via package-manager such as pacman within an MSYS2 environment. - Licenses: - ncurses - MIT License - pdcurses - Public Domain - -Libpng (optional) - Needed for the screenshots. - For win32 get libpng from http://gnuwin32.sourceforge.net/packages.html - See http://www.libpng.org/pub/png/ for more details. - License: zlib/libpng - -Zlib (optional) - Needed by libpng. - For win32 get libz (rename to zlib) from http://gnuwin32.sourceforge.net/packages.html - See https://www.zlib.net/ for more details. - License: zlib - -SDL_net (optional) - For modem/ipx support. - Get it from https://www.libsdl.org/projects/SDL_net/ - License: zlib - -alsa-lib (mandatory, Linux only) - For ALSA audio support under linux. - See https://www.alsa-project.org/ - Licensed under LGPL - -If you want compile from developer sources (SVN) under a unix system, you will need: - - Subversion to checkout the sources, or gzip and tar to unpack them from archive - - GCC (>=4.8.1) or Clang (>=3.4) - - automake (>=1.6) - - autoconf (>=2.50) - - make (>= 3.8) - - pkg-config (>= 0.25) - -For building on unix systems. -If you are building from developer sources run ./autogen.sh first before doing -the following: - - $ ./configure - $ make - -You can also run "./configure --help" for extra features to enable/disable. -Some of them are: - ---enable-debug - enables the internal debugger. --enable-debug=heavy enables even more - debug options. To use the debugger, DOSBox should be run from an xterm - and when the sdl-window is active press alt-pause to enter the - debugger. - ---disable-core-inline - disables some memory increasing inlines. This speeds up compilation, - but may result in a slower dosbox. - ---disable-fpu - disables the emulated fpu. Although the fpu emulation code isn't - finished and isn't entirely accurate, it's advised to leave it on. - ---disable-fpu-x86 ---disable-fpu-x64 - disables the assembly fpu core. Although relatively new, the x86/x64 - fpu core has more accuracy than the regular fpu core. - ---disable-dynamic-x86 - disables the dynamic x86/x64 specific cpu core. Although it might be - a bit unstable, it can greatly improve the speed of dosbox on x86 and - x64 hosts. - Please note that this option on x86/x64 will result in a different - dynamic/recompiling cpu core being compiled than the default. - For more information see the option --disable-dynrec - ---disable-dynrec - disables the recompiling cpu core. Currently x86/x64 and arm only. - You can activate this core on x86/x64 by disabling the dynamic-x86 - core. - ---disable-dynamic-core - disables all dynamic cores (same effect as --disable-dynamic-x86 - or --disable-dynrec). - ---disable-opengl - disables OpenGL-support (output mode that can be selected in the - DOSBox configuration file). - ---disable-unaligned-memory - disables unaligned memory access. - -Check the src subdir for the binary. diff -Nru dosbox-staging-0.76.0/.lgtm.yml dosbox-staging-0.77.0/.lgtm.yml --- dosbox-staging-0.76.0/.lgtm.yml 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.lgtm.yml 2021-07-02 15:47:39.000000000 +0000 @@ -2,14 +2,21 @@ cpp: prepare: packages: + - "libasound2-dev" + - "libopusfile-dev" - "libpng-dev" - "libsdl2-dev" - "libsdl2-net-dev" - - "libopusfile-dev" + - "meson" configure: command: - - "./autogen.sh" - - "./configure --disable-fluidsynth" + - meson setup -Duse_fluidsynth=false -Duse_mt32emu=false build + index: + build_command: + - ninja -C build python: python_setup: version: 3 + +queries: + - exclude: cpp/short-global-name diff -Nru dosbox-staging-0.76.0/.lsan-suppress dosbox-staging-0.77.0/.lsan-suppress --- dosbox-staging-0.76.0/.lsan-suppress 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/.lsan-suppress 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,2 @@ +leak:/usr/lib/x86_64-linux-gnu/dri +leak:/lib/x86_64-linux-gnu diff -Nru dosbox-staging-0.76.0/m4/am_path_alsa.m4 dosbox-staging-0.77.0/m4/am_path_alsa.m4 --- dosbox-staging-0.76.0/m4/am_path_alsa.m4 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/m4/am_path_alsa.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -dnl Configure Paths for Alsa -dnl Some modifications by Richard Boulton -dnl Christopher Lansdown -dnl Jaroslav Kysela -dnl Last modification: alsa.m4,v 1.22 2002/05/27 11:14:20 tiwai Exp -dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate. -dnl enables arguments --with-alsa-prefix= -dnl --with-alsa-enc-prefix= -dnl --disable-alsatest (this has no effect, as yet) -dnl -dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified, -dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result. - -AC_DEFUN([AM_PATH_ALSA], -[dnl Save the original CFLAGS, LDFLAGS, and LIBS -alsa_save_CFLAGS="$CFLAGS" -alsa_save_LDFLAGS="$LDFLAGS" -alsa_save_LIBS="$LIBS" -alsa_found=yes - -dnl -dnl Get the cflags and libraries for alsa -dnl -AC_ARG_WITH(alsa-prefix, -[ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)], -[alsa_prefix="$withval"], [alsa_prefix=""]) - -AC_ARG_WITH(alsa-inc-prefix, -[ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)], -[alsa_inc_prefix="$withval"], [alsa_inc_prefix=""]) - -dnl FIXME: this is not yet implemented -AC_ARG_ENABLE(alsatest, -[ --disable-alsatest Do not try to compile and run a test Alsa program], -[enable_alsatest=no], -[enable_alsatest=yes]) - -dnl Add any special include directories -AC_MSG_CHECKING(for ALSA CFLAGS) -if test "$alsa_inc_prefix" != "" ; then - ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix" - CFLAGS="$CFLAGS -I$alsa_inc_prefix" -fi -AC_MSG_RESULT($ALSA_CFLAGS) - -dnl add any special lib dirs -AC_MSG_CHECKING(for ALSA LDFLAGS) -if test "$alsa_prefix" != "" ; then - ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix" - LDFLAGS="$LDFLAGS $ALSA_LIBS" -fi - -dnl add the alsa library -ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread" -LIBS=`echo $LIBS | sed 's/-lm//'` -LIBS=`echo $LIBS | sed 's/-ldl//'` -LIBS=`echo $LIBS | sed 's/-lpthread//'` -LIBS=`echo $LIBS | sed 's/ //'` -LIBS="$ALSA_LIBS $LIBS" -AC_MSG_RESULT($ALSA_LIBS) - -dnl Check for a working version of libasound that is of the right version. -min_alsa_version=ifelse([$1], ,0.1.1,$1) -AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version) -no_alsa="" - alsa_min_major_version=`echo $min_alsa_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - alsa_min_minor_version=`echo $min_alsa_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - alsa_min_micro_version=`echo $min_alsa_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - -AC_LANG_SAVE -AC_LANG_C -AC_TRY_COMPILE([ -#include -], [ -/* ensure backward compatibility */ -#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) -#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR -#endif -#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR) -#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR -#endif -#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR) -#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR -#endif - -# if(SND_LIB_MAJOR > $alsa_min_major_version) - exit(0); -# else -# if(SND_LIB_MAJOR < $alsa_min_major_version) -# error not present -# endif - -# if(SND_LIB_MINOR > $alsa_min_minor_version) - exit(0); -# else -# if(SND_LIB_MINOR < $alsa_min_minor_version) -# error not present -# endif - -# if(SND_LIB_SUBMINOR < $alsa_min_micro_version) -# error not present -# endif -# endif -# endif -exit(0); -], - [AC_MSG_RESULT(found.)], - [AC_MSG_RESULT(not present.) - ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)]) - alsa_found=no] -) -AC_LANG_RESTORE - -dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. -AC_CHECK_LIB([asound], [snd_ctl_open],, - [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)]) - alsa_found=no] -) - -if test "x$alsa_found" = "xyes" ; then - ifelse([$2], , :, [$2]) - LIBS=`echo $LIBS | sed 's/-lasound//g'` - LIBS=`echo $LIBS | sed 's/ //'` - LIBS="-lasound $LIBS" -fi -if test "x$alsa_found" = "xno" ; then - ifelse([$3], , :, [$3]) - CFLAGS="$alsa_save_CFLAGS" - LDFLAGS="$alsa_save_LDFLAGS" - LIBS="$alsa_save_LIBS" - ALSA_CFLAGS="" - ALSA_LIBS="" -fi - -dnl That should be it. Now just export out symbols: -AC_SUBST(ALSA_CFLAGS) -AC_SUBST(ALSA_LIBS) -]) diff -Nru dosbox-staging-0.76.0/m4/am_path_sdl.m4 dosbox-staging-0.77.0/m4/am_path_sdl.m4 --- dosbox-staging-0.76.0/m4/am_path_sdl.m4 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/m4/am_path_sdl.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ -dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS - -AC_DEFUN([AM_PATH_SDL], [dnl - - dnl Get the cflags and libraries from the sdl2-config script - - AC_ARG_WITH(sdl-prefix, - AS_HELP_STRING([--with-sdl-prefix=PFX], - [Prefix where SDL is installed (optional)]), - sdl_prefix="$withval", - sdl_prefix="") - - AC_ARG_WITH(sdl-exec-prefix, - AS_HELP_STRING([--with-sdl-exec-prefix=PFX], - [Exec prefix where SDL is installed (optional)]), - sdl_exec_prefix="$withval", - sdl_exec_prefix="") - - AC_ARG_ENABLE(sdltest, - AS_HELP_STRING([--disable-sdltest], - [Do not try to compile and run a test SDL program]),, - enable_sdltest=yes) - - AC_ARG_ENABLE(sdl-static, - AS_HELP_STRING([--enable-sdl-static], - [Link SDL2 statically]), - force_sdl_static=yes,) - - if test x$sdl_exec_prefix != x ; then - sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config - fi - fi - if test x$sdl_prefix != x ; then - sdl_args="$sdl_args --prefix=$sdl_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_prefix/bin/sdl2-config - fi - fi - - AC_PATH_PROG(SDL_CONFIG, sdl2-config, no) - min_sdl_version=ifelse([$1], ,0.11.0,$1) - AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) - no_sdl="" - if test "$SDL_CONFIG" = "no" ; then - no_sdl=yes - else - SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` - - if test "x$force_sdl_static" = "xyes" ; then - - # Selectively static linking SDL2 requires more flags than the ones - # returned by sdl2-config program. - # TODO: replace hardcoded flags with a better solution - case "$host" in - *-*-darwin*) - SDL_LIBS="/usr/local/lib/libSDL2.a -lm -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal" - ;; - *) - SDL_LIBS=$($SDL_CONFIG $sdlconf_args --static-libs) - ;; - esac - - else - SDL_LIBS=$($SDL_CONFIG $sdlconf_args --libs) - fi - - sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_sdltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" -dnl -dnl Now check if the installed SDL is sufficiently new. (Also sanity -dnl checks the results of sdl2-config to some extent -dnl - rm -f conf.sdltest - AC_TRY_RUN([ -#include -#include -#include -#include - -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main (int argc, char *argv[]) -{ - int major, minor, micro; - char *tmp_version; - - /* This hangs on some systems (?) - system ("touch conf.sdltest"); - */ - { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_sdl_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_sdl_version"); - exit(1); - } - - if (($sdl_major_version > major) || - (($sdl_major_version == major) && ($sdl_minor_version > minor)) || - (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); - printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n"); - printf("*** to point to the correct copy of sdl2-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - -],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_sdl" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$SDL_CONFIG" = "no" ; then - echo "*** The sdl2-config script installed by SDL could not be found" - echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the SDL_CONFIG environment variable to the" - echo "*** full path to sdl2-config." - else - if test -f conf.sdltest ; then - : - else - echo "*** Could not run SDL test program, checking why..." - CFLAGS="$CFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding SDL or finding the wrong" - echo "*** version of SDL. If it is not finding SDL, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occurred. This usually means SDL was incorrectly installed" - echo "*** or that you have moved SDL since it was installed. In the latter case, you" - echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - SDL_CFLAGS="" - SDL_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(SDL_CFLAGS) - AC_SUBST(SDL_LIBS) - rm -f conf.sdltest -]) diff -Nru dosbox-staging-0.76.0/m4/ax_cxx_compile_stdcxx_14.m4 dosbox-staging-0.77.0/m4/ax_cxx_compile_stdcxx_14.m4 --- dosbox-staging-0.76.0/m4/ax_cxx_compile_stdcxx_14.m4 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/m4/ax_cxx_compile_stdcxx_14.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -# ============================================================================= -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_14.html -# ============================================================================= -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX_14([ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the C++14 -# standard; if necessary, add switches to CXX and CXXCPP to enable -# support. -# -# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX -# macro with the version set to C++14. The two optional arguments are -# forwarded literally as the second and third argument respectively. -# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for -# more information. If you want to use this macro, you also need to -# download the ax_cxx_compile_stdcxx.m4 file. -# -# LICENSE -# -# Copyright (c) 2015 Moritz Klammler -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 5 - -AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) -AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [AX_CXX_COMPILE_STDCXX([14], [$1], [$2])]) diff -Nru dosbox-staging-0.76.0/m4/ax_cxx_compile_stdcxx.m4 dosbox-staging-0.77.0/m4/ax_cxx_compile_stdcxx.m4 --- dosbox-staging-0.76.0/m4/ax_cxx_compile_stdcxx.m4 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/m4/ax_cxx_compile_stdcxx.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,948 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the specified -# version of the C++ standard. If necessary, add switches to CXX and -# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) -# or '14' (for the C++14 standard). -# -# The second argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. -# -# The third argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline support for the specified C++ standard is -# required and that the macro should error out if no mode with that -# support is found. If specified 'optional', then configuration proceeds -# regardless, after defining HAVE_CXX${VERSION} if and only if a -# supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# Copyright (c) 2015 Paul Norman -# Copyright (c) 2015 Moritz Klammler -# Copyright (c) 2016, 2018 Krzesimir Nowak -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 10 - -dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro -dnl (serial version number 13). - -AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], - [$1], [14], [ax_cxx_compile_alternatives="14 1y"], - [$1], [17], [ax_cxx_compile_alternatives="17 1z"], - [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$2], [], [], - [$2], [ext], [], - [$2], [noext], [], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], - [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], - [$3], [optional], [ax_cxx_compile_cxx$1_required=false], - [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - - m4_if([$2], [noext], [], [dnl - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - switch="-std=gnu++${alternative}" - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - fi]) - - m4_if([$2], [ext], [], [dnl - if test x$ac_success = xno; then - dnl HP's aCC needs +std=c++11 according to: - dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf - dnl Cray's crayCC needs "-h std=c++11" - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - if test x$ac_success = xyes; then - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx$1_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) - fi - fi - if test x$ac_success = xno; then - HAVE_CXX$1=0 - AC_MSG_NOTICE([No compiler with C++$1 support was found]) - else - HAVE_CXX$1=1 - AC_DEFINE(HAVE_CXX$1,1, - [define if the compiler supports basic C++$1 syntax]) - fi - AC_SUBST(HAVE_CXX$1) -]) - - -dnl Test body for checking C++11 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 -) - - -dnl Test body for checking C++14 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 -) - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 -) - -dnl Tests for new features in C++11 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - -]]) - - -dnl Tests for new features in C++14 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ - -// If the compiler admits that it is not ready for C++14, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201402L - -#error "This is not a C++14 compiler" - -#else - -namespace cxx14 -{ - - namespace test_polymorphic_lambdas - { - - int - test() - { - const auto lambda = [](auto&&... args){ - const auto istiny = [](auto x){ - return (sizeof(x) == 1UL) ? 1 : 0; - }; - const int aretiny[] = { istiny(args)... }; - return aretiny[0]; - }; - return lambda(1, 1L, 1.0f, '1'); - } - - } - - namespace test_binary_literals - { - - constexpr auto ivii = 0b0000000000101010; - static_assert(ivii == 42, "wrong value"); - - } - - namespace test_generalized_constexpr - { - - template < typename CharT > - constexpr unsigned long - strlen_c(const CharT *const s) noexcept - { - auto length = 0UL; - for (auto p = s; *p; ++p) - ++length; - return length; - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("x") == 1UL, ""); - static_assert(strlen_c("test") == 4UL, ""); - static_assert(strlen_c("another\0test") == 7UL, ""); - - } - - namespace test_lambda_init_capture - { - - int - test() - { - auto x = 0; - const auto lambda1 = [a = x](int b){ return a + b; }; - const auto lambda2 = [a = lambda1(x)](){ return a; }; - return lambda2(); - } - - } - - namespace test_digit_separators - { - - constexpr auto ten_million = 100'000'000; - static_assert(ten_million == 100000000, ""); - - } - - namespace test_return_type_deduction - { - - auto f(int& x) { return x; } - decltype(auto) g(int& x) { return x; } - - template < typename T1, typename T2 > - struct is_same - { - static constexpr auto value = false; - }; - - template < typename T > - struct is_same - { - static constexpr auto value = true; - }; - - int - test() - { - auto x = 0; - static_assert(is_same::value, ""); - static_assert(is_same::value, ""); - return x; - } - - } - -} // namespace cxx14 - -#endif // __cplusplus >= 201402L - -]]) - - -dnl Tests for new features in C++17 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ - -// If the compiler admits that it is not ready for C++17, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201703L - -#error "This is not a C++17 compiler" - -#else - -#include -#include -#include - -namespace cxx17 -{ - - namespace test_constexpr_lambdas - { - - constexpr int foo = [](){return 42;}(); - - } - - namespace test::nested_namespace::definitions - { - - } - - namespace test_fold_expression - { - - template - int multiply(Args... args) - { - return (args * ... * 1); - } - - template - bool all(Args... args) - { - return (args && ...); - } - - } - - namespace test_extended_static_assert - { - - static_assert (true); - - } - - namespace test_auto_brace_init_list - { - - auto foo = {5}; - auto bar {5}; - - static_assert(std::is_same, decltype(foo)>::value); - static_assert(std::is_same::value); - } - - namespace test_typename_in_template_template_parameter - { - - template typename X> struct D; - - } - - namespace test_fallthrough_nodiscard_maybe_unused_attributes - { - - int f1() - { - return 42; - } - - [[nodiscard]] int f2() - { - [[maybe_unused]] auto unused = f1(); - - switch (f1()) - { - case 17: - f1(); - [[fallthrough]]; - case 42: - f1(); - } - return f1(); - } - - } - - namespace test_extended_aggregate_initialization - { - - struct base1 - { - int b1, b2 = 42; - }; - - struct base2 - { - base2() { - b3 = 42; - } - int b3; - }; - - struct derived : base1, base2 - { - int d; - }; - - derived d1 {{1, 2}, {}, 4}; // full initialization - derived d2 {{}, {}, 4}; // value-initialized bases - - } - - namespace test_general_range_based_for_loop - { - - struct iter - { - int i; - - int& operator* () - { - return i; - } - - const int& operator* () const - { - return i; - } - - iter& operator++() - { - ++i; - return *this; - } - }; - - struct sentinel - { - int i; - }; - - bool operator== (const iter& i, const sentinel& s) - { - return i.i == s.i; - } - - bool operator!= (const iter& i, const sentinel& s) - { - return !(i == s); - } - - struct range - { - iter begin() const - { - return {0}; - } - - sentinel end() const - { - return {5}; - } - }; - - void f() - { - range r {}; - - for (auto i : r) - { - [[maybe_unused]] auto v = i; - } - } - - } - - namespace test_lambda_capture_asterisk_this_by_value - { - - struct t - { - int i; - int foo() - { - return [*this]() - { - return i; - }(); - } - }; - - } - - namespace test_enum_class_construction - { - - enum class byte : unsigned char - {}; - - byte foo {42}; - - } - - namespace test_constexpr_if - { - - template - int f () - { - if constexpr(cond) - { - return 13; - } - else - { - return 42; - } - } - - } - - namespace test_selection_statement_with_initializer - { - - int f() - { - return 13; - } - - int f2() - { - if (auto i = f(); i > 0) - { - return 3; - } - - switch (auto i = f(); i + 4) - { - case 17: - return 2; - - default: - return 1; - } - } - - } - - namespace test_template_argument_deduction_for_class_templates - { - - template - struct pair - { - pair (T1 p1, T2 p2) - : m1 {p1}, - m2 {p2} - {} - - T1 m1; - T2 m2; - }; - - void f() - { - [[maybe_unused]] auto p = pair{13, 42u}; - } - - } - - namespace test_non_type_auto_template_parameters - { - - template - struct B - {}; - - B<5> b1; - B<'a'> b2; - - } - - namespace test_structured_bindings - { - - int arr[2] = { 1, 2 }; - std::pair pr = { 1, 2 }; - - auto f1() -> int(&)[2] - { - return arr; - } - - auto f2() -> std::pair& - { - return pr; - } - - struct S - { - int x1 : 2; - volatile double y1; - }; - - S f3() - { - return {}; - } - - auto [ x1, y1 ] = f1(); - auto& [ xr1, yr1 ] = f1(); - auto [ x2, y2 ] = f2(); - auto& [ xr2, yr2 ] = f2(); - const auto [ x3, y3 ] = f3(); - - } - - namespace test_exception_spec_type_system - { - - struct Good {}; - struct Bad {}; - - void g1() noexcept; - void g2(); - - template - Bad - f(T*, T*); - - template - Good - f(T1*, T2*); - - static_assert (std::is_same_v); - - } - - namespace test_inline_variables - { - - template void f(T) - {} - - template inline T g(T) - { - return T{}; - } - - template<> inline void f<>(int) - {} - - template<> int g<>(int) - { - return 5; - } - - } - -} // namespace cxx17 - -#endif // __cplusplus < 201703L - -]]) diff -Nru dosbox-staging-0.76.0/m4/ax_pthread.m4 dosbox-staging-0.77.0/m4/ax_pthread.m4 --- dosbox-staging-0.76.0/m4/ax_pthread.m4 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/m4/ax_pthread.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,507 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also to link with them as well. For example, you might link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threaded programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to -# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the -# PTHREAD_PRIO_INHERIT symbol is defined when compiling with -# PTHREAD_CFLAGS. -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# Updated for Autoconf 2.68 by Daniel Richard G. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2011 Daniel Richard G. -# Copyright (c) 2019 Marc Stevens -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 27 - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_PROG_SED]) -AC_LANG_PUSH([C]) -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on Tru64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then - ax_pthread_save_CC="$CC" - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) - AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) - AC_MSG_RESULT([$ax_pthread_ok]) - if test "x$ax_pthread_ok" = "xno"; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - CC="$ax_pthread_save_CC" - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items with a "," contain both -# C compiler flags (before ",") and linker flags (after ","). Other items -# starting with a "-" are C compiler flags, and remaining items are -# library names, except for "none" which indicates that we try without -# any flags at all, and "pthread-config" which is a program returning -# the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 -# (Note: HP C rejects this with "bad form for `-t' option") -# -pthreads: Solaris/gcc (Note: HP C also rejects) -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads and -# -D_REENTRANT too), HP C (must be checked before -lpthread, which -# is present but should not be used directly; and before -mthreads, -# because the compiler interprets this as "-mt" + "-hreads") -# -mthreads: Mingw32/gcc, Lynx/gcc -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case $host_os in - - freebsd*) - - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) - # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) - - ax_pthread_flags="-kthread lthread $ax_pthread_flags" - ;; - - hpux*) - - # From the cc(1) man page: "[-mt] Sets various -D flags to enable - # multi-threading and also sets -lpthread." - - ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" - ;; - - openedition*) - - # IBM z/OS requires a feature-test macro to be defined in order to - # enable POSIX threads at all, so give the user a hint if this is - # not set. (We don't define these ourselves, as they can affect - # other portions of the system API in unpredictable ways.) - - AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], - [ -# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) - AX_PTHREAD_ZOS_MISSING -# endif - ], - [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) - ;; - - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (N.B.: The stubs are missing - # pthread_cleanup_push, or rather a function called by this macro, - # so we could check for that, but who knows whether they'll stub - # that too in a future libc.) So we'll check first for the - # standard Solaris way of linking pthreads (-mt -lpthread). - - ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" - ;; -esac - -# Are we compiling with Clang? - -AC_CACHE_CHECK([whether $CC is Clang], - [ax_cv_PTHREAD_CLANG], - [ax_cv_PTHREAD_CLANG=no - # Note that Autoconf sets GCC=yes for Clang as well as GCC - if test "x$GCC" = "xyes"; then - AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], - [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -# if defined(__clang__) && defined(__llvm__) - AX_PTHREAD_CC_IS_CLANG -# endif - ], - [ax_cv_PTHREAD_CLANG=yes]) - fi - ]) -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" - - -# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) - -# Note that for GCC and Clang -pthread generally implies -lpthread, -# except when -nostdlib is passed. -# This is problematic using libtool to build C++ shared libraries with pthread: -# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 -# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 -# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 -# To solve this, first try -pthread together with -lpthread for GCC - -AS_IF([test "x$GCC" = "xyes"], - [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) - -# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first - -AS_IF([test "x$ax_pthread_clang" = "xyes"], - [ax_pthread_flags="-pthread,-lpthread -pthread"]) - - -# The presence of a feature test macro requesting re-entrant function -# definitions is, on some systems, a strong hint that pthreads support is -# correctly enabled - -case $host_os in - darwin* | hpux* | linux* | osf* | solaris*) - ax_pthread_check_macro="_REENTRANT" - ;; - - aix*) - ax_pthread_check_macro="_THREAD_SAFE" - ;; - - *) - ax_pthread_check_macro="--" - ;; -esac -AS_IF([test "x$ax_pthread_check_macro" = "x--"], - [ax_pthread_check_cond=0], - [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) - - -if test "x$ax_pthread_ok" = "xno"; then -for ax_pthread_try_flag in $ax_pthread_flags; do - - case $ax_pthread_try_flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - *,*) - PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` - PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` - AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) - PTHREAD_CFLAGS="$ax_pthread_try_flag" - ;; - - pthread-config) - AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) - PTHREAD_LIBS="-l$ax_pthread_try_flag" - ;; - esac - - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include -# if $ax_pthread_check_cond -# error "$ax_pthread_check_macro must be defined" -# endif - static void *some_global = NULL; - static void routine(void *a) - { - /* To avoid any unused-parameter or - unused-but-set-parameter warning. */ - some_global = a; - } - static void *start_routine(void *a) { return a; }], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - AC_MSG_RESULT([$ax_pthread_ok]) - AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - - -# Clang needs special handling, because older versions handle the -pthread -# option in a rather... idiosyncratic way - -if test "x$ax_pthread_clang" = "xyes"; then - - # Clang takes -pthread; it has never supported any other flag - - # (Note 1: This will need to be revisited if a system that Clang - # supports has POSIX threads in a separate library. This tends not - # to be the way of modern systems, but it's conceivable.) - - # (Note 2: On some systems, notably Darwin, -pthread is not needed - # to get POSIX threads support; the API is always present and - # active. We could reasonably leave PTHREAD_CFLAGS empty. But - # -pthread does define _REENTRANT, and while the Darwin headers - # ignore this macro, third-party headers might not.) - - # However, older versions of Clang make a point of warning the user - # that, in an invocation where only linking and no compilation is - # taking place, the -pthread option has no effect ("argument unused - # during compilation"). They expect -pthread to be passed in only - # when source code is being compiled. - # - # Problem is, this is at odds with the way Automake and most other - # C build frameworks function, which is that the same flags used in - # compilation (CFLAGS) are also used in linking. Many systems - # supported by AX_PTHREAD require exactly this for POSIX threads - # support, and in fact it is often not straightforward to specify a - # flag that is used only in the compilation phase and not in - # linking. Such a scenario is extremely rare in practice. - # - # Even though use of the -pthread flag in linking would only print - # a warning, this can be a nuisance for well-run software projects - # that build with -Werror. So if the active version of Clang has - # this misfeature, we search for an option to squash it. - - AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown - # Create an alternate version of $ac_link that compiles and - # links in two steps (.c -> .o, .o -> exe) instead of one - # (.c -> exe), because the warning occurs only in the second - # step - ax_pthread_save_ac_link="$ac_link" - ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` - ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) - CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [ac_link="$ax_pthread_2step_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [break]) - ]) - done - ac_link="$ax_pthread_save_ac_link" - CFLAGS="$ax_pthread_save_CFLAGS" - AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - ]) - - case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in - no | unknown) ;; - *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; - esac - -fi # $ax_pthread_clang = yes - - - -# Various other checks: -if test "x$ax_pthread_ok" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_CACHE_CHECK([for joinable pthread attribute], - [ax_cv_PTHREAD_JOINABLE_ATTR], - [ax_cv_PTHREAD_JOINABLE_ATTR=unknown - for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $ax_pthread_attr; return attr /* ; */])], - [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], - []) - done - ]) - AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ - test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ - test "x$ax_pthread_joinable_attr_defined" != "xyes"], - [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], - [$ax_cv_PTHREAD_JOINABLE_ATTR], - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - ax_pthread_joinable_attr_defined=yes - ]) - - AC_CACHE_CHECK([whether more special flags are required for pthreads], - [ax_cv_PTHREAD_SPECIAL_FLAGS], - [ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $host_os in - solaris*) - ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" - ;; - esac - ]) - AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ - test "x$ax_pthread_special_flags_added" != "xyes"], - [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" - ax_pthread_special_flags_added=yes]) - - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT; - return i;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) - ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ - test "x$ax_pthread_prio_inherit_defined" != "xyes"], - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) - ax_pthread_prio_inherit_defined=yes - ]) - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != "xyes"; then - case $host_os in - aix*) - AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - -AC_SUBST([PTHREAD_LIBS]) -AC_SUBST([PTHREAD_CFLAGS]) -AC_SUBST([PTHREAD_CC]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "x$ax_pthread_ok" = "xyes"; then - ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_POP -])dnl AX_PTHREAD diff -Nru dosbox-staging-0.76.0/Makefile.am dosbox-staging-0.77.0/Makefile.am --- dosbox-staging-0.76.0/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -# Main Makefile for DOSBox - -AM_MAKEFLAGS ?= --no-print-directory - -EXTRA_DIST = autogen.sh contrib - -SUBDIRS = docs include src tests - -# Per the auto-tools clean guidelines: -# https://www.gnu.org/savannah-checkouts/gnu/automake/manual/html_node/Clean.html#Clean -# -# "if configure built it, then 'distclean' should delete it", however the generated -# _distclean_ target misses many files generated by ./configure, so we augment them -# here. We also add those files generated by automake and autoconf to ensure 'distclean' -# reverts the directory back to its original as-distributed source tree. -# -# (note: with recursive makefiles, these files could be defined as individual distclean-local: -# targets inside each sub-directory's Makefile.am, however listing them in one target here -# is easier manage as they can all be seen at once.) -# -# This results in 'make distclean' working the same as 'git clean -fdx', even when code -# was distributed via a tarball, and not cloned from a Git repo. - -distclean-local: - -rm ar-lib - -rm aclocal.m4 - -rm build.log - -rm compile - -rm compile_commands.json - -rm config.guess - -rm config.h.in* - -rm config.log - -rm config.sub - -rm configure - -rm depcomp - -rm install-sh - -rm missing - -rm -rf autom4te.cache - -find . -name Makefile.in -type f -delete - -find . -name .deps -type d -exec rm -rf {} + - -# 'run' and 'test' are convenience targets for development, they invoke the relevant -# binaries immediately after the build. - -.PHONY: run test - -run: all - ./src/dosbox$(EXEEXT) - -if BUILD_TESTS -test: all - ./tests/tests$(EXEEXT) -endif diff -Nru dosbox-staging-0.76.0/meson.build dosbox-staging-0.77.0/meson.build --- dosbox-staging-0.76.0/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,360 @@ +project('dosbox-staging', 'c', 'cpp', + version : '0.77.0', + license : 'GPL-2.0-or-later', + default_options : ['cpp_std=c++14', 'b_ndebug=if-release'], + meson_version : '>= 0.51.0') + +# After increasing the minimum-required meson version, make the following +# improvements: +# +# - 0.53.0 - use summary() to communicate setup result +# - 0.55.0 - subproject wraps are automatically promoted to fallbacks, +# stop using: "fallback : ['foo', 'foo_dep']" for dependencies +# - 0.56.0 - use meson.current_source_dir() in unit tests + + +# compiler flags +# +# Warnings enabled below are our baseline; use '-Dwarning_level=3' to +# turn on more. The default level is 1 (meson turns on -Wall). +# +cc = meson.get_compiler('c') +cxx = meson.get_compiler('cpp') + +add_project_arguments('-Weffc++', language : 'cpp') +if cxx.has_argument('-Wextra-semi') + add_project_arguments('-Wextra-semi', language : 'cpp') +endif + + +# gather data for config file +# +# Actual config.h file will be generated after all interpreting build files +# for all subdirs. +# +conf_data = configuration_data() +conf_data.set('version', meson.project_version()) + +if get_option('buildtype').startswith('debug') + conf_data.set('conf_suffix', '-staging-git') +else + conf_data.set('conf_suffix', '-staging') +endif + +os_family_name = { + 'linux' : 'LINUX', + 'windows' : 'WIN32', + 'cygwin' : 'WIN32', + 'darwin' : 'MACOSX', + 'freebsd' : 'BSD', + 'netbsd' : 'BSD', + 'openbsd' : 'BSD', + 'dragonfly' : 'BSD', +}.get(host_machine.system(), 'UNKNOWN_OS') +conf_data.set(os_family_name, 1) + +conf_data.set10('C_MODEM', get_option('use_sdl2_net')) +conf_data.set10('C_IPX', get_option('use_sdl2_net')) +conf_data.set10('C_NE2000', get_option('use_slirp') or get_option('use_pcap')) +conf_data.set10('C_OPENGL', get_option('use_opengl')) +conf_data.set10('C_FLUIDSYNTH', get_option('use_fluidsynth')) +conf_data.set10('C_MT32EMU', get_option('use_mt32emu')) +conf_data.set10('C_SSHOT', get_option('use_png')) +conf_data.set10('C_FPU', true) +conf_data.set10('C_FPU_X86', host_machine.cpu_family() in ['x86', 'x86_64']) + +if get_option('enable_debugger') != 'none' + conf_data.set10('C_DEBUG', true) +endif + +if get_option('enable_debugger') == 'heavy' + conf_data.set10('C_HEAVY_DEBUG', true) +endif + +foreach osdef : ['LINUX', 'WIN32', 'MACOSX', 'BSD'] + if conf_data.has(osdef) + conf_data.set10('C_DIRECTSERIAL', true) + endif +endforeach + +if cc.has_function('clock_gettime', prefix : '#include ') + conf_data.set10('HAVE_CLOCK_GETTIME', true) +endif + +if cc.has_function('__builtin_available') + conf_data.set10('HAVE_BUILTIN_AVAILABLE', true) +endif + +if cc.has_function('mprotect', prefix : '#include ') + conf_data.set10('HAVE_MPROTECT', true) +endif + +if cc.has_function('mmap', prefix : '#include ') + conf_data.set10('HAVE_MMAP', true) +endif + +if cc.has_header_symbol('sys/mman.h', 'MAP_JIT') + conf_data.set10('HAVE_MAP_JIT', true) +endif + +if cc.has_function('pthread_jit_write_protect_np', prefix : '#include ') + conf_data.set10('HAVE_PTHREAD_WRITE_PROTECT_NP', true) +endif + +if cc.has_function('sys_icache_invalidate', prefix : '#include ') + conf_data.set10('HAVE_SYS_ICACHE_INVALIDATE', true) +endif + +if cxx.has_function('pthread_setname_np', prefix : '#include ', + dependencies : dependency('threads')) + conf_data.set10('HAVE_PTHREAD_SETNAME_NP', true) +endif + +if cc.has_function('realpath', prefix : '#include ') + conf_data.set10('HAVE_REALPATH', true) +endif + +if cc.has_member('struct dirent', 'd_type', prefix : '#include ') + conf_data.set10('HAVE_STRUCT_DIRENT_D_TYPE', true) +endif + +foreach header : ['pwd.h', 'strings.h', 'netinet/in.h', 'sys/socket.h'] + if cc.has_header(header) + conf_data.set('HAVE_' + header.underscorify().to_upper(), 1) + endif +endforeach + +# Header windows.h defines old min/max macros, that conflict with C++11 +# std::min/std::max. Defining NOMINMAX prevents these macros from appearing. +if cxx.get_id() == 'msvc' + conf_data.set('NOMINMAX', true) +endif + +if host_machine.system() in ['windows', 'cygwin'] + conf_data.set('_USE_MATH_DEFINES', true) +endif + +if host_machine.endian() == 'big' + conf_data.set('WORDS_BIGENDIAN', 1) +endif + +# Non-4K memory page size is supported only for ppc64 at the moment. +# TODO re-enable ppc dynrec while working on W^X stuff +# disabled because SVN r4424 broke compilation of ppc backends +#if host_machine.cpu_family() in ['ppc64', 'ppc64le'] +# conf_data.set('PAGESIZE', 65536) +#endif + +set_prio_code = ''' +#include +int main() { + return setpriority(PRIO_PROCESS, 0, PRIO_MIN + PRIO_MAX); +} +''' +if cc.compiles(set_prio_code, name : 'test for setpriority support') + conf_data.set('HAVE_SETPRIORITY', 1) +endif + +# New compilers can check for this feature using __has_builtin, but this is +# broken prior to Clang 10 and GCC 10, so we prefer to have this compilation +# check for now: +builtin_expect_code = ''' +void fun(bool test) { + // value of 'test' is usually going to be true + if (__builtin_expect(test, true)) { + /* likely branch */ + } else { + /* unlikely branch */ + } +} +''' +if cxx.compiles(builtin_expect_code, name : 'test for __builtin_expect support') + conf_data.set('C_HAS_BUILTIN_EXPECT', 1) +endif + + +# external dependencies +# +static_libs_list = get_option('try_static_libs') +msg = 'You can disable this dependency with: -D@0@=false' + +optional_dep = dependency('', required : false) +atomic_dep = cxx.find_library('atomic', required : false) +opus_dep = dependency('opusfile', + static : ('opusfile' in static_libs_list)) +threads_dep = dependency('threads') +sdl2_dep = dependency('sdl2', version : '>= 2.0.5', + static : ('sdl2' in static_libs_list)) +sdl2_net_dep = optional_dep +opengl_dep = optional_dep +fluid_dep = optional_dep +mt32emu_dep = optional_dep +png_dep = optional_dep +pcap_dep = optional_dep +slirp_dep = optional_dep +curses_dep = optional_dep # necessary for debugger builds +alsa_dep = optional_dep # Linux-only +coreaudio_dep = optional_dep # macOS-only +coremidi_dep = optional_dep # macOS-only +winsock2_dep = optional_dep # Windows-only +winmm_dep = optional_dep # Windows-only + + +if get_option('use_sdl2_net') + sdl2_net_dep = dependency('SDL2_net', version : '>= 2.0.0', + static : ('sdl2_net' in static_libs_list), + not_found_message : msg.format('use_sdl2_net')) +endif + +if get_option('use_opengl') + opengl_dep = dependency('gl', not_found_message : msg.format('use_opengl')) +endif + +if get_option('use_fluidsynth') + fluid_dep = dependency('fluidsynth', version : '>= 2.0.0', + static : ('fluidsynth' in static_libs_list), + fallback : ['fluidsynth', 'fluidsynth_dep'], + not_found_message : msg.format('use_fluidsynth')) +endif + +if get_option('use_mt32emu') + mt32emu_dep = dependency('mt32emu', version : '>= 2.5.0', + static : ('mt32emu' in static_libs_list), + fallback : ['mt32emu', 'mt32emu_dep'], + not_found_message : msg.format('use_mt32emu')) +endif + +if get_option('use_png') + png_dep = dependency('libpng', static : ('png' in static_libs_list), + not_found_message : msg.format('use_png')) +endif + +if get_option('use_pcap') # disabled by default + pcap_dep = dependency('libpcap') +endif + +if get_option('use_slirp') # disabled by default + slirp_dep = dependency('slirp') +endif + +if get_option('enable_debugger') != 'none' + curses_dep = dependency('ncurses') # or pdcurses on Windows +endif + +# macOS-only dependencies +# +if host_machine.system() == 'darwin' + coreaudio_dep = dependency('appleframeworks', + modules : ['CoreAudio', 'AudioUnit', 'AudioToolbox'], + required : false) + if coreaudio_dep.found() + conf_data.set('C_COREAUDIO', 1) + else + warning('''Core Audio support disabled: compiler can't detect/use Apple Frameworks''') + endif + + coremidi_dep = dependency('appleframeworks', + modules : ['CoreMIDI', 'CoreFoundation'], + required : false) + if coremidi_dep.found() + conf_data.set('C_COREMIDI', 1) + else + warning('''Core MIDI support disabled: compiler can't detect/use Apple Frameworks''') + endif + + # Apple Silicon has 16k pages + pagesize_cmd = run_command('pagesize') + if pagesize_cmd.returncode() != 0 + error('''error executing pagesize''') + else + pagesize = pagesize_cmd.stdout().strip().to_int() + if pagesize != 4096 + conf_data.set('PAGESIZE', pagesize) + endif + endif +endif + +# Linux-only dependencies +# +using_linux = (host_machine.system() == 'linux') +force_alsa = (get_option('use_alsa') == 'true') +if force_alsa or (using_linux and get_option('use_alsa') == 'auto') + alsa_dep = dependency('alsa') + conf_data.set('C_ALSA', 1) +endif + +# Windows-only dependencies +# +if host_machine.system() in ['windows', 'cygwin'] + winsock2_dep = cxx.find_library('ws2_32', required : true) + winmm_dep = cxx.find_library('winmm', required : true) +endif + +# include directories +# +incdir = include_directories('include', '.') + + +# bundled dependencies +# +subdir('src/libs/decoders') +subdir('src/libs/nuked') +subdir('src/libs/ppscale') +subdir('src/libs/residfp') + +libdecoders_dep = declare_dependency(link_with : libdecoders) +libnuked_dep = declare_dependency(link_with : libnuked) +libppscale_dep = declare_dependency(link_with : libppscale) +libresidfp_dep = declare_dependency(link_with : libresidfp) + + +# internal libs +# +internal_deps = [] +subdir('src/cpu') +subdir('src/debug') +subdir('src/dos') +subdir('src/fpu') +subdir('src/gui') +subdir('src/hardware') +subdir('src/ints') +subdir('src/midi') +subdir('src/misc') +subdir('src/shell') + + +# generate config.h +# +configure_file(input : 'src/config.h.in', output : 'config.h', + configuration : conf_data) + + +# tests +# +# Some tests use relative paths; in meson 0.56.0 this can be replaced +# with meson.project_source_root(). +project_source_root = meson.current_source_dir() +subdir('tests') + + +# dosbox executable +# +version_file = vcs_tag(input : 'src/version.cpp.in', output : 'version.cpp') +executable('dosbox', ['src/main.cpp', 'src/dosbox.cpp', version_file], + dependencies : [atomic_dep, threads_dep, sdl2_dep] + internal_deps, + include_directories : incdir, + install : true) + + +# additional files for installation +# +data_dir = get_option('datadir') +licenses_dir = data_dir / 'licenses' / 'dosbox-staging' +doc_dir = data_dir / 'doc' / 'dosbox-staging' + +install_man('docs/dosbox.1') +install_data('COPYING', install_dir : licenses_dir) +install_data('AUTHORS', 'README', 'THANKS', install_dir : doc_dir) + +subdir('contrib/linux') +subdir('contrib/icons') diff -Nru dosbox-staging-0.76.0/meson_options.txt dosbox-staging-0.77.0/meson_options.txt --- dosbox-staging-0.76.0/meson_options.txt 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/meson_options.txt 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,53 @@ +option('use_sdl2_net', type : 'boolean', value : true, + description : 'Enable networking features via SDL2_net (modem, ipx)') + +option('use_opengl', type : 'boolean', value : true, + description : 'Enable OpenGL support') + +option('use_fluidsynth', type : 'boolean', value : true, + description : 'Enable built-in MIDI support via FluidSynth') + +option('use_mt32emu', type : 'boolean', value : true, + description : 'Enable built-in MT-32 emulation support') + +option('use_png', type : 'boolean', value : true, + description : 'Enable saving screenshots in .png format') + +option('use_pcap', type : 'boolean', value : false, + description : 'Enable ethernet support (NE2000 emulator) using libpcap') + +option('use_slirp', type : 'boolean', value : false, + description : 'Enable ethernet support (NE2000 emulator) using libslirp') + +# This option exists only for rare situations when Linux developer cannot +# install ALSA library headers on their machine. +# +# 'auto' translates to 'true' on Linux systems and 'false' everywhere else. +# +option('use_alsa', type : 'combo', + choices : ['auto', 'true', 'false'], value : 'auto', + description : 'Enable ALSA MIDI support') + +option('enable_debugger', type : 'combo', + choices : ['normal', 'heavy', 'none'], value : 'none', + description : 'Build emulator with internal debugger feature.') + +option('dynamic_core', type : 'combo', + choices : ['auto', 'dyn-x86', 'dynrec', 'none'], value : 'auto', + description : 'Select the dynamic core implementation.') + +# Use this option for selectively switching dependencies to look for static +# libraries first. This behaves differently than passing +# -Ddefault_library=static (which will turn on static linking for dependencies +# built from wraps, but still attempt dynamic linking for system-installed +# libraries). +# +# This is NOT guaranteed to work - the end results will vary depending on your +# OS, installed libraries, and dependencies of those libraries. +# +option('try_static_libs', type : 'array', + choices : ['fluidsynth', 'opusfile', 'png', 'sdl2', 'sdl2_net'], value : [], + description : 'Attempt to statically link selected libraries.') + +option('unit_tests', type : 'feature', value : 'auto', + description : 'Build unit tests. Auto skips for release builds.') diff -Nru dosbox-staging-0.76.0/.pvs-suppress dosbox-staging-0.77.0/.pvs-suppress --- dosbox-staging-0.76.0/.pvs-suppress 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/.pvs-suppress 2021-07-02 15:47:39.000000000 +0000 @@ -2,6 +2,14 @@ "version": 1, "warnings": [ { + "CodeCurrent": 0, + "CodeNext": 0, + "CodePrev": 0, + "ErrorCode": "Renew", + "FileName": " ", + "Message": "Your license will expire in _ days. Click 'Renew' to learn more or contact us at support@viva_.com." + }, + { "CodeCurrent": 99146737, "CodeNext": 3299936121, "CodePrev": 2974951853, @@ -130,6 +138,22 @@ "Message": "Expression is always false." }, { + "CodeCurrent": 1596023591, + "CodeNext": 1249513261, + "CodePrev": 4081771348, + "ErrorCode": "V547", + "FileName": "dr_wav.h", + "Message": "Expression 'bytesToRead > (_UL)' is always false." + }, + { + "CodeCurrent": 1849716353, + "CodeNext": 11359373, + "CodePrev": 2663124891, + "ErrorCode": "V1051", + "FileName": "dr_wav.h", + "Message": "Consider checking for misprints. It's possible that the 'sampleCountFromFactChunk' should be used inside 'drwav__seek_forward' function." + }, + { "CodeCurrent": 3210175261, "CodeNext": 11069, "CodePrev": 2952291276, diff -Nru dosbox-staging-0.76.0/README dosbox-staging-0.77.0/README --- dosbox-staging-0.76.0/README 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/README 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,4 @@ -DOSBox (dosbox-staging) 0.76.0 Manual +DOSBox (dosbox-staging) 0.77.0 Manual ====== INDEX: @@ -49,6 +49,8 @@ SOUND: There is no sound. SOUND: What sound hardware does DOSBox presently emulate? SOUND: The sound stutters or sounds stretched/weird. +KEYBOARD: My keyboard's F1-F12 keys don't work. +KEYBOARD: Common key-presses conflict with system actions on macOS. KEYBOARD: I can't type \ or : in DOSBox. KEYBOARD: Right Shift and "\" doesn't work in DOSBox. (Windows only) KEYBOARD: The keyboard lags. @@ -102,8 +104,9 @@ - Apply the changes by clicking on "OK". Unfortunately, this compatibility option causes some side effects in - windowed mode, and in this case you will need to change the resolution - in the config/Options file for windowresolution (e.g. 1024x768). + windowed mode, and in this case you will need to change the windowresolution + setting in your config file to either a fixed size (e.g. 1024x768) or + a relative size: (e.g. small, medium, or large). Alternatively, you can disable the display scaling and or use a lower fullresolution value. @@ -139,7 +142,8 @@ Usually, DOSBox detects when a game uses mouse control. When you click on the screen it should get locked (confined to the DOSBox window) and work. With certain games, the DOSBox mouse detection doesn't work. In that case - you will have to lock the mouse manually by pressing CTRL-F10. + you will have to lock the mouse manually by pressing Ctrl+F10 (or Cmd+F10 + on macOS). SOUND: There is no sound. @@ -213,12 +217,46 @@ Section 11: "Troubleshooting". +KEYBOARD: My keyboard's F1-F12 keys don't work. + This can happen on macOS, mini-keyboards, and some laptops. + + Find and hold the 'Function' or 'Fn' key while pressing an F-key. + The 'Fn' key is often located in the lower-left corner of the keyboard. + + On macOS, you can change the top row of keys to work as standard F-keys + without holding the 'Fn' key. In your system's keyboard preferences: + select "Use F1, F2, etc. keys as standard function keys". Learn more + here: https://support.apple.com/en-us/HT204436 + + Note: some custom keyboards might still intercept one or more F-keys, even + after the above steps have been performed. Please refer to your keyboard's + documentation for more information. + +KEYBOARD: Common key-presses conflict with system actions on macOS + + Conflict: Command+F5 + Where: Settings > Keyboard > Shortcuts > Accessibility + What: Disable the "Turn VoiceOver on or off" shortcut + + Conflict: F11 + Where: Settings > Keyboard > Shortcuts > Mission Control + What: Disable the "Show Desktop" shortcut + + Conflict: Control+arrow keys + Where: Settings > Keyboard > Shortcuts > Mission Control + What: Disable the following shortcuts: + - "Mission Control" to deconflict Control+Up + - "Application windows" to deconflict Control+Down + - "Move left a space" to deconflict Control+Left + - "Move right a space" to deconflict Control+Right + KEYBOARD: I can't type \ or : in DOSBox. This can happen in various cases, like your host keyboard layout does not have a matching DOS layout representation (or it was not correctly detected), or the key mapping is wrong. Some possible fixes: - 1. Use / instead, or ALT-58 for : and ALT-92 for \. + 1. Use / instead, or Alt+58 for : and Alt+92 for \. + On macOS, use the Option key, for example: Opt+58 and Opt+92. 2. Change the DOS keyboard layout (see Section 8: "Keyboard Layout"). 3. Add the commands you want to execute to the [autoexec] section of the DOSBox configuration file. @@ -227,9 +265,9 @@ Note that if the host layout can not be identified, or keyboardlayout is set to none in the DOSBox configuration file, the standard US layout is - used. In this configuration try the keys around "enter" for the key \ - (backslash), and for the key : (colon) use shift and the keys between - "enter" and "L". + used. In this configuration try the keys around "Enter" for the key \ + (backslash), and for the key : (colon) use Shift and the keys between + "Enter" and "L". KEYBOARD: The keyboard lags. @@ -355,12 +393,26 @@ -machine machinetype Setup DOSBox to emulate a specific type of machine. Valid choices are: - hercules, cga, ega, pcjr, tandy, svga_s3 (default) as well as - the additional SVGA chipsets listed in the DOSBox configuration file. - svga_s3 enables VESA emulation as well. + - hercules - Hercules Graphics Card (monochrome) + - cga - IBM Color Graphics Adapter + - cga_mono - IBM CGA attached to monochrome display (monochrome) + - pcjr - IBM PCjr + - tandy - Tandy Graphics Adapter (Tandy 1000) + - ega - IBM Enhanced Graphics Adapter + - vgaonly - IBM Video Graphics Array (see below) + - vesa_oldvbe - VESA SVGA - VESA BIOS Extensions (VBE) 1.2 + - vesa_nolfb - VESA SVGA - VBE 2.0 with Linear Frame Buffer disabled + - svga_paradise - VESA SVGA - Paradise Systems PVGA1A - VBE 2.0 + - svga_et3000 - VESA SVGA - Tseng ET3000 - VBE 2.0 + - svga_et4000 - VESA SVGA - Tseng ET4000 - VBE 2.0 + - svga_s3 - VESA SVGA - S3 Trio - VBE 2.0 + + The default is svga_s3. + For some special VGA effects the machinetype vgaonly can be used, note that this disables SVGA capabilities and might be slower due to the higher emulation precision. + The machinetype affects the video card and the available sound cards. -noconsole (Windows Only) @@ -430,6 +482,17 @@ In Windows, you can also drag directories/files onto the DOSBox executable. +Environment variables +--------------------- + +Any configuration option can be overridden using an environment variable. +Environment variables starting with prefix "DOSBOX" are processed and +interpreted as follows: DOSBOX_SECTIONNAME_PROPERTYNAME=value + +For example, you can override render aspect with: + + $ DOSBOX_RENDER_ASPECT=false dosbox + ===================== 4. Internal Programs: @@ -618,7 +681,7 @@ -wcp filelocation Write the current configuration settings to the specified file in or - relative to the DOSBox program start directory. Realtive and absolute + relative to the DOSBox program start directory. Relative and absolute paths are possible. This is located on a drive on the host, not a mounted drive in DOSBox. It is useful if you keep DOSBox on a removable media. If file is omitted, the configuration will be written to dosbox.conf. @@ -667,7 +730,7 @@ Shows information about the specified property in the specified section: - purpose of the property - possible values, current value, default value - - wether it can definitely not be changed at runtime + - whether it can definitely not be changed at runtime -securemode Switches DOSBox to a more secure mode. In this mode the internal @@ -738,7 +801,8 @@ RESCAN [Drive:] [-All] Make DOSBox reread the directory structure. Useful if you changed something - on a mounted drive outside of DOSBox. (CTRL - F4 does this as well!) + on a mounted drive outside of DOSBox. Ctrl+F4 (or Cmd+F4 on macOS) does + this as well! Drive: Drive to refresh. @@ -770,15 +834,15 @@ of the volume levels. /LISTMIDI - In Windows lists the available midi devices on your PC. To select a device - other than the Windows default midi-mapper, change the line 'midiconfig=' - in the [midi] section of the configuration file to 'midiconfig=id', where - 'id' is the number for the device as listed by LISTMIDI. eg. midiconfig=2 - - In Linux this option doesn't work, but you get similar results by using - 'pmidi -l' in console. Then change the line 'midiconfig=' to - 'midiconfig=port', where 'port' is the port for the device as listed by - 'pmidi -l'. eg. midiconfig=128:0 + Lists your PC's MIDI devices. To use one, set the 'midiconfig' attribute + in your configuration file to the device's numerical ID or any part of + its textual name. For example: + + Examples: + + (any OS) midiconfig = name # matches any part of name, case-insensitive + (Linux) midiconfig = 128:0 # connects to specific port + (Windows) midiconfig = 2 # connects to specific port IMGMOUNT @@ -801,7 +865,7 @@ imagefile1 imagefile2 .. imagefileN Location of the image files to mount in DOSBox. Specifying a number of image files is only allowed for CD-ROM images. - The CD's can be swapped with CTRL-F4 at any time. + The CD's can be swapped with Ctrl+F4 (or Cmd+F4 on macOS) at any time. This is required for games which use multiple CD-ROMs and require the CD to be switched during the gameplay at some point. @@ -865,9 +929,9 @@ diskimg1.img diskimg2.img .. diskimgN.img This can be any number of floppy disk images one wants mounted after DOSBox boots the specified drive letter. - To swap between images, hit CTRL-F4 to change from the current disk - to the next disk in the list. The list will loop back from the last - disk image to the beginning. + To swap between images, hit Ctrl+F4 (or Cmd+F4 on macOS) to change from + the current disk to the next disk in the list. The list will loop back + from the last disk image to the beginning. [-l driveletter] This parameter allows you to specify the drive to boot from. @@ -993,10 +1057,11 @@ Examples: 1. To load the polish typist keys layout (automatically uses codepage 852): keyb pl214 - 2. To load one of russian keyboard layouts with codepage 866: + 2. To load one of Russian keyboard layouts with codepage 866: keyb ru441 866 - In order to type russian characters press ALT+RIGHT-SHIFT. - 3. To load one of french keyboard layouts with codepage 850 (where the + In order to type Russian characters press Alt+Right+Shift. + On macOS, use the Option key intead of Alt: Opt+Right+Shift. + 3. To load one of French keyboard layouts with codepage 850 (where the codepage is defined in EGACPI.DAT): keyb fr189 850 EGACPI.DAT 4. To load codepage 858 (without a keyboard layout): @@ -1043,41 +1108,41 @@ 5. Special Keys: ================ -ALT-ENTER Switch between fullscreen and window mode. -ALT-PAUSE Pause/Unpause emulator. -CTRL-F1 Start the keymapper. -CTRL-F4 Change between mounted floppy/CD images. Update directory cache - for all drives. -CTRL-F5 Save a screenshot. (PNG format) -CTRL-F6 Start/Stop recording sound output to a wave file. -CTRL-F7 Start/Stop recording video output to a zmbv file. -CTRL-F9 Shutdown emulator. -CTRL-F10 Capture/Release the mouse. -CTRL-F11 Slow down emulation (Decrease DOSBox Cycles). -CTRL-F12 Speed up emulation (Increase DOSBox Cycles)*. -ALT-F12 Unlock speed (turbo button/fast forward)**. -CTRL-ALT-HOME Restart DOSBox. -F11, ALT-F11 (machine=cga) change tint in NTSC output modes***. -F11 (machine=hercules) cycle through amber, green, white colouring***. - -*NOTE: Once you increase your DOSBox cycles beyond your computer CPU resources, - it will produce the same effect as slowing down the emulation. - This maximum will vary from computer to computer. - -**NOTE: You need free CPU resources for this (the more you have, the faster - it goes), so it won't work at all with cycles=max or a too high amount - of fixed cycles. You have to keep the keys pressed for it to work! +Alt+Enter Switch between fullscreen and window mode.* +Alt+Pause Pause/Unpause emulator.* +Ctrl+F1 Start the keymapper*. +Ctrl+F4 Change between mounted floppy/CD images. Update directory cache + for all drives*. +Ctrl+F5 Save a screenshot*. (PNG format) +Ctrl+F6 Start/Stop recording sound output to a wave file*. +Ctrl+F7 Start/Stop recording video output to a zmbv file*. +Ctrl+F9 Shutdown emulator*. +Ctrl+F10 Capture/Release the mouse*. +Ctrl+F11 Slow down emulation (Decrease DOSBox Cycles)*. +Ctrl+F12 Speed up emulation (Increase DOSBox Cycles)* and **. +Alt+F12 Unlock speed (turbo button/fast forward)***. +Ctrl+Alt+Home Restart DOSBox.* +F11, Alt+F11 (machine=cga) change tint in NTSC output modes* and ****. +F11 (machine=hercules) cycle through amber, green, white colouring****. + +*NOTE: On macOS, use Command+F instead of Ctrl+F, and the Option key + instead of the Alt key. For help enabling or pressing your top-row F-keys, + see the FAQ at the top. + +**NOTE: Once you increase your DOSBox cycles beyond your computer CPU resources, + it will produce the same effect as slowing down the emulation. + This maximum will vary from computer to computer. + +***NOTE: You need free CPU resources for this (the more you have, the faster + it goes), so it won't work at all with cycles=max or a too high amount + of fixed cycles. You have to keep the keys pressed for it to work! -***NOTE: These keys won't work if you saved a mapper file earlier with - a different machine type. So either reassign them or reset the mapper. +****NOTE: These keys won't work if you saved a mapper file earlier with + a different machine type. So either reassign them or reset the mapper. These are the default keybindings. They can be changed in the keymapper (see Section 7: "KeyMapper"). -In Mac OS X you can try using cmd(applekey) together with Ctrl (and/or ) Fn, -if the key doesn't work i.e. fn-cmd-ctrl-F1, but some keys may still need -remapping (in Linux too). - Saved/recorded files can be found in: (Windows) C:\Users\\AppData\Local\DOSBox\capture\ @@ -1128,8 +1193,9 @@ 7. KeyMapper: ============= -Start the DOSBox mapper either with CTRL-F1 (see Section 5: "Special Keys") or --startmapper (see Section 3: "Command Line Parameters"). +Start the DOSBox mapper either with Ctrl+F1 (Cmd+F1 on macOS) also see +Section 5: "Special Keys") or pass the -startmapper argument to the DOSBox +executable (see Section 3: "Command Line Parameters"). You are presented with a virtual keyboard and a virtual joystick. These virtual devices correspond to the keys and events DOSBox will @@ -1154,7 +1220,7 @@ joystick(s) (as reported by SDL), which is connected to the EVENT. mod1,2,3 Modifiers. These are keys you need to have to be pressed while pressing - BIND. mod1 = CTRL and mod2 = ALT. These are generally only used when you + BIND. mod1 = Ctrl and mod2 = Alt. These are generally only used when you want to change the special keys of DOSBox. Add Add a new BIND to this EVENT. Basically add a key from your keyboard or an @@ -1243,9 +1309,11 @@ Some keyboard layouts (for example layout GK319 codepage 869 and layout RU441 codepage 808) have support for dual layouts that can be accessed by pressing - LeftALT+RrightSHIFT for one layout and LeftALT+LeftSHIFT for the other. + Left Alt+Right Shift for one layout and Left Alt+Left Shift for the other. + (on macOS, use Option+Right Shift and Option+Left Shift). Some keyboard layouts (for example layout LT456 codepage 771) have support - for three layouts, third can be accessed by pressing LeftALT+LeftCTRL + for three layouts, third can be accessed by pressing Left Alt+Left Ctrl + (on macOS: Left Option+Left Ctrl). Supported external files The FreeDOS .kl files are supported (FreeDOS keyb2 keyboard layoutfiles) as @@ -1437,9 +1505,9 @@ You can force the slow or fast behavior by setting a fixed amount of cycles in the DOSBox's configuration file. If you set for example cycles=10000, the DOSBox window will display a line "CPU speed: fixed 10000 cycles" at the top. - In this mode you can reduce the amount of cycles even more by hitting CTRL-F11 - (you can go as low as you want) or raise it by hitting CTRL-F12 as much as you - want, but you will be limited by the power of one core of your computer's CPU. + In this mode you can reduce the amount of cycles even more by hitting Ctrl+F11 + (Cmd+F11 on macOS), as low as needed, or raise it with Ctrl+F12 (Cmd+F12 on + macOS) but you will be limited by you PC's single-threaded performance. You can see how much free time your real CPU's cores have by looking at the Task Manager in Windows 2000/XP/Vista/7 and the System Monitor in Windows 95/98/ME. Once 100% of the power of your computer's real CPU's one @@ -1454,7 +1522,8 @@ "CPU speed: max 100% cycles" at the top then. This time you won't have to care how much free time your real CPU cores have, because DOSBox will always use 100% of your real CPU's one core. In this mode you can reduce the amount - of your real CPU's core usage by CTRL-F11 or raise it with CTRL-F12. + of your real CPU's core usage by Ctrl+F11 or raise it with Ctrl+F12 (or + Cmd+F11 and Cmd+F12 on macOS). CPU Core (speed up) On x86 architectures you can try to force the usage of a dynamically @@ -1470,7 +1539,8 @@ On systems with limited CPU performance, consider binding a hotkey to the "Increase frameskip" action ("Inc Fskip") using the keymapper. Skipping frames generally frees up your CPU, providing faster emulation when using - max cycles or affording a greater number of fixed cycles with CTRL+F12. + max cycles or affording a greater number of fixed cycles with Ctrl+F12 + (or Cmd+F12 on macOS). You can repeat this until the game runs fast enough for you. Please note that this is a trade-off: you lose in fluidity of video what @@ -1625,7 +1695,7 @@ ======================================== Download the source. -Check the INSTALL in the source distribution. +Check the README.md and BUILD.md files in the source distribution. diff -Nru dosbox-staging-0.76.0/README.md dosbox-staging-0.77.0/README.md --- dosbox-staging-0.76.0/README.md 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/README.md 2021-07-02 15:47:39.000000000 +0000 @@ -1,38 +1,49 @@ # DOSBox Staging -![GPL-2.0-or-later](https://img.shields.io/badge/license-GPL--2.0--or--later-blue) -[![Linux x86\_64 build status](https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/Linux%20builds?label=Linux%20(x86_64))](https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Linux+builds%22) -[![Linux other build status](https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/Platform%20builds?label=Linux%20(ARM,%20S390x,%20ppc64le))](https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Platform+builds%22) -[![Windows build status](https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/Windows%20builds?label=Windows)](https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Windows+builds%22) -[![macOS build status](https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/macOS%20builds?label=macOS)](https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22macOS+builds%22) +![GPL-2.0-or-later][gpl-badge] +[![Chat][discord-badge]][discord] This repository attempts to modernize the DOSBox codebase by using current development practices and tools, fixing issues, and adding features that better support today's systems. +### Build status + +[![Linux x86\_64 build status][build-lin1-badge]][build-linux] +[![Linux other build status][build-lin2-badge]][build-linux-2] +[![Windows build status][build-win-badge]][build-win] +[![macOS build status][build-mac-badge]][build-mac] + +### Code quality status + +[![Coverity status][coverity-badge]][4] +[![LGTM grade][lgtm-badge]][3] + ## Summary of differences compared to upstream ### For developers -| | DOSBox Staging | DOSBox -|- |- |- -| **Version control** | Git | [SVN] -| **Language** | C++14 | C++03[1] -| **SDL** | 2.0.2 | 1.2* -| **CI** | Yes | No -| **Static analysis** | Yes[2],[3],[4] | No -| **Dynamic analysis** | Yes | No -| **clang-format** | Yes | No -| **[Development builds]** | Yes | No -| **Unit tests** | Yes[5] | No -| **Automated regression tests** | WIP | No +| | DOSBox Staging | DOSBox +|- |- |- +| **Version control** | Git | [SVN] +| **Language** | C++14 | C++03[1] +| **SDL** | >= 2.0.2 | 1.2* +| **Buildsystem** | Meson or Visual Studio 2019 | Autotools or Visual Studio 2003 +| **CI** | Yes | No +| **Static analysis** | Yes[2],[3],[4],[5] | No +| **Dynamic analysis** | Yes | No +| **clang-format** | Yes | No +| **[Development builds]** | Yes | No +| **Unit tests** | Yes[6] | No +| **Automated regression tests** | WIP | No [SVN]:https://sourceforge.net/projects/dosbox/ [1]:https://sourceforge.net/p/dosbox/patches/283/ [2]:https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Code+analysis%22 -[3]:https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22PVS-Studio+analysis%22 +[3]:https://lgtm.com/projects/g/dosbox-staging/dosbox-staging/ [4]:https://scan.coverity.com/projects/dosbox-staging -[5]:tests/README.md +[5]:https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22PVS-Studio+analysis%22 +[6]:tests/README.md [Development builds]:https://dosbox-staging.github.io/downloads/devel/ ### Feature differences @@ -54,42 +65,46 @@ | **WAV** | Yes (built-in) | Yes - SDL\_sound 1.2 (built-in)[7],* | **AIFF** | No | Yes - SDL\_sound 1.2 (built-in)[7],* -† - 8/16/24 bit-depth, 22.05/44.1/48 kHz, and mono or stereo\ *- SDL 1.2 was last updated 2013-08-17 and SDL\_sound 2008-04-20\ +† - 8/16/24 bit-depth, 22.05/44.1/48 kHz, and mono or stereo\ ‡ - 44.1 kHz stereo only\ § - Broken or unsupported in either SDL\_sound or DOSBox [6]:https://www.dosbox.com/wiki/MOUNT#Mounting_a_CUE.2FBIN-Pair_as_volume [7]:https://sourceforge.net/p/dosbox/code-0/HEAD/tree/dosbox/trunk/src/dos/cdrom_image.cpp#l536 -Other differences: +Feature differences between release binaries (or unpatched sources): -| | DOSBox Staging | DOSBox SVN -|- |- |- -| **Pixel-perfect mode** | Yes (`output=openglpp` or `output=texturepp`)| N/A -| **Resizable window** | Experimental (`windowresolution=resizable`) | N/A -| **Relative window size** | N/A | `windowresolution=X%` -| **[OPL] emulators** | compat, fast, mame, nuked[8] | compat, fast, mame -| **[CGA]/mono support** | Yes (`machine=cga_mono`)[9] | Only CGA with colour -| **[Wayland] support** | Experimental (use `SDL_VIDEODRIVER=wayland`) | N/A -| **Modem phonebook file** | Yes (`phonebookfile=`) | N/A -| **Autotype command** | Yes[10] | N/A -| **Startup verbosity** | Yes[11] | N/A -| **[GUS] enhancements** | Yes[12] | N/A -| **Raw mouse input** | Yes (`raw_mouse_input=true`) | N/A -| **[FluidSynth] MIDI** | Yes[13] (FluidSynth 2.x) | Only external synths - -[OPL]:https://en.wikipedia.org/wiki/Yamaha_YMF262 -[CGA]:https://en.wikipedia.org/wiki/Color_Graphics_Adapter -[Wayland]:https://en.wikipedia.org/wiki/Wayland_(display_server_protocol) -[GUS]: https://en.wikipedia.org/wiki/Gravis_Ultrasound -[FluidSynth]: http://www.fluidsynth.org/ -[8]:https://www.vogons.org/viewtopic.php?f=9&t=37782 -[9]:https://github.com/dosbox-staging/dosbox-staging/commit/ffe3c5ab7fb5e28bae78f07ea987904f391a7cf8 -[10]:https://github.com/dosbox-staging/dosbox-staging/commit/239396fec83dbba6a1eb1a0f4461f4a427d2be38 -[11]: https://github.com/dosbox-staging/dosbox-staging/pull/477 -[12]: https://github.com/dosbox-staging/dosbox-staging/wiki/Gravis-UltraSound-Enhancements -[13]: https://github.com/dosbox-staging/dosbox-staging/issues/262#issuecomment-734719260 +| *Feature* | *DOSBox Staging* | *DOSBox SVN* +|- |- |- +| **Pixel-perfect mode** | Yes (`output=openglpp` or `output=texturepp`) | N/A +| **Resizable window** | Yes (for all `output=opengl` modes) | N/A +| **Relative window size** | Yes (`windowresolution=small`, `medium`, or `large`) | `windowresolution=X%` +| **[OPL] emulators** | compat, fast, mame, nuked[8] | compat, fast, mame +| **[CGA]/mono support** | Yes (`machine=cga_mono`)[9] | Only CGA with colour +| **[Wayland] support** | Experimental (use `SDL_VIDEODRIVER=wayland`) | N/A +| **Modem phonebook file** | Yes (`phonebookfile=`) | N/A +| **Autotype command** | Yes[10] | N/A +| **Startup verbosity** | Yes[11] | N/A +| **[GUS] enhancements** | Yes[12] | N/A +| **Raw mouse input** | Yes (`raw_mouse_input=true`) | N/A +| **[FluidSynth][FS] MIDI**| Yes[13] (FluidSynth 2.x) | Only external synths +| **[MT-32] emulator** | Yes* (libmt32emu 2.4.2) | N/A + +*- Requires original ROM files + +[OPL]: https://en.wikipedia.org/wiki/Yamaha_YMF262 +[CGA]: https://en.wikipedia.org/wiki/Color_Graphics_Adapter +[Wayland]: https://en.wikipedia.org/wiki/Wayland_(display_server_protocol) +[GUS]: https://en.wikipedia.org/wiki/Gravis_Ultrasound +[MT-32]: https://en.wikipedia.org/wiki/Roland_MT-32 +[FS]: http://www.fluidsynth.org/ +[8]: https://www.vogons.org/viewtopic.php?f=9&t=37782 +[9]: https://github.com/dosbox-staging/dosbox-staging/commit/ffe3c5ab7fb5e28bae78f07ea987904f391a7cf8 +[10]: https://github.com/dosbox-staging/dosbox-staging/commit/239396fec83dbba6a1eb1a0f4461f4a427d2be38 +[11]: https://github.com/dosbox-staging/dosbox-staging/pull/477 +[12]: https://github.com/dosbox-staging/dosbox-staging/wiki/Gravis-UltraSound-Enhancements +[13]: https://github.com/dosbox-staging/dosbox-staging/issues/262#issuecomment-734719260 ## Stable release builds @@ -103,11 +118,7 @@ ## Build instructions -Read [INSTALL](INSTALL) file for a general summary about dependencies and -configure options and [BUILD.md](BUILD.md) for the comprehensive -compilation guide. You can also use helper script -[`./scripts/build.sh`](scripts/build.sh), that performs builds for many -useful scenarios (LTO, FDO, sanitizer builds, many others). +Read [BUILD.md] for the comprehensive compilation guide. ### Linux, macOS @@ -115,51 +126,61 @@ ``` shell # Fedora -sudo dnf install gcc-c++ make automake alsa-lib-devel libpng-devel SDL2-devel \ - SDL2_net-devel opusfile-devel fluidsynth-devel +sudo dnf install ccache gcc-c++ meson alsa-lib-devel libpng-devel \ + SDL2-devel SDL2_net-devel opusfile-devel fluidsynth-devel ``` ``` shell # Debian, Ubuntu -sudo apt install build-essential automake libasound2-dev libpng-dev \ +sudo apt install ccache build-essential meson libasound2-dev libpng-dev \ libsdl2-dev libsdl2-net-dev libopusfile-dev libfluidsynth-dev ``` ``` shell # Arch, Manjaro -sudo pacman -S gcc automake alsa-lib libpng sdl2 sdl2_net opusfile fluidsynth +sudo pacman -S ccache gcc meson alsa-lib libpng sdl2 sdl2_net opusfile \ + fluidsynth +``` + +``` shell +# openSUSE +sudo zypper install ccache gcc gcc-c++ meson alsa-devel libpng-devel \ + libSDL2-devel libSDL2_net-devel opusfile-devel \ + fluidsynth-devel libmt32emu-devel ``` ``` shell # macOS xcode-select --install -brew install autogen automake libpng sdl2 sdl2_net opusfile fluid-synth +brew install ccache meson libpng sdl2 sdl2_net opusfile fluid-synth ``` -Compilation flags suggested for local optimised builds: +Instructions for creating an optimised release build: ``` shell git clone https://github.com/dosbox-staging/dosbox-staging.git cd dosbox-staging -./autogen.sh -./configure CPPFLAGS="-DNDEBUG" \ - CFLAGS="-O3 -march=native" \ - CXXFLAGS="-O3 -march=native" -make -j$(nproc) +meson setup -Dbuildtype=release build +ninja -C build +./build/dosbox ``` -See [CONTRIBUTING.md](CONTRIBUTING.md#build-dosbox-staging) for compilation -flags more suited for development. +To build and link the MT-32 and FluidSynth subprojects statically, +add the `-Ddefault_library=static` option during setup. + +To see all of Meson's setup options, run: +``` shell +meson configure +``` ### Windows - Visual Studio (2019 or newer) -First, you need to setup [vcpkg](https://github.com/microsoft/vcpkg) to -install build dependencies. Once vcpkg is bootstrapped, open PowerShell, -and run: +First, you need to setup [vcpkg] to install build dependencies. Once vcpkg +is bootstrapped, open PowerShell and run: ``` powershell PS:\> .\vcpkg integrate install -PS:\> .\vcpkg install --triplet x64-windows libpng sdl2 sdl2-net opusfile fluidsynth +PS:\> .\vcpkg install --triplet x64-windows libpng sdl2 sdl2-net libmt32emu opusfile fluidsynth gtest ``` These two steps will ensure that MSVC finds and links all dependencies. @@ -167,26 +188,33 @@ Start Visual Studio and open file: `vs\dosbox.sln`. Make sure you have `x64` selected as the solution platform. Use Ctrl+Shift+B to build all projects. -### Windows (MSYS2, MinGW), macOS (MacPorts), Haiku OS, others +[vcpkg]: https://github.com/microsoft/vcpkg + +### Windows (MSYS2), macOS (MacPorts), Haiku, others Instructions for other build systems and operating systems are documented -in [BUILD.md](BUILD.md). +in [BUILD.md]. Links to OS-specific instructions: [MSYS2], [MacPorts], +[Haiku]. + +[BUILD.md]: BUILD.md +[MSYS2]: docs/build-windows.md +[MacPorts]: docs/build-macos.md +[Haiku]: docs/build-haiku.md -## Imported branches and community patches +## Imported branches, community patches, old forks Commits landing in SVN upstream are imported to this repo in a timely manner, -to the branches matching [`svn/*`] pattern, e.g. [`svn/trunk`]. +see branch [`svn/trunk`]. -Other branch name patterns are also in use: [`vogons/*`] for various -patches posted on the Vogons forum, [`munt/*`] for patches from the Munt -project, etc. +- [`svn/*`] - branches from SVN +- [`forks/*`] - code for various abandoned DOSBox forks +- [`vogons/*`] - community patches posted on the Vogons forum Git tags matching pattern `svn/*` are pointing to the commits referenced by SVN "tag" paths at the time of creation. -Additionally, we attach some optional metadata to the commits imported from SVN -in the form of [Git notes](https://git-scm.com/docs/git-notes). To fetch them, -run: +Additionally, we attach some optional metadata to the commits in the form of +[Git notes][git-notes]. To fetch them, run: ``` shell git fetch origin "refs/notes/*:refs/notes/*" @@ -196,7 +224,22 @@ [Vogons thread](https://www.vogons.org/viewtopic.php?p=790065#p790065), ([1](https://imgur.com/a/bnJEZcx), [2](https://imgur.com/a/HnG1Ls4)) -[`svn/*`]:https://github.com/dosbox-staging/dosbox-staging/branches/all?utf8=%E2%9C%93&query=svn%2F -[`svn/trunk`]:https://github.com/dosbox-staging/dosbox-staging/tree/svn/trunk -[`vogons/*`]:https://github.com/dosbox-staging/dosbox-staging/branches/all?utf8=%E2%9C%93&query=vogons%2F -[`munt/*`]:https://github.com/dosbox-staging/dosbox-staging/branches/all?utf8=%E2%9C%93&query=munt%2F +[`svn/*`]: https://github.com/dosbox-staging/dosbox-staging/branches/all?utf8=%E2%9C%93&query=svn%2F +[`svn/trunk`]: https://github.com/dosbox-staging/dosbox-staging/tree/svn/trunk +[`vogons/*`]: https://github.com/dosbox-staging/dosbox-staging/branches/all?utf8=%E2%9C%93&query=vogons%2F +[`forks/*`]: https://github.com/dosbox-staging/dosbox-staging/branches/all?utf8=%E2%9C%93&query=forks%2F +[git-notes]: https://git-scm.com/docs/git-notes + +[gpl-badge]: https://img.shields.io/badge/license-GPL--2.0--or--later-blue +[discord-badge]: https://img.shields.io/discord/514567252864008206?color=%237289da&logo=discord&logoColor=white&label=discord +[discord]: https://discord.gg/WwAg3Xf +[build-lin1-badge]: https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/Linux%20builds?label=Linux%20(x86_64) +[build-linux]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Linux+builds%22 +[build-lin2-badge]: https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/Platform%20builds?label=Linux%20(ARM,%20S390x) +[build-linux-2]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Platform+builds%22 +[build-win-badge]: https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/Windows%20builds?label=Windows%20(x86,%20x86_64) +[build-win]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22Windows+builds%22 +[build-mac-badge]: https://img.shields.io/github/workflow/status/dosbox-staging/dosbox-staging/macOS%20builds?label=macOS%20(x86_64) +[build-mac]: https://github.com/dosbox-staging/dosbox-staging/actions?query=workflow%3A%22macOS+builds%22 +[coverity-badge]: https://img.shields.io/coverity/scan/dosbox-staging +[lgtm-badge]: https://img.shields.io/lgtm/grade/cpp/github/dosbox-staging/dosbox-staging diff -Nru dosbox-staging-0.76.0/scripts/automator/build/clang-darwin_x86_64 dosbox-staging-0.77.0/scripts/automator/build/clang-darwin_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/clang-darwin_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/clang-darwin_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -ld="ld" - -# OS-and-processor customizations -cflags_release+=(-march=nehalem) - -# Modifier additions -MODIFIERS+=(lto) -cflags_lto=(-flto=thin) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/clang-defaults dosbox-staging-0.77.0/scripts/automator/build/clang-defaults --- dosbox-staging-0.76.0/scripts/automator/build/clang-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/clang-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -# Tool overrides -cc="${ccache}clang${postfix}" -cxx="${ccache}clang++${postfix}" - -# Colorize output only for interactive shells -if [[ $- == *i* ]]; then - cflags+=(-fcolor-diagnostics) -fi - -# ccache can cache Clang's preprocessor pass -if [[ -n "${ccache}" ]]; then - cflags+=(-fpch-preprocess) -fi - -# Release-type additions -TYPES+=(release debug warnmore pgotrain optinfo msan usan) - -cflags_debug+=("${cflags[@]}" -g -fno-omit-frame-pointer) -cxxonly_debug+=("${cxxonly[@]}" -Weffc++ -Wextra-semi) - -# Note: no-math-errno improves optimization of C/C++ math functions -cflags_release+=("${cflags[@]}" -DNDEBUG -O3 -fno-math-errno - -fno-strict-aliasing) - -cflags_warnmore+=("${cflags_debug[@]}" -Wextra -Wshadow -Wcast-align -Wunused - -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion - -Wdouble-promotion -Wformat=2 -fstrict-aliasing -Wstrict-aliasing=2) -cxxonly_warnmore+=("${cxxonly_debug[@]}" -Wnon-virtual-dtor -Woverloaded-virtual) - -cflags_pgotrain+=("${cflags_debug[@]}" -fprofile-instr-generate - -fcoverage-mapping) - -cflags_optinfo+=("${cflags_release[@]}" -Rpass-analysis=loop-vectorize - -gline-tables-only -gcolumn-info) - -cflags_msan=("${cflags_debug[@]}" -fsanitize-recover=all -fPIE -pie - -fsanitize=memory -fno-omit-frame-pointer) -cflags_usan=("${cflags_debug[@]}" -fsanitize-recover=all - -fsanitize=undefined) - -# Modifier additions -MODIFIERS=(fdo) -cflags_fdo+=("-fprofile-sample-use=${FDO_FILE:-${repo_root}/current.afdo}") diff -Nru dosbox-staging-0.76.0/scripts/automator/build/clang-haiku_x86_64 dosbox-staging-0.77.0/scripts/automator/build/clang-haiku_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/clang-haiku_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/clang-haiku_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -ld="ld" diff -Nru dosbox-staging-0.76.0/scripts/automator/build/clang-linux_x86_64 dosbox-staging-0.77.0/scripts/automator/build/clang-linux_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/clang-linux_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/clang-linux_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# Tool additions -ar="llvm-ar${postfix}" -ld="llvm-link${postfix}" -ranlib="llvm-ranlib${postfix}" - -# Modifier additions -MODIFIERS+=(lto) -cflags_lto+=(-O2 -flto=thin) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/clang-msys_nt_x86_64 dosbox-staging-0.77.0/scripts/automator/build/clang-msys_nt_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/clang-msys_nt_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/clang-msys_nt_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# Flag additions -ar="llvm-ar${postfix}" -ld="llvm-link${postfix}" -ranlib="llvm-ranlib${postfix}" -ldflags+=(-static-libgcc) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/compiler-defaults dosbox-staging-0.77.0/scripts/automator/build/compiler-defaults --- dosbox-staging-0.76.0/scripts/automator/build/compiler-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/compiler-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -# Tools and flags for all compilers -VARIABLES=(ar cc cxx ld ranlib arflags cflags cxxonly ldflags libs) -ar="" -cc="" -cxx="" -ld="" -ranlib="" -arflags="${arflags:-Dcr}" -cflags+=(-Wall -pipe) -cxxonly+=("") -ldflags+=("") -libs+=("") - -# Use ccache if it's available -if command -v ccache &> /dev/null; then - ccache="ccache " - # share the cache results - export CCACHE_UMASK="002" - # compress cache results - if [[ -z "${CCACHE_HARDLINK:-}" ]]; then - export CCACHE_COMPRESS=1 - fi - # cache pre-compiled headers - export CCACHE_SLOPPINESS="time_macros" -else - ccache="" -fi diff -Nru dosbox-staging-0.76.0/scripts/automator/build/compiler-icc dosbox-staging-0.77.0/scripts/automator/build/compiler-icc --- dosbox-staging-0.76.0/scripts/automator/build/compiler-icc 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/compiler-icc 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -# Load Intel's setup script from its default install location -# ----------------------------------------------------------- - -# Do we already have the compiler in our path? -if command -v icc &> /dev/null; then - return -fi - -# Is Intel's setup script available? -INTEL_ENV_SETUP="/opt/intel/bin/iccvars.sh" -if [[ ! -f "$INTEL_ENV_SETUP" ]]; then - return -fi - -# Intel uses non-standard machine names, so translate -# what we know, and fallback to the standard otherwise. -if [[ "$machine" == x86_64 ]]; then - ARCH="intel64" -elif [[ "$machine" == "i686" || "$machine" == "i386" ]]; then - ARCH="ia32" -else - ARCH="$machine" -fi - -# Intel expects the OS type to be lower-case -lower_os="$(lower "$os")" - -# Best-effort attempt to load the environment -# Note that it expects "interactive" error handling -set +u -source "$INTEL_ENV_SETUP" -arch "$ARCH" -platform "$lower_os" -set -u - diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-darwin_x86_64 dosbox-staging-0.77.0/scripts/automator/build/gcc-darwin_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-darwin_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-darwin_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -# Tool overrides -ar="ar" -ranlib="ranlib" - -# The oldest processor supported by macOS is nehalem, so we can safely -# enable its full instruction set give all subsequent processors support it. -cflags_release+=(-march=nehalem) -cflags_optinfo+=(-march=nehalem) - -# Modifier additions -MODIFIERS+=(lto) -cflags_lto+=(-flto) -ldflags_lto+=("${cflags[@]}" -flto) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-defaults dosbox-staging-0.77.0/scripts/automator/build/gcc-defaults --- dosbox-staging-0.76.0/scripts/automator/build/gcc-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -# Tool overrides -ar="gcc-ar${postfix}" -cc="${ccache}gcc${postfix}" -cxx="${ccache}g++${postfix}" -ld="gcc${postfix}" -ranlib="gcc-ranlib${postfix}" -cflags+=(-fdiagnostics-color=auto) - -# ccache can cache GCC's preprocessor pass -if [[ -n "${ccache}" ]]; then - cflags+=(-fpch-preprocess) -fi - -# Release-type additions -TYPES+=(release debug warnmore pgotrain fdotrain optinfo - asan uasan usan tsan) - -cflags_debug+=("${cflags[@]}" -g -fstack-protector -fno-omit-frame-pointer) -cxxonly_debug+=("${cxxonly[@]}" -Weffc++) - -# Note: associative-math is needed for vectorization of floating point -# calculations, which also relies on no-signed-zeros and -# no-trapping-math. -cflags_release+=("${cflags[@]}" -DNDEBUG -O3 -fstrict-aliasing - -fno-signed-zeros -fno-trapping-math -fassociative-math - -frename-registers -ffunction-sections -fdata-sections) - -cflags_warnmore+=("${cflags_debug[@]}" -pedantic -Wcast-align -Wdouble-promotion - -Wduplicated-branches -Wduplicated-cond -Wextra -Wformat=2 - -Wlogical-op -Wmisleading-indentation -Wnull-dereference - -Wshadow -Wunused -fstrict-aliasing -Wstrict-aliasing=2 - -Wextra-semi) -cxxonly_warnmore+=("${cxxonly_debug[@]}" -Wnon-virtual-dtor -Woverloaded-virtual - -Wuseless-cast) - -cflags_pgotrain+=("${cflags_debug[@]}" -pg -ftree-vectorize) - -cflags_fdotrain+=("${cflags[@]}" -DNDEBUG -g1 -fno-omit-frame-pointer) - -cflags_optinfo+=("${cflags_release[@]}" -fopt-info-all - -ftree-vectorizer-verbose=6) - -cflags_asan+=("${cflags_debug[@]}" -fsanitize=address) -ldflags_asan+=(-static-libasan) -cflags_uasan+=("${cflags_debug[@]}" -fsanitize=address,undefined - -fsanitize-recover=signed-integer-overflow) -ldflags_uasan+=(-static-libasan) -cflags_usan+=("${cflags_debug[@]}" -fsanitize=undefined - -fsanitize-recover=signed-integer-overflow) -cflags_tsan+=("${cflags_debug[@]}" -fsanitize=thread) - -# Modifier additions -MODIFIERS=(lto fdo) -# Override the prior optimization flag because O2 does better w/ feedback -cflags_fdo+=("-O2 -ftree-vectorize - -fauto-profile=${FDO_FILE:-${repo_root}/current.afdo}") - -cflags_lto+=(-flto) -ldflags_lto+=("${cflags[@]}" "-flto=$(( $(nproc) + 2 ))") diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-haiku_x86_64 dosbox-staging-0.77.0/scripts/automator/build/gcc-haiku_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-haiku_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-haiku_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# Tool additions -ldflags+=(-Wl,--as-needed) - -# Enable math vectorizions using instructions available in circa-2008+ CPUs -x86_math=(-mfpmath=sse -msse4.2) -cflags_release+=("${x86_math[@]}") -cflags_optinfo+=("${x86_math[@]}") diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_aarch64 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_aarch64 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_aarch64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_aarch64 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# GCC flags for generically identified AArch64 -# Note: Advanced SIMD (aka NEON) is mandatory for AArch64 and implied - -# Note: NEON SIMD instructions for floating-point operations are -# not generated by GCC’s auto-vectorization pass unless -# -funsafe-math-optimizations is also specified. This is because -# NEON hardware does not fully implement the IEEE 754 standard for -# some floating-point arithmetic operations, specifically -# "denormal" values are treated as zero, so in these corner-cases, -# the use of NEON instructions may lead to a loss of precision. -# For our purposes, we expect to perform normal calculations and -# thus accept this risk for release builds. - -cflags_release+=(-mcpu=native -funsafe-math-optimizations -mstrict-align) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_armv6 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_armv6 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_armv6 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_armv6 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# GCC flags for generically identified ARMv6 SBCs -cflags_release+=(-marm -mfpu=vfpv2 -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_armv7l dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_armv7l --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_armv7l 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_armv7l 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# GCC flags for generically identified ARMv7 SBCs - -# Note: NEON SIMD instructions for floating-point operations are -# not generated by GCC’s auto-vectorization pass unless -# -funsafe-math-optimizations is also specified. This is because -# NEON hardware does not fully implement the IEEE 754 standard for -# some floating-point arithmetic operations, specifically -# "denormal" values are treated as zero, so in these corner-cases, -# the use of NEON instructions may lead to a loss of precision. -# For our purposes, we expect to perform normal calculations and -# thus accept this risk for release builds. - -cflags_release+=(-mcpu=generic-armv7-a -march=armv7-a -mfloat-abi=hard - -funsafe-math-optimizations -mfpu=auto) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_armv7_mali dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_armv7_mali --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_armv7_mali 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_armv7_mali 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -# GCC flags for generically identified ARMv7 MALI SBCs - -# Note: NEON SIMD instructions for floating-point operations are -# not generated by GCC’s auto-vectorization pass unless -# -funsafe-math-optimizations is also specified. This is because -# NEON hardware does not fully implement the IEEE 754 standard for -# some floating-point arithmetic operations, specifically -# "denormal" values are treated as zero, so in these corner-cases, -# the use of NEON instructions may lead to a loss of precision. -# For our purposes, we expect to perform normal calculations and -# thus accept this risk for release builds. - -cflags_release+=(-march=armv7-a -funsafe-math-optimizations -mfpu=neon-vfpv4 -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_imx6 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_imx6 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_imx6 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_imx6 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# GCC flags specific to NXP's series of i.MX 6 SBCs -cflags_release+=(-march=armv7-a -mfpu=neon -mtune=cortex-a9 - -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_odroid_c1 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_odroid_c1 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_odroid_c1 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_odroid_c1 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# GCC flags specific to Hardkernel Co's ODROID-C1 SBC -cflags_release+=(-mcpu=cortex-a5 -mfpu=neon-vfpv4 -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_odroid_c2 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_odroid_c2 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_odroid_c2 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_odroid_c2 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# GCC flags specific to Hardkernel Co's ODROID-C2 SBC -cflags_release+=(-march=armv8-a+crc -mtune=cortex-a53 - -mfpu=neon-fp-armv8) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_odroid_xu dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_odroid_xu --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_odroid_xu 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_odroid_xu 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# GCC flags specific to Hardkernel Co's ODROID-XU SBC -cflags_release+=(-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_ppc64le dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_ppc64le --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_ppc64le 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_ppc64le 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# GCC flags specific to the IBM POWER8 platform -cflags_release+=(-mcpu=power8) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi1 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi1 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi1 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi1 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# GCC flags specific to the Raspberry Pi 1 series of SBC -cflags_release+=(-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi2 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi2 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi2 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi2 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -# GCC flags specific to the Raspberry Pi 2 series of SBC - -# Note: NEON SIMD instructions for floating-point operations are -# not generated by GCC’s auto-vectorization pass unless -# -funsafe-math-optimizations is also specified. This is because -# NEON hardware does not fully implement the IEEE 754 standard for -# some floating-point arithmetic operations, specifically -# "denormal" values are treated as zero, so in these corner-cases, -# the use of NEON instructions may lead to a loss of precision. -# For our purposes, we expect to perform normal calculations and -# thus accept this risk for release builds. - -cflags_release+=(-mcpu=cortex-a7 -funsafe-math-optimizations -mfpu=neon-vfpv4 -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi3 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi3 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi3 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi3 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -# GCC flags specific to the Raspberry Pi 3 series of SBC - -# Note: NEON SIMD instructions for floating-point operations are -# not generated by GCC’s auto-vectorization pass unless -# -funsafe-math-optimizations is also specified. This is because -# NEON hardware does not fully implement the IEEE 754 standard for -# some floating-point arithmetic operations, specifically -# "denormal" values are treated as zero, so in these corner-cases, -# the use of NEON instructions may lead to a loss of precision. -# For our purposes, we expect to perform normal calculations and -# thus accept this risk for release builds. - -cflags_release+=(-march=armv8-a+crc -mtune=cortex-a53 -funsafe-math-optimizations - -mfpu=neon-fp-armv8 -mfloat-abi=hard) - diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi4 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi4 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_rpi4 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_rpi4 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# GCC flags specific to the Raspberry Pi 4 series of SBC - -# Note: NEON SIMD instructions for floating-point operations are -# not generated by GCC’s auto-vectorization pass unless -# -funsafe-math-optimizations is also specified. This is because -# NEON hardware does not fully implement the IEEE 754 standard for -# some floating-point arithmetic operations, specifically -# "denormal" values are treated as zero, so in these corner-cases, -# the use of NEON instructions may lead to a loss of precision. -# For our purposes, we expect to perform normal calculations and -# thus accept this risk for release builds. - -cflags_release+=(-march=armv8-a+crc -mtune=cortex-a72 -funsafe-math-optimizations - -mfpu=neon-fp-armv8 -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_s390x dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_s390x --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_s390x 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_s390x 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# GCC flags for the IBM S/390 and zSeries platform - -# Defaults include: -# -mlong-double-128, 128-bit long doubles -# -m64, generate 64-bit instructions -# -mfused-madd, use floating point multiply and accumulate instructions - -cflags_release+=(-march=native -mhard-float) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_tinker dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_tinker --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_tinker 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_tinker 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# GCC flags specific to the ASUS Tinker Board SBC -cflags_release+=(-marm -march=armv7-a -mtune=cortex-a17 -mfpu=neon-vfpv4 - -mfloat-abi=hard) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_vero4k dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_vero4k --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_vero4k 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_vero4k 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# GCC flags specific to the OSMC Vero 4K SBC -cflags_release+=(-mcpu=cortex-a7 -mfpu=neon-vfpv4) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_x86_64 dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-linux_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-linux_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# Tool additions -ldflags+=(-Wl,--as-needed) - -# Enable math vectorizions using instructions available in circa-2008+ CPUs -x86_math=(-mfpmath=sse -msse4.2) -cflags_release+=("${x86_math[@]}") -cflags_optinfo+=("${x86_math[@]}") diff -Nru dosbox-staging-0.76.0/scripts/automator/build/gcc-msys_nt_x86_64 dosbox-staging-0.77.0/scripts/automator/build/gcc-msys_nt_x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/gcc-msys_nt_x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/gcc-msys_nt_x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# Enable math vectorizations using instructions available in circa-2008+ CPUs -x86_math=(-mfpmath=sse -msse4.2) -cflags_release+=("${x86_math[@]}") -cflags_optinfo+=("${x86_math[@]}") - -# Flag additions -ldflags+=(-Wl,--as-needed -static-libgcc -static-libstdc++) - diff -Nru dosbox-staging-0.76.0/scripts/automator/build/icc-defaults dosbox-staging-0.77.0/scripts/automator/build/icc-defaults --- dosbox-staging-0.76.0/scripts/automator/build/icc-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/icc-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -# Tool overrides -ar="ixar" -cc="${ccache}icc" -cxx="${ccache}icpc" -ld="ixld" - -# Supported build types -TYPES+=(debug release optinfo) - -cflags_debug+=("${cflags[@]}" -g) -cxxonly_debug+=("${cxxonly[@]}" -Weffc++ -diag-disable=2012,2015) -# 2012 warns about using #define's instead of constexpr (too noisy) -# 2015 warns about using /* comments */ instead of // comments (too noisy) - -cflags_release+=("${cflags[@]}" -O3 -xHost -DNDEBUG) - -# Places optimization report files (*.optrpt) along-side source -cflags_optinfo+=("${cflags_debug[@]}" "${cflags_release[@]}" - -diag-remark=vec -qopt-report=5 -qopt-report-phase=vec,loop) -cxxonly_optinfo+=("${cxxonly_debug[@]}") diff -Nru dosbox-staging-0.76.0/scripts/automator/build/machine-vero4k dosbox-staging-0.77.0/scripts/automator/build/machine-vero4k --- dosbox-staging-0.76.0/scripts/automator/build/machine-vero4k 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/machine-vero4k 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# Universal flags specific to the OSMC Vero 4K SBC -cflags+=(-I/opt/vero3/include) -ldflags+=(-L/opt/vero3/lib) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/machine-x86_64 dosbox-staging-0.77.0/scripts/automator/build/machine-x86_64 --- dosbox-staging-0.76.0/scripts/automator/build/machine-x86_64 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/machine-x86_64 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Universal additions for gcc and clang, but specific to x86_64: - -MODIFIERS+=(native) -cflags_native+=(-march=native) diff -Nru dosbox-staging-0.76.0/scripts/automator/build/os-darwin dosbox-staging-0.77.0/scripts/automator/build/os-darwin --- dosbox-staging-0.76.0/scripts/automator/build/os-darwin 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/os-darwin 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -# Tool and flag overrides for Darwin, regardless of compiler -ar="ar" -arflags="cr" -ranlib="ranlib" - -function make_binary() { - # Limit GCC to ASCII-only characters - LC_ALL=C LANG=en_US LANGUAGE=en_US \ - gmake \ - ARFLAGS="${ARFLAGS}" \ - --jobs="$(sysctl -n hw.physicalcpu)" \ - --output-sync=line \ - 2>&1 | tee build.log -} -dependencies=(otool -L "${executable}") diff -Nru dosbox-staging-0.76.0/scripts/automator/build/os-defaults dosbox-staging-0.77.0/scripts/automator/build/os-defaults --- dosbox-staging-0.76.0/scripts/automator/build/os-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/os-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -# Steps in-common to all OSes, plus some helper variables and functions. - -STEPS=(pre_build clean autogen configure make_binary strip_binary dependencies ccache_stats post_build) - -executable="src/dosbox" -dependencies=(ldd "${executable}") - -function pre_build() { - cd ../.. - underline "Environment" - echo "[$(${CC} --version | head -1)]" - export_names=() - for v in "${VARIABLES[@]}"; do - vupper=$(upper "${v}") - echo "${vupper}=\"$(eval echo \$"${vupper}")\"" - export_names+=($vupper) - done - echo "export ${export_names[@]}" CXXFLAGS=\"\${CFLAGS} \${CXXONLY}\" - underline "Launching" -} - -function stamp() { - echo "${compiler}-${selected_type}-${modifiers[*]}" -} - -function autogen() { - if [[ ! -f configure || configure.ac -nt configure ]]; then - ./autogen.sh - fi -} - -function configure() { - if [[ ! -f Makefile || ! -f .previous_build || configure -nt Makefile ]]; then - export CXXFLAGS="${CFLAGS} ${CXXONLY}" - if ! ./configure --enable-core-inline ${configure_additions[*]}; then - echo "Failed to configure.. dumping the log:" - cat config.log - exit 1 - fi - fi -} - -function ccache_stats() { - if [[ -n "${ccache}" ]]; then - underline "Cache statistics" "-" - ccache -s | grep --color=never 'hit\|size' - fi -} - -function strip_binary() { - if [[ "${selected_type}" == "release" ]]; then - strip "${executable}" - fi -} - -function post_build() { - underline "Binary" "-" - ls -1lh "${executable}" - stamp > .previous_build -} - -function clean() { - stamp > .current_build - if [[ -f Makefile ]]; then - if [[ ! -f .previous_build ]] || ! diff -q .previous_build .current_build &> /dev/null; then - rm -f .previous_build - echo "cleaning, this is a different build type" - make clean &> clean.log || cat clean.log - fi - fi -} diff -Nru dosbox-staging-0.76.0/scripts/automator/build/os-haiku dosbox-staging-0.77.0/scripts/automator/build/os-haiku --- dosbox-staging-0.76.0/scripts/automator/build/os-haiku 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/os-haiku 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -cflags+=(-fPIC) - -function make_binary() { - make \ - ARFLAGS="${ARFLAGS}" \ - --jobs="$(nproc)" \ - --output-sync=line \ - |& tee build.log -} - -dependencies=(objdump -afp "${executable}") diff -Nru dosbox-staging-0.76.0/scripts/automator/build/os-linux dosbox-staging-0.77.0/scripts/automator/build/os-linux --- dosbox-staging-0.76.0/scripts/automator/build/os-linux 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/os-linux 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash -function make_binary() { - # Limit GCC to ASCII-only characters - LC_ALL=C LANG=en_US LANGUAGE=en_US \ - make \ - ARFLAGS="${ARFLAGS}" \ - --jobs="$(nproc)" \ - --output-sync=line \ - |& tee build.log -} diff -Nru dosbox-staging-0.76.0/scripts/automator/build/os-msys_nt dosbox-staging-0.77.0/scripts/automator/build/os-msys_nt --- dosbox-staging-0.76.0/scripts/automator/build/os-msys_nt 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/build/os-msys_nt 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -function make_binary() { - # Limit GCC to ASCII-only characters - LC_ALL=C LANG=en_US LANGUAGE=en_US \ - make \ - ARFLAGS="${ARFLAGS}" \ - --jobs=$(nproc) \ - --output-sync=line \ - |& tee build.log -} -executable="src/dosbox.exe" diff -Nru dosbox-staging-0.76.0/scripts/automator/main.sh dosbox-staging-0.77.0/scripts/automator/main.sh --- dosbox-staging-0.76.0/scripts/automator/main.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/main.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019-2020 Kevin R Croft -# SPDX-License-Identifier: GPL-2.0-or-later - -# Automator is a generic automation tool that helps separate data -# from logical code. It uses one or more "variables" files placed -# in a single sub-directory, that are sourced in logical succession, -# such as variables defined in earlier files are either added-to or -# overridden in subsequent files. -# -# For a thorough example, see scripts/build.sh and its data files -# in scripts/automator/build. -# -# TODO: This script manages variables using eval meta-programming. -# Although the syntax is quite readable under bash 4.x, -# we have limited our syntax to the uglier and heavier bash 3.x -# because Apple is still only shipping bash 3.x, even on their -# latest operating system (Nov-2019). -# -# Future work might involve switching this to python and using YAML -# syntax in the variables files. Python's dictionaries can be -# merged or have their values overridden, and key names can be readily -# manipulated. -# -set -euo pipefail - -function underline() { - echo "" - echo "$1" - echo "${1//?/${2:--}}" -} - -function lower() { - echo "${1}" | tr '[:upper:]' '[:lower:]' -} - -function upper() { - echo "${1}" | tr '[:lower:]' '[:upper:]' -} - -function arg_error() { - local PURPLE='\033[0;34m' - local BLACK='\033[0;30m' - local ON_WHITE='\033[47m' - local NO_COLOR='\033[0m' - >&2 echo -e "Please specify the ${BLACK}${ON_WHITE}${1}${NO_COLOR} argument with one of: ${PURPLE}${2}${NO_COLOR}" - exit 1 -} - -function import() { # arguments: category instance - category=$(lower "${1}") - instance=$(lower "${2}") - if [[ -z "$instance" ]]; then - instances=( "$(find "${data_dir}" -name "${category}-*" -a ! -name '*defaults' | sed 's/.*-//' | xargs)" ) - arg_error "--${category}" "${instances[*]}" - else for instance in defaults "${instance}"; do - varfile="${data_dir}/${category}-${instance}" - # shellcheck disable=SC1090,SC1091 - if [[ -f "$varfile" ]]; then source "$varfile" - else >&2 echo "${varfile} does not exist, skipping"; fi; done - fi -} - -function construct_environment() { - # underline "Environment" - for base_var in "${VARIABLES[@]}"; do - # First check if we have a build-specific variable - # shellcheck disable=SC2154 - if [[ -n "$(eval 'echo ${'"${base_var}_${selected_type}"'[*]:-}')" ]]; then - var_name="${base_var}_${selected_type}" - # Otherwise fallback to the default variable - else var_name="${base_var}"; fi - - # Aggregate any modifiers, which are stand-alone arguments - mod_values="" - # shellcheck disable=SC2154 - for mod_upper in "${modifiers[@]}"; do - mod=$(lower "${mod_upper}") - # Mods can only add options to existing VARs, so we check for those - if [[ -n "$(eval 'echo ${'"${base_var}_${mod}"'[*]:-}')" ]]; then - var_with_mod="${base_var}_${mod}" - # shellcheck disable=SC2034 - mod_values=$(eval 'echo ${mod_values} ${'"${var_with_mod}"'[*]}') - fi - done - - # Expand our variable array (or scalar) and combine it with our aggregated - # modification string. Echo takes care of spacing out our variables without - # explicit padding, because it either drops empty variables or adds spaces - # between them if they exist. - # shellcheck disable=SC2034 - combined=$(eval 'echo ${'"${var_name}"'[*]} ${mod_values}') - env_var=$(upper "${base_var}") - eval 'export '"${env_var}"'="${combined}"' - # echo "${env_var}=\"$(eval echo \$"${env_var}")\"" - done -} - -function perform_steps() { - # underline "Launching" - for step in "${STEPS[@]}"; do - if type -t "$step" | grep -q function; then "$step" - else - # eval 'echo ${'"${step}"'[*]}' - eval '${'"${step}"'[*]}' - fi - done -} - -function main() { - cd "$(dirname "$0")"/.. - export repo_root - repo_root="$PWD" - cd scripts/automator - if [[ -z "${data_dir:-}" ]]; then data_dir="$(basename "$0" '.sh')"; fi - parse_args "$@" - construct_environment - perform_steps -} - -main "$@" - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/clang-brew dosbox-staging-0.77.0/scripts/automator/packages/clang-brew --- dosbox-staging-0.76.0/scripts/automator/packages/clang-brew 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/clang-brew 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# Brew does not supply "clang", so exclude it here -compiler="" - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/clang-defaults dosbox-staging-0.77.0/scripts/automator/packages/clang-defaults --- dosbox-staging-0.76.0/scripts/automator/packages/clang-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/clang-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -compiler=(clang${postfix}) - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/clang-haikuports dosbox-staging-0.77.0/scripts/automator/packages/clang-haikuports --- dosbox-staging-0.76.0/scripts/automator/packages/clang-haikuports 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/clang-haikuports 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -compiler=(llvm${postfix}_clang) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/clang-macports dosbox-staging-0.77.0/scripts/automator/packages/clang-macports --- dosbox-staging-0.76.0/scripts/automator/packages/clang-macports 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/clang-macports 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# macports doesn't supply Clang, so knock it out here -compiler="" diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/clang-msys2 dosbox-staging-0.77.0/scripts/automator/packages/clang-msys2 --- dosbox-staging-0.76.0/scripts/automator/packages/clang-msys2 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/clang-msys2 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Under MSYS2, only the 'default' version is available, so we don't postfix the package -compiler="mingw-w64-${pkg_type}-${selected_type}" - - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/clang-vcpkg dosbox-staging-0.77.0/scripts/automator/packages/clang-vcpkg --- dosbox-staging-0.76.0/scripts/automator/packages/clang-vcpkg 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/clang-vcpkg 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# vcpkg doesn't provide clang or gcc, because it assumes you're using MS VisualStudio. -# So we knock out the compiler. -compiler="" - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/gcc-apt dosbox-staging-0.77.0/scripts/automator/packages/gcc-apt --- dosbox-staging-0.76.0/scripts/automator/packages/gcc-apt 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/gcc-apt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -compiler=(g++${postfix}) - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/gcc-defaults dosbox-staging-0.77.0/scripts/automator/packages/gcc-defaults --- dosbox-staging-0.76.0/scripts/automator/packages/gcc-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/gcc-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -compiler=(gcc${postfix}) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/gcc-dnf dosbox-staging-0.77.0/scripts/automator/packages/gcc-dnf --- dosbox-staging-0.76.0/scripts/automator/packages/gcc-dnf 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/gcc-dnf 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# DNF provides a 'default' version of gcc is available, so we avoid post-fixing the version -compiler=(gcc g++) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/gcc-msys2 dosbox-staging-0.77.0/scripts/automator/packages/gcc-msys2 --- dosbox-staging-0.76.0/scripts/automator/packages/gcc-msys2 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/gcc-msys2 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# Under MSYS2 only the 'default' version of gcc is available, so we don't postfix it with the version -compiler="mingw-w64-${pkg_type}-${selected_type}" - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/gcc-vcpkg dosbox-staging-0.77.0/scripts/automator/packages/gcc-vcpkg --- dosbox-staging-0.76.0/scripts/automator/packages/gcc-vcpkg 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/gcc-vcpkg 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# vcpkg doesn't provide clang or gcc, because it assumes you're using MS VisualStudio. -# So we knock out the compiler. -compiler="" - diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-apt dosbox-staging-0.77.0/scripts/automator/packages/manager-apt --- dosbox-staging-0.76.0/scripts/automator/packages/manager-apt 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-apt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# Package repo: https://packages.ubuntu.com/ -packages+=(ccache libtool build-essential automake libpng-dev libsdl2-dev libsdl2-net-dev libncurses-dev libopusfile-dev libfluidsynth-dev) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-brew dosbox-staging-0.77.0/scripts/automator/packages/manager-brew --- dosbox-staging-0.76.0/scripts/automator/packages/manager-brew 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-brew 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# Package repo: https://formulae.brew.sh/ -delim="@" -packages+=(ccache coreutils autogen autoconf automake make pkg-config libpng ncurses sdl2 sdl2_net opusfile fluid-synth) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-defaults dosbox-staging-0.77.0/scripts/automator/packages/manager-defaults --- dosbox-staging-0.76.0/scripts/automator/packages/manager-defaults 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-defaults 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -VARIABLES=(packages bits delim compiler) -TYPES=(gcc clang) - -packages=(zstd) -delim="-" -compiler="" - -STEPS=(print) -function print() { - filtered=(${PACKAGES[@]}) - for exclude in ${excludes[@]}; do - filtered=(${filtered[@]//*"${exclude}"*/}) - done - echo "${filtered[*]}" "${COMPILER}" -} diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-dnf dosbox-staging-0.77.0/scripts/automator/packages/manager-dnf --- dosbox-staging-0.76.0/scripts/automator/packages/manager-dnf 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-dnf 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# Package repo: https://apps.fedoraproject.org/packages/ -packages+=(ccache make automake alsa-lib-devel libpng-devel SDL2-devel - SDL2_net-devel opusfile-devel fluidsynth-devel) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-haikuports dosbox-staging-0.77.0/scripts/automator/packages/manager-haikuports --- dosbox-staging-0.76.0/scripts/automator/packages/manager-haikuports 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-haikuports 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# Package repo: https://depot.haiku-os.org -delim="" -packages+=(ccache coreutils autoconf automake autoconf_archive - pkgconfig libpng ncurses6_devel libsdl2_devel - sdl2_net_devel libogg_devel opus_devel opusfile_devel - gcc_syslibs_devel opus_tools fluidsynth2_devel) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-macports dosbox-staging-0.77.0/scripts/automator/packages/manager-macports --- dosbox-staging-0.76.0/scripts/automator/packages/manager-macports 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-macports 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# Package repo: https://www.macports.org/ports.php?by=name -delim="" -packages+=(ccache coreutils autogen autoconf automake pkgconfig libpng ncurses libsdl2 libsdl2_net opusfile fluidsynth) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-msys2 dosbox-staging-0.77.0/scripts/automator/packages/manager-msys2 --- dosbox-staging-0.76.0/scripts/automator/packages/manager-msys2 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-msys2 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# Package repo: https://packages.msys2.org/base -# MSYS2 only supports the current latest releases of Clang and GCC, so we disable version customization -packages+=(autogen autoconf base-devel automake-wrapper binutils) -pkg_type=$([[ "${bits}" == "64" ]] && echo "x86_64" || echo "i686") -for pkg in ccache pkg-config libtool libpng zlib ncurses pdcurses SDL2 SDL2_net opusfile fluidsynth; do - packages+=("mingw-w64-${pkg_type}-${pkg}") -done diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-pacman dosbox-staging-0.77.0/scripts/automator/packages/manager-pacman --- dosbox-staging-0.76.0/scripts/automator/packages/manager-pacman 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-pacman 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Package repo: https://www.archlinux.org/packages/ -# Arch offers 32-bit versions of SDL (but not others) -packages+=(ccache libtool ncurses sdl2_net opusfile fluidsynth) -[[ "${bits}" == "32" ]] && packages+=(lib32-sdl2) || packages+=(sdl2) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-vcpkg dosbox-staging-0.77.0/scripts/automator/packages/manager-vcpkg --- dosbox-staging-0.76.0/scripts/automator/packages/manager-vcpkg 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-vcpkg 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# Package repo: https://repology.org/projects/?inrepo=vcpkg -packages+=(libpng pdcurses sdl2 sdl2-net opusfile fluidsynth) diff -Nru dosbox-staging-0.76.0/scripts/automator/packages/manager-zypper dosbox-staging-0.77.0/scripts/automator/packages/manager-zypper --- dosbox-staging-0.76.0/scripts/automator/packages/manager-zypper 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/automator/packages/manager-zypper 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -# Package repo: https://pkgs.org/ -# openSUSE offers 32-bit versions of SDL and SDL_net (but not others) -packages+=(ccache devel_basis xvfb libtool opusfile) - -if [[ "${bits}" == "32" ]]; then - packages+=(ncurses-devel-32bit libSDL2-devel-32bit libSDL2_net-devel-32bit) -else - packages+=(ncurses-devel SDL2 SDL2_net fluidsynth-devel) -fi diff -Nru dosbox-staging-0.76.0/scripts/build.sh dosbox-staging-0.77.0/scripts/build.sh --- dosbox-staging-0.76.0/scripts/build.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/build.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019-2020 Kevin R Croft -# SPDX-License-Identifier: GPL-2.0-or-later - -# This script builds the software for the given build-type (release, -# debug, ... ) and compiler (gcc or clang). -# -# If run without arguments, the script asks for required arguments one -# by one, which includes the above two (--compiler and --build-type). -# -# Optional arguments allow specifying the version of compiler, -# machine type, and applying build modifiers such as: -# - link-time-optimizations (--modifier lto), -# - feedback-directed-optimizations (--modifier fdo) -# - current processor instructions sets (--modifier native) -# All modifiers are available simulatenously. -# -# Usage examples: -# $ ./build.sh # asks for a compiler -# $ ./build.sh --compiler gcc # asks for a build-type -# $ ./build.sh --compiler clang --build-type debug # builds! -# $ ./build.sh -c gcc -t release -m lto -m native # builds! -# -# This script makes use of the automator package, see automator/main.sh. -# -set -euo pipefail - -# Detects the machine type and sets the 'machine' variable -function query_machine() { - # Start with a sane and safe default - machine="$(uname -m | sed 's/-.*//')" - - # Only attempt further detection on Linux-based systems - if [[ ! -f /proc/cpuinfo ]]; then - return - fi - # ARM differentiation based on - # https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/system.sh - case "$(sed -n '/^Hardware/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo)" in - BCM*) - # calculated based on information from - # https://github.com/AndrewFromMelbourne/raspberry_pi_revision - local rev - rev="0x$(sed -n '/^Revision/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo)" - # if bit 23 is not set, we are on a rpi1 - # (bit 23 means the revision is a bitfield) - if [[ $((("$rev" >> 23) & 1)) -eq 0 ]]; then - machine="rpi1" - else - # if bit 23 is set, get the cpu from bits 12-15 - local cpu - cpu=$((("$rev" >> 12) & 15)) - case $cpu in - 0) - machine="rpi1" - ;; - 1) - machine="rpi2" - ;; - 2) - machine="rpi3" - ;; - 3) - machine="rpi4" - ;; - esac - fi - ;; - ODROIDC) - machine="odroid_c1" - ;; - ODROID-C2) - machine="odroid_c2" - ;; - "Freescale i.MX6 Quad/DualLite (Device Tree)") - machine="imx6" - ;; - ODROID-XU[34]) - machine="odroid_xu" - ;; - "Rockchip (Device Tree)") - machine="tinker" - ;; - Vero4K|Vero4KPlus) - machine="vero4k" - ;; - "Allwinner sun8i Family") - machine="armv7_mali" - ;; - *) - ;; - esac -} - -function parse_args() { - # Gather the parameters that define this build - postfix="" - modifiers=("") - configure_additions=("") - while [[ "${#}" -gt 0 ]]; do case ${1} in - -c|--compiler) compiler="${2}"; shift 2;; - -v|--version-postfix) postfix="-${2}"; shift 2;; - -t|--build-type) selected_type="${2}"; shift 2;; - -m|--modifier) modifiers+=("${2}"); shift 2;; - -p|--bin-path) PATH="${2}:${PATH}"; shift 2;; - -a|--machine) machine="${2}"; shift 2;; - *) configure_additions+=("${1}"); shift;; - esac; done - - # Determine and import machine-specific rules - if [[ -z "${machine:-}" ]]; then - query_machine - fi - import machine "${machine}" - - # Determine and import OS-specific rules - os="$(uname -s | sed 's/-.*//')" - import os "${os}" - - # Import compiler rules, plus any OS + machine customizations - import compiler "${compiler:-}" - import "${compiler:-}" "${os}_${machine}" - if [[ -z "${selected_type:-}" ]]; then - arg_error "--build-type" "${TYPES[*]}" - fi - - # Create a pretty modifier string that we can add to our build-type - printf -v mod_string '+%s' "${modifiers[@]:1}" - if [[ "${mod_string}" == "+" ]]; then - mod_string="" - fi - - # Print a summary of our build configuration - underline "Compiling a ${selected_type}${mod_string} build using "` - `"${compiler}${postfix} on ${os}-${machine}" "=" - - # Ensure our selected_type is lower-case before proceeding - selected_type=$(lower "${selected_type}") -} - -script_dir="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" -# shellcheck source=scripts/automator/main.sh -source "$script_dir/automator/main.sh" diff -Nru dosbox-staging-0.76.0/scripts/count-clang-bugs.py dosbox-staging-0.77.0/scripts/count-clang-bugs.py --- dosbox-staging-0.76.0/scripts/count-clang-bugs.py 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/count-clang-bugs.py 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/usr/bin/python3 -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Patryk Obara """ This script prints a summary snippet of information out of reports diff -Nru dosbox-staging-0.76.0/scripts/count-pvs-bugs.py dosbox-staging-0.77.0/scripts/count-pvs-bugs.py --- dosbox-staging-0.76.0/scripts/count-pvs-bugs.py 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/count-pvs-bugs.py 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/usr/bin/python3 -# Copyright (C) 2020 Kevin Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020-2021 Kevin R. Croft """ Count the number of issues found in an PVS-Studio report. diff -Nru dosbox-staging-0.76.0/scripts/count-warnings.py dosbox-staging-0.77.0/scripts/count-warnings.py --- dosbox-staging-0.76.0/scripts/count-warnings.py 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/count-warnings.py 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,9 @@ #!/usr/bin/python3 -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later # +# Copyright (C) 2019-2021 Patryk Obara + # pylint: disable=invalid-name # pylint: disable=missing-docstring diff -Nru dosbox-staging-0.76.0/scripts/count-xsan-issues.py dosbox-staging-0.77.0/scripts/count-xsan-issues.py --- dosbox-staging-0.76.0/scripts/count-xsan-issues.py 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/count-xsan-issues.py 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,9 @@ #!/usr/bin/python3 -# Copyright (C) 2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later # +# Copyright (C) 2020-2021 Patryk Obara + # pylint: disable=invalid-name # pylint: disable=missing-docstring diff -Nru dosbox-staging-0.76.0/scripts/dosbox-installer.nsi dosbox-staging-0.77.0/scripts/dosbox-installer.nsi --- dosbox-staging-0.76.0/scripts/dosbox-installer.nsi 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/dosbox-installer.nsi 2021-07-02 15:47:39.000000000 +0000 @@ -2,7 +2,7 @@ !define VER_MINOR 74 !define APP_NAME "DOSBox ${VER_MAYOR}.${VER_MINOR} Installer" !define COMP_NAME "DOSBox Team" -!define COPYRIGHT "Copyright Š 2002-2020 DOSBox Team" +!define COPYRIGHT "Copyright Š 2002-2021 DOSBox Team" !define DESCRIPTION "DOSBox Installer" VIProductVersion "${VER_MAYOR}.${VER_MINOR}.0.0" diff -Nru dosbox-staging-0.76.0/scripts/dump-preprocessor-defines.sh dosbox-staging-0.77.0/scripts/dump-preprocessor-defines.sh --- dosbox-staging-0.76.0/scripts/dump-preprocessor-defines.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/dump-preprocessor-defines.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,9 @@ #!/bin/bash -# Copyright (C) 2020 Kevin Croft # SPDX-License-Identifier: GPL-2.0-or-later # +# Copyright (C) 2020-2021 Kevin R. Croft + # This script captures pre-processor #define statements # matching the as-compiled state of the source file. # The script runs recursively for all source files, and diff -Nru dosbox-staging-0.76.0/scripts/fetch-workflows.sh dosbox-staging-0.77.0/scripts/fetch-workflows.sh --- dosbox-staging-0.76.0/scripts/fetch-workflows.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/fetch-workflows.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (C) 2020 Kevin R Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020-2021 Kevin R. Croft ## # This script craws the current repo's GitHub workflow content. diff -Nru dosbox-staging-0.76.0/scripts/format-commit.sh dosbox-staging-0.77.0/scripts/format-commit.sh --- dosbox-staging-0.76.0/scripts/format-commit.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/format-commit.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,10 @@ -#!/bin/bash -e +#!/bin/bash + +set -eu # SPDX-License-Identifier: GPL-2.0-or-later # -# Copyright (C) 2020 Patryk Obara +# Copyright (C) 2020-2021 Patryk Obara readonly SCRIPT=$(basename "$0") @@ -40,7 +42,7 @@ } main () { - case $1 in + case ${1:-} in -h|-help|--help) print_usage ;; -d|--diff) handle_dependencies ; shift ; format "$@" ; assert_empty_diff ;; -V|--verify) handle_dependencies ; shift ; format "$@" ; assert_empty_diff ;; @@ -50,8 +52,29 @@ } handle_dependencies () { - assert_min_version git 1007010 "Use git in version 1.7.10 or newer." - assert_min_version clang-format 9000000 "Use clang-format in version 9.0.0 or newer." + assign_gnu_sed + assert_min_version git 1007010 "Use git version 1.7.10 or newer." + assert_min_version clang-format 9000000 "Use clang-format version 9.0.0 or newer." +} + +SED="" +assign_gnu_sed () { + # Is sed GNU? (BSD seds don't support --version) + if sed --version &>/dev/null; then + SED="sed" + # No, but do we have gsed? + elif command -v gsed &> /dev/null; then + SED="gsed" + # No, so help the user install it and then quit. + else + echo "'sed' is not GNU and 'gsed' is not available." + if [[ "${OSTYPE:-}" == "darwin"* ]]; then + echo "Install GNU sed with: brew install gnu-sed" + else + echo "Install GNU sed with your $OSTYPE package manager." + fi + exit 1 + fi } assert_min_version () { @@ -64,7 +87,7 @@ check_min_version () { $1 --version $1 --version \ - | sed -e "s|.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*|\1 \2 \3|" \ + | "$SED" -e "s|.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*|\1 \2 \3|" \ | test_version "$2" return "${PIPESTATUS[2]}" } @@ -84,7 +107,7 @@ } assert_empty_diff () { - if [ -n "$(git_diff HEAD)" ] ; then + if [[ -n "$(git_diff HEAD)" ]] ; then git_diff HEAD echo echo "clang-format formatted some code for you." @@ -95,7 +118,7 @@ } show_tip () { - if [ -n "$(git_diff HEAD)" ] ; then + if [[ -n "$(git_diff HEAD)" ]] ; then echo echo "clang-format formatted some code for you." echo @@ -131,8 +154,15 @@ run_clang_format () { while read -r src_file ; do - prepare_clang_params "$src_file" \ - | xargs --no-run-if-empty --verbose clang-format -i + local ranges=() + while IFS=$'\n' read -r range ; do + ranges+=("$range") + done < <(git_diff_to_clang_line_range "$src_file") + + if (( "${#ranges[@]}" )); then + echo "clang-format -i ${ranges[*]} \"$src_file\"" + clang-format -i "${ranges[@]}" "$src_file" + fi done } @@ -144,21 +174,11 @@ | to_clang_line_range } -prepare_clang_params () { - local -r file=$1 - local -r range=$(git_diff_to_clang_line_range "$file") - # print file name only when there are any lines detected, otherwise - # clang-format would process the whole file - if [ -n "$range" ]; then - echo "$range \"$file\"" - fi -} - # expects line in diff format: "@@ - + @@ " # where is either or , # filter_line_range () { - sed -e 's|@@ .* +\([0-9]\+\),\?\([0-9]\+\)\? @@.*|\1 \2|' + "$SED" -e 's|@@ .* +\([0-9]\+\),\?\([0-9]\+\)\? @@.*|\1 \2|' } to_clang_line_range () { diff -Nru dosbox-staging-0.76.0/scripts/git-rlog.sh dosbox-staging-0.77.0/scripts/git-rlog.sh --- dosbox-staging-0.76.0/scripts/git-rlog.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/git-rlog.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Patryk Obara # git-rlog.sh - Show git log decorated with SVN revisions # diff -Nru dosbox-staging-0.76.0/scripts/has-commits-since.sh dosbox-staging-0.77.0/scripts/has-commits-since.sh --- dosbox-staging-0.76.0/scripts/has-commits-since.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/has-commits-since.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (C) 2020 Kevin Croft # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020-2021 Kevin R. Croft # This script indicates if the git repository has had # any commits since a given timeframe. diff -Nru dosbox-staging-0.76.0/scripts/import-from-svn/import-from-svn.sh dosbox-staging-0.77.0/scripts/import-from-svn/import-from-svn.sh --- dosbox-staging-0.76.0/scripts/import-from-svn/import-from-svn.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/import-from-svn/import-from-svn.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Patryk Obara # Import script suitable for SVN repositories using standard layout. # Uses git-svn to download whole history, converts svn tag paths to git tags, diff -Nru dosbox-staging-0.76.0/scripts/import-from-svn/import-svn-ignore.sh dosbox-staging-0.77.0/scripts/import-from-svn/import-svn-ignore.sh --- dosbox-staging-0.76.0/scripts/import-from-svn/import-svn-ignore.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/import-from-svn/import-svn-ignore.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Patryk Obara readonly svn_url=https://svn.code.sf.net/p/dosbox/code-0/dosbox diff -Nru dosbox-staging-0.76.0/scripts/list-build-dependencies.sh dosbox-staging-0.77.0/scripts/list-build-dependencies.sh --- dosbox-staging-0.76.0/scripts/list-build-dependencies.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/list-build-dependencies.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019-2020 Kevin R Croft -# SPDX-License-Identifier: GPL-2.0-or-later - -# This script prints package dependencies for a given package manmager, -# compiler (gcc or clang), and bit-depth (32 or 64). -# -# If run without arguments, the script asks for required arguments one -# by one, which includes the package manager (--manager) and --compiler. -# -# Optional arguments include the bit-depth, defaults to 64-bit; -# and the compiler version, which defaults to the package manager's -# default version. -# -# Usage examples: -# $ ./list-build-dependencies.sh # asks for --manager -# $ ./list-build-dependencies.sh --manager apt # asks for --compiler -# $ ./list-build-dependencies.sh --manager apt --compiler gcc -v 9 -# $ ./list-build-dependencies.sh --manager zypper --compiler clang -# $ ./list-build-dependencies.sh --manager msy2 --compiler gcc -b 32 -# -# This script makes use of the automator package, see automator/main.sh. -# -set -euo pipefail - -function parse_args() { - # Gather the parameters that define this build - bits="64" - modifiers=("") - excludes=("") - # shellcheck disable=SC2034 - while [[ "${#}" -gt 0 ]]; do case ${1} in - -m|--manager) manager="${2}"; shift 2;; - -c|--compiler) selected_type=$(lower "${2}"); shift 2;; - -b|--bit-depth) bits="${2}"; shift 2;; - -v|--compiler-version) version="${2}"; shift 2;; - -a|--addon) modifiers+=("${2}"); shift 2;; - -x|--exclude) excludes+=("${2}"); shift 2;; - *) >&2 echo "Unknown parameter: ${1}"; exit 1; - esac; done - - # Import our settings and report missing values - import manager "${manager:-}" - if [[ -z "${selected_type:-}" ]]; then arg_error "--compiler" "${TYPES[*]}"; fi - - # If a version was provided then construct a postfix string given the manager's - # potential unique delimiter (ie: gcc@9 for brew, gcc-9 for apt). - # shellcheck disable=SC2034,SC2154 - postfix=$([[ -n "${version:-}" ]] && echo "${delim}${version}" || echo "") - import "${selected_type:-}" "${manager:-}" -} -# shellcheck disable=SC2034 -data_dir="packages" - -script_dir="$(cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" -# shellcheck source=scripts/automator/main.sh -source "$script_dir/automator/main.sh" diff -Nru dosbox-staging-0.76.0/scripts/msys-bash.py dosbox-staging-0.77.0/scripts/msys-bash.py --- dosbox-staging-0.76.0/scripts/msys-bash.py 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/msys-bash.py 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/usr/bin/python3 -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Patryk Obara # pylint: disable=invalid-name # pylint: disable=line-too-long diff -Nru dosbox-staging-0.76.0/scripts/unifdef-all.sh dosbox-staging-0.77.0/scripts/unifdef-all.sh --- dosbox-staging-0.76.0/scripts/unifdef-all.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/unifdef-all.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/bash - -# This script uses unifdef to mass-remove code inside ifdefs, that are not -# relevant to Linux. -# -# Use it only to improve readability when researching code. - -cd "$(git rev-parse --show-toplevel)" || exit - -git ls-files ./*.{h,cpp} | xargs unifdef \ - -U WIN32 \ - -U _WIN32 \ - -U _WIN64 \ - -U MACOSX \ - -m diff -Nru dosbox-staging-0.76.0/scripts/verify-bash.sh dosbox-staging-0.77.0/scripts/verify-bash.sh --- dosbox-staging-0.76.0/scripts/verify-bash.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/verify-bash.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Patryk Obara # This script exists only to easily run shellcheck on all files in the repo. # You can pass additional parameters to this script itself, e.g.: @@ -22,4 +23,21 @@ list_bash_files | xargs -L 1000 shellcheck --color "$@" } -main "$@" +Anotate_github () { + jq -r -j \ + '.comments[] + |"::error" + ," file=",.file + ,",line=",.line + ,"::SC",.code,": ",.message + ,"\n" + ' | grep "" || return 0 && return 123 +# return 123 same as xargs return code would be +} + +if [[ -z $GITHUB_ACTOR ]] +then + main "$@" +else + Anotate_github < <( main --format=json1 "$@" ) +fi diff -Nru dosbox-staging-0.76.0/scripts/verify-ctype-algorithm-include-order.sh dosbox-staging-0.77.0/scripts/verify-ctype-algorithm-include-order.sh --- dosbox-staging-0.76.0/scripts/verify-ctype-algorithm-include-order.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/verify-ctype-algorithm-include-order.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,9 @@ #!/bin/bash -# Copyright (C) 2020 Kevin Croft # SPDX-License-Identifier: GPL-2.0-or-later # +# Copyright (C) 2020-2021 Kevin R. Croft + # This script checks if is included before by # querying records written by the dump-preprocessor-defines.sh # script. It prints details and returns a non-zero exit code to diff -Nru dosbox-staging-0.76.0/scripts/verify-macos-dylibs.py dosbox-staging-0.77.0/scripts/verify-macos-dylibs.py --- dosbox-staging-0.76.0/scripts/verify-macos-dylibs.py 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/verify-macos-dylibs.py 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,53 @@ +#!/usr/bin/python3 + +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2021-2021 Patryk Obara + +# pylint: disable=invalid-name + +""" +Verify if there are no problematic runtime dependencies for this macOS binary. +""" + +import sys +import subprocess + + +if __name__ == '__main__': + result = subprocess.run(['otool', '-L', sys.argv[1]], + stdout=subprocess.PIPE, + check=True) + output = result.stdout.decode('utf-8').split('\n') + + allowed_list = [ + '/System/Library/Frameworks/AppKit.framework/', + '/System/Library/Frameworks/AudioToolbox.framework/', + '/System/Library/Frameworks/AudioUnit.framework/', + '/System/Library/Frameworks/Carbon.framework/', + '/System/Library/Frameworks/CoreAudio.framework/', + '/System/Library/Frameworks/CoreFoundation.framework/', + '/System/Library/Frameworks/CoreGraphics.framework/', + '/System/Library/Frameworks/CoreMIDI.framework/', + '/System/Library/Frameworks/CoreServices.framework/', + '/System/Library/Frameworks/CoreVideo.framework/', + '/System/Library/Frameworks/ForceFeedback.framework/', + '/System/Library/Frameworks/Foundation.framework/', + '/System/Library/Frameworks/GameController.framework/', + '/System/Library/Frameworks/IOKit.framework/', + '/System/Library/Frameworks/Metal.framework/', + '/System/Library/Frameworks/OpenGL.framework/', + '/usr/lib/', + ] + + # skip first line (program name) + for desc in (line.strip() for line in output[1:]): + if not desc: # skip over empty string + continue + if any(desc.startswith(pfx) for pfx in allowed_list): + continue + print(f"Problematic runtime dependency: '{desc}'") + print("Is it installed by default on macOS system?") + sys.exit(1) + + sys.exit(0) diff -Nru dosbox-staging-0.76.0/scripts/verify-markdown.sh dosbox-staging-0.77.0/scripts/verify-markdown.sh --- dosbox-staging-0.76.0/scripts/verify-markdown.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/verify-markdown.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,9 @@ #!/bin/bash -# Copyright (C) 2020 Kevin Croft # SPDX-License-Identifier: GPL-2.0-or-later # +# Copyright (C) 2020-2021 Kevin R. Croft + # This script exists only to easily run mdl (markdownlint) on all # *.md files in the repo. # diff -Nru dosbox-staging-0.76.0/scripts/verify-python.sh dosbox-staging-0.77.0/scripts/verify-python.sh --- dosbox-staging-0.76.0/scripts/verify-python.sh 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/scripts/verify-python.sh 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/bash -# Copyright (C) 2019-2020 Patryk Obara # SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2019-2021 Patryk Obara # This script exists only to easily run python static checker on all files in # the repo. You can pass additional parameters to this script itself, e.g.: diff -Nru dosbox-staging-0.76.0/src/config.h.in dosbox-staging-0.77.0/src/config.h.in --- dosbox-staging-0.76.0/src/config.h.in 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/config.h.in 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,201 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DOSBOX_CONFIG_H +#define DOSBOX_CONFIG_H + +/* Version and branding tweaks + */ + +// Emulator version +#define VERSION "@version@" + +// Suffix appended to the default .conf file name +#define CONF_SUFFIX "@conf_suffix@" + +/* Operating System + */ + +// Defined if compiling for OS from BSD family +#mesondefine BSD + +// Defined if compiling for Linux (non-Android) +#mesondefine LINUX + +// Defined if compiling for macOS +#mesondefine MACOSX + +// Defined if compiling for Windows (any option) +#mesondefine WIN32 + +/* CPU and FPU emulation + * + * These defines are mostly relevant to modules src/cpu/ and src/fpu/ + */ + +// The type of cpu this target has +#mesondefine C_TARGETCPU + +// Define to 1 if target CPU supports unaligned memory access +#mesondefine C_UNALIGNED_MEMORY + +// Define to 1 to use x86/x86_64 dynamic cpu core +// Can not be used together with C_DYNREC +#mesondefine C_DYNAMIC_X86 + +// Define to 1 to use recompiling cpu core +// Can not be used together with C_DYNAMIC_X86 +#mesondefine C_DYNREC + +// Define to 1 to enable floating point emulation +#mesondefine C_FPU + +// Define to 1 to use fpu core implemented in x86 assembler +#mesondefine C_FPU_X86 + +// TODO Define to 1 to use inlined memory functions in cpu core +#define C_CORE_INLINE 1 + +/* Emulator features + * + * Turn on or off optional emulator features that depend on external libraries. + * This way it's easier to port or package on a new platform, where these + * libraries might be missing. + */ + +// Define to 1 to enable internal modem emulation (using SDL2_net) +#mesondefine C_MODEM + +// Define to 1 to enable IPX over Internet networking (using SDL2_net) +#mesondefine C_IPX + +// Define to 1 to enable NE2000 ethernet passthrough +#mesondefine C_NE2000 + +// Enable serial port passthrough support +#mesondefine C_DIRECTSERIAL + +// Define to 1 to use opengl display output support +#mesondefine C_OPENGL + +// Define to 1 to enable FluidSynth integration (built-in MIDI synth) +#mesondefine C_FLUIDSYNTH + +// Define to 1 to enable screenshots in .png format +#mesondefine C_SSHOT + +// Define to 1 to enable internal debugger (using ncurses or pdcurses) +#mesondefine C_DEBUG + +// Define to 1 to enable heavy debugging (requires C_DEBUG) +#mesondefine C_HEAVY_DEBUG + +// Define to 1 to enable MT-32 emulator +#mesondefine C_MT32EMU + +// Compiler supports Core Audio headers +#mesondefine C_COREAUDIO + +// Compiler supports Core MIDI headers +#mesondefine C_COREMIDI + +// Define to 1 to enable ALSA MIDI support +#mesondefine C_ALSA + +/* Compiler features and extensions + * + * These are defines for compiler features we can't reliably verify during + * compilation time. + */ + +#mesondefine C_HAS_BUILTIN_EXPECT + +/* Defines for checking availability of standard functions and structs. + * + * Sometimes available functions, structs, or struct fields differ slightly + * between operating systems. + */ + +// Defined if function clock_gettime is available +#mesondefine HAVE_CLOCK_GETTIME + +// Defined if function __builtin_available is available +#mesondefine HAVE_BUILTIN_AVAILABLE + +// Defined if function mprotect is available +#mesondefine HAVE_MPROTECT + +// Defined if function mmap is available +#mesondefine HAVE_MMAP + +// Defined if mmap flag MAPJIT is available +#mesondefine HAVE_MAP_JIT + +// Defined if function pthread_jit_write_protect_np is available +#mesondefine HAVE_PTHREAD_WRITE_PROTECT_NP + +// Defined if function sys_icache_invalidate is available +#mesondefine HAVE_SYS_ICACHE_INVALIDATE + +// Defined if function pthread_setname_np is available +#mesondefine HAVE_PTHREAD_SETNAME_NP + +// Defined if function realpath is available +#mesondefine HAVE_REALPATH + +// Defind if function setpriority is available +#mesondefine HAVE_SETPRIORITY + +// field d_type in struct dirent is not defined in POSIX +// Some OSes do not implement it (e.g. Haiku) +#mesondefine HAVE_STRUCT_DIRENT_D_TYPE + +/* Available headers + * + * Checks for non-POSIX headers and POSIX headers not supported on Windows. + */ + +#mesondefine HAVE_NETINET_IN_H +#mesondefine HAVE_PWD_H +#define HAVE_STDLIB_H 1 +#mesondefine HAVE_STRINGS_H +#mesondefine HAVE_SYS_SOCKET_H +#define HAVE_SYS_TYPES_H 1 + +/* Hardware-related defines + */ + +// Define to 1 when host/target processor uses big endian byte ordering +#mesondefine WORDS_BIGENDIAN + +// Non-4K page size (only on selected architectures) +#mesondefine PAGESIZE + +/* Windows-related defines + */ + +// Prevent from clobbering std::min and std::max +#mesondefine NOMINMAX + +// Enables mathematical constants (such as M_PI) in Windows math.h header +// https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants +#mesondefine _USE_MATH_DEFINES + +#endif diff -Nru dosbox-staging-0.76.0/src/cpu/callback.cpp dosbox-staging-0.77.0/src/cpu/callback.cpp --- dosbox-staging-0.76.0/src/cpu/callback.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/callback.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ #include +#include #include #include "dosbox.h" @@ -31,7 +32,7 @@ */ CallBack_Handler CallBack_Handlers[CB_MAX]; -char* CallBack_Description[CB_MAX]; +std::string CallBack_Description[CB_MAX]; static Bitu call_stop,call_idle,call_default; Bitu call_priv_io; @@ -130,15 +131,14 @@ void CALLBACK_SetDescription(Bitu nr, const char* descr) { if (descr) { - CallBack_Description[nr] = new char[strlen(descr)+1]; - strcpy(CallBack_Description[nr],descr); + CallBack_Description[nr] = descr; } else - CallBack_Description[nr] = 0; + CallBack_Description[nr].clear(); } const char* CALLBACK_GetDescription(Bitu nr) { if (nr>=CB_MAX) return 0; - return CallBack_Description[nr]; + return CallBack_Description[nr].c_str(); } Bitu CALLBACK_SetupExtra(Bitu callback, Bitu type, PhysPt physAddress, bool use_cb=true) { @@ -572,8 +572,10 @@ } else if(m_type == CALLBACK_HandlerObject::NONE){ //Do nothing. Merely DeAllocate the callback } else E_Exit("what kind of callback is this!"); - if(CallBack_Description[m_callback]) delete [] CallBack_Description[m_callback]; - CallBack_Description[m_callback] = 0; + + if(!CallBack_Description[m_callback].empty()) + CallBack_Description[m_callback].clear(); + CALLBACK_DeAllocate(m_callback); installed=false; } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/decoder_basic.h dosbox-staging-0.77.0/src/cpu/core_dynrec/decoder_basic.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/decoder_basic.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/decoder_basic.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -138,12 +138,7 @@ if (handler->flags & PFLAG_HASCODE) { // this is a codepage handler, make sure it matches current code size cph = (CodePageHandler *)handler; - if (handler->flags & cflag) return false; - // wrong code size/stale dynamic code, drop it - cph->ClearRelease(); - cph=0; - // handler was changed, refresh - handler=get_tlb_readhandler(lin_addr); + return false; } if (handler->flags & PFLAG_NOCODE) { if (PAGING_ForcePageInit(lin_addr)) { @@ -237,7 +232,7 @@ val|=decode_fetchb() << 8; return val; } - *(Bit16u *)&decode.page.wmap[decode.page.index]+=0x0101; + add_to_unaligned_uint16(&decode.page.wmap[decode.page.index], 0x0101); decode.code+=2;decode.page.index+=2; return mem_readw(decode.code-2); } @@ -251,7 +246,7 @@ return val; /* Advance to the next page */ } - *(Bit32u *)&decode.page.wmap[decode.page.index]+=0x01010101; + add_to_unaligned_uint32(&decode.page.wmap[decode.page.index], 0x01010101); decode.code+=4;decode.page.index+=4; return mem_readd(decode.code-4); } @@ -287,8 +282,8 @@ // update mask entries switch (size) { case 1 : activecb->cache.wmapmask[mapidx]+=0x01; break; - case 2 : (*(Bit16u*)&activecb->cache.wmapmask[mapidx])+=0x0101; break; - case 4 : (*(Bit32u*)&activecb->cache.wmapmask[mapidx])+=0x01010101; break; + case 2 : add_to_unaligned_uint16(&activecb->cache.wmapmask[mapidx], 0x0101); break; + case 4 : add_to_unaligned_uint32(&activecb->cache.wmapmask[mapidx], 0x01010101); break; } } @@ -390,10 +385,10 @@ #ifdef DRC_USE_SEGS_ADDR -#define MOV_SEG_VAL_TO_HOST_REG(host_reg, seg_index) gen_mov_seg16_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_SEG_VAL(seg_index)) - (DRC_PTR_SIZE_IM)(&Segs)) +#define MOV_SEG_VAL_TO_HOST_REG(host_reg, seg_index) gen_mov_seg16_to_reg(host_reg,(Bitu)(DRCD_SEG_VAL(seg_index)) - (Bitu)(&Segs)) -#define MOV_SEG_PHYS_TO_HOST_REG(host_reg, seg_index) gen_mov_seg32_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_SEG_PHYS(seg_index)) - (DRC_PTR_SIZE_IM)(&Segs)) -#define ADD_SEG_PHYS_TO_HOST_REG(host_reg, seg_index) gen_add_seg32_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_SEG_PHYS(seg_index)) - (DRC_PTR_SIZE_IM)(&Segs)) +#define MOV_SEG_PHYS_TO_HOST_REG(host_reg, seg_index) gen_mov_seg32_to_reg(host_reg,(Bitu)(DRCD_SEG_PHYS(seg_index)) - (Bitu)(&Segs)) +#define ADD_SEG_PHYS_TO_HOST_REG(host_reg, seg_index) gen_add_seg32_to_reg(host_reg,(Bitu)(DRCD_SEG_PHYS(seg_index)) - (Bitu)(&Segs)) #else @@ -407,20 +402,20 @@ #ifdef DRC_USE_REGS_ADDR -#define MOV_REG_VAL_TO_HOST_REG(host_reg, reg_index) gen_mov_regval32_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_VAL(reg_index)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) -#define ADD_REG_VAL_TO_HOST_REG(host_reg, reg_index) gen_add_regval32_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_VAL(reg_index)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) +#define MOV_REG_VAL_TO_HOST_REG(host_reg, reg_index) gen_mov_regval32_to_reg(host_reg,(Bitu)(DRCD_REG_VAL(reg_index)) - (Bitu)(&cpu_regs)) +#define ADD_REG_VAL_TO_HOST_REG(host_reg, reg_index) gen_add_regval32_to_reg(host_reg,(Bitu)(DRCD_REG_VAL(reg_index)) - (Bitu)(&cpu_regs)) -#define MOV_REG_WORD16_TO_HOST_REG(host_reg, reg_index) gen_mov_regval16_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_WORD(reg_index,false)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) -#define MOV_REG_WORD32_TO_HOST_REG(host_reg, reg_index) gen_mov_regval32_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_WORD(reg_index,true)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) -#define MOV_REG_WORD_TO_HOST_REG(host_reg, reg_index, dword) gen_mov_regword_to_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_WORD(reg_index,dword)) - (DRC_PTR_SIZE_IM)(&cpu_regs), dword) - -#define MOV_REG_WORD16_FROM_HOST_REG(host_reg, reg_index) gen_mov_regval16_from_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_WORD(reg_index,false)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) -#define MOV_REG_WORD32_FROM_HOST_REG(host_reg, reg_index) gen_mov_regval32_from_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_WORD(reg_index,true)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) -#define MOV_REG_WORD_FROM_HOST_REG(host_reg, reg_index, dword) gen_mov_regword_from_reg(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_WORD(reg_index,dword)) - (DRC_PTR_SIZE_IM)(&cpu_regs), dword) - -#define MOV_REG_BYTE_TO_HOST_REG_LOW(host_reg, reg_index, high_byte) gen_mov_regbyte_to_reg_low(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_BYTE(reg_index,high_byte)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) -#define MOV_REG_BYTE_TO_HOST_REG_LOW_CANUSEWORD(host_reg, reg_index, high_byte) gen_mov_regbyte_to_reg_low_canuseword(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_BYTE(reg_index,high_byte)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) -#define MOV_REG_BYTE_FROM_HOST_REG_LOW(host_reg, reg_index, high_byte) gen_mov_regbyte_from_reg_low(host_reg,(DRC_PTR_SIZE_IM)(DRCD_REG_BYTE(reg_index,high_byte)) - (DRC_PTR_SIZE_IM)(&cpu_regs)) +#define MOV_REG_WORD16_TO_HOST_REG(host_reg, reg_index) gen_mov_regval16_to_reg(host_reg,(Bitu)(DRCD_REG_WORD(reg_index,false)) - (Bitu)(&cpu_regs)) +#define MOV_REG_WORD32_TO_HOST_REG(host_reg, reg_index) gen_mov_regval32_to_reg(host_reg,(Bitu)(DRCD_REG_WORD(reg_index,true)) - (Bitu)(&cpu_regs)) +#define MOV_REG_WORD_TO_HOST_REG(host_reg, reg_index, dword) gen_mov_regword_to_reg(host_reg,(Bitu)(DRCD_REG_WORD(reg_index,dword)) - (Bitu)(&cpu_regs), dword) + +#define MOV_REG_WORD16_FROM_HOST_REG(host_reg, reg_index) gen_mov_regval16_from_reg(host_reg,(Bitu)(DRCD_REG_WORD(reg_index,false)) - (Bitu)(&cpu_regs)) +#define MOV_REG_WORD32_FROM_HOST_REG(host_reg, reg_index) gen_mov_regval32_from_reg(host_reg,(Bitu)(DRCD_REG_WORD(reg_index,true)) - (Bitu)(&cpu_regs)) +#define MOV_REG_WORD_FROM_HOST_REG(host_reg, reg_index, dword) gen_mov_regword_from_reg(host_reg,(Bitu)(DRCD_REG_WORD(reg_index,dword)) - (Bitu)(&cpu_regs), dword) + +#define MOV_REG_BYTE_TO_HOST_REG_LOW(host_reg, reg_index, high_byte) gen_mov_regbyte_to_reg_low(host_reg,(Bitu)(DRCD_REG_BYTE(reg_index,high_byte)) - (Bitu)(&cpu_regs)) +#define MOV_REG_BYTE_TO_HOST_REG_LOW_CANUSEWORD(host_reg, reg_index, high_byte) gen_mov_regbyte_to_reg_low_canuseword(host_reg,(Bitu)(DRCD_REG_BYTE(reg_index,high_byte)) - (Bitu)(&cpu_regs)) +#define MOV_REG_BYTE_FROM_HOST_REG_LOW(host_reg, reg_index, high_byte) gen_mov_regbyte_from_reg_low(host_reg,(Bitu)(DRCD_REG_BYTE(reg_index,high_byte)) - (Bitu)(&cpu_regs)) #else @@ -511,72 +506,72 @@ // is architecture dependent // R=host register; I=32bit immediate value; A=address value; m=memory -static DRC_PTR_SIZE_IM INLINE gen_call_function_R(void * func,Bitu op) { +static INLINE const Bit8u* gen_call_function_R(void * func,Bitu op) { gen_load_param_reg(op,0); return gen_call_function_setup(func, 1); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_R3(void * func,Bitu op) { +static INLINE const Bit8u* gen_call_function_R3(void * func,Bitu op) { gen_load_param_reg(op,2); return gen_call_function_setup(func, 3, true); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_RI(void * func,Bitu op1,Bitu op2) { +static INLINE const Bit8u* gen_call_function_RI(void * func,Bitu op1,Bitu op2) { gen_load_param_imm(op2,1); gen_load_param_reg(op1,0); return gen_call_function_setup(func, 2); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_RA(void * func,Bitu op1,DRC_PTR_SIZE_IM op2) { +static INLINE const Bit8u* gen_call_function_RA(void * func,Bitu op1,Bitu op2) { gen_load_param_addr(op2,1); gen_load_param_reg(op1,0); return gen_call_function_setup(func, 2); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_RR(void * func,Bitu op1,Bitu op2) { +static INLINE const Bit8u* gen_call_function_RR(void * func,Bitu op1,Bitu op2) { gen_load_param_reg(op2,1); gen_load_param_reg(op1,0); return gen_call_function_setup(func, 2); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_IR(void * func,Bitu op1,Bitu op2) { +static INLINE const Bit8u* gen_call_function_IR(void * func,Bitu op1,Bitu op2) { gen_load_param_reg(op2,1); gen_load_param_imm(op1,0); return gen_call_function_setup(func, 2); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_I(void * func,Bitu op) { +static INLINE const Bit8u* gen_call_function_I(void * func,Bitu op) { gen_load_param_imm(op,0); return gen_call_function_setup(func, 1); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_II(void * func,Bitu op1,Bitu op2) { +static INLINE const Bit8u* gen_call_function_II(void * func,Bitu op1,Bitu op2) { gen_load_param_imm(op2,1); gen_load_param_imm(op1,0); return gen_call_function_setup(func, 2); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_III(void * func,Bitu op1,Bitu op2,Bitu op3) { +static INLINE const Bit8u* gen_call_function_III(void * func,Bitu op1,Bitu op2,Bitu op3) { gen_load_param_imm(op3,2); gen_load_param_imm(op2,1); gen_load_param_imm(op1,0); return gen_call_function_setup(func, 3); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_IA(void * func,Bitu op1,DRC_PTR_SIZE_IM op2) { +static INLINE const Bit8u* gen_call_function_IA(void * func,Bitu op1,Bitu op2) { gen_load_param_addr(op2,1); gen_load_param_imm(op1,0); return gen_call_function_setup(func, 2); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_IIR(void * func,Bitu op1,Bitu op2,Bitu op3) { +static INLINE const Bit8u* gen_call_function_IIR(void * func,Bitu op1,Bitu op2,Bitu op3) { gen_load_param_reg(op3,2); gen_load_param_imm(op2,1); gen_load_param_imm(op1,0); return gen_call_function_setup(func, 3); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_IIIR(void * func,Bitu op1,Bitu op2,Bitu op3,Bitu op4) { +static INLINE const Bit8u* gen_call_function_IIIR(void * func,Bitu op1,Bitu op2,Bitu op3,Bitu op4) { gen_load_param_reg(op4,3); gen_load_param_imm(op3,2); gen_load_param_imm(op2,1); @@ -584,7 +579,7 @@ return gen_call_function_setup(func, 4); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_IRRR(void * func,Bitu op1,Bitu op2,Bitu op3,Bitu op4) { +static INLINE const Bit8u* gen_call_function_IRRR(void * func,Bitu op1,Bitu op2,Bitu op3,Bitu op4) { gen_load_param_reg(op4,3); gen_load_param_reg(op3,2); gen_load_param_reg(op2,1); @@ -592,12 +587,12 @@ return gen_call_function_setup(func, 4); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_m(void * func,Bitu op) { +static INLINE const Bit8u* gen_call_function_m(void * func,Bitu op) { gen_load_param_mem(op,2); return gen_call_function_setup(func, 3, true); } -static DRC_PTR_SIZE_IM INLINE gen_call_function_mm(void * func,Bitu op1,Bitu op2) { +static INLINE const Bit8u* gen_call_function_mm(void * func,Bitu op1,Bitu op2) { gen_load_param_mem(op2,3); gen_load_param_mem(op1,2); return gen_call_function_setup(func, 4, true); @@ -622,7 +617,7 @@ // end of a cache block because it is rarely reached (like exceptions) static struct { save_info_type type; - DRC_PTR_SIZE_IM branch_pos; + const Bit8u* branch_pos; Bit32u eip_change; Bitu cycles; } save_info_dynrec[512]; @@ -1155,28 +1150,6 @@ } } - - -// add code that checks if port access is allowed -// the port is given in a register -static void dyn_add_iocheck(HostReg reg_port,Bitu access_size) { - if (cpu.pmode) { - gen_call_function_RI((void *)&CPU_IO_Exception,reg_port,access_size); - dyn_check_exception(FC_RETOP); - } -} - -// add code that checks if port access is allowed -// the port is a constant -static void dyn_add_iocheck_var(Bit8u accessed_port,Bitu access_size) { - if (cpu.pmode) { - gen_call_function_II((void *)&CPU_IO_Exception,accessed_port,access_size); - dyn_check_exception(FC_RETOP); - } -} - - - // save back the address register static void gen_protect_addr_reg(void) { #ifdef DRC_PROTECT_ADDR_REG @@ -1214,7 +1187,7 @@ static Bitu mf_functions_num=0; static struct { - Bit8u* pos; + const Bit8u* pos; void* fct_ptr; Bitu ftype; } mf_functions[64]; @@ -1265,9 +1238,9 @@ // enqueue this instruction, if later an instruction is encountered that // destroys all condition flags and the flags weren't needed in-between // this function can be replaced by a simpler one as well -static void InvalidateFlagsPartially(void* current_simple_function,DRC_PTR_SIZE_IM cpos,Bitu flags_type) { +static void InvalidateFlagsPartially(void* current_simple_function,const Bit8u* cpos,Bitu flags_type) { #ifdef DRC_FLAGS_INVALIDATION - mf_functions[mf_functions_num].pos=(Bit8u*)cpos; + mf_functions[mf_functions_num].pos=cpos; mf_functions[mf_functions_num].fct_ptr=current_simple_function; mf_functions[mf_functions_num].ftype=flags_type; mf_functions_num++; diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/decoder.h dosbox-staging-0.77.0/src/cpu/core_dynrec/decoder.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/decoder.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/decoder.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - - #include "decoder_basic.h" #include "operators.h" #include "decoder_opcodes.h" @@ -45,11 +43,16 @@ decode.block->page.start=(Bit16u)decode.page.index; codepage->AddCacheBlock(decode.block); + auto cache_addr = static_cast(const_cast(decode.block->cache.start)); + constexpr size_t cache_bytes = CACHE_MAXSIZE; + + dyn_mem_write(cache_addr, cache_bytes); + InitFlagsOptimization(); // every codeblock that is run sets cache.block.running to itself // so the block linking knows the last executed block - gen_mov_direct_ptr(&cache.block.running,(DRC_PTR_SIZE_IM)decode.block); + gen_mov_direct_ptr(&cache.block.running,(Bitu)decode.block); // start with the cycles check gen_mov_word_to_reg(FC_RETOP,&CPU_Cycles,true); @@ -612,6 +615,9 @@ // setup the correct end-address decode.page.index--; decode.active_block->page.end=(Bit16u)decode.page.index; + dyn_mem_execute(cache_addr, cache_bytes); + dyn_cache_invalidate(cache_addr, cache_bytes); + // LOG_MSG("Created block size %d start %d end %d",decode.block->cache.size,decode.block->page.start,decode.block->page.end); return decode.block; diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/decoder_opcodes.h dosbox-staging-0.77.0/src/cpu/core_dynrec/decoder_opcodes.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/decoder_opcodes.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/decoder_opcodes.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -82,9 +82,11 @@ dyn_read_byte(FC_ADDR,FC_TMP_BA1); MOV_REG_BYTE_TO_HOST_REG_LOW(FC_TMP_BA2,decode.modrm.reg&3,(decode.modrm.reg>>2)&1); - MOV_REG_BYTE_FROM_HOST_REG_LOW(FC_TMP_BA1,decode.modrm.reg&3,(decode.modrm.reg>>2)&1); + gen_protect_reg(FC_TMP_BA1); gen_restore_addr_reg(); dyn_write_byte(FC_ADDR,FC_TMP_BA2); + gen_restore_reg(FC_TMP_BA1); + MOV_REG_BYTE_FROM_HOST_REG_LOW(FC_TMP_BA1,decode.modrm.reg&3,(decode.modrm.reg>>2)&1); } else { MOV_REG_BYTE_TO_HOST_REG_LOW(FC_TMP_BA1,decode.modrm.rm&3,(decode.modrm.rm>>2)&1); MOV_REG_BYTE_TO_HOST_REG_LOW(FC_TMP_BA2,decode.modrm.reg&3,(decode.modrm.reg>>2)&1); @@ -455,7 +457,7 @@ if (decode.big_op) gen_call_function_raw((void *)&mem_writed_checked_drc); else gen_call_function_raw((void *)&mem_writew_checked_drc); gen_extend_byte(false,FC_RETOP); // bool -> dword - DRC_PTR_SIZE_IM no_fault = gen_create_branch_on_zero(FC_RETOP, true); + const Bit8u* no_fault = gen_create_branch_on_zero(FC_RETOP, true); // restore original ESP gen_restore_reg(FC_OP2); MOV_REG_WORD32_FROM_HOST_REG(FC_OP2,DRC_REG_ESP); @@ -1036,7 +1038,7 @@ gen_extend_word(false,FC_RETOP); if (is_lar) gen_call_function((void*)CPU_LAR,"%R%A",FC_RETOP,(DRC_PTR_SIZE_IM)&core_dynrec.readdata); else gen_call_function((void*)CPU_LSL,"%R%A",FC_RETOP,(DRC_PTR_SIZE_IM)&core_dynrec.readdata); - DRC_PTR_SIZE_IM brnz=gen_create_branch_on_nonzero(FC_RETOP,true); + const Bit8u* brnz=gen_create_branch_on_nonzero(FC_RETOP,true); gen_mov_word_to_reg(FC_OP2,&core_dynrec.readdata,true); MOV_REG_WORD_FROM_HOST_REG(FC_OP2,decode.modrm.reg,decode.big_op); gen_fill_branch(brnz); @@ -1046,7 +1048,7 @@ static void dyn_mov_from_crx(void) { dyn_get_modrm(); - gen_call_function_IA((void*)CPU_READ_CRX,decode.modrm.reg,(DRC_PTR_SIZE_IM)&core_dynrec.readdata); + gen_call_function_IA((void*)CPU_READ_CRX,decode.modrm.reg,(Bitu)&core_dynrec.readdata); dyn_check_exception(FC_RETOP); gen_mov_word_to_reg(FC_OP2,&core_dynrec.readdata,true); MOV_REG_WORD32_FROM_HOST_REG(FC_OP2,decode.modrm.rm); @@ -1107,7 +1109,7 @@ dyn_reduce_cycles(); dyn_branchflag_to_reg(btype); - DRC_PTR_SIZE_IM data=gen_create_branch_on_nonzero(FC_RETOP,true); + const Bit8u* data=gen_create_branch_on_nonzero(FC_RETOP,true); // Branch not taken gen_add_direct_word(®_eip,eip_base,decode.big_op); @@ -1138,8 +1140,8 @@ dyn_reduce_cycles(); Bits eip_add=(Bit8s)decode_fetchb(); Bitu eip_base=decode.code-decode.code_start; - DRC_PTR_SIZE_IM branch1=0; - DRC_PTR_SIZE_IM branch2=0; + const Bit8u* branch1=0; + const Bit8u* branch2=0; switch (type) { case LOOP_E: dyn_branchflag_to_reg(BR_NZ); @@ -1319,72 +1321,56 @@ static void dyn_read_port_byte_direct(Bit8u port) { - dyn_add_iocheck_var(port,1); - gen_call_function_I((void*)&IO_ReadB,port); - MOV_REG_BYTE_FROM_HOST_REG_LOW(FC_RETOP,DRC_REG_EAX,0); + gen_mov_dword_to_reg_imm(FC_OP1,port); + gen_call_function_raw((void*)&dynrec_io_readB); + dyn_check_exception(FC_RETOP); } static void dyn_read_port_word_direct(Bit8u port) { - dyn_add_iocheck_var(port,decode.big_op?4:2); - gen_call_function_I(decode.big_op?((void*)&IO_ReadD):((void*)&IO_ReadW),port); - MOV_REG_WORD_FROM_HOST_REG(FC_RETOP,DRC_REG_EAX,decode.big_op); + gen_mov_dword_to_reg_imm(FC_OP1,port); + gen_call_function_raw(decode.big_op?((void*)&dynrec_io_readD):((void*)&dynrec_io_readW)); + dyn_check_exception(FC_RETOP); } static void dyn_write_port_byte_direct(Bit8u port) { - dyn_add_iocheck_var(port,1); - MOV_REG_BYTE_TO_HOST_REG_LOW(FC_RETOP,DRC_REG_EAX,0); - gen_extend_byte(false,FC_RETOP); - gen_call_function_IR((void*)&IO_WriteB,port,FC_RETOP); + gen_mov_dword_to_reg_imm(FC_OP1,port); + gen_call_function_raw((void*)&dynrec_io_writeB); + dyn_check_exception(FC_RETOP); } static void dyn_write_port_word_direct(Bit8u port) { - dyn_add_iocheck_var(port,decode.big_op?4:2); - MOV_REG_WORD_TO_HOST_REG(FC_RETOP,DRC_REG_EAX,decode.big_op); - if (!decode.big_op) gen_extend_word(false,FC_RETOP); - gen_call_function_IR(decode.big_op?((void*)&IO_WriteD):((void*)&IO_WriteW),port,FC_RETOP); + gen_mov_dword_to_reg_imm(FC_OP1,port); + gen_call_function_raw(decode.big_op?((void*)&dynrec_io_writeD):((void*)&dynrec_io_writeW)); + dyn_check_exception(FC_RETOP); } static void dyn_read_port_byte(void) { - MOV_REG_WORD16_TO_HOST_REG(FC_ADDR,DRC_REG_EDX); - gen_extend_word(false,FC_ADDR); - gen_protect_addr_reg(); - dyn_add_iocheck(FC_ADDR,1); - gen_restore_addr_reg(); - gen_call_function_R((void*)&IO_ReadB,FC_ADDR); - MOV_REG_BYTE_FROM_HOST_REG_LOW(FC_RETOP,DRC_REG_EAX,0); + MOV_REG_WORD16_TO_HOST_REG(FC_OP1,DRC_REG_EDX); + gen_extend_word(false,FC_OP1); + gen_call_function_raw((void*)&dynrec_io_readB); + dyn_check_exception(FC_RETOP); } static void dyn_read_port_word(void) { - MOV_REG_WORD16_TO_HOST_REG(FC_ADDR,DRC_REG_EDX); - gen_extend_word(false,FC_ADDR); - gen_protect_addr_reg(); - dyn_add_iocheck(FC_ADDR,decode.big_op?4:2); - gen_restore_addr_reg(); - gen_call_function_R(decode.big_op?((void*)&IO_ReadD):((void*)&IO_ReadW),FC_ADDR); - MOV_REG_WORD_FROM_HOST_REG(FC_RETOP,DRC_REG_EAX,decode.big_op); + MOV_REG_WORD16_TO_HOST_REG(FC_OP1,DRC_REG_EDX); + gen_extend_word(false,FC_OP1); + gen_call_function_raw(decode.big_op?((void*)&dynrec_io_readD):((void*)&dynrec_io_readW)); + dyn_check_exception(FC_RETOP); } static void dyn_write_port_byte(void) { - MOV_REG_WORD16_TO_HOST_REG(FC_ADDR,DRC_REG_EDX); - gen_extend_word(false,FC_ADDR); - gen_protect_addr_reg(); - dyn_add_iocheck(FC_ADDR,1); - MOV_REG_BYTE_TO_HOST_REG_LOW(FC_RETOP,DRC_REG_EAX,0); - gen_extend_byte(false,FC_RETOP); - gen_restore_addr_reg(); - gen_call_function_RR((void*)&IO_WriteB,FC_ADDR,FC_RETOP); + MOV_REG_WORD16_TO_HOST_REG(FC_OP1,DRC_REG_EDX); + gen_extend_word(false,FC_OP1); + gen_call_function_raw((void*)&dynrec_io_writeB); + dyn_check_exception(FC_RETOP); } static void dyn_write_port_word(void) { - MOV_REG_WORD16_TO_HOST_REG(FC_ADDR,DRC_REG_EDX); - gen_extend_word(false,FC_ADDR); - gen_protect_addr_reg(); - dyn_add_iocheck(FC_ADDR,decode.big_op?4:2); - MOV_REG_WORD_TO_HOST_REG(FC_RETOP,DRC_REG_EAX,decode.big_op); - if (!decode.big_op) gen_extend_word(false,FC_RETOP); - gen_restore_addr_reg(); - gen_call_function_RR(decode.big_op?((void*)&IO_WriteD):((void*)&IO_WriteW),FC_ADDR,FC_RETOP); + MOV_REG_WORD16_TO_HOST_REG(FC_OP1,DRC_REG_EDX); + gen_extend_word(false,FC_OP1); + gen_call_function_raw(decode.big_op?((void*)&dynrec_io_writeD):((void*)&dynrec_io_writeW)); + dyn_check_exception(FC_RETOP); } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/dyn_fpu.h dosbox-staging-0.77.0/src/cpu/core_dynrec/dyn_fpu.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/dyn_fpu.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/dyn_fpu.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,9 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - - #include "dosbox.h" + #if C_FPU #include diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/.gitignore dosbox-staging-0.77.0/src/cpu/core_dynrec/.gitignore --- dosbox-staging-0.76.0/src/cpu/core_dynrec/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/Makefile.am dosbox-staging-0.77.0/src/cpu/core_dynrec/Makefile.am --- dosbox-staging-0.76.0/src/cpu/core_dynrec/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -noinst_HEADERS = \ - decoder_basic.h \ - decoder.h \ - decoder_opcodes.h \ - dyn_fpu.h \ - operators.h \ - risc_armv4le-common.h \ - risc_armv4le.h \ - risc_armv4le-o3.h \ - risc_armv4le-thumb.h \ - risc_armv4le-thumb-iw.h \ - risc_armv4le-thumb-niw.h \ - risc_armv8le.h \ - risc_mipsel32.h \ - risc_ppc64le.h \ - risc_ppc.h \ - risc_x64.h \ - risc_x86.h diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/operators.h dosbox-staging-0.77.0/src/cpu/core_dynrec/operators.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/operators.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/operators.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1298,20 +1298,20 @@ static void dyn_dpshift_word_gencall(bool left) { if (left) { - DRC_PTR_SIZE_IM proc_addr=gen_call_function_R3((void*)&dynrec_dshl_word,FC_OP3); + const Bit8u* proc_addr=gen_call_function_R3((void*)&dynrec_dshl_word,FC_OP3); InvalidateFlagsPartially((void*)&dynrec_dshl_word_simple,proc_addr,t_DSHLw); } else { - DRC_PTR_SIZE_IM proc_addr=gen_call_function_R3((void*)&dynrec_dshr_word,FC_OP3); + const Bit8u* proc_addr=gen_call_function_R3((void*)&dynrec_dshr_word,FC_OP3); InvalidateFlagsPartially((void*)&dynrec_dshr_word_simple,proc_addr,t_DSHRw); } } static void dyn_dpshift_dword_gencall(bool left) { if (left) { - DRC_PTR_SIZE_IM proc_addr=gen_call_function_R3((void*)&dynrec_dshl_dword,FC_OP3); + const Bit8u* proc_addr=gen_call_function_R3((void*)&dynrec_dshl_dword,FC_OP3); InvalidateFlagsPartially((void*)&dynrec_dshl_dword_simple,proc_addr,t_DSHLd); } else { - DRC_PTR_SIZE_IM proc_addr=gen_call_function_R3((void*)&dynrec_dshr_dword,FC_OP3); + const Bit8u* proc_addr=gen_call_function_R3((void*)&dynrec_dshr_dword,FC_OP3); InvalidateFlagsPartially((void*)&dynrec_dshr_dword_simple,proc_addr,t_DSHRd); } } @@ -1994,3 +1994,45 @@ reg_esp=(reg_esp&cpu.stack.notmask)|((reg_esp+4)&cpu.stack.mask); return val; } + +static bool DRC_CALL_CONV dynrec_io_writeB(Bitu port) DRC_FC; +static bool DRC_CALL_CONV dynrec_io_writeB(Bitu port) { + bool ex = CPU_IO_Exception(port,1); + if (!ex) IO_WriteB(port,reg_al); + return ex; +} + +static bool DRC_CALL_CONV dynrec_io_writeW(Bitu port) DRC_FC; +static bool DRC_CALL_CONV dynrec_io_writeW(Bitu port) { + bool ex = CPU_IO_Exception(port,2); + if (!ex) IO_WriteW(port,reg_ax); + return ex; +} + +static bool DRC_CALL_CONV dynrec_io_writeD(Bitu port) DRC_FC; +static bool DRC_CALL_CONV dynrec_io_writeD(Bitu port) { + bool ex = CPU_IO_Exception(port,4); + if (!ex) IO_WriteD(port,reg_eax); + return ex; +} + +static bool DRC_CALL_CONV dynrec_io_readB(Bitu port) DRC_FC; +static bool DRC_CALL_CONV dynrec_io_readB(Bitu port) { + bool ex = CPU_IO_Exception(port,1); + if (!ex) reg_al = (Bit8u)IO_ReadB(port); + return ex; +} + +static bool DRC_CALL_CONV dynrec_io_readW(Bitu port) DRC_FC; +static bool DRC_CALL_CONV dynrec_io_readW(Bitu port) { + bool ex = CPU_IO_Exception(port,2); + if (!ex) reg_ax = (Bit16u)IO_ReadW(port); + return ex; +} + +static bool DRC_CALL_CONV dynrec_io_readD(Bitu port) DRC_FC; +static bool DRC_CALL_CONV dynrec_io_readD(Bitu port) { + bool ex = CPU_IO_Exception(port,4); + if (!ex) reg_eax = (Bit32u)IO_ReadD(port); + return ex; +} diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-common.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-common.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-common.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-common.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,9 +29,6 @@ // try to replace _simple functions by code #define DRC_FLAGS_INVALIDATION_DCODE -// type with the same size as a pointer -#define DRC_PTR_SIZE_IM Bit32u - // calling convention modifier #define DRC_CALL_CONV /* nothing */ #define DRC_FC /* nothing */ @@ -84,7 +81,7 @@ #define HOST_pc HOST_r15 -static void cache_block_closing(Bit8u* block_start,Bitu block_size) { +static void cache_block_closing(const Bit8u* block_start,Bitu block_size) { #if (__ARM_EABI__) //flush cache - eabi register unsigned long _beg __asm ("a1") = (unsigned long)(block_start); // block start diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-o3.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-o3.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-o3.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-o3.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -672,8 +672,8 @@ } // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { - gen_mov_direct_dword(dest,(Bit32u)imm); +static void INLINE gen_mov_direct_ptr(void* dest,Bit32u imm) { + gen_mov_direct_dword(dest,imm); } // add a 32bit (dword==true) or 16bit (dword==false) constant value to a memory value @@ -778,8 +778,8 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static Bit32u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { - Bit32u proc_addr = (Bit32u)cache.pos; +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { + const Bit8u* proc_addr = cache.pos; gen_call_function_raw(func); return proc_addr; } @@ -845,61 +845,63 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_zero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { if (dword) { cache_addd( CMP_IMM(reg, 0, 0) ); // cmp reg, #0 } else { cache_addd( MOVS_REG_LSL_IMM(temp1, reg, 16) ); // movs temp1, reg, lsl #16 } cache_addd( BEQ_FWD(0) ); // beq j - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { if (dword) { cache_addd( CMP_IMM(reg, 0, 0) ); // cmp reg, #0 } else { cache_addd( MOVS_REG_LSL_IMM(temp1, reg, 16) ); // movs temp1, reg, lsl #16 } cache_addd( BNE_FWD(0) ); // bne j - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // calculate relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void INLINE gen_fill_branch(const Bit8u* data) { #if C_DEBUG - Bits len=(Bit32u)cache.pos-(data+8); + Bits len=cache.pos-(data+8); if (len<0) len=-len; if (len>0x02000000) LOG_MSG("Big jump %d",len); #endif - *(Bit32u*)data=( (*(Bit32u*)data) & 0xff000000 ) | ( ( ((Bit32u)cache.pos - (data+8)) >> 2 ) & 0x00ffffff ); + Bitu off = (cache.pos - (data+8)) >> 2; + cache_addw((Bit16u)off,data); + cache_addb((Bit8u)(off>>16),data+2); } // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit32u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { if (isdword) { cache_addd( CMP_IMM(reg, 0, 0) ); // cmp reg, #0 } else { cache_addd( TST_IMM(reg, 0xff, 0) ); // tst reg, #0xff } cache_addd( BNE_FWD(0) ); // bne j - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit32u gen_create_branch_long_leqzero(HostReg reg) { +static const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { cache_addd( CMP_IMM(reg, 0, 0) ); // cmp reg, #0 cache_addd( BLE_FWD(0) ); // ble j - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // calculate long relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch_long(Bit32u data) { - *(Bit32u*)data=( (*(Bit32u*)data) & 0xff000000 ) | ( ( ((Bit32u)cache.pos - (data+8)) >> 2 ) & 0x00ffffff ); +static void INLINE gen_fill_branch_long(const Bit8u* data) { + gen_fill_branch(data); } static void gen_run_code(void) { @@ -917,7 +919,7 @@ cache_addd( BX(HOST_r0) ); // bx r0 #else - Bit8u *pos1, *pos2, *pos3; + const Bit8u *pos1, *pos2, *pos3; cache_addd(0xe92d4df0); // stmfd sp!, {v1-v5,v7,v8,lr} @@ -935,13 +937,13 @@ cache.pos = cache.pos + (32 - (((Bitu)cache.pos) & 0x1f)); } - *(Bit32u*)pos1 = LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] + cache_addd(LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)),pos1); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] cache_addd((Bit32u)&Segs); // address of "Segs" - *(Bit32u*)pos2 = LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] + cache_addd(LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)),pos2); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] cache_addd((Bit32u)&cpu_regs); // address of "cpu_regs" - *(Bit32u*)pos3 = LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] + cache_addd(LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)),pos3); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] cache_addd((Bit32u)&core_dynrec.readdata); // address of "core_dynrec.readdata" // align cache.pos to 32 bytes @@ -960,58 +962,58 @@ // called when a call to a function can be replaced by a // call to a simpler function -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { #ifdef DRC_FLAGS_INVALIDATION_DCODE // try to avoid function calls but rather directly fill in code switch (flags_type) { case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=ADD_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0); // add FC_RETOP, a1, a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(ADD_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0),pos+8); // add FC_RETOP, a1, a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_ORb: case t_ORw: case t_ORd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=ORR_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0); // orr FC_RETOP, a1, a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(ORR_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0),pos+8); // orr FC_RETOP, a1, a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=AND_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0); // and FC_RETOP, a1, a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(AND_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0),pos+8); // and FC_RETOP, a1, a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=SUB_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0); // sub FC_RETOP, a1, a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(SUB_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0),pos+8); // sub FC_RETOP, a1, a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_XORb: case t_XORw: case t_XORd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=EOR_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0); // eor FC_RETOP, a1, a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(EOR_REG_LSL_IMM(FC_RETOP, HOST_a1, HOST_a2, 0),pos+8); // eor FC_RETOP, a1, a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_CMPb: @@ -1020,183 +1022,183 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(NOP,pos+8); // nop #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_INCb: case t_INCw: case t_INCd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=ADD_IMM(FC_RETOP, HOST_a1, 1, 0); // add FC_RETOP, a1, #1 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(ADD_IMM(FC_RETOP, HOST_a1, 1, 0),pos+8); // add FC_RETOP, a1, #1 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_DECb: case t_DECw: case t_DECd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=SUB_IMM(FC_RETOP, HOST_a1, 1, 0); // sub FC_RETOP, a1, #1 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(SUB_IMM(FC_RETOP, HOST_a1, 1, 0),pos+8); // sub FC_RETOP, a1, #1 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=MOV_REG_LSL_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, lsl a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(MOV_REG_LSL_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, lsl a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_SHRb: - *(Bit32u*)pos=NOP; // nop + cache_addd(NOP,pos+0); // nop #if C_TARGETCPU == ARMV7LE - *(Bit32u*)(pos+4)=BFC(HOST_a1, 8, 24); // bfc a1, 8, 24 - *(Bit32u*)(pos+8)=MOV_REG_LSR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, lsr a2 + cache_addd(BFC(HOST_a1, 8, 24),pos+4); // bfc a1, 8, 24 + cache_addd(MOV_REG_LSR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, lsr a2 #else - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=AND_IMM(FC_RETOP, HOST_a1, 0xff, 0); // and FC_RETOP, a1, #0xff - *(Bit32u*)(pos+12)=MOV_REG_LSR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, lsr a2 + cache_addd(NOP,pos+4); // nop + cache_addd(AND_IMM(FC_RETOP, HOST_a1, 0xff, 0),pos+8); // and FC_RETOP, a1, #0xff + cache_addd(MOV_REG_LSR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+12); // mov FC_RETOP, FC_RETOP, lsr a2 #endif break; case t_SHRw: - *(Bit32u*)pos=NOP; // nop + cache_addd(NOP,pos+0); // nop #if C_TARGETCPU == ARMV7LE - *(Bit32u*)(pos+4)=BFC(HOST_a1, 16, 16); // bfc a1, 16, 16 - *(Bit32u*)(pos+8)=MOV_REG_LSR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, lsr a2 + cache_addd(BFC(HOST_a1, 16, 16),pos+4); // bfc a1, 16, 16 + cache_addd(MOV_REG_LSR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, lsr a2 #else - *(Bit32u*)(pos+4)=MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16); // mov FC_RETOP, a1, lsl #16 - *(Bit32u*)(pos+8)=MOV_REG_LSR_IMM(FC_RETOP, FC_RETOP, 16); // mov FC_RETOP, FC_RETOP, lsr #16 - *(Bit32u*)(pos+12)=MOV_REG_LSR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, lsr a2 + cache_addd(MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16),pos+4); // mov FC_RETOP, a1, lsl #16 + cache_addd(MOV_REG_LSR_IMM(FC_RETOP, FC_RETOP, 16),pos+8); // mov FC_RETOP, FC_RETOP, lsr #16 + cache_addd(MOV_REG_LSR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+12); // mov FC_RETOP, FC_RETOP, lsr a2 #endif break; case t_SHRd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=MOV_REG_LSR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, lsr a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(MOV_REG_LSR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, lsr a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_SARb: - *(Bit32u*)pos=NOP; // nop + cache_addd(NOP,pos+0); // nop #if C_TARGETCPU == ARMV7LE - *(Bit32u*)(pos+4)=SXTB(FC_RETOP, HOST_a1, 0); // sxtb FC_RETOP, a1 - *(Bit32u*)(pos+8)=MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, asr a2 + cache_addd(SXTB(FC_RETOP, HOST_a1, 0),pos+4); // sxtb FC_RETOP, a1 + cache_addd(MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+8); // mov FC_RETOP, FC_RETOP, asr a2 #else - *(Bit32u*)(pos+4)=MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 24); // mov FC_RETOP, a1, lsl #24 - *(Bit32u*)(pos+8)=MOV_REG_ASR_IMM(FC_RETOP, FC_RETOP, 24); // mov FC_RETOP, FC_RETOP, asr #24 - *(Bit32u*)(pos+12)=MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, asr a2 + cache_addd(MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 24),pos+4); // mov FC_RETOP, a1, lsl #24 + cache_addd(MOV_REG_ASR_IMM(FC_RETOP, FC_RETOP, 24),pos+8); // mov FC_RETOP, FC_RETOP, asr #24 + cache_addd(MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+12); // mov FC_RETOP, FC_RETOP, asr a2 #endif break; case t_SARw: - *(Bit32u*)pos=NOP; // nop + cache_addd(NOP,pos+0); // nop #if C_TARGETCPU == ARMV7LE - *(Bit32u*)(pos+4)=SXTH(FC_RETOP, HOST_a1, 0); // sxth FC_RETOP, a1 - *(Bit32u*)(pos+8)=MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, asr a2 + cache_addd(SXTH(FC_RETOP, HOST_a1, 0),pos+4); // sxth FC_RETOP, a1 + cache_addd(MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+8); // mov FC_RETOP, FC_RETOP, asr a2 #else - *(Bit32u*)(pos+4)=MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16); // mov FC_RETOP, a1, lsl #16 - *(Bit32u*)(pos+8)=MOV_REG_ASR_IMM(FC_RETOP, FC_RETOP, 16); // mov FC_RETOP, FC_RETOP, asr #16 - *(Bit32u*)(pos+12)=MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, asr a2 + cache_addd(MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16),pos+4); // mov FC_RETOP, a1, lsl #16 + cache_addd(MOV_REG_ASR_IMM(FC_RETOP, FC_RETOP, 16),pos+8); // mov FC_RETOP, FC_RETOP, asr #16 + cache_addd(MOV_REG_ASR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+12); // mov FC_RETOP, FC_RETOP, asr a2 #endif break; case t_SARd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=MOV_REG_ASR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, asr a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(MOV_REG_ASR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, asr a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_RORb: #if C_TARGETCPU == ARMV7LE - *(Bit32u*)pos=BFI(HOST_a1, HOST_a1, 8, 8); // bfi a1, a1, 8, 8 - *(Bit32u*)(pos+4)=BFI(HOST_a1, HOST_a1, 16, 16); // bfi a1, a1, 16, 16 - *(Bit32u*)(pos+8)=MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, ror a2 + cache_addd(BFI(HOST_a1, HOST_a1, 8, 8),pos+0); // bfi a1, a1, 8, 8 + cache_addd(BFI(HOST_a1, HOST_a1, 16, 16),pos+4); // bfi a1, a1, 16, 16 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, ror a2 #else - *(Bit32u*)pos=MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 24); // mov FC_RETOP, a1, lsl #24 - *(Bit32u*)(pos+4)=ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 8); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #8 - *(Bit32u*)(pos+8)=ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 16); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #16 - *(Bit32u*)(pos+12)=MOV_REG_ROR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, ror a2 + cache_addd(MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 24),pos+0); // mov FC_RETOP, a1, lsl #24 + cache_addd(ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 8),pos+4); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #8 + cache_addd(ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 16),pos+8); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #16 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+12); // mov FC_RETOP, FC_RETOP, ror a2 #endif break; case t_RORw: - *(Bit32u*)pos=NOP; // nop + cache_addd(NOP,pos+0); // nop #if C_TARGETCPU == ARMV7LE - *(Bit32u*)(pos+4)=BFI(HOST_a1, HOST_a1, 16, 16); // bfi a1, a1, 16, 16 - *(Bit32u*)(pos+8)=MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, ror a2 + cache_addd(BFI(HOST_a1, HOST_a1, 16, 16),pos+4); // bfi a1, a1, 16, 16 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, ror a2 #else - *(Bit32u*)(pos+4)=MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16); // mov FC_RETOP, a1, lsl #16 - *(Bit32u*)(pos+8)=ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 16); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #16 - *(Bit32u*)(pos+12)=MOV_REG_ROR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, ror a2 + cache_addd(MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16),pos+4); // mov FC_RETOP, a1, lsl #16 + cache_addd(ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 16),pos+8); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #16 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+12); // mov FC_RETOP, FC_RETOP, ror a2 #endif break; case t_RORd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, ror a2 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, ror a2 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; case t_ROLw: #if C_TARGETCPU == ARMV7LE - *(Bit32u*)pos=BFI(HOST_a1, HOST_a1, 16, 16); // bfi a1, a1, 16, 16 - *(Bit32u*)(pos+4)=RSB_IMM(HOST_a2, HOST_a2, 32, 0); // rsb a2, a2, #32 - *(Bit32u*)(pos+8)=MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, ror a2 + cache_addd(BFI(HOST_a1, HOST_a1, 16, 16),pos+0); // bfi a1, a1, 16, 16 + cache_addd(RSB_IMM(HOST_a2, HOST_a2, 32, 0),pos+4); // rsb a2, a2, #32 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, ror a2 #else - *(Bit32u*)pos=MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16); // mov FC_RETOP, a1, lsl #16 - *(Bit32u*)(pos+4)=RSB_IMM(HOST_a2, HOST_a2, 32, 0); // rsb a2, a2, #32 - *(Bit32u*)(pos+8)=ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 16); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #16 - *(Bit32u*)(pos+12)=MOV_REG_ROR_REG(FC_RETOP, FC_RETOP, HOST_a2); // mov FC_RETOP, FC_RETOP, ror a2 + cache_addd(MOV_REG_LSL_IMM(FC_RETOP, HOST_a1, 16),pos+0); // mov FC_RETOP, a1, lsl #16 + cache_addd(RSB_IMM(HOST_a2, HOST_a2, 32, 0),pos+4); // rsb a2, a2, #32 + cache_addd(ORR_REG_LSR_IMM(FC_RETOP, FC_RETOP, FC_RETOP, 16),pos+8); // orr FC_RETOP, FC_RETOP, FC_RETOP, lsr #16 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, FC_RETOP, HOST_a2),pos+12); // mov FC_RETOP, FC_RETOP, ror a2 #endif break; case t_ROLd: - *(Bit32u*)pos=NOP; // nop + cache_addd(NOP,pos+0); // nop #if C_TARGETCPU == ARMV7LE - *(Bit32u*)(pos+4)=RSB_IMM(HOST_a2, HOST_a2, 32, 0); // rsb a2, a2, #32 - *(Bit32u*)(pos+8)=MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, ror a2 + cache_addd(RSB_IMM(HOST_a2, HOST_a2, 32, 0),pos+4); // rsb a2, a2, #32 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+8); // mov FC_RETOP, a1, ror a2 #else - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=RSB_IMM(HOST_a2, HOST_a2, 32, 0); // rsb a2, a2, #32 - *(Bit32u*)(pos+12)=MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2); // mov FC_RETOP, a1, ror a2 + cache_addd(NOP,pos+4); // nop + cache_addd(RSB_IMM(HOST_a2, HOST_a2, 32, 0),pos+8); // rsb a2, a2, #32 + cache_addd(MOV_REG_ROR_REG(FC_RETOP, HOST_a1, HOST_a2),pos+12); // mov FC_RETOP, a1, ror a2 #endif break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=RSB_IMM(FC_RETOP, HOST_a1, 0, 0); // rsb FC_RETOP, a1, #0 + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(RSB_IMM(FC_RETOP, HOST_a1, 0, 0),pos+8); // rsb FC_RETOP, a1, #0 #if C_TARGETCPU != ARMV7LE - *(Bit32u*)(pos+12)=NOP; // nop + cache_addd(NOP,pos+12); // nop #endif break; default: #if C_TARGETCPU == ARMV7LE - *(Bit32u*)pos=MOVW(temp1, ((Bit32u)fct_ptr) & 0xffff); // movw temp1, #(fct_ptr & 0xffff) - *(Bit32u*)(pos+4)=MOVT(temp1, ((Bit32u)fct_ptr) >> 16); // movt temp1, #(fct_ptr >> 16) + cache_addd(MOVW(temp1, ((Bit32u)fct_ptr) & 0xffff),pos+0); // movw temp1, #(fct_ptr & 0xffff) + cache_addd(MOVT(temp1, ((Bit32u)fct_ptr) >> 16),pos+4); // movt temp1, #(fct_ptr >> 16) #else - *(Bit32u*)(pos+12)=(Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+12); // simple_func #endif break; } #else #if C_TARGETCPU == ARMV7LE - *(Bit32u*)pos=MOVW(temp1, ((Bit32u)fct_ptr) & 0xffff); // movw temp1, #(fct_ptr & 0xffff) - *(Bit32u*)(pos+4)=MOVT(temp1, ((Bit32u)fct_ptr) >> 16); // movt temp1, #(fct_ptr >> 16) + cache_addd(MOVW(temp1, ((Bit32u)fct_ptr) & 0xffff),pos+0); // movw temp1, #(fct_ptr & 0xffff) + cache_addd(MOVT(temp1, ((Bit32u)fct_ptr) >> 16),pos+4); // movt temp1, #(fct_ptr >> 16) #else - *(Bit32u*)(pos+12)=(Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+12); // simple_func #endif #endif } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-thumb.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-thumb.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-thumb.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-thumb.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -572,8 +572,8 @@ } // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { - gen_mov_direct_dword(dest,(Bit32u)imm); +static void INLINE gen_mov_direct_ptr(void* dest,Bit32u imm) { + gen_mov_direct_dword(dest,imm); } // add a 32bit (dword==true) or 16bit (dword==false) constant value to a memory value @@ -687,8 +687,8 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static Bit32u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { - Bit32u proc_addr = (Bit32u)cache.pos; +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { + const Bit8u* proc_addr = cache.pos; gen_call_function_raw(func); return proc_addr; // if proc_addr is on word boundary ((proc_addr & 0x03) == 0) @@ -761,42 +761,42 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_zero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { if (dword) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 } else { cache_addw( LSL_IMM(templo1, reg, 16) ); // lsl templo1, reg, #16 } cache_addw( BEQ_FWD(0) ); // beq j - return ((Bit32u)cache.pos-2); + return (cache.pos-2); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { if (dword) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 } else { cache_addw( LSL_IMM(templo1, reg, 16) ); // lsl templo1, reg, #16 } cache_addw( BNE_FWD(0) ); // bne j - return ((Bit32u)cache.pos-2); + return (cache.pos-2); } // calculate relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void INLINE gen_fill_branch(const Bit8u* data) { #if C_DEBUG - Bits len=(Bit32u)cache.pos-(data+4); + Bits len=cache.pos-(data+4); if (len<0) len=-len; if (len>252) LOG_MSG("Big jump %d",len); #endif - *(Bit8u*)data=(Bit8u)( ((Bit32u)cache.pos-(data+4)) >> 1 ); + cache_addb((Bit8u)((cache.pos-(data+4)) >> 1),data); } // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit32u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { if (isdword) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 } else { @@ -814,11 +814,11 @@ } cache_addd(0); // fill j // nobranch: - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit32u gen_create_branch_long_leqzero(HostReg reg) { +static const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 if (((Bit32u)cache.pos & 0x03) == 0) { cache_addw( BGT_FWD(8) ); // bgt nobranch (pc+8) @@ -832,17 +832,17 @@ } cache_addd(0); // fill j // nobranch: - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // calculate long relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch_long(Bit32u data) { +static void INLINE gen_fill_branch_long(const Bit8u* data) { // this is an absolute branch - *(Bit32u*)data=((Bit32u)cache.pos) + 1; // add 1 to keep processor in thumb state + cache_addd((Bit32u)cache.pos + 1,data); // add 1 to keep processor in thumb state } static void gen_run_code(void) { - Bit8u *pos1, *pos2, *pos3; + const Bit8u *pos1, *pos2, *pos3; #if (__ARM_EABI__) // 8-byte stack alignment @@ -876,13 +876,13 @@ cache.pos = cache.pos + (32 - (((Bitu)cache.pos) & 0x1f)); } - *(Bit32u*)pos1 = ARM_LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] + cache_addd(ARM_LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)),pos1); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] cache_addd((Bit32u)&Segs); // address of "Segs" - *(Bit32u*)pos2 = ARM_LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] + cache_addd(ARM_LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)),pos2); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] cache_addd((Bit32u)&cpu_regs); // address of "cpu_regs" - *(Bit32u*)pos3 = ARM_LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] + cache_addd(ARM_LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)),pos3); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] cache_addd((Bit32u)&core_dynrec.readdata); // address of "core_dynrec.readdata" // align cache.pos to 32 bytes @@ -901,7 +901,7 @@ // called when a call to a function can be replaced by a // call to a simpler function -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { #ifdef DRC_FLAGS_INVALIDATION_DCODE if (((Bit32u)pos & 0x03) == 0) { @@ -910,32 +910,32 @@ case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit16u*)pos=ADD_REG(HOST_a1, HOST_a1, HOST_a2); // add a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(ADD_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // add a1, a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_ORb: case t_ORw: case t_ORd: - *(Bit16u*)pos=ORR(HOST_a1, HOST_a2); // orr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(ORR(HOST_a1, HOST_a2),pos+0); // orr a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit16u*)pos=AND(HOST_a1, HOST_a2); // and a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(AND(HOST_a1, HOST_a2),pos+0); // and a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit16u*)pos=SUB_REG(HOST_a1, HOST_a1, HOST_a2); // sub a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(SUB_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // sub a1, a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_XORb: case t_XORw: case t_XORd: - *(Bit16u*)pos=EOR(HOST_a1, HOST_a2); // eor a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(EOR(HOST_a1, HOST_a2),pos+0); // eor a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_CMPb: case t_CMPw: @@ -943,113 +943,113 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit16u*)pos=B_FWD(16); // b after_call (pc+16) + cache_addw(B_FWD(16),pos+0); // b after_call (pc+16) break; case t_INCb: case t_INCw: case t_INCd: - *(Bit16u*)pos=ADD_IMM3(HOST_a1, HOST_a1, 1); // add a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(ADD_IMM3(HOST_a1, HOST_a1, 1),pos+0); // add a1, a1, #1 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_DECb: case t_DECw: case t_DECd: - *(Bit16u*)pos=SUB_IMM3(HOST_a1, HOST_a1, 1); // sub a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(SUB_IMM3(HOST_a1, HOST_a1, 1),pos+0); // sub a1, a1, #1 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit16u*)pos=LSL_REG(HOST_a1, HOST_a2); // lsl a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(LSL_REG(HOST_a1, HOST_a2),pos+0); // lsl a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_SHRb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 24); // lsr a1, a1, #24 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(10); // b after_call (pc+10) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 24),pos+2); // lsr a1, a1, #24 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(10),pos+6); // b after_call (pc+10) break; case t_SHRw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 16); // lsr a1, a1, #16 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(10); // b after_call (pc+10) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 16),pos+2); // lsr a1, a1, #16 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(10),pos+6); // b after_call (pc+10) break; case t_SHRd: - *(Bit16u*)pos=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+0); // lsr a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_SARb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 24); // asr a1, a1, #24 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(10); // b after_call (pc+10) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 24),pos+2); // asr a1, a1, #24 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(10),pos+6); // b after_call (pc+10) break; case t_SARw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 16); // asr a1, a1, #16 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(10); // b after_call (pc+10) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 16),pos+2); // asr a1, a1, #16 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(10),pos+6); // b after_call (pc+10) break; case t_SARd: - *(Bit16u*)pos=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+0); // asr a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_RORb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+12)=B_FWD(4); // b after_call (pc+4) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+2); // lsr templo1, a1, #8 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+6); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+10); // ror a1, a2 + cache_addw(B_FWD(4),pos+12); // b after_call (pc+4) break; case t_RORw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+8)=B_FWD(8); // b after_call (pc+8) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+2); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+6); // ror a1, a2 + cache_addw(B_FWD(8),pos+8); // b after_call (pc+8) break; case t_RORd: - *(Bit16u*)pos=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+0); // ror a1, a2 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; case t_ROLb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=NOP; // nop - *(Bit16u*)(pos+12)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+14)=NOP; // nop - *(Bit16u*)(pos+16)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+18)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+4); // lsr templo1, a1, #8 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(NOP,pos+10); // nop + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+12); // lsr templo1, a1, #16 + cache_addw(NOP,pos+14); // nop + cache_addw(ORR(HOST_a1, templo1),pos+16); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+18); // ror a1, a2 break; case t_ROLw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+12)=B_FWD(4); // b after_call (pc+4) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+4); // lsr templo1, a1, #16 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+10); // ror a1, a2 + cache_addw(B_FWD(4),pos+12); // b after_call (pc+4) break; case t_ROLd: - *(Bit16u*)pos=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+2)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+4)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+6)=B_FWD(10); // b after_call (pc+10) + cache_addw(NEG(HOST_a2, HOST_a2),pos+0); // neg a2, a2 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+2); // add a2, #32 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+4); // ror a1, a2 + cache_addw(B_FWD(10),pos+6); // b after_call (pc+10) break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit16u*)pos=NEG(HOST_a1, HOST_a1); // neg a1, a1 - *(Bit16u*)(pos+2)=B_FWD(14); // b after_call (pc+14) + cache_addw(NEG(HOST_a1, HOST_a1),pos+0); // neg a1, a1 + cache_addw(B_FWD(14),pos+2); // b after_call (pc+14) break; default: - *(Bit32u*)(pos+8)=(Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+8); // simple_func break; } } @@ -1060,32 +1060,32 @@ case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit16u*)pos=ADD_REG(HOST_a1, HOST_a1, HOST_a2); // add a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(ADD_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // add a1, a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_ORb: case t_ORw: case t_ORd: - *(Bit16u*)pos=ORR(HOST_a1, HOST_a2); // orr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(ORR(HOST_a1, HOST_a2),pos+0); // orr a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit16u*)pos=AND(HOST_a1, HOST_a2); // and a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(AND(HOST_a1, HOST_a2),pos+0); // and a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit16u*)pos=SUB_REG(HOST_a1, HOST_a1, HOST_a2); // sub a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(SUB_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // sub a1, a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_XORb: case t_XORw: case t_XORd: - *(Bit16u*)pos=EOR(HOST_a1, HOST_a2); // eor a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(EOR(HOST_a1, HOST_a2),pos+0); // eor a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_CMPb: case t_CMPw: @@ -1093,114 +1093,114 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit16u*)pos=B_FWD(18); // b after_call (pc+18) + cache_addw(B_FWD(18),pos+0); // b after_call (pc+18) break; case t_INCb: case t_INCw: case t_INCd: - *(Bit16u*)pos=ADD_IMM3(HOST_a1, HOST_a1, 1); // add a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(ADD_IMM3(HOST_a1, HOST_a1, 1),pos+0); // add a1, a1, #1 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_DECb: case t_DECw: case t_DECd: - *(Bit16u*)pos=SUB_IMM3(HOST_a1, HOST_a1, 1); // sub a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(SUB_IMM3(HOST_a1, HOST_a1, 1),pos+0); // sub a1, a1, #1 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit16u*)pos=LSL_REG(HOST_a1, HOST_a2); // lsl a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(LSL_REG(HOST_a1, HOST_a2),pos+0); // lsl a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_SHRb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 24); // lsr a1, a1, #24 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(12); // b after_call (pc+12) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 24),pos+2); // lsr a1, a1, #24 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(12),pos+6); // b after_call (pc+12) break; case t_SHRw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 16); // lsr a1, a1, #16 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(12); // b after_call (pc+12) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 16),pos+2); // lsr a1, a1, #16 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(12),pos+6); // b after_call (pc+12) break; case t_SHRd: - *(Bit16u*)pos=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+0); // lsr a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_SARb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 24); // asr a1, a1, #24 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(12); // b after_call (pc+12) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 24),pos+2); // asr a1, a1, #24 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(12),pos+6); // b after_call (pc+12) break; case t_SARw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 16); // asr a1, a1, #16 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(12); // b after_call (pc+12) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 16),pos+2); // asr a1, a1, #16 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(12),pos+6); // b after_call (pc+12) break; case t_SARd: - *(Bit16u*)pos=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+0); // asr a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_RORb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+12)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+2); // lsr templo1, a1, #8 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+6); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+10); // ror a1, a2 + cache_addw(B_FWD(6),pos+12); // b after_call (pc+6) break; case t_RORw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+8)=B_FWD(10); // b after_call (pc+10) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+2); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+6); // ror a1, a2 + cache_addw(B_FWD(10),pos+8); // b after_call (pc+10) break; case t_RORd: - *(Bit16u*)pos=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+0); // ror a1, a2 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; case t_ROLb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=NOP; // nop - *(Bit16u*)(pos+12)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+14)=NOP; // nop - *(Bit16u*)(pos+16)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+18)=NOP; // nop - *(Bit16u*)(pos+20)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+4); // lsr templo1, a1, #8 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(NOP,pos+10); // nop + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+12); // lsr templo1, a1, #16 + cache_addw(NOP,pos+14); // nop + cache_addw(ORR(HOST_a1, templo1),pos+16); // orr a1, templo1 + cache_addw(NOP,pos+18); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+20); // ror a1, a2 break; case t_ROLw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+12)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+4); // lsr templo1, a1, #16 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+10); // ror a1, a2 + cache_addw(B_FWD(6),pos+12); // b after_call (pc+6) break; case t_ROLd: - *(Bit16u*)pos=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+2)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+4)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+6)=B_FWD(12); // b after_call (pc+12) + cache_addw(NEG(HOST_a2, HOST_a2),pos+0); // neg a2, a2 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+2); // add a2, #32 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+4); // ror a1, a2 + cache_addw(B_FWD(12),pos+6); // b after_call (pc+12) break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit16u*)pos=NEG(HOST_a1, HOST_a1); // neg a1, a1 - *(Bit16u*)(pos+2)=B_FWD(16); // b after_call (pc+16) + cache_addw(NEG(HOST_a1, HOST_a1),pos+0); // neg a1, a1 + cache_addw(B_FWD(16),pos+2); // b after_call (pc+16) break; default: - *(Bit32u*)(pos+10)=(Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+10); // simple_func break; } @@ -1208,11 +1208,11 @@ #else if (((Bit32u)pos & 0x03) == 0) { - *(Bit32u*)(pos+8)=(Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+8); // simple_func } else { - *(Bit32u*)(pos+10)=(Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+10); // simple_func } #endif } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-thumb-iw.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-thumb-iw.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-thumb-iw.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-thumb-iw.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -181,13 +181,13 @@ #define CACHE_DATA_MAX (288) // data pool variables -static Bit8u * cache_datapos = NULL; // position of data pool in the cache block +static const Bit8u * cache_datapos = NULL; // position of data pool in the cache block static Bit32u cache_datasize = 0; // total size of data pool static Bit32u cache_dataindex = 0; // used size of data pool = index of free data item (in bytes) in data pool // forwarded function -static void INLINE gen_create_branch_short(void * func); +static void INLINE gen_create_branch_short(const Bit8u * func); // function to check distance to data pool // if too close, then generate jump after data pool @@ -204,7 +204,7 @@ if (cache.pos + size + CACHE_DATA_JUMP <= cache_datapos) return; { - register Bit8u * newcachepos; + register const Bit8u * newcachepos; newcachepos = cache_datapos + cache_datasize; gen_create_branch_short(newcachepos); @@ -214,7 +214,7 @@ if (cache.pos + CACHE_DATA_MAX + CACHE_DATA_ALIGN >= cache.block.active->cache.start + cache.block.active->cache.size && cache.pos + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) < cache.block.active->cache.start + cache.block.active->cache.size) { - cache_datapos = (Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); } else { register Bit32u cachemodsize; @@ -223,9 +223,9 @@ if (cachemodsize + CACHE_DATA_MAX + CACHE_DATA_ALIGN <= CACHE_MAXSIZE || cachemodsize + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) > CACHE_MAXSIZE) { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); } else { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); } } @@ -235,11 +235,11 @@ // function to reserve item in data pool // returns address of item -static Bit8u * cache_reservedata(void) { +static const Bit8u * cache_reservedata(void) { // if data pool not yet initialized, then initialize data pool if (GCC_UNLIKELY(cache_datapos == NULL)) { if (cache.pos + CACHE_DATA_MIN + CACHE_DATA_ALIGN < cache.block.active->cache.start + CACHE_DATA_MAX) { - cache_datapos = (Bit8u *) (((Bitu)cache.block.active->cache.start + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.block.active->cache.start + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); } } @@ -250,7 +250,7 @@ if (cache.pos + CACHE_DATA_MAX + CACHE_DATA_ALIGN >= cache.block.active->cache.start + cache.block.active->cache.size && cache.pos + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) < cache.block.active->cache.start + cache.block.active->cache.size) { - cache_datapos = (Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); } else { register Bit32u cachemodsize; @@ -259,9 +259,9 @@ if (cachemodsize + CACHE_DATA_MAX + CACHE_DATA_ALIGN <= CACHE_MAXSIZE || cachemodsize + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) > CACHE_MAXSIZE) { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); } else { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); } } } @@ -350,10 +350,10 @@ cache_addw( ADD_LO_PC_IMM(dest_reg, (diff - 2) >> 2) ); // add dest_reg, pc, #((diff - 2) >> 2) } } else { - Bit8u *datapos; + const Bit8u *datapos; datapos = cache_reservedata(); - *(Bit32u*)datapos=imm; + cache_addd(imm,datapos); if (((Bit32u)cache.pos & 0x03) == 0) { cache_addw( LDR_PC_IMM(dest_reg, datapos - (cache.pos + 4)) ); // ldr dest_reg, [pc, datapos] @@ -726,8 +726,8 @@ } // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { - gen_mov_direct_dword(dest,(Bit32u)imm); +static void INLINE gen_mov_direct_ptr(void* dest,Bit32u imm) { + gen_mov_direct_dword(dest,imm); } // add a 32bit (dword==true) or 16bit (dword==false) constant value to a memory value @@ -823,10 +823,10 @@ // helper function for gen_call_function_raw and gen_call_function_setup static void gen_call_function_helper(void * func) { - Bit8u *datapos; + const Bit8u *datapos; datapos = cache_reservedata(); - *(Bit32u*)datapos=(Bit32u)func; + cache_addd((Bit32u)func,datapos); if (((Bit32u)cache.pos & 0x03) == 0) { cache_addw( LDR_PC_IMM(templo1, datapos - (cache.pos + 4)) ); // ldr templo1, [pc, datapos] @@ -856,9 +856,9 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static Bit32u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { cache_checkinstr(12); - Bit32u proc_addr = (Bit32u)cache.pos; + const Bit8u* proc_addr = cache.pos; gen_call_function_helper(func); return proc_addr; // if proc_addr is on word boundary ((proc_addr & 0x03) == 0) @@ -934,7 +934,7 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_zero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { cache_checkinstr(4); if (dword) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 @@ -942,12 +942,12 @@ cache_addw( LSL_IMM(templo1, reg, 16) ); // lsl templo1, reg, #16 } cache_addw( BEQ_FWD(0) ); // beq j - return ((Bit32u)cache.pos-2); + return (cache.pos-2); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { cache_checkinstr(4); if (dword) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 @@ -955,25 +955,25 @@ cache_addw( LSL_IMM(templo1, reg, 16) ); // lsl templo1, reg, #16 } cache_addw( BNE_FWD(0) ); // bne j - return ((Bit32u)cache.pos-2); + return (cache.pos-2); } // calculate relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void INLINE gen_fill_branch(const Bit8u* data) { #if C_DEBUG - Bits len=(Bit32u)cache.pos-(data+4); + Bits len=cache.pos-(data+4); if (len<0) len=-len; if (len>252) LOG_MSG("Big jump %d",len); #endif - *(Bit8u*)data=(Bit8u)( ((Bit32u)cache.pos-(data+4)) >> 1 ); + cache_addb((Bit8u)((cache.pos-(data+4))>>1),data); } // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit32u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { - Bit8u *datapos; +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { + const Bit8u *datapos; cache_checkinstr(8); datapos = cache_reservedata(); @@ -991,12 +991,12 @@ } cache_addw( BX(templo1) ); // bx templo1 // nobranch: - return ((Bit32u)datapos); + return (datapos); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit32u gen_create_branch_long_leqzero(HostReg reg) { - Bit8u *datapos; +static const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { + const Bit8u *datapos; cache_checkinstr(8); datapos = cache_reservedata(); @@ -1010,17 +1010,17 @@ } cache_addw( BX(templo1) ); // bx templo1 // nobranch: - return ((Bit32u)datapos); + return (datapos); } // calculate long relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch_long(Bit32u data) { +static void INLINE gen_fill_branch_long(const Bit8u* data) { // this is an absolute branch - *(Bit32u*)data=((Bit32u)cache.pos) + 1; // add 1 to keep processor in thumb state + cache_addd((Bit32u)cache.pos+1,data); // add 1 to keep processor in thumb state } static void gen_run_code(void) { - Bit8u *pos1, *pos2, *pos3; + const Bit8u *pos1, *pos2, *pos3; #if (__ARM_EABI__) // 8-byte stack alignment @@ -1054,13 +1054,13 @@ cache.pos = cache.pos + (32 - (((Bitu)cache.pos) & 0x1f)); } - *(Bit32u*)pos1 = ARM_LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] + cache_addd(ARM_LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)),pos1); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] cache_addd((Bit32u)&Segs); // address of "Segs" - *(Bit32u*)pos2 = ARM_LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] + cache_addd(ARM_LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)),pos2); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] cache_addd((Bit32u)&cpu_regs); // address of "cpu_regs" - *(Bit32u*)pos3 = ARM_LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] + cache_addd(ARM_LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)),pos3); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] cache_addd((Bit32u)&core_dynrec.readdata); // address of "core_dynrec.readdata" // align cache.pos to 32 bytes @@ -1079,8 +1079,8 @@ // short unconditional jump (over data pool) // must emit at most CACHE_DATA_JUMP bytes -static void INLINE gen_create_branch_short(void * func) { - cache_addw( B_FWD((Bit32u)func - ((Bit32u)cache.pos + 4)) ); // b func +static void INLINE gen_create_branch_short(const Bit8u * func) { + cache_addw( B_FWD(func - (cache.pos + 4)) ); // b func } @@ -1088,12 +1088,12 @@ // called when a call to a function can be replaced by a // call to a simpler function -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { - if ((*(Bit16u*)pos & 0xf000) == 0xe000) { - if ((*(Bit16u*)pos & 0x0fff) >= ((CACHE_DATA_ALIGN / 2) - 1) && - (*(Bit16u*)pos & 0x0fff) < 0x0800) +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { + if ((*(const Bit16u*)pos & 0xf000) == 0xe000) { + if ((*(const Bit16u*)pos & 0x0fff) >= ((CACHE_DATA_ALIGN / 2) - 1) && + (*(const Bit16u*)pos & 0x0fff) < 0x0800) { - pos = (Bit8u *) ( ( ( (Bit32u)(*(Bit16u*)pos & 0x0fff) ) << 1 ) + ((Bit32u)pos + 4) ); + pos = (const Bit8u *) ( ( ( (Bit32u)(*(const Bit16u*)pos & 0x0fff) ) << 1 ) + ((Bit32u)pos + 4) ); } } @@ -1105,32 +1105,32 @@ case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit16u*)pos=ADD_REG(HOST_a1, HOST_a1, HOST_a2); // add a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(ADD_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // add a1, a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_ORb: case t_ORw: case t_ORd: - *(Bit16u*)pos=ORR(HOST_a1, HOST_a2); // orr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(ORR(HOST_a1, HOST_a2),pos+0); // orr a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit16u*)pos=AND(HOST_a1, HOST_a2); // and a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(AND(HOST_a1, HOST_a2),pos+0); // and a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit16u*)pos=SUB_REG(HOST_a1, HOST_a1, HOST_a2); // sub a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(SUB_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // sub a1, a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_XORb: case t_XORw: case t_XORd: - *(Bit16u*)pos=EOR(HOST_a1, HOST_a2); // eor a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(EOR(HOST_a1, HOST_a2),pos+0); // eor a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_CMPb: case t_CMPw: @@ -1138,110 +1138,110 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit16u*)pos=B_FWD(8); // b after_call (pc+8) + cache_addw(B_FWD(8),pos+0); // b after_call (pc+8) break; case t_INCb: case t_INCw: case t_INCd: - *(Bit16u*)pos=ADD_IMM3(HOST_a1, HOST_a1, 1); // add a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(ADD_IMM3(HOST_a1, HOST_a1, 1),pos+0); // add a1, a1, #1 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_DECb: case t_DECw: case t_DECd: - *(Bit16u*)pos=SUB_IMM3(HOST_a1, HOST_a1, 1); // sub a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(SUB_IMM3(HOST_a1, HOST_a1, 1),pos+0); // sub a1, a1, #1 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit16u*)pos=LSL_REG(HOST_a1, HOST_a2); // lsl a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_REG(HOST_a1, HOST_a2),pos+0); // lsl a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_SHRb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=LSR_IMM(HOST_a1, HOST_a1, 24); // lsr a1, a1, #24 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+10)=NOP; // nop + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NOP,pos+2); // nop + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 24),pos+4); // lsr a1, a1, #24 + cache_addw(NOP,pos+6); // nop + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+8); // lsr a1, a2 + cache_addw(NOP,pos+10); // nop break; case t_SHRw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=LSR_IMM(HOST_a1, HOST_a1, 16); // lsr a1, a1, #16 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+10)=NOP; // nop + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NOP,pos+2); // nop + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 16),pos+4); // lsr a1, a1, #16 + cache_addw(NOP,pos+6); // nop + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+8); // lsr a1, a2 + cache_addw(NOP,pos+10); // nop break; case t_SHRd: - *(Bit16u*)pos=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+0); // lsr a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_SARb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=ASR_IMM(HOST_a1, HOST_a1, 24); // asr a1, a1, #24 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+10)=NOP; // nop + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NOP,pos+2); // nop + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 24),pos+4); // asr a1, a1, #24 + cache_addw(NOP,pos+6); // nop + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+8); // asr a1, a2 + cache_addw(NOP,pos+10); // nop break; case t_SARw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=ASR_IMM(HOST_a1, HOST_a1, 16); // asr a1, a1, #16 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+10)=NOP; // nop + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NOP,pos+2); // nop + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 16),pos+4); // asr a1, a1, #16 + cache_addw(NOP,pos+6); // nop + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+8); // asr a1, a2 + cache_addw(NOP,pos+10); // nop break; case t_SARd: - *(Bit16u*)pos=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+0); // asr a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_RORb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+2); // lsr templo1, a1, #8 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+6); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+10); // ror a1, a2 break; case t_RORw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+4)=NOP; // nop - *(Bit16u*)(pos+6)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+8)=NOP; // nop - *(Bit16u*)(pos+10)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+2); // lsr templo1, a1, #16 + cache_addw(NOP,pos+4); // nop + cache_addw(ORR(HOST_a1, templo1),pos+6); // orr a1, templo1 + cache_addw(NOP,pos+8); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+10); // ror a1, a2 break; case t_RORd: - *(Bit16u*)pos=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+0); // ror a1, a2 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; case t_ROLw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+4); // lsr templo1, a1, #16 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+10); // ror a1, a2 break; case t_ROLd: - *(Bit16u*)pos=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+10)=NOP; // nop + cache_addw(NEG(HOST_a2, HOST_a2),pos+0); // neg a2, a2 + cache_addw(NOP,pos+2); // nop + cache_addw(ADD_IMM8(HOST_a2, 32),pos+4); // add a2, #32 + cache_addw(NOP,pos+6); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+8); // ror a1, a2 + cache_addw(NOP,pos+10); // nop break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit16u*)pos=NEG(HOST_a1, HOST_a1); // neg a1, a1 - *(Bit16u*)(pos+2)=B_FWD(6); // b after_call (pc+6) + cache_addw(NEG(HOST_a1, HOST_a1),pos+0); // neg a1, a1 + cache_addw(B_FWD(6),pos+2); // b after_call (pc+6) break; default: - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 4) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+4+pos[0]*4); // simple_func break; } } @@ -1252,32 +1252,32 @@ case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit16u*)pos=ADD_REG(HOST_a1, HOST_a1, HOST_a2); // add a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(ADD_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // add a1, a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_ORb: case t_ORw: case t_ORd: - *(Bit16u*)pos=ORR(HOST_a1, HOST_a2); // orr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(ORR(HOST_a1, HOST_a2),pos+0); // orr a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit16u*)pos=AND(HOST_a1, HOST_a2); // and a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(AND(HOST_a1, HOST_a2),pos+0); // and a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit16u*)pos=SUB_REG(HOST_a1, HOST_a1, HOST_a2); // sub a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(SUB_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // sub a1, a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_XORb: case t_XORw: case t_XORd: - *(Bit16u*)pos=EOR(HOST_a1, HOST_a2); // eor a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(EOR(HOST_a1, HOST_a2),pos+0); // eor a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_CMPb: case t_CMPw: @@ -1285,88 +1285,88 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit16u*)pos=B_FWD(6); // b after_call (pc+6) + cache_addw(B_FWD(6),pos+0); // b after_call (pc+6) break; case t_INCb: case t_INCw: case t_INCd: - *(Bit16u*)pos=ADD_IMM3(HOST_a1, HOST_a1, 1); // add a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(ADD_IMM3(HOST_a1, HOST_a1, 1),pos+0); // add a1, a1, #1 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_DECb: case t_DECw: case t_DECd: - *(Bit16u*)pos=SUB_IMM3(HOST_a1, HOST_a1, 1); // sub a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(SUB_IMM3(HOST_a1, HOST_a1, 1),pos+0); // sub a1, a1, #1 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit16u*)pos=LSL_REG(HOST_a1, HOST_a2); // lsl a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(LSL_REG(HOST_a1, HOST_a2),pos+0); // lsl a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_SHRb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=LSR_IMM(HOST_a1, HOST_a1, 24); // lsr a1, a1, #24 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NOP,pos+2); // nop + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 24),pos+4); // lsr a1, a1, #24 + cache_addw(NOP,pos+6); // nop + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+8); // lsr a1, a2 break; case t_SHRw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=LSR_IMM(HOST_a1, HOST_a1, 16); // lsr a1, a1, #16 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NOP,pos+2); // nop + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 16),pos+4); // lsr a1, a1, #16 + cache_addw(NOP,pos+6); // nop + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+8); // lsr a1, a2 break; case t_SHRd: - *(Bit16u*)pos=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+0); // lsr a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_SARb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=ASR_IMM(HOST_a1, HOST_a1, 24); // asr a1, a1, #24 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NOP,pos+2); // nop + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 24),pos+4); // asr a1, a1, #24 + cache_addw(NOP,pos+6); // nop + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+8); // asr a1, a2 break; case t_SARw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=ASR_IMM(HOST_a1, HOST_a1, 16); // asr a1, a1, #16 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NOP,pos+2); // nop + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 16),pos+4); // asr a1, a1, #16 + cache_addw(NOP,pos+6); // nop + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+8); // asr a1, a2 break; case t_SARd: - *(Bit16u*)pos=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+0); // asr a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_RORw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+4)=NOP; // nop - *(Bit16u*)(pos+6)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+8)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+2); // lsr templo1, a1, #16 + cache_addw(NOP,pos+4); // nop + cache_addw(ORR(HOST_a1, templo1),pos+6); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+8); // ror a1, a2 break; case t_RORd: - *(Bit16u*)pos=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+0); // ror a1, a2 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; case t_ROLd: - *(Bit16u*)pos=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+2)=NOP; // nop - *(Bit16u*)(pos+4)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(NEG(HOST_a2, HOST_a2),pos+0); // neg a2, a2 + cache_addw(NOP,pos+2); // nop + cache_addw(ADD_IMM8(HOST_a2, 32),pos+4); // add a2, #32 + cache_addw(NOP,pos+6); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+8); // ror a1, a2 break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit16u*)pos=NEG(HOST_a1, HOST_a1); // neg a1, a1 - *(Bit16u*)(pos+2)=B_FWD(4); // b after_call (pc+4) + cache_addw(NEG(HOST_a1, HOST_a1),pos+0); // neg a1, a1 + cache_addw(B_FWD(4),pos+2); // b after_call (pc+4) break; default: - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 2) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+2+pos[0]*4); // simple_func break; } @@ -1374,11 +1374,11 @@ #else if (((Bit32u)pos & 0x03) == 0) { - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 4) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+4+pos[0]*4); // simple_func } else { - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 2) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+2+pos[0]*4); // simple_func } #endif } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-thumb-niw.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-thumb-niw.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv4le-thumb-niw.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv4le-thumb-niw.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -178,13 +178,13 @@ #define CACHE_DATA_MAX (288) // data pool variables -static Bit8u * cache_datapos = NULL; // position of data pool in the cache block +static const Bit8u * cache_datapos = NULL; // position of data pool in the cache block static Bit32u cache_datasize = 0; // total size of data pool static Bit32u cache_dataindex = 0; // used size of data pool = index of free data item (in bytes) in data pool // forwarded function -static void INLINE gen_create_branch_short(void * func); +static void INLINE gen_create_branch_short(const Bit8u * func); // function to check distance to data pool // if too close, then generate jump after data pool @@ -201,7 +201,7 @@ if (cache.pos + size + CACHE_DATA_JUMP <= cache_datapos) return; { - register Bit8u * newcachepos; + register const Bit8u * newcachepos; newcachepos = cache_datapos + cache_datasize; gen_create_branch_short(newcachepos); @@ -211,7 +211,7 @@ if (cache.pos + CACHE_DATA_MAX + CACHE_DATA_ALIGN >= cache.block.active->cache.start + cache.block.active->cache.size && cache.pos + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) < cache.block.active->cache.start + cache.block.active->cache.size) { - cache_datapos = (Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); } else { register Bit32u cachemodsize; @@ -220,9 +220,9 @@ if (cachemodsize + CACHE_DATA_MAX + CACHE_DATA_ALIGN <= CACHE_MAXSIZE || cachemodsize + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) > CACHE_MAXSIZE) { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); } else { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); } } @@ -232,11 +232,11 @@ // function to reserve item in data pool // returns address of item -static Bit8u * cache_reservedata(void) { +static const Bit8u * cache_reservedata(void) { // if data pool not yet initialized, then initialize data pool if (GCC_UNLIKELY(cache_datapos == NULL)) { if (cache.pos + CACHE_DATA_MIN + CACHE_DATA_ALIGN < cache.block.active->cache.start + CACHE_DATA_MAX) { - cache_datapos = (Bit8u *) (((Bitu)cache.block.active->cache.start + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.block.active->cache.start + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); } } @@ -247,7 +247,7 @@ if (cache.pos + CACHE_DATA_MAX + CACHE_DATA_ALIGN >= cache.block.active->cache.start + cache.block.active->cache.size && cache.pos + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) < cache.block.active->cache.start + cache.block.active->cache.size) { - cache_datapos = (Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.block.active->cache.start + cache.block.active->cache.size - CACHE_DATA_ALIGN) & ~(CACHE_DATA_ALIGN - 1)); } else { register Bit32u cachemodsize; @@ -256,9 +256,9 @@ if (cachemodsize + CACHE_DATA_MAX + CACHE_DATA_ALIGN <= CACHE_MAXSIZE || cachemodsize + CACHE_DATA_MIN + CACHE_DATA_ALIGN + (CACHE_DATA_ALIGN - CACHE_ALIGN) > CACHE_MAXSIZE) { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + CACHE_DATA_MAX) & ~(CACHE_DATA_ALIGN - 1)); } else { - cache_datapos = (Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); + cache_datapos = (const Bit8u *) (((Bitu)cache.pos + (CACHE_MAXSIZE - CACHE_DATA_ALIGN) - cachemodsize) & ~(CACHE_DATA_ALIGN - 1)); } } } @@ -347,10 +347,10 @@ cache_addw( ADD_LO_PC_IMM(dest_reg, (diff - 2) >> 2) ); // add dest_reg, pc, #((diff - 2) >> 2) } } else { - Bit8u *datapos; + const Bit8u *datapos; datapos = cache_reservedata(); - *(Bit32u*)datapos=imm; + cache_addd(imm,datapos); if (((Bit32u)cache.pos & 0x03) == 0) { cache_addw( LDR_PC_IMM(dest_reg, datapos - (cache.pos + 4)) ); // ldr dest_reg, [pc, datapos] @@ -723,8 +723,8 @@ } // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { - gen_mov_direct_dword(dest,(Bit32u)imm); +static void INLINE gen_mov_direct_ptr(void* dest,Bit32u imm) { + gen_mov_direct_dword(dest,imm); } // add a 32bit (dword==true) or 16bit (dword==false) constant value to a memory value @@ -820,10 +820,10 @@ // helper function for gen_call_function_raw and gen_call_function_setup static void gen_call_function_helper(void * func) { - Bit8u *datapos; + const Bit8u *datapos; datapos = cache_reservedata(); - *(Bit32u*)datapos=(Bit32u)func; + cache_addd((Bit32u)func,datapos); if (((Bit32u)cache.pos & 0x03) == 0) { cache_addw( LDR_PC_IMM(templo1, datapos - (cache.pos + 4)) ); // ldr templo1, [pc, datapos] @@ -855,9 +855,9 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static Bit32u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { cache_checkinstr(18); - Bit32u proc_addr = (Bit32u)cache.pos; + const Bit8u* proc_addr = cache.pos; gen_call_function_helper(func); return proc_addr; // if proc_addr is on word boundary ((proc_addr & 0x03) == 0) @@ -933,7 +933,7 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_zero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { cache_checkinstr(4); if (dword) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 @@ -941,12 +941,12 @@ cache_addw( LSL_IMM(templo1, reg, 16) ); // lsl templo1, reg, #16 } cache_addw( BEQ_FWD(0) ); // beq j - return ((Bit32u)cache.pos-2); + return (cache.pos-2); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { cache_checkinstr(4); if (dword) { cache_addw( CMP_IMM(reg, 0) ); // cmp reg, #0 @@ -954,25 +954,25 @@ cache_addw( LSL_IMM(templo1, reg, 16) ); // lsl templo1, reg, #16 } cache_addw( BNE_FWD(0) ); // bne j - return ((Bit32u)cache.pos-2); + return (cache.pos-2); } // calculate relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void INLINE gen_fill_branch(const Bit8u* data) { #if C_DEBUG - Bits len=(Bit32u)cache.pos-(data+4); + Bits len=cache.pos-(data+4); if (len<0) len=-len; if (len>252) LOG_MSG("Big jump %d",len); #endif - *(Bit8u*)data=(Bit8u)( ((Bit32u)cache.pos-(data+4)) >> 1 ); + cache_addb((Bit8u)((cache.pos-(data+4)) >> 1 ),data); } // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit32u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { - Bit8u *datapos; +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { + const Bit8u *datapos; cache_checkinstr(8); datapos = cache_reservedata(); @@ -990,12 +990,12 @@ } cache_addw( BX(templo1) ); // bx templo1 // nobranch: - return ((Bit32u)datapos); + return (datapos); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit32u gen_create_branch_long_leqzero(HostReg reg) { - Bit8u *datapos; +static const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { + const Bit8u *datapos; cache_checkinstr(8); datapos = cache_reservedata(); @@ -1009,17 +1009,17 @@ } cache_addw( BX(templo1) ); // bx templo1 // nobranch: - return ((Bit32u)datapos); + return (datapos); } // calculate long relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch_long(Bit32u data) { +static void INLINE gen_fill_branch_long(const Bit8u* data) { // this is an absolute branch - *(Bit32u*)data=((Bit32u)cache.pos) + 1; // add 1 to keep processor in thumb state + cache_addd((Bit32u)cache.pos + 1,data); // add 1 to keep processor in thumb state } static void gen_run_code(void) { - Bit8u *pos1, *pos2, *pos3; + const Bit8u *pos1, *pos2, *pos3; #if (__ARM_EABI__) // 8-byte stack alignment @@ -1053,13 +1053,13 @@ cache.pos = cache.pos + (32 - (((Bitu)cache.pos) & 0x1f)); } - *(Bit32u*)pos1 = ARM_LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] + cache_addd(ARM_LDR_IMM(FC_SEGS_ADDR, HOST_pc, cache.pos - (pos1 + 8)),pos1);; // ldr FC_SEGS_ADDR, [pc, #(&Segs)] cache_addd((Bit32u)&Segs); // address of "Segs" - *(Bit32u*)pos2 = ARM_LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] + cache_addd(ARM_LDR_IMM(FC_REGS_ADDR, HOST_pc, cache.pos - (pos2 + 8)),pos2); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] cache_addd((Bit32u)&cpu_regs); // address of "cpu_regs" - *(Bit32u*)pos3 = ARM_LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] + cache_addd(ARM_LDR_IMM(readdata_addr, HOST_pc, cache.pos - (pos3 + 8)),pos3); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] cache_addd((Bit32u)&core_dynrec.readdata); // address of "core_dynrec.readdata" // align cache.pos to 32 bytes @@ -1078,8 +1078,8 @@ // short unconditional jump (over data pool) // must emit at most CACHE_DATA_JUMP bytes -static void INLINE gen_create_branch_short(void * func) { - cache_addw( B_FWD((Bit32u)func - ((Bit32u)cache.pos + 4)) ); // b func +static void INLINE gen_create_branch_short(const Bit8u * func) { + cache_addw( B_FWD(func - (cache.pos + 4)) ); // b func } @@ -1087,12 +1087,12 @@ // called when a call to a function can be replaced by a // call to a simpler function -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { if ((*(Bit16u*)pos & 0xf000) == 0xe000) { if ((*(Bit16u*)pos & 0x0fff) >= ((CACHE_DATA_ALIGN / 2) - 1) && (*(Bit16u*)pos & 0x0fff) < 0x0800) { - pos = (Bit8u *) ( ( ( (Bit32u)(*(Bit16u*)pos & 0x0fff) ) << 1 ) + ((Bit32u)pos + 4) ); + pos = (const Bit8u *) ( ( ( (Bit32u)(*(Bit16u*)pos & 0x0fff) ) << 1 ) + ((Bit32u)pos + 4) ); } } @@ -1104,32 +1104,32 @@ case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit16u*)pos=ADD_REG(HOST_a1, HOST_a1, HOST_a2); // add a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(ADD_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // add a1, a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_ORb: case t_ORw: case t_ORd: - *(Bit16u*)pos=ORR(HOST_a1, HOST_a2); // orr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(ORR(HOST_a1, HOST_a2),pos+0); // orr a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit16u*)pos=AND(HOST_a1, HOST_a2); // and a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(AND(HOST_a1, HOST_a2),pos+0); // and a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit16u*)pos=SUB_REG(HOST_a1, HOST_a1, HOST_a2); // sub a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(SUB_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // sub a1, a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_XORb: case t_XORw: case t_XORd: - *(Bit16u*)pos=EOR(HOST_a1, HOST_a2); // eor a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(EOR(HOST_a1, HOST_a2),pos+0); // eor a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_CMPb: case t_CMPw: @@ -1137,113 +1137,113 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit16u*)pos=B_FWD(12); // b after_call (pc+12) + cache_addw(B_FWD(12),pos+0); // b after_call (pc+12) break; case t_INCb: case t_INCw: case t_INCd: - *(Bit16u*)pos=ADD_IMM3(HOST_a1, HOST_a1, 1); // add a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(ADD_IMM3(HOST_a1, HOST_a1, 1),pos+0); // add a1, a1, #1 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_DECb: case t_DECw: case t_DECd: - *(Bit16u*)pos=SUB_IMM3(HOST_a1, HOST_a1, 1); // sub a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(SUB_IMM3(HOST_a1, HOST_a1, 1),pos+0); // sub a1, a1, #1 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit16u*)pos=LSL_REG(HOST_a1, HOST_a2); // lsl a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(LSL_REG(HOST_a1, HOST_a2),pos+0); // lsl a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_SHRb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 24); // lsr a1, a1, #24 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 24),pos+2); // lsr a1, a1, #24 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(6),pos+6); // b after_call (pc+6) break; case t_SHRw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 16); // lsr a1, a1, #16 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 16),pos+2); // lsr a1, a1, #16 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(6),pos+6); // b after_call (pc+6) break; case t_SHRd: - *(Bit16u*)pos=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+0); // lsr a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_SARb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 24); // asr a1, a1, #24 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 24),pos+2); // asr a1, a1, #24 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(6),pos+6); // b after_call (pc+6) break; case t_SARw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 16); // asr a1, a1, #16 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 16),pos+2); // asr a1, a1, #16 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(6),pos+6); // b after_call (pc+6) break; case t_SARd: - *(Bit16u*)pos=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+0); // asr a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_RORb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+10)=NOP; // nop - *(Bit16u*)(pos+12)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+14)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+2); // lsr templo1, a1, #8 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(NOP,pos+6); // nop + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+8); // lsr templo1, a1, #16 + cache_addw(NOP,pos+10); // nop + cache_addw(ORR(HOST_a1, templo1),pos+12); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+14); // ror a1, a2 break; case t_RORw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+8)=B_FWD(4); // b after_call (pc+4) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+2); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+6); // ror a1, a2 + cache_addw(B_FWD(4),pos+8); // b after_call (pc+4) break; case t_RORd: - *(Bit16u*)pos=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+0); // ror a1, a2 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; case t_ROLb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+12)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+14)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+4); // lsr templo1, a1, #8 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+10); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+12); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+14); // ror a1, a2 break; case t_ROLw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=NOP; // nop - *(Bit16u*)(pos+12)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+14)=NOP; // nop + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+4); // lsr templo1, a1, #16 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(NOP,pos+10); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+12); // ror a1, a2 + cache_addw(NOP,pos+14); // nop break; case t_ROLd: - *(Bit16u*)pos=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+2)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+4)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+6)=B_FWD(6); // b after_call (pc+6) + cache_addw(NEG(HOST_a2, HOST_a2),pos+0); // neg a2, a2 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+2); // add a2, #32 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+4); // ror a1, a2 + cache_addw(B_FWD(6),pos+6); // b after_call (pc+6) break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit16u*)pos=NEG(HOST_a1, HOST_a1); // neg a1, a1 - *(Bit16u*)(pos+2)=B_FWD(10); // b after_call (pc+10) + cache_addw(NEG(HOST_a1, HOST_a1),pos+0); // neg a1, a1 + cache_addw(B_FWD(10),pos+2); // b after_call (pc+10) break; default: - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 4) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+4+pos[0]*4); // simple_func break; } } @@ -1254,32 +1254,32 @@ case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit16u*)pos=ADD_REG(HOST_a1, HOST_a1, HOST_a2); // add a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(ADD_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // add a1, a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_ORb: case t_ORw: case t_ORd: - *(Bit16u*)pos=ORR(HOST_a1, HOST_a2); // orr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(ORR(HOST_a1, HOST_a2),pos+0); // orr a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit16u*)pos=AND(HOST_a1, HOST_a2); // and a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(AND(HOST_a1, HOST_a2),pos+0); // and a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit16u*)pos=SUB_REG(HOST_a1, HOST_a1, HOST_a2); // sub a1, a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(SUB_REG(HOST_a1, HOST_a1, HOST_a2),pos+0); // sub a1, a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_XORb: case t_XORw: case t_XORd: - *(Bit16u*)pos=EOR(HOST_a1, HOST_a2); // eor a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(EOR(HOST_a1, HOST_a2),pos+0); // eor a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_CMPb: case t_CMPw: @@ -1287,116 +1287,116 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit16u*)pos=B_FWD(14); // b after_call (pc+14) + cache_addw(B_FWD(14),pos+0); // b after_call (pc+14) break; case t_INCb: case t_INCw: case t_INCd: - *(Bit16u*)pos=ADD_IMM3(HOST_a1, HOST_a1, 1); // add a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(ADD_IMM3(HOST_a1, HOST_a1, 1),pos+0); // add a1, a1, #1 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_DECb: case t_DECw: case t_DECd: - *(Bit16u*)pos=SUB_IMM3(HOST_a1, HOST_a1, 1); // sub a1, a1, #1 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(SUB_IMM3(HOST_a1, HOST_a1, 1),pos+0); // sub a1, a1, #1 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit16u*)pos=LSL_REG(HOST_a1, HOST_a2); // lsl a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(LSL_REG(HOST_a1, HOST_a2),pos+0); // lsl a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_SHRb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 24); // lsr a1, a1, #24 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(8); // b after_call (pc+8) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 24),pos+2); // lsr a1, a1, #24 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(8),pos+6); // b after_call (pc+8) break; case t_SHRw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(HOST_a1, HOST_a1, 16); // lsr a1, a1, #16 - *(Bit16u*)(pos+4)=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(8); // b after_call (pc+8) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(HOST_a1, HOST_a1, 16),pos+2); // lsr a1, a1, #16 + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+4); // lsr a1, a2 + cache_addw(B_FWD(8),pos+6); // b after_call (pc+8) break; case t_SHRd: - *(Bit16u*)pos=LSR_REG(HOST_a1, HOST_a2); // lsr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(LSR_REG(HOST_a1, HOST_a2),pos+0); // lsr a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_SARb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 24); // asr a1, a1, #24 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(8); // b after_call (pc+8) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 24),pos+2); // asr a1, a1, #24 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(8),pos+6); // b after_call (pc+8) break; case t_SARw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=ASR_IMM(HOST_a1, HOST_a1, 16); // asr a1, a1, #16 - *(Bit16u*)(pos+4)=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+6)=B_FWD(8); // b after_call (pc+8) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(ASR_IMM(HOST_a1, HOST_a1, 16),pos+2); // asr a1, a1, #16 + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+4); // asr a1, a2 + cache_addw(B_FWD(8),pos+6); // b after_call (pc+8) break; case t_SARd: - *(Bit16u*)pos=ASR_REG(HOST_a1, HOST_a2); // asr a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(ASR_REG(HOST_a1, HOST_a2),pos+0); // asr a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_RORb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=NOP; // nop - *(Bit16u*)(pos+8)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+10)=NOP; // nop - *(Bit16u*)(pos+12)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+14)=NOP; // nop - *(Bit16u*)(pos+16)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+2); // lsr templo1, a1, #8 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(NOP,pos+6); // nop + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+8); // lsr templo1, a1, #16 + cache_addw(NOP,pos+10); // nop + cache_addw(ORR(HOST_a1, templo1),pos+12); // orr a1, templo1 + cache_addw(NOP,pos+14); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+16); // ror a1, a2 break; case t_RORw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+4)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+6)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+8)=B_FWD(6); // b after_call (pc+6) + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+2); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+4); // orr a1, templo1 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+6); // ror a1, a2 + cache_addw(B_FWD(6),pos+8); // b after_call (pc+6) break; case t_RORd: - *(Bit16u*)pos=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+0); // ror a1, a2 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; case t_ROLb: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 24); // lsl a1, a1, #24 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 8); // lsr templo1, a1, #8 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+12)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+14)=NOP; // nop - *(Bit16u*)(pos+16)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 24),pos+0); // lsl a1, a1, #24 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 8),pos+4); // lsr templo1, a1, #8 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+10); // lsr templo1, a1, #16 + cache_addw(ORR(HOST_a1, templo1),pos+12); // orr a1, templo1 + cache_addw(NOP,pos+14); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+16); // ror a1, a2 break; case t_ROLw: - *(Bit16u*)pos=LSL_IMM(HOST_a1, HOST_a1, 16); // lsl a1, a1, #16 - *(Bit16u*)(pos+2)=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+4)=LSR_IMM(templo1, HOST_a1, 16); // lsr templo1, a1, #16 - *(Bit16u*)(pos+6)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+8)=ORR(HOST_a1, templo1); // orr a1, templo1 - *(Bit16u*)(pos+10)=NOP; // nop - *(Bit16u*)(pos+12)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+14)=NOP; // nop - *(Bit16u*)(pos+16)=NOP; // nop + cache_addw(LSL_IMM(HOST_a1, HOST_a1, 16),pos+0); // lsl a1, a1, #16 + cache_addw(NEG(HOST_a2, HOST_a2),pos+2); // neg a2, a2 + cache_addw(LSR_IMM(templo1, HOST_a1, 16),pos+4); // lsr templo1, a1, #16 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+6); // add a2, #32 + cache_addw(ORR(HOST_a1, templo1),pos+8); // orr a1, templo1 + cache_addw(NOP,pos+10); // nop + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+12); // ror a1, a2 + cache_addw(NOP,pos+14); // nop + cache_addw(NOP,pos+16); // nop break; case t_ROLd: - *(Bit16u*)pos=NEG(HOST_a2, HOST_a2); // neg a2, a2 - *(Bit16u*)(pos+2)=ADD_IMM8(HOST_a2, 32); // add a2, #32 - *(Bit16u*)(pos+4)=ROR_REG(HOST_a1, HOST_a2); // ror a1, a2 - *(Bit16u*)(pos+6)=B_FWD(8); // b after_call (pc+8) + cache_addw(NEG(HOST_a2, HOST_a2),pos+0); // neg a2, a2 + cache_addw(ADD_IMM8(HOST_a2, 32),pos+2); // add a2, #32 + cache_addw(ROR_REG(HOST_a1, HOST_a2),pos+4); // ror a1, a2 + cache_addw(B_FWD(8),pos+6); // b after_call (pc+8) break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit16u*)pos=NEG(HOST_a1, HOST_a1); // neg a1, a1 - *(Bit16u*)(pos+2)=B_FWD(12); // b after_call (pc+12) + cache_addw(NEG(HOST_a1, HOST_a1),pos+0); // neg a1, a1 + cache_addw(B_FWD(12),pos+2); // b after_call (pc+12) break; default: - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 2) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+2+pos[0]*4); // simple_func break; } @@ -1404,11 +1404,11 @@ #else if (((Bit32u)pos & 0x03) == 0) { - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 4) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+4+pos[0]*4); // simple_func } else { - *(Bit32u*)( ( ((Bit32u) (*pos)) << 2 ) + ((Bit32u)pos + 2) ) = (Bit32u)fct_ptr; // simple_func + cache_addd((Bit32u)fct_ptr,pos+2+pos[0]*4); // simple_func } #endif } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv8le.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv8le.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_armv8le.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_armv8le.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,9 +29,6 @@ // try to replace _simple functions by code #define DRC_FLAGS_INVALIDATION_DCODE -// type with the same size as a pointer -#define DRC_PTR_SIZE_IM Bit64u - // calling convention modifier #define DRC_CALL_CONV /* nothing */ #define DRC_FC /* nothing */ @@ -640,7 +637,7 @@ // and a 32bit constant value with a full register static void gen_and_imm(HostReg reg,Bit32u imm) { - Bit32u imm2, scale; + Bit32u imm2; imm2 = ~imm; if(!imm2) return; @@ -667,7 +664,7 @@ } // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { +static void INLINE gen_mov_direct_ptr(void* dest,Bitu imm) { gen_mov_qword_to_reg_imm(temp3, imm); if (!gen_mov_memval_from_reg(temp3, dest, 8)) { gen_mov_qword_to_reg_imm(temp1, (Bit64u)dest); @@ -765,8 +762,8 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static DRC_PTR_SIZE_IM INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { - DRC_PTR_SIZE_IM proc_addr = (DRC_PTR_SIZE_IM)cache.pos; +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { + const Bit8u* proc_addr = cache.pos; gen_call_function_raw(func); return proc_addr; } @@ -777,7 +774,7 @@ } // load an address as param'th function parameter -static void INLINE gen_load_param_addr(DRC_PTR_SIZE_IM addr,Bitu param) { +static void INLINE gen_load_param_addr(Bitu addr,Bitu param) { gen_mov_qword_to_reg_imm(param, addr); } @@ -812,42 +809,44 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static DRC_PTR_SIZE_IM gen_create_branch_on_zero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { if (dword) { cache_addd( CBZ_FWD(reg, 0) ); // cbz reg, j } else { cache_addd( UXTH(temp1, reg) ); // uxth temp1, reg cache_addd( CBZ_FWD(temp1, 0) ); // cbz temp1, j } - return ((DRC_PTR_SIZE_IM)cache.pos-4); + return (cache.pos-4); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static DRC_PTR_SIZE_IM gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { if (dword) { cache_addd( CBNZ_FWD(reg, 0) ); // cbnz reg, j } else { cache_addd( UXTH(temp1, reg) ); // uxth temp1, reg cache_addd( CBNZ_FWD(temp1, 0) ); // cbnz temp1, j } - return ((DRC_PTR_SIZE_IM)cache.pos-4); + return (cache.pos-4); } // calculate relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void INLINE gen_fill_branch(const Bit8u* data) { #if C_DEBUG - Bits len=(Bit64u)cache.pos-data; + Bits len=cache.pos-data; if (len<0) len=-len; if (len>=0x00100000) LOG_MSG("Big jump %d",len); #endif - *(Bit32u*)data=( (*(Bit32u*)data) & 0xff00001f ) | ( ( ((Bit64u)cache.pos - data) << 3 ) & 0x00ffffe0 ); + Bit32u offset = (Bit32u)(cache.pos-data) << 3; + cache_addw(((Bit16u)offset&~0x1f)|(data[0]&0x1f),data); + cache_addb((Bit8u)(offset>>16),data+2); } // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static DRC_PTR_SIZE_IM gen_create_branch_long_nonzero(HostReg reg,bool isdword) { +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { if (isdword) { cache_addd( CBZ_FWD(reg, 8) ); // cbz reg, pc+8 // skip next instruction } else { @@ -855,25 +854,26 @@ cache_addd( CBZ_FWD(temp1, 8) ); // cbz temp1, pc+8 // skip next instruction } cache_addd( B_FWD(0) ); // b j - return ((DRC_PTR_SIZE_IM)cache.pos-4); + return (cache.pos-4); } // compare 32bit-register against zero and jump if value less/equal than zero -static DRC_PTR_SIZE_IM gen_create_branch_long_leqzero(HostReg reg) { +static const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { cache_addd( CMP_IMM(reg, 0, 0) ); // cmp reg, #0 cache_addd( BGT_FWD(8) ); // bgt pc+8 // skip next instruction cache_addd( B_FWD(0) ); // b j - return ((DRC_PTR_SIZE_IM)cache.pos-4); + return (cache.pos-4); } // calculate long relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch_long(DRC_PTR_SIZE_IM data) { +static void INLINE gen_fill_branch_long(const Bit8u* data) { // optimize for shorter branches ? - *(Bit32u*)data=( (*(Bit32u*)data) & 0xfc000000 ) | ( ( ((Bit64u)cache.pos - data) >> 2 ) & 0x03ffffff ); + Bit32u offset = (Bit32u)(cache.pos-data) >> 2; + cache_addd(((data[3]<<24)&~0x03ffffff)|(offset&0x03ffffff),data); } static void gen_run_code(void) { - Bit8u *pos1, *pos2, *pos3; + const Bit8u *pos1, *pos2, *pos3; cache_addd( 0xa9bd7bfd ); // stp fp, lr, [sp, #-48]! cache_addd( 0x910003fd ); // mov fp, sp @@ -894,13 +894,13 @@ cache.pos = cache.pos + (32 - (((Bitu)cache.pos) & 0x1f)); } - *(Bit32u *)pos1 = LDR64_PC(FC_SEGS_ADDR, cache.pos - pos1); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] + cache_addd(LDR64_PC(FC_SEGS_ADDR, cache.pos - pos1),pos1); // ldr FC_SEGS_ADDR, [pc, #(&Segs)] cache_addq((Bit64u)&Segs); // address of "Segs" - *(Bit32u *)pos2 = LDR64_PC(FC_REGS_ADDR, cache.pos - pos2); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] + cache_addd(LDR64_PC(FC_REGS_ADDR, cache.pos - pos2),pos2); // ldr FC_REGS_ADDR, [pc, #(&cpu_regs)] cache_addq((Bit64u)&cpu_regs); // address of "cpu_regs" - *(Bit32u *)pos3 = LDR64_PC(readdata_addr, cache.pos - pos3); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] + cache_addd(LDR64_PC(readdata_addr, cache.pos - pos3),pos3); // ldr readdata_addr, [pc, #(&core_dynrec.readdata)] cache_addq((Bit64u)&core_dynrec.readdata); // address of "core_dynrec.readdata" // align cache.pos to 32 bytes @@ -921,54 +921,54 @@ // called when a call to a function can be replaced by a // call to a simpler function -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { #ifdef DRC_FLAGS_INVALIDATION_DCODE // try to avoid function calls but rather directly fill in code switch (flags_type) { case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=ADD_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0); // add FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(ADD_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0),pos+8); // add FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_ORb: case t_ORw: case t_ORd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=ORR_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0); // orr FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(ORR_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0),pos+8); // orr FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=AND_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0); // and FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(AND_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0),pos+8); // and FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=SUB_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0); // sub FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(SUB_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0),pos+8); // sub FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_XORb: case t_XORw: case t_XORd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=EOR_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0); // eor FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(EOR_REG_LSL_IMM(FC_RETOP, HOST_w0, HOST_w1, 0),pos+8); // eor FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_CMPb: case t_CMPw: @@ -976,164 +976,164 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=NOP; // nop - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(NOP,pos+8); // nop + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_INCb: case t_INCw: case t_INCd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=ADD_IMM(FC_RETOP, HOST_w0, 1, 0); // add FC_RETOP, w0, #1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(ADD_IMM(FC_RETOP, HOST_w0, 1, 0),pos+8); // add FC_RETOP, w0, #1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_DECb: case t_DECw: case t_DECd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=SUB_IMM(FC_RETOP, HOST_w0, 1, 0); // sub FC_RETOP, w0, #1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(SUB_IMM(FC_RETOP, HOST_w0, 1, 0),pos+8); // sub FC_RETOP, w0, #1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=LSLV(FC_RETOP, HOST_w0, HOST_w1); // lslv FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(LSLV(FC_RETOP, HOST_w0, HOST_w1),pos+8); // lslv FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_SHRb: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=UXTB(FC_RETOP, HOST_w0); // uxtb FC_RETOP, w0 - *(Bit32u*)(pos+8)=NOP; // nop - *(Bit32u*)(pos+12)=LSRV(FC_RETOP, FC_RETOP, HOST_w1); // lsrv FC_RETOP, FC_RETOP, w1 - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(UXTB(FC_RETOP, HOST_w0),pos+4); // uxtb FC_RETOP, w0 + cache_addd(NOP,pos+8); // nop + cache_addd(LSRV(FC_RETOP, FC_RETOP, HOST_w1),pos+12); // lsrv FC_RETOP, FC_RETOP, w1 + cache_addd(NOP,pos+16); // nop break; case t_SHRw: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=UXTH(FC_RETOP, HOST_w0); // uxth FC_RETOP, w0 - *(Bit32u*)(pos+8)=NOP; // nop - *(Bit32u*)(pos+12)=LSRV(FC_RETOP, FC_RETOP, HOST_w1); // lsrv FC_RETOP, FC_RETOP, w1 - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(UXTH(FC_RETOP, HOST_w0),pos+4); // uxth FC_RETOP, w0 + cache_addd(NOP,pos+8); // nop + cache_addd(LSRV(FC_RETOP, FC_RETOP, HOST_w1),pos+12); // lsrv FC_RETOP, FC_RETOP, w1 + cache_addd(NOP,pos+16); // nop break; case t_SHRd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=LSRV(FC_RETOP, HOST_w0, HOST_w1); // lsrv FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(LSRV(FC_RETOP, HOST_w0, HOST_w1),pos+8); // lsrv FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_SARb: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=SXTB(FC_RETOP, HOST_w0); // sxtb FC_RETOP, w0 - *(Bit32u*)(pos+8)=NOP; // nop - *(Bit32u*)(pos+12)=ASRV(FC_RETOP, FC_RETOP, HOST_w1); // asrv FC_RETOP, FC_RETOP, w1 - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(SXTB(FC_RETOP, HOST_w0),pos+4); // sxtb FC_RETOP, w0 + cache_addd(NOP,pos+8); // nop + cache_addd(ASRV(FC_RETOP, FC_RETOP, HOST_w1),pos+12); // asrv FC_RETOP, FC_RETOP, w1 + cache_addd(NOP,pos+16); // nop break; case t_SARw: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=SXTH(FC_RETOP, HOST_w0); // sxth FC_RETOP, w0 - *(Bit32u*)(pos+8)=NOP; // nop - *(Bit32u*)(pos+12)=ASRV(FC_RETOP, FC_RETOP, HOST_w1); // asrv FC_RETOP, FC_RETOP, w1 - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(SXTH(FC_RETOP, HOST_w0),pos+4); // sxth FC_RETOP, w0 + cache_addd(NOP,pos+8); // nop + cache_addd(ASRV(FC_RETOP, FC_RETOP, HOST_w1),pos+12); // asrv FC_RETOP, FC_RETOP, w1 + cache_addd(NOP,pos+16); // nop break; case t_SARd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=ASRV(FC_RETOP, HOST_w0, HOST_w1); // asrv FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(ASRV(FC_RETOP, HOST_w0, HOST_w1),pos+8); // asrv FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_RORb: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=BFI(HOST_w0, HOST_w0, 8, 8); // bfi w0, w0, 8, 8 - *(Bit32u*)(pos+8)=BFI(HOST_w0, HOST_w0, 16, 16); // bfi w0, w0, 16, 16 - *(Bit32u*)(pos+12)=RORV(FC_RETOP, HOST_w0, HOST_w1); // rorv FC_RETOP, w0, w1 - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(BFI(HOST_w0, HOST_w0, 8, 8),pos+4); // bfi w0, w0, 8, 8 + cache_addd(BFI(HOST_w0, HOST_w0, 16, 16),pos+8); // bfi w0, w0, 16, 16 + cache_addd(RORV(FC_RETOP, HOST_w0, HOST_w1),pos+12); // rorv FC_RETOP, w0, w1 + cache_addd(NOP,pos+16); // nop break; case t_RORw: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=BFI(HOST_w0, HOST_w0, 16, 16); // bfi w0, w0, 16, 16 - *(Bit32u*)(pos+8)=NOP; // nop - *(Bit32u*)(pos+12)=RORV(FC_RETOP, HOST_w0, HOST_w1); // rorv FC_RETOP, w0, w1 - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(BFI(HOST_w0, HOST_w0, 16, 16),pos+4); // bfi w0, w0, 16, 16 + cache_addd(NOP,pos+8); // nop + cache_addd(RORV(FC_RETOP, HOST_w0, HOST_w1),pos+12); // rorv FC_RETOP, w0, w1 + cache_addd(NOP,pos+16); // nop break; case t_RORd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=RORV(FC_RETOP, HOST_w0, HOST_w1); // rorv FC_RETOP, w0, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(RORV(FC_RETOP, HOST_w0, HOST_w1),pos+8); // rorv FC_RETOP, w0, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_ROLb: - *(Bit32u*)pos=MOVZ(HOST_w2, 32, 0); // movz w2, #32 - *(Bit32u*)(pos+4)=BFI(HOST_w0, HOST_w0, 8, 8); // bfi w0, w0, 8, 8 - *(Bit32u*)(pos+8)=SUB_REG_LSL_IMM(HOST_w2, HOST_w2, HOST_w1, 0); // sub w2, w2, w1 - *(Bit32u*)(pos+12)=BFI(HOST_w0, HOST_w0, 16, 16); // bfi w0, w0, 16, 16 - *(Bit32u*)(pos+16)=RORV(FC_RETOP, HOST_w0, HOST_w2); // rorv FC_RETOP, w0, w2 + cache_addd(MOVZ(HOST_w2, 32, 0),pos+0); // movz w2, #32 + cache_addd(BFI(HOST_w0, HOST_w0, 8, 8),pos+4); // bfi w0, w0, 8, 8 + cache_addd(SUB_REG_LSL_IMM(HOST_w2, HOST_w2, HOST_w1, 0),pos+8); // sub w2, w2, w1 + cache_addd(BFI(HOST_w0, HOST_w0, 16, 16),pos+12); // bfi w0, w0, 16, 16 + cache_addd(RORV(FC_RETOP, HOST_w0, HOST_w2),pos+16); // rorv FC_RETOP, w0, w2 break; case t_ROLw: - *(Bit32u*)pos=MOVZ(HOST_w2, 32, 0); // movz w2, #32 - *(Bit32u*)(pos+4)=BFI(HOST_w0, HOST_w0, 16, 16); // bfi w0, w0, 16, 16 - *(Bit32u*)(pos+8)=SUB_REG_LSL_IMM(HOST_w2, HOST_w2, HOST_w1, 0); // sub w2, w2, w1 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=RORV(FC_RETOP, HOST_w0, HOST_w2); // rorv FC_RETOP, w0, w2 + cache_addd(MOVZ(HOST_w2, 32, 0),pos+0); // movz w2, #32 + cache_addd(BFI(HOST_w0, HOST_w0, 16, 16),pos+4); // bfi w0, w0, 16, 16 + cache_addd(SUB_REG_LSL_IMM(HOST_w2, HOST_w2, HOST_w1, 0),pos+8); // sub w2, w2, w1 + cache_addd(NOP,pos+12); // nop + cache_addd(RORV(FC_RETOP, HOST_w0, HOST_w2),pos+16); // rorv FC_RETOP, w0, w2 break; case t_ROLd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=MOVZ(HOST_w2, 32, 0); // movz w2, #32 - *(Bit32u*)(pos+8)=SUB_REG_LSL_IMM(HOST_w2, HOST_w2, HOST_w1, 0); // sub w2, w2, w1 - *(Bit32u*)(pos+12)=RORV(FC_RETOP, HOST_w0, HOST_w2); // rorv FC_RETOP, w0, w2 - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(MOVZ(HOST_w2, 32, 0),pos+4); // movz w2, #32 + cache_addd(SUB_REG_LSL_IMM(HOST_w2, HOST_w2, HOST_w1, 0),pos+8); // sub w2, w2, w1 + cache_addd(RORV(FC_RETOP, HOST_w0, HOST_w2),pos+12); // rorv FC_RETOP, w0, w2 + cache_addd(NOP,pos+16); // nop break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit32u*)pos=NOP; // nop - *(Bit32u*)(pos+4)=NOP; // nop - *(Bit32u*)(pos+8)=SUB_REG_LSL_IMM(FC_RETOP, HOST_wzr, HOST_w0, 0); // sub FC_RETOP, wzr, w0 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=NOP; // nop + cache_addd(NOP,pos+0); // nop + cache_addd(NOP,pos+4); // nop + cache_addd(SUB_REG_LSL_IMM(FC_RETOP, HOST_wzr, HOST_w0, 0),pos+8); // sub FC_RETOP, wzr, w0 + cache_addd(NOP,pos+12); // nop + cache_addd(NOP,pos+16); // nop break; case t_DSHLd: - *(Bit32u*)pos=MOVZ64(HOST_x3, 0x1f, 0); // movz x3, #0x1f - *(Bit32u*)(pos+4)=BFI64(HOST_x1, HOST_x0, 32, 32); // bfi x1, x0, 32, 32 - *(Bit32u*)(pos+8)=AND64_REG_LSL_IMM(HOST_x2, HOST_x2, HOST_x3, 0); // and x2, x2, x3 - *(Bit32u*)(pos+12)=LSLV64(FC_RETOP, HOST_x1, HOST_x2); // lslv FC_RETOP, x1, x2 - *(Bit32u*)(pos+16)=LSR64_IMM(FC_RETOP, FC_RETOP, 32); // lsr FC_RETOP, FC_RETOP, #32 + cache_addd(MOVZ64(HOST_x3, 0x1f, 0),pos+0); // movz x3, #0x1f + cache_addd(BFI64(HOST_x1, HOST_x0, 32, 32),pos+4); // bfi x1, x0, 32, 32 + cache_addd(AND64_REG_LSL_IMM(HOST_x2, HOST_x2, HOST_x3, 0),pos+8); // and x2, x2, x3 + cache_addd(LSLV64(FC_RETOP, HOST_x1, HOST_x2),pos+12); // lslv FC_RETOP, x1, x2 + cache_addd(LSR64_IMM(FC_RETOP, FC_RETOP, 32),pos+16); // lsr FC_RETOP, FC_RETOP, #32 break; case t_DSHRd: - *(Bit32u*)pos=MOVZ64(HOST_x3, 0x1f, 0); // movz x3, #0x1f - *(Bit32u*)(pos+4)=BFI64(HOST_x0, HOST_x1, 32, 32); // bfi x0, x1, 32, 32 - *(Bit32u*)(pos+8)=AND64_REG_LSL_IMM(HOST_x2, HOST_x2, HOST_x3, 0); // and x2, x2, x3 - *(Bit32u*)(pos+12)=NOP; // nop - *(Bit32u*)(pos+16)=LSRV64(FC_RETOP, HOST_x0, HOST_x2); // lsrv FC_RETOP, x0, x2 + cache_addd(MOVZ64(HOST_x3, 0x1f, 0),pos+0); // movz x3, #0x1f + cache_addd(BFI64(HOST_x0, HOST_x1, 32, 32),pos+4); // bfi x0, x1, 32, 32 + cache_addd(AND64_REG_LSL_IMM(HOST_x2, HOST_x2, HOST_x3, 0),pos+8); // and x2, x2, x3 + cache_addd(NOP,pos+12); // nop + cache_addd(LSRV64(FC_RETOP, HOST_x0, HOST_x2),pos+16); // lsrv FC_RETOP, x0, x2 break; default: - *(Bit32u*)pos=MOVZ64(temp1, ((Bit64u)fct_ptr) & 0xffff, 0); // movz temp1, #(fct_ptr & 0xffff) - *(Bit32u*)(pos+4)=MOVK64(temp1, (((Bit64u)fct_ptr) >> 16) & 0xffff, 16); // movk temp1, #((fct_ptr >> 16) & 0xffff), lsl #16 - *(Bit32u*)(pos+8)=MOVK64(temp1, (((Bit64u)fct_ptr) >> 32) & 0xffff, 32); // movk temp1, #((fct_ptr >> 32) & 0xffff), lsl #32 - *(Bit32u*)(pos+12)=MOVK64(temp1, (((Bit64u)fct_ptr) >> 48) & 0xffff, 48); // movk temp1, #((fct_ptr >> 48) & 0xffff), lsl #48 + cache_addd(MOVZ64(temp1, ((Bit64u)fct_ptr) & 0xffff, 0),pos+0); // movz temp1, #(fct_ptr & 0xffff) + cache_addd(MOVK64(temp1, (((Bit64u)fct_ptr) >> 16) & 0xffff, 16),pos+4); // movk temp1, #((fct_ptr >> 16) & 0xffff), lsl #16 + cache_addd(MOVK64(temp1, (((Bit64u)fct_ptr) >> 32) & 0xffff, 32),pos+8); // movk temp1, #((fct_ptr >> 32) & 0xffff), lsl #32 + cache_addd(MOVK64(temp1, (((Bit64u)fct_ptr) >> 48) & 0xffff, 48),pos+12); // movk temp1, #((fct_ptr >> 48) & 0xffff), lsl #48 break; } #else - *(Bit32u*)pos=MOVZ64(temp1, ((Bit64u)fct_ptr) & 0xffff, 0); // movz temp1, #(fct_ptr & 0xffff) - *(Bit32u*)(pos+4)=MOVK64(temp1, (((Bit64u)fct_ptr) >> 16) & 0xffff, 16); // movk temp1, #((fct_ptr >> 16) & 0xffff), lsl #16 - *(Bit32u*)(pos+8)=MOVK64(temp1, (((Bit64u)fct_ptr) >> 32) & 0xffff, 32); // movk temp1, #((fct_ptr >> 32) & 0xffff), lsl #32 - *(Bit32u*)(pos+12)=MOVK64(temp1, (((Bit64u)fct_ptr) >> 48) & 0xffff, 48); // movk temp1, #((fct_ptr >> 48) & 0xffff), lsl #48 + cache_addd(MOVZ64(temp1, ((Bit64u)fct_ptr) & 0xffff, 0),pos+0); // movz temp1, #(fct_ptr & 0xffff) + cache_addd(MOVK64(temp1, (((Bit64u)fct_ptr) >> 16) & 0xffff, 16),pos+4); // movk temp1, #((fct_ptr >> 16) & 0xffff), lsl #16 + cache_addd(MOVK64(temp1, (((Bit64u)fct_ptr) >> 32) & 0xffff, 32),pos+8); // movk temp1, #((fct_ptr >> 32) & 0xffff), lsl #32 + cache_addd(MOVK64(temp1, (((Bit64u)fct_ptr) >> 48) & 0xffff, 48),pos+12); // movk temp1, #((fct_ptr >> 48) & 0xffff), lsl #48 #endif } #endif -static void cache_block_closing(Bit8u* block_start,Bitu block_size) { +static void cache_block_closing(const Bit8u* block_start,Bitu block_size) { //flush cache - GCC/LLVM builtin __builtin___clear_cache((char *)block_start, (char *)(block_start+block_size)); } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_mipsel32.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_mipsel32.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_mipsel32.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_mipsel32.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,9 +29,6 @@ // try to replace _simple functions by code #define DRC_FLAGS_INVALIDATION_DCODE -// type with the same size as a pointer -#define DRC_PTR_SIZE_IM Bit32u - // calling convention modifier #define DRC_CALL_CONV /* nothing */ #define DRC_FC /* nothing */ @@ -329,8 +326,8 @@ } // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { - gen_mov_direct_dword(dest,(Bit32u)imm); +static void INLINE gen_mov_direct_ptr(void* dest,Bit32u imm) { + gen_mov_direct_dword(dest,imm); } // add a 32bit (dword==true) or 16bit (dword==false) constant value to a memory value @@ -385,7 +382,7 @@ // generate a call to a parameterless function static void INLINE gen_call_function_raw(void * func) { #if C_DEBUG - if ((cache.pos ^ func) & 0xf0000000) LOG_MSG("jump overflow\n"); + if (((Bit32u)cache.pos ^ (Bit32u)func) & 0xf0000000) LOG_MSG("jump overflow\n"); #endif temp1_valid = false; cache_addd(0x0c000000+(((Bit32u)func>>2)&0x3ffffff)); // jal func @@ -395,8 +392,8 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static Bit32u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { - Bit32u proc_addr = (Bit32u)cache.pos; +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { + const Bit8u* proc_addr = cache.pos; gen_call_function_raw(func); return proc_addr; } @@ -443,7 +440,7 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static Bit32u INLINE gen_create_branch_on_zero(HostReg reg,bool dword) { +static INLINE const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { temp1_valid = false; if(!dword) { cache_addw(0xffff); // andi temp1, reg, 0xffff @@ -452,12 +449,12 @@ cache_addw(0); // beq $0, reg, 0 cache_addw(0x1000+(dword?reg:temp1)); DELAY; - return ((Bit32u)cache.pos-8); + return (cache.pos-8); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static Bit32u INLINE gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static INLINE const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { temp1_valid = false; if(!dword) { cache_addw(0xffff); // andi temp1, reg, 0xffff @@ -466,18 +463,18 @@ cache_addw(0); // bne $0, reg, 0 cache_addw(0x1400+(dword?reg:temp1)); DELAY; - return ((Bit32u)cache.pos-8); + return (cache.pos-8); } // calculate relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void INLINE gen_fill_branch(const Bit8u* data) { #if C_DEBUG - Bits len=(Bit32u)cache.pos-data; + Bits len=cache.pos-data; if (len<0) len=-len; if (len>126) LOG_MSG("Big jump %d",len); #endif temp1_valid = false; // this is a branch target - *(Bit16u*)data=((Bit16u)((Bit32u)cache.pos-data-4)>>2); + cache_addw((Bit16u)(cache.pos-data-4)>>2,data); } #if 0 // assume for the moment no branch will go farther then +/- 128KB @@ -485,7 +482,7 @@ // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit32u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { temp1_valid = false; if (!isdword) { cache_addw(0xff); // andi temp1, reg, 0xff @@ -496,31 +493,31 @@ DELAY; cache_addd(0x00000000); // fill j DELAY; - return ((Bit32u)cache.pos-8); + return (cache.pos-8); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit32u INLINE gen_create_branch_long_leqzero(HostReg reg) { +static INLINE const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { temp1_valid = false; cache_addw(3); // bgtz reg, +12 cache_addw(0x1c00+(reg<<5)); DELAY; cache_addd(0x00000000); // fill j DELAY; - return ((Bit32u)cache.pos-8); + return (cache.pos-8); } // calculate long relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch_long(Bit32u data) { +static void INLINE gen_fill_branch_long(const Bit8u* data) { temp1_valid = false; // this is an absolute branch - *(Bit32u*)data=0x08000000+(((Bit32u)cache.pos>>2)&0x3ffffff); + cache_addd(0x08000000+(((Bit32u)cache.pos>>2)&0x3ffffff),data); } #else // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit32u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { temp1_valid = false; if (!isdword) { cache_addw(0xff); // andi temp1, reg, 0xff @@ -529,20 +526,20 @@ cache_addw(0); // bne $0, reg, 0 cache_addw(0x1400+(isdword?reg:temp1)); DELAY; - return ((Bit32u)cache.pos-8); + return (cache.pos-8); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit32u INLINE gen_create_branch_long_leqzero(HostReg reg) { +static INLINE const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { temp1_valid = false; cache_addw(0); // blez reg, 0 cache_addw(0x1800+(reg<<5)); DELAY; - return ((Bit32u)cache.pos-8); + return (cache.pos-8); } // calculate long relative offset and fill it into the location pointed to by data -static void INLINE gen_fill_branch_long(Bit32u data) { +static void INLINE gen_fill_branch_long(const Bit8u* data) { gen_fill_branch(data); } #endif @@ -567,34 +564,34 @@ #ifdef DRC_FLAGS_INVALIDATION // called when a call to a function can be replaced by a // call to a simpler function -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { #ifdef DRC_FLAGS_INVALIDATION_DCODE // try to avoid function calls but rather directly fill in code switch (flags_type) { case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit32u*)pos=0x00851021; // addu $v0, $a0, $a1 + cache_addd(0x00851021,pos); // addu $v0, $a0, $a1 break; case t_ORb: case t_ORw: case t_ORd: - *(Bit32u*)pos=0x00851025; // or $v0, $a0, $a1 + cache_addd(0x00851025,pos); // or $v0, $a0, $a1 break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit32u*)pos=0x00851024; // and $v0, $a0, $a1 + cache_addd(0x00851024,pos); // and $v0, $a0, $a1 break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit32u*)pos=0x00851023; // subu $v0, $a0, $a1 + cache_addd(0x00851023,pos); // subu $v0, $a0, $a1 break; case t_XORb: case t_XORw: case t_XORd: - *(Bit32u*)pos=0x00851026; // xor $v0, $a0, $a1 + cache_addd(0x00851026,pos); // xor $v0, $a0, $a1 break; case t_CMPb: case t_CMPw: @@ -602,52 +599,52 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit32u*)pos=0; // nop + cache_addd(0,pos); // nop break; case t_INCb: case t_INCw: case t_INCd: - *(Bit32u*)pos=0x24820001; // addiu $v0, $a0, 1 + cache_addd(0x24820001,pos); // addiu $v0, $a0, 1 break; case t_DECb: case t_DECw: case t_DECd: - *(Bit32u*)pos=0x2482ffff; // addiu $v0, $a0, -1 + cache_addd(0x2482ffff,pos); // addiu $v0, $a0, -1 break; case t_SHLb: case t_SHLw: case t_SHLd: - *(Bit32u*)pos=0x00a41004; // sllv $v0, $a0, $a1 + cache_addd(0x00a41004,pos); // sllv $v0, $a0, $a1 break; case t_SHRb: case t_SHRw: case t_SHRd: - *(Bit32u*)pos=0x00a41006; // srlv $v0, $a0, $a1 + cache_addd(0x00a41006,pos); // srlv $v0, $a0, $a1 break; case t_SARd: - *(Bit32u*)pos=0x00a41007; // srav $v0, $a0, $a1 + cache_addd(0x00a41007,pos); // srav $v0, $a0, $a1 break; #if (_MIPS_ISA==MIPS32R2) || defined(PSP) case t_RORd: - *(Bit32u*)pos=0x00a41046; // rotr $v0, $a0, $a1 + cache_addd(0x00a41046,pos); // rotr $v0, $a0, $a1 break; #endif case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit32u*)pos=0x00041023; // subu $v0, $0, $a0 + cache_addd(0x00041023,pos); // subu $v0, $0, $a0 break; default: - *(Bit32u*)pos=0x0c000000+((((Bit32u)fct_ptr)>>2)&0x3ffffff); // jal simple_func + cache_addd(0x0c000000+(((Bit32u)fct_ptr)>>2)&0x3ffffff,pos); // jal simple_func break; } #else - *(Bit32u*)pos=0x0c000000+(((Bit32u)fct_ptr)>>2)&0x3ffffff); // jal simple_func + cache_addd(0x0c000000+(((Bit32u)fct_ptr)>>2)&0x3ffffff,pos); // jal simple_func #endif } #endif -static void cache_block_closing(Bit8u* block_start,Bitu block_size) { +static void cache_block_closing(const Bit8u* block_start,Bitu block_size) { #ifdef PSP // writeback dcache and invalidate icache Bit32u inval_start = ((Bit32u)block_start) & ~63; diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_ppc64le.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_ppc64le.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_ppc64le.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_ppc64le.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,7 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team * Copyright (C) 2002-2019 The DOSBox Team * * This program is free software; you can redistribute it and/or modify @@ -664,7 +667,7 @@ return gen_fill_branch((DRC_PTR_SIZE_IM)data); } -static void cache_block_closing(Bit8u* block_start,Bitu block_size) +static void cache_block_closing(const uint8_t *block_start, Bitu block_size) { // in the Linux kernel i-cache and d-cache are flushed separately // there's probably a good reason for this ... diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_ppc.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_ppc.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_ppc.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_ppc.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,7 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team * Copyright (C) 2002-2019 The DOSBox Team * * This program is free software; you can redistribute it and/or modify @@ -597,7 +600,7 @@ return gen_fill_branch((DRC_PTR_SIZE_IM)data); } -static void cache_block_closing(Bit8u* block_start,Bitu block_size) +static void cache_block_closing(const uint8_t *block_start, Bitu block_size) { #if defined(__GNUC__) Bit8u* start = (Bit8u*)((Bit32u)block_start & -32); diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_x64.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_x64.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_x64.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_x64.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,9 +29,6 @@ // try to replace _simple functions by code #define DRC_FLAGS_INVALIDATION_DCODE -// type with the same size as a pointer -#define DRC_PTR_SIZE_IM Bit64u - // calling convention modifier #define DRC_CALL_CONV /* nothing */ #define DRC_FC /* nothing */ @@ -290,7 +287,7 @@ // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { +static void INLINE gen_mov_direct_ptr(void* dest,Bitu imm) { gen_mov_reg_qword(HOST_EAX,imm); gen_mov_word_from_reg(HOST_EAX,dest,true,0x48); // 0x48 prefixes full 64-bit mov } @@ -383,8 +380,8 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static Bit64u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { - Bit64u proc_addr = (Bit64u)cache.pos; +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { + const Bit8u* proc_addr = cache.pos; gen_call_function_raw(func); return proc_addr; } @@ -424,7 +421,7 @@ } // load an address as param'th function parameter -static void INLINE gen_load_param_addr(DRC_PTR_SIZE_IM addr,Bitu param) { +static void INLINE gen_load_param_addr(Bitu addr,Bitu param) { // move an immediate 64bit value into a 64bit param reg switch (param) { case 0: // mov param1,addr64 @@ -542,40 +539,41 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static Bit64u gen_create_branch_on_zero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { if (!dword) cache_addb(0x66); cache_addb(0x0b); // or reg,reg cache_addb(0xc0+reg+(reg<<3)); cache_addw(0x0074); // jz addr - return ((Bit64u)cache.pos-1); + return (cache.pos-1); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static Bit64u gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { if (!dword) cache_addb(0x66); cache_addb(0x0b); // or reg,reg cache_addb(0xc0+reg+(reg<<3)); cache_addw(0x0075); // jnz addr - return ((Bit64u)cache.pos-1); + return (cache.pos-1); } // calculate relative offset and fill it into the location pointed to by data -static void gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void gen_fill_branch(const Bit8u* data) { #if C_DEBUG - Bit64s len=(Bit64u)cache.pos-data; + ptrdiff_t len = cache.pos - data; if (len<0) len=-len; - if (len>126) LOG_MSG("Big jump %d",len); + if (len > 126) + LOG_MSG("Big jump %" PRIdPTR, len); #endif - *(Bit8u*)data=(Bit8u)((Bit64u)cache.pos-data-1); + cache_addb((Bit8u)(cache.pos-data-1),data); } // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit64u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { // isdword: cmp reg32,0 // not isdword: cmp reg8,0 cache_addb(0x0a+(isdword?1:0)); // or reg,reg @@ -583,22 +581,22 @@ cache_addw(0x850f); // jnz cache_addd(0); - return ((Bit64u)cache.pos-4); + return (cache.pos-4); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit64u gen_create_branch_long_leqzero(HostReg reg) { +static const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { cache_addw(0xf883+(reg<<8)); cache_addb(0x00); // cmp reg,0 cache_addw(0x8e0f); // jle cache_addd(0); - return ((Bit64u)cache.pos-4); + return (cache.pos-4); } // calculate long relative offset and fill it into the location pointed to by data -static void gen_fill_branch_long(Bit64u data) { - *(Bit32u*)data=(Bit32u)((Bit64u)cache.pos-data-4); +static void gen_fill_branch_long(const Bit8u* data) { + cache_addd((Bit32u)(cache.pos-data-4),data); } static void gen_run_code(void) { @@ -621,7 +619,7 @@ // call to a simpler function // check gen_call_function_raw and gen_call_function_setup // for the targeted code -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { #ifdef DRC_FLAGS_INVALIDATION_DCODE // try to avoid function calls but rather directly fill in code switch (flags_type) { @@ -629,41 +627,36 @@ case t_ADDw: case t_ADDd: // mov eax,FC_OP1; add eax,FC_OP2 - *(Bit32u*)(pos+0)=0xc001c089+(FC_OP1<<11)+(FC_OP2<<27); - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + cache_addd(0xC001c089+(FC_OP1<<11)+(FC_OP2<<27),pos); + cache_addw(0x06eb,pos+4); // skip return; case t_ORb: case t_ORw: case t_ORd: // mov eax,FC_OP1; or eax,FC_OP2 - *(Bit32u*)(pos+0)=0xc009c089+(FC_OP1<<11)+(FC_OP2<<27); - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + cache_addd(0xc009c089+(FC_OP1<<11)+(FC_OP2<<27),pos); + cache_addw(0x06eb,pos+4); // skip return; case t_ANDb: case t_ANDw: case t_ANDd: // mov eax,FC_OP1; and eax,FC_OP2 - *(Bit32u*)(pos+0)=0xc021c089+(FC_OP1<<11)+(FC_OP2<<27); - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + cache_addd(0xc021c089+(FC_OP1<<11)+(FC_OP2<<27),pos); + cache_addw(0x06eb,pos+4); // skip return; case t_SUBb: case t_SUBw: case t_SUBd: // mov eax,FC_OP1; sub eax,FC_OP2 - *(Bit32u*)(pos+0)=0xc029c089+(FC_OP1<<11)+(FC_OP2<<27); - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + cache_addd(0xc029c089+(FC_OP1<<11)+(FC_OP2<<27),pos); + cache_addw(0x06eb,pos+4); // skip return; case t_XORb: case t_XORw: case t_XORd: // mov eax,FC_OP1; xor eax,FC_OP2 - *(Bit32u*)(pos+0)=0xc031c089+(FC_OP1<<11)+(FC_OP2<<27); - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + cache_addd(0xc031c089+(FC_OP1<<11)+(FC_OP2<<27),pos); + cache_addw(0x06eb,pos+4); // skip return; case t_CMPb: case t_CMPw: @@ -671,37 +664,35 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit32u*)(pos+0)=0x90900aeb; // skip - *(Bit32u*)(pos+4)=0x90909090; - *(Bit32u*)(pos+8)=0x90909090; + cache_addw(0x0aeb,pos); // skip return; case t_INCb: case t_INCw: case t_INCd: - *(Bit32u*)(pos+0)=0xc0ffc089+(FC_OP1<<11); // mov eax,ecx; inc eax - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + // mov eax,FC_OP1; inc eax + cache_addd(0xc0ffc089+(FC_OP1<<11),pos); + cache_addw(0x06eb,pos+4); // skip return; case t_DECb: case t_DECw: case t_DECd: - *(Bit32u*)(pos+0)=0xc8ffc089+(FC_OP1<<11); // mov eax, FC_OP1; dec eax - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + // mov eax,FC_OP1; dec eax + cache_addd(0xc8ffc089+(FC_OP1<<11),pos); + cache_addw(0x06eb,pos+4); // skip return; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit32u*)(pos+0)=0xd8f7c089+(FC_OP1<<11); // mov eax, FC_OP1; neg eax - *(Bit32u*)(pos+4)=0x909006eb; // skip - *(Bit32u*)(pos+8)=0x90909090; + // mov eax,FC_OP1; neg eax + cache_addd(0xd8f7c089+(FC_OP1<<11),pos); + cache_addw(0x06eb,pos+4); // skip return; } #endif - *(Bit64u*)(pos+2)=(Bit64u)fct_ptr; // fill function pointer + cache_addq((Bit64u)fct_ptr,pos+2); // fill function pointer } #endif -static void cache_block_closing(Bit8u* block_start,Bitu block_size) { } +static void cache_block_closing(const Bit8u* block_start,Bitu block_size) { } static void cache_block_before_close(void) { } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_x86.h dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_x86.h --- dosbox-staging-0.76.0/src/cpu/core_dynrec/risc_x86.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec/risc_x86.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,9 +29,6 @@ // try to replace _simple functions by code #define DRC_FLAGS_INVALIDATION_DCODE -// type with the same size as a pointer -#define DRC_PTR_SIZE_IM Bit32u - // calling convention modifier #if defined (WIN32) #define DRC_CALL_CONV _fastcall @@ -208,7 +205,7 @@ } // move an address into memory -static void INLINE gen_mov_direct_ptr(void* dest,DRC_PTR_SIZE_IM imm) { +static void INLINE gen_mov_direct_ptr(void* dest,Bitu imm) { gen_mov_direct_dword(dest,(Bit32u)imm); } @@ -305,8 +302,8 @@ // generate a call to a function with paramcount parameters // note: the parameters are loaded in the architecture specific way // using the gen_load_param_ functions below -static Bit32u INLINE gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { - Bit32u proc_addr=(Bit32u)cache.pos; +static INLINE const Bit8u* gen_call_function_setup(void * func,Bitu paramcount,bool fastcall=false) { + const Bit8u* proc_addr=cache.pos; // Do the actual call to the procedure cache_addb(0xe8); cache_addd((Bit32u)func - (Bit32u)cache.pos-4); @@ -363,40 +360,40 @@ // short conditional jump (+-127 bytes) if register is zero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_zero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_zero(HostReg reg,bool dword) { if (!dword) cache_addb(0x66); cache_addb(0x0b); // or reg,reg cache_addb(0xc0+reg+(reg<<3)); cache_addw(0x0074); // jz addr - return ((Bit32u)cache.pos-1); + return (cache.pos-1); } // short conditional jump (+-127 bytes) if register is nonzero // the destination is set by gen_fill_branch() later -static Bit32u gen_create_branch_on_nonzero(HostReg reg,bool dword) { +static const Bit8u* gen_create_branch_on_nonzero(HostReg reg,bool dword) { if (!dword) cache_addb(0x66); cache_addb(0x0b); // or reg,reg cache_addb(0xc0+reg+(reg<<3)); cache_addw(0x0075); // jnz addr - return ((Bit32u)cache.pos-1); + return (cache.pos-1); } // calculate relative offset and fill it into the location pointed to by data -static void gen_fill_branch(DRC_PTR_SIZE_IM data) { +static void gen_fill_branch(const Bit8u* data) { #if C_DEBUG Bits len=(Bit32u)cache.pos-data; if (len<0) len=-len; if (len>126) LOG_MSG("Big jump %d",len); #endif - *(Bit8u*)data=(Bit8u)((Bit32u)cache.pos-data-1); + cache_addb((Bit8u)(cache.pos-data-1),data); } // conditional jump if register is nonzero // for isdword==true the 32bit of the register are tested // for isdword==false the lowest 8bit of the register are tested -static Bit32u gen_create_branch_long_nonzero(HostReg reg,bool isdword) { +static const Bit8u* gen_create_branch_long_nonzero(HostReg reg,bool isdword) { // isdword: cmp reg32,0 // not isdword: cmp reg8,0 cache_addb(0x0a+(isdword?1:0)); // or reg,reg @@ -404,22 +401,22 @@ cache_addw(0x850f); // jnz cache_addd(0); - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // compare 32bit-register against zero and jump if value less/equal than zero -static Bit32u gen_create_branch_long_leqzero(HostReg reg) { +static const Bit8u* gen_create_branch_long_leqzero(HostReg reg) { cache_addw(0xf883+(reg<<8)); cache_addb(0x00); // cmp reg,0 cache_addw(0x8e0f); // jle cache_addd(0); - return ((Bit32u)cache.pos-4); + return (cache.pos-4); } // calculate long relative offset and fill it into the location pointed to by data -static void gen_fill_branch_long(Bit32u data) { - *(Bit32u*)data=((Bit32u)cache.pos-data-4); +static void gen_fill_branch_long(const Bit8u* data) { + cache_addd((Bit32u)(cache.pos-data-4),data); } @@ -440,39 +437,39 @@ #ifdef DRC_FLAGS_INVALIDATION // called when a call to a function can be replaced by a // call to a simpler function -static void gen_fill_function_ptr(Bit8u * pos,void* fct_ptr,Bitu flags_type) { +static void gen_fill_function_ptr(const Bit8u * pos,void* fct_ptr,Bitu flags_type) { #ifdef DRC_FLAGS_INVALIDATION_DCODE // try to avoid function calls but rather directly fill in code switch (flags_type) { case t_ADDb: case t_ADDw: case t_ADDd: - *(Bit32u*)pos=0xc203c18b; // mov eax,ecx; add eax,edx - *(pos+4)=0x90; + cache_addd(0xc203c18b,pos); // mov eax,ecx; add eax,edx + cache_addb(0x90,pos+4); break; case t_ORb: case t_ORw: case t_ORd: - *(Bit32u*)pos=0xc20bc18b; // mov eax,ecx; or eax,edx - *(pos+4)=0x90; + cache_addd(0xc20bc18b,pos); // mov eax,ecx; or eax,edx + cache_addb(0x90,pos+4); break; case t_ANDb: case t_ANDw: case t_ANDd: - *(Bit32u*)pos=0xc223c18b; // mov eax,ecx; and eax,edx - *(pos+4)=0x90; + cache_addd(0xc223c18b,pos); // mov eax,ecx; and eax,edx + cache_addb(0x90,pos+4); break; case t_SUBb: case t_SUBw: case t_SUBd: - *(Bit32u*)pos=0xc22bc18b; // mov eax,ecx; sub eax,edx - *(pos+4)=0x90; + cache_addd(0xc22bc18b,pos); // mov eax,ecx; sub eax,edx + cache_addb(0x90,pos+4); break; case t_XORb: case t_XORw: case t_XORd: - *(Bit32u*)pos=0xc233c18b; // mov eax,ecx; xor eax,edx - *(pos+4)=0x90; + cache_addd(0xc233c18b,pos); // mov eax,ecx; xor eax,edx + cache_addb(0x90,pos+4); break; case t_CMPb: case t_CMPw: @@ -480,37 +477,36 @@ case t_TESTb: case t_TESTw: case t_TESTd: - *(Bit32u*)pos=0x909003eb; // skip - *(pos+4)=0x90; + cache_addw(0x03eb,pos); // skip break; case t_INCb: case t_INCw: case t_INCd: - *(Bit32u*)pos=0x9040c18b; // mov eax,ecx; inc eax - *(pos+4)=0x90; + cache_addd(0x9040c18b,pos); // mov eax,ecx; inc eax + cache_addb(0x90,pos+4); break; case t_DECb: case t_DECw: case t_DECd: - *(Bit32u*)pos=0x9048c18b; // mov eax,ecx; dec eax - *(pos+4)=0x90; + cache_addd(0x9048c18b,pos); // mov eax,ecx; dec eax + cache_addb(0x90,pos+4); break; case t_NEGb: case t_NEGw: case t_NEGd: - *(Bit32u*)pos=0xd8f7c18b; // mov eax,ecx; neg eax - *(pos+4)=0x90; + cache_addd(0xd8f7c18b,pos); // mov eax,ecx; neg eax + cache_addb(0x90,pos+4); break; default: - *(Bit32u*)(pos+1)=(Bit32u)((Bit8u*)fct_ptr - (pos+1+4)); // fill function pointer + cache_addd((Bit32u)((Bit8u*)fct_ptr - (pos+1+4)),pos+1); // fill function pointer break; } #else - *(Bit32u*)(pos+1)=(Bit32u)((Bit8u*)fct_ptr - (pos+1+4)); // fill function pointer + cache_addd((Bit32u)((Bit8u*)fct_ptr - (pos+1+4)),pos+1); // fill function pointer #endif } #endif -static void cache_block_closing(Bit8u* block_start,Bitu block_size) { } +static void cache_block_closing(const Bit8u* block_start,Bitu block_size) { } static void cache_block_before_close(void) { } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dynrec.cpp dosbox-staging-0.77.0/src/cpu/core_dynrec.cpp --- dosbox-staging-0.76.0/src/cpu/core_dynrec.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dynrec.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include "dosbox.h" #if (C_DYNREC) @@ -34,14 +33,16 @@ #include #endif -#if (C_HAVE_MPROTECT) +#if defined(HAVE_MPROTECT) || defined(HAVE_MMAP) #include #include + #ifndef PAGESIZE #define PAGESIZE 4096 #endif -#endif /* C_HAVE_MPROTECT */ + +#endif // HAVE_MPROTECT #include "callback.h" #include "regs.h" @@ -125,7 +126,7 @@ } struct core_dynrec_t { - BlockReturn (*runcode)(Bit8u*); // points to code that can start a block + BlockReturn (*runcode)(const Bit8u*); // points to code that can start a block Bitu callback; // the occurred callback Bitu readdata; // spare space used when reading from memory Bit32u protected_regs[8]; // space to save/restore register values @@ -344,7 +345,7 @@ // trap to int1 unless the last instruction deferred this // (allows hardware interrupts to be served without interaction) - if (!cpu.trap_skip) CPU_HW_Interrupt(1); + if (!cpu.trap_skip) CPU_DebugException(DBINT_STEP,reg_eip); CPU_Cycles = oldCycles-1; // continue (either the trapflag was clear anyways, or the int1 cleared it) diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/decoder.h dosbox-staging-0.77.0/src/cpu/core_dyn_x86/decoder.h --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/decoder.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/decoder.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,10 +58,7 @@ PageHandler * handler=get_tlb_readhandler(lin_addr); if (handler->flags & PFLAG_HASCODE) { cph=( CodePageHandler *)handler; - if (handler->flags & cflag) return false; - cph->ClearRelease(); - cph=0; - handler=get_tlb_readhandler(lin_addr); + return false; } if (handler->flags & PFLAG_NOCODE) { if (PAGING_ForcePageInit(lin_addr)) { @@ -99,7 +96,7 @@ } } if (!cache.free_pages) { - LOG_MSG("DYNX86:cache.free_pages is not useable"); + LOG_MSG("DYNX86:cache.free_pages is not usable"); return false; } CodePageHandler * cpagehandler=cache.free_pages; @@ -146,7 +143,7 @@ val|=decode_fetchb() << 8; return val; } - *(Bit16u *)&decode.page.wmap[decode.page.index]+=0x0101; + add_to_unaligned_uint16(&decode.page.wmap[decode.page.index], 0x0101); decode.code+=2;decode.page.index+=2; return mem_readw(decode.code-2); } @@ -159,7 +156,7 @@ return val; /* Advance to the next page */ } - *(Bit32u *)&decode.page.wmap[decode.page.index]+=0x01010101; + add_to_unaligned_uint32(&decode.page.wmap[decode.page.index], 0x01010101); decode.code+=4;decode.page.index+=4; return mem_readd(decode.code-4); } @@ -194,8 +191,8 @@ } switch (size) { case 1 : activecb->cache.wmapmask[mapidx]+=0x01; break; - case 2 : (*(Bit16u*)&activecb->cache.wmapmask[mapidx])+=0x0101; break; - case 4 : (*(Bit32u*)&activecb->cache.wmapmask[mapidx])+=0x01010101; break; + case 2 : add_to_unaligned_uint16(&activecb->cache.wmapmask[mapidx], 0x0101); break; + case 4 : add_to_unaligned_uint32(&activecb->cache.wmapmask[mapidx], 0x01010101); break; } } @@ -321,10 +318,10 @@ static struct { save_info_type type; DynState state; - Bit8u * branch_pos; + const Bit8u * branch_pos; Bit32u eip_change; Bitu cycles; - Bit8u * return_pos; + const Bit8u * return_pos; } save_info[512]; Bitu used_save_info=0; @@ -534,13 +531,13 @@ cache_addb(0x85); cache_addd((Bit32u)(&paging.tlb.read[0])); cache_addw(0xc085); // test eax,eax - Bit8u* je_loc=gen_create_branch(BR_Z); + const Bit8u* je_loc=gen_create_branch(BR_Z); cache_addw(0x048a); // mov al,[eax+ecx] cache_addb(0x08); - Bit8u* jmp_loc=gen_create_jump(); + const Bit8u* jmp_loc=gen_create_jump(); gen_fill_branch(je_loc); cache_addb(0x51); // push ecx cache_addb(0xe8); @@ -604,20 +601,20 @@ cache_addb(0x0c); cache_addb(0x3d); // cmp eax, 0xFFD00000/0xFFF00000 cache_addd(dword ? 0xffd00000:0xfff00000); - Bit8u* jb_loc1=gen_create_branch(BR_NB); + const Bit8u* jb_loc1=gen_create_branch(BR_NB); cache_addb(0x25); // and eax, 0x000FFFFF cache_addd(0x000fffff); cache_addw(0x048b); // mov eax,paging.tlb.read[eax*TYPE Bit32u] cache_addb(0x85); cache_addd((Bit32u)(&paging.tlb.read[0])); cache_addw(0xc085); // test eax,eax - Bit8u* je_loc=gen_create_branch(BR_Z); + const Bit8u* je_loc=gen_create_branch(BR_Z); if (!dword) cache_addb(0x66); cache_addw(0x048b+(genreg->index <<(8+3))); // mov dest,[eax+ecx] cache_addb(0x08); - Bit8u* jmp_loc=gen_create_jump(); + const Bit8u* jmp_loc=gen_create_jump(); gen_fill_branch(jb_loc1); gen_fill_branch(je_loc); @@ -682,12 +679,12 @@ cache_addb(0x8d); cache_addd((Bit32u)(&paging.tlb.write[0])); cache_addw(0xc985); // test ecx,ecx - Bit8u* je_loc=gen_create_branch(BR_Z); + const Bit8u* je_loc=gen_create_branch(BR_Z); cache_addw(0x0488+(genreg->index<<11)+(high?0x2000:0)); // mov [eax+ecx],reg cache_addb(0x08); - Bit8u* jmp_loc=gen_create_jump(); + const Bit8u* jmp_loc=gen_create_jump(); gen_fill_branch(je_loc); cache_addb(0x52); // push edx @@ -719,20 +716,20 @@ cache_addb(0x0c); cache_addw(0xf981); // cmp ecx, 0xFFD00000/0xFFF00000 cache_addd(dword ? 0xffd00000:0xfff00000); - Bit8u* jb_loc1=gen_create_branch(BR_NB); + const Bit8u* jb_loc1=gen_create_branch(BR_NB); cache_addw(0xe181); // and ecx, 0x000FFFFF cache_addd(0x000fffff); cache_addw(0x0c8b); // mov ecx,paging.tlb.write[ecx*TYPE Bit32u] cache_addb(0x8d); cache_addd((Bit32u)(&paging.tlb.write[0])); cache_addw(0xc985); // test ecx,ecx - Bit8u* je_loc=gen_create_branch(BR_Z); + const Bit8u* je_loc=gen_create_branch(BR_Z); if (!dword) cache_addb(0x66); cache_addw(0x0489+(genreg->index <<(8+3))); // mov [eax+ecx],reg cache_addb(0x08); - Bit8u* jmp_loc=gen_create_jump(); + const Bit8u* jmp_loc=gen_create_jump(); gen_fill_branch(jb_loc1); gen_fill_branch(je_loc); @@ -794,7 +791,7 @@ x64gen.regs[reg_args[1]]->notusable=false; dyn_savestate(&callstate); - Bit8u *page_brk; + const Bit8u *page_brk; opcode(tmp).set64().setea(gensrc->index,-1,0,dword?3:1).Emit8(0x8D); // lea tmp, [dst+(dword?3:1)] if (dword) { opcode(4).set64().setimm(~0xFFF,4).setrm(tmp).Emit8(0x81); // and tmp, ~0xFFF @@ -809,14 +806,14 @@ // mov tmp, [8*tmp+paging.tlb.read(rbp)] opcode(tmp).set64().setea(5,tmp,3,(Bits)paging.tlb.read-(Bits)&cpu_regs).Emit8(0x8B); opcode(tmp).set64().setrm(tmp).Emit8(0x85); // test tmp,tmp - Bit8u *nomap=gen_create_branch(BR_Z); + const Bit8u *nomap=gen_create_branch(BR_Z); //mov dst, [tmp+src] opcode(gendst->index,dword).setea(tmp,gensrc->index).Emit8(0x8B); - Bit8u* jmp_loc = gen_create_short_jump(); + const Bit8u* jmp_loc = gen_create_short_jump(); gen_fill_branch(page_brk); gen_load_imm(tmp, (Bitu)(dword?(void*)mem_unalignedreadd_checked:(void*)mem_unalignedreadw_checked)); - Bit8u* page_jmp = gen_create_short_jump(); + const Bit8u* page_jmp = gen_create_short_jump(); gen_fill_branch(nomap); gen_load_imm(tmp, (Bitu)(dword?(void*)mem_readd_checked_dcx64:(void*)mem_readw_checked_dcx64)); @@ -855,7 +852,7 @@ // mov tmp, [8*tmp+paging.tlb.read(rbp)] opcode(tmp).set64().setea(5,tmp,3,(Bits)paging.tlb.read-(Bits)&cpu_regs).Emit8(0x8B); opcode(tmp).set64().setrm(tmp).Emit8(0x85); // test tmp,tmp - Bit8u *nomap=gen_create_branch(BR_Z); + const Bit8u *nomap=gen_create_branch(BR_Z); int src = gensrc->index; if (high && src>=8) { // can't use REX prefix with high-byte reg @@ -864,7 +861,7 @@ } // mov dst, byte [tmp+src] opcode(gendst->index,true,high?4:0).setea(tmp,src).Emit8(0x8A); - Bit8u* jmp_loc=gen_create_short_jump(); + const Bit8u* jmp_loc=gen_create_short_jump(); gen_fill_branch(nomap); if (gensrc->index != ARG0_REG) { @@ -897,7 +894,7 @@ if (release) gen_releasereg(addr); dyn_savestate(&callstate); - Bit8u *page_brk; + const Bit8u *page_brk; opcode(tmp).set64().setea(gendst->index,-1,0,dword?3:1).Emit8(0x8D); // lea tmp, [dst+(dword?3:1)] if (dword) { opcode(4).set64().setimm(~0xFFF,4).setrm(tmp).Emit8(0x81); // and tmp, ~0xFFF @@ -912,14 +909,14 @@ // mov tmp, [8*tmp+paging.tlb.write(rbp)] opcode(tmp).set64().setea(5,tmp,3,(Bits)paging.tlb.write-(Bits)&cpu_regs).Emit8(0x8B); opcode(tmp).set64().setrm(tmp).Emit8(0x85); // test tmp,tmp - Bit8u *nomap=gen_create_branch(BR_Z); + const Bit8u *nomap=gen_create_branch(BR_Z); //mov [tmp+src], dst opcode(genval->index,dword).setea(tmp,gendst->index).Emit8(0x89); - Bit8u* jmp_loc = gen_create_short_jump(); + const Bit8u* jmp_loc = gen_create_short_jump(); gen_fill_branch(page_brk); gen_load_imm(tmp, (Bitu)(dword?(void*)mem_unalignedwrited_checked:(void*)mem_unalignedwritew_checked)); - Bit8u* page_jmp = gen_create_short_jump(); + const Bit8u* page_jmp = gen_create_short_jump(); gen_fill_branch(nomap); gen_load_imm(tmp, (Bitu)(dword?(void*)mem_writed_checked_dcx64:(void*)mem_writew_checked_dcx64)); gen_fill_short_jump(page_jmp); @@ -953,7 +950,7 @@ // mov tmp, [8*tmp+paging.tlb.write(rbp)] opcode(tmp).set64().setea(5,tmp,3,(Bits)paging.tlb.write-(Bits)&cpu_regs).Emit8(0x8B); opcode(tmp).set64().setrm(tmp).Emit8(0x85); // test tmp,tmp - Bit8u *nomap=gen_create_branch(BR_Z); + const Bit8u *nomap=gen_create_branch(BR_Z); int dst = gendst->index; if (high && dst>=8) { // can't use REX prefix with high-byte reg @@ -963,7 +960,7 @@ // mov byte [tmp+src], val opcode(genval->index,true,high?4:0).setea(tmp,dst).Emit8(0x88); - Bit8u* jmp_loc=gen_create_short_jump(); + const Bit8u* jmp_loc=gen_create_short_jump(); gen_fill_branch(nomap); if (gendst->index != ARG0_REG) { @@ -1260,7 +1257,8 @@ static void dyn_dop_ebgb(DualOps op) { - dyn_get_modrm();DynReg * rm_reg=&DynRegs[decode.modrm.reg&3]; + dyn_get_modrm(); + DynReg * rm_reg=&DynRegs[decode.modrm.reg&3]; if (decode.modrm.mod<3) { dyn_fill_ea(); if ((op<=DOP_TEST) && (op!=DOP_ADC && op!=DOP_SBB)) set_skipflags(true); @@ -1282,9 +1280,21 @@ } } +static void dyn_dop_ebgb_xchg(void) { + dyn_get_modrm(); + DynReg *rm_reg=&DynRegs[decode.modrm.reg&3]; + if (decode.modrm.mod<3) { + dyn_fill_ea(); + dyn_read_byte(DREG(EA),DREG(TMPB),false); + dyn_write_byte_release(DREG(EA),rm_reg,(decode.modrm.reg&4)!=0); + gen_dop_byte(DOP_MOV,rm_reg,decode.modrm.reg&4,DREG(TMPB),0); + gen_releasereg(DREG(TMPB)); + } else gen_dop_byte(DOP_XCHG,&DynRegs[decode.modrm.rm&3],decode.modrm.rm&4,rm_reg,decode.modrm.reg&4); +} static void dyn_dop_gbeb(DualOps op) { - dyn_get_modrm();DynReg * rm_reg=&DynRegs[decode.modrm.reg&3]; + dyn_get_modrm(); + DynReg * rm_reg=&DynRegs[decode.modrm.reg&3]; if (decode.modrm.mod<3) { dyn_fill_ea(); if ((op<=DOP_TEST) && (op!=DOP_ADC && op!=DOP_SBB)) set_skipflags(true); @@ -1361,6 +1371,20 @@ } } +static void dyn_dop_evgv_xchg(void) { + dyn_get_modrm(); + DynReg *rm_reg=&DynRegs[decode.modrm.reg]; + if (decode.modrm.mod<3) { + dyn_fill_ea(); + DynReg *tmp = decode.modrm.reg >= 4 ? DREG(TMPW) : DREG(TMPB); + if (!decode.big_op) gen_dop_word(DOP_MOV,true,tmp,rm_reg); + dyn_read_word(DREG(EA),tmp,decode.big_op); + dyn_write_word_release(DREG(EA),rm_reg,decode.big_op); + gen_dop_word(DOP_XCHG,true,tmp,rm_reg); + gen_releasereg(tmp); + } else gen_dop_word(DOP_XCHG,decode.big_op,&DynRegs[decode.modrm.rm],rm_reg); +} + static void dyn_imul_gvev(Bitu immsize) { dyn_get_modrm();DynReg * src; DynReg * rm_reg=&DynRegs[decode.modrm.reg]; @@ -1477,7 +1501,7 @@ gen_dop_word(DOP_MOV,decode.big_op,DREG(TMPB),&DynRegs[decode.modrm.reg]); // TMPB=src,TMPW=temp gen_dop_word(DOP_CMP,decode.big_op,DREG(EAX),DREG(TMPW)); - Bit8u * branch=gen_create_branch(BR_Z); + const Bit8u * branch=gen_create_branch(BR_Z); // if eax!=temp: TMPB=temp gen_dop_word(DOP_MOV,decode.big_op,DREG(TMPB),DREG(TMPW)); gen_fill_branch(branch); @@ -1879,7 +1903,7 @@ DynReg save_cycles,save_eip; dyn_saveregister(DREG(CYCLES),&save_cycles); dyn_saveregister(DREG(EIP),&save_eip); - Bit8u * data=gen_create_branch(btype); + const Bit8u * data=gen_create_branch(btype); /* Branch not taken */ dyn_reduce_cycles(); @@ -1905,51 +1929,55 @@ }; static void dyn_loop(LoopTypes type) { - dyn_reduce_cycles(); Bits eip_add=(Bit8s)decode_fetchb(); - Bitu eip_base=decode.code-decode.code_start; - Bit8u * branch1=0;Bit8u * branch2=0; - dyn_save_critical_regs(); + const Bit8u * branch1=0;const Bit8u * branch2=0; + gen_preloadreg(DREG(ECX)); + gen_preloadreg(DREG(CYCLES)); + gen_preloadreg(DREG(EIP)); switch (type) { case LOOP_E: gen_needflags(); + gen_protectflags(); branch1=gen_create_branch(BR_NZ); break; case LOOP_NE: gen_needflags(); + gen_protectflags(); branch1=gen_create_branch(BR_Z); break; - case LOOP_NONE: - case LOOP_JCXZ: - break; + default: + gen_protectflags(); } - gen_protectflags(); switch (type) { case LOOP_E: case LOOP_NE: case LOOP_NONE: gen_sop_word(SOP_DEC,decode.big_addr,DREG(ECX)); - gen_releasereg(DREG(ECX)); branch2=gen_create_branch(BR_Z); break; case LOOP_JCXZ: gen_dop_word(DOP_TEST,decode.big_addr,DREG(ECX),DREG(ECX)); - gen_releasereg(DREG(ECX)); branch2=gen_create_branch(BR_NZ); break; } - gen_lea(DREG(EIP),DREG(EIP),0,0,eip_base+eip_add); - gen_releasereg(DREG(EIP)); + /* Branch taken */ + dyn_reduce_cycles(); + dyn_set_eip_end(); + gen_dop_word_imm(DOP_ADD,decode.big_op,DREG(EIP),eip_add); + DynState st; + dyn_savestate(&st); + dyn_save_critical_regs(); gen_jmp_ptr(&decode.block->link[0].to,offsetof(CacheBlock,cache.start)); + dyn_loadstate(&st); if (branch1) { gen_fill_branch(branch1); gen_sop_word(SOP_DEC,decode.big_addr,DREG(ECX)); - gen_releasereg(DREG(ECX)); } - /* Branch taken */ + /* Branch not taken */ gen_fill_branch(branch2); - gen_lea(DREG(EIP),DREG(EIP),0,0,eip_base); - gen_releasereg(DREG(EIP)); + dyn_reduce_cycles(); + dyn_set_eip_end(); + dyn_save_critical_regs(); gen_jmp_ptr(&decode.block->link[1].to,offsetof(CacheBlock,cache.start)); dyn_closeblock(); } @@ -2040,14 +2068,40 @@ dyn_closeblock(); } -static void dyn_add_iocheck(Bitu access_size) { - gen_call_function((void *)&CPU_IO_Exception,"%Dw%Id",DREG(EDX),access_size); - dyn_check_bool_exception_al(); +static bool dyn_io_writeB(Bitu port,Bit8u val) { + bool ex = CPU_IO_Exception(port,1); + if (!ex) IO_WriteB(port,val); + return ex; } -static void dyn_add_iocheck_var(Bit8u accessed_port,Bitu access_size) { - gen_call_function((void *)&CPU_IO_Exception,"%Id%Id",accessed_port,access_size); - dyn_check_bool_exception_al(); +static bool dyn_io_writeW(Bitu port,Bit16u val) { + bool ex = CPU_IO_Exception(port,2); + if (!ex) IO_WriteW(port,val); + return ex; +} + +static bool dyn_io_writeD(Bitu port,Bit32u val) { + bool ex = CPU_IO_Exception(port,4); + if (!ex) IO_WriteD(port,val); + return ex; +} + +static bool dyn_io_readB(Bitu port) { + bool ex = CPU_IO_Exception(port,1); + if (!ex) core_dyn.readdata = IO_ReadB(port); + return ex; +} + +static bool dyn_io_readW(Bitu port) { + bool ex = CPU_IO_Exception(port,2); + if (!ex) core_dyn.readdata = IO_ReadW(port); + return ex; +} + +static bool dyn_io_readD(Bitu port) { + bool ex = CPU_IO_Exception(port,4); + if (!ex) core_dyn.readdata = IO_ReadD(port); + return ex; } static void dyn_xlat(void) { @@ -2071,7 +2125,7 @@ gen_releasereg(DREG(TMPW)); DynState s; dyn_savestate(&s); - Bit8u *is_pmode = gen_create_branch(BR_Z); + const Bit8u *is_pmode = gen_create_branch(BR_Z); gen_call_function((void*)CPU_PrepareException,"%Id%Id",EXCEPTION_UD,0); dyn_check_bool_exception_al(); gen_fill_branch(is_pmode); @@ -2090,7 +2144,7 @@ dyn_flags_host_to_gen(); gen_needflags(); gen_preloadreg(&DynRegs[decode.modrm.reg]); - Bit8u *br = gen_create_branch(BR_NZ); + const Bit8u *br = gen_create_branch(BR_NZ); gen_mov_host(&core_dyn.readdata, &DynRegs[decode.modrm.reg], decode.big_op?4:2); gen_fill_branch(br); } @@ -2126,7 +2180,11 @@ decode.block->page.start=decode.page.index; codepage->AddCacheBlock(decode.block); - for (i=0;i(const_cast(decode.block->cache.start)); + constexpr size_t cache_bytes = CACHE_MAXSIZE; + + dyn_mem_write(cache_addr, cache_bytes); + for (i = 0; i < G_MAX; i++) { DynRegs[i].flags&=~(DYNFLG_ACTIVE|DYNFLG_CHANGED); DynRegs[i].genreg=0; } @@ -2357,8 +2415,8 @@ case 0x84:dyn_dop_gbeb(DOP_TEST);break; case 0x85:dyn_dop_gvev(DOP_TEST);break; /* XCHG Eb,Gb Ev,Gv */ - case 0x86:dyn_dop_ebgb(DOP_XCHG);break; - case 0x87:dyn_dop_evgv(DOP_XCHG);break; + case 0x86:dyn_dop_ebgb_xchg();break; + case 0x87:dyn_dop_evgv_xchg();break; /* MOV e,g and g,e */ case 0x88:dyn_mov_ebgb();break; case 0x89:dyn_mov_evgv();break; @@ -2615,39 +2673,37 @@ dyn_fpu_esc7(); break; #endif - //Loops + //Loops + case 0xe0:dyn_loop(LOOP_NE);goto finish_block; + case 0xe1:dyn_loop(LOOP_E);goto finish_block; case 0xe2:dyn_loop(LOOP_NONE);goto finish_block; case 0xe3:dyn_loop(LOOP_JCXZ);goto finish_block; //IN AL/AX,imm - case 0xe4: { - Bitu port=decode_fetchb(); - dyn_add_iocheck_var(port,1); - gen_call_function((void*)&IO_ReadB,"%Id%Rl",port,DREG(EAX)); - } break; - case 0xe5: { - Bitu port=decode_fetchb(); - dyn_add_iocheck_var(port,decode.big_op?4:2); - if (decode.big_op) { - gen_call_function((void*)&IO_ReadD,"%Id%Rd",port,DREG(EAX)); - } else { - gen_call_function((void*)&IO_ReadW,"%Id%Rw",port,DREG(EAX)); - } - } break; + case 0xe4: + gen_call_function((void*)&dyn_io_readB,"%Id",decode_fetchb()); + dyn_check_bool_exception_al(); + gen_mov_host(&core_dyn.readdata,DREG(EAX),1); + break; + case 0xe5: + if (!decode.big_op) + gen_call_function((void*)&dyn_io_readW,"%Id",decode_fetchb()); + else + gen_call_function((void*)&dyn_io_readD,"%Id",decode_fetchb()); + dyn_check_bool_exception_al(); + gen_mov_host(&core_dyn.readdata,DREG(EAX),decode.big_op?4:2); + break; //OUT imm,AL - case 0xe6: { - Bitu port=decode_fetchb(); - dyn_add_iocheck_var(port,1); - gen_call_function((void*)&IO_WriteB,"%Id%Dl",port,DREG(EAX)); - } break; - case 0xe7: { - Bitu port=decode_fetchb(); - dyn_add_iocheck_var(port,decode.big_op?4:2); - if (decode.big_op) { - gen_call_function((void*)&IO_WriteD,"%Id%Dd",port,DREG(EAX)); - } else { - gen_call_function((void*)&IO_WriteW,"%Id%Dw",port,DREG(EAX)); - } - } break; + case 0xe6: + gen_call_function((void*)&dyn_io_writeB,"%Id%Dl",decode_fetchb(),DREG(EAX)); + dyn_check_bool_exception_al(); + break; + case 0xe7: + if (!decode.big_op) + gen_call_function((void*)&dyn_io_writeW,"%Id%Dw",decode_fetchb(),DREG(EAX)); + else + gen_call_function((void*)&dyn_io_writeD,"%Id%Dd",decode_fetchb(),DREG(EAX)); + dyn_check_bool_exception_al(); + break; case 0xe8: /* CALL Ivx */ dyn_call_near_imm(); goto finish_block; @@ -2661,29 +2717,29 @@ case 0xeb:dyn_exit_link((Bit8s)decode_fetchb());goto finish_block; /* IN AL/AX,DX*/ case 0xec: - dyn_add_iocheck(1); - gen_call_function((void*)&IO_ReadB,"%Dw%Rl",DREG(EDX),DREG(EAX)); + gen_call_function((void*)&dyn_io_readB,"%Dw",DREG(EDX)); + dyn_check_bool_exception_al(); + gen_mov_host(&core_dyn.readdata,DREG(EAX),1); break; case 0xed: - dyn_add_iocheck(decode.big_op?4:2); - if (decode.big_op) { - gen_call_function((void*)&IO_ReadD,"%Dw%Rd",DREG(EDX),DREG(EAX)); - } else { - gen_call_function((void*)&IO_ReadW,"%Dw%Rw",DREG(EDX),DREG(EAX)); - } + if (!decode.big_op) + gen_call_function((void*)&dyn_io_readW,"%Dw",DREG(EDX)); + else + gen_call_function((void*)&dyn_io_readD,"%Dw",DREG(EDX)); + dyn_check_bool_exception_al(); + gen_mov_host(&core_dyn.readdata,DREG(EAX),decode.big_op?4:2); break; /* OUT DX,AL/AX */ case 0xee: - dyn_add_iocheck(1); - gen_call_function((void*)&IO_WriteB,"%Dw%Dl",DREG(EDX),DREG(EAX)); + gen_call_function((void*)&dyn_io_writeB,"%Dw%Dl",DREG(EDX),DREG(EAX)); + dyn_check_bool_exception_al(); break; case 0xef: - dyn_add_iocheck(decode.big_op?4:2); - if (decode.big_op) { - gen_call_function((void*)&IO_WriteD,"%Dw%Dd",DREG(EDX),DREG(EAX)); - } else { - gen_call_function((void*)&IO_WriteW,"%Dw%Dw",DREG(EDX),DREG(EAX)); - } + if (!decode.big_op) + gen_call_function((void*)&dyn_io_writeW,"%Dw%Dw",DREG(EDX),DREG(EAX)); + else + gen_call_function((void*)&dyn_io_writeD,"%Dw%Dd",DREG(EDX),DREG(EAX)); + dyn_check_bool_exception_al(); break; case 0xf0: //LOCK goto restart_prefix; @@ -2833,6 +2889,7 @@ dyn_save_critical_regs(); gen_return(BR_Opcode); dyn_closeblock(); + goto finish_block; #if (C_DEBUG) dyn_set_eip_last(); @@ -2845,6 +2902,9 @@ finish_block: /* Setup the correct end-address */ decode.active_block->page.end=--decode.page.index; -// LOG_MSG("Created block size %d start %d end %d",decode.block->cache.size,decode.block->page.start,decode.block->page.end); + dyn_mem_execute(cache_addr, cache_bytes); + dyn_cache_invalidate(cache_addr, cache_bytes); + // LOG_MSG("Created block size %d start %d end + //%d",decode.block->cache.size,decode.block->page.start,decode.block->page.end); return decode.block; } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/dyn_fpu_dh.h dosbox-staging-0.77.0/src/cpu/core_dyn_x86/dyn_fpu_dh.h --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/dyn_fpu_dh.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/dyn_fpu_dh.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include "dosbox.h" + #if C_FPU static void FPU_FLD_16(PhysPt addr) { @@ -441,4 +441,4 @@ } } -#endif +#endif // C_FPU diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/dyn_fpu.h dosbox-staging-0.77.0/src/cpu/core_dyn_x86/dyn_fpu.h --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/dyn_fpu.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/dyn_fpu.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/.gitignore dosbox-staging-0.77.0/src/cpu/core_dyn_x86/.gitignore --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/helpers.h dosbox-staging-0.77.0/src/cpu/core_dyn_x86/helpers.h --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/helpers.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/helpers.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/Makefile.am dosbox-staging-0.77.0/src/cpu/core_dyn_x86/Makefile.am --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -noinst_HEADERS = \ - decoder.h \ - dyn_fpu_dh.h \ - dyn_fpu.h \ - helpers.h \ - risc_x64.h \ - risc_x86.h \ - string.h diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/risc_x64.h dosbox-staging-0.77.0/src/cpu/core_dyn_x86/risc_x64.h --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/risc_x64.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/risc_x64.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -128,7 +128,7 @@ else { // try 32-bit absolute address if ((Bit32s)offset != offset) IllegalOption("opcode::Emit: bad RIP address"); // change emitted modrm base from 5 to 4 (use sib) - cache.pos[-1] -= 1; + cache_addb(modrm-1,cache.pos-1); cache_addb(0x25); // sib: [none+1*none+simm32] } } else if ((modrm&7)!=4 || (sib&7)!=5) @@ -278,20 +278,30 @@ } }; -static BlockReturn gen_runcodeInit(Bit8u *code); -static BlockReturn (*gen_runcode)(Bit8u *code) = gen_runcodeInit; +static BlockReturn gen_runcodeInit(const Bit8u *code); +static BlockReturn (*gen_runcode)(const Bit8u *code) = gen_runcodeInit; -static BlockReturn gen_runcodeInit(Bit8u *code) { - Bit8u* oldpos = cache.pos; +static BlockReturn gen_runcodeInit(const Bit8u *code) { + const Bit8u* oldpos = cache.pos; cache.pos = &cache_code_link_blocks[128]; - gen_runcode = (BlockReturn(*)(Bit8u*))cache.pos; + gen_runcode = (BlockReturn(*)(const Bit8u*))cache.pos; + auto cache_addr = static_cast(const_cast(cache.pos)); + constexpr size_t cache_bytes = CACHE_MAXSIZE; + + dyn_mem_write(cache_addr, cache_bytes); + opcode(5).Emit8Reg(0x50); // push rbp opcode(15).Emit8Reg(0x50); // push r15 opcode(14).Emit8Reg(0x50); // push r14 + // mov rbp, &cpu_regs - if ((Bit32u)(Bitu)&cpu_regs == (Bitu)&cpu_regs) opcode(5).setimm((Bitu)&cpu_regs,4).Emit8Reg(0xB8); - else opcode(5).set64().setimm((Bitu)&cpu_regs,8).Emit8Reg(0xB8); + const auto regs_addr = reinterpret_cast(&cpu_regs); + if (regs_addr > UINT32_MAX) // above 4 GiB + opcode(5).set64().setimm(regs_addr, 8).Emit8Reg(0xB8); + else + opcode(5).setimm(regs_addr, 4).Emit8Reg(0xB8); + opcode(13).Emit8Reg(0x50); // push r13 opcode(12).Emit8Reg(0x50); // push r12 opcode(3).Emit8Reg(0x50); // push rbx @@ -303,7 +313,7 @@ opcode(15).set64().setrm(4).Emit8(0x8B); // mov r15, rsp opcode(0).setimm(FMASK_TEST,4).Emit8Reg(0x25); // and eax, FMASK_TEST cache_addb(0x48);cache_addw(0x158D); // lea rdx, [rip+simm32] - Bit8u *diff = cache.pos; + const Bit8u *diff = cache.pos; cache_addd(0); opcode(4).set64().setrm(4).setimm(~15,1).Emit8(0x83); // and rsp, ~15 opcode(15).Emit8Reg(0x50); // push r15 @@ -312,7 +322,7 @@ opcode(0).setea(4,-1,0,CALLSTACK).Emit8(0x89); // mov [rsp+8/40], eax opcode(4).setrm(ARG0_REG).Emit8(0xFF); // jmp ARG0 - *(Bit32u*)diff = (Bit32u)(cache.pos - diff - 4); + cache_addd((Bit32u)(cache.pos - diff - 4),diff); // eax = return value, ecx = flags opcode(1).setea(5,-1,0,offsetof(CPU_Regs,flags)).Emit8(0x33); // xor ecx, reg_flags opcode(4).setrm(1).setimm(FMASK_TEST,4).Emit8(0x81); // and ecx,FMASK_TEST @@ -330,6 +340,9 @@ opcode(15).Emit8Reg(0x58); // pop r15 opcode(5).Emit8Reg(0x58); // pop rbp cache_addb(0xc3); // ret + + dyn_mem_execute(cache_addr, cache_bytes); + dyn_cache_invalidate(cache_addr, cache_bytes); cache.pos = oldpos; return gen_runcode(code); @@ -1139,34 +1152,33 @@ gen_call_ptr(func); } -static Bit8u * gen_create_branch(BranchTypes type) { +static const Bit8u * gen_create_branch(BranchTypes type) { /* First free all registers */ cache_addw(0x70+type); return (cache.pos-1); } -static void gen_fill_branch(Bit8u * data,Bit8u * from=cache.pos) { +static void gen_fill_branch(const Bit8u * data,const Bit8u * from=cache.pos) { #if C_DEBUG Bits len=from-data-1; if (len<0) len=~len; if (len>127) LOG_MSG("Big jump %" sBitfs(d),len); #endif - *data=(Bit8u)(from-data-1); + cache_addb((Bit8u)(from-data-1),data); } -static Bit8u * gen_create_branch_long(BranchTypes type) { +static const Bit8u * gen_create_branch_long(BranchTypes type) { cache_addw(0x800f+(type<<8)); cache_addd(0); return (cache.pos-4); } -static void gen_fill_branch_long(Bit8u * data,Bit8u * from=cache.pos) { - *(Bit32u*)data=(Bit32u)(from-data-4); +static void gen_fill_branch_long(const Bit8u * data,const Bit8u * from=cache.pos) { + cache_addd((Bit32u)(from-data-4),data); } -static uint8_t *gen_create_jump(uint8_t *to = 0) -{ +static const Bit8u * gen_create_jump(const Bit8u * to=0) { /* First free all registers */ cache_addb(0xe9); cache_addd(to - cache.pos - sizeof(uint32_t)); @@ -1174,24 +1186,18 @@ } #if 0 -static void gen_fill_jump(Bit8u * data,Bit8u * to=cache.pos) { - *(Bit32u*)data=(Bit32u)(to-data-4); +static void gen_fill_jump(const Bit8u * data,const Bit8u * to=cache.pos) { + gen_fill_branch_long(data,to); } #endif -static Bit8u * gen_create_short_jump(void) { +static const Bit8u * gen_create_short_jump(void) { cache_addw(0x00EB); return cache.pos-1; } -static void gen_fill_short_jump(Bit8u * data, Bit8u * to=cache.pos) { -#if C_DEBUG - Bits len=to-data-1; - if (len<0) len=~len; - if (len>127) - LOG_MSG("Big jump %" sBitfs(d),len); -#endif - data[0] = (Bit8u)(to-data-1); +static void gen_fill_short_jump(const Bit8u * data, const Bit8u * to=cache.pos) { + gen_fill_branch(data,to); } static void gen_jmp_ptr(void * _ptr,Bit32s imm=0) { @@ -1271,11 +1277,17 @@ // DO NOT USE opcode::setabsaddr IN THIS FUNCTION (RBP unavailable at execution time) static void gen_dh_fpu_saveInit(void) { - Bit8u* oldpos = cache.pos; + const Bit8u* oldpos = cache.pos; cache.pos = &cache_code_link_blocks[64]; gen_dh_fpu_save = (void(*)(void))cache.pos; Bitu addr = (Bitu)&dyn_dh_fpu; + + auto cache_addr = static_cast(const_cast(cache.pos)); + constexpr size_t cache_bytes = CACHE_MAXSIZE; + + dyn_mem_write(cache_addr, cache_bytes); + // mov RAX, &dyn_dh_fpu if ((Bit32u)addr == addr) opcode(0).setimm(addr,4).Emit8Reg(0xB8); else opcode(0).set64().setimm(addr,8).Emit8Reg(0xB8); @@ -1289,9 +1301,11 @@ // or byte [dyn_dh_fpu.state.cw], 0x3F opcode(1).setimm(0x3F,1).setea(0,-1,0,offsetof(struct dyn_dh_fpu,state.cw)).Emit8(0x80); cache_addb(0xC3); // RET + + dyn_mem_execute(cache_addr, cache_bytes); + dyn_cache_invalidate(cache_addr, cache_bytes); cache.pos = oldpos; gen_dh_fpu_save(); } #endif - diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/risc_x86.h dosbox-staging-0.77.0/src/cpu/core_dyn_x86/risc_x86.h --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/risc_x86.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/risc_x86.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - static void gen_init(void); /* End of needed */ @@ -84,7 +83,7 @@ } }; -static BlockReturn gen_runcode(Bit8u * code) { +static BlockReturn gen_runcode(const Bit8u * code) { BlockReturn retval; #if defined (_MSC_VER) __asm { @@ -968,40 +967,40 @@ #endif } -static Bit8u * gen_create_branch(BranchTypes type) { +static const Bit8u * gen_create_branch(BranchTypes type) { /* First free all registers */ cache_addw(0x70+type); return (cache.pos-1); } -static void gen_fill_branch(Bit8u * data,Bit8u * from=cache.pos) { +static void gen_fill_branch(const Bit8u * data,const Bit8u * from=cache.pos) { #if C_DEBUG Bits len=from-data; if (len<0) len=-len; if (len>126) LOG_MSG("Big jump %d",len); #endif - *data=(from-data-1); + cache_addb((Bit8u)(from-data-1),data); } -static Bit8u * gen_create_branch_long(BranchTypes type) { +static const Bit8u * gen_create_branch_long(BranchTypes type) { cache_addw(0x800f+(type<<8)); cache_addd(0); return (cache.pos-4); } -static void gen_fill_branch_long(Bit8u * data,Bit8u * from=cache.pos) { - *(Bit32u*)data=(from-data-4); +static void gen_fill_branch_long(const Bit8u * data,const Bit8u * from=cache.pos) { + cache_addd((Bit32u)(from-data-4),data); } -static Bit8u * gen_create_jump(Bit8u * to=0) { +static const Bit8u * gen_create_jump(const Bit8u * to=0) { /* First free all registers */ cache_addb(0xe9); cache_addd(to-(cache.pos+4)); return (cache.pos-4); } -static void gen_fill_jump(Bit8u * data,Bit8u * to=cache.pos) { - *(Bit32u*)data=(to-data-4); +static void gen_fill_jump(const Bit8u * data,const Bit8u * to=cache.pos) { + gen_fill_branch_long(data,to); } diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86/string.h dosbox-staging-0.77.0/src/cpu/core_dyn_x86/string.h --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86/string.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86/string.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -78,8 +78,8 @@ } DynState rep_state; dyn_savestate(&rep_state); - Bit8u * rep_start=cache.pos; - Bit8u * rep_ecx_jmp; + const Bit8u * rep_start=cache.pos; + const Bit8u * rep_ecx_jmp; /* Check if ECX!=zero */ if (decode.rep) { gen_dop_word(DOP_TEST,decode.big_addr,DREG(ECX),DREG(ECX)); diff -Nru dosbox-staging-0.76.0/src/cpu/core_dyn_x86.cpp dosbox-staging-0.77.0/src/cpu/core_dyn_x86.cpp --- dosbox-staging-0.76.0/src/cpu/core_dyn_x86.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_dyn_x86.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,26 +21,28 @@ #if (C_DYNAMIC_X86) -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #if defined (WIN32) #include #include #endif -#if (C_HAVE_MPROTECT) +#if defined(HAVE_MPROTECT) || defined(HAVE_MMAP) #include #include + #ifndef PAGESIZE #define PAGESIZE 4096 #endif -#endif /* C_HAVE_MPROTECT */ + +#endif // HAVE_MPROTECT #include "callback.h" #include "regs.h" @@ -133,7 +135,6 @@ #define DYNFLG_ACTIVE 0x20 //Register has an active value class GenReg; -class CodePageHandler; struct DynReg { Bitu flags; @@ -160,7 +161,8 @@ #define IllegalOption(msg) E_Exit("DYNX86: illegal option in " msg) -#include "dyn_cache.h" +#define dyn_return(a,b) gen_return(a) +#include "dyn_cache.h" static struct { Bitu callback; @@ -361,7 +363,7 @@ case BR_Link2: { Bit32u temp_ip=SegPhys(cs)+reg_eip; - CodePageHandler * temp_handler=(CodePageHandler *)get_tlb_readhandler(temp_ip); + CodePageHandler* temp_handler = reinterpret_cast(get_tlb_readhandler(temp_ip)); if (temp_handler->flags & (cpu.code.big ? PFLAG_HASCODE32:PFLAG_HASCODE16)) { block=temp_handler->FindCacheBlock(temp_ip & 4095); if (!block || !cache.block.running) goto restart_core; @@ -380,7 +382,7 @@ cpu.trap_skip = false; Bits ret=CPU_Core_Normal_Run(); - if (!cpu.trap_skip) CPU_HW_Interrupt(1); + if (!cpu.trap_skip) CPU_DebugException(DBINT_STEP,reg_eip); CPU_Cycles = oldCycles-1; cpudecoder = &CPU_Core_Dyn_X86_Run; diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/ea_lookup.h dosbox-staging-0.77.0/src/cpu/core_full/ea_lookup.h --- dosbox-staging-0.76.0/src/cpu/core_full/ea_lookup.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/ea_lookup.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/.gitignore dosbox-staging-0.77.0/src/cpu/core_full/.gitignore --- dosbox-staging-0.76.0/src/cpu/core_full/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/load.h dosbox-staging-0.77.0/src/cpu/core_full/load.h --- dosbox-staging-0.76.0/src/cpu/core_full/load.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/load.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/loadwrite.h dosbox-staging-0.77.0/src/cpu/core_full/loadwrite.h --- dosbox-staging-0.76.0/src/cpu/core_full/loadwrite.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/loadwrite.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/Makefile.am dosbox-staging-0.77.0/src/cpu/core_full/Makefile.am --- dosbox-staging-0.76.0/src/cpu/core_full/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -noinst_HEADERS = \ - ea_lookup.h \ - load.h \ - loadwrite.h \ - op.h \ - optable.h \ - save.h \ - string.h \ - support.h diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/op.h dosbox-staging-0.77.0/src/cpu/core_full/op.h --- dosbox-staging-0.76.0/src/cpu/core_full/op.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/op.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/optable.h dosbox-staging-0.77.0/src/cpu/core_full/optable.h --- dosbox-staging-0.76.0/src/cpu/core_full/optable.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/optable.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/save.h dosbox-staging-0.77.0/src/cpu/core_full/save.h --- dosbox-staging-0.76.0/src/cpu/core_full/save.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/save.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/string.h dosbox-staging-0.77.0/src/cpu/core_full/string.h --- dosbox-staging-0.76.0/src/cpu/core_full/string.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/string.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,14 +62,14 @@ } break; case R_OUTSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { IO_WriteW(reg_dx,LoadMw(si_base+si_index)); si_index=(si_index+add_index) & add_mask; } break; case R_OUTSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { IO_WriteD(reg_dx,LoadMd(si_base+si_index)); si_index=(si_index+add_index) & add_mask; @@ -82,14 +82,14 @@ } break; case R_INSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { SaveMw(di_base+di_index,IO_ReadW(reg_dx)); di_index=(di_index+add_index) & add_mask; } break; case R_INSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { SaveMd(di_base+di_index,IO_ReadD(reg_dx)); di_index=(di_index+add_index) & add_mask; @@ -102,14 +102,14 @@ } break; case R_STOSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { SaveMw(di_base+di_index,reg_ax); di_index=(di_index+add_index) & add_mask; } break; case R_STOSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { SaveMd(di_base+di_index,reg_eax); di_index=(di_index+add_index) & add_mask; @@ -123,7 +123,7 @@ } break; case R_MOVSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { SaveMw(di_base+di_index,LoadMw(si_base+si_index)); di_index=(di_index+add_index) & add_mask; @@ -131,7 +131,7 @@ } break; case R_MOVSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { SaveMd(di_base+di_index,LoadMd(si_base+si_index)); di_index=(di_index+add_index) & add_mask; @@ -145,14 +145,14 @@ } break; case R_LODSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { reg_ax=LoadMw(si_base+si_index); si_index=(si_index+add_index) & add_mask; } break; case R_LODSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { reg_eax=LoadMd(si_base+si_index); si_index=(si_index+add_index) & add_mask; @@ -172,7 +172,8 @@ break; case R_SCASW: { - add_index<<=1;Bit16u val2; + add_index *= 2; + Bit16u val2; for (;count>0;) { count--;CPU_Cycles--; val2=LoadMw(di_base+di_index); @@ -184,7 +185,8 @@ break; case R_SCASD: { - add_index<<=2;Bit32u val2; + add_index *= 4; + Bit32u val2; for (;count>0;) { count--;CPU_Cycles--; val2=LoadMd(di_base+di_index); @@ -210,7 +212,8 @@ break; case R_CMPSW: { - add_index<<=1;Bit16u val1,val2; + add_index *= 2; + Bit16u val1,val2; for (;count>0;) { count--;CPU_Cycles--; val1=LoadMw(si_base+si_index); @@ -224,7 +227,8 @@ break; case R_CMPSD: { - add_index<<=2;Bit32u val1,val2; + add_index *= 4; + Bit32u val1,val2; for (;count>0;) { count--;CPU_Cycles--; val1=LoadMd(si_base+si_index); diff -Nru dosbox-staging-0.76.0/src/cpu/core_full/support.h dosbox-staging-0.77.0/src/cpu/core_full/support.h --- dosbox-staging-0.76.0/src/cpu/core_full/support.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full/support.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_full.cpp dosbox-staging-0.77.0/src/cpu/core_full.cpp --- dosbox-staging-0.76.0/src/cpu/core_full.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_full.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/.gitignore dosbox-staging-0.77.0/src/cpu/core_normal/.gitignore --- dosbox-staging-0.76.0/src/cpu/core_normal/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/helpers.h dosbox-staging-0.77.0/src/cpu/core_normal/helpers.h --- dosbox-staging-0.76.0/src/cpu/core_normal/helpers.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/helpers.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -160,3 +160,16 @@ #define CASE_0F_B(_WHICH) \ CASE_0F_W(_WHICH) \ CASE_0F_D(_WHICH) + +#define FixEA16 \ + do { \ + switch (rm & 7) { \ + case 6: \ + if (rm < 0x40) \ + break; \ + FALLTHROUGH; \ + case 2: \ + case 3: BaseDS = BaseSS; \ + } \ + eaa = BaseDS + (Bit16u)(eaa - BaseDS); \ + } while (0) diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/Makefile.am dosbox-staging-0.77.0/src/cpu/core_normal/Makefile.am --- dosbox-staging-0.76.0/src/cpu/core_normal/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -noinst_HEADERS = \ - helpers.h \ - prefix_0f.h \ - prefix_66_0f.h \ - prefix_66.h \ - prefix_none.h \ - string.h \ - support.h \ - table_ea.h diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/prefix_0f.h dosbox-staging-0.77.0/src/cpu/core_normal/prefix_0f.h --- dosbox-staging-0.76.0/src/cpu/core_normal/prefix_0f.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/prefix_0f.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -316,6 +316,7 @@ SETFLAGBIT(CF,(*earw & mask)); } else { GetEAa;eaa+=(((Bit16s)*rmrw)>>4)*2; + if (!TEST_PREFIX_ADDR) FixEA16; Bit16u old=LoadMw(eaa); SETFLAGBIT(CF,(old & mask)); } @@ -342,6 +343,7 @@ *earw|=mask; } else { GetEAa;eaa+=(((Bit16s)*rmrw)>>4)*2; + if (!TEST_PREFIX_ADDR) FixEA16; Bit16u old=LoadMw(eaa); SETFLAGBIT(CF,(old & mask)); SaveMw(eaa,old | mask); @@ -433,6 +435,7 @@ *earw&= ~mask; } else { GetEAa;eaa+=(((Bit16s)*rmrw)>>4)*2; + if (!TEST_PREFIX_ADDR) FixEA16; Bit16u old=LoadMw(eaa); SETFLAGBIT(CF,(old & mask)); SaveMw(eaa,old & ~mask); @@ -526,6 +529,7 @@ *earw^=mask; } else { GetEAa;eaa+=(((Bit16s)*rmrw)>>4)*2; + if (!TEST_PREFIX_ADDR) FixEA16; Bit16u old=LoadMw(eaa); SETFLAGBIT(CF,(old & mask)); SaveMw(eaa,old ^ mask); diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/prefix_66_0f.h dosbox-staging-0.77.0/src/cpu/core_normal/prefix_66_0f.h --- dosbox-staging-0.76.0/src/cpu/core_normal/prefix_66_0f.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/prefix_66_0f.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -191,6 +191,7 @@ SETFLAGBIT(CF,(*eard & mask)); } else { GetEAa;eaa+=(((Bit32s)*rmrd)>>5)*4; + if (!TEST_PREFIX_ADDR) FixEA16; Bit32u old=LoadMd(eaa); SETFLAGBIT(CF,(old & mask)); } @@ -217,6 +218,7 @@ *eard|=mask; } else { GetEAa;eaa+=(((Bit32s)*rmrd)>>5)*4; + if (!TEST_PREFIX_ADDR) FixEA16; Bit32u old=LoadMd(eaa); SETFLAGBIT(CF,(old & mask)); SaveMd(eaa,old | mask); @@ -282,6 +284,7 @@ *eard&= ~mask; } else { GetEAa;eaa+=(((Bit32s)*rmrd)>>5)*4; + if (!TEST_PREFIX_ADDR) FixEA16; Bit32u old=LoadMd(eaa); SETFLAGBIT(CF,(old & mask)); SaveMd(eaa,old & ~mask); @@ -377,6 +380,7 @@ *eard^=mask; } else { GetEAa;eaa+=(((Bit32s)*rmrd)>>5)*4; + if (!TEST_PREFIX_ADDR) FixEA16; Bit32u old=LoadMd(eaa); SETFLAGBIT(CF,(old & mask)); SaveMd(eaa,old ^ mask); diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/prefix_66.h dosbox-staging-0.77.0/src/cpu/core_normal/prefix_66.h --- dosbox-staging-0.76.0/src/cpu/core_normal/prefix_66.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/prefix_66.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/prefix_none.h dosbox-staging-0.77.0/src/cpu/core_normal/prefix_none.h --- dosbox-staging-0.76.0/src/cpu/core_normal/prefix_none.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/prefix_none.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/string.h dosbox-staging-0.77.0/src/cpu/core_normal/string.h --- dosbox-staging-0.76.0/src/cpu/core_normal/string.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/string.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -67,14 +67,14 @@ } break; case R_OUTSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { IO_WriteW(reg_dx,LoadMw(si_base+si_index)); si_index=(si_index+add_index) & add_mask; } break; case R_OUTSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { IO_WriteD(reg_dx,LoadMd(si_base+si_index)); si_index=(si_index+add_index) & add_mask; @@ -87,14 +87,14 @@ } break; case R_INSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { SaveMw(di_base+di_index,IO_ReadW(reg_dx)); di_index=(di_index+add_index) & add_mask; } break; case R_INSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { SaveMd(di_base+di_index,IO_ReadD(reg_dx)); di_index=(di_index+add_index) & add_mask; @@ -107,14 +107,14 @@ } break; case R_STOSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { SaveMw(di_base+di_index,reg_ax); di_index=(di_index+add_index) & add_mask; } break; case R_STOSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { SaveMd(di_base+di_index,reg_eax); di_index=(di_index+add_index) & add_mask; @@ -128,7 +128,7 @@ } break; case R_MOVSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { SaveMw(di_base+di_index,LoadMw(si_base+si_index)); di_index=(di_index+add_index) & add_mask; @@ -136,7 +136,7 @@ } break; case R_MOVSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { SaveMd(di_base+di_index,LoadMd(si_base+si_index)); di_index=(di_index+add_index) & add_mask; @@ -150,14 +150,14 @@ } break; case R_LODSW: - add_index<<=1; + add_index *= 2; for (;count>0;count--) { reg_ax=LoadMw(si_base+si_index); si_index=(si_index+add_index) & add_mask; } break; case R_LODSD: - add_index<<=2; + add_index *= 4; for (;count>0;count--) { reg_eax=LoadMd(si_base+si_index); si_index=(si_index+add_index) & add_mask; @@ -177,7 +177,8 @@ break; case R_SCASW: { - add_index<<=1;Bit16u val2; + add_index *= 2; + Bit16u val2; for (;count>0;) { count--;CPU_Cycles--; val2=LoadMw(di_base+di_index); @@ -189,7 +190,8 @@ break; case R_SCASD: { - add_index<<=2;Bit32u val2; + add_index *= 4; + Bit32u val2; for (;count>0;) { count--;CPU_Cycles--; val2=LoadMd(di_base+di_index); @@ -215,7 +217,8 @@ break; case R_CMPSW: { - add_index<<=1;Bit16u val1,val2; + add_index *= 2; + Bit16u val1,val2; for (;count>0;) { count--;CPU_Cycles--; val1=LoadMw(si_base+si_index); @@ -229,7 +232,8 @@ break; case R_CMPSD: { - add_index<<=2;Bit32u val1,val2; + add_index *= 4; + Bit32u val1,val2; for (;count>0;) { count--;CPU_Cycles--; val1=LoadMd(si_base+si_index); diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/support.h dosbox-staging-0.77.0/src/cpu/core_normal/support.h --- dosbox-staging-0.76.0/src/cpu/core_normal/support.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/support.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal/table_ea.h dosbox-staging-0.77.0/src/cpu/core_normal/table_ea.h --- dosbox-staging-0.76.0/src/cpu/core_normal/table_ea.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal/table_ea.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/core_normal.cpp dosbox-staging-0.77.0/src/cpu/core_normal.cpp --- dosbox-staging-0.76.0/src/cpu/core_normal.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_normal.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -196,7 +196,7 @@ cpu.trap_skip = false; Bits ret=CPU_Core_Normal_Run(); - if (!cpu.trap_skip) CPU_HW_Interrupt(1); + if (!cpu.trap_skip) CPU_DebugException(DBINT_STEP,reg_eip); CPU_Cycles = oldCycles-1; cpudecoder = &CPU_Core_Normal_Run; diff -Nru dosbox-staging-0.76.0/src/cpu/core_prefetch.cpp dosbox-staging-0.77.0/src/cpu/core_prefetch.cpp --- dosbox-staging-0.76.0/src/cpu/core_prefetch.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_prefetch.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -301,7 +301,7 @@ cpu.trap_skip = false; Bits ret=CPU_Core_Prefetch_Run(); - if (!cpu.trap_skip) CPU_HW_Interrupt(1); + if (!cpu.trap_skip) CPU_DebugException(DBINT_STEP,reg_eip); CPU_Cycles = oldCycles-1; cpudecoder = &CPU_Core_Prefetch_Run; diff -Nru dosbox-staging-0.76.0/src/cpu/core_simple.cpp dosbox-staging-0.77.0/src/cpu/core_simple.cpp --- dosbox-staging-0.76.0/src/cpu/core_simple.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/core_simple.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -193,7 +193,7 @@ cpu.trap_skip = false; Bits ret=CPU_Core_Simple_Run(); - if (!cpu.trap_skip) CPU_HW_Interrupt(1); + if (!cpu.trap_skip) CPU_DebugException(DBINT_STEP,reg_eip); CPU_Cycles = oldCycles-1; cpudecoder = &CPU_Core_Simple_Run; diff -Nru dosbox-staging-0.76.0/src/cpu/cpu.cpp dosbox-staging-0.77.0/src/cpu/cpu.cpp --- dosbox-staging-0.76.0/src/cpu/cpu.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/cpu.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,12 +16,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "cpu.h" #include #include #include -#include "dosbox.h" -#include "cpu.h" + #include "memory.h" #include "debug.h" #include "mapper.h" @@ -538,6 +538,11 @@ return CPU_PrepareException(EXCEPTION_GP,0); } +void CPU_DebugException(Bit32u triggers,Bitu oldeip) { + cpu.drx[6] = (cpu.drx[6] & 0xFFFF1FF0) | triggers; + CPU_Interrupt(EXCEPTION_DB,CPU_INT_EXCEPTION,oldeip); +} + void CPU_Exception(Bitu which,Bitu error ) { // LOG_MSG("Exception %d error %x",which,error); cpu.exception.error=error; @@ -546,6 +551,10 @@ Bit8u lastint; void CPU_Interrupt(Bitu num,Bitu type,Bitu oldeip) { + if (num == EXCEPTION_DB && (type&CPU_INT_EXCEPTION) == 0) { + CPU_DebugException(0,oldeip); // DR6 bits need updating + return; + } lastint=num; FillFlags(); #if C_DEBUG @@ -2156,8 +2165,8 @@ } -extern Bit32s ticksDone; -extern Bit32u ticksScheduled; +extern int ticksDone; +extern int ticksScheduled; void CPU_Reset_AutoAdjust(void) { CPU_IODelayRemoved = 0; @@ -2165,7 +2174,7 @@ ticksScheduled = 0; } -class CPU: public Module_base { +class CPU final : public Module_base { private: static bool inited; public: @@ -2223,11 +2232,11 @@ #elif (C_DYNREC) CPU_Core_Dynrec_Init(); #endif - MAPPER_AddHandler(CPU_CycleDecrease, SDL_SCANCODE_F11, MMOD1, - "cycledown", "Dec Cycles"); - MAPPER_AddHandler(CPU_CycleIncrease, SDL_SCANCODE_F12, MMOD1, - "cycleup", "Inc Cycles"); - Change_Config(configuration); + MAPPER_AddHandler(CPU_CycleDecrease, SDL_SCANCODE_F11, + PRIMARY_MOD, "cycledown", "Dec Cycles"); + MAPPER_AddHandler(CPU_CycleIncrease, SDL_SCANCODE_F12, + PRIMARY_MOD, "cycleup", "Inc Cycles"); + Change_Config(configuration); CPU_JMP(false,0,0,0); //Setup the first cpu core } diff -Nru dosbox-staging-0.76.0/src/cpu/dyn_cache.h dosbox-staging-0.77.0/src/cpu/dyn_cache.h --- dosbox-staging-0.76.0/src/cpu/dyn_cache.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/dyn_cache.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include #include #include @@ -26,6 +27,23 @@ #include "paging.h" #include "types.h" +#if defined(HAVE_MMAP) +#include +#endif + +#if defined(HAVE_PTHREAD_WRITE_PROTECT_NP) +#include +#endif + +#if defined(HAVE_SYS_ICACHE_INVALIDATE) +#include +#endif + +#if defined(WIN32) +#include +#include +#endif + class CodePageHandler; // basic cache block representation @@ -49,7 +67,14 @@ } page; struct { - uint8_t *start; // where in the cache are we + // TODO field start used to be a normal pointer, but upstream + // changed it to const pointer in r4424 (perhaps by mistake or + // as WIP change). Once transition to W^X will be done, decide + // if this should be const pointer or not and remove this comment. + // + // uint8_t *start; // where in the cache are we + const uint8_t *start; // where in the cache are we + Bitu size; CacheBlock *next; // writemap masking maskpointer/start/length to allow holes in @@ -82,7 +107,14 @@ CacheBlock *running; // the last block that was entered for // execution } block; - uint8_t *pos; // position in the cache block + + // TODO field pos used to be a normal pointer, but upstream + // changed it to const pointer in r4424 (perhaps by mistake or as WIP + // change). Once transition to W^X will be done, decide if this + // should be const pointer or not and remove this comment. + // + //uint8_t *pos; // position in the cache block + const uint8_t *pos; // position in the cache block CodePageHandler *free_pages; // pointer to the free list CodePageHandler *used_pages; // pointer to the list of used pages CodePageHandler *last_page; // the last used page @@ -98,7 +130,7 @@ // the CodePageHandler class provides access to the contained // cache blocks and intercepts writes to the code for special treatment -class CodePageHandler : public PageHandler { +class CodePageHandler final : public PageHandler { public: CodePageHandler() = default; @@ -178,9 +210,10 @@ void writeb(PhysPt addr, Bitu val) override { - assert((old_pagehandler->flags & PFLAG_HASROM) == 0x0); - assert(old_pagehandler->flags & PFLAG_READABLE); - + if (GCC_UNLIKELY(old_pagehandler->flags&PFLAG_HASROM)) return; + if (GCC_UNLIKELY((old_pagehandler->flags&PFLAG_READABLE)!=PFLAG_READABLE)) { + E_Exit("wb:non-readable code page found that is no ROM page"); + } addr&=4095; if (host_readb(hostmem+addr)==(Bit8u)val) return; host_writeb(hostmem+addr,val); @@ -202,9 +235,10 @@ void writew(PhysPt addr, Bitu val) override { - assert((old_pagehandler->flags & PFLAG_HASROM) == 0x0); - assert(old_pagehandler->flags & PFLAG_READABLE); - + if (GCC_UNLIKELY(old_pagehandler->flags&PFLAG_HASROM)) return; + if (GCC_UNLIKELY((old_pagehandler->flags&PFLAG_READABLE)!=PFLAG_READABLE)) { + E_Exit("ww:non-readable code page found that is no ROM page"); + } addr&=4095; if (host_readw(hostmem+addr)==(Bit16u)val) return; host_writew(hostmem+addr,val); @@ -226,9 +260,10 @@ void writed(PhysPt addr, Bitu val) override { - assert((old_pagehandler->flags & PFLAG_HASROM) == 0x0); - assert(old_pagehandler->flags & PFLAG_READABLE); - + if (GCC_UNLIKELY(old_pagehandler->flags&PFLAG_HASROM)) return; + if (GCC_UNLIKELY((old_pagehandler->flags&PFLAG_READABLE)!=PFLAG_READABLE)) { + E_Exit("wd:non-readable code page found that is no ROM page"); + } addr&=4095; if (host_readd(hostmem+addr)==(Bit32u)val) return; host_writed(hostmem+addr,val); @@ -250,9 +285,10 @@ bool writeb_checked(PhysPt addr, Bitu val) override { - assert((old_pagehandler->flags & PFLAG_HASROM) == 0x0); - assert(old_pagehandler->flags & PFLAG_READABLE); - + if (GCC_UNLIKELY(old_pagehandler->flags&PFLAG_HASROM)) return false; + if (GCC_UNLIKELY((old_pagehandler->flags&PFLAG_READABLE)!=PFLAG_READABLE)) { + E_Exit("cb:non-readable code page found that is no ROM page"); + } addr&=4095; if (host_readb(hostmem+addr)==(Bit8u)val) return false; // see if there's code where we are writing to @@ -279,9 +315,10 @@ bool writew_checked(PhysPt addr, Bitu val) override { - assert((old_pagehandler->flags & PFLAG_HASROM) == 0x0); - assert(old_pagehandler->flags & PFLAG_READABLE); - + if (GCC_UNLIKELY(old_pagehandler->flags&PFLAG_HASROM)) return false; + if (GCC_UNLIKELY((old_pagehandler->flags&PFLAG_READABLE)!=PFLAG_READABLE)) { + E_Exit("cw:non-readable code page found that is no ROM page"); + } addr&=4095; if (host_readw(hostmem+addr)==(Bit16u)val) return false; // see if there's code where we are writing to @@ -308,9 +345,10 @@ bool writed_checked(PhysPt addr, Bitu val) override { - assert((old_pagehandler->flags & PFLAG_HASROM) == 0x0); - assert(old_pagehandler->flags & PFLAG_READABLE); - + if (GCC_UNLIKELY(old_pagehandler->flags&PFLAG_HASROM)) return false; + if (GCC_UNLIKELY((old_pagehandler->flags&PFLAG_READABLE)!=PFLAG_READABLE)) { + E_Exit("cd:non-readable code page found that is no ROM page"); + } addr&=4095; if (host_readd(hostmem+addr)==(Bit32u)val) return false; // see if there's code where we are writing to @@ -412,14 +450,15 @@ void ClearRelease() { // clear out all cache blocks in this page - for (Bitu index=0;index<(1+DYN_PAGE_HASH);index++) { - CacheBlock *block = hash_map[index]; - while (block) { - CacheBlock *nextblock = block->hash.next; - block->page.handler = 0; // no need, full clear - block->Clear(); - block=nextblock; - } + Bitu count=active_blocks; + CacheBlock **map=hash_map; + for (CacheBlock * block=*map;count;count--) { + while (block==NULL) + block=*++map; + CacheBlock * nextblock=block->hash.next; + block->page.handler=0; // no need, full clear + block->Clear(); + block=nextblock; } Release(); // now can release this page } @@ -617,31 +656,65 @@ } } +// TODO functions cache_addb, cache_addw, cache_addd, cache_addq definitely +// should NOT use const pointer pos (because they treat this point as writable +// destination), but upstream made it a const pointer in r4424 (perhaps by +// mistake or as WIP change) and relies on silently C-casting the constness +// away. +// +// Replaced silent C-casting with explicit const-casting; when upstream will +// revert this change bring back the previous version and remove this comment. +// + // place an 8bit value into the cache + +static INLINE void cache_addb(uint8_t val, const uint8_t *pos) +{ + *const_cast(pos) = val; +} + static inline void cache_addb(uint8_t val) { - *cache.pos = val; + cache_addb(val, cache.pos); cache.pos += sizeof(uint8_t); } // place a 16bit value into the cache + +static INLINE void cache_addw(uint16_t val, const uint8_t *pos) +{ + write_unaligned_uint16(const_cast(pos), val); +} + static inline void cache_addw(uint16_t val) { - write_unaligned_uint16(cache.pos, val); + cache_addw(val, cache.pos); cache.pos += sizeof(uint16_t); } // place a 32bit value into the cache + +static INLINE void cache_addd(uint32_t val, const uint8_t *pos) +{ + write_unaligned_uint32(const_cast(pos), val); +} + static inline void cache_addd(uint32_t val) { - write_unaligned_uint32(cache.pos, val); + cache_addd(val, cache.pos); cache.pos += sizeof(uint32_t); } // place a 64bit value into the cache + +static INLINE void cache_addq(uint64_t val, const uint8_t *pos) +{ + write_unaligned_uint64(const_cast(pos), val); +} + static inline void cache_addq(uint64_t val) { - write_unaligned_uint64(cache.pos, val); + cache_addq(val, cache.pos); cache.pos += sizeof(uint64_t); } @@ -651,16 +724,77 @@ static void dyn_return(BlockReturn retcode, bool ret_exception); static void dyn_run_code(); static void cache_block_before_close(); -static void cache_block_closing(uint8_t *block_start, Bitu block_size); +static void cache_block_closing(const uint8_t *block_start, Bitu block_size); #endif /* Define temporary pagesize so the MPROTECT case and the regular case share as much code as possible */ -#if (C_HAVE_MPROTECT) +#if defined(HAVE_MPROTECT) || defined(HAVE_MMAP) #define PAGESIZE_TEMP PAGESIZE #else #define PAGESIZE_TEMP 4096 #endif +static constexpr size_t cache_code_size = CACHE_TOTAL + CACHE_MAXSIZE + PAGESIZE_TEMP - 1 + PAGESIZE_TEMP; +static constexpr size_t cache_blocks_total_bytes = CACHE_BLOCKS * sizeof(CacheBlock); + +static inline void dyn_mem_execute(MAYBE_UNUSED void* ptr, MAYBE_UNUSED size_t size) +{ +#if defined(HAVE_PTHREAD_WRITE_PROTECT_NP) +#if defined(HAVE_BUILTIN_AVAILABLE) + if (__builtin_available(macOS 11.0, *)) +#endif + pthread_jit_write_protect_np(true); +#elif defined(HAVE_MPROTECT) + ptr = reinterpret_cast(reinterpret_cast(ptr) - reinterpret_cast(ptr) % PAGESIZE); + MAYBE_UNUSED const int mp_res = mprotect(ptr, size, + PROT_READ | PROT_EXEC); + assert(mp_res == 0); +#elif defined(WIN32) + DWORD old_protect = 0; + MAYBE_UNUSED const BOOL vp_res = VirtualProtect(ptr, + size, + PAGE_EXECUTE_READ, + &old_protect); + assert(vp_res != 0); +#endif +} + +static inline void dyn_mem_write(MAYBE_UNUSED void *ptr, MAYBE_UNUSED size_t size) +{ +#if defined(HAVE_PTHREAD_WRITE_PROTECT_NP) +#if defined(HAVE_BUILTIN_AVAILABLE) + if (__builtin_available(macOS 11.0, *)) +#endif + pthread_jit_write_protect_np(false); +#elif defined(HAVE_MPROTECT) + ptr = reinterpret_cast(reinterpret_cast(ptr) - reinterpret_cast(ptr) % PAGESIZE); + MAYBE_UNUSED const int mp_res = mprotect(ptr, size, + PROT_READ | PROT_WRITE); + assert(mp_res == 0); +#elif defined(WIN32) + DWORD old_protect = 0; + MAYBE_UNUSED const BOOL vp_res = VirtualProtect(ptr, + size, + PAGE_READWRITE, + &old_protect); + assert(vp_res != 0); +#endif +} + +static inline void dyn_cache_invalidate(MAYBE_UNUSED void *ptr, MAYBE_UNUSED size_t size) +{ +#if defined(HAVE_SYS_ICACHE_INVALIDATE) +#if defined(HAVE_BUILTIN_AVAILABLE) + if (__builtin_available(macOS 11.0, *)) +#endif + sys_icache_invalidate(ptr, size); +#elif defined(__GNUC__) + __builtin___clear_cache(static_cast(ptr), reinterpret_cast(reinterpret_cast(ptr) + size)); +#elif defined(WIN32) + FlushInstructionCache(GetCurrentProcess(), ptr, size); +#endif +} + static bool cache_initialized = false; static void cache_init(bool enable) { @@ -669,13 +803,12 @@ // see if cache is already initialized if (cache_initialized) return; cache_initialized = true; - if (cache_blocks == NULL) { + if (cache_blocks == nullptr) { // allocate the cache blocks memory - cache_blocks = (CacheBlock *)malloc(CACHE_BLOCKS * - sizeof(CacheBlock)); + cache_blocks = static_cast(malloc(cache_blocks_total_bytes)); if (!cache_blocks) E_Exit("Allocating cache_blocks has failed"); - memset(cache_blocks, 0, sizeof(CacheBlock) * CACHE_BLOCKS); + memset(cache_blocks, 0, cache_blocks_total_bytes); cache.block.free=&cache_blocks[0]; // initialize the cache blocks for (i=0;i( + VirtualAlloc(nullptr, cache_code_size, + MEM_COMMIT, + PAGE_READWRITE)); + if (!cache_code_start_ptr) { + LOG_MSG("VirtualAlloc error, using malloc"); + cache_code_start_ptr=static_cast(malloc(cache_code_size)); + } +#elif defined(HAVE_MMAP) + int map_flags = MAP_PRIVATE | MAP_ANON; + int prot_flags = PROT_READ | PROT_WRITE | PROT_EXEC; +#if defined(HAVE_MAP_JIT) + map_flags |= MAP_JIT; #endif - if (!cache_code_start_ptr) + cache_code_start_ptr=static_cast(mmap(nullptr, cache_code_size, prot_flags, map_flags, -1, 0)); + if (cache_code_start_ptr == MAP_FAILED) { + E_Exit("Allocating dynamic core cache memory failed with errno %d", errno); + } +#else + cache_code_start_ptr=static_cast(malloc(cache_code_size)); + if (!cache_code_start_ptr) { E_Exit("Allocating dynamic core cache memory failed"); - + } +#endif // align the cache at a page boundary - cache_code = (Bit8u *)(((Bitu)cache_code_start_ptr + - PAGESIZE_TEMP - 1) & - ~(PAGESIZE_TEMP - 1)); // Bitu is - // same size - // as a - // pointer. + cache_code = reinterpret_cast( + (reinterpret_cast(cache_code_start_ptr) + + PAGESIZE_TEMP - 1) & ~(PAGESIZE_TEMP - 1)); cache_code_link_blocks=cache_code; - cache_code += PAGESIZE_TEMP; - -#if (C_HAVE_MPROTECT) - if(mprotect(cache_code_link_blocks,CACHE_TOTAL+CACHE_MAXSIZE+PAGESIZE_TEMP,PROT_WRITE|PROT_READ|PROT_EXEC)) - LOG_MSG("Setting execute permission on the code cache has failed"); -#endif + cache_code=cache_code+PAGESIZE_TEMP; CacheBlock *block = cache_getblock(); cache.block.first=block; cache.block.active=block; @@ -721,38 +860,27 @@ } // setup the default blocks for block linkage returns cache.pos=&cache_code_link_blocks[0]; -#if (C_DYNAMIC_X86) link_blocks[0].cache.start=cache.pos; - gen_return(BR_Link1); + + auto cache_addr = static_cast(cache_code); + constexpr size_t cache_bytes = CACHE_MAXSIZE; + + dyn_mem_write(cache_addr, cache_bytes); + // link code that returns with a special return code + dyn_return(BR_Link1,false); cache.pos=&cache_code_link_blocks[32]; link_blocks[1].cache.start=cache.pos; - gen_return(BR_Link2); -#elif (C_DYNREC) - core_dynrec.runcode = (BlockReturn(*)(uint8_t *))cache.pos; - // can use op to PAGESIZE_TEMP-64 bytes - dyn_run_code(); - cache_block_before_close(); - cache_block_closing(cache_code_link_blocks, - cache.pos - cache_code_link_blocks); - - cache.pos = &cache_code_link_blocks[PAGESIZE_TEMP - 64]; - link_blocks[0].cache.start = cache.pos; // link code that returns with a special return code - // must be less than 32 bytes - dyn_return(BR_Link1, false); - cache_block_before_close(); - cache_block_closing(link_blocks[0].cache.start, - cache.pos - link_blocks[0].cache.start); + dyn_return(BR_Link2,false); - cache.pos = &cache_code_link_blocks[PAGESIZE_TEMP - 32]; - link_blocks[1].cache.start = cache.pos; - // link code that returns with a special return code - // must be less than 32 bytes - dyn_return(BR_Link2, false); - cache_block_before_close(); - cache_block_closing(link_blocks[1].cache.start, - cache.pos - link_blocks[1].cache.start); +#if (C_DYNREC) + cache.pos=&cache_code_link_blocks[64]; + core_dynrec.runcode=(BlockReturn (*)(const Bit8u*))cache.pos; +// link_blocks[1].cache.start=cache.pos; + dyn_run_code(); #endif + dyn_mem_execute(cache_addr, cache_bytes); + dyn_cache_invalidate(cache_addr, cache_bytes); cache.free_pages=0; cache.last_page=0; diff -Nru dosbox-staging-0.76.0/src/cpu/flags.cpp dosbox-staging-0.77.0/src/cpu/flags.cpp --- dosbox-staging-0.76.0/src/cpu/flags.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/flags.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -116,9 +116,10 @@ case t_TESTw: case t_TESTd: return false; /* Set to false */ - case t_DIV: return false; /* Unknown */ + case t_DIV: + return false; /* Unknown */ default: - LOG(LOG_CPU,LOG_ERROR)("get_CF Unknown %d",lflags.type); + LOG(LOG_CPU,LOG_ERROR)("get_CF Unknown %" sBitfs(d),lflags.type); } return 0; } @@ -197,9 +198,10 @@ case t_DSHRw: case t_DSHRd: case t_DIV: - case t_MUL: return false; /* Unknown */ + case t_MUL: + return false; /* Unknown */ default: - LOG(LOG_CPU,LOG_ERROR)("get_AF Unknown %d",lflags.type); + LOG(LOG_CPU,LOG_ERROR)("get_AF Unknown %" sBitfs(d),lflags.type); } return 0; } @@ -265,9 +267,10 @@ case t_NEGd: return (lf_resd==0); case t_DIV: - case t_MUL: return false; /* Unknown */ + case t_MUL: + return false; /* Unknown */ default: - LOG(LOG_CPU,LOG_ERROR)("get_ZF Unknown %d",lflags.type); + LOG(LOG_CPU,LOG_ERROR)("get_ZF Unknown %" sBitfs(d),lflags.type); } return false; } @@ -332,8 +335,10 @@ case t_NEGd: return (lf_resd&0x80000000); case t_DIV: - case t_MUL: return false; /* Unknown */ - default: LOG(LOG_CPU, LOG_ERROR)("get_SF Unknown %d", lflags.type); + case t_MUL: + return false; /* Unknown */ + default: + LOG(LOG_CPU,LOG_ERROR)("get_SF Unknown %" sBitfs(d),lflags.type); } return false; @@ -418,8 +423,10 @@ case t_SARw: case t_SARd: return false; /* Return false */ - case t_DIV: return false; /* Unknown */ - default: LOG(LOG_CPU, LOG_ERROR)("get_OF Unknown %d", lflags.type); + case t_DIV: + return false; /* Unknown */ + default: + LOG(LOG_CPU,LOG_ERROR)("get_OF Unknown %" sBitfs(d),lflags.type); } return false; } @@ -867,7 +874,7 @@ break; default: - LOG(LOG_CPU,LOG_ERROR)("Unhandled flag type %d",lflags.type); + LOG(LOG_CPU,LOG_ERROR)("Unhandled flag type %" sBitfs(d),lflags.type); return 0; } lflags.type=t_UNKNOWN; @@ -1168,7 +1175,7 @@ break; default: - LOG(LOG_CPU,LOG_ERROR)("Unhandled flag type %d",lflags.type); + LOG(LOG_CPU,LOG_ERROR)("Unhandled flag type %" sBitfs(d),lflags.type); break; } lflags.type=t_UNKNOWN; diff -Nru dosbox-staging-0.76.0/src/cpu/.gitignore dosbox-staging-0.77.0/src/cpu/.gitignore --- dosbox-staging-0.76.0/src/cpu/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/cpu/instructions.h dosbox-staging-0.77.0/src/cpu/instructions.h --- dosbox-staging-0.76.0/src/cpu/instructions.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/instructions.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/lazyflags.h dosbox-staging-0.77.0/src/cpu/lazyflags.h --- dosbox-staging-0.76.0/src/cpu/lazyflags.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/lazyflags.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/Makefile.am dosbox-staging-0.77.0/src/cpu/Makefile.am --- dosbox-staging-0.76.0/src/cpu/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -SUBDIRS = \ - core_dynrec \ - core_dyn_x86 \ - core_full \ - core_normal - -noinst_LIBRARIES = libcpu.a - -libcpu_a_SOURCES = \ - callback.cpp \ - core_dynrec.cpp \ - core_dyn_x86.cpp \ - core_full.cpp \ - core_normal.cpp \ - core_prefetch.cpp \ - core_simple.cpp \ - cpu.cpp \ - dyn_cache.h \ - flags.cpp \ - instructions.h \ - lazyflags.h \ - modrm.cpp \ - modrm.h \ - paging.cpp diff -Nru dosbox-staging-0.76.0/src/cpu/meson.build dosbox-staging-0.77.0/src/cpu/meson.build --- dosbox-staging-0.76.0/src/cpu/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,75 @@ +# prepare configuration for dynrec core +# +# host_machine is a machine we're building for; meson reference: +# https://mesonbuild.com/Reference-manual.html#host_machine-object +# https://mesonbuild.com/Reference-tables.html#cpu-families +# +conf_data.set('C_TARGETCPU', 'UNKNOWN') +conf_data.set('C_UNALIGNED_MEMORY', 0) + +core_selection = [ +# cpu_family selected_core dynrec_define target unaligned_mem + [ 'x86_64', ['auto', 'dyn-x86'], 'C_DYNAMIC_X86', 'X86_64', 1 ], + [ 'x86', ['auto', 'dyn-x86'], 'C_DYNAMIC_X86', 'X86', 1 ], + [ 'x86_64', ['dynrec'], 'C_DYNREC', 'X86_64', 1 ], + [ 'x86', ['dynrec'], 'C_DYNREC', 'X86', 1 ], + [ 'aarch64', ['auto', 'dynrec'], 'C_DYNREC', 'ARMV8LE', 1 ], + [ 'arm', ['auto', 'dynrec'], 'C_DYNREC', 'ARMV7LE', 1 ], +# [ ??? ['auto', 'dynrec'], 'C_DYNREC', 'ARMV4LE', 0 ], # ARMv6 or older (?) +# [ 'ppc64', ['auto', 'dynrec'], 'C_DYNREC', 'PPC64LE', 1 ], # for meson >= 0.47.2 # SVN r4424 broke compilation of PPC64 backend +# [ 'ppc64le', ['auto', 'dynrec'], 'C_DYNREC', 'PPC64LE', 1 ], # for meson < 0.47.2 # SVN r4424 broke compilation of PPC64 backend +# [ 'ppc', ['auto', 'dynrec'], 'C_DYNREC', 'POWERPC', 1 ], # SVN r4424 broke compilation of PPC backend +# [ 'mips', ['auto', 'dynrec'], 'C_DYNREC', 'MIPSEL', ? ], # disabled in old buildsystem, but code is still there +] + +selected_core = get_option('dynamic_core') + +foreach line : core_selection + cpu_family = line[0] + opts_for_arch = line[1] + dynrec_define = line[2] + target_cpu = line[3] + unaligned_mem = line[4] + if (host_machine.cpu_family() == cpu_family) and opts_for_arch.contains(selected_core) + conf_data.set('C_TARGETCPU', target_cpu) + conf_data.set('C_UNALIGNED_MEMORY', unaligned_mem) + conf_data.set(dynrec_define, 1) + endif +endforeach + +if conf_data.has('C_DYNAMIC_X86') + message('Building dynamic core optimized for x86/x86_64 (dyn-x86) ' + + 'for ' + conf_data.get('C_TARGETCPU')) +elif conf_data.has('C_DYNREC') + message('Building dynamic core (dynrec) ' + + 'for ' + conf_data.get('C_TARGETCPU')) +else + warning('Building without dynamic core support') +endif + +message('Building for @0@-endian architecture'.format(host_machine.endian())) + + +# cpu module sources +# +libcpu_sources = files([ + 'callback.cpp', + 'core_normal.cpp', + 'core_prefetch.cpp', + 'core_simple.cpp', + 'flags.cpp', + 'modrm.cpp', + 'core_dyn_x86.cpp', + 'core_full.cpp', + 'cpu.cpp', + 'paging.cpp', + 'core_dynrec.cpp', +]) + +libcpu = static_library('cpu', libcpu_sources, + include_directories : incdir, + dependencies : sdl2_dep) + +libcpu_dep = declare_dependency(link_with : libcpu) + +internal_deps += libcpu_dep diff -Nru dosbox-staging-0.76.0/src/cpu/modrm.cpp dosbox-staging-0.77.0/src/cpu/modrm.cpp --- dosbox-staging-0.76.0/src/cpu/modrm.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/modrm.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/modrm.h dosbox-staging-0.77.0/src/cpu/modrm.h --- dosbox-staging-0.76.0/src/cpu/modrm.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/modrm.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/cpu/paging.cpp dosbox-staging-0.77.0/src/cpu/paging.cpp --- dosbox-staging-0.76.0/src/cpu/paging.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/cpu/paging.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -241,7 +241,7 @@ } -class InitPageHandler : public PageHandler { +class InitPageHandler final : public PageHandler { public: InitPageHandler() { flags=PFLAG_INIT|PFLAG_NOCODE; @@ -470,7 +470,7 @@ } }; -class InitPageUserROHandler : public PageHandler { +class InitPageUserROHandler final : public PageHandler { public: InitPageUserROHandler() { flags=PFLAG_INIT|PFLAG_NOCODE; @@ -870,7 +870,7 @@ return paging.enabled; } -class PAGING:public Module_base{ +class PAGING final : public Module_base{ public: PAGING(Section* configuration):Module_base(configuration){ /* Setup default Page Directory, force it to update */ diff -Nru dosbox-staging-0.76.0/src/debug/debug.cpp dosbox-staging-0.77.0/src/debug/debug.cpp --- dosbox-staging-0.76.0/src/debug/debug.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/debug/debug.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include "dosbox.h" + #if C_DEBUG #include @@ -42,6 +42,7 @@ #include "mixer.h" #include "timer.h" #include "paging.h" +#include "string_utils.h" #include "support.h" #include "shell.h" #include "programs.h" @@ -77,7 +78,7 @@ Bit32u GetHexValue(char* str, char*& hex); #if 0 -class DebugPageHandler : public PageHandler { +class DebugPageHandler final : public PageHandler { public: Bitu readb(PhysPt /*addr*/) { } @@ -134,8 +135,8 @@ } } -#define MAXCMDLEN 254 -struct SCodeViewData { +#define MAXCMDLEN 254 +struct SCodeViewData { int cursorPos; Bit16u firstInstSize; Bit16u useCS; @@ -266,7 +267,7 @@ bool hasvalue; Bit16u value; -public: +public: static void InsertVariable(char* name, PhysPt adr); static CDebugVar* FindVar (PhysPt adr); static void DeleteAll (); @@ -305,14 +306,14 @@ bool IsActive (void) { return active; }; void Activate (bool _active); - EBreakpoint GetType (void) { return type; }; - bool GetOnce (void) { return once; }; - PhysPt GetLocation (void) { return location; }; - Bit16u GetSegment (void) { return segment; }; - Bit32u GetOffset (void) { return offset; }; - Bit8u GetIntNr (void) { return intNr; }; - Bit16u GetValue (void) { return ahValue; }; - Bit16u GetOther (void) { return alValue; }; + EBreakpoint GetType() const noexcept { return type; } + bool GetOnce() const noexcept { return once; } + PhysPt GetLocation() const noexcept { return location; } + uint16_t GetSegment() const noexcept { return segment; } + uint32_t GetOffset() const noexcept { return offset; } + uint8_t GetIntNr() const noexcept { return intNr; } + uint16_t GetValue() const noexcept { return ahValue; } + uint16_t GetOther() const noexcept { return alValue; } // statics static CBreakpoint* AddBreakpoint (Bit16u seg, Bit32u off, bool once); @@ -349,13 +350,16 @@ bool once; static std::list BPoints; +#if C_HEAVY_DEBUG + friend bool DEBUG_HeavyIsBreakpoint(void); +#endif }; CBreakpoint::CBreakpoint(void): +type(BKPNT_UNKNOWN), location(0),oldData(0xCC), -active(false),once(false), segment(0),offset(0),intNr(0),ahValue(0),alValue(0), -type(BKPNT_UNKNOWN) { }; +active(false),once(false){ }; void CBreakpoint::Activate(bool _active) { @@ -457,19 +461,19 @@ }; }; -bool CBreakpoint::CheckBreakpoint(Bitu seg, Bitu off) // Checks if breakpoint is valid and should stop execution +bool CBreakpoint::CheckBreakpoint(Bitu seg, Bitu off) { // Quick exit if there are no breakpoints if (BPoints.empty()) return false; // Search matching breakpoint - std::list::iterator i; - CBreakpoint* bp; - for(i=BPoints.begin(); i != BPoints.end(); ++i) { - bp = (*i); - if ((bp->GetType()==BKPNT_PHYSICAL) && bp->IsActive() && (bp->GetSegment()==seg) && (bp->GetOffset()==off)) { - // Found, + for (auto i = BPoints.begin(); i != BPoints.end(); ++i) { + CBreakpoint *bp = (*i); + + if ((bp->GetType() == BKPNT_PHYSICAL) && bp->IsActive() && + (bp->GetLocation() == GetAddress(seg, off))) { + // Found if (bp->GetOnce()) { // delete it, if it should only be used once (BPoints.erase)(i); @@ -485,7 +489,7 @@ } } return true; - } + } #if C_HEAVY_DEBUG // Memory breakpoint support else if (bp->IsActive()) { @@ -510,13 +514,13 @@ DEBUG_ShowMsg("DEBUG: Memory breakpoint %s: %04X:%04X - %02X -> %02X\n",(bp->GetType()==BKPNT_MEMORY_PROT)?"(Prot)":"",bp->GetSegment(),bp->GetOffset(),bp->GetValue(),value); bp->SetValue(value); return true; - }; - } - }; + } + } + } #endif - }; + } return false; -}; +} bool CBreakpoint::CheckIntBreakpoint(PhysPt adr, Bit8u intNr, Bit16u ahValue, Bit16u alValue) // Checks if interrupt breakpoint is valid and should stop execution @@ -545,7 +549,7 @@ return false; }; -void CBreakpoint::DeleteAll() +void CBreakpoint::DeleteAll() { std::list::iterator i; CBreakpoint* bp; @@ -558,7 +562,7 @@ }; -bool CBreakpoint::DeleteByIndex(Bit16u index) +bool CBreakpoint::DeleteByIndex(Bit16u index) { // Search matching breakpoint int nr = 0; @@ -635,7 +639,7 @@ void CBreakpoint::ShowList(void) { - // iterate list + // iterate list int nr = 0; std::list::iterator i; for(i=BPoints.begin(); i != BPoints.end(); ++i) { @@ -713,7 +717,7 @@ /********************/ static void DrawData(void) { - + Bit8u ch; Bit32u add = dataOfs; Bit32u address; @@ -728,11 +732,18 @@ mvwprintw (dbg.win_data,y,14+3*x,"%02X",ch); if (showPrintable) { if (ch<32 || !isprint(*reinterpret_cast(&ch))) ch='.'; - mvwprintw (dbg.win_data,y,63+x,"%c",ch); - } else mvwaddch(dbg.win_data,y,63+x,ch); + mvwaddch (dbg.win_data,y,63+x,ch); + } else { +#ifdef __PDCURSES__ + mvwaddrawch (dbg.win_data,y,63+x,ch); +#else + if (ch<32) ch='.'; + mvwaddch (dbg.win_data,y,63+x,ch); +#endif + } add++; }; - } + } wrefresh(dbg.win_data); }; @@ -748,7 +759,7 @@ SetColor(reg_ebp!=oldregs.ebp);oldregs.ebp=reg_ebp;mvwprintw (dbg.win_reg,2,18,"%08X",reg_ebp); SetColor(reg_esp!=oldregs.esp);oldregs.esp=reg_esp;mvwprintw (dbg.win_reg,3,18,"%08X",reg_esp); SetColor(reg_eip!=oldregs.eip);oldregs.eip=reg_eip;mvwprintw (dbg.win_reg,1,42,"%08X",reg_eip); - + SetColor(SegValue(ds)!=oldsegs[ds].val);oldsegs[ds].val=SegValue(ds);mvwprintw (dbg.win_reg,0,31,"%04X",SegValue(ds)); SetColor(SegValue(es)!=oldsegs[es].val);oldsegs[es].val=SegValue(es);mvwprintw (dbg.win_reg,0,41,"%04X",SegValue(es)); SetColor(SegValue(fs)!=oldsegs[fs].val);oldsegs[fs].val=SegValue(fs);mvwprintw (dbg.win_reg,0,51,"%04X",SegValue(fs)); @@ -793,7 +804,7 @@ if (reg_flags & FLAG_VM) mvwprintw(dbg.win_reg,0,76,"VM86"); else if (cpu.code.big) mvwprintw(dbg.win_reg,0,76,"Pr32"); else mvwprintw(dbg.win_reg,0,76,"Pr16"); - } else + } else mvwprintw(dbg.win_reg,0,76,"Real"); // Selector info, if available @@ -810,19 +821,19 @@ }; static void DrawCode(void) { - bool saveSel; + bool saveSel; Bit32u disEIP = codeViewData.useEIP; PhysPt start = GetAddress(codeViewData.useCS,codeViewData.useEIP); char dline[200];Bitu size;Bitu c; static char line20[21] = " "; - + for (int i=0;i<10;i++) { saveSel = false; if (has_colors()) { if ((codeViewData.useCS==SegValue(cs)) && (disEIP == reg_eip)) { - wattrset(dbg.win_code,COLOR_PAIR(PAIR_GREEN_BLACK)); + wattrset(dbg.win_code,COLOR_PAIR(PAIR_GREEN_BLACK)); if (codeViewData.cursorPos==-1) { - codeViewData.cursorPos = i; // Set Cursor + codeViewData.cursorPos = i; // Set Cursor } if (i == codeViewData.cursorPos) { codeViewData.cursorSeg = SegValue(cs); @@ -830,14 +841,14 @@ } saveSel = (i == codeViewData.cursorPos); } else if (i == codeViewData.cursorPos) { - wattrset(dbg.win_code,COLOR_PAIR(PAIR_BLACK_GREY)); + wattrset(dbg.win_code,COLOR_PAIR(PAIR_BLACK_GREY)); codeViewData.cursorSeg = codeViewData.useCS; codeViewData.cursorOfs = disEIP; saveSel = true; } else if (CBreakpoint::IsBreakpoint(codeViewData.useCS, disEIP)) { - wattrset(dbg.win_code,COLOR_PAIR(PAIR_GREY_RED)); + wattrset(dbg.win_code,COLOR_PAIR(PAIR_GREY_RED)); } else { - wattrset(dbg.win_code,0); + wattrset(dbg.win_code,0); } } @@ -845,7 +856,7 @@ Bitu drawsize=size=DasmI386(dline, start, disEIP, cpu.code.big); bool toolarge = false; mvwprintw(dbg.win_code,i,0,"%04X:%04X ",codeViewData.useCS,disEIP); - + if (drawsize>10) { toolarge = true; drawsize = 9; }; for (c=0;c %s%c", (codeViewData.ovrMode?'O':'I'),dispPtr,(*curPtr?' ':'_')); @@ -902,7 +912,7 @@ mvwchgat(dbg.win_code,10,0,3,0,(PAIR_BLACK_GREY),NULL); if (*curPtr) { mvwchgat(dbg.win_code,10,(curPtr-dispPtr+4),1,0,(PAIR_BLACK_GREY),NULL); - } + } } wattrset(dbg.win_code,0); @@ -914,7 +924,7 @@ if ((SegValue(cs)==codeViewData.useCS) && (reg_eip>=codeViewData.useEIP) && (reg_eip<=codeViewData.useEIPlast)) { // in valid window - scroll ? if (reg_eip>=codeViewData.useEIPmid) codeViewData.useEIP += codeViewData.firstInstSize; - + } else { // totally out of range. codeViewData.useCS = SegValue(cs); @@ -960,8 +970,8 @@ while (*hex) { if ((*hex >= '0') && (*hex <= '9')) value = (value<<4) + *hex - '0'; - else if ((*hex >= 'A') && (*hex <= 'F')) value = (value<<4) + *hex - 'A' + 10; - else { + else if ((*hex >= 'A') && (*hex <= 'F')) value = (value<<4) + *hex - 'A' + 10; + else { if (*hex == '+') {hex++;return regval + value + GetHexValue(hex,hex); } else if (*hex == '-') {hex++;return regval + value - GetHexValue(hex,hex); } else break; // No valid char @@ -1047,7 +1057,7 @@ Bit32u ofs = (Bit16u)GetHexValue(found,found); found++; char name[16]; for (int i=0; i<16; i++) { - if (found[i] && (found[i]!=' ')) name[i] = found[i]; + if (found[i] && (found[i]!=' ')) name[i] = found[i]; else { name[i] = 0; break; }; }; name[15] = 0; @@ -1061,7 +1071,7 @@ if (command == "SV") { // Save variables char name[13]; for (int i=0; i<12; i++) { - if (found[i] && (found[i]!=' ')) name[i] = found[i]; + if (found[i] && (found[i]!=' ')) name[i] = found[i]; else { name[i] = 0; break; }; }; name[12] = 0; @@ -1073,7 +1083,7 @@ if (command == "LV") { // load variables char name[13]; for (int i=0; i<12; i++) { - if (found[i] && (found[i]!=' ')) name[i] = found[i]; + if (found[i] && (found[i]!=' ')) name[i] = found[i]; else { name[i] = 0; break; }; }; name[12] = 0; @@ -1177,11 +1187,11 @@ }; if (command == "BPDEL") { // Delete Breakpoints - Bit8u bpNr = (Bit8u)GetHexValue(found,found); + Bit8u bpNr = (Bit8u)GetHexValue(found,found); if ((bpNr==0x00) && (*found=='*')) { // Delete all - CBreakpoint::DeleteAll(); + CBreakpoint::DeleteAll(); DEBUG_ShowMsg("DEBUG: Breakpoints deleted.\n"); - } else { + } else { // delete single breakpoint DEBUG_ShowMsg("DEBUG: Breakpoint deletion %s.\n",(CBreakpoint::DeleteByIndex(bpNr)?"success":"failure")); } @@ -1265,7 +1275,7 @@ DOSBOX_SetNormalLoop(); CPU_HW_Interrupt(intNr); return true; - }; + }; if (command == "SELINFO") { while (found[0] == ' ') found++; @@ -1282,11 +1292,11 @@ } if (command == "GDT") {LogGDT(); return true;} - + if (command == "LDT") {LogLDT(); return true;} - + if (command == "IDT") {LogIDT(); return true;} - + if (command == "PAGING") {LogPages(found); return true;} if (command == "CPU") {LogCPUInfo(); return true;} @@ -1309,7 +1319,7 @@ } }; - if(command == "EXTEND") { //Toggle additional data. + if(command == "EXTEND") { //Toggle additional data. showExtend = !showExtend; return true; }; @@ -1347,7 +1357,7 @@ DEBUG_ShowMsg("BPPM [selector]:[offset]- Set pmode-memory breakpoint (memory change).\n"); DEBUG_ShowMsg("BPLM [linear address] - Set linear memory breakpoint (memory change).\n"); #endif - DEBUG_ShowMsg("BPLIST - List breakpoints.\n"); + DEBUG_ShowMsg("BPLIST - List breakpoints.\n"); DEBUG_ShowMsg("BPDEL [bpNr] / * - Delete breakpoint nr / all.\n"); DEBUG_ShowMsg("C / D [segment]:[offset] - Set code / data view address.\n"); DEBUG_ShowMsg("DOS MCBS - Show Memory Control Block chain.\n"); @@ -1359,8 +1369,8 @@ DEBUG_ShowMsg("ZEROPROTECT - Enable/Disable zero code execution detection.\n"); #endif DEBUG_ShowMsg("SR [reg] [value] - Set register value.\n"); - DEBUG_ShowMsg("SM [seg]:[off] [val] [.]..- Set memory with following values.\n"); - + DEBUG_ShowMsg("SM [seg]:[off] [val] [.]..- Set memory with following values.\n"); + DEBUG_ShowMsg("IV [seg]:[off] [name] - Create var name for memory address.\n"); DEBUG_ShowMsg("SV [filename] - Save var list in file.\n"); DEBUG_ShowMsg("LV [filename] - Load var list from file.\n"); @@ -1395,7 +1405,7 @@ DEBUG_ShowMsg("Up/Down - Move code view cursor.\n"); DEBUG_ShowMsg("Page Up/Down - Scroll data view.\n"); DEBUG_ShowMsg("Home/End - Scroll log messages.\n"); - + return true; }; return false; @@ -1403,7 +1413,7 @@ char* AnalyzeInstruction(char* inst, bool saveSelector) { static char result[256]; - + char instu[256]; char prefix[3]; Bit16u seg; @@ -1439,14 +1449,14 @@ adr += GetHexValue(pos,pos); } else if (*pos=='-') { pos++; - adr -= GetHexValue(pos,pos); - } else + adr -= GetHexValue(pos,pos); + } else pos++; }; Bit32u address = GetAddress(seg,adr); if (!(get_tlb_readhandler(address)->flags & PFLAG_INIT)) { static char outmask[] = "%s:[%04X]=%02X"; - + if (cpu.pmode) outmask[6] = '8'; switch (DasmLastOperandSize()) { case 8 : { Bit8u val = mem_readb(address); @@ -1576,6 +1586,21 @@ }; +Bit32s DEBUG_Run(Bit32s amount,bool quickexit) { + skipFirstInstruction = true; + CPU_Cycles = amount; + Bit32s ret = (*cpudecoder)(); + if (quickexit) SetCodeWinStart(); + else { + // ensure all breakpoints are activated + CBreakpoint::ActivateBreakpoints(); + DOSBOX_SetNormalLoop(); + } + return ret; +} + + + Bit32u DEBUG_CheckKeys(void) { Bits ret=0; bool numberrun = false; @@ -1584,19 +1609,15 @@ if (key >='1' && key <='5' && strlen(codeViewData.inputStr) == 0) { const Bit32s v[] ={5,500,1000,5000,10000}; - CPU_Cycles= v[key - '1']; - - skipFirstInstruction = true; - ret = (*cpudecoder)(); - SetCodeWinStart(); + ret = DEBUG_Run(v[key - '1'],true); /* Setup variables so we end up at the proper ret processing */ numberrun = true; // Don't redraw the screen if it's going to get redrawn immediately // afterwards, to avoid resetting oldregs. - if (ret == debugCallback) + if (ret == static_cast(debugCallback)) skipDraw = true; key = -1; } @@ -1609,6 +1630,16 @@ case PADSTAR: key='*'; break; case PADMINUS: key='-'; break; case PADPLUS: key='+'; break; + case PADSTOP: key=KEY_DC; break; + case PAD0: key=KEY_IC; break; + case KEY_A1: key=KEY_HOME; break; + case KEY_A2: key=KEY_UP; break; + case KEY_A3: key=KEY_PPAGE; break; + case KEY_B1: key=KEY_LEFT; break; + case KEY_B3: key=KEY_RIGHT; break; + case KEY_C1: key=KEY_END; break; + case KEY_C2: key=KEY_DOWN; break; + case KEY_C3: key=KEY_NPAGE; break; case ALT_D: if (ungetch('D') != ERR) key=27; break; @@ -1669,7 +1700,7 @@ case KEY_DOWN: // down if (codeViewData.cursorPos<9) codeViewData.cursorPos++; - else codeViewData.useEIP += codeViewData.firstInstSize; + else codeViewData.useEIP += codeViewData.firstInstSize; break; case KEY_UP: // up if (codeViewData.cursorPos>0) codeViewData.cursorPos--; @@ -1706,7 +1737,7 @@ if (codeViewData.inputStr[codeViewData.inputPos]) codeViewData.inputPos++; break; case KEY_F(6): // previous command (f1-f4 generate rubbish at my place) - case KEY_F(3): // previous command + case KEY_F(3): // previous command if (histBuffPos == histBuff.begin()) break; if (histBuffPos == histBuff.end()) { // copy inputStr to suspInputStr so we can restore it @@ -1729,21 +1760,13 @@ codeViewData.suspInputStr); } codeViewData.inputPos = strlen(codeViewData.inputStr); - break; + break; case KEY_F(5): // Run Program debugging=false; DrawCode(); // update code window to show "running" status - skipFirstInstruction = true; // for heavy debugger - CPU_Cycles = 1; - ret=(*cpudecoder)(); - - // ensure all breakpoints are activated - CBreakpoint::ActivateBreakpoints(); - + ret = DEBUG_Run(1,false); skipDraw = true; // don't update screen after this instruction - - DOSBOX_SetNormalLoop(); break; case KEY_F(8): // Toggle printable characters showPrintable = !showPrintable; @@ -1762,25 +1785,15 @@ break; case KEY_F(10): // Step over inst if (StepOver()) { - skipFirstInstruction = true; // for heavy debugger - CPU_Cycles = 1; - ret=(*cpudecoder)(); - - DOSBOX_SetNormalLoop(); - - // ensure all breakpoints are activated - CBreakpoint::ActivateBreakpoints(); + ret = DEBUG_Run(1,false); skipDraw = true; break; } // If we aren't stepping over something, do a normal step. - // NB: Fall-through + /* FALLTHROUGH */ case KEY_F(11): // trace into exitLoop = false; - skipFirstInstruction = true; // for heavy debugger - CPU_Cycles = 1; - ret = (*cpudecoder)(); - SetCodeWinStart(); + ret = DEBUG_Run(1,true); break; case 0x0A: //Parse typed Command codeViewData.inputStr[MAXCMDLEN] = '\0'; @@ -1791,9 +1804,9 @@ if (histBuff.size() > MAX_HIST_BUFFER) histBuff.pop_front(); histBuffPos = histBuff.end(); ClearInputLine(); - } else { + } else { codeViewData.inputPos = strlen(codeViewData.inputStr); - } + } break; case KEY_BACKSPACE: //backspace (linux) case 0x7f: // backspace in some terminal emulators (linux) @@ -1801,7 +1814,7 @@ if (codeViewData.inputPos == 0) break; codeViewData.inputPos--; // fallthrough - case KEY_DC: // delete character + case KEY_DC: // delete character if ((codeViewData.inputPos<0) || (codeViewData.inputPos>=MAXCMDLEN)) break; if (codeViewData.inputStr[codeViewData.inputPos] != 0) { codeViewData.inputStr[MAXCMDLEN] = '\0'; @@ -1817,7 +1830,7 @@ codeViewData.inputStr[codeViewData.inputPos] = '\0'; } else if (!codeViewData.ovrMode) { int len = (int) strlen(codeViewData.inputStr); - if (len < MAXCMDLEN) { + if (len < MAXCMDLEN) { for(len++;len>codeViewData.inputPos;len--) codeViewData.inputStr[len]=codeViewData.inputStr[len-1]; codeViewData.inputStr[codeViewData.inputPos++] = char(key); @@ -1832,7 +1845,7 @@ } if (ret<0) return ret; if (ret>0) { - if (GCC_UNLIKELY(ret >= CB_MAX)) + if (GCC_UNLIKELY(ret >= CB_MAX)) ret = 0; else ret = (*CallBack_Handlers[ret])(); @@ -1851,12 +1864,12 @@ Bitu DEBUG_Loop(void) { //TODO Disable sound - GFX_Events(); + GFX_MaybeProcessEvents(); // Interrupt started ? - then skip it Bit16u oldCS = SegValue(cs); Bit32u oldEIP = reg_eip; PIC_runIRQs(); - SDL_Delay(1); + Delay(1); if ((oldCS!=SegValue(cs)) || (oldEIP!=reg_eip)) { CBreakpoint::AddBreakpoint(oldCS,oldEIP,true); CBreakpoint::ActivateBreakpointsExceptAt(SegPhys(cs)+reg_eip); @@ -2067,7 +2080,8 @@ }; #if C_HEAVY_DEBUG -static void LogInstruction(Bit16u segValue, Bit32u eipValue, ofstream& out) { +static void LogInstruction(uint16_t segValue, uint32_t eipValue, ofstream &out) +{ static char empty[23] = { 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0 }; if (cpuLogType == 3) { //Log only cs:ip. @@ -2083,10 +2097,12 @@ res = AnalyzeInstruction(dline,false); if (!res || !(*res)) res = empty; Bitu reslen = strlen(res); - if (reslen<22) for (Bitu i=0; i<22-reslen; i++) res[reslen+i] = ' '; res[22] = 0; + if (reslen < 22) memset(res + reslen, ' ',22 - reslen); + res[22] = 0; }; Bitu len = strlen(dline); - if (len<30) for (Bitu i=0; i<30-len; i++) dline[len + i] = ' '; dline[30] = 0; + if (len < 30) memset(dline + len,' ',30 - len); + dline[30] = 0; // Get register values @@ -2106,15 +2122,15 @@ if (len<21) { for (Bitu i=0; i<21-len; i++) ibytes[len + i] =' '; ibytes[21]=0;} //NOTE THE BRACKETS out << setw(4) << SegValue(cs) << ":" << setw(8) << reg_eip << " " << dline << " " << res << " " << ibytes; } - - out << " EAX:" << setw(8) << reg_eax << " EBX:" << setw(8) << reg_ebx + + out << " EAX:" << setw(8) << reg_eax << " EBX:" << setw(8) << reg_ebx << " ECX:" << setw(8) << reg_ecx << " EDX:" << setw(8) << reg_edx - << " ESI:" << setw(8) << reg_esi << " EDI:" << setw(8) << reg_edi - << " EBP:" << setw(8) << reg_ebp << " ESP:" << setw(8) << reg_esp + << " ESI:" << setw(8) << reg_esi << " EDI:" << setw(8) << reg_edi + << " EBP:" << setw(8) << reg_ebp << " ESP:" << setw(8) << reg_esp << " DS:" << setw(4) << SegValue(ds)<< " ES:" << setw(4) << SegValue(es); if(cpuLogType == 0) { - out << " SS:" << setw(4) << SegValue(ss) << " C" << (get_CF()>0) << " Z" << (get_ZF()>0) + out << " SS:" << setw(4) << SegValue(ss) << " C" << (get_CF()>0) << " Z" << (get_ZF()>0) << " S" << (get_SF()>0) << " O" << (get_OF()>0) << " I" << GETFLAGBOOL(IF); } else { out << " FS:" << setw(4) << SegValue(fs) << " GS:" << setw(4) << SegValue(gs) @@ -2124,23 +2140,24 @@ << " IF:" << GETFLAGBOOL(IF); } if(cpuLogType == 2) { - out << " TF:" << GETFLAGBOOL(TF) << " VM:" << GETFLAGBOOL(VM) <<" FLG:" << setw(8) << reg_flags - << " CR0:" << setw(8) << cpu.cr0; + out << " TF:" << GETFLAGBOOL(TF) << " VM:" << GETFLAGBOOL(VM) <<" FLG:" << setw(8) << reg_flags + << " CR0:" << setw(8) << cpu.cr0; } out << endl; -}; +} #endif // DEBUG.COM stuff -class DEBUG : public Program { +class DEBUG final : public Program { public: - DEBUG() { pDebugcom = this; active = false; }; - ~DEBUG() { pDebugcom = 0; }; + DEBUG() : active(false) { pDebugcom = this; } + + ~DEBUG() { pDebugcom = nullptr; } - bool IsActive() { return active; }; + bool IsActive() const { return active; } - void Run(void) + void Run() { if(cmd->FindExist("/NOMOUSE",false)) { real_writed(0,0x33<<2,0); @@ -2162,11 +2179,11 @@ found = cmd->FindCommand(commandNr++,temp_line); if (found) strcat(args," "); } - // Start new shell and execute prog + // Start new shell and execute prog active = true; // Save cpu state.... Bit16u oldcs = SegValue(cs); - Bit32u oldeip = reg_eip; + Bit32u oldeip = reg_eip; Bit16u oldss = SegValue(ss); Bit32u oldesp = reg_esp; @@ -2179,44 +2196,44 @@ reg_esp = oldesp; SegSet16(cs,oldcs); reg_eip = oldeip; - }; + } private: bool active; }; -void DEBUG_CheckExecuteBreakpoint(Bit16u seg, Bit32u off) +void DEBUG_CheckExecuteBreakpoint(uint16_t seg, uint32_t off) { if (pDebugcom && pDebugcom->IsActive()) { - CBreakpoint::AddBreakpoint(seg,off,true); + CBreakpoint::AddBreakpoint(seg,off,true); CBreakpoint::ActivateBreakpointsExceptAt(SegPhys(cs)+reg_eip); pDebugcom = 0; - }; -}; + } +} -Bitu DEBUG_EnableDebugger(void) +Bitu DEBUG_EnableDebugger() { exitLoop = true; DEBUG_Enable(true); CPU_Cycles=CPU_CycleLeft=0; return 0; -}; +} static void DEBUG_ProgramStart(Program * * make) { *make=new DEBUG; } -// INIT +// INIT void DEBUG_SetupConsole(void) { - #ifdef WIN32 +#ifdef WIN32 WIN32_Console(); - #else +#else tcgetattr(0,&consolesettings); //curses must be inited first in order to catch the resize (is an event) // printf("\e[8;50;80t"); //resize terminal // fflush(NULL); - #endif +#endif memset((void *)&dbg,0,sizeof(dbg)); debugging=false; // dbg.active_win=3; @@ -2229,12 +2246,12 @@ CDebugVar::DeleteAll(); curs_set(old_cursor_state); endwin(); - #ifndef WIN32 +#ifndef WIN32 tcsetattr(0, TCSANOW,&consolesettings); // printf("\e[0m\e[2J"); //Seems to destroy scrolling // printf("\ec"); //Doesn't seem to be needed anymore // fflush(NULL); - #endif +#endif } Bitu debugCallback; @@ -2259,23 +2276,23 @@ // DEBUGGING VAR STUFF -void CDebugVar::InsertVariable(char* name, PhysPt adr) +void CDebugVar::InsertVariable(char *name, PhysPt adr) { varList.push_back(new CDebugVar(name,adr)); -}; +} -void CDebugVar::DeleteAll(void) +void CDebugVar::DeleteAll() { std::vector::iterator i; CDebugVar* bp; for(i=varList.begin(); i != varList.end(); i++) { bp = static_cast(*i); delete bp; - }; + } (varList.clear)(); -}; +} -CDebugVar* CDebugVar::FindVar(PhysPt pt) +CDebugVar *CDebugVar::FindVar(PhysPt pt) { if (varList.empty()) return 0; @@ -2284,11 +2301,12 @@ for(std::vector::size_type i = 0; i != s; i++) { bp = static_cast(varList[i]); if (bp->GetAdr() == pt) return bp; - }; + } return 0; -}; +} -bool CDebugVar::SaveVars(char* name) { +bool CDebugVar::SaveVars(char *name) +{ if (varList.size() > 65535) return false; FILE* f = fopen(name,"wb+"); @@ -2307,12 +2325,12 @@ // adr PhysPt adr = bp->GetAdr(); fwrite(&adr,1,sizeof(adr),f); - }; + } fclose(f); return true; -}; +} -bool CDebugVar::LoadVars(char* name) +bool CDebugVar::LoadVars(char *name) { FILE* f = fopen(name,"rb"); if (!f) return false; @@ -2332,10 +2350,10 @@ if (fread(&adr,sizeof(adr),1,f) != 1) break; // insert InsertVariable(name,adr); - }; + } fclose(f); return true; -}; +} static void SaveMemory(Bit16u seg, Bit32u ofs1, Bit32u num) { FILE* f = fopen("MEMDUMP.TXT","wt"); @@ -2343,7 +2361,7 @@ DEBUG_ShowMsg("DEBUG: Memory dump failed.\n"); return; } - + char buffer[128]; char temp[16]; @@ -2407,7 +2425,8 @@ } #define DEBUG_VAR_BUF_LEN 16 -static void DrawVariables(void) { +static void DrawVariables() +{ if (CDebugVar::varList.empty()) return; CDebugVar *dv; @@ -2450,7 +2469,7 @@ } if (windowchanges) wrefresh(dbg.win_var); -}; +} #undef DEBUG_VAR_BUF_LEN // HEAVY DEBUGGING STUFF @@ -2489,8 +2508,8 @@ TLogInst logInst[LOGCPUMAX]; -void DEBUG_HeavyLogInstruction(void) { - +void DEBUG_HeavyLogInstruction() +{ static char empty[23] = { 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0 }; PhysPt start = GetAddress(SegValue(cs),reg_eip); @@ -2501,11 +2520,12 @@ res = AnalyzeInstruction(dline,false); if (!res || !(*res)) res = empty; Bitu reslen = strlen(res); - if (reslen<22) for (Bitu i=0; i<22-reslen; i++) res[reslen+i] = ' '; res[22] = 0; - }; + if (reslen < 22) memset(res + reslen, ' ',22 - reslen); + res[22] = 0; + } Bitu len = strlen(dline); - if (len < 30) for (Bitu i=0; i < 30-len; i++) dline[len+i] = ' '; + if (len < 30) memset(dline + len,' ',30 - len); dline[30] = 0; TLogInst & inst = logInst[logCount]; @@ -2535,17 +2555,18 @@ inst.i = GETFLAGBOOL(IF); if (++logCount >= LOGCPUMAX) logCount = 0; -}; +} -void DEBUG_HeavyWriteLogInstruction(void) { +void DEBUG_HeavyWriteLogInstruction() +{ if (!logHeavy) return; logHeavy = false; - + DEBUG_ShowMsg("DEBUG: Creating cpu log LOGCPU_INT_CD.TXT\n"); ofstream out("LOGCPU_INT_CD.TXT"); if (!out.is_open()) { - DEBUG_ShowMsg("DEBUG: Failed.\n"); + DEBUG_ShowMsg("DEBUG: Failed.\n"); return; } out << hex << noshowbase << setfill('0') << uppercase; @@ -2553,7 +2574,7 @@ do { // Write Instructions TLogInst & inst = logInst[startLog]; - out << setw(4) << inst.s_cs << ":" << setw(8) << inst.eip << " " + out << setw(4) << inst.s_cs << ":" << setw(8) << inst.eip << " " << inst.dline << " " << inst.res << " EAX:" << setw(8)<< inst.eax << " EBX:" << setw(8) << inst.ebx << " ECX:" << setw(8) << inst.ecx << " EDX:" << setw(8) << inst.edx << " ESI:" << setw(8) << inst.esi @@ -2571,10 +2592,10 @@ logInst[startLog].c,logInst[startLog].z,logInst[startLog].s,logInst[startLog].o,logInst[startLog].a,logInst[startLog].p,logInst[startLog].i);*/ if (++startLog >= LOGCPUMAX) startLog = 0; } while (startLog != logCount); - + out.close(); - DEBUG_ShowMsg("DEBUG: Done.\n"); -}; + DEBUG_ShowMsg("DEBUG: Done.\n"); +} bool DEBUG_HeavyIsBreakpoint(void) { static Bitu zero_count = 0; @@ -2595,7 +2616,7 @@ // LogInstruction if (logHeavy) DEBUG_HeavyLogInstruction(); if (zeroProtect) { - Bit32u value=0; + Bit32u value = 0; if (!mem_readd_checked(SegPhys(cs)+reg_eip,&value)) { if (value == 0) zero_count++; else zero_count = 0; @@ -2607,15 +2628,12 @@ skipFirstInstruction = false; return false; } - if (CBreakpoint::CheckBreakpoint(SegValue(cs),reg_eip)) { - return true; + if (!CBreakpoint::BPoints.empty() && CBreakpoint::CheckBreakpoint(SegValue(cs),reg_eip)) { + return true; } return false; } #endif // HEAVY DEBUG - #endif // DEBUG - - diff -Nru dosbox-staging-0.76.0/src/debug/debug_gui.cpp dosbox-staging-0.77.0/src/debug/debug_gui.cpp --- dosbox-staging-0.76.0/src/debug/debug_gui.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/debug/debug_gui.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ #include #include "cross.h" +#include "string_utils.h" #include "support.h" #include "regs.h" #include "debug.h" diff -Nru dosbox-staging-0.76.0/src/debug/debug_inc.h dosbox-staging-0.77.0/src/debug/debug_inc.h --- dosbox-staging-0.76.0/src/debug/debug_inc.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/debug/debug_inc.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/debug/debug_win32.cpp dosbox-staging-0.77.0/src/debug/debug_win32.cpp --- dosbox-staging-0.76.0/src/debug/debug_win32.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/debug/debug_win32.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/debug/.gitignore dosbox-staging-0.77.0/src/debug/.gitignore --- dosbox-staging-0.76.0/src/debug/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/debug/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/debug/Makefile.am dosbox-staging-0.77.0/src/debug/Makefile.am --- dosbox-staging-0.76.0/src/debug/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/debug/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libdebug.a -libdebug_a_SOURCES = debug.cpp debug_gui.cpp debug_disasm.cpp debug_inc.h debug_win32.cpp diff -Nru dosbox-staging-0.76.0/src/debug/meson.build dosbox-staging-0.77.0/src/debug/meson.build --- dosbox-staging-0.76.0/src/debug/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/debug/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,14 @@ +libdebug_sources = files([ + 'debug.cpp', + 'debug_disasm.cpp', + 'debug_gui.cpp', + 'debug_win32.cpp', +]) + +libdebug = static_library('debug', libdebug_sources, + include_directories : incdir, + dependencies: [sdl2_dep, curses_dep]) + +libdebug_dep = declare_dependency(link_with : libdebug) + +internal_deps += libdebug_dep diff -Nru dosbox-staging-0.76.0/src/dos/cdrom.cpp dosbox-staging-0.77.0/src/dos/cdrom.cpp --- dosbox-staging-0.76.0/src/dos/cdrom.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/cdrom.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/dos/cdrom.h dosbox-staging-0.77.0/src/dos/cdrom.h --- dosbox-staging-0.76.0/src/dos/cdrom.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/cdrom.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2019-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,9 +19,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef DOSBOX_CDROM_H +#define DOSBOX_CDROM_H -#ifndef __CDROM_INTERFACE__ -#define __CDROM_INTERFACE__ +#include "dosbox.h" #include #include @@ -32,7 +36,6 @@ #include #include -#include "dosbox.h" #include "support.h" #include "mem.h" #include "mixer.h" @@ -111,7 +114,7 @@ virtual void InitNewMedia (void) {} }; -class CDROM_Interface_Fake : public CDROM_Interface +class CDROM_Interface_Fake final : public CDROM_Interface { public: bool SetDevice (char *) { return true; } @@ -131,7 +134,7 @@ bool LoadUnloadMedia (bool /*unload*/) { return true; } }; -class CDROM_Interface_Image : public CDROM_Interface +class CDROM_Interface_Image final : public CDROM_Interface { private: // Nested Class Definitions @@ -159,7 +162,7 @@ const Bit16u chunkSize = 0; }; - class BinaryFile : public TrackFile { + class BinaryFile final : public TrackFile { public: BinaryFile (const char *filename, bool &error); ~BinaryFile (); @@ -183,7 +186,7 @@ std::ifstream *file; }; - class AudioFile : public TrackFile { + class AudioFile final : public TrackFile { public: AudioFile (const char *filename, bool &error); ~AudioFile (); @@ -232,7 +235,7 @@ bool GetAudioSub (unsigned char& attr, unsigned char& track, unsigned char& index, TMSF& relPos, TMSF& absPos); bool GetAudioStatus (bool& playing, bool& pause); bool GetMediaTrayStatus (bool& mediaPresent, bool& mediaChanged, bool& trayOpen); - bool PlayAudioSector (const uint32_t start, uint32_t len); + bool PlayAudioSector(uint32_t start, uint32_t len); bool PauseAudio (bool resume); bool StopAudio (void); void ChannelControl (TCtrl ctrl); @@ -286,4 +289,4 @@ static int refCount; }; -#endif /* __CDROM_INTERFACE__ */ +#endif diff -Nru dosbox-staging-0.76.0/src/dos/cdrom_image.cpp dosbox-staging-0.77.0/src/dos/cdrom_image.cpp --- dosbox-staging-0.76.0/src/dos/cdrom_image.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/cdrom_image.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,6 +44,7 @@ #include "drives.h" #include "fs_utils.h" #include "setup.h" +#include "string_utils.h" #include "support.h" using namespace std; @@ -334,7 +338,7 @@ static uint8_t dae_attempts = 0; if (dae_attempts++ > 10) { E_Exit("\n" - "CDROM: Digital Audio Extration (DAE) was attempted with a %u kHz\n" + "CDROM: Digital Audio Extraction (DAE) was attempted with a %u kHz\n" " track, but DAE is only compatible with %u kHz tracks.", getRate(), REDBOOK_PCM_FRAMES_PER_SECOND); @@ -460,9 +464,10 @@ * Sound_GetDuration returns milliseconds but getLength() * needs to return bytes, so we covert using PCM bytes/s */ - length_redbook_bytes = static_cast( - static_cast(Sound_GetDuration(sample)) * - REDBOOK_PCM_BYTES_PER_MS); + const auto track_ms = Sound_GetDuration(sample); + const auto track_bytes = static_cast(track_ms) * REDBOOK_PCM_BYTES_PER_MS; + assert(track_bytes < static_cast(INT32_MAX)); + length_redbook_bytes = static_cast(track_bytes); } assertm(length_redbook_bytes >= 0, "Track length could not be determined"); @@ -686,7 +691,7 @@ return true; } -bool CDROM_Interface_Image::PlayAudioSector(const uint32_t start, uint32_t len) +bool CDROM_Interface_Image::PlayAudioSector(uint32_t start, uint32_t len) { // Find the track that holds the requested sector track_const_iter track = GetTrack(start); @@ -707,31 +712,30 @@ #endif return false; } - /** - * If the request falls in the pregap we deduct the difference from the - * playback duration, because we skip the pre-gap area and jump straight to - * the track start. - */ - if (start < track->start) + // If the request falls into the pregap, which is prior to the track's + // actual start but not so earlier that it falls into the prior track's + // audio, then we simply skip the pre-gap (beacuse we can't negatively + // seek into the track) and instead start playback at the actual track + // start. + if (start < track->start) { len -= (track->start - start); + start = track->start; + } - // Seek to the calculated byte offset, bounded to the valid byte offsets - const uint32_t offset = (track->skip - + clamp(start - static_cast(track->start), - 0u, track->length - 1) - * track->sectorSize); + // Calculate the requested byte offset from the sector offset + const auto sector_offset = start - track->start; + const auto byte_offset = track->skip + sector_offset * track->sectorSize; // Guard: Bail if our track could not be seeked - if (!track_file->seek(offset)) { + if (!track_file->seek(byte_offset)) { LOG_MSG("CDROM: Track %d failed to seek to byte %u, so cancelling playback", - track->number, - offset); + track->number, byte_offset); StopAudio(); return false; } // We're performing an audio-task, so update the audio position - track_file->setAudioPosition(offset); + track_file->setAudioPosition(byte_offset); // Get properties about the current track const uint8_t track_channels = track_file->getChannels(); @@ -906,9 +910,8 @@ return success; } -bool CDROM_Interface_Image::LoadUnloadMedia(bool unload) +bool CDROM_Interface_Image::LoadUnloadMedia(bool /*unload*/) { - (void)unload; // unused by part of the API return true; } diff -Nru dosbox-staging-0.76.0/src/dos/dev_con.h dosbox-staging-0.77.0/src/dos/dev_con.h --- dosbox-staging-0.76.0/src/dos/dev_con.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dev_con.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ #define NUMBER_ANSI_DATA 10 -class device_CON : public DOS_Device { +class device_CON final : public DOS_Device { public: device_CON() { SetName("CON"); } @@ -33,8 +33,8 @@ bool Seek(Bit32u * pos,Bit32u type); bool Close(); Bit16u GetInformation(void); - bool ReadFromControlChannel(PhysPt bufptr,Bit16u size,Bit16u * retcode){return false;} - bool WriteToControlChannel(PhysPt bufptr,Bit16u size,Bit16u * retcode){return false;} + bool ReadFromControlChannel(PhysPt /*bufptr*/,Bit16u /*size*/,Bit16u * /*retcode*/){return false;} + bool WriteToControlChannel(PhysPt /*bufptr*/,Bit16u /*size*/,Bit16u * /*retcode*/){return false;} private: void ClearAnsi(); void Output(Bit8u chr); @@ -287,7 +287,7 @@ LOG(LOG_IOCTL,LOG_WARN)("ANSI SEQUENCES USED"); } ncols = real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS); - nrows = real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS) + 1; + nrows = IS_EGAVGA_ARCH ? (real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS) + 1) : 25; /* Turn them into positions that are on the screen */ if(ansi.data[0] == 0) ansi.data[0] = 1; if(ansi.data[1] == 0) ansi.data[1] = 1; @@ -309,7 +309,7 @@ case 'B': /*cursor Down */ col=CURSOR_POS_COL(page) ; row=CURSOR_POS_ROW(page) ; - nrows = real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS) + 1; + nrows = IS_EGAVGA_ARCH ? (real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS) + 1) : 25; tempdata = (ansi.data[0]? ansi.data[0] : 1); if(tempdata + static_cast(row) >= nrows) { row = nrows - 1;} @@ -372,7 +372,7 @@ case 'M': /* delete line (NANSI) */ row = CURSOR_POS_ROW(page); ncols = real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS); - nrows = real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS) + 1; + nrows = IS_EGAVGA_ARCH ? (real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS) + 1) : 25; INT10_ScrollWindow(row,0,nrows-1,ncols-1,ansi.data[0]? -ansi.data[0] : -1,ansi.attr,0xFF); ClearAnsi(); break; @@ -390,7 +390,7 @@ return true; } -bool device_CON::Seek(Bit32u * pos,Bit32u type) { +bool device_CON::Seek(Bit32u * pos,Bit32u /*type*/) { // seek is valid *pos = 0; return true; diff -Nru dosbox-staging-0.76.0/src/dos/dos_classes.cpp dosbox-staging-0.77.0/src/dos/dos_classes.cpp --- dosbox-staging-0.76.0/src/dos/dos_classes.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_classes.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/dos/dos_codepages.h dosbox-staging-0.77.0/src/dos/dos_codepages.h --- dosbox-staging-0.76.0/src/dos/dos_codepages.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_codepages.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) Henrique Peron + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2019 Henrique Peron * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,18 +19,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - /* This file contains data of .CPI/.CPX-files. They have been - generated by Henrique Peron */ + generated by Henrique Peron + https://github.com/FDOS/cpi */ /* The font files have been created/edited with CPIadd V1.20 Copyright (C) 1993-1996 by kostis@acm.org (Kosta Kostis) */ /* This file contains data of UPX-compressed CPI files. UPX, The Ultimate Packer for eXecutables - Copyright (c) 1996-2002 Markus Oberhumer & Laszlo Molnar - http://upx.sourceforge.net */ - + Copyright (c) 1996-2020 Markus Oberhumer, Laszlo Molnar & John Reiser + https://upx.github.io */ Bit8u font_ega_cpx[6322] = { 0x81, 0xfc, 0xce, 0xe7, 0x77, 0x02, 0xcd, 0x20, 0xb9, 0xb2, 0x18, 0xbe, 0xb2, 0x19, 0xbf, 0x6e, diff -Nru dosbox-staging-0.76.0/src/dos/dos.cpp dosbox-staging-0.77.0/src/dos/dos.cpp --- dosbox-staging-0.76.0/src/dos/dos.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,19 +16,20 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dos_inc.h" + +#include +#include +#include +#include -#include -#include -#include -#include "dosbox.h" #include "bios.h" -#include "mem.h" #include "callback.h" +#include "mem.h" #include "regs.h" -#include "dos_inc.h" +#include "serialport.h" #include "setup.h" #include "support.h" -#include "serialport.h" DOS_Block dos; DOS_InfoBlock dos_infoblock; @@ -44,7 +45,7 @@ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; -uint16_t DOS_PackTime(uint16_t hour, uint16_t min, uint16_t sec) +uint16_t DOS_PackTime(uint16_t hour, uint16_t min, uint16_t sec) noexcept { const auto h_bits = 0b1111100000000000 & (hour << 11); const auto m_bits = 0b0000011111100000 & (min << 5); @@ -53,7 +54,14 @@ return static_cast(packed); } -uint16_t DOS_PackDate(uint16_t year, uint16_t mon, uint16_t day) +uint16_t DOS_PackTime(const struct tm &datetime) noexcept +{ + return DOS_PackTime(static_cast(datetime.tm_hour), + static_cast(datetime.tm_min), + static_cast(datetime.tm_sec)); +} + +uint16_t DOS_PackDate(uint16_t year, uint16_t mon, uint16_t day) noexcept { const auto y_bits = 0b1111111000000000 & ((year - 1980) << 9); const auto m_bits = 0b0000000111100000 & (mon << 5); @@ -62,6 +70,13 @@ return static_cast(packed); } +uint16_t DOS_PackDate(const struct tm &datetime) noexcept +{ + return DOS_PackDate(static_cast(datetime.tm_year + 1900), + static_cast(datetime.tm_mon + 1), + static_cast(datetime.tm_mday)); +} + static void DOS_AddDays(Bitu days) { dos.date.day += days; diff -Nru dosbox-staging-0.76.0/src/dos/dos_devices.cpp dosbox-staging-0.77.0/src/dos/dos_devices.cpp --- dosbox-staging-0.76.0/src/dos/dos_devices.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_devices.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dos_system.h" #include + #include "dosbox.h" #include "callback.h" #include "regs.h" @@ -25,42 +27,39 @@ #include "bios.h" #include "dos_inc.h" #include "support.h" -#include "drives.h" //Wildcmp -/* Include all the devices */ - +#include "drives.h" #include "dev_con.h" - DOS_Device * Devices[DOS_DEVICES]; class device_NUL : public DOS_Device { public: device_NUL() { SetName("NUL"); } - virtual bool Read(Bit8u * data,Bit16u * size) { + virtual bool Read(Bit8u * /*data*/,Bit16u * size) { *size = 0; //Return success and no data read. LOG(LOG_IOCTL,LOG_NORMAL)("%s:READ",GetName()); return true; } - virtual bool Write(Bit8u * data,Bit16u * size) { + virtual bool Write(Bit8u * /*data*/,Bit16u * /*size*/) { LOG(LOG_IOCTL,LOG_NORMAL)("%s:WRITE",GetName()); return true; } - virtual bool Seek(Bit32u * pos,Bit32u type) { + virtual bool Seek(Bit32u * /*pos*/,Bit32u /*type*/) { LOG(LOG_IOCTL,LOG_NORMAL)("%s:SEEK",GetName()); return true; } virtual bool Close() { return true; } virtual Bit16u GetInformation(void) { return 0x8084; } - virtual bool ReadFromControlChannel(PhysPt bufptr,Bit16u size,Bit16u * retcode){return false;} - virtual bool WriteToControlChannel(PhysPt bufptr,Bit16u size,Bit16u * retcode){return false;} + virtual bool ReadFromControlChannel(PhysPt /*bufptr*/,Bit16u /*size*/,Bit16u * /*retcode*/){return false;} + virtual bool WriteToControlChannel(PhysPt /*bufptr*/,Bit16u /*size*/,Bit16u * /*retcode*/){return false;} }; -class device_LPT1 : public device_NUL { +class device_LPT1 final : public device_NUL { public: device_LPT1() { SetName("LPT1");} Bit16u GetInformation(void) { return 0x80A0; } - bool Read(Bit8u* data,Bit16u * size){ + bool Read(Bit8u* /*data*/,Bit16u * /*size*/){ DOS_SetError(DOSERR_ACCESS_DENIED); return false; } diff -Nru dosbox-staging-0.76.0/src/dos/dos_execute.cpp dosbox-staging-0.77.0/src/dos/dos_execute.cpp --- dosbox-staging-0.76.0/src/dos/dos_execute.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_execute.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/dos/dos_files.cpp dosbox-staging-0.77.0/src/dos/dos_files.cpp --- dosbox-staging-0.76.0/src/dos/dos_files.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_files.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dos_inc.h" + #include #include #include @@ -26,9 +28,10 @@ #include "bios.h" #include "mem.h" #include "regs.h" -#include "dos_inc.h" #include "drives.h" #include "cross.h" +#include "string_utils.h" +#include "support.h" #define DOS_FILESTART 4 @@ -781,13 +784,16 @@ } dos.errorcode=0; /* add random crap to the end of the name and try to open */ + const auto seed = static_cast(time(nullptr)); + srand(seed); do { Bit32u i; for (i=0;i<8;i++) { tempname[i]=(rand()%26)+'A'; } tempname[8]=0; - } while ((!DOS_CreateFile(name,0,entry)) && (dos.errorcode==DOSERR_FILE_ALREADY_EXISTS)); + } while (DOS_FileExists(name)); + DOS_CreateFile(name,0,entry); if (dos.errorcode) return false; return true; } @@ -1084,7 +1090,8 @@ if (!DOS_SeekFile(fhandle,&pos,DOS_SEEK_SET,true)) return FCB_READ_NODATA; Bit16u toread=rec_size; if (!DOS_ReadFile(fhandle,dos_copybuf,&toread,true)) return FCB_READ_NODATA; - if (toread==0) return FCB_READ_NODATA; + if (toread == 0) + return FCB_READ_NODATA; if (toread < rec_size) { //Zero pad copybuffer to rec_size Bitu i = toread; while(i < rec_size) dos_copybuf[i++] = 0; @@ -1093,7 +1100,6 @@ if (++cur_rec>127) { cur_block++;cur_rec=0; } fcb.SetRecord(cur_block,cur_rec); if (toread==rec_size) return FCB_SUCCESS; - if (toread==0) return FCB_READ_NODATA; return FCB_READ_PARTIAL; } diff -Nru dosbox-staging-0.76.0/src/dos/dos_ioctl.cpp dosbox-staging-0.77.0/src/dos/dos_ioctl.cpp --- dosbox-staging-0.76.0/src/dos/dos_ioctl.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_ioctl.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/dos/dos_keyboard_layout.cpp dosbox-staging-0.77.0/src/dos/dos_keyboard_layout.cpp --- dosbox-staging-0.76.0/src/dos/dos_keyboard_layout.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_keyboard_layout.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,12 +16,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include "dosbox.h" + #include "bios.h" #include "bios_disk.h" #include "setup.h" #include "support.h" +#include "string_utils.h" #include "../ints/int10.h" #include "regs.h" #include "callback.h" @@ -368,7 +369,7 @@ for (Bit16u cplane=0; cplaneswitch_foreign_layout(); -} */ +} +#endif // called by int9-handler bool DOS_LayoutKey(Bitu key, Bit8u flags1, Bit8u flags2, Bit8u flags3) { @@ -1102,7 +1105,7 @@ } -class DOS_KeyboardLayout: public Module_base { +class DOS_KeyboardLayout final : public Module_base { public: DOS_KeyboardLayout(Section* configuration):Module_base(configuration){ Section_prop * section=static_cast(configuration); diff -Nru dosbox-staging-0.76.0/src/dos/dos_keyboard_layout_data.h dosbox-staging-0.77.0/src/dos/dos_keyboard_layout_data.h --- dosbox-staging-0.76.0/src/dos/dos_keyboard_layout_data.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_keyboard_layout_data.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) Henrique Peron + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2006-2019 Henrique Peron * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +19,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - /* This file contains data of .KL-files. They have been generated by Henrique Peron using FreeDOS KC and are combined into .SYS files. */ @@ -24,7 +26,6 @@ wrapped in a KL file (for use of FD-KEYB 2.X) Copyright (C) 2004 by Aitor SANTAMARIA_MERINO */ - Bit8u layout_keyboardsys[33196] = { 0x4b, 0x43, 0x46, 0x00, 0x01, 0x01, 0x2e, 0x48, 0x65, 0x6e, 0x72, 0x69, 0x71, 0x75, 0x65, 0x20, 0x50, 0x65, 0x72, 0x6f, 0x6e, 0xff, 0x44, 0x4f, 0x53, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x70, 0x61, diff -Nru dosbox-staging-0.76.0/src/dos/dos_memory.cpp dosbox-staging-0.77.0/src/dos/dos_memory.cpp --- dosbox-staging-0.76.0/src/dos/dos_memory.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_memory.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include "dosbox.h" + #include "mem.h" #include "dos_inc.h" diff -Nru dosbox-staging-0.76.0/src/dos/dos_misc.cpp dosbox-staging-0.77.0/src/dos/dos_misc.cpp --- dosbox-staging-0.76.0/src/dos/dos_misc.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_misc.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,14 +16,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dos_inc.h" + +#include -#include "dosbox.h" #include "callback.h" #include "mem.h" #include "regs.h" -#include "dos_inc.h" -#include - static Bitu call_int2f,call_int2a; diff -Nru dosbox-staging-0.76.0/src/dos/dos_mscdex.cpp dosbox-staging-0.77.0/src/dos/dos_mscdex.cpp --- dosbox-staging-0.76.0/src/dos/dos_mscdex.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_mscdex.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ #include #include +#include "compiler.h" #include "regs.h" #include "callback.h" #include "dos_system.h" @@ -60,7 +61,7 @@ static Bitu MSCDEX_Interrupt_Handler(void); static MountType MSCDEX_GetMountType(const char *path); -class DOS_DeviceHeader : public MemStruct { +class DOS_DeviceHeader final : public MemStruct { public: DOS_DeviceHeader(PhysPt ptr) { pt = ptr; } @@ -1275,7 +1276,7 @@ return true; } -class device_MSCDEX : public DOS_Device { +class device_MSCDEX final : public DOS_Device { public: device_MSCDEX() { SetName("MSCD001"); } bool Read (Bit8u * /*data*/,Bit16u * /*size*/) { return false;} diff -Nru dosbox-staging-0.76.0/src/dos/dos_programs.cpp dosbox-staging-0.77.0/src/dos/dos_programs.cpp --- dosbox-staging-0.76.0/src/dos/dos_programs.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_programs.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,12 +36,16 @@ #include "drives.h" #include "fs_utils.h" #include "inout.h" +#include "mapper.h" +#include "mem.h" #include "program_autotype.h" #include "program_ls.h" #include "regs.h" #include "setup.h" #include "shell.h" #include "support.h" +#include "string_utils.h" +#include "../ints/int10.h" #if defined(WIN32) #ifndef S_ISDIR @@ -55,15 +59,18 @@ static Bitu ZDRIVE_NUM = 25; -static const char* UnmountHelper(char umount) { - int i_drive; - if (umount < '0' || umount > 3+'0') - i_drive = drive_index(umount); - else - i_drive = umount - '0'; - - if (i_drive >= DOS_DRIVES || i_drive < 0) - return MSG_Get("PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED"); +static const char *UnmountHelper(char umount) +{ + const char drive_id = toupper(umount); + const bool using_drive_number = (drive_id >= '0' && drive_id <= '3'); + const bool using_drive_letter = (drive_id >= 'A' && drive_id <= 'Z'); + + if (!using_drive_number && !using_drive_letter) + return MSG_Get("PROGRAM_MOUNT_DRIVEID_ERROR"); + + const uint8_t i_drive = using_drive_number ? (drive_id - '0') + : drive_index(drive_id); + assert(i_drive < DOS_DRIVES); if (i_drive < MAX_DISK_IMAGES && Drives[i_drive] == NULL && !imageDiskList[i_drive]) return MSG_Get("PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED"); @@ -91,21 +98,33 @@ return MSG_Get("PROGRAM_MOUNT_UMOUNT_SUCCESS"); } -class MOUNT : public Program { +class MOUNT final : public Program { public: - void Move_Z(char new_z) { - char newz_drive = (char) toupper(new_z); - int i_newz = drive_index(newz_drive); - if (i_newz >= 0 && i_newz < DOS_DRIVES-1 && !Drives[i_newz]) { - ZDRIVE_NUM = i_newz; + void Move_Z(char new_z) + { + const char new_drive_z = toupper(new_z); + + if (new_drive_z < 'A' || new_drive_z > 'Z') { + WriteOut(MSG_Get("PROGRAM_MOUNT_DRIVEID_ERROR"), new_drive_z); + return; + } + + const uint8_t new_idx = drive_index(new_drive_z); + + if (Drives[new_idx]) { + WriteOut(MSG_Get("PROGRAM_MOUNT_MOVE_Z_ERROR_1"), new_drive_z); + return; + } + + if (new_idx < DOS_DRIVES - 1) { + ZDRIVE_NUM = new_idx; /* remap drives */ - Drives[i_newz] = Drives[25]; + Drives[new_idx] = Drives[25]; Drives[25] = 0; if (!first_shell) return; //Should not be possible /* Update environment */ std::string line = ""; - char ppp[2] = {newz_drive,0}; - std::string tempenv = ppp; tempenv += ":\\"; + std::string tempenv = {new_drive_z, ':', '\\'}; if (first_shell->GetEnvStr("PATH",line)) { std::string::size_type idx = line.find('='); std::string value = line.substr(idx +1 , std::string::npos); @@ -122,40 +141,47 @@ /* Update batch file if running from Z: (very likely: autoexec) */ if (first_shell->bf) { std::string &name = first_shell->bf->filename; - if (name.length() > 2 && name[0] == 'Z' && name[1] == ':') name[0] = newz_drive; + if (starts_with("Z:", name)) + name[0] = new_drive_z; } /* Change the active drive */ - if (DOS_GetDefaultDrive() == 25) DOS_SetDrive(i_newz); + if (DOS_GetDefaultDrive() == 25) + DOS_SetDrive(new_idx); } } - void ListMounts(void) { - char name[DOS_NAMELENGTH_ASCII];Bit32u size;Bit16u date;Bit16u time;Bit8u attr; - /* Command uses dta so set it to our internal dta */ - RealPt save_dta = dos.dta(); - dos.dta(dos.tables.tempdta); - DOS_DTA dta(dos.dta()); - - WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1")); - WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"),"Drive","Type","Label"); - for (int p = 0;p < 8;p++) WriteOut("----------"); - for (int d = 0; d < DOS_DRIVES; d++) { - if (!Drives[d]) continue; + void ListMounts() + { + const std::string header_drive = MSG_Get("PROGRAM_MOUNT_STATUS_DRIVE"); + const std::string header_type = MSG_Get("PROGRAM_MOUNT_STATUS_TYPE"); + const std::string header_label = MSG_Get("PROGRAM_MOUNT_STATUS_LABEL"); + + const int term_width = real_readw(BIOSMEM_SEG, BIOSMEM_NB_COLS); + const auto width_1 = static_cast(header_drive.size()); + const auto width_3 = std::max(11, static_cast(header_label.size())); + const auto width_2 = term_width - 3 - width_1 - width_3; + + auto print_row = [&](const std::string &txt_1, + const std::string &txt_2, + const std::string &txt_3) { + WriteOut("%-*s %-*s %-*s\n", + width_1, txt_1.c_str(), + width_2, txt_2.c_str(), + width_3, txt_3.c_str()); + }; - char root[7] = {static_cast('A' + d),':','\\','*','.','*',0}; - bool ret = DOS_FindFirst(root,DOS_ATTR_VOLUME); - if (ret) { - dta.GetResult(name,size,date,time,attr); - DOS_FindNext(); //Mark entry as invalid - } else { - name[0] = 0; + WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_1")); + print_row(header_drive, header_type, header_label); + for (int i = 0; i < term_width; i++) + WriteOut_NoParsing("-"); + + for (uint8_t d = 0; d < DOS_DRIVES; d++) { + if (Drives[d]) { + print_row(std::string{drive_letter(d)}, + Drives[d]->GetInfo(), + To_Label(Drives[d]->GetLabel())); } - std::string label = To_Label(name); - root[1] = 0; //This way, the format string can be reused. - WriteOut(MSG_Get("PROGRAM_MOUNT_STATUS_FORMAT"), - root, Drives[d]->GetInfo(), label.c_str()); } - dos.dta(save_dta); } void Run(void) { @@ -438,7 +464,7 @@ *make=new MOUNT; } -class MEM : public Program { +class MEM final : public Program { public: void Run(void) { /* Show conventional Memory */ @@ -508,7 +534,7 @@ extern Bit32u floppytype; -class BOOT : public Program { +class BOOT final : public Program { private: FILE *getFSFile_mounted(char const* filename, Bit32u *ksize, Bit32u *bsize, Bit8u *error) { @@ -771,8 +797,7 @@ } disable_umb_ems_xms(); - void PreparePCJRCartRom(void); - PreparePCJRCartRom(); + MEM_PreparePCJRCartRom(); if (usefile_1==NULL) return; @@ -862,8 +887,7 @@ } } else { disable_umb_ems_xms(); - void RemoveEMSPageFrame(void); - RemoveEMSPageFrame(); + MEM_RemoveEMSPageFrame(); WriteOut(MSG_Get("PROGRAM_BOOT_BOOT"), drive); for (i = 0; i < 512; i++) real_writeb(0, 0x7c00 + i, bootarea.rawdata[i]); @@ -896,7 +920,7 @@ } -class LOADROM : public Program { +class LOADROM final : public Program { public: void Run(void) { if (!(cmd->FindCommand(1, temp_line))) { @@ -973,7 +997,7 @@ } #if C_DEBUG -class BIOSTEST : public Program { +class BIOSTEST final : public Program { public: void Run(void) { if (!(cmd->FindCommand(1, temp_line))) { @@ -1033,7 +1057,7 @@ // LOADFIX -class LOADFIX : public Program { +class LOADFIX final : public Program { public: void Run(void); }; @@ -1098,7 +1122,7 @@ // RESCAN -class RESCAN : public Program { +class RESCAN final : public Program { public: void Run(void); }; @@ -1111,14 +1135,11 @@ if (cmd->FindCommand(1,temp_line)) { //-A -All /A /All - if (temp_line.size() >= 2 - && (temp_line[0] == '-' || - temp_line[0] == '/') - && (temp_line[1] == 'a' || - temp_line[1] == 'A') ) { - all = true; - } - else if (temp_line.size() == 2 && temp_line[1] == ':') { + if (temp_line.size() >= 2 && + (temp_line[0] == '-' || temp_line[0] == '/') && + (temp_line[1] == 'a' || temp_line[1] == 'A')) { + all = true; + } else if (temp_line.size() == 2 && temp_line[1] == ':') { lowcase(temp_line); drive = temp_line[0] - 'a'; } @@ -1141,7 +1162,7 @@ *make=new RESCAN; } -class INTRO : public Program { +class INTRO final : public Program { public: void DisplayMount(void) { /* Basic mounting has a version for each operating system. @@ -1159,7 +1180,11 @@ /* Only run if called from the first shell (Xcom TFTD runs any intro file in the path) */ if (DOS_PSP(dos.psp()).GetParent() != DOS_PSP(DOS_PSP(dos.psp()).GetParent()).GetParent()) return; if (cmd->FindExist("cdrom",false)) { - WriteOut(MSG_Get("PROGRAM_INTRO_CDROM")); +#ifdef WIN32 + WriteOut(MSG_Get("PROGRAM_INTRO_CDROM_WINDOWS")); +#else + WriteOut(MSG_Get("PROGRAM_INTRO_CDROM_OTHER")); +#endif return; } if (cmd->FindExist("mount",false)) { @@ -1177,8 +1202,12 @@ DOS_ReadFile (STDIN,&c,&n); DisplayMount(); DOS_ReadFile (STDIN,&c,&n); - WriteOut(MSG_Get("PROGRAM_INTRO_CDROM")); - DOS_ReadFile (STDIN,&c,&n); +#ifdef WIN32 + WriteOut(MSG_Get("PROGRAM_INTRO_CDROM_WINDOWS")); +#else + WriteOut(MSG_Get("PROGRAM_INTRO_CDROM_OTHER")); +#endif + DOS_ReadFile(STDIN, &c, &n); WriteOut(MSG_Get("PROGRAM_INTRO_SPECIAL")); } }; @@ -1187,7 +1216,7 @@ *make=new INTRO; } -class IMGMOUNT : public Program { +class IMGMOUNT final : public Program { public: void Run(void) { //Hack To allow long commandlines @@ -1555,7 +1584,7 @@ Bitu DOS_LoadKeyboardLayout(const char * layoutname, Bit32s codepage, const char * codepagefile); const char* DOS_GetLoadedLayout(void); -class KEYB : public Program { +class KEYB final : public Program { public: void Run(void); }; @@ -1627,9 +1656,11 @@ /*Add Messages */ MSG_Add("PROGRAM_MOUNT_CDROMS_FOUND","CDROMs found: %d\n"); - MSG_Add("PROGRAM_MOUNT_STATUS_FORMAT","%-5s %-58s %-12s\n"); + MSG_Add("PROGRAM_MOUNT_STATUS_DRIVE", "Drive"); + MSG_Add("PROGRAM_MOUNT_STATUS_TYPE", "Type"); + MSG_Add("PROGRAM_MOUNT_STATUS_LABEL", "Label"); MSG_Add("PROGRAM_MOUNT_STATUS_2","Drive %c is mounted as %s\n"); - MSG_Add("PROGRAM_MOUNT_STATUS_1","The currently mounted drives are:\n"); + MSG_Add("PROGRAM_MOUNT_STATUS_1", "The currently mounted drives are:\n"); MSG_Add("PROGRAM_MOUNT_ERROR_1","Directory %s doesn't exist.\n"); MSG_Add("PROGRAM_MOUNT_ERROR_2","%s isn't a directory\n"); MSG_Add("PROGRAM_MOUNT_ILL_TYPE","Illegal type %s\n"); @@ -1637,6 +1668,7 @@ MSG_Add("PROGRAM_MOUNT_UMOUNT_NOT_MOUNTED","Drive %c isn't mounted.\n"); MSG_Add("PROGRAM_MOUNT_UMOUNT_SUCCESS","Drive %c has successfully been removed.\n"); MSG_Add("PROGRAM_MOUNT_UMOUNT_NO_VIRTUAL","Virtual Drives can not be unMOUNTed.\n"); + MSG_Add("PROGRAM_MOUNT_DRIVEID_ERROR", "'%c' is not a valid drive identifier.\n"); MSG_Add("PROGRAM_MOUNT_WARNING_WIN","\033[31;1mMounting c:\\ is NOT recommended. Please mount a (sub)directory next time.\033[0m\n"); MSG_Add("PROGRAM_MOUNT_WARNING_OTHER","\033[31;1mMounting / is NOT recommended. Please mount a (sub)directory next time.\033[0m\n"); MSG_Add("PROGRAM_MOUNT_NO_OPTION", "Warning: Ignoring unsupported option '%s'.\n"); @@ -1646,14 +1678,16 @@ MSG_Add("PROGRAM_MOUNT_OVERLAY_SAME_AS_BASE","The overlay directory can not be the same as underlying drive.\n"); MSG_Add("PROGRAM_MOUNT_OVERLAY_GENERIC_ERROR","Something went wrong.\n"); MSG_Add("PROGRAM_MOUNT_OVERLAY_STATUS","Overlay %s on drive %c mounted.\n"); + MSG_Add("PROGRAM_MOUNT_MOVE_Z_ERROR_1", "Can't move drive Z. Drive %c is mounted already.\n"); - MSG_Add("PROGRAM_MEM_CONVEN","%10d Kb free conventional memory\n"); - MSG_Add("PROGRAM_MEM_EXTEND","%10d Kb free extended memory\n"); - MSG_Add("PROGRAM_MEM_EXPAND","%10d Kb free expanded memory\n"); - MSG_Add("PROGRAM_MEM_UPPER","%10d Kb free upper memory in %d blocks (largest UMB %d Kb)\n"); + MSG_Add("PROGRAM_MEM_CONVEN", "%10d kB free conventional memory\n"); + MSG_Add("PROGRAM_MEM_EXTEND", "%10d kB free extended memory\n"); + MSG_Add("PROGRAM_MEM_EXPAND", "%10d kB free expanded memory\n"); + MSG_Add("PROGRAM_MEM_UPPER", + "%10d kB free upper memory in %d blocks (largest UMB %d kB)\n"); - MSG_Add("PROGRAM_LOADFIX_ALLOC","%d kb allocated.\n"); - MSG_Add("PROGRAM_LOADFIX_DEALLOC","%d kb freed.\n"); + MSG_Add("PROGRAM_LOADFIX_ALLOC", "%d kB allocated.\n"); + MSG_Add("PROGRAM_LOADFIX_DEALLOC", "%d kB freed.\n"); MSG_Add("PROGRAM_LOADFIX_DEALLOCALL","Used memory freed.\n"); MSG_Add("PROGRAM_LOADFIX_ERROR","Memory allocation error.\n"); @@ -1677,7 +1711,7 @@ "For information about basic mount type \033[34;1mintro mount\033[0m\n" "For information about CD-ROM support type \033[34;1mintro cdrom\033[0m\n" "For information about special keys type \033[34;1mintro special\033[0m\n" - "To access DOSBox Staging's wiki, visit:\033[34;1m\n" + "For more imformation, visit DOSBox Staging wiki:\033[34;1m\n" "https://github.com/dosbox-staging/dosbox-staging/wiki\033[0m\n" "\n" "\033[31;1mDOSBox will stop/exit without a warning if an error occurred!\033[0m\n" @@ -1711,67 +1745,86 @@ "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBC\033[0m\n" ); MSG_Add("PROGRAM_INTRO_MOUNT_END", - "When the mount has successfully completed you can type \033[34;1mc:\033[0m to go to your freshly\n" + "After successfully mounting the disk you can type \033[34;1mc:\033[0m to go to your freshly\n" "mounted C-drive. Typing \033[34;1mdir\033[0m there will show its contents." " \033[34;1mcd\033[0m will allow you to\n" "enter a directory (recognised by the \033[33;1m[]\033[0m in a directory listing).\n" - "You can run programs/files which end with \033[31m.exe .bat\033[0m and \033[31m.com\033[0m.\n" - ); - MSG_Add("PROGRAM_INTRO_CDROM", - "\033[2J\033[32;1mHow to mount a virtual CD-ROM Drive in DOSBox:\033[0m\n" - "DOSBox provides CD-ROM emulation on several levels.\n" - "\n" - "This works on all normal directories, installs MSCDEX and marks the files\n" - "read-only. Usually this is enough for most games:\n" - "\n" - "\033[34;1mmount D C:\\example -t cdrom\033[0m\n" - "\n" - "If it doesn't work you might have to tell DOSBox the label of the CD-ROM:\n" - "\n" - "\033[34;1mmount D C:\\example -t cdrom -label CDLABEL\033[0m\n" - "\n" - "Additionally, you can use IMGMOUNT to mount ISO images or CUE files:\n" - "\n" - "\033[34;1mimgmount D C:\\cd.iso -t cdrom\033[0m\n" + "You can run programs/files with extensions \033[31m.exe .bat\033[0m and \033[31m.com\033[0m.\n" ); + MSG_Add("PROGRAM_INTRO_CDROM_WINDOWS", + "\033[2J\033[32;1mHow to mount a virtual CD-ROM Drive in DOSBox:\033[0m\n" + "DOSBox provides CD-ROM emulation on several levels.\n" + "\n" + "This works on all normal directories, installs MSCDEX and marks the files\n" + "read-only. Usually this is enough for most games:\n" + "\n" + "\033[34;1mmount D C:\\example -t cdrom\033[0m\n" + "\n" + "If it doesn't work you might have to tell DOSBox the label of the CD-ROM:\n" + "\n" + "\033[34;1mmount D C:\\example -t cdrom -label CDLABEL\033[0m\n" + "\n" + "Additionally, you can use imgmount to mount iso or cue/bin images:\n" + "\n" + "\033[34;1mimgmount D C:\\cd.iso -t cdrom\033[0m\n" + "\n" + "\033[34;1mimgmount D C:\\cd.cue -t cdrom\033[0m\n"); + MSG_Add("PROGRAM_INTRO_CDROM_OTHER", + "\033[2J\033[32;1mHow to mount a virtual CD-ROM Drive in DOSBox:\033[0m\n" + "DOSBox provides CD-ROM emulation on several levels.\n" + "\n" + "This works on all normal directories, installs MSCDEX and marks the files\n" + "read-only. Usually this is enough for most games:\n" + "\n" + "\033[34;1mmount D ~/example -t cdrom\033[0m\n" + "\n" + "If it doesn't work you might have to tell DOSBox the label of the CD-ROM:\n" + "\n" + "\033[34;1mmount D ~/example -t cdrom -label CDLABEL\033[0m\n" + "\n" + "Additionally, you can use imgmount to mount iso or cue/bin images:\n" + "\n" + "\033[34;1mimgmount D ~/cd.iso -t cdrom\033[0m\n" + "\n" + "\033[34;1mimgmount D ~/cd.cue -t cdrom\033[0m\n"); MSG_Add("PROGRAM_INTRO_SPECIAL", - "\033[2J\033[32;1mSpecial keys:\033[0m\n" - "These are the default keybindings.\n" - "They can be changed in the \033[33mkeymapper\033[0m.\n" - "\n" - "\033[33;1mALT-ENTER\033[0m : Switch between fullscreen and window mode.\n" - "\033[33;1mALT-PAUSE\033[0m : Pause/Unpause emulator.\n" - "\033[33;1mCTRL-F1\033[0m : Start the \033[33mkeymapper\033[0m.\n" - "\033[33;1mCTRL-F4\033[0m : Swap mounted disk image, update directory cache for all drives.\n" - "\033[33;1mCTRL-F5\033[0m : Save a screenshot.\n" - "\033[33;1mCTRL-F6\033[0m : Start/Stop recording sound output to a wave file.\n" - "\033[33;1mCTRL-F7\033[0m : Start/Stop recording video output to a zmbv file.\n" - "\033[33;1mCTRL-F9\033[0m : Shutdown emulator.\n" - "\033[33;1mCTRL-F10\033[0m : Capture/Release the mouse.\n" - "\033[33;1mCTRL-F11\033[0m : Slow down emulation.\n" - "\033[33;1mCTRL-F12\033[0m : Speed up emulation.\n" - "\033[33;1mALT-F12\033[0m : Unlock speed (turbo button/fast forward).\n" - ); + "\033[2J\033[32;1mSpecial keys:\033[0m\n" + "These are the default keybindings.\n" + "They can be changed in the \033[33mkeymapper\033[0m.\n" + "\n" + "\033[33;1m" MMOD2_NAME "+Enter\033[0m Switch between fullscreen and window mode.\n" + "\033[33;1m" MMOD2_NAME "+Pause\033[0m Pause/Unpause emulator.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F1\033[0m " PRIMARY_MOD_PAD " Start the \033[33mkeymapper\033[0m.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F4\033[0m " PRIMARY_MOD_PAD " Swap mounted disk image, update directory cache for all drives.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F5\033[0m " PRIMARY_MOD_PAD " Save a screenshot.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F6\033[0m " PRIMARY_MOD_PAD " Start/Stop recording sound output to a wave file.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F7\033[0m " PRIMARY_MOD_PAD " Start/Stop recording video output to a zmbv file.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F9\033[0m " PRIMARY_MOD_PAD " Shutdown emulator.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F10\033[0m " PRIMARY_MOD_PAD " Capture/Release the mouse.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F11\033[0m " PRIMARY_MOD_PAD " Slow down emulation.\n" + "\033[33;1m" PRIMARY_MOD_NAME "+F12\033[0m " PRIMARY_MOD_PAD " Speed up emulation.\n" + "\033[33;1m" MMOD2_NAME "+F12\033[0m Unlock speed (turbo button/fast forward).\n"); + MSG_Add("PROGRAM_BOOT_NOT_EXIST","Bootdisk file does not exist. Failing.\n"); MSG_Add("PROGRAM_BOOT_NOT_OPEN","Cannot open bootdisk file. Failing.\n"); MSG_Add("PROGRAM_BOOT_WRITE_PROTECTED","Image file is read-only! Might create problems.\n"); - MSG_Add("PROGRAM_BOOT_PRINT_ERROR","This command boots DOSBox from either a floppy or hard disk image.\n\n" - "For this command, one can specify a succession of floppy disks swappable\n" - "by pressing Ctrl-F4, and -l specifies the mounted drive to boot from. If\n" - "no drive letter is specified, this defaults to booting from the A drive.\n" - "The only bootable drive letters are A, C, and D. For booting from a hard\n" - "drive (C or D), the image should have already been mounted using the\n" - "\033[34;1mIMGMOUNT\033[0m command.\n\n" - "The syntax of this command is:\n\n" - "\033[34;1mBOOT [diskimg1.img diskimg2.img] [-l driveletter]\033[0m\n" - ); + MSG_Add("PROGRAM_BOOT_PRINT_ERROR", + "This command boots DOSBox from either a floppy or hard disk image.\n\n" + "For this command, one can specify a succession of floppy disks swappable\n" + "by pressing " PRIMARY_MOD_NAME "+F4, and -l specifies the mounted drive to boot from. If\n" + "no drive letter is specified, this defaults to booting from the A drive.\n" + "The only bootable drive letters are A, C, and D. For booting from a hard\n" + "drive (C or D), the image should have already been mounted using the\n" + "\033[34;1mIMGMOUNT\033[0m command.\n\n" + "The syntax of this command is:\n\n" + "\033[34;1mBOOT [diskimg1.img diskimg2.img] [-l driveletter]\033[0m\n"); MSG_Add("PROGRAM_BOOT_UNABLE","Unable to boot off of drive %c"); MSG_Add("PROGRAM_BOOT_IMAGE_OPEN","Opening image file: %s\n"); MSG_Add("PROGRAM_BOOT_IMAGE_NOT_OPEN","Cannot open %s"); MSG_Add("PROGRAM_BOOT_BOOT","Booting from drive %c...\n"); MSG_Add("PROGRAM_BOOT_CART_WO_PCJR","PCjr cartridge found, but machine is not PCjr"); - MSG_Add("PROGRAM_BOOT_CART_LIST_CMDS","Available PCjr cartridge commandos:%s"); - MSG_Add("PROGRAM_BOOT_CART_NO_CMDS","No PCjr cartridge commandos found"); + MSG_Add("PROGRAM_BOOT_CART_LIST_CMDS", "Available PCjr cartridge commands: %s"); + MSG_Add("PROGRAM_BOOT_CART_NO_CMDS", "No PCjr cartridge commands found"); MSG_Add("PROGRAM_LOADROM_SPECIFY_FILE","Must specify ROM file to load.\n"); MSG_Add("PROGRAM_LOADROM_CANT_OPEN","ROM file not accessible.\n"); @@ -1787,10 +1840,11 @@ "Mount a CD-ROM, floppy, or disk image to a drive letter.\n" "\n" "Usage:\n" - " \033[32;1mimgmount\033[0m \033[37;1mDRIVE\033[0m \033[36;1mCDROM-SET\033[0m [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso \n" + " \033[32;1mimgmount\033[0m \033[37;1mDRIVE\033[0m \033[36;1mCDROM-SET\033[0m [CDROM-SET2 [..]] [-fs iso] -t cdrom|iso\n" " \033[32;1mimgmount\033[0m \033[37;1mDRIVE\033[0m \033[36;1mIMAGEFILE\033[0m [IMAGEFILE2 [..]] [-fs fat] -t hdd|floppy\n" " \033[32;1mimgmount\033[0m \033[37;1mDRIVE\033[0m \033[36;1mBOOTIMAGE\033[0m [-fs fat|none] -t hdd -size GEOMETRY\n" " \033[32;1mimgmount\033[0m -u \033[37;1mDRIVE\033[0m (unmounts the DRIVE's image)\n" + "\n" "Where:\n" " \033[37;1mDRIVE\033[0m is the drive letter where the image will be mounted: a, c, d, ...\n" " \033[36;1mCDROM-SET\033[0m is an ISO, CUE+BIN, CUE+ISO, or CUE+ISO+FLAC/OPUS/OGG/MP3/WAV\n" @@ -1798,9 +1852,8 @@ " \033[36;1mBOOTIMAGE\033[0m is a bootable disk image with specified -size GEOMETRY:\n" " bytes-per-sector,sectors-per-head,heads,cylinders\n" "Notes:\n" - " - Image paths and filenames are case-insensitive and either relative or\n" - " absolute with respect to dosbox's current-working directory.\n" - " - Ctrl+F4 swaps & mounts the next CDROM-SET or IMAGEFILE, if provided.\n" + " - " PRIMARY_MOD_NAME "+F4 swaps & mounts the next CDROM-SET or IMAGEFILE, if provided.\n" + "\n" "Examples:\n" #if defined(WIN32) " \033[32;1mimgmount\033[0m \033[37;1mD\033[0m \033[36;1mC:\\games\\doom.iso\033[0m -t cdrom\n" @@ -1841,8 +1894,6 @@ " LABEL drive label name to be used\n" "\n" "Notes:\n" - " - \033[36;1mDIRECTORY\033[0m is case-insensitive path, relative or absolute with respect to\n" - " dosbox's current-working directory.\n" " - '-t overlay' redirects writes for mounted drive to another directory.\n" " - Additional options are described in the manual (README file, chapter 4).\n" "\n" diff -Nru dosbox-staging-0.76.0/src/dos/dos_tables.cpp dosbox-staging-0.77.0/src/dos/dos_tables.cpp --- dosbox-staging-0.76.0/src/dos/dos_tables.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/dos_tables.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/dos/drive_cache.cpp dosbox-staging-0.77.0/src/dos/drive_cache.cpp --- dosbox-staging-0.76.0/src/dos/drive_cache.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/drive_cache.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ #include "cross.h" #include "dos_inc.h" #include "drives.h" +#include "string_utils.h" #include "support.h" int fileInfoCounter = 0; diff -Nru dosbox-staging-0.76.0/src/dos/drive_fat.cpp dosbox-staging-0.77.0/src/dos/drive_fat.cpp --- dosbox-staging-0.76.0/src/dos/drive_fat.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/drive_fat.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,19 +16,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "drives.h" #include #include #include #include -#include "dosbox.h" +#include "bios_disk.h" +#include "bios.h" +#include "cross.h" #include "dos_inc.h" -#include "drives.h" +#include "string_utils.h" #include "support.h" -#include "cross.h" -#include "bios.h" -#include "bios_disk.h" #define IMGTYPE_FLOPPY 0 #define IMGTYPE_ISO 1 @@ -38,7 +38,7 @@ #define FAT16 1 #define FAT32 2 -class fatFile : public DOS_File { +class fatFile final : public DOS_File { public: fatFile(const char* name, Bit32u startCluster, Bit32u fileLen, fatDrive *useDrive); fatFile(const fatFile&) = delete; // prevent copy @@ -1014,8 +1014,10 @@ bool fatDrive::FileExists(const char *name) { direntry fileEntry; Bit32u dummy1, dummy2; - if(!getFileDirEntry(name, &fileEntry, &dummy1, &dummy2)) return false; - return true; + Bit16u save_errorcode = dos.errorcode; + bool found = getFileDirEntry(name, &fileEntry, &dummy1, &dummy2); + dos.errorcode = save_errorcode; + return found; } bool fatDrive::FileOpen(DOS_File **file, char *name, Bit32u flags) { @@ -1092,7 +1094,11 @@ } char* removeTrailingSpaces(char* str, const size_t max_len) { - char* end = str + strnlen(str, max_len); + const auto str_len = strnlen(str, max_len); + if (str_len == 0) + return str; + + char* end = str + str_len; while((*--end == ' ') && (end > str)) { /* do nothing; break on while criteria */ } @@ -1519,4 +1525,3 @@ Bit32u dummyClust; return getDirClustNum(dir, &dummyClust, false); } - diff -Nru dosbox-staging-0.76.0/src/dos/drive_iso.cpp dosbox-staging-0.77.0/src/dos/drive_iso.cpp --- dosbox-staging-0.76.0/src/dos/drive_iso.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/drive_iso.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,20 +16,21 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "drives.h" #include #include + #include "cdrom.h" -#include "dosbox.h" #include "dos_mscdex.h" #include "dos_system.h" +#include "string_utils.h" #include "support.h" -#include "drives.h" #define FLAGS1 ((iso) ? de.fileFlags : de.timeZone) #define FLAGS2 ((iso) ? de->fileFlags : de->timeZone) -class isoFile : public DOS_File { +class isoFile final : public DOS_File { public: isoFile(isoDrive *drive, const char *name, FileStat_Block *stat, uint32_t offset); isoFile(const isoFile &) = delete; // prevent copying diff -Nru dosbox-staging-0.76.0/src/dos/drive_local.cpp dosbox-staging-0.77.0/src/dos/drive_local.cpp --- dosbox-staging-0.76.0/src/dos/drive_local.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/drive_local.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,11 +27,11 @@ #include #include #include +#include #include #include #include #include -#include #ifdef _MSC_VER #include @@ -39,7 +42,7 @@ #include "dos_inc.h" #include "dos_mscdex.h" #include "fs_utils.h" -#include "support.h" +#include "string_utils.h" #include "cross.h" #include "inout.h" @@ -360,10 +363,10 @@ } find_size=(Bit32u) stat_block.st_size; - struct tm *time; - if ((time=localtime(&stat_block.st_mtime))!=0) { - find_date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday); - find_time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec); + struct tm datetime; + if (cross::localtime_r(&stat_block.st_mtime, &datetime)) { + find_date = DOS_PackDate(datetime); + find_time = DOS_PackTime(datetime); } else { find_time=6; find_date=4; @@ -473,12 +476,12 @@ struct stat temp_stat; if (stat(newname,&temp_stat)!=0) return false; /* Convert the stat to a FileStat */ - struct tm *time; - if ((time=localtime(&temp_stat.st_mtime))!=0) { - stat_block->time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec); - stat_block->date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday); + struct tm datetime; + if (cross::localtime_r(&temp_stat.st_mtime, &datetime)) { + stat_block->time = DOS_PackTime(datetime); + stat_block->date = DOS_PackDate(datetime); } else { - + LOG_MSG("FS: error while converting date in: %s", name); } stat_block->size=(Bit32u)temp_stat.st_size; return true; @@ -683,7 +686,7 @@ if (newtime) { // backport from DOS_PackDate() and DOS_PackTime() - tm tim = {0}; + struct tm tim = {}; tim.tm_sec = (time & 0x1f) * 2; tim.tm_min = (time >> 5) & 0x3f; tim.tm_hour = (time >> 11) & 0x1f; @@ -748,17 +751,12 @@ if (fstat(file, &temp_stat) == -1) return true; // use defaults - const tm *ltime = localtime(&temp_stat.st_mtime); - if (!ltime) + struct tm datetime; + if (!cross::localtime_r(&temp_stat.st_mtime, &datetime)) return true; // use defaults - time = DOS_PackTime(static_cast(ltime->tm_hour), - static_cast(ltime->tm_min), - static_cast(ltime->tm_sec)); - - date = DOS_PackDate(static_cast(ltime->tm_year + 1900), - static_cast(ltime->tm_mon + 1), - static_cast(ltime->tm_mday)); + time = DOS_PackTime(datetime); + date = DOS_PackDate(datetime); return true; } diff -Nru dosbox-staging-0.76.0/src/dos/drive_overlay.cpp dosbox-staging-0.77.0/src/dos/drive_overlay.cpp --- dosbox-staging-0.76.0/src/dos/drive_overlay.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/drive_overlay.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,23 +16,21 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "dosbox.h" -#include "dos_inc.h" #include "drives.h" -#include "support.h" -#include "cross.h" -#include "inout.h" -#include "timer.h" #include #include - #include #include #include #include #include +#include "dos_inc.h" +#include "string_utils.h" +#include "cross.h" +#include "inout.h" +#include "timer.h" #include "fs_utils.h" #define OVERLAY_DIR 1 @@ -46,7 +44,6 @@ #define CROSS_DOSFILENAME(blah) strreplace(blah,'/','\\') #endif - /* * design principles/limitations/requirements: * 1) All filenames inside the overlay directories are UPPERCASE and conform to the 8.3 standard except for the special DBOVERLAY files. @@ -195,7 +192,7 @@ return localDrive::TestDir(dir); } -class OverlayFile : public localFile { +class OverlayFile final : public localFile { public: OverlayFile(const char *name, FILE *handle, const char *basedir) : localFile(name, handle, basedir), @@ -212,11 +209,11 @@ if (*data == 0) { if (logoverlay) LOG_MSG("OPTIMISE: truncate on switch!!!!"); } - Bit32u a = GetTicks(); + const auto a = logoverlay ? GetTicks() : 0; bool r = create_copy(); - if (GetTicks() - a > 2) { - if (logoverlay) LOG_MSG("OPTIMISE: switching took %d",GetTicks() - a); - } + const auto b = logoverlay ? GetTicksSince(a) : 0; + if (b > 2) + LOG_MSG("OPTIMISE: switching took %d", b); if (!r) return false; overlay_active = true; @@ -558,7 +555,7 @@ return true; } void Overlay_Drive::update_cache(bool read_directory_contents) { - Bit32u a = GetTicks(); + const auto a = logoverlay ? GetTicks() : 0; std::vector specials; std::vector dirnames; std::vector filenames; @@ -736,7 +733,8 @@ } } - if (logoverlay) LOG_MSG("OPTIMISE: update cache took %d",GetTicks()-a); + if (logoverlay) + LOG_MSG("OPTIMISE: update cache took %d", GetTicksSince(a)); } bool Overlay_Drive::FindNext(DOS_DTA & dta) { @@ -820,10 +818,10 @@ } find_size=(Bit32u) stat_block.st_size; - struct tm *time; - if((time=localtime(&stat_block.st_mtime))!=0){ - find_date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday); - find_time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec); + struct tm datetime; + if (cross::localtime_r(&stat_block.st_mtime, &datetime)) { + find_date = DOS_PackDate(datetime); + find_time = DOS_PackTime(datetime); } else { find_time=6; find_date=4; @@ -835,15 +833,15 @@ bool Overlay_Drive::FileUnlink(char * name) { -//TODO check the basedir for file existence in order if we need to add the file to deleted file list. - Bit32u a = GetTicks(); - if (logoverlay) LOG_MSG("calling unlink on %s",name); + // TODO check the basedir for file existence in order if we need to add the file to deleted file list. + const auto a = logoverlay ? GetTicks() : 0; + if (logoverlay) + LOG_MSG("calling unlink on %s", name); char basename[CROSS_LEN]; safe_strcpy(basename, basedir); safe_strcat(basename, name); CROSS_FILENAME(basename); - char overlayname[CROSS_LEN]; safe_strcpy(overlayname, overlaydir); safe_strcat(overlayname, name); @@ -922,7 +920,8 @@ dirCache.DeleteEntry(basename); update_cache(false); - if (logoverlay) LOG_MSG("OPTIMISE: unlink took %d",GetTicks()-a); + if (logoverlay) + LOG_MSG("OPTIMISE: unlink took %d", GetTicksSince(a)); return true; } } @@ -1119,7 +1118,7 @@ E_Exit("renaming directory %s to %s . Not yet supported in Overlay",oldname,newname); //TODO } - Bit32u a = GetTicks(); + const auto a = logoverlay ? GetTicks() : 0; //First generate overlay names. char overlaynameold[CROSS_LEN]; safe_strcpy(overlaynameold, overlaydir); @@ -1142,7 +1141,7 @@ //TODO CHECK if base has a file with same oldname!!!!! if it does mark it as deleted!! if (localDrive::FileExists(oldname)) add_deleted_file(oldname,true); } else { - Bit32u aa = GetTicks(); + const auto aa = logoverlay ? GetTicks() : 0; //File exists in the basedrive. Make a copy and mark old one as deleted. char newold[CROSS_LEN]; safe_strcpy(newold, basedir); @@ -1162,8 +1161,9 @@ //Mark old file as deleted add_deleted_file(oldname,true); temp =0; //success - if (logoverlay) LOG_MSG("OPTIMISE: update rename with copy took %d",GetTicks()-aa); - + if (logoverlay) + LOG_MSG("OPTIMISE: update rename with copy took %d", + GetTicksSince(aa)); } if (temp ==0) { //handle the drive_cache (a bit better) @@ -1171,8 +1171,8 @@ if (is_deleted_file(newname)) remove_deleted_file(newname,true); dirCache.EmptyCache(); update_cache(true); - if (logoverlay) LOG_MSG("OPTIMISE: rename took %d",GetTicks()-a); - + if (logoverlay) + LOG_MSG("OPTIMISE: rename took %d", GetTicksSince(a)); } return (temp==0); @@ -1202,12 +1202,12 @@ return localDrive::FileStat(name,stat_block); } /* Convert the stat to a FileStat */ - struct tm *time; - if((time=localtime(&temp_stat.st_mtime))!=0) { - stat_block->time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec); - stat_block->date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday); + struct tm datetime; + if (cross::localtime_r(&temp_stat.st_mtime, &datetime)) { + stat_block->time = DOS_PackTime(datetime); + stat_block->date = DOS_PackDate(datetime); } else { - // ... But this function is not used at the moment. + LOG_MSG("OVERLAY: Error while converting date in: %s", name); } stat_block->size=(Bit32u)temp_stat.st_size; return true; diff -Nru dosbox-staging-0.76.0/src/dos/drives.cpp dosbox-staging-0.77.0/src/dos/drives.cpp --- dosbox-staging-0.76.0/src/dos/drives.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/drives.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ #include "drives.h" -#include "support.h" +#include "string_utils.h" bool WildFileCmp(const char *file, const char *wild) { @@ -73,7 +73,13 @@ return true; } - +// TODO Right now label formatting seems to be a bit of mess, with various +// places in code setting/expecting different format, so simple GetLabel() on +// a drive object might not yield an expected result. Not sure how to sort it +// out, but it will require some attention to detail. +// Also: this function is too strict - it removes all punctuation when *some* +// punctuation is acceptable in drive labels (e.g. '_' or '-'). +// std::string To_Label(const char* name) { // Reformat the name per the DOS label specification: // - Upper-case, up to 11 ASCII characters @@ -123,6 +129,11 @@ info[0] = '\0'; } +void DOS_Drive::SetDir(const char *path) +{ + safe_strcpy(curdir, path); +} + // static members variables int DriveManager::currentDrive; DriveManager::DriveInfo DriveManager::driveInfos[26]; diff -Nru dosbox-staging-0.76.0/src/dos/drive_virtual.cpp dosbox-staging-0.77.0/src/dos/drive_virtual.cpp --- dosbox-staging-0.76.0/src/dos/drive_virtual.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/drive_virtual.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,13 +16,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "drives.h" + #include #include #include #include -#include "dosbox.h" + #include "dos_inc.h" -#include "drives.h" #include "support.h" #include "cross.h" @@ -36,35 +37,35 @@ }; -static VFILE_Block * first_file; +static VFILE_Block * first_file; void VFILE_Register(const char * name,Bit8u * data,Bit32u size) { - VFILE_Block * new_file=new VFILE_Block; - new_file->name=name; - new_file->data=data; - new_file->size=size; - new_file->date=DOS_PackDate(2002,10,1); - new_file->time=DOS_PackTime(12,34,56); - new_file->next=first_file; - first_file=new_file; + VFILE_Block * new_file = new VFILE_Block; + new_file->name = name; + new_file->data = data; + new_file->size = size; + new_file->date = DOS_PackDate(2002,10,1); + new_file->time = DOS_PackTime(12,34,56); + new_file->next = first_file; + first_file = new_file; } void VFILE_Remove(const char *name) { - VFILE_Block * chan=first_file; - VFILE_Block * * where=&first_file; + VFILE_Block * chan = first_file; + VFILE_Block * * where = &first_file; while (chan) { if (strcmp(name,chan->name) == 0) { *where = chan->next; - if(chan == first_file) first_file = chan->next; + if (chan == first_file) first_file = chan->next; delete chan; return; } - where=&chan->next; - chan=chan->next; + where = &chan->next; + chan = chan->next; } } -class Virtual_File : public DOS_File { +class Virtual_File final : public DOS_File { public: Virtual_File(uint8_t *in_data, uint32_t in_size); @@ -88,24 +89,24 @@ file_pos(0), file_data(in_data) { - date=DOS_PackDate(2002,10,1); - time=DOS_PackTime(12,34,56); - open=true; + date = DOS_PackDate(2002,10,1); + time = DOS_PackTime(12,34,56); + open = true; } bool Virtual_File::Read(Bit8u * data,Bit16u * size) { Bit32u left=file_size-file_pos; - if (left<=*size) { - memcpy(data,&file_data[file_pos],left); - *size=(Bit16u)left; + if (left <= *size) { + memcpy(data, &file_data[file_pos], left); + *size = (Bit16u)left; } else { - memcpy(data,&file_data[file_pos],*size); + memcpy(data, &file_data[file_pos], *size); } - file_pos+=*size; + file_pos += *size; return true; } -bool Virtual_File::Write(Bit8u * data,Bit16u * size){ +bool Virtual_File::Write(Bit8u * /*data*/,Bit16u * /*size*/){ /* Not really writable */ return false; } @@ -113,19 +114,19 @@ bool Virtual_File::Seek(Bit32u * new_pos,Bit32u type){ switch (type) { case DOS_SEEK_SET: - if (*new_pos<=file_size) file_pos=*new_pos; + if (*new_pos <= file_size) file_pos = *new_pos; else return false; break; case DOS_SEEK_CUR: - if ((*new_pos+file_pos)<=file_size) file_pos=*new_pos+file_pos; + if ((*new_pos + file_pos) <= file_size) file_pos = *new_pos + file_pos; else return false; break; case DOS_SEEK_END: - if (*new_pos<=file_size) file_pos=file_size-*new_pos; + if (*new_pos <= file_size) file_pos = file_size - *new_pos; else return false; break; } - *new_pos=file_pos; + *new_pos = file_pos; return true; } @@ -145,33 +146,33 @@ bool Virtual_Drive::FileOpen(DOS_File * * file,char * name,Bit32u flags) { /* Scan through the internal list of files */ - VFILE_Block * cur_file=first_file; + VFILE_Block * cur_file = first_file; while (cur_file) { - if (strcasecmp(name,cur_file->name)==0) { + if (strcasecmp(name,cur_file->name) == 0) { /* We have a match */ - *file=new Virtual_File(cur_file->data,cur_file->size); - (*file)->flags=flags; + *file = new Virtual_File(cur_file->data, cur_file->size); + (*file)->flags = flags; return true; } - cur_file=cur_file->next; + cur_file = cur_file->next; } return false; } -bool Virtual_Drive::FileCreate(DOS_File * * file,char * name,Bit16u attributes) { +bool Virtual_Drive::FileCreate(DOS_File * * /*file*/,char * /*name*/,Bit16u /*attributes*/) { return false; } -bool Virtual_Drive::FileUnlink(char * name) { +bool Virtual_Drive::FileUnlink(char * /*name*/) { DOS_SetError(DOSERR_ACCESS_DENIED); return false; } -bool Virtual_Drive::RemoveDir(char * dir) { +bool Virtual_Drive::RemoveDir(char * /*dir*/) { return false; } -bool Virtual_Drive::MakeDir(char * dir) { +bool Virtual_Drive::MakeDir(char * /*dir*/) { return false; } @@ -181,31 +182,31 @@ } bool Virtual_Drive::FileStat(const char* name, FileStat_Block * const stat_block){ - VFILE_Block * cur_file=first_file; + VFILE_Block * cur_file = first_file; while (cur_file) { - if (strcasecmp(name,cur_file->name)==0) { - stat_block->attr=DOS_ATTR_ARCHIVE; - stat_block->size=cur_file->size; - stat_block->date=DOS_PackDate(2002,10,1); - stat_block->time=DOS_PackTime(12,34,56); + if (strcasecmp(name,cur_file->name) == 0) { + stat_block->attr = DOS_ATTR_ARCHIVE; + stat_block->size = cur_file->size; + stat_block->date = DOS_PackDate(2002,10,1); + stat_block->time = DOS_PackTime(12,34,56); return true; } - cur_file=cur_file->next; + cur_file = cur_file->next; } return false; } bool Virtual_Drive::FileExists(const char* name){ - VFILE_Block * cur_file=first_file; + VFILE_Block * cur_file = first_file; while (cur_file) { - if (strcasecmp(name,cur_file->name)==0) return true; - cur_file=cur_file->next; + if (strcasecmp(name, cur_file->name) == 0) return true; + cur_file = cur_file->next; } return false; } -bool Virtual_Drive::FindFirst(char * _dir,DOS_DTA & dta,bool fcb_findfirst) { - search_file=first_file; +bool Virtual_Drive::FindFirst(char * /*_dir*/,DOS_DTA & dta,bool fcb_findfirst) { + search_file = first_file; Bit8u attr;char pattern[DOS_NAMELENGTH_ASCII]; dta.GetSearchParams(attr,pattern); if (attr == DOS_ATTR_VOLUME) { @@ -222,40 +223,40 @@ bool Virtual_Drive::FindNext(DOS_DTA & dta) { Bit8u attr;char pattern[DOS_NAMELENGTH_ASCII]; - dta.GetSearchParams(attr,pattern); + dta.GetSearchParams(attr, pattern); while (search_file) { - if (WildFileCmp(search_file->name,pattern)) { - dta.SetResult(search_file->name,search_file->size,search_file->date,search_file->time,DOS_ATTR_ARCHIVE); - search_file=search_file->next; + if (WildFileCmp(search_file->name, pattern)) { + dta.SetResult(search_file->name, search_file->size, search_file->date, search_file->time, DOS_ATTR_ARCHIVE); + search_file = search_file->next; return true; } - search_file=search_file->next; + search_file = search_file->next; } DOS_SetError(DOSERR_NO_MORE_FILES); return false; } bool Virtual_Drive::GetFileAttr(char * name,Bit16u * attr) { - VFILE_Block * cur_file=first_file; + VFILE_Block * cur_file = first_file; while (cur_file) { - if (strcasecmp(name,cur_file->name)==0) { + if (strcasecmp(name, cur_file->name) == 0) { *attr = DOS_ATTR_ARCHIVE; //Maybe readonly ? return true; } - cur_file=cur_file->next; + cur_file = cur_file->next; } return false; } -bool Virtual_Drive::Rename(char * oldname,char * newname) { +bool Virtual_Drive::Rename(char * /*oldname*/,char * /*newname*/) { return false; } bool Virtual_Drive::AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,Bit16u * _total_clusters,Bit16u * _free_clusters) { - *_bytes_sector=512; - *_sectors_cluster=32; - *_total_clusters=32765; // total size is always 500 mb - *_free_clusters=0; // nothing free here + *_bytes_sector = 512; + *_sectors_cluster = 32; + *_total_clusters = 32765; // total size is always 500 mb + *_free_clusters = 0; // nothing free here return true; } diff -Nru dosbox-staging-0.76.0/src/dos/.gitignore dosbox-staging-0.77.0/src/dos/.gitignore --- dosbox-staging-0.76.0/src/dos/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/dos/Makefile.am dosbox-staging-0.77.0/src/dos/Makefile.am --- dosbox-staging-0.76.0/src/dos/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libdos.a - -libdos_a_SOURCES = \ - cdrom.cpp \ - cdrom.h \ - cdrom_image.cpp \ - dev_con.h \ - dos.cpp \ - dos_classes.cpp \ - dos_devices.cpp \ - dos_execute.cpp \ - dos_files.cpp \ - dos_ioctl.cpp \ - dos_keyboard_layout.cpp \ - dos_memory.cpp \ - dos_misc.cpp \ - dos_mscdex.cpp \ - dos_mscdex.h \ - dos_programs.cpp \ - dos_tables.cpp \ - drive_cache.cpp \ - drive_fat.cpp \ - drive_iso.cpp \ - drive_local.cpp \ - drive_overlay.cpp \ - drive_virtual.cpp \ - drives.cpp \ - program_autotype.cpp \ - program_autotype.h \ - program_ls.cpp \ - program_ls.h - -EXTRA_DIST = dos_codepages.h dos_keyboard_layout_data.h diff -Nru dosbox-staging-0.76.0/src/dos/meson.build dosbox-staging-0.77.0/src/dos/meson.build --- dosbox-staging-0.76.0/src/dos/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,33 @@ +libdos_sources = files([ + 'cdrom.cpp', + 'cdrom_image.cpp', + 'dos_classes.cpp', + 'dos.cpp', + 'dos_devices.cpp', + 'dos_execute.cpp', + 'dos_files.cpp', + 'dos_ioctl.cpp', + 'dos_keyboard_layout.cpp', + 'dos_memory.cpp', + 'dos_misc.cpp', + 'dos_mscdex.cpp', + 'dos_programs.cpp', + 'dos_tables.cpp', + 'drive_cache.cpp', + 'drive_fat.cpp', + 'drive_iso.cpp', + 'drive_local.cpp', + 'drive_overlay.cpp', + 'drives.cpp', + 'drive_virtual.cpp', + 'program_autotype.cpp', + 'program_ls.cpp', +]) + +libdos = static_library('dos', libdos_sources, + include_directories : incdir, + dependencies : [sdl2_dep, libdecoders_dep]) + +libdos_dep = declare_dependency(link_with : libdos) + +internal_deps += libdos_dep diff -Nru dosbox-staging-0.76.0/src/dos/program_autotype.cpp dosbox-staging-0.77.0/src/dos/program_autotype.cpp --- dosbox-staging-0.76.0/src/dos/program_autotype.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/program_autotype.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,23 +1,25 @@ /* - * SPDX-License-Identifier: GPL-2.0-or-later + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "program_autotype.h" + #include #include #include @@ -30,7 +32,6 @@ #include "mapper.h" #include "dosbox.h" #include "programs.h" -#include "program_autotype.h" void AUTOTYPE::PrintUsage() { diff -Nru dosbox-staging-0.76.0/src/dos/program_autotype.h dosbox-staging-0.77.0/src/dos/program_autotype.h --- dosbox-staging-0.76.0/src/dos/program_autotype.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/program_autotype.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,31 +1,31 @@ /* - * SPDX-License-Identifier: GPL-2.0-or-later + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef DOSBOX_PROGRAM_AUTOTYPE_H #define DOSBOX_PROGRAM_AUTOTYPE_H -#include - #include "programs.h" -class AUTOTYPE : public Program { +#include + +class AUTOTYPE final : public Program { public: void Run(); @@ -42,4 +42,4 @@ void AUTOTYPE_ProgramStart(Program **make); -#endif /* DOSBOX_PROGRAM_AUTOTYPE_H */ +#endif diff -Nru dosbox-staging-0.76.0/src/dos/program_ls.cpp dosbox-staging-0.77.0/src/dos/program_ls.cpp --- dosbox-staging-0.76.0/src/dos/program_ls.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/program_ls.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,21 +1,21 @@ /* - * SPDX-License-Identifier: GPL-2.0-or-later + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "program_ls.h" @@ -23,7 +23,7 @@ #include #include "shell.h" -#include "support.h" +#include "string_utils.h" void LS::Run() { diff -Nru dosbox-staging-0.76.0/src/dos/program_ls.h dosbox-staging-0.77.0/src/dos/program_ls.h --- dosbox-staging-0.76.0/src/dos/program_ls.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dos/program_ls.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,31 +1,31 @@ /* - * SPDX-License-Identifier: GPL-2.0-or-later + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef DOSBOX_PROGRAM_LS_H #define DOSBOX_PROGRAM_LS_H -#include - #include "programs.h" -class LS : public Program { +#include + +class LS final : public Program { public: void Run(); }; diff -Nru dosbox-staging-0.76.0/src/dosbox.cpp dosbox-staging-0.77.0/src/dosbox.cpp --- dosbox-staging-0.76.0/src/dosbox.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/dosbox.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,13 +19,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dosbox.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include "dosbox.h" + +#include + #include "debug.h" #include "cpu.h" #include "video.h" @@ -34,6 +40,7 @@ #include "timer.h" #include "dos_inc.h" #include "setup.h" +#include "shell.h" #include "control.h" #include "cross.h" #include "programs.h" @@ -45,7 +52,13 @@ #include "midi.h" #include "hardware.h" +#if C_NE2000 +//#include "ne2000.h" +void NE2K_Init(Section* sec); +#endif + Config * control; +bool exit_requested = false; MachineType machine; SVGACards svgaCard; @@ -88,6 +101,8 @@ void PCSPEAKER_Init(Section*); void TANDYSOUND_Init(Section*); void DISNEY_Init(Section*); +void PS1AUDIO_Init(Section *); +void INNOVA_Init(Section*); void SERIAL_Init(Section*); @@ -122,17 +137,18 @@ bool SDLNetInited; -static Bit32u ticksRemain; -static Bit32u ticksLast; -static Bit32u ticksAdded; -Bit32s ticksDone; -Bit32u ticksScheduled; +static std::function delay_fn = Delay; +static int ticksRemain; +static int64_t ticksLast; +static int ticksAdded; +int ticksDone; +int ticksScheduled; bool ticksLocked; void increaseticks(); - bool mono_cga=false; -static Bitu Normal_Loop(void) { +static Bitu Normal_Loop() +{ Bits ret; while (1) { if (PIC_RunQueue()) { @@ -147,18 +163,20 @@ if (DEBUG_ExitLoop()) return 0; #endif } else { - GFX_Events(); - if (ticksRemain>0) { + if (!GFX_MaybeProcessEvents()) { + return 0; + } + if (ticksRemain > 0) { TIMER_AddTick(); ticksRemain--; - } else {increaseticks();return 0;} + } else { + increaseticks(); + return 0; + } } } } -//For trying other delays -#define wrap_delay(a) SDL_Delay(a) - void increaseticks() { //Make it return ticksRemain and set it in the function above to remove the global variable. if (GCC_UNLIKELY(ticksLocked)) { // For Fast Forward Mode ticksRemain=5; @@ -169,30 +187,29 @@ ticksScheduled = 0; return; } - + static Bit32s lastsleepDone = -1; static Bitu sleep1count = 0; - Bit32u ticksNew; - ticksNew = GetTicks(); + const auto ticksNew = GetTicks(); ticksScheduled += ticksAdded; if (ticksNew <= ticksLast) { //lower should not be possible, only equal. ticksAdded = 0; if (!CPU_CycleAutoAdjust || CPU_SkipCycleAutoAdjust || sleep1count < 3) { - wrap_delay(1); + delay_fn(1); } else { /* Certain configurations always give an exact sleepingtime of 1, this causes problems due to the fact that dosbox keeps track of full blocks. This code introduces some randomness to the time slept, which improves stability on those configurations */ - static const Bit32u sleeppattern[] = { 2, 2, 3, 2, 2, 4, 2}; + static const Bit32u sleeppattern[] = { 2, 2, 3, 2, 2, 4, 2 }; static Bit32u sleepindex = 0; if (ticksDone != lastsleepDone) sleepindex = 0; - wrap_delay(sleeppattern[sleepindex++]); + delay_fn(sleeppattern[sleepindex++]); sleepindex %= sizeof(sleeppattern) / sizeof(sleeppattern[0]); } - Bit32s timeslept = GetTicks() - ticksNew; + auto timeslept = GetTicksSince(ticksNew); // Count how many times in the current block (of 250 ms) the time slept was 1 ms if (CPU_CycleAutoAdjust && !CPU_SkipCycleAutoAdjust && timeslept == 1) sleep1count++; lastsleepDone = ticksDone; @@ -203,17 +220,17 @@ ticksDone = 0; return; //0 - // If we do work this tick and sleep till the next tick, then ticksDone is decreased, + // If we do work this tick and sleep till the next tick, then ticksDone is decreased, // despite the fact that work was done as well in this tick. Maybe make it depend on an extra parameter. // What do we know: ticksRemain = 0 (condition to enter this function) // ticksNew = time before sleeping - + // maybe keep track of sleeped time in this frame, and use sleeped and done as indicators. (and take care of the fact there // are frames that have both. } //TicksNew > ticksLast - ticksRemain = ticksNew-ticksLast; + ticksRemain = GetTicksDiff(ticksNew, ticksLast); ticksLast = ticksNew; ticksDone += ticksRemain; if ( ticksRemain > 20 ) { @@ -224,7 +241,7 @@ // Is the system in auto cycle mode guessing ? If not just exit. (It can be temporary disabled) if (!CPU_CycleAutoAdjust || CPU_SkipCycleAutoAdjust) return; - + if (ticksScheduled >= 250 || ticksDone >= 250 || (ticksAdded > 15 && ticksScheduled >= 5) ) { if(ticksDone < 1) ticksDone = 1; // Protect against div by zero /* ratio we are aiming for is around 90% usage*/ @@ -316,11 +333,10 @@ loop=Normal_Loop; } -void DOSBOX_RunMachine(void){ - Bitu ret; - do { - ret=(*loop)(); - } while (!ret); +void DOSBOX_RunMachine() +{ + while ((*loop)() == 0 && !exit_requested) + ; } static void DOSBOX_UnlockSpeed( bool pressed ) { @@ -348,6 +364,8 @@ Section_prop * section=static_cast(sec); /* Initialize some dosbox internals */ + delay_fn = CanDelayPrecise() ? DelayPrecise : Delay; + ticksRemain=0; ticksLast=GetTicks(); ticksLocked = false; @@ -398,7 +416,7 @@ Prop_multival *pmulti; Prop_multival_remain* Pmulti_remain; - // Specifies if and when a setting can be changed + // Specifies if and when a setting can be changed constexpr auto always = Property::Changeable::Always; constexpr auto deprecated = Property::Changeable::Deprecated; constexpr auto only_at_start = Property::Changeable::OnlyAtStart; @@ -447,17 +465,21 @@ secprop->AddInitFunction(&TIMER_Init);//done secprop->AddInitFunction(&CMOS_Init);//done - const char *verbosity_choices[] = {"high", "medium", "low", - "quiet", "auto", 0}; + const char *verbosity_choices[] = {"high", "medium", + "low", "splash_only", + "quiet", "auto", + 0}; Pstring = secprop->Add_string("startup_verbosity", only_at_start, "high"); Pstring->Set_values(verbosity_choices); - Pstring->Set_help("Controls verbosity prior to displaying the program:\n" - " | Show splash | Show welcome | Show early stdout\n" - "high | yes | yes | yes\n" - "medium | no | yes | yes\n" - "low | no | no | yes\n" - "quiet | no | no | no\n" - "auto | 'low' if exec or dir is passed, otherwise 'high'"); + Pstring->Set_help( + "Controls verbosity prior to displaying the program:\n" + "Verbosity | Splash | Welcome | Early stdout\n" + "high | yes | yes | yes\n" + "medium | no | yes | yes\n" + "low | no | no | yes\n" + "quiet | no | no | no\n" + "splash_only | yes | no | no\n" + "auto | 'low' if exec or dir is passed, otherwise 'high'"); secprop=control->AddSection_prop("render",&RENDER_Init,true); Pint = secprop->Add_int("frameskip",Property::Changeable::Always,0); @@ -536,12 +558,12 @@ Pmulti_remain = secprop->Add_multiremain("cycles",Property::Changeable::Always," "); Pmulti_remain->Set_help( - "Amount of instructions DOSBox tries to emulate each millisecond.\n" + "Number of instructions DOSBox tries to emulate each millisecond.\n" "Setting this value too high results in sound dropouts and lags.\n" "Cycles can be set in 3 ways:\n" " 'auto' tries to guess what a game needs.\n" " It usually works, but can fail for certain games.\n" - " 'fixed #number' will set a fixed amount of cycles. This is what you usually\n" + " 'fixed #number' will set a fixed number of cycles. This is what you usually\n" " need if 'auto' fails (Example: fixed 4000).\n" " 'max' will allocate as much cycles as your computer is able to\n" " handle."); @@ -555,7 +577,8 @@ Pint = secprop->Add_int("cycleup",Property::Changeable::Always,10); Pint->SetMinMax(1,1000000); - Pint->Set_help("Amount of cycles to decrease/increase with keycombos.(CTRL-F11/CTRL-F12)"); + Pint->Set_help("Number of cycles to decrease/increase with keycombos. (" PRIMARY_MOD_NAME + "+F11/" PRIMARY_MOD_NAME "+F12)"); Pint = secprop->Add_int("cycledown",Property::Changeable::Always,20); Pint->SetMinMax(1,1000000); @@ -599,10 +622,10 @@ const char *midi_devices[] = { "auto", #if defined(MACOSX) -#ifdef C_SUPPORTS_COREMIDI +#if C_COREMIDI "coremidi", #endif -#ifdef C_SUPPORTS_COREAUDIO +#if C_COREAUDIO "coreaudio", #endif #elif defined(WIN32) @@ -610,46 +633,53 @@ #else "oss", #endif -#if defined(HAVE_ALSA) +#if C_ALSA "alsa", #endif #if C_FLUIDSYNTH "fluidsynth", #endif +#if C_MT32EMU + "mt32", +#endif "none", - 0 - }; + 0 }; + pstring->Set_values(midi_devices); pstring->Set_help( "Device that will receive the MIDI data (from the emulated MIDI\n" - "interface - MPU-401).\n" + "interface - MPU-401). Choose one of the following:\n" #if C_FLUIDSYNTH - "Use 'fluidsynth' to select built-in software synthesiser,\n" - "see the fluidsynth section for detailed configuration.\n" + "'fluidsynth', to use the built-in MIDI synthesizer. See the\n" + " [fluidsynth] section for detailed configuration.\n" +#endif +#if C_MT32EMU + "'mt32', to use the built-in Roland MT-32 synthesizer.\n" + " See the [mt32] section for detailed configuration.\n" #endif - "Use 'auto' to pick the first working external device."); + "'auto', to use the first working external MIDI player. This\n" + " might be a software synthesizer or physical device."); pstring = secprop->Add_string("midiconfig", when_idle, ""); pstring->Set_help( "Configuration options for the selected MIDI interface.\n" - "This is usually the id or name of the MIDI synthesiser you want\n" + "This is usually the id or name of the MIDI synthesizer you want\n" "to use (find the id/name with DOS command 'mixer /listmidi').\n" -#if C_FLUIDSYNTH - "- When using the built-in FluidSynth (mididevice = fluidsynth),\n" - " this option has no effect. Instead, configure FluidSynth using\n" - " the dedicated [fluidsynth] section below.\n" +#if (C_FLUIDSYNTH == 1 || C_MT32EMU == 1) + "- This option has no effect when using the built-in synthesizers\n" + " (mididevice = fluidsynth or mt32).\n" #endif -#ifdef C_SUPPORTS_COREAUDIO +#if C_COREAUDIO "- When using CoreAudio, you can specify a soundfont here.\n" #endif -#if defined(HAVE_ALSA) +#if C_ALSA "- When using ALSA, use Linux command 'aconnect -l' to list open\n" " MIDI ports, and select one (for example 'midiconfig=14:0'\n" " for sequencer client 14, port 0).\n" #endif - "- When using a Roland MT-32 rev.0 as midi output device, some\n" - " games may require a delay in order to prevent MT-32 hardware\n" - " buffer overflow issues. In that case, add 'delaysysex',\n" + "- If you're using a physical Roland MT-32 with revision 0 PCB,\n" + " the hardware may require a delay in order to prevent its\n" + " buffer from overflowing. In that case, add 'delaysysex',\n" " for example: 'midiconfig=2 delaysysex'.\n" "See the README/Manual for more details."); @@ -662,6 +692,10 @@ FLUID_AddConfigSection(control); #endif +#if C_MT32EMU + MT32_AddConfigSection(control); +#endif + #if C_DEBUG secprop=control->AddSection_prop("debug",&DEBUG_Init); #endif @@ -715,6 +749,9 @@ // Configure Gravis UltraSound emulation GUS_AddConfigSection(control); + // Configure Innovation SSI-2001 emulation + INNOVATION_AddConfigSection(control); + secprop = control->AddSection_prop("speaker",&PCSPEAKER_Init,true);//done Pbool = secprop->Add_bool("pcspeaker",Property::Changeable::WhenIdle,true); Pbool->Set_help("Enable PC-Speaker emulation."); @@ -757,6 +794,11 @@ Pbool = secprop->Add_bool("disney",Property::Changeable::WhenIdle,true); Pbool->Set_help("Enable Disney Sound Source emulation. (Covox Voice Master and Speech Thing compatible)."); + // IBM PS/1 Audio emulation + secprop->AddInitFunction(&PS1AUDIO_Init, true); + Pbool = secprop->Add_bool("ps1audio", when_idle, false); + Pbool->Set_help("Enable IBM PS/1 Audio emulation."); + secprop=control->AddSection_prop("joystick",&BIOS_Init,false);//done secprop->AddInitFunction(&INT10_Init); secprop->AddInitFunction(&MOUSE_Init); //Must be after int10 as it uses CurMode @@ -765,14 +807,14 @@ Pstring = secprop->Add_string("joysticktype",Property::Changeable::WhenIdle,"auto"); Pstring->Set_values(joytypes); Pstring->Set_help( - "Type of joystick to emulate: auto (default), none,\n" + "Type of joystick to emulate: auto (default),\n" + "none (disables joystick emulation),\n" "2axis (supports two joysticks),\n" "4axis (supports one joystick, first joystick used),\n" "4axis_2 (supports one joystick, second joystick used),\n" "fcs (Thrustmaster), ch (CH Flightstick).\n" - "none disables joystick emulation.\n" "auto chooses emulation depending on real joystick(s).\n" - "(Remember to reset dosbox's mapperfile if you saved it earlier)"); + "(Remember to reset DOSBox's mapperfile if you saved it earlier)"); Pbool = secprop->Add_bool("timed",Property::Changeable::WhenIdle,true); Pbool->Set_help("enable timed intervals for axis. Experiment with this option, if your joystick drifts (away)."); @@ -875,6 +917,45 @@ Pbool = secprop->Add_bool("ipx",Property::Changeable::WhenIdle, false); Pbool->Set_help("Enable ipx over UDP/IP emulation."); #endif + +#if C_NE2000 + secprop=control->AddSection_prop("ne2000",&NE2K_Init,true); + MSG_Add("NE2000_CONFIGFILE_HELP", + "macaddr -- The physical address the emulator will use on your network.\n" + " If you have multiple DOSBoxes running on your network,\n" + " this has to be changed. Modify the last three number blocks.\n" + " I.e. AC:DE:48:88:99:AB.\n" + "realnic -- Specifies which of your network interfaces is used.\n" + " Write \'list\' here to see the list of devices in the\n" + " Status Window. Then make your choice and put either the\n" + " interface number (2 or something) or a part of your adapters\n" + " name, e.g. VIA here.\n" + + ); + + Pbool = secprop->Add_bool("ne2000", Property::Changeable::WhenIdle, true); + Pbool->Set_help("Enable Ethernet passthrough. Requires [Win]Pcap."); + + Phex = secprop->Add_hex("nicbase", Property::Changeable::WhenIdle, 0x300); + Phex->Set_help("The base address of the NE2000 board."); + + Pint = secprop->Add_int("nicirq", Property::Changeable::WhenIdle, 3); + Pint->Set_help("The interrupt it uses. Note serial2 uses IRQ3 as default."); + + Pstring = secprop->Add_string("macaddr", Property::Changeable::WhenIdle,"AC:DE:48:88:99:AA"); + Pstring->Set_help("The physical address the emulator will use on your network.\n" + "If you have multiple DOSBoxes running on your network,\n" + "this has to be changed for each. AC:DE:48 is an address range reserved for\n" + "private use, so modify the last three number blocks.\n" + "I.e. AC:DE:48:88:99:AB."); + + Pstring = secprop->Add_string("realnic", Property::Changeable::WhenIdle,"list"); + Pstring->Set_help("Specifies which of your network interfaces is used.\n" + "Write \'list\' here to see the list of devices in the\n" + "Status Window. Then make your choice and put either the\n" + "interface number (2 or something) or a part of your adapters\n" + "name, e.g. VIA here."); +#endif // C_NE2000 // secprop->AddInitFunction(&CREDITS_Init); //TODO ? diff -Nru dosbox-staging-0.76.0/src/fpu/fpu.cpp dosbox-staging-0.77.0/src/fpu/fpu.cpp --- dosbox-staging-0.76.0/src/fpu/fpu.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/fpu/fpu.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/fpu/fpu_instructions.h dosbox-staging-0.77.0/src/fpu/fpu_instructions.h --- dosbox-staging-0.76.0/src/fpu/fpu_instructions.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/fpu/fpu_instructions.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -266,16 +266,20 @@ } static void FPU_FST_I16(PhysPt addr) { - mem_writew(addr,static_cast(FROUND(fpu.regs[TOP].d))); + double val = FROUND(fpu.regs[TOP].d); + mem_writew(addr,(val < 32768.0 && val >= -32768.0)?static_cast(val):0x8000); } static void FPU_FST_I32(PhysPt addr) { - mem_writed(addr,static_cast(FROUND(fpu.regs[TOP].d))); + double val = FROUND(fpu.regs[TOP].d); + mem_writed(addr,(val < 2147483648.0 && val >= -2147483648.0)?static_cast(val):0x80000000); } static void FPU_FST_I64(PhysPt addr) { + double val = FROUND(fpu.regs[TOP].d); FPU_Reg blah; - blah.ll = static_cast(FROUND(fpu.regs[TOP].d)); + blah.ll = (val < 9223372036854775808.0 && val >= -9223372036854775808.0)?static_cast(val):LONGTYPE(0x8000000000000000); + mem_writed(addr,blah.l.lower); mem_writed(addr+4,blah.l.upper); } diff -Nru dosbox-staging-0.76.0/src/fpu/fpu_instructions_x86.h dosbox-staging-0.77.0/src/fpu/fpu_instructions_x86.h --- dosbox-staging-0.76.0/src/fpu/fpu_instructions_x86.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/fpu/fpu_instructions_x86.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/fpu/.gitignore dosbox-staging-0.77.0/src/fpu/.gitignore --- dosbox-staging-0.76.0/src/fpu/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/fpu/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/fpu/Makefile.am dosbox-staging-0.77.0/src/fpu/Makefile.am --- dosbox-staging-0.76.0/src/fpu/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/fpu/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libfpu.a -libfpu_a_SOURCES = fpu.cpp fpu_instructions.h \ - fpu_instructions_x86.h diff -Nru dosbox-staging-0.76.0/src/fpu/meson.build dosbox-staging-0.77.0/src/fpu/meson.build --- dosbox-staging-0.76.0/src/fpu/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/fpu/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,5 @@ +libfpu = static_library('fpu', ['fpu.cpp'], include_directories : incdir) + +libfpu_dep = declare_dependency(link_with : libfpu) + +internal_deps += libfpu_dep diff -Nru dosbox-staging-0.76.0/src/.gitignore dosbox-staging-0.77.0/src/.gitignore --- dosbox-staging-0.76.0/src/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# svn:ignore -.deps -dosbox -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/gui/dosbox_logo.h dosbox-staging-0.77.0/src/gui/dosbox_logo.h --- dosbox-staging-0.76.0/src/gui/dosbox_logo.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/dosbox_logo.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/.gitignore dosbox-staging-0.77.0/src/gui/.gitignore --- dosbox-staging-0.76.0/src/gui/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/gui/gui_msgs.h dosbox-staging-0.77.0/src/gui/gui_msgs.h --- dosbox-staging-0.76.0/src/gui/gui_msgs.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/gui_msgs.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,17 +23,13 @@ constexpr char version_msg[] = R"(dosbox (dosbox-staging), version %s -Copyright (C) 2020 The dosbox-staging team. -License GPLv2+: GNU GPL version 2 or later - -This is free software, and you are welcome to change and redistribute it -under certain conditions; please read the COPYING file thoroughly before -doing so. There is NO WARRANTY, to the extent permitted by law. +Copyright (C) 2020-2021 The DOSBox Staging Team +License: GNU GPL-2.0-or-later -This program (dosbox-staging) is modified version of DOSBox. -Copyright (C) 2020 The DOSBox Team, published under GNU GPLv2+ -Read AUTHORS file for more details. +This is free software, and you are welcome to change and redistribute it under +certain conditions; please read the COPYING file thoroughly before doing so. +There is NO WARRANTY, to the extent permitted by law. )"; constexpr char help_msg[] = diff -Nru dosbox-staging-0.76.0/src/gui/Makefile.am dosbox-staging-0.77.0/src/gui/Makefile.am --- dosbox-staging-0.76.0/src/gui/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libgui.a -libgui_a_SOURCES = \ - dosbox_logo.h \ - gui_msgs.h \ - render.cpp \ - render_crt_glsl.h \ - render_glsl.h \ - render_loops.h \ - render_scalers.cpp \ - render_scalers.h \ - render_simple.h \ - render_templates.h \ - render_templates_hq.h \ - render_templates_hq2x.h \ - render_templates_hq3x.h \ - render_templates_sai.h \ - sdl_gui.cpp \ - sdl_mapper.cpp \ - sdlmain.cpp - -EXTRA_DIST = dosbox_staging_splash.c icon.c diff -Nru dosbox-staging-0.76.0/src/gui/meson.build dosbox-staging-0.77.0/src/gui/meson.build --- dosbox-staging-0.76.0/src/gui/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,15 @@ +libgui_sources = files([ + 'render.cpp', + 'render_scalers.cpp', + 'sdl_gui.cpp', + 'sdlmain.cpp', + 'sdl_mapper.cpp', +]) + +libgui = static_library('gui', libgui_sources, + include_directories : incdir, + dependencies : [ sdl2_dep, opengl_dep, libppscale_dep ]) + +libgui_dep = declare_dependency(link_with : libgui) + +internal_deps += libgui_dep diff -Nru dosbox-staging-0.76.0/src/gui/render.cpp dosbox-staging-0.77.0/src/gui/render.cpp --- dosbox-staging-0.76.0/src/gui/render.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -102,8 +102,8 @@ if (render.pal.last 2) PTYPE * line2; #endif +#if (SCALERHEIGHT > 3) + PTYPE * line3; +#endif +#if (SCALERHEIGHT > 4) + PTYPE * line4; +#endif /* Clear this block being dirty marker */ const Bitu changeType = changed[b]; changed[b] = 0; @@ -66,6 +72,12 @@ #if (SCALERHEIGHT > 2) line2 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 2); #endif +#if (SCALERHEIGHT > 3) + line3 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 3); +#endif +#if (SCALERHEIGHT > 4) + line4 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 4); +#endif SCALERFUNC; line0 += SCALERWIDTH * SCALER_BLOCKSIZE; fc += SCALER_BLOCKSIZE; @@ -77,6 +89,12 @@ #if (SCALERHEIGHT > 2) line2 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 2); #endif +#if (SCALERHEIGHT > 3) + line3 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 3); +#endif +#if (SCALERHEIGHT > 4) + line4 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 4); +#endif SCALERFUNC; FALLTHROUGH; case SCALE_RIGHT: @@ -86,6 +104,12 @@ #if (SCALERHEIGHT > 2) line2 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 2); #endif +#if (SCALERHEIGHT > 3) + line3 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 3); +#endif +#if (SCALERHEIGHT > 4) + line4 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 4); +#endif line0 += SCALERWIDTH * (SCALER_BLOCKSIZE -1); #if (SCALERHEIGHT > 1) line1 += SCALERWIDTH * (SCALER_BLOCKSIZE -1); @@ -93,6 +117,12 @@ #if (SCALERHEIGHT > 2) line2 += SCALERWIDTH * (SCALER_BLOCKSIZE -1); #endif +#if (SCALERHEIGHT > 3) + line3 += SCALERWIDTH * (SCALER_BLOCKSIZE -1); +#endif +#if (SCALERHEIGHT > 4) + line4 += SCALERWIDTH * (SCALER_BLOCKSIZE -1); +#endif fc += SCALER_BLOCKSIZE -1; SCALERFUNC; line0 += SCALERWIDTH; @@ -106,6 +136,12 @@ #if (SCALERHEIGHT > 2) line2 = WC[1]; #endif +#if (SCALERHEIGHT > 3) + line3 = WC[2]; +#endif +#if (SCALERHEIGHT > 4) + line4 = WC[3]; +#endif #else #if (SCALERHEIGHT > 1) line1 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch); @@ -113,6 +149,12 @@ #if (SCALERHEIGHT > 2) line2 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 2); #endif +#if (SCALERHEIGHT > 3) + line3 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 3); +#endif +#if (SCALERHEIGHT > 4) + line4 = (PTYPE *)(((Bit8u*)line0)+ render.scale.outPitch * 4); +#endif #endif //defined(SCALERLINEAR) for (Bitu i = 0; i 2) line2 += SCALERWIDTH; #endif +#if (SCALERHEIGHT > 3) + line3 += SCALERWIDTH; +#endif +#if (SCALERHEIGHT > 4) + line4 += SCALERWIDTH; +#endif fc++; } #if defined(SCALERLINEAR) @@ -132,6 +180,12 @@ #if (SCALERHEIGHT > 2) BituMove((Bit8u*)(&line0[-SCALER_BLOCKSIZE*SCALERWIDTH])+render.scale.outPitch*2,WC[1], SCALER_BLOCKSIZE *SCALERWIDTH*PSIZE); #endif +#if (SCALERHEIGHT > 3) + BituMove((Bit8u*)(&line0[-SCALER_BLOCKSIZE*SCALERWIDTH])+render.scale.outPitch*3,WC[2], SCALER_BLOCKSIZE *SCALERWIDTH*PSIZE); +#endif +#if (SCALERHEIGHT > 4) + BituMove((Bit8u*)(&line0[-SCALER_BLOCKSIZE*SCALERWIDTH])+render.scale.outPitch*4,WC[3], SCALER_BLOCKSIZE *SCALERWIDTH*PSIZE); +#endif #endif //defined(SCALERLINEAR) break; } diff -Nru dosbox-staging-0.76.0/src/gui/render_scalers.cpp dosbox-staging-0.77.0/src/gui/render_scalers.cpp --- dosbox-staging-0.76.0/src/gui/render_scalers.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_scalers.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/render_scalers.h dosbox-staging-0.77.0/src/gui/render_scalers.h --- dosbox-staging-0.76.0/src/gui/render_scalers.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_scalers.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/render_simple.h dosbox-staging-0.77.0/src/gui/render_simple.h --- dosbox-staging-0.76.0/src/gui/render_simple.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_simple.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/render_templates.h dosbox-staging-0.77.0/src/gui/render_templates.h --- dosbox-staging-0.76.0/src/gui/render_templates.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_templates.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/render_templates_hq2x.h dosbox-staging-0.77.0/src/gui/render_templates_hq2x.h --- dosbox-staging-0.76.0/src/gui/render_templates_hq2x.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_templates_hq2x.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/render_templates_hq3x.h dosbox-staging-0.77.0/src/gui/render_templates_hq3x.h --- dosbox-staging-0.76.0/src/gui/render_templates_hq3x.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_templates_hq3x.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/render_templates_hq.h dosbox-staging-0.77.0/src/gui/render_templates_hq.h --- dosbox-staging-0.76.0/src/gui/render_templates_hq.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_templates_hq.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/render_templates_sai.h dosbox-staging-0.77.0/src/gui/render_templates_sai.h --- dosbox-staging-0.76.0/src/gui/render_templates_sai.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/render_templates_sai.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/gui/sdl_gui.cpp dosbox-staging-0.77.0/src/gui/sdl_gui.cpp --- dosbox-staging-0.76.0/src/gui/sdl_gui.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/sdl_gui.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -205,7 +205,7 @@ } /* helper class for command execution */ -class VirtualBatch : public BatchFile { +class VirtualBatch final : public BatchFile { protected: std::istringstream lines; public: @@ -234,7 +234,7 @@ /* stringification and conversion from the c++ FAQ */ -class BadConversion : public std::runtime_error { +class BadConversion final : public std::runtime_error { public: BadConversion(const std::string& s) : std::runtime_error(s) { } }; @@ -275,7 +275,7 @@ } }; -class PropertyEditorBool : public PropertyEditor { +class PropertyEditorBool final : public PropertyEditor { GUI::Checkbox *input; public: PropertyEditorBool(Window *parent, int x, int y, Section_prop *section, Property *prop) : @@ -291,7 +291,7 @@ } }; -class PropertyEditorString : public PropertyEditor { +class PropertyEditorString final : public PropertyEditor { protected: GUI::Input *input; public: @@ -311,7 +311,7 @@ } }; -class PropertyEditorFloat : public PropertyEditor { +class PropertyEditorFloat final : public PropertyEditor { protected: GUI::Input *input; public: @@ -331,7 +331,7 @@ } }; -class PropertyEditorHex : public PropertyEditor { +class PropertyEditorHex final : public PropertyEditor { protected: GUI::Input *input; public: @@ -352,7 +352,7 @@ } }; -class PropertyEditorInt : public PropertyEditor { +class PropertyEditorInt final : public PropertyEditor { protected: GUI::Input *input; public: @@ -373,7 +373,7 @@ } }; -class HelpWindow : public GUI::MessageBox { +class HelpWindow final : public GUI::MessageBox { public: HelpWindow(GUI::Screen *parent, int x, int y, Section *section) : MessageBox(parent, x, y, 580, "", "") { @@ -387,7 +387,7 @@ } }; -class SectionEditor : public GUI::ToplevelWindow { +class SectionEditor final : public GUI::ToplevelWindow { Section_prop * section; public: SectionEditor(GUI::Screen *parent, int x, int y, Section_prop *section) : @@ -431,7 +431,7 @@ } }; -class AutoexecEditor : public GUI::ToplevelWindow { +class AutoexecEditor final : public GUI::ToplevelWindow { Section_line * section; GUI::Input *content; public: @@ -467,7 +467,7 @@ } }; -class SaveDialog : public GUI::ToplevelWindow { +class SaveDialog final : public GUI::ToplevelWindow { protected: GUI::Input *name; public: @@ -486,7 +486,7 @@ } }; -class SaveLangDialog : public GUI::ToplevelWindow { +class SaveLangDialog final : public GUI::ToplevelWindow { protected: GUI::Input *name; public: @@ -505,7 +505,7 @@ } }; -class ConfigurationWindow : public GUI::ToplevelWindow { +class ConfigurationWindow final : public GUI::ToplevelWindow { public: ConfigurationWindow(GUI::Screen *parent, GUI::Size x, GUI::Size y, GUI::String title) : GUI::ToplevelWindow(parent, x, y, 470, 290, title) { @@ -567,7 +567,7 @@ Section_prop *section = static_cast(sec); new SectionEditor(getScreen(), 50, 30, section); } else if (arg == "About") { - new GUI::MessageBox(getScreen(), 200, 150, 280, "About DOSBox", "\nDOSBox 0.74\nAn emulator for old DOS Games\n\nCopyright 2002-2020\nThe DOSBox Team"); + new GUI::MessageBox(getScreen(), 200, 150, 280, "About DOSBox", "\nDOSBox 0.74\nAn emulator for old DOS Games\n\nCopyright 2002-2021\nThe DOSBox Team"); } else if (arg == "Introduction") { new GUI::MessageBox(getScreen(), 20, 50, 600, "Introduction", MSG_Get("PROGRAM_INTRO")); } else if (arg == "Getting Started") { diff -Nru dosbox-staging-0.76.0/src/gui/sdlmain.cpp dosbox-staging-0.77.0/src/gui/sdlmain.cpp --- dosbox-staging-0.76.0/src/gui/sdlmain.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/sdlmain.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2019-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -63,7 +64,7 @@ #include "../libs/ppscale/ppscale.h" -#define MAPPERFILE "mapper-v2.map" +#define MAPPERFILE "mapper-sdl2-" VERSION ".map" #if C_OPENGL //Define to disable the usage of the pixel buffer object @@ -180,23 +181,23 @@ #endif // C_OPENGL -#if !(ENVIRON_INCLUDED) -extern char** environ; -#endif - #ifdef WIN32 #include #define STDOUT_FILE "stdout.txt" #define STDERR_FILE "stderr.txt" #endif -#if C_SET_PRIORITY +#if defined(HAVE_SETPRIORITY) #include -#define PRIO_TOTAL (PRIO_MAX-PRIO_MIN) + +#define PRIO_TOTAL (PRIO_MAX - PRIO_MIN) #endif SDL_bool mouse_is_captured = SDL_FALSE; // global for mapper +// SDL allows pixels sizes (color-depth) from 1 to 4 bytes +constexpr uint8_t MAX_BYTES_PER_PIXEL = 4; + // Masks to be passed when creating SDL_Surface. // Remove ifndef if they'll be needed for MacOS X builds. #ifndef MACOSX @@ -230,7 +231,18 @@ enum class SCALING_MODE { NONE, NEAREST, PERFECT }; +// Size and ratio constants +// ------------------------ +constexpr int SMALL_WINDOW_PERCENT = 50; +constexpr int MEDIUM_WINDOW_PERCENT = 70; +constexpr int LARGE_WINDOW_PERCENT = 90; +constexpr int DEFAULT_WINDOW_PERCENT = MEDIUM_WINDOW_PERCENT; +constexpr SDL_Point FALLBACK_WINDOW_DIMENSIONS = {640, 480}; +constexpr SDL_Point RATIOS_FOR_STRETCHED_PIXELS = {4, 3}; +constexpr SDL_Point RATIOS_FOR_SQUARE_PIXELS = {8, 5}; + enum PRIORITY_LEVELS { + PRIORITY_LEVEL_AUTO, PRIORITY_LEVEL_PAUSE, PRIORITY_LEVEL_LOWEST, PRIORITY_LEVEL_LOWER, @@ -268,9 +280,13 @@ struct { uint16_t width = 0; // TODO convert to int uint16_t height = 0; // TODO convert to int - bool use_original_size = true; bool resizable = false; } window = {}; + struct { + int width = 0; + int height = 0; + } requested_window_bounds = {}; + Bit8u bpp = 0; bool fullscreen = false; // This flag indicates, that we are in the process of switching @@ -284,6 +300,7 @@ bool lazy_init_window_size = false; bool vsync = false; bool want_resizable_window = false; + SDL_WindowEventID last_size_event = {}; SCREEN_TYPES type; SCREEN_TYPES want_type; } desktop = {}; @@ -339,10 +356,10 @@ SDL_Point pp_scale = {1, 1}; SDL_Rect updateRects[1024]; #if defined (WIN32) - // Time when sdl regains focus (alt-tab) in windowed mode + // Time when sdl regains focus (Alt+Tab) in windowed mode Bit32u focus_ticks; #endif - // state of alt-keys for certain special handlings + // State of Alt keys for certain special handlings SDL_EventType laltstate = SDL_KEYUP; SDL_EventType raltstate = SDL_KEYUP; }; @@ -424,7 +441,6 @@ SDL_SetWindowTitle(sdl.window, title); } -#if SDL_VERSION_ATLEAST(2, 0, 5) /* This function is SDL_EventFilter which is being called when event is * pushed into the SDL event queue. * @@ -456,7 +472,6 @@ } return 0; } -#endif /* On macOS, as we use a nicer external icon packaged in App bundle. * @@ -490,10 +505,11 @@ #endif -static void KillSwitch(bool pressed) { - if (!pressed) - return; - throw 1; +static void RequestExit(bool pressed) +{ + exit_requested = pressed; + if (exit_requested) + DEBUG_LOG_MSG("SDL: Exit requested"); } MAYBE_UNUSED static void PauseDOSBox(bool pressed) @@ -504,7 +520,7 @@ GFX_SetTitle(-1,-1,true); bool paused = true; - SDL_Delay(500); + Delay(500); SDL_Event event; while (SDL_PollEvent(&event)) { // flush event queue. @@ -514,15 +530,16 @@ while (paused) { SDL_WaitEvent(&event); // since we're not polling, cpu usage drops to 0. switch (event.type) { - case SDL_QUIT: KillSwitch(true); break; - case SDL_WINDOWEVENT: - if (event.window.event == SDL_WINDOWEVENT_RESTORED) { - // We may need to re-create a texture and more - GFX_ResetScreen(); - } - break; - case SDL_KEYDOWN: // Must use Pause/Break Key to resume. - case SDL_KEYUP: + case SDL_QUIT: RequestExit(true); break; + + case SDL_WINDOWEVENT: + if (event.window.event == SDL_WINDOWEVENT_RESTORED) { + // We may need to re-create a texture and more + GFX_ResetScreen(); + } + break; + case SDL_KEYDOWN: // Must use Pause/Break Key to resume. + case SDL_KEYUP: if(event.key.keysym.sym == SDLK_PAUSE) { const uint16_t outkeymod = event.key.keysym.mod; if (inkeymod != outkeymod) { @@ -540,7 +557,7 @@ if (event.key.keysym.sym == SDLK_q && (event.key.keysym.mod == KMOD_RGUI || event.key.keysym.mod == KMOD_LGUI)) { /* On macs, all aps exit when pressing cmd-q */ - KillSwitch(true); + RequestExit(true); break; } #endif @@ -590,15 +607,31 @@ return flags; } +// The frame-period holds the current duration for which a single host +// video-frame is displayed. This is kept up-to-date when the video mode is set. +// A sane starting value is used, which is based on a 60-Hz monitor. +auto frame_period = std::chrono::nanoseconds(1000000000 / 60); +static void UpdateFramePeriod() +{ + assert(sdl.window); + SDL_DisplayMode display_mode; + SDL_GetWindowDisplayMode(sdl.window, &display_mode); + const int refresh_rate = display_mode.refresh_rate > 0 + ? display_mode.refresh_rate + : 60; + frame_period = std::chrono::nanoseconds(1000000000 / refresh_rate); +} void GFX_ResetScreen(void) { GFX_Stop(); if (sdl.draw.callback) (sdl.draw.callback)( GFX_CallBackReset ); GFX_Start(); + UpdateFramePeriod(); CPU_Reset_AutoAdjust(); } + void GFX_ForceFullscreenExit() { sdl.desktop.fullscreen = false; @@ -683,13 +716,12 @@ return nullptr; } -#if SDL_VERSION_ATLEAST(2, 0, 5) if (resizable) { SDL_AddEventWatch(watch_sdl_events, sdl.window); SDL_SetWindowResizable(sdl.window, SDL_TRUE); } sdl.desktop.window.resizable = resizable; -#endif + GFX_SetTitle(-1, -1, false); // refresh title. if (!fullscreen) { @@ -715,10 +747,7 @@ // window size is updated AND content is correctly clipped when // emulated program changes resolution with various // windowresolution settings (!). - if (sdl.desktop.window.use_original_size && - !sdl.desktop.window.resizable && !sdl.desktop.switching_fullscreen) - SDL_SetWindowSize(sdl.window, width, height); - + SDL_SetWindowSize(sdl.window, width, height); SDL_SetWindowFullscreen(sdl.window, 0); } // Maybe some requested fullscreen resolution is unsupported? @@ -760,18 +789,28 @@ int w = 0; int h = 0; - SDL_GetWindowSize(sdl.window, &w, &h); + if (sdl.desktop.fullscreen) { + SDL_GetWindowSize(sdl.window, &w, &h); + } else { + w = sdl.desktop.requested_window_bounds.width; + h = sdl.desktop.requested_window_bounds.height; + } + assert(w > 0 && h > 0); - sdl.pp_scale = calc_pp_scale(w, h); + const int previous_imgw = sdl.pp_scale.x * sdl.draw.width; + const int previous_imgh = sdl.pp_scale.y * sdl.draw.height; - LOG_MSG("MAIN: Pixel-perfect scaling (%dx%d): %dx%d (PAR %#.3g) -> %dx%d (PAR %#.3g)", - sdl.pp_scale.x, sdl.pp_scale.y, sdl.draw.width, sdl.draw.height, - sdl.draw.pixel_aspect, sdl.pp_scale.x * sdl.draw.width, - sdl.pp_scale.y * sdl.draw.height, - static_cast(sdl.pp_scale.y) / sdl.pp_scale.x); + sdl.pp_scale = calc_pp_scale(w, h); const int imgw = sdl.pp_scale.x * sdl.draw.width; const int imgh = sdl.pp_scale.y * sdl.draw.height; + + if (previous_imgw != imgw || previous_imgh != imgh) + LOG_MSG("MAIN: Pixel-perfect scaling (%dx%d): %dx%d (PAR %#.3g) -> %dx%d (PAR %#.3g)", + sdl.pp_scale.x, sdl.pp_scale.y, sdl.draw.width, + sdl.draw.height, sdl.draw.pixel_aspect, imgw, imgh, + static_cast(sdl.pp_scale.y) / sdl.pp_scale.x); + const int wndw = (sdl.desktop.fullscreen ? w : imgw); const int wndh = (sdl.desktop.fullscreen ? h : imgh); @@ -805,8 +844,8 @@ double ratio_w=(double)fixedWidth/(sdl.draw.width*sdl.draw.scalex); double ratio_h=(double)fixedHeight/(sdl.draw.height*sdl.draw.scaley); if ( ratio_w < ratio_h) { - sdl.clip.w=fixedWidth; - sdl.clip.h=(Bit16u)(sdl.draw.height*sdl.draw.scaley*ratio_w + 0.1); //possible rounding issues + sdl.clip.w = fixedWidth; + sdl.clip.h = (Bit16u)(sdl.draw.height * sdl.draw.scaley*ratio_w + 0.1); //possible rounding issues } else { /* * The 0.4 is there to correct for rounding issues. @@ -946,6 +985,13 @@ if (sdl.updating) GFX_EndUpdate( 0 ); + const bool is_changed = (sdl.draw.width != static_cast(width) || + sdl.draw.height != static_cast(height) || + sdl.draw.scalex != scalex || + sdl.draw.scaley != scaley || + sdl.draw.pixel_aspect != pixel_aspect || + sdl.draw.callback != callback); + sdl.draw.width = static_cast(width); sdl.draw.height = static_cast(height); sdl.draw.scalex = scalex; @@ -956,11 +1002,11 @@ const bool double_h = (flags & GFX_DBL_H) > 0; const bool double_w = (flags & GFX_DBL_W) > 0; - LOG_MSG("MAIN: Draw resolution: %dx%d,%s%s pixel aspect ratio: %#.2f", - sdl.draw.width, sdl.draw.height, - (double_w ? " double-width," : ""), - (double_h ? " double-height," : ""), - pixel_aspect); + if (is_changed) + LOG_MSG("MAIN: Draw resolution: %dx%d,%s%s pixel aspect ratio: %#.2f", + sdl.draw.width, sdl.draw.height, + (double_w ? " double-width," : ""), + (double_h ? " double-height," : ""), pixel_aspect); switch (sdl.desktop.want_type) { dosurface: @@ -1055,36 +1101,31 @@ LOG_MSG("SDL:Can't create renderer, falling back to surface"); goto dosurface; } - /* SDL_PIXELFORMAT_ARGB8888 is possible with most - rendering drivers, "opengles" being a notable exception */ - sdl.texture.texture = SDL_CreateTexture(sdl.renderer, SDL_PIXELFORMAT_ARGB8888, + /* Use renderer's default format */ + SDL_RendererInfo rinfo; + SDL_GetRendererInfo(sdl.renderer, &rinfo); + const auto texture_format = rinfo.texture_formats[0]; + sdl.texture.texture = SDL_CreateTexture(sdl.renderer, texture_format, SDL_TEXTUREACCESS_STREAMING, width, height); - /* SDL_PIXELFORMAT_ABGR8888 (not RGB) is the - only supported format for the "opengles" driver */ - if (!sdl.texture.texture) { - if (flags & GFX_RGBONLY) goto dosurface; - sdl.texture.texture = SDL_CreateTexture(sdl.renderer, SDL_PIXELFORMAT_ABGR8888, - SDL_TEXTUREACCESS_STREAMING, width, height); - } if (!sdl.texture.texture) { SDL_DestroyRenderer(sdl.renderer); - sdl.renderer = NULL; + sdl.renderer = nullptr; LOG_MSG("SDL:Can't create texture, falling back to surface"); goto dosurface; } - sdl.texture.input_surface = SDL_CreateRGBSurface(0, width, height, 32, 0, 0, 0, 0); + sdl.texture.input_surface = SDL_CreateRGBSurfaceWithFormat(0, width, height, 32, texture_format); if (!sdl.texture.input_surface) { LOG_MSG("SDL: Error while preparing texture input"); goto dosurface; } SDL_SetRenderDrawColor(sdl.renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); - Uint32 pixelFormat; - SDL_QueryTexture(sdl.texture.texture, &pixelFormat, NULL, NULL, NULL); - sdl.texture.pixelFormat = SDL_AllocFormat(pixelFormat); - switch (SDL_BITSPERPIXEL(pixelFormat)) { + uint32_t pixel_format; + SDL_QueryTexture(sdl.texture.texture, &pixel_format, NULL, NULL, NULL); + sdl.texture.pixelFormat = SDL_AllocFormat(pixel_format); + switch (SDL_BITSPERPIXEL(pixel_format)) { case 8: retFlags = GFX_CAN_8; break; case 15: retFlags = GFX_CAN_15; break; case 16: retFlags = GFX_CAN_16; break; @@ -1092,8 +1133,6 @@ case 32: retFlags = GFX_CAN_32; break; } retFlags |= GFX_SCALING; - SDL_RendererInfo rinfo; - SDL_GetRendererInfo(sdl.renderer, &rinfo); LOG_MSG("SDL: Using driver \"%s\" for texture renderer", rinfo.name); if (rinfo.flags & SDL_RENDERER_ACCELERATED) retFlags |= GFX_HARDWARE; @@ -1244,12 +1283,8 @@ (sdl.clip.w != windowWidth || sdl.clip.h != windowHeight)) { // LOG_MSG("attempting to fix the centering to %d %d %d %d",(windowWidth-sdl.clip.w)/2,(windowHeight-sdl.clip.h)/2,sdl.clip.w,sdl.clip.h); glViewport((windowWidth - sdl.clip.w) / 2, - (windowHeight - sdl.clip.h) / 2, - sdl.clip.w, + (windowHeight - sdl.clip.h) / 2, sdl.clip.w, sdl.clip.h); - } else if (sdl.desktop.window.resizable) { - sdl.clip = calc_viewport(windowWidth, windowHeight); - glViewport(sdl.clip.x, sdl.clip.y, sdl.clip.w, sdl.clip.h); } else { /* We don't just pass sdl.clip.y as-is, so we cover the case of non-vertical * centering on Android (in order to leave room for the on-screen keyboard) @@ -1276,10 +1311,15 @@ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); - Bit8u* emptytex = new Bit8u[texsize * texsize * 4]; - memset((void*) emptytex, 0, texsize * texsize * 4); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texsize, texsize, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, (const GLvoid*)emptytex); - delete [] emptytex; + const auto texture_area_bytes = static_cast(texsize) * + texsize * MAX_BYTES_PER_PIXEL; + uint8_t *emptytex = new uint8_t[texture_area_bytes]; + assert(emptytex); + + memset(emptytex, 0, texture_area_bytes); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texsize, texsize, 0, + GL_BGRA_EXT, GL_UNSIGNED_BYTE, emptytex); + delete[] emptytex; glClearColor (0.0f, 0.0f, 0.0f, 1.0f); @@ -1310,8 +1350,9 @@ if (glIsList(sdl.opengl.displaylist)) glDeleteLists(sdl.opengl.displaylist, 1); sdl.opengl.displaylist = glGenLists(1); glNewList(sdl.opengl.displaylist, GL_COMPILE); - glClear(GL_COLOR_BUFFER_BIT); + //Create one huge triangle and only display a portion. + //When using a quad, there was scaling bug (certain resolutions on Nvidia chipsets) in the seam glBegin(GL_TRIANGLES); // upper left glTexCoord2f(0,0); glVertex2f(-1.0f, 1.0f); @@ -1382,6 +1423,24 @@ GFX_ToggleMouseCapture(); } +static void FocusInput() +{ + // Ensure auto-cycles are enabled + CPU_Disable_SkipAutoAdjust(); + + // Ensure we have input focus when in fullscreen + if (!sdl.desktop.fullscreen) + return; + + // Do we already have focus? + if (SDL_GetWindowFlags(sdl.window) & SDL_WINDOW_INPUT_FOCUS) + return; + + // If not, raise-and-focus to prevent stranding the window + SDL_RaiseWindow(sdl.window); + SDL_SetWindowInputFocus(sdl.window); +} + /* * Assesses the following: * - current window size (full or not), @@ -1471,6 +1530,7 @@ #endif sdl.desktop.fullscreen = !sdl.desktop.fullscreen; GFX_ResetScreen(); + FocusInput(); sdl.desktop.switching_fullscreen = false; } @@ -1576,7 +1636,6 @@ glClear(GL_COLOR_BUFFER_BIT); if (sdl.opengl.pixel_buffer_object) { glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT); - glBindTexture(GL_TEXTURE_2D, sdl.opengl.texture); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, sdl.draw.width, sdl.draw.height, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, 0); @@ -1584,7 +1643,6 @@ } else if (changedLines) { int y = 0; size_t index = 0; - glBindTexture(GL_TEXTURE_2D, sdl.opengl.texture); while (y < sdl.draw.height) { if (!(index & 1)) { y += changedLines[index]; @@ -1726,11 +1784,17 @@ CleanupSDLResources(); } -static void SetPriority(PRIORITY_LEVELS level) { +static void SetPriority(PRIORITY_LEVELS level) +{ + // Just let the OS scheduler manage priority + if (level == PRIORITY_LEVEL_AUTO) + return; -#if C_SET_PRIORITY -// Do nothing if priorties are not the same and not root, else the highest -// priority can not be set as users can only lower priority (not restore it) + // TODO replace platform-specific API with SDL_SetThreadPriority +#if defined(HAVE_SETPRIORITY) + // If the priorities are different, do nothing unless the user is root, + // since priority can always be lowered but requires elevated rights + // to increase if((sdl.priority.focus != sdl.priority.nofocus ) && (getuid()!=0) ) return; @@ -1754,7 +1818,7 @@ case PRIORITY_LEVEL_HIGHEST: SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS); break; -#elif C_SET_PRIORITY +#elif defined(HAVE_SETPRIORITY) /* Linux use group as dosbox has mulitple threads under linux */ case PRIORITY_LEVEL_PAUSE: // if DOSBox is paused, assume idle priority case PRIORITY_LEVEL_LOWEST: @@ -1816,14 +1880,6 @@ sdl.desktop.full.height, sdl.desktop.fullscreen, sdl.desktop.want_resizable_window); } - - if (sdl.desktop.window.use_original_size) { - sdl.desktop.lazy_init_window_size = false; - return SetWindowMode(sdl.desktop.want_type, sdl.draw.width, - sdl.draw.height, sdl.desktop.fullscreen, - sdl.desktop.want_resizable_window); - } - sdl.desktop.lazy_init_window_size = false; return SetWindowMode(sdl.desktop.want_type, sdl.desktop.window.width, sdl.desktop.window.height, sdl.desktop.fullscreen, @@ -1834,7 +1890,7 @@ * Please leave the Splash screen stuff in working order. * We spend a lot of time making DOSBox. */ -static void DisplaySplash(uint32_t time_ms) +static void DisplaySplash(int time_ms) { assert(sdl.window); @@ -1882,7 +1938,7 @@ const uint16_t lines[2] = {0, src_h}; // output=surface won't work otherwise GFX_EndUpdate(lines); - SDL_Delay(time_ms); + Delay(time_ms); } /* For some preference values, we can safely remove comment after # character @@ -1916,17 +1972,14 @@ { #if C_OPENGL if (sdl.desktop.want_type != SCREEN_OPENGL) { - LOG_MSG("MAIN: Disabling resizable window, because it's not " - "compatible with selected sdl.output"); + LOG_MSG("MAIN: Disabled resizable window, only compatible with OpenGL output"); return false; } const std::string sname = get_glshader_value(); if (sname != "sharp" && sname != "none" && sname != "default") { - LOG_MSG("MAIN: Disabling resizable window, because it's not " - "compatible with selected render.glshader\n" - "MAIN: Use 'sharp' or 'none' to keep resizable window."); + LOG_MSG("MAIN: Disabled resizable window, only compatible with 'sharp' and 'none' glshaders"); return false; } @@ -1936,107 +1989,200 @@ #endif // C_OPENGL } -static bool detect_shader_fixed_size() +static SDL_Point remove_stretched_aspect(const SDL_Point &size) { -#if C_OPENGL - if (sdl.desktop.want_type != SCREEN_OPENGL) - return false; - - const std::string sname = get_glshader_value(); - return (sname == "crt-fakelottes-flat" || sname == "crt-easymode-flat"); -#else - return false; -#endif // C_OPENGL + return {size.x, ceil_sdivide(size.y * 5, 6)}; } -static SDL_Point detect_window_size() -{ - SDL_Rect bounds; - SDL_GetDisplayBounds(sdl.display_number, &bounds); - constexpr SDL_Point resolutions[] = { - // TODO: these resolutions are disabled for now due to - // compatibility with users using pixel-doubling on high-density - // displays. For example: if we pick 1600x1200 window resolution - // and OS scales it 2x it might end up being larger than really - // available screen area. To fix this we need to avoid currently - // used hacks for OS-level window scaling. - // - // {2560, 1920}, - // {2400, 1800}, - // {2048, 1536}, - // {1920, 1440}, - // {1600, 1200}, - {1280, 960}, - {1024, 768}, - {800, 600}, - }; - // Pick the biggest window size, that neatly fits in user's available - // screen area. - for (const auto &size : resolutions) { - if (bounds.w > size.x && bounds.h > size.y) - return size; +static SDL_Point refine_window_size_with_mode(const SDL_Point &size, + const SCALING_MODE scaling_mode, + const bool wants_stretched_pixels) +{ + switch (scaling_mode) { + case (SCALING_MODE::NONE): { + const auto game_ratios = wants_stretched_pixels + ? RATIOS_FOR_STRETCHED_PIXELS + : RATIOS_FOR_SQUARE_PIXELS; + + const auto window_aspect = static_cast(size.x) / size.y; + const auto game_aspect = static_cast(game_ratios.x) / game_ratios.y; + + // screen is wider than the game, so constrain horizonal + if (window_aspect > game_aspect) { + const int x = ceil_sdivide(size.y * game_ratios.x, game_ratios.y); + return {x, size.y}; + } + // screen is narrower than the game, so constrain vertical + const int y = ceil_sdivide(size.x * game_ratios.y, game_ratios.x); + return {size.x, y}; + } + case (SCALING_MODE::NEAREST): { + constexpr SDL_Point resolutions[] = { + {7680, 5760}, // 8K at 4:3 aspect + {7360, 5520}, // + {7040, 5280}, // + {6720, 5040}, // + {6400, 4800}, // HUXGA + {6080, 4560}, // + {5760, 4320}, // 8K "Full Format" at 4:3 aspect + {5440, 4080}, // + {5120, 3840}, // HSXGA at 4:3 aspect + {4800, 3600}, // + {4480, 3360}, // + {4160, 3120}, // + {3840, 2880}, // 4K UHD at 4:3 aspect + {3520, 2640}, // + {3200, 2400}, // QUXGA + {2880, 2160}, // 3K UHD at 4:3 aspect + {2560, 1920}, // 4.92M3 (Max CRT, Viewsonic P225f) + {2400, 1800}, // + {1920, 1440}, // 1080p in 4:3 + {1600, 1200}, // UXGA + {1280, 960}, // 720p in 4:3 + {1024, 768}, // XGA + {800, 600}, // SVGA + }; + // Pick the biggest window size that fits inside the bounds. + for (const auto &candidate : resolutions) + if (candidate.x <= size.x && candidate.y <= size.y) + return (wants_stretched_pixels + ? candidate + : remove_stretched_aspect(candidate)); + break; } - return {640, 480}; + case (SCALING_MODE::PERFECT): { + constexpr double aspect_weight = 1.14; + constexpr SDL_Point pre_draw_size = {320, 200}; + const double pixel_aspect_ratio = wants_stretched_pixels ? 1.2 : 1; + + int scale_x = 0; + int scale_y = 0; + const int err = pp_getscale(pre_draw_size.x, pre_draw_size.y, + pixel_aspect_ratio, size.x, size.y, + aspect_weight, &scale_x, &scale_y); + if (err == 0) + return {pre_draw_size.x * scale_x, pre_draw_size.y * scale_y}; + // else use the fallback below + break; + } + }; // end-switch + + // Fallback + return (wants_stretched_pixels + ? FALLBACK_WINDOW_DIMENSIONS + : remove_stretched_aspect(FALLBACK_WINDOW_DIMENSIONS)); } -static void SetupWindowResolution(const char *val) +static SDL_Point window_bounds_from_resolution(const std::string &pref, + const SDL_Rect &desktop) { - assert(sdl.display_number >= 0); - std::string pref = NormalizeConfValue(val); + int w = 0; + int h = 0; + const bool was_parsed = sscanf(pref.c_str(), "%dx%d", &w, &h) == 2; + const bool is_valid = (w > 0 && w <= desktop.w && h > 0 && h <= desktop.h); + if (was_parsed && is_valid) + return {w, h}; + + LOG_MSG("MAIN: windowresolution '%s' outside of desktop '%dx%d', using %dx%d instead", + pref.c_str(), desktop.w, desktop.h, + FALLBACK_WINDOW_DIMENSIONS.x, FALLBACK_WINDOW_DIMENSIONS.y); + + return FALLBACK_WINDOW_DIMENSIONS; +} + +static SDL_Point window_bounds_from_label(const std::string &pref, + const SDL_Rect &desktop) +{ + int percent = DEFAULT_WINDOW_PERCENT; + if (starts_with("s", pref)) + percent = SMALL_WINDOW_PERCENT; + else if (starts_with("m", pref) || pref == "default" || pref.empty()) + percent = MEDIUM_WINDOW_PERCENT; + else if (starts_with("l", pref)) + percent = LARGE_WINDOW_PERCENT; + else if (pref == "desktop") + percent = 100; + else + LOG_MSG("MAIN: The windowresolution '%s' is invalid, using 'default' instead", + pref.c_str()); - if (pref == "default" || pref.empty()) { -#if defined(LINUX) - sdl.desktop.want_resizable_window = detect_resizable_window(); -#else - sdl.desktop.want_resizable_window = false; -#endif - sdl.desktop.window.use_original_size = true; + const int w = ceil_sdivide(desktop.w * percent, 100); + const int h = ceil_sdivide(desktop.h * percent, 100); + return {w, h}; +} + +// Takes in: +// - The user's windowresolution = value (default, WxH, small, medium, large, +// desktop (or junk!) +// - The previously configured scaling mode (NONE, NEAREST, PERFECT) +// - If aspect correction (stretched pixels) is requested + +// Except for SURFACE rendering, this function sets: +// - 'sdl.desktop.requested_window_bounds' with coarse bounds +// - 'sdl.desktop.window' with the refined size + +// The coarse bounds do not take into account scaling or aspect correction, +// while the refined size does (and because of this, is always a smaller +// resolution than the coarse bounds). + +// We use the coarse bounds when re-calculating new sizes (such as +// pixel-perfect) whenever there's a DOS-side resolution change. This ensures +// that the window will always be as big as possible, but still within bounds. + +static void setup_window_sizes_from_conf(const char *windowresolution_val, + const SCALING_MODE scaling_mode, + const bool wants_stretched_pixels) +{ + assert(sdl.display_number >= 0); - if (!sdl.desktop.want_resizable_window && - detect_shader_fixed_size()) { - const auto ws = detect_window_size(); - sdl.desktop.window.use_original_size = false; - sdl.desktop.window.width = ws.x; - sdl.desktop.window.height = ws.y; - } + // TODO: Deprecate SURFACE output and remove this. + // For now, let the DOS-side determine the window's resolution. + if (sdl.desktop.want_type == SCREEN_SURFACE) return; - } - if (pref == "resizable") { - sdl.desktop.want_resizable_window = detect_resizable_window(); - sdl.desktop.window.use_original_size = true; - return; - } + sdl.desktop.want_resizable_window = detect_resizable_window(); - if (pref == "original") { - sdl.desktop.want_resizable_window = false; - sdl.desktop.window.use_original_size = true; - return; - } + // Get the total usable desktop resolution + SDL_Rect desktop; + SDL_GetDisplayUsableBounds(sdl.display_number, &desktop); + assert(desktop.w >= FALLBACK_WINDOW_DIMENSIONS.x); + assert(desktop.h >= FALLBACK_WINDOW_DIMENSIONS.y); + + // Bound the desktop resolution by the user's window-size setting + const std::string pref = NormalizeConfValue(windowresolution_val); + SDL_Point coarse_size; + if (pref.find('x') != std::string::npos) + coarse_size = window_bounds_from_resolution(pref, desktop); + else + coarse_size = window_bounds_from_label(pref, desktop); - int w = 0; - int h = 0; - // sscanf won't parse suffix after second integer - if (sscanf(pref.c_str(), "%dx%d", &w, &h) == 2) { - SDL_Rect bounds; - SDL_GetDisplayBounds(sdl.display_number, &bounds); - if (w > 0 && h > 0 && w <= bounds.w && h <= bounds.h) { - sdl.desktop.want_resizable_window = false; - sdl.desktop.window.use_original_size = false; - sdl.desktop.window.width = w; - sdl.desktop.window.height = h; - return; - } else { - LOG_MSG("MAIN: dimensions %dx%d are out of display " - "bounds (%dx%d)", - w, h, bounds.w, bounds.h); - } - } + // Save the coarse bounds in the SDL struct for future sizing events + sdl.desktop.requested_window_bounds = {coarse_size.x, coarse_size.y}; - LOG_MSG("MAIN: 'windowresolution = %s' is not a valid setting, using " - "'original' instead", pref.c_str()); - sdl.desktop.want_resizable_window = false; - sdl.desktop.window.use_original_size = true; + // Refine the coarse size and save it in the SDL struct + const auto refined_size = refine_window_size_with_mode(coarse_size, + scaling_mode, + wants_stretched_pixels); + + assert(refined_size.x <= UINT16_MAX && refined_size.y <= UINT16_MAX); + sdl.desktop.window.width = static_cast(refined_size.x); + sdl.desktop.window.height = static_cast(refined_size.y); + + // Let the user know the resulting window properties + if (scaling_mode == SCALING_MODE::NONE) + LOG_MSG("MAIN: Sized window to %dx%d with %s pixels", + refined_size.x, refined_size.y, + wants_stretched_pixels ? "stretched" : "square"); + + else if (scaling_mode == SCALING_MODE::NEAREST) + LOG_MSG("MAIN: Sized window to %dx%d with nearest-neighbour scaling and %s pixels", + refined_size.x, refined_size.y, + wants_stretched_pixels ? "stretched" : "square"); + + else if (scaling_mode == SCALING_MODE::PERFECT) + LOG_MSG("MAIN: Sized window %dx%d with pixel-perfect scaling and %s pixels", + refined_size.x, refined_size.y, + wants_stretched_pixels ? "stretched" : "square"); } static SDL_Rect calc_viewport_fit(int win_width, int win_height) @@ -2109,22 +2255,38 @@ std::string focus = p->GetSection()->Get_string("active"); std::string notfocus = p->GetSection()->Get_string("inactive"); - if (focus == "lowest") { sdl.priority.focus = PRIORITY_LEVEL_LOWEST; } - else if (focus == "lower") { sdl.priority.focus = PRIORITY_LEVEL_LOWER; } - else if (focus == "normal") { sdl.priority.focus = PRIORITY_LEVEL_NORMAL; } - else if (focus == "higher") { sdl.priority.focus = PRIORITY_LEVEL_HIGHER; } - else if (focus == "highest") { sdl.priority.focus = PRIORITY_LEVEL_HIGHEST; } - - if (notfocus == "lowest") { sdl.priority.nofocus=PRIORITY_LEVEL_LOWEST; } - else if (notfocus == "lower") { sdl.priority.nofocus=PRIORITY_LEVEL_LOWER; } - else if (notfocus == "normal") { sdl.priority.nofocus=PRIORITY_LEVEL_NORMAL; } - else if (notfocus == "higher") { sdl.priority.nofocus=PRIORITY_LEVEL_HIGHER; } - else if (notfocus == "highest") { sdl.priority.nofocus=PRIORITY_LEVEL_HIGHEST; } - else if (notfocus == "pause") { - /* we only check for pause here, because it makes no sense - * for DOSBox to be paused while it has focus - */ - sdl.priority.nofocus=PRIORITY_LEVEL_PAUSE; + if (focus == "auto" || notfocus == "auto") { + sdl.priority.focus = PRIORITY_LEVEL_AUTO; + sdl.priority.nofocus = PRIORITY_LEVEL_AUTO; + if (focus != "auto" || notfocus != "auto") + LOG_MSG("MAIN: \"priority\" can't be \"auto\" for just one value, overriding"); + } else { + if (focus == "lowest") + sdl.priority.focus = PRIORITY_LEVEL_LOWEST; + else if (focus == "lower") + sdl.priority.focus = PRIORITY_LEVEL_LOWER; + else if (focus == "normal") + sdl.priority.focus = PRIORITY_LEVEL_NORMAL; + else if (focus == "higher") + sdl.priority.focus = PRIORITY_LEVEL_HIGHER; + else if (focus == "highest") + sdl.priority.focus = PRIORITY_LEVEL_HIGHEST; + + if (notfocus == "lowest") + sdl.priority.nofocus = PRIORITY_LEVEL_LOWEST; + else if (notfocus == "lower") + sdl.priority.nofocus = PRIORITY_LEVEL_LOWER; + else if (notfocus == "normal") + sdl.priority.nofocus = PRIORITY_LEVEL_NORMAL; + else if (notfocus == "higher") + sdl.priority.nofocus = PRIORITY_LEVEL_HIGHER; + else if (notfocus == "highest") + sdl.priority.nofocus = PRIORITY_LEVEL_HIGHEST; + else if (notfocus == "pause") + /* we only check for pause here, because it makes no + * sense for DOSBox to be paused while it has focus + */ + sdl.priority.nofocus = PRIORITY_LEVEL_PAUSE; } SetPriority(sdl.priority.focus); //Assume focus on startup @@ -2213,7 +2375,13 @@ sdl.render_driver = section->Get_string("texture_renderer"); lowcase(sdl.render_driver); - SetupWindowResolution(section->Get_string("windowresolution")); + const auto render_section = static_cast( + control->GetSection("render")); + assert(render_section); + + setup_window_sizes_from_conf(section->Get_string("windowresolution"), + sdl.scaling_mode, + render_section->Get_bool("aspect")); #if C_OPENGL if (sdl.desktop.want_type == SCREEN_OPENGL) { /* OPENGL is requested */ @@ -2265,8 +2433,10 @@ glMapBufferARB = (PFNGLMAPBUFFERARBPROC)SDL_GL_GetProcAddress("glMapBufferARB"); glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC)SDL_GL_GetProcAddress("glUnmapBufferARB"); - // FIXME: according to Khronos documentation, the correct way to - // query GL_EXTENSIONS is using glGetStringi from OpenGL 3.0 + // TODO According to Khronos documentation, the correct + // way to query GL_EXTENSIONS is using glGetStringi from + // OpenGL 3.0; replace with OpenGL loading library (such + // as GLEW or libepoxy) const char * gl_ext = (const char *)glGetString (GL_EXTENSIONS); if(gl_ext && *gl_ext){ sdl.opengl.packed_pixel=(strstr(gl_ext,"EXT_packed_pixels") != NULL); @@ -2292,14 +2462,13 @@ if (!SetDefaultWindowMode()) E_Exit("Could not initialize video: %s", SDL_GetError()); - // FIXME the code updated sdl.desktop.bpp in here (has effect in setting up scalers) - SDL_SetWindowTitle(sdl.window, "DOSBox Staging"); SetIcon(); const bool tiny_fullresolution = splash_image.width > sdl.desktop.full.width || splash_image.height > sdl.desktop.full.height; - if (control->GetStartupVerbosity() == Verbosity::High && + if ((control->GetStartupVerbosity() == Verbosity::High || + control->GetStartupVerbosity() == Verbosity::SplashOnly) && !(sdl.desktop.fullscreen && tiny_fullresolution)) { GFX_Start(); DisplaySplash(1000); @@ -2308,7 +2477,7 @@ // Apply the user's mouse settings Section_prop* s = section->Get_multival("capture_mouse")->GetSection(); - const std::string control_choice = s->Get_string("capture_mouse (first value)"); + const std::string control_choice = s->Get_string("capture_mouse_first_value"); std::string mouse_control_msg; if (control_choice == "onclick") { sdl.mouse.control_choice = CaptureOnClick; @@ -2325,8 +2494,9 @@ } else { assert(sdl.mouse.control_choice == CaptureOnClick); } - std:: string middle_control_msg; - if (std::string(s->Get_string("capture_mouse (second value)")) == "middlerelease") { + const std::string mclick_choice = s->Get_string("capture_mouse_second_value"); + std::string middle_control_msg; + if (mclick_choice == "middlerelease") { sdl.mouse.middle_will_release = true; if (sdl.mouse.control_choice & (CaptureOnClick | CaptureOnStart)) middle_control_msg = " and middle-click will uncapture the mouse"; @@ -2337,10 +2507,10 @@ } LOG_MSG("SDL: Mouse %s%s.", mouse_control_msg.c_str(), middle_control_msg.c_str()); - // Only setup the Ctrl+F10 handler if the mouse is capturable + // Only setup the Ctrl/Cmd+F10 handler if the mouse is capturable if (sdl.mouse.control_choice & (CaptureOnStart | CaptureOnClick)) { - MAPPER_AddHandler(ToggleMouseCapture, SDL_SCANCODE_F10, MMOD1, - "capmouse", "Cap Mouse"); + MAPPER_AddHandler(ToggleMouseCapture, SDL_SCANCODE_F10, + PRIMARY_MOD, "capmouse", "Cap Mouse"); } // Apply the user's mouse sensitivity settings @@ -2354,8 +2524,8 @@ SDL_HINT_OVERRIDE); /* Get some Event handlers */ - MAPPER_AddHandler(KillSwitch, SDL_SCANCODE_F9, MMOD1, - "shutdown", "Shutdown"); + MAPPER_AddHandler(RequestExit, SDL_SCANCODE_F9, PRIMARY_MOD, "shutdown", + "Shutdown"); MAPPER_AddHandler(SwitchFullScreen, SDL_SCANCODE_RETURN, MMOD2, "fullscr", "Fullscreen"); MAPPER_AddHandler(Restart, SDL_SCANCODE_HOME, MMOD1 | MMOD2, @@ -2431,13 +2601,6 @@ return sdl.desktop.fullscreen; } -#if defined(MACOSX) -#define DB_POLLSKIP 3 -#else -//Not used yet, see comment below -#define DB_POLLSKIP 1 -#endif - static void HandleVideoResize(int width, int height) { /* Maybe a screen rotation has just occurred, so we simply resize. @@ -2498,15 +2661,8 @@ // on future expose events. sdl.desktop.lazy_init_window_size = false; - int w, h; - if (sdl.desktop.window.use_original_size || sdl.desktop.window.resizable) { - w = sdl.draw.width * sdl.draw.scalex; - h = sdl.draw.height * sdl.draw.scaley; - } else { - w = sdl.desktop.window.width; - h = sdl.desktop.window.height; - } - SDL_SetWindowSize(sdl.window, w, h); + SDL_SetWindowSize(sdl.window, sdl.desktop.window.width, + sdl.desktop.window.height); // Force window position when dosbox is configured to start in // fullscreen. Otherwise SDL will reset window position to 0,0 when @@ -2525,30 +2681,13 @@ GFX_ResetScreen(); } -void GFX_Events() { - //Don't poll too often. This can be heavy on the OS, especially Macs. - //In idle mode 3000-4000 polls are done per second without this check. - //Macs, with this code, max 250 polls per second. (non-macs unused default max 500) - //Currently not implemented for all platforms, given the ALT-TAB stuff for WIN32. -#if defined (MACOSX) - static int last_check = 0; - int current_check = GetTicks(); - if (current_check - last_check <= DB_POLLSKIP) return; - last_check = current_check; -#endif - +static bool ProcessEvents() +{ SDL_Event event; -#if defined (REDUCE_JOYSTICK_POLLING) if (MAPPER_IsUsingJoysticks()) { - static int poll_delay = 0; - int time = GetTicks(); - if (time - poll_delay > 20) { - poll_delay = time; - SDL_JoystickUpdate(); - MAPPER_UpdateJoysticks(); - } + SDL_JoystickUpdate(); + MAPPER_UpdateJoysticks(); } -#endif while (SDL_PollEvent(&event)) { switch (event.type) { case SDL_WINDOWEVENT: @@ -2568,13 +2707,15 @@ // event.window.data2); HandleVideoResize(event.window.data1, event.window.data2); + sdl.desktop.last_size_event = SDL_WINDOWEVENT_RESIZED; continue; + case SDL_WINDOWEVENT_FOCUS_GAINED: case SDL_WINDOWEVENT_EXPOSED: // DEBUG_LOG_MSG("SDL: Window has been exposed " // "and should be redrawn"); - /* FIXME: below is not consistently true :( + /* TODO: below is not consistently true :( * seems incorrect on KDE and sometimes on MATE * * Note that on Windows/Linux-X11/Wayland/macOS, @@ -2585,16 +2726,26 @@ * FOCUS_GAINED event to catch window startup * and size toggles. */ + // DEBUG_LOG_MSG("SDL: Window has gained keyboard focus"); + SetPriority(sdl.priority.focus); if (sdl.draw.callback) sdl.draw.callback(GFX_CallBackRedraw); GFX_UpdateMouseState(); - continue; + FocusInput(); + + // When we're fullscreen, the DOS program might + // change underlying draw resolutions, which can + // pose a problem when switching back to + // window-mode (beacuse the prior window-size + // may not longer accomodate the new draw-size). + // So in this case, we want to reset the screen + // size - but only if we're not in the middle of + // resizing the window (which also fires EXPOSED + // events). + if (!sdl.desktop.fullscreen && + sdl.desktop.last_size_event != SDL_WINDOWEVENT_RESIZED) + GFX_ResetScreen(); - case SDL_WINDOWEVENT_FOCUS_GAINED: - DEBUG_LOG_MSG("SDL: Window has gained keyboard focus"); - SetPriority(sdl.priority.focus); - CPU_Disable_SkipAutoAdjust(); - GFX_UpdateMouseState(); continue; case SDL_WINDOWEVENT_FOCUS_LOST: @@ -2638,6 +2789,9 @@ case SDL_WINDOWEVENT_SIZE_CHANGED: // DEBUG_LOG_MSG("SDL: The window size has changed"); + // differentiate this size change versus resizing. + sdl.desktop.last_size_event = SDL_WINDOWEVENT_SIZE_CHANGED; + // The window size has changed either as a // result of an API call or through the system // or user changing the window size. @@ -2656,9 +2810,9 @@ DEBUG_LOG_MSG("SDL: The window manager " "requests that the window be " "closed"); - continue; + RequestExit(true); + break; -#if SDL_VERSION_ATLEAST(2, 0, 5) case SDL_WINDOWEVENT_TAKE_FOCUS: // DEBUG_LOG_MSG("SDL: Window is being offered a focus"); // should SetWindowInputFocus() on itself or a @@ -2669,7 +2823,7 @@ DEBUG_LOG_MSG("SDL: Window had a hit test that " "wasn't SDL_HITTEST_NORMAL"); continue; -#endif + default: break; } @@ -2680,7 +2834,7 @@ if ((event.window.event == SDL_WINDOWEVENT_FOCUS_LOST) || (event.window.event == SDL_WINDOWEVENT_MINIMIZED)) { /* Window has lost focus, pause the emulator. * This is similar to what PauseDOSBox() does, but the exit criteria is different. - * Instead of waiting for the user to hit Alt-Break, we wait for the window to + * Instead of waiting for the user to hit Alt+Break, we wait for the window to * regain window or input focus. */ bool paused = true; @@ -2688,7 +2842,7 @@ GFX_SetTitle(-1,-1,true); KEYBOARD_ClrBuffer(); -// SDL_Delay(500); +// Delay(500); // while (SDL_PollEvent(&ev)) { // flush event queue. // } @@ -2698,7 +2852,9 @@ SDL_WaitEvent(&ev); switch (ev.type) { - case SDL_QUIT: throw(0); break; // a bit redundant at linux at least as the active events gets before the quit event. + case SDL_QUIT: + RequestExit(true); + break; case SDL_WINDOWEVENT: // wait until we get window focus back if ((ev.window.event == SDL_WINDOWEVENT_FOCUS_LOST) || (ev.window.event == SDL_WINDOWEVENT_MINIMIZED) || (ev.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) || (ev.window.event == SDL_WINDOWEVENT_RESTORED) || (ev.window.event == SDL_WINDOWEVENT_EXPOSED)) { // We've got focus back, so unpause and break out of the loop @@ -2735,9 +2891,7 @@ if (sdl.mouse.control_choice != NoMouse) HandleMouseButton(&event.button); break; - case SDL_QUIT: - throw(0); - break; + case SDL_QUIT: RequestExit(true); break; #ifdef WIN32 case SDL_KEYDOWN: case SDL_KEYUP: @@ -2750,8 +2904,11 @@ break; // This can happen as well. if (((event.key.keysym.sym == SDLK_TAB )) && (event.key.keysym.mod & KMOD_ALT)) break; - // ignore tab events that arrive just after regaining focus. (likely the result of alt-tab) - if ((event.key.keysym.sym == SDLK_TAB) && (GetTicks() - sdl.focus_ticks < 2)) break; + // Ignore tab events that arrive just after regaining + // focus. Likely the result of Alt+Tab. + if ((event.key.keysym.sym == SDLK_TAB) && + (GetTicksSince(sdl.focus_ticks) < 2)) + break; #endif #if defined (MACOSX) case SDL_KEYDOWN: @@ -2759,19 +2916,52 @@ /* On macs CMD-Q is the default key to close an application */ if (event.key.keysym.sym == SDLK_q && (event.key.keysym.mod == KMOD_RGUI || event.key.keysym.mod == KMOD_LGUI)) { - KillSwitch(true); + RequestExit(true); break; } #endif - default: - void MAPPER_CheckEvent(SDL_Event * event); - MAPPER_CheckEvent(&event); + default: MAPPER_CheckEvent(&event); } } + return !exit_requested; } -#if defined (WIN32) -static BOOL WINAPI ConsoleEventHandler(DWORD event) { +// This function processes events just prior to the next frame period. The host +// processing lag is measured and accounted for in the next pass. + +// Some modern (and very fast) systems experience unknown lag; in many cases +// this is caused by host-event polling. Comment-in the REPORT_EVENT_LAG define +// to have this function report excessive host lag. Typically process should be +// well under 1 millisecond, however some hosts report lag in the tens to +// hundereds of milliseconds. + +// #define REPORT_EVENT_LAG +bool GFX_MaybeProcessEvents() +{ + static auto next_render_at = std::chrono::steady_clock::now() + frame_period; + const auto checked_at = std::chrono::steady_clock::now(); + if (checked_at < next_render_at) + return true; + + const bool process_result = ProcessEvents(); + const auto rendered_at = std::chrono::steady_clock::now(); + const auto host_lag = rendered_at - checked_at; + next_render_at = rendered_at + frame_period - host_lag; + +#if defined(REPORT_EVENT_LAG) + if (host_lag > std::chrono::milliseconds(3)) { + const auto host_lag_us = + std::chrono::duration_cast(host_lag) + .count(); + LOG_MSG("SDL: Host polling took %.2f ms", host_lag_us / 1000.0); + } +#endif + return process_result; +} + +#if defined(WIN32) +static BOOL WINAPI ConsoleEventHandler(DWORD event) +{ switch (event) { case CTRL_SHUTDOWN_EVENT: case CTRL_LOGOFF_EVENT: @@ -2786,7 +2976,6 @@ } #endif - /* static variable to show wether there is not a valid stdout. * Fixes some bugs when -noconsole is used in a read only directory */ static bool no_stdout = false; @@ -2828,7 +3017,7 @@ Prop_int *Pint; // use pint for new properties Prop_int *pint; Prop_multival* Pmulti; - Section_prop* Psection; + Section_prop* psection; constexpr auto always = Property::Changeable::Always; constexpr auto deprecated = Property::Changeable::Deprecated; @@ -2836,7 +3025,7 @@ Pbool = sdl_sec->Add_bool("fullscreen", always, false); Pbool->Set_help("Start DOSBox directly in fullscreen.\n" - "Press Alt-Enter to switch back to window."); + "Press " MMOD2_NAME "+Enter to switch back to window."); pint = sdl_sec->Add_int("display", on_start, 0); pint->Set_help("Number of display to use; values depend on OS and user " @@ -2851,18 +3040,13 @@ pstring = sdl_sec->Add_string("windowresolution", on_start, "default"); pstring->Set_help( - "Set window size to be used when running in windowed mode:\n" + "Set window size when running in windowed mode:\n" " default: Select the best option based on your\n" " environment and other settings.\n" - " original: Resize window to the resolution picked by\n" - " the emulated program.\n" -#if SDL_VERSION_ATLEAST(2, 0, 5) - " resizable: Make the emulator window resizable.\n" - " This is an experimental option, works only with\n" - " output=opengl and glshader=sharp (or none)\n" -#endif - " : Scale the window content to the indicated\n" - " dimensions, in WxH format. For example: 1024x768.\n" + " small, medium, or large (or s, m, l):\n" + " Size the window relative to the desktop.\n" + " : Scale the window to the given dimensions in\n" + " WxH format. For example: 1024x768.\n" " Scaling is not performed for output=surface."); const char *outputs[] = { @@ -2912,30 +3096,32 @@ Pmulti->SetValue(mouse_control_defaults); // Add the mouse and middle control as sub-sections - Psection = Pmulti->GetSection(); - Psection->Add_string("capture_mouse (first value)", always, mouse_controls[0])->Set_values(mouse_controls); - Psection->Add_string("capture_mouse (second value)", always, middle_controls[0])->Set_values(middle_controls); + psection = Pmulti->GetSection(); + psection->Add_string("capture_mouse_first_value", always, mouse_controls[0]) + ->Set_values(mouse_controls); + psection->Add_string("capture_mouse_second_value", always, middle_controls[0]) + ->Set_values(middle_controls); // Construct and set the help block using defaults set above std::string mouse_control_help( - "Choose a mouse control method:\n" - " onclick: The mouse will be captured after the first\n" - " click inside the window.\n" - " onstart: The mouse is captured immediately on start\n" - " (similar to real DOS).\n" - " seamless: The mouse can move seamlessly in and out of DOSBox\n" - " window and cannot be captured.\n" - " nomouse: The mouse is disabled and hidden without any\n" - " input sent to the game.\n" - "Choose how middle-clicks are handled (second parameter):\n" - " middlegame: Middle-clicks are sent to the game\n" - " (Ctrl-F10 uncaptures the mouse).\n" - " middlerelease: Middle-clicks are used to uncapture the mouse\n" - " (not sent to the game). However, middle-clicks\n" - " will be sent to the game in fullscreen or when\n" - " seamless control is set.\n" - " Ctrl-F10 will also uncapture the mouse.\n" - "Defaults (if not present or incorrect): "); + "Choose a mouse control method:\n" + " onclick: The mouse will be captured after the first\n" + " click inside the window.\n" + " onstart: The mouse is captured immediately on start\n" + " (similar to real DOS).\n" + " seamless: The mouse can move seamlessly in and out of DOSBox\n" + " window and cannot be captured.\n" + " nomouse: The mouse is disabled and hidden without any\n" + " input sent to the game.\n" + "Choose how middle-clicks are handled (second parameter):\n" + " middlegame: Middle-clicks are sent to the game\n" + " (" PRIMARY_MOD_NAME "+F10 uncaptures the mouse).\n" + " middlerelease: Middle-clicks are used to uncapture the mouse\n" + " (not sent to the game). However, middle-clicks\n" + " will be sent to the game in fullscreen or when\n" + " seamless control is set.\n" + " " PRIMARY_MOD_NAME "+F10 will also uncapture the mouse.\n" + "Defaults (if not present or incorrect): "); mouse_control_help += mouse_control_defaults; Pmulti->Set_help(mouse_control_help); @@ -2957,16 +3143,23 @@ Pbool->Set_help("Wait before closing the console if dosbox has an error."); Pmulti = sdl_sec->Add_multi("priority", Property::Changeable::Always, ","); - Pmulti->SetValue("higher,normal"); - Pmulti->Set_help("Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n" - "pause is only valid for the second entry."); - - const char* actt[] = { "lowest", "lower", "normal", "higher", "highest", "pause", 0}; - Pstring = Pmulti->GetSection()->Add_string("active",Property::Changeable::Always,"higher"); + Pmulti->SetValue("auto,auto"); + Pmulti->Set_help( + "Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.\n" + "pause is only valid for the second entry. auto disables priority levels and uses OS defaults"); + + const char *actt[] = {"auto", "lowest", "lower", "normal", + "higher", "highest", "pause", 0}; + Pstring = Pmulti->GetSection()->Add_string("active", + Property::Changeable::Always, + "higher"); Pstring->Set_values(actt); - const char* inactt[] = { "lowest", "lower", "normal", "higher", "highest", "pause", 0}; - Pstring = Pmulti->GetSection()->Add_string("inactive",Property::Changeable::Always,"normal"); + const char *inactt[] = {"auto", "lowest", "lower", "normal", + "higher", "highest", "pause", 0}; + Pstring = Pmulti->GetSection()->Add_string("inactive", + Property::Changeable::Always, + "normal"); Pstring->Set_values(inactt); pstring = sdl_sec->Add_path("mapperfile", always, MAPPERFILE); @@ -3020,7 +3213,7 @@ SDL_BlitSurface(splash_surf, NULL, sdl.surface, NULL); SDL_UpdateWindowSurface(sdl.window); - SDL_Delay(12000); + Delay(12000); #endif // WIN32 } @@ -3082,7 +3275,7 @@ for(Bitu i = 0; i < parameters.size(); i++) newargs[i] = (char*)parameters[i].c_str(); newargs[parameters.size()] = NULL; MIXER_CloseAudioDevice(); - SDL_Delay(50); + Delay(50); QuitSDL(); #if C_DEBUG // shutdown curses @@ -3203,8 +3396,15 @@ #endif } -//extern void UI_Init(void); -int main(int argc, char* argv[]) { +void GFX_GetSize(int &width, int &height, bool &fullscreen) +{ + width = sdl.draw.width; + height = sdl.draw.height; + fullscreen = sdl.desktop.fullscreen; +} + +int sdl_main(int argc, char *argv[]) +{ int rcode = 0; // assume good until proven otherwise try { Disable_OS_Scaling(); //Do this early on, maybe override it through some parameter. @@ -3258,7 +3458,7 @@ if (control->cmdline->FindExist("--version") || control->cmdline->FindExist("-version") || control->cmdline->FindExist("-v")) { - printf(version_msg, VERSION); + printf(version_msg, DOSBOX_GetDetailedVersion()); return 0; } @@ -3283,7 +3483,7 @@ SetConsoleCtrlHandler((PHANDLER_ROUTINE) ConsoleEventHandler,TRUE); #endif - LOG_MSG("dosbox-staging version %s", VERSION); + LOG_MSG("dosbox-staging version %s", DOSBOX_GetDetailedVersion()); LOG_MSG("---"); if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO) < 0) @@ -3368,10 +3568,14 @@ LOG_MSG("CONFIG: Can't create dir '%s': %s", soundfonts_dir.c_str(), safe_strerror(errno).c_str()); #endif // C_FLUIDSYNTH +#if C_MT32EMU + const std::string mt32_rom_dir = config_path + "mt32-roms"; + if (create_dir(mt32_rom_dir.c_str(), 0700, OK_IF_EXISTS) != 0) + LOG_MSG("CONFIG: Can't create dir '%s': %s", + mt32_rom_dir.c_str(), safe_strerror(errno).c_str()); +#endif // C_MT32EMU -#if (ENVIRON_LINKED) - control->ParseEnv(environ); -#endif + control->ParseEnv(); // UI_Init(); // if (control->cmdline->FindExist("-startui")) UI_Run(false); /* Init all the sections */ @@ -3385,8 +3589,9 @@ } } - MAPPER_BindKeys(); // All subsystem handlers need to be - // registered at this point to be mappable. + // All subsystems' hotkeys need to be registered at this point + // to ensure their hotkeys appear in the graphical mapper. + MAPPER_BindKeys(sdl_sec); if (control->cmdline->FindExist("-startmapper")) MAPPER_DisplayUI(); @@ -3424,9 +3629,3 @@ return rcode; } - -void GFX_GetSize(int &width, int &height, bool &fullscreen) { - width = sdl.draw.width; - height = sdl.draw.height; - fullscreen = sdl.desktop.fullscreen; -} diff -Nru dosbox-staging-0.76.0/src/gui/sdl_mapper.cpp dosbox-staging-0.77.0/src/gui/sdl_mapper.cpp --- dosbox-staging-0.76.0/src/gui/sdl_mapper.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/gui/sdl_mapper.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,6 +46,7 @@ #include "setup.h" #include "string_utils.h" #include "support.h" +#include "timer.h" #include "video.h" /* Mouse related */ @@ -336,7 +340,7 @@ class CKeyBind; class CKeyBindGroup; -class CKeyBind : public CBind { +class CKeyBind final : public CBind { public: CKeyBind(CBindList *_list, SDL_Scancode _key) : CBind(_list), @@ -360,7 +364,7 @@ SDL_Scancode key; }; -class CKeyBindGroup : public CBindGroup { +class CKeyBindGroup final : public CBindGroup { public: CKeyBindGroup(Bitu _keys) : CBindGroup(), @@ -435,7 +439,7 @@ class CJButtonBind; class CJHatBind; -class CJAxisBind : public CBind { +class CJAxisBind final : public CBind { public: CJAxisBind(CBindList *_list, CBindGroup *_group, int _axis, bool _positive) : CBind(_list), @@ -469,7 +473,7 @@ bool positive; }; -class CJButtonBind : public CBind { +class CJButtonBind final : public CBind { public: CJButtonBind(CBindList *_list, CBindGroup *_group, int _button) : CBind(_list), @@ -497,7 +501,7 @@ int button; }; -class CJHatBind : public CBind { +class CJHatBind final : public CBind { public: CJHatBind(CBindList *_list, CBindGroup *_group, uint8_t _hat, uint8_t _dir) : CBind(_list), @@ -505,7 +509,8 @@ hat(_hat), dir(_dir) { - /* allow only one hat position */ // FIXME why? + // TODO this code allows to bind only a single hat position, but + // perhaps we should allow 8-way positioning? if (dir & SDL_HAT_UP) dir = SDL_HAT_UP; else if (dir & SDL_HAT_RIGHT) @@ -645,22 +650,26 @@ CBind * CreateEventBind(SDL_Event * event) { if (event->type==SDL_JOYAXISMOTION) { - if (event->jaxis.which!=stick) return 0; -#if defined (REDUCE_JOYSTICK_POLLING) - if (event->jaxis.axis >= axes) + const int axis_id = event->jaxis.axis; + const auto axis_position = event->jaxis.value; + + if (event->jaxis.which != stick) + return 0; + if (axis_id >= axes) return nullptr; -#endif - if (abs(event->jaxis.value) < 25000) + if (abs(axis_position) < 25000) + return 0; + + // Axis IDs 2 and 5 are triggers on six-axis controllers + const bool is_trigger = (axis_id == 2 || axis_id == 5) && axes == 6; + const bool toggled = axis_position > 0 || is_trigger; + return CreateAxisBind(axis_id, toggled); + + } else if (event->type == SDL_JOYBUTTONDOWN) { + if (event->jbutton.which != stick) return 0; - return CreateAxisBind(event->jaxis.axis, - event->jaxis.value > 0); - } else if (event->type==SDL_JOYBUTTONDOWN) { - if (event->jbutton.which!=stick) return 0; -#if defined (REDUCE_JOYSTICK_POLLING) return CreateButtonBind(event->jbutton.button%button_wrap); -#else - return CreateButtonBind(event->jbutton.button); -#endif + } else if (event->type==SDL_JOYHATMOTION) { if (event->jhat.which!=stick) return 0; if (event->jhat.value==0) return 0; @@ -877,7 +886,7 @@ std::list stickbindgroups; -class C4AxisBindGroup : public CStickBindGroup { +class C4AxisBindGroup final : public CStickBindGroup { public: C4AxisBindGroup(Bitu _stick,Bitu _emustick) : CStickBindGroup (_stick,_emustick){ emulated_axes=4; @@ -939,7 +948,7 @@ } }; -class CFCSBindGroup : public CStickBindGroup { +class CFCSBindGroup final : public CStickBindGroup { public: CFCSBindGroup(Bitu _stick, Bitu _emustick) : CStickBindGroup(_stick, _emustick) @@ -1070,7 +1079,7 @@ } }; -class CCHBindGroup : public CStickBindGroup { +class CCHBindGroup final : public CStickBindGroup { public: CCHBindGroup(Bitu _stick, Bitu _emustick) : CStickBindGroup(_stick, _emustick) @@ -1224,6 +1233,7 @@ m_pace_ms = pace_ms; m_stop_requested = false; m_instance = std::thread(&Typer::Callback, this); + set_thread_name(m_instance, "dosbox:autotype"); } void Wait() { if (m_instance.joinable()) @@ -1233,6 +1243,7 @@ m_stop_requested = true; Wait(); } + private: void Callback() { // quit before our initial wait time @@ -1254,7 +1265,9 @@ for (auto &event : *m_events) { if (bind_name == event->GetName()) { found = true; - MAPPER_TriggerEvent(event, true); + event->Active(true); + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + event->Active(false); break; } } @@ -1431,7 +1444,7 @@ class CEventButton; static CEventButton * last_clicked = NULL; -class CEventButton : public CClickableTextButton { +class CEventButton final : public CClickableTextButton { public: CEventButton(Bitu x, Bitu y, Bitu dx, Bitu dy, const char *text, CEvent *ev) : CClickableTextButton(x, y, dx, dy, text), @@ -1454,7 +1467,7 @@ CEvent * event = nullptr; }; -class CCaptionButton : public CButton { +class CCaptionButton final : public CButton { public: CCaptionButton(Bitu _x,Bitu _y,Bitu _dx,Bitu _dy) : CButton(_x,_y,_dx,_dy){ caption[0]=0; @@ -1481,7 +1494,7 @@ static void MAPPER_SaveBinds(); -class CBindButton : public CClickableTextButton { +class CBindButton final : public CClickableTextButton { public: CBindButton(Bitu _x, Bitu _y, Bitu _dx, Bitu _dy, const char * _text, BB_Types _type) : CClickableTextButton(_x, _y, _dx, _dy, _text), @@ -1526,7 +1539,7 @@ BB_Types type; }; -class CCheckButton : public CClickableTextButton { +class CCheckButton final : public CClickableTextButton { public: CCheckButton(Bitu x, Bitu y, Bitu dx, Bitu dy, const char *text, BC_Types t) : CClickableTextButton(x, y, dx, dy, text), @@ -1580,7 +1593,7 @@ BC_Types type; }; -class CKeyEvent : public CTriggeredEvent { +class CKeyEvent final : public CTriggeredEvent { public: CKeyEvent(char const * const entry, KBD_KEYS k) : CTriggeredEvent(entry), @@ -1594,7 +1607,7 @@ KBD_KEYS key; }; -class CJAxisEvent : public CContinuousEvent { +class CJAxisEvent final : public CContinuousEvent { public: CJAxisEvent(char const * const entry, Bitu s, Bitu a, bool p, CJAxisEvent *op_axis) : CContinuousEvent(entry), @@ -1629,7 +1642,7 @@ CJAxisEvent * opposite_axis; }; -class CJButtonEvent : public CTriggeredEvent { +class CJButtonEvent final : public CTriggeredEvent { public: CJButtonEvent(char const * const entry, Bitu s, Bitu btn) : CTriggeredEvent(entry), @@ -1646,7 +1659,7 @@ Bitu stick,button; }; -class CJHatEvent : public CTriggeredEvent { +class CJHatEvent final : public CTriggeredEvent { public: CJHatEvent(char const * const entry, Bitu s, Bitu h, Bitu d) : CTriggeredEvent(entry), @@ -1664,7 +1677,7 @@ Bitu stick,hat,dir; }; -class CModEvent : public CTriggeredEvent { +class CModEvent final : public CTriggeredEvent { public: CModEvent(char const * const _entry, int _wmod) : CTriggeredEvent(_entry), @@ -1683,7 +1696,7 @@ int wmod; }; -class CHandlerEvent : public CTriggeredEvent { +class CHandlerEvent final : public CTriggeredEvent { public: CHandlerEvent(const char *entry, MAPPER_Handler *handle, @@ -2034,12 +2047,27 @@ for (i=0;i<11;i++) AddKeyButtonEvent(PX(2+i),PY(4),BW,BH,combo_4[i].title,combo_4[i].entry,combo_4[i].key); AddKeyButtonEvent(PX(13),PY(4),BW*3,BH,"SHIFT","rshift",KBD_rightshift); - /* Last Row */ - AddKeyButtonEvent(PX(0) ,PY(5),BW*2,BH,"CTRL","lctrl",KBD_leftctrl); - AddKeyButtonEvent(PX(3) ,PY(5),BW*2,BH,"ALT","lalt",KBD_leftalt); - AddKeyButtonEvent(PX(5) ,PY(5),BW*6,BH,"SPACE","space",KBD_space); - AddKeyButtonEvent(PX(11),PY(5),BW*2,BH,"ALT","ralt",KBD_rightalt); - AddKeyButtonEvent(PX(14),PY(5),BW*2,BH,"CTRL","rctrl",KBD_rightctrl); + /* Bottom Row */ + AddKeyButtonEvent(PX(0), PY(5), BW * 2, BH, MMOD1_NAME, "lctrl", KBD_leftctrl); + +#if !defined(MACOSX) + AddKeyButtonEvent(PX(2), PY(5), BW * 2, BH, MMOD3_NAME, "lgui", KBD_leftgui); + AddKeyButtonEvent(PX(4), PY(5), BW * 2, BH, MMOD2_NAME, "lalt", KBD_leftalt); +#else + AddKeyButtonEvent(PX(2), PY(5), BW * 2, BH, MMOD2_NAME, "lalt", KBD_leftalt); + AddKeyButtonEvent(PX(4), PY(5), BW * 2, BH, MMOD3_NAME, "lgui", KBD_leftgui); +#endif + + AddKeyButtonEvent(PX(6), PY(5), BW * 4, BH, "SPACE", "space", KBD_space); + +#if !defined(MACOSX) + AddKeyButtonEvent(PX(10), PY(5), BW * 2, BH, MMOD2_NAME, "ralt", KBD_rightalt); + AddKeyButtonEvent(PX(12), PY(5), BW * 2, BH, MMOD3_NAME, "rgui", KBD_rightgui); + AddKeyButtonEvent(PX(14), PY(5), BW * 2, BH, MMOD1_NAME, "rctrl", KBD_rightctrl); +#else + AddKeyButtonEvent(PX(10), PY(5), BW * 2, BH, MMOD3_NAME, "rgui", KBD_rightgui); + AddKeyButtonEvent(PX(12), PY(5), BW * 2, BH, MMOD2_NAME, "ralt", KBD_rightalt); +#endif /* Arrow Keys */ #define XO 17 @@ -2095,7 +2123,9 @@ AddJAxisButton (PX(XO+2),PY(YO+1),BW,BH,"X+",0,0,true,cjaxis); CJAxisEvent * tmp_ptr; - if (joytype==JOY_2AXIS) { + + assert(joytype != JOY_UNSET); + if (joytype == JOY_2AXIS) { /* Buttons 1+2 of 2nd Joystick */ AddJButtonButton(PX(XO+4),PY(YO),BW,BH,"1" ,1,0); AddJButtonButton(PX(XO+4+2),PY(YO),BW,BH,"2" ,1,1); @@ -2265,83 +2295,120 @@ static struct { const char *eventend; SDL_Scancode key; -} DefaultKeys[] = { - {"f1", SDL_SCANCODE_F1}, {"f2", SDL_SCANCODE_F2}, {"f3", SDL_SCANCODE_F3}, - {"f4", SDL_SCANCODE_F4}, {"f5", SDL_SCANCODE_F5}, {"f6", SDL_SCANCODE_F6}, - {"f7", SDL_SCANCODE_F7}, {"f8", SDL_SCANCODE_F8}, {"f9", SDL_SCANCODE_F9}, - {"f10", SDL_SCANCODE_F10}, {"f11",SDL_SCANCODE_F11}, {"f12", SDL_SCANCODE_F12}, - - {"1", SDL_SCANCODE_1}, {"2", SDL_SCANCODE_2}, {"3", SDL_SCANCODE_3}, - {"4", SDL_SCANCODE_4}, {"5", SDL_SCANCODE_5}, {"6", SDL_SCANCODE_6}, - {"7", SDL_SCANCODE_7}, {"8", SDL_SCANCODE_8}, {"9", SDL_SCANCODE_9}, - {"0", SDL_SCANCODE_0}, - - {"a", SDL_SCANCODE_A}, {"b", SDL_SCANCODE_B}, {"c", SDL_SCANCODE_C}, - {"d", SDL_SCANCODE_D}, {"e", SDL_SCANCODE_E}, {"f", SDL_SCANCODE_F}, - {"g", SDL_SCANCODE_G}, {"h", SDL_SCANCODE_H}, {"i", SDL_SCANCODE_I}, - {"j", SDL_SCANCODE_J}, {"k", SDL_SCANCODE_K}, {"l", SDL_SCANCODE_L}, - {"m", SDL_SCANCODE_M}, {"n", SDL_SCANCODE_N}, {"o", SDL_SCANCODE_O}, - {"p", SDL_SCANCODE_P}, {"q", SDL_SCANCODE_Q}, {"r", SDL_SCANCODE_R}, - {"s", SDL_SCANCODE_S}, {"t", SDL_SCANCODE_T}, {"u", SDL_SCANCODE_U}, - {"v", SDL_SCANCODE_V}, {"w", SDL_SCANCODE_W}, {"x", SDL_SCANCODE_X}, - {"y", SDL_SCANCODE_Y}, {"z", SDL_SCANCODE_Z}, - - {"space", SDL_SCANCODE_SPACE}, - {"esc", SDL_SCANCODE_ESCAPE}, - {"equals", SDL_SCANCODE_EQUALS}, - {"grave", SDL_SCANCODE_GRAVE}, - {"tab", SDL_SCANCODE_TAB}, - {"enter", SDL_SCANCODE_RETURN}, - {"bspace", SDL_SCANCODE_BACKSPACE}, - {"lbracket", SDL_SCANCODE_LEFTBRACKET}, - {"rbracket", SDL_SCANCODE_RIGHTBRACKET}, - {"minus", SDL_SCANCODE_MINUS}, - {"capslock", SDL_SCANCODE_CAPSLOCK}, - {"semicolon", SDL_SCANCODE_SEMICOLON}, - {"quote", SDL_SCANCODE_APOSTROPHE}, - {"backslash", SDL_SCANCODE_BACKSLASH}, - {"lshift", SDL_SCANCODE_LSHIFT}, - {"rshift", SDL_SCANCODE_RSHIFT}, - {"lalt", SDL_SCANCODE_LALT}, - {"ralt", SDL_SCANCODE_RALT}, - {"lctrl", SDL_SCANCODE_LCTRL}, - {"rctrl", SDL_SCANCODE_RCTRL}, - {"comma", SDL_SCANCODE_COMMA}, - {"period", SDL_SCANCODE_PERIOD}, - {"slash", SDL_SCANCODE_SLASH}, - {"printscreen", SDL_SCANCODE_PRINTSCREEN}, - {"scrolllock", SDL_SCANCODE_SCROLLLOCK}, - {"pause", SDL_SCANCODE_PAUSE}, - {"pagedown", SDL_SCANCODE_PAGEDOWN}, - {"pageup", SDL_SCANCODE_PAGEUP}, - {"insert", SDL_SCANCODE_INSERT}, - {"home", SDL_SCANCODE_HOME}, - {"delete", SDL_SCANCODE_DELETE}, - {"end", SDL_SCANCODE_END}, - {"up", SDL_SCANCODE_UP}, - {"left", SDL_SCANCODE_LEFT}, - {"down", SDL_SCANCODE_DOWN}, - {"right", SDL_SCANCODE_RIGHT}, - - {"kp_1", SDL_SCANCODE_KP_1}, {"kp_2", SDL_SCANCODE_KP_2}, {"kp_3", SDL_SCANCODE_KP_3}, - {"kp_4", SDL_SCANCODE_KP_4}, {"kp_5", SDL_SCANCODE_KP_5}, {"kp_6", SDL_SCANCODE_KP_6}, - {"kp_7", SDL_SCANCODE_KP_7}, {"kp_8", SDL_SCANCODE_KP_8}, {"kp_9", SDL_SCANCODE_KP_9}, - {"kp_0", SDL_SCANCODE_KP_0}, - - {"numlock", SDL_SCANCODE_NUMLOCKCLEAR}, - {"kp_divide", SDL_SCANCODE_KP_DIVIDE}, - {"kp_multiply", SDL_SCANCODE_KP_MULTIPLY}, - {"kp_minus", SDL_SCANCODE_KP_MINUS}, - {"kp_plus", SDL_SCANCODE_KP_PLUS}, - {"kp_period", SDL_SCANCODE_KP_PERIOD}, - {"kp_enter", SDL_SCANCODE_KP_ENTER}, - - /* Is that the extra backslash key ("less than" key) */ - /* on some keyboards with the 102-keys layout?? */ - {"lessthan",SDL_SCANCODE_NONUSBACKSLASH}, +} DefaultKeys[] = {{"f1", SDL_SCANCODE_F1}, + {"f2", SDL_SCANCODE_F2}, + {"f3", SDL_SCANCODE_F3}, + {"f4", SDL_SCANCODE_F4}, + {"f5", SDL_SCANCODE_F5}, + {"f6", SDL_SCANCODE_F6}, + {"f7", SDL_SCANCODE_F7}, + {"f8", SDL_SCANCODE_F8}, + {"f9", SDL_SCANCODE_F9}, + {"f10", SDL_SCANCODE_F10}, + {"f11", SDL_SCANCODE_F11}, + {"f12", SDL_SCANCODE_F12}, + + {"1", SDL_SCANCODE_1}, + {"2", SDL_SCANCODE_2}, + {"3", SDL_SCANCODE_3}, + {"4", SDL_SCANCODE_4}, + {"5", SDL_SCANCODE_5}, + {"6", SDL_SCANCODE_6}, + {"7", SDL_SCANCODE_7}, + {"8", SDL_SCANCODE_8}, + {"9", SDL_SCANCODE_9}, + {"0", SDL_SCANCODE_0}, + + {"a", SDL_SCANCODE_A}, + {"b", SDL_SCANCODE_B}, + {"c", SDL_SCANCODE_C}, + {"d", SDL_SCANCODE_D}, + {"e", SDL_SCANCODE_E}, + {"f", SDL_SCANCODE_F}, + {"g", SDL_SCANCODE_G}, + {"h", SDL_SCANCODE_H}, + {"i", SDL_SCANCODE_I}, + {"j", SDL_SCANCODE_J}, + {"k", SDL_SCANCODE_K}, + {"l", SDL_SCANCODE_L}, + {"m", SDL_SCANCODE_M}, + {"n", SDL_SCANCODE_N}, + {"o", SDL_SCANCODE_O}, + {"p", SDL_SCANCODE_P}, + {"q", SDL_SCANCODE_Q}, + {"r", SDL_SCANCODE_R}, + {"s", SDL_SCANCODE_S}, + {"t", SDL_SCANCODE_T}, + {"u", SDL_SCANCODE_U}, + {"v", SDL_SCANCODE_V}, + {"w", SDL_SCANCODE_W}, + {"x", SDL_SCANCODE_X}, + {"y", SDL_SCANCODE_Y}, + {"z", SDL_SCANCODE_Z}, + + {"space", SDL_SCANCODE_SPACE}, + {"esc", SDL_SCANCODE_ESCAPE}, + {"equals", SDL_SCANCODE_EQUALS}, + {"grave", SDL_SCANCODE_GRAVE}, + {"tab", SDL_SCANCODE_TAB}, + {"enter", SDL_SCANCODE_RETURN}, + {"bspace", SDL_SCANCODE_BACKSPACE}, + {"lbracket", SDL_SCANCODE_LEFTBRACKET}, + {"rbracket", SDL_SCANCODE_RIGHTBRACKET}, + {"minus", SDL_SCANCODE_MINUS}, + {"capslock", SDL_SCANCODE_CAPSLOCK}, + {"semicolon", SDL_SCANCODE_SEMICOLON}, + {"quote", SDL_SCANCODE_APOSTROPHE}, + {"backslash", SDL_SCANCODE_BACKSLASH}, + {"lshift", SDL_SCANCODE_LSHIFT}, + {"rshift", SDL_SCANCODE_RSHIFT}, + {"lalt", SDL_SCANCODE_LALT}, + {"ralt", SDL_SCANCODE_RALT}, + {"lctrl", SDL_SCANCODE_LCTRL}, + {"rctrl", SDL_SCANCODE_RCTRL}, + {"lgui", SDL_SCANCODE_LGUI}, + {"rgui", SDL_SCANCODE_RGUI}, + {"comma", SDL_SCANCODE_COMMA}, + {"period", SDL_SCANCODE_PERIOD}, + {"slash", SDL_SCANCODE_SLASH}, + {"printscreen", SDL_SCANCODE_PRINTSCREEN}, + {"scrolllock", SDL_SCANCODE_SCROLLLOCK}, + {"pause", SDL_SCANCODE_PAUSE}, + {"pagedown", SDL_SCANCODE_PAGEDOWN}, + {"pageup", SDL_SCANCODE_PAGEUP}, + {"insert", SDL_SCANCODE_INSERT}, + {"home", SDL_SCANCODE_HOME}, + {"delete", SDL_SCANCODE_DELETE}, + {"end", SDL_SCANCODE_END}, + {"up", SDL_SCANCODE_UP}, + {"left", SDL_SCANCODE_LEFT}, + {"down", SDL_SCANCODE_DOWN}, + {"right", SDL_SCANCODE_RIGHT}, + + {"kp_1", SDL_SCANCODE_KP_1}, + {"kp_2", SDL_SCANCODE_KP_2}, + {"kp_3", SDL_SCANCODE_KP_3}, + {"kp_4", SDL_SCANCODE_KP_4}, + {"kp_5", SDL_SCANCODE_KP_5}, + {"kp_6", SDL_SCANCODE_KP_6}, + {"kp_7", SDL_SCANCODE_KP_7}, + {"kp_8", SDL_SCANCODE_KP_8}, + {"kp_9", SDL_SCANCODE_KP_9}, + {"kp_0", SDL_SCANCODE_KP_0}, + + {"numlock", SDL_SCANCODE_NUMLOCKCLEAR}, + {"kp_divide", SDL_SCANCODE_KP_DIVIDE}, + {"kp_multiply", SDL_SCANCODE_KP_MULTIPLY}, + {"kp_minus", SDL_SCANCODE_KP_MINUS}, + {"kp_plus", SDL_SCANCODE_KP_PLUS}, + {"kp_period", SDL_SCANCODE_KP_PERIOD}, + {"kp_enter", SDL_SCANCODE_KP_ENTER}, + + /* Is that the extra backslash key ("less than" key) */ + /* on some keyboards with the 102-keys layout?? */ + {"lessthan", SDL_SCANCODE_NONUSBACKSLASH}, - {0, SDL_SCANCODE_UNKNOWN} -}; + {0, SDL_SCANCODE_UNKNOWN}}; static void ClearAllBinds() { // wait for the auto-typer to complete because it might be accessing events @@ -2371,6 +2438,10 @@ CreateStringBind(buffer); sprintf(buffer, "mod_2 \"key %d\"", SDL_SCANCODE_LALT); CreateStringBind(buffer); + sprintf(buffer, "mod_3 \"key %d\"", SDL_SCANCODE_RGUI); + CreateStringBind(buffer); + sprintf(buffer, "mod_3 \"key %d\"", SDL_SCANCODE_LGUI); + CreateStringBind(buffer); for (const auto &handler_event : handlergroup) { handler_event->MakeDefaultBind(buffer); CreateStringBind(buffer); @@ -2470,10 +2541,11 @@ return true; } -void MAPPER_CheckEvent(SDL_Event * event) { - for (CBindGroup_it it = bindgroups.begin(); it != bindgroups.end(); ++it) { - if ((*it)->CheckEvent(event)) return; - } +void MAPPER_CheckEvent(SDL_Event *event) +{ + for (auto &group : bindgroups) + if (group->CheckEvent(event)) + return; } void BIND_MappingEvents() { @@ -2585,6 +2657,10 @@ * joysticks_active if joystick support is enabled and are present. */ static void QueryJoysticks() { + JOYSTICK_ParseConfiguredType(); + if (joytype == JOY_NONE) + return; + // Initialize SDL's Joystick and Event subsystems, if needed if (SDL_WasInit(SDL_INIT_JOYSTICK) != SDL_INIT_JOYSTICK) SDL_InitSubSystem(SDL_INIT_JOYSTICK); @@ -2629,15 +2705,11 @@ CKeyBindGroup* key_bind_group = new CKeyBindGroup(SDL_NUM_SCANCODES); keybindgroups.push_back(key_bind_group); + assert(joytype != JOY_UNSET); if (joytype != JOY_NONE) { -#if defined (REDUCE_JOYSTICK_POLLING) // direct access to the SDL joystick, thus removed from the event handling if (mapper.sticks.num) SDL_JoystickEventState(SDL_DISABLE); -#else - // enable joystick event handling - if (mapper.sticks.num) SDL_JoystickEventState(SDL_ENABLE); - else return; -#endif + // Free up our previously assigned joystick slot before assinging below if (mapper.sticks.stick[mapper.sticks.num_groups]) { delete mapper.sticks.stick[mapper.sticks.num_groups]; @@ -2682,14 +2754,12 @@ return (mapper.sticks.num > 0); } -#if defined (REDUCE_JOYSTICK_POLLING) void MAPPER_UpdateJoysticks() { for (Bitu i=0; iUpdateJoystick(); } } -#endif void MAPPER_LosingFocus() { for (CEventVector_it evit = events.begin(); evit != events.end(); ++evit) { @@ -2747,9 +2817,8 @@ mapper.exit = false; mapper.redraw=true; SetActiveEvent(0); -#if defined (REDUCE_JOYSTICK_POLLING) SDL_JoystickEventState(SDL_ENABLE); -#endif + while (!mapper.exit) { if (mapper.redraw) { mapper.redraw = false; @@ -2758,16 +2827,15 @@ SDL_UpdateWindowSurface(mapper.window); } BIND_MappingEvents(); - SDL_Delay(1); + Delay(1); } /* ONE SHOULD NOT FORGET TO DO THIS! Unless a memory leak is desired... */ SDL_FreeSurface(mapper.draw_surface); SDL_FreeSurface(mapper.draw_surface_nonpaletted); SDL_FreePalette(sdl2_map_pal_ptr); -#if defined (REDUCE_JOYSTICK_POLLING) SDL_JoystickEventState(SDL_DISABLE); -#endif + if (mousetoggle) GFX_ToggleMouseCapture(); SDL_ShowCursor(cursor); @@ -2816,15 +2884,18 @@ SDL_QuitSubSystem(SDL_INIT_JOYSTICK); } -void MAPPER_BindKeys() { - //Release any keys pressed, or else they'll get stuck +void MAPPER_BindKeys(Section *sec) +{ + // Release any keys pressed, or else they'll get stuck GFX_LosingFocus(); - const Section *section = control->GetSection("joystick"); - assert(section); - const std::string joystick_type = section->GetPropValue("joysticktype"); - if (!joystick_type.empty() && joystick_type != "none") - QueryJoysticks(); + // Get the mapper file set by the user + const auto section = static_cast(sec); + const auto property = section->Get_path("mapperfile"); + assert(property && !property->realpath.empty()); + mapper.filename = property->realpath; + + QueryJoysticks(); // Create the graphical layout for all registered key-binds if (buttons.empty()) @@ -2867,34 +2938,14 @@ mapper.typist.Start(&events, sequence, wait_ms, pace_ms); } -// Activate user-specified or default binds -static void MAPPER_ConfigureBindings(Section *sec) { - (void) sec; // unused but present for API compliance - Section_prop const *const section=static_cast(sec); - Prop_path const *const pp = section->Get_path("mapperfile"); - mapper.filename = pp->realpath; - - /* Because the mapper is initialized before several other of DOSBox's - * submodules have a chance to register their key bindings, we defer - * the mapper's setup and instead manully BindKeys() in SDL main only - * after -all- subsystems have been initialized, which ensures that all - * binding a present, and thus are also layed out in the mapper's GUI. - */ - static bool init_phase = true; - if (init_phase) { - init_phase = false; - return; - } - MAPPER_BindKeys(); -} - void MAPPER_StartUp(Section * sec) { Section_prop * section = static_cast(sec); //runs after this function ends and for subsequent config -set "sdl mapperfile=file.map" commands - section->AddInitFunction(&MAPPER_ConfigureBindings, true); + section->AddInitFunction(&MAPPER_BindKeys, true); // runs one-time on shutdown section->AddDestroyFunction(&MAPPER_Destroy, false); - MAPPER_AddHandler(&MAPPER_Run, SDL_SCANCODE_F1, MMOD1, "mapper", "Mapper"); + MAPPER_AddHandler(&MAPPER_Run, SDL_SCANCODE_F1, PRIMARY_MOD, "mapper", + "Mapper"); } diff -Nru dosbox-staging-0.76.0/src/hardware/adlib.cpp dosbox-staging-0.77.0/src/hardware/adlib.cpp --- dosbox-staging-0.76.0/src/hardware/adlib.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/adlib.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,18 +16,20 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "adlib.h" + #include #include #include #include -#include "adlib.h" #include "cpu.h" #include "setup.h" +#include "support.h" #include "mapper.h" #include "mem.h" #include "dbopl.h" -#include "../libs/nuked/nukedopl.h" +#include "../libs/nuked/opl3.h" #include "mame/emu.h" #include "mame/fmopl.h" @@ -44,7 +46,7 @@ virtual void WriteReg( Bit32u reg, Bit8u val ) { adlib_write(reg,val); } - virtual Bit32u WriteAddr( Bit32u port, Bit8u val ) { + virtual Bit32u WriteAddr( Bit32u /*port*/, Bit8u val ) { return val; } @@ -103,7 +105,7 @@ ym3812_write(chip, 0, reg); ym3812_write(chip, 1, val); } - virtual Bit32u WriteAddr(Bit32u port, Bit8u val) { + virtual Bit32u WriteAddr(Bit32u /*port*/, Bit8u val) { return val; } virtual void Generate(MixerChannel* chan, Bitu samples) { @@ -135,7 +137,7 @@ ymf262_write(chip, 0, reg); ymf262_write(chip, 1, val); } - virtual Bit32u WriteAddr(Bit32u port, Bit8u val) { + virtual Bit32u WriteAddr(Bit32u /*port*/, Bit8u val) { return val; } virtual void Generate(MixerChannel* chan, Bitu samples) { @@ -598,7 +600,7 @@ } -void Module::PortWrite( Bitu port, Bitu val, Bitu iolen ) { +void Module::PortWrite( Bitu port, Bitu val, Bitu /*iolen*/ ) { //Keep track of last write time lastUsed = PIC_Ticks; //Maybe only enable with a keyon? @@ -673,7 +675,7 @@ } -Bitu Module::PortRead( Bitu port, Bitu iolen ) { +Bitu Module::PortRead( Bitu port, Bitu /*iolen*/ ) { //roughly half a micro (as we already do 1 micro on each port read and some tests revealed it taking 1.5 micros to read an adlib port) Bits delaycyc = (CPU_CycleMax/2048); if(GCC_UNLIKELY(delaycyc > CPU_Cycles)) delaycyc = CPU_Cycles; @@ -799,7 +801,7 @@ fwrite( b, 1, w, handle ); fclose( handle ); }; -#endif // 0 +#endif static void OPL_SaveRawEvent(bool pressed) { if (!pressed) @@ -846,7 +848,7 @@ mixerObject(), mode(MODE_OPL2), // TODO this is set in Init and there's no good default reg{0}, // union - ctrl{false, 0, 0xff, 0xff}, + ctrl{false, 0, 0xff, 0xff, false}, mixerChan(nullptr), lastUsed(0), handler(nullptr), @@ -918,7 +920,7 @@ module = new Adlib::Module( sec ); } -void OPL_ShutDown(Section* sec){ +void OPL_ShutDown(Section* /*sec*/){ delete module; module = 0; diff -Nru dosbox-staging-0.76.0/src/hardware/adlib.h dosbox-staging-0.77.0/src/hardware/adlib.h --- dosbox-staging-0.76.0/src/hardware/adlib.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/adlib.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/cmos.cpp dosbox-staging-0.77.0/src/hardware/cmos.cpp --- dosbox-staging-0.76.0/src/hardware/cmos.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/cmos.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,18 +16,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dosbox.h" -#include -#include +#include +#include -#include "dosbox.h" -#include "timer.h" -#include "pic.h" +#include "bios_disk.h" +#include "cross.h" #include "inout.h" #include "mem.h" -#include "bios_disk.h" +#include "pic.h" #include "setup.h" -#include "cross.h" //fmod on certain platforms +#include "timer.h" static struct { Bit8u regs[0x40]; @@ -48,9 +48,9 @@ bool update_ended; } cmos; -static void cmos_timerevent(Bitu val) { +static void cmos_timerevent(Bitu /*val*/) { if (cmos.timer.acknowledged) { - cmos.timer.acknowledged=false; + cmos.timer.acknowledged = false; PIC_ActivateIRQ(8); } if (cmos.timer.enabled) { @@ -60,7 +60,7 @@ } static void cmos_checktimer(void) { - PIC_RemoveEvents(cmos_timerevent); + PIC_RemoveEvents(cmos_timerevent); if (cmos.timer.div<=2) cmos.timer.div+=7; cmos.timer.delay=(1000.0f/(32768.0f / (1 << (cmos.timer.div - 1)))); if (!cmos.timer.div || !cmos.timer.enabled) return; @@ -72,12 +72,12 @@ // status reg A reading with this (and with other delays actually) } -void cmos_selreg(Bitu port,Bitu val,Bitu iolen) { +void cmos_selreg(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { cmos.reg=val & 0x3f; cmos.nmi=(val & 0x80)>0; } -static void cmos_writereg(Bitu port,Bitu val,Bitu iolen) { +static void cmos_writereg(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { switch (cmos.reg) { case 0x00: /* Seconds */ case 0x02: /* Minutes */ @@ -123,38 +123,35 @@ #define MAKE_RETURN(_VAL) (cmos.bcd ? ((((_VAL) / 10) << 4) | ((_VAL) % 10)) : (_VAL)); -static Bitu cmos_readreg(Bitu port,Bitu iolen) { +static Bitu cmos_readreg(Bitu /*port*/,Bitu /*iolen*/) { if (cmos.reg>0x3f) { LOG(LOG_BIOS,LOG_ERROR)("CMOS:Read from illegal register %x",cmos.reg); return 0xff; } Bitu drive_a, drive_b; Bit8u hdparm; - time_t curtime; - struct tm *loctime; - /* Get the current time. */ - curtime = time (NULL); - /* Convert it to local time representation. */ - loctime = localtime (&curtime); + const time_t curtime = time(nullptr); + struct tm datetime; + cross::localtime_r(&curtime, &datetime); switch (cmos.reg) { case 0x00: /* Seconds */ - return MAKE_RETURN(loctime->tm_sec); + return MAKE_RETURN(datetime.tm_sec); case 0x02: /* Minutes */ - return MAKE_RETURN(loctime->tm_min); + return MAKE_RETURN(datetime.tm_min); case 0x04: /* Hours */ - return MAKE_RETURN(loctime->tm_hour); + return MAKE_RETURN(datetime.tm_hour); case 0x06: /* Day of week */ - return MAKE_RETURN(loctime->tm_wday + 1); + return MAKE_RETURN(datetime.tm_wday + 1); case 0x07: /* Date of month */ - return MAKE_RETURN(loctime->tm_mday); + return MAKE_RETURN(datetime.tm_mday); case 0x08: /* Month */ - return MAKE_RETURN(loctime->tm_mon + 1); + return MAKE_RETURN(datetime.tm_mon + 1); case 0x09: /* Year */ - return MAKE_RETURN(loctime->tm_year % 100); + return MAKE_RETURN(datetime.tm_year % 100); case 0x32: /* Century */ - return MAKE_RETURN(loctime->tm_year / 100 + 19); + return MAKE_RETURN(datetime.tm_year / 100 + 19); case 0x01: /* Seconds Alarm */ case 0x03: /* Minutes Alarm */ case 0x05: /* Hours Alarm */ @@ -264,7 +261,6 @@ case 0x3a: return 0; - case 0x0b: /* Status register B */ case 0x0d: /* Status register D */ case 0x0f: /* Shutdown status byte */ @@ -288,10 +284,10 @@ } -class CMOS:public Module_base{ +class CMOS final : public Module_base{ private: IO_ReadHandleObject ReadHandler[2]; - IO_WriteHandleObject WriteHandler[2]; + IO_WriteHandleObject WriteHandler[2]; public: CMOS(Section* configuration):Module_base(configuration){ WriteHandler[0].Install(0x70,cmos_selreg,IO_MB); @@ -320,7 +316,7 @@ static CMOS* test; -void CMOS_Destroy(Section* sec){ +void CMOS_Destroy(Section* /*sec*/){ delete test; } diff -Nru dosbox-staging-0.76.0/src/hardware/dbopl.cpp dosbox-staging-0.77.0/src/hardware/dbopl.cpp --- dosbox-staging-0.76.0/src/hardware/dbopl.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/dbopl.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -856,7 +856,7 @@ Bit32u tcIndex = (1 + phaseBit) << 8; sample += Op(5)->GetWave( tcIndex, tcVol ); } - sample <<= 1; + sample *= 2; // don't bit-shift signed values if ( opl3Mode ) { output[0] += sample; output[1] += sample; @@ -1000,7 +1000,7 @@ INLINE Bit32u Chip::ForwardNoise() { noiseCounter += noiseAdd; Bitu count = noiseCounter >> LFO_SH; - noiseCounter &= WAVE_MASK; + noiseCounter &= ((1< 0; --count ) { //Noise calculation from mame noiseValue ^= ( 0x800302 ) & ( 0 - (noiseValue & 1 ) ); diff -Nru dosbox-staging-0.76.0/src/hardware/dbopl.h dosbox-staging-0.77.0/src/hardware/dbopl.h --- dosbox-staging-0.76.0/src/hardware/dbopl.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/dbopl.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/dc_silencer.cpp dosbox-staging-0.77.0/src/hardware/dc_silencer.cpp --- dosbox-staging-0.76.0/src/hardware/dc_silencer.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/dc_silencer.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team - * Copyright (c) 2019-2020 Kevin R Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2019-2021 Kevin R. Croft * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ */ #include "dc_silencer.h" + #include "support.h" void DCSilencer::Configure(const uint32_t sequence_hz, @@ -51,7 +52,7 @@ bool DCSilencer::Generate(const int16_t dc_offset, const size_t samples, int16_t *buffer) { assertm(rad_dt > 0 && vol_dt > 0, "Configure the silencer first"); - uint16_t i = 0; + size_t i = 0; while (vol_pos > 0 && i < samples) { vol_pos -= vol_dt; // keep turning down the volume .. rad_pos += rad_dt; // keep walking around our circle .. diff -Nru dosbox-staging-0.76.0/src/hardware/dc_silencer.h dosbox-staging-0.77.0/src/hardware/dc_silencer.h --- dosbox-staging-0.76.0/src/hardware/dc_silencer.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/dc_silencer.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team - * Copyright (c) 2020-2020 Kevin R Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2020-2021 Kevin R. Croft * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -64,8 +64,10 @@ */ -#include -#include "support.h" +#include "config.h" + +#include +#include class DCSilencer { public: diff -Nru dosbox-staging-0.76.0/src/hardware/disney.cpp dosbox-staging-0.77.0/src/hardware/disney.cpp --- dosbox-staging-0.76.0/src/hardware/disney.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/disney.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,89 +16,110 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dosbox.h" +#include +#include #include -#include "dosbox.h" + #include "inout.h" #include "mixer.h" #include "pic.h" #include "setup.h" -#define DISNEY_BASE 0x0378 +// Disney Sound Source Constants +constexpr uint16_t DISNEY_BASE = 0x0378; +constexpr uint8_t BUFFER_SAMPLES = 128; +constexpr uint8_t DISNEY_INIT_STATUS = 0x84; + +enum DISNEY_STATE { IDLE, RUNNING, FINISHED, ANALYZING }; + +struct dac_channel { + uint8_t buffer[BUFFER_SAMPLES] = {}; + uint8_t used = 0; // current data buffer level + double speedcheck_sum = 0; + double speedcheck_last = 0; + bool speedcheck_failed = false; + bool speedcheck_init = false; +}; -#define DISNEY_SIZE 128 +using mixer_channel_ptr_t = std::unique_ptr; -typedef struct _dac_channel { - Bit8u buffer[DISNEY_SIZE]; // data buffer - Bitu used; // current data buffer level - double speedcheck_sum; - double speedcheck_last; - bool speedcheck_failed; - bool speedcheck_init; -} dac_channel; +struct Disney { + IO_ReadHandleObject read_handler{}; + IO_WriteHandleObject write_handler{}; -static struct { // parallel port stuff - Bit8u data; - Bit8u status; - Bit8u control; + uint8_t data = 0; + uint8_t status = DISNEY_INIT_STATUS; + uint8_t control = 0; // the D/A channels - dac_channel da[2]; + dac_channel da[2] = {}; - Bitu last_used; - MixerObject * mo; - MixerChannel * chan; - bool stereo; - // which channel do we use for mono output? - // and the channel used for stereo - dac_channel* leader; - - Bitu state; - Bitu interface_det; - Bitu interface_det_ext; -} disney; - -#define DS_IDLE 0 -#define DS_RUNNING 1 -#define DS_FINISH 2 -#define DS_ANALYZING 3 + Bitu last_used = 0; + mixer_channel_ptr_t chan{nullptr, MIXER_DelChannel}; + bool stereo = false; + + // For mono-output, the analysis step points the leader to the channel + // with the most rendered-samples. We use the left channel as a valid + // place-holder prior to the first analysis. This ensures the + // leader is always valid, such as in cases where the callback in + // enabled before the analysis. + dac_channel *leader = &da[0]; + + DISNEY_STATE state = DISNEY_STATE::IDLE; + uint32_t interface_det = 0; + uint32_t interface_det_ext = 0; +}; -static void DISNEY_CallBack(Bitu len); +static Disney disney; static void DISNEY_disable(Bitu) { - if(disney.mo) { + if (disney.chan) { disney.chan->AddSilence(); disney.chan->Enable(false); } - disney.leader = 0; disney.last_used = 0; - disney.state = DS_IDLE; + disney.state = DISNEY_STATE::IDLE; disney.interface_det = 0; disney.interface_det_ext = 0; disney.stereo = false; } -static void DISNEY_enable(Bitu freq) { - if(freq < 500 || freq > 100000) { +static void DISNEY_enable(uint32_t freq) +{ + if (freq < 500 || freq > 100000) { // try again.. - disney.state = DS_IDLE; - return; - } else { + disney.state = DISNEY_STATE::IDLE; + return; + } #if 0 - if(disney.stereo) LOG(LOG_MISC,LOG_NORMAL)("disney enable %d Hz, stereo",freq); - else LOG(LOG_MISC,LOG_NORMAL)("disney enable %d Hz, mono",freq); + LOG(LOG_MISC,LOG_NORMAL)("DISNEY: enabled at %d Hz in %s", freq, + disney.stereo ? "stereo" : "mono"); #endif - disney.chan->SetFreq(freq); - disney.chan->Enable(true); - disney.state = DS_RUNNING; - } + disney.chan->SetFreq(freq); + disney.chan->Enable(true); + disney.state = DISNEY_STATE::RUNNING; +} + +// Calculate the frequency from DAC samples and speed parameters +// The maximum possible frequency return is 127000 Hz, which +// occurs when all 128 samples are used and the speedcheck_sum +// has accumulated only one single tick. +static uint32_t calc_frequency(const dac_channel &dac) +{ + if (dac.used <= 1) + return 0; + const uint32_t k_samples = 1000 * (dac.used - 1); + const auto frequency = k_samples / dac.speedcheck_sum; + return static_cast(frequency); } static void DISNEY_analyze(Bitu channel){ switch(disney.state) { - case DS_RUNNING: // should not get here + case DISNEY_STATE::RUNNING: // should not get here break; - case DS_IDLE: + case DISNEY_STATE::IDLE: // initialize channel data for(int i = 0; i < 2; i++) { disney.da[i].used = 0; @@ -108,132 +129,124 @@ } disney.da[channel].speedcheck_last = PIC_FullIndex(); disney.da[channel].speedcheck_init = true; - - disney.state = DS_ANALYZING; + + disney.state = DISNEY_STATE::ANALYZING; break; - case DS_FINISH: + case DISNEY_STATE::FINISHED: { - // detect stereo: if we have about the same data amount in both channels - Bits st_diff = disney.da[0].used - disney.da[1].used; - - // find leader channel (the one with higher rate) [this good for the stereo case?] - if(disney.da[0].used > disney.da[1].used) { - //disney.monochannel=0; - disney.leader = &disney.da[0]; - } else { - //disney.monochannel=1; - disney.leader = &disney.da[1]; - } - - if((st_diff < 5) && (st_diff > -5)) disney.stereo = true; - else disney.stereo = false; - - // calculate rate for both channels - Bitu ch_speed[2]; - - for(Bitu i = 0; i < 2; i++) { - if(disney.da[i].used > 1) { // avoid dividing by zero - ch_speed[i] = (Bitu)(1.0/((disney.da[i].speedcheck_sum/1000.0) / - (float)(((float)disney.da[i].used)-1.0))); // -1.75 - } else ch_speed[i] = 0; - } + // The leading channel has the most populated samples + disney.leader = disney.da[0].used > disney.da[1].used + ? &disney.da[0] + : &disney.da[1]; + + // Stereo-mode if both DACs are similarly filled + const auto st_diff = abs(disney.da[0].used - + disney.da[1].used); + disney.stereo = (st_diff < 5); - // choose the larger value - DISNEY_enable(ch_speed[0] > ch_speed[1]? - ch_speed[0]:ch_speed[1]); // TODO + // Run with the greater DAC frequency + const auto max_freq = std::max(calc_frequency(disney.da[0]), + calc_frequency(disney.da[1])); + DISNEY_enable(max_freq); break; } - case DS_ANALYZING: + case DISNEY_STATE::ANALYZING: { - double current = PIC_FullIndex(); + const double current = PIC_FullIndex(); dac_channel* cch = &disney.da[channel]; - if(!cch->speedcheck_init) { + if (!cch->speedcheck_init) { cch->speedcheck_init = true; cch->speedcheck_last = current; break; } cch->speedcheck_sum += current - cch->speedcheck_last; //LOG_MSG("t=%f",current - cch->speedcheck_last); - + // sanity checks (printer...) - if((current - cch-> speedcheck_last) < 0.01 || + if ((current - cch-> speedcheck_last) < 0.01 || (current - cch-> speedcheck_last) > 2) cch->speedcheck_failed = true; - + // if both are failed we are back at start - if(disney.da[0].speedcheck_failed && disney.da[1].speedcheck_failed) { - disney.state=DS_IDLE; + if (disney.da[0].speedcheck_failed && disney.da[1].speedcheck_failed) { + disney.state = DISNEY_STATE::IDLE; break; } cch->speedcheck_last = current; - + // analyze finish condition - if(disney.da[0].used > 30 || disney.da[1].used > 30) - disney.state = DS_FINISH; + if (disney.da[0].used > 30 || disney.da[1].used > 30) + disney.state = DISNEY_STATE::FINISHED; break; } } } -static void disney_write(Bitu port,Bitu val,Bitu iolen) { - //LOG_MSG("write disney time %f addr%x val %x",PIC_FullIndex(),port,val); - disney.last_used=PIC_Ticks; +static void disney_write(Bitu port, Bitu data, MAYBE_UNUSED Bitu iolen) +{ + // Convert the IO data into a single byte-value, as Disney only + // operates on 8-bit values (IO ports also registered as IO_MB) + assert(data < UINT8_MAX); + const auto val = static_cast(data); + + // LOG_MSG("write disney time %f addr%x val %x",PIC_FullIndex(),port,val); + disney.last_used = PIC_Ticks; switch (port-DISNEY_BASE) { case 0: /* Data Port */ { disney.data=val; // if data is written here too often without using the stereo - // mechanism we use the simple DAC machanism. - if(disney.state != DS_RUNNING) { + // mechanism we use the simple DAC machanism. + if (disney.state != DISNEY_STATE::RUNNING) { disney.interface_det++; if(disney.interface_det > 5) DISNEY_analyze(0); } - if(disney.interface_det > 5) { - if(disney.da[0].used < DISNEY_SIZE) { + if (disney.interface_det > 5) { + if (disney.da[0].used < BUFFER_SAMPLES) { disney.da[0].buffer[disney.da[0].used] = disney.data; disney.da[0].used++; - } //else LOG_MSG("disney overflow 0"); + } // else LOG_MSG("disney overflow 0"); } break; } - case 1: /* Status Port */ - LOG(LOG_MISC,LOG_NORMAL)("DISNEY:Status write %x",val); + case 1: /* Status Port */ + LOG(LOG_MISC,LOG_NORMAL)("DISNEY:Status write %" sBitfs(X),val); break; case 2: /* Control Port */ - if((disney.control & 0x2) && !(val & 0x2)) { - if(disney.state != DS_RUNNING) { + if ((disney.control & 0x2) && !(val & 0x2)) { + if (disney.state != DISNEY_STATE::RUNNING) { disney.interface_det = 0; disney.interface_det_ext = 0; DISNEY_analyze(1); } // stereo channel latch - if(disney.da[1].used < DISNEY_SIZE) { + if (disney.da[1].used < BUFFER_SAMPLES) { disney.da[1].buffer[disney.da[1].used] = disney.data; disney.da[1].used++; - } //else LOG_MSG("disney overflow 1"); + } // else LOG_MSG("disney overflow 1"); } - if((disney.control & 0x1) && !(val & 0x1)) { - if(disney.state != DS_RUNNING) { + if ((disney.control & 0x1) && !(val & 0x1)) { + if (disney.state != DISNEY_STATE::RUNNING) { disney.interface_det = 0; disney.interface_det_ext = 0; DISNEY_analyze(0); } // stereo channel latch - if(disney.da[0].used < DISNEY_SIZE) { + if (disney.da[0].used < BUFFER_SAMPLES) { disney.da[0].buffer[disney.da[0].used] = disney.data; disney.da[0].used++; - } //else LOG_MSG("disney overflow 0"); + } // else LOG_MSG("disney overflow 0"); } - if((disney.control & 0x8) && !(val & 0x8)) { + if ((disney.control & 0x8) && !(val & 0x8)) { // emulate a device with 16-byte sound FIFO - if(disney.state != DS_RUNNING) { + if (disney.state != DISNEY_STATE::RUNNING) { disney.interface_det_ext++; disney.interface_det = 0; if(disney.interface_det_ext > 5) { @@ -241,8 +254,8 @@ DISNEY_enable(7000); } } - if(disney.interface_det_ext > 5) { - if(disney.da[0].used < DISNEY_SIZE) { + if (disney.interface_det_ext > 5) { + if (disney.da[0].used < BUFFER_SAMPLES) { disney.da[0].buffer[disney.da[0].used] = disney.data; disney.da[0].used++; } @@ -256,23 +269,24 @@ } } -static Bitu disney_read(Bitu port,Bitu iolen) { - Bitu retval; - switch (port-DISNEY_BASE) { +static Bitu disney_read(Bitu port, MAYBE_UNUSED Bitu iolen) +{ + uint8_t retval; + switch (port - DISNEY_BASE) { case 0: /* Data Port */ // LOG(LOG_MISC,LOG_NORMAL)("DISNEY:Read from data port"); return disney.data; break; - case 1: /* Status Port */ + case 1: /* Status Port */ // LOG(LOG_MISC,"DISNEY:Read from status port %X",disney.status); retval = 0x07;//0x40; // Stereo-on-1 and (or) New-Stereo DACs present - if(disney.interface_det_ext > 5) { + if (disney.interface_det_ext > 5) { if (disney.leader && disney.leader->used >= 16){ retval |= 0x40; // ack retval &= ~0x4; // interrupt } } - if(!(disney.data&0x80)) retval |= 0x80; // pin 9 is wired to pin 11 + if (!(disney.data&0x80)) retval |= 0x80; // pin 9 is wired to pin 11 return retval; break; case 2: /* Control Port */ @@ -283,42 +297,45 @@ return 0xff; } -static void DISNEY_PlayStereo(Bitu len, Bit8u* l, Bit8u* r) { - static Bit8u stereodata[DISNEY_SIZE*2]; - for(Bitu i = 0; i < len; i++) { +static void DISNEY_PlayStereo(uint16_t len, const uint8_t *l, const uint8_t *r) +{ + static uint8_t stereodata[BUFFER_SAMPLES * 2]; + for (uint16_t i = 0; i < len; ++i) { stereodata[i*2] = l[i]; stereodata[i*2+1] = r[i]; } disney.chan->AddSamples_s8(len,stereodata); } -static void DISNEY_CallBack(Bitu len) { - if (!len) return; +static void DISNEY_CallBack(uint16_t len) { + if (!len || !disney.chan) + return; // get the smaller used Bitu real_used; - if(disney.stereo) { + if (disney.stereo) { real_used = disney.da[0].used; if(disney.da[1].used < real_used) real_used = disney.da[1].used; } else real_used = disney.leader->used; if (real_used >= len) { // enough data for now - if(disney.stereo) DISNEY_PlayStereo(len, disney.da[0].buffer, disney.da[1].buffer); + if (disney.stereo) DISNEY_PlayStereo(len, disney.da[0].buffer, disney.da[1].buffer); else disney.chan->AddSamples_m8(len,disney.leader->buffer); // put the rest back to start - for(int i = 0; i < 2; i++) { - // TODO for mono only one - memmove(disney.da[i].buffer,&disney.da[i].buffer[len],DISNEY_SIZE/*real_used*/-len); + for (uint8_t i = 0; i < 2; ++i) { + // TODO for mono only one + memmove(disney.da[i].buffer, &disney.da[i].buffer[len], + BUFFER_SAMPLES /*real_used*/ - len); disney.da[i].used -= len; } // TODO: len > DISNEY } else { // not enough data if(disney.stereo) { - Bit8u gapfiller0 = 128; - Bit8u gapfiller1 = 128; - if(real_used) { + uint8_t gapfiller0 = 128; + uint8_t gapfiller1 = 128; + if (real_used) { gapfiller0 = disney.da[0].buffer[real_used-1]; gapfiller1 = disney.da[1].buffer[real_used-1]; }; @@ -332,8 +349,8 @@ len -= real_used; } else { // mono - Bit8u gapfiller = 128; //Keep the middle - if(real_used) { + uint8_t gapfiller = 128; // Keep the middle + if (real_used) { // fix for some stupid game; it outputs 0 at the end of the stream // causing a click. So if we have at least two bytes availible in the // buffer and the last one is a 0 then ignore that. @@ -341,7 +358,7 @@ real_used--; } // do it this way because AddSilence sounds like a gnawing mouse - if(real_used) + if (real_used) gapfiller = disney.leader->buffer[real_used-1]; //LOG_MSG("gapfiller %x, fill len %d, realused %d",gapfiller,len-real_used,real_used); memset(disney.leader->buffer+real_used, gapfiller, len-real_used); @@ -359,43 +376,47 @@ } } -class DISNEY : public Module_base { -private: - IO_ReadHandleObject ReadHandler = {}; - IO_WriteHandleObject WriteHandler = {}; +static void DISNEY_ShutDown(MAYBE_UNUSED Section *sec) +{ + DEBUG_LOG_MSG("DISNEY: Shutting down"); + + // Remove interrupt events + PIC_RemoveEvents(DISNEY_disable); + + // Stop the game from accessing the IO ports + disney.read_handler.Uninstall(); + disney.write_handler.Uninstall(); -public: - DISNEY(Section *configuration) : Module_base(configuration) - { - Section_prop * section=static_cast(configuration); - if(!section->Get_bool("disney")) return; - - WriteHandler.Install(DISNEY_BASE,disney_write,IO_MB,3); - ReadHandler.Install(DISNEY_BASE,disney_read,IO_MB,3); - - disney.status=0x84; - disney.control=0; - disney.last_used=0; - - disney.mo = new MixerObject(); - disney.chan=disney.mo->Install(&DISNEY_CallBack,10000,"DISNEY"); - DISNEY_disable(0); - } - - ~DISNEY(){ - DISNEY_disable(0); - if (disney.mo) - delete disney.mo; + // Stop and remove the mixer callback + if (disney.chan) { + disney.chan->Enable(false); + disney.chan.reset(); } -}; - -static DISNEY* test; -static void DISNEY_ShutDown(Section* sec){ - delete test; + DISNEY_disable(0); } void DISNEY_Init(Section* sec) { - test = new DISNEY(sec); - sec->AddDestroyFunction(&DISNEY_ShutDown,true); + Section_prop *section = static_cast(sec); + assert(section); + if (!section->Get_bool("disney")) + return; + + // Setup the mixer callback + disney.chan = mixer_channel_ptr_t(MIXER_AddChannel(DISNEY_CallBack, + 10000, "DISNEY"), + MIXER_DelChannel); + assert(disney.chan); + + // Register port handlers for 8-bit IO + disney.write_handler.Install(DISNEY_BASE, disney_write, IO_MB, 3); + disney.read_handler.Install(DISNEY_BASE, disney_read, IO_MB, 3); + + // Initialize the Disney states + disney.status = DISNEY_INIT_STATUS; + disney.control = 0; + disney.last_used = 0; + DISNEY_disable(0); + + sec->AddDestroyFunction(&DISNEY_ShutDown, true); } diff -Nru dosbox-staging-0.76.0/src/hardware/dma.cpp dosbox-staging-0.77.0/src/hardware/dma.cpp --- dosbox-staging-0.76.0/src/hardware/dma.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/dma.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -353,7 +353,7 @@ return done; } -class DMA : public Module_base { +class DMA final : public Module_base { public: DMA(Section *configuration) : Module_base(configuration) { diff -Nru dosbox-staging-0.76.0/src/hardware/envelope.cpp dosbox-staging-0.77.0/src/hardware/envelope.cpp --- dosbox-staging-0.76.0/src/hardware/envelope.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/envelope.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020-2020 The dosbox-staging team - * Copyright (c) 2019-2020 Kevin R Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2019-2021 Kevin R. Croft * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,9 +23,8 @@ #include "support.h" -Envelope::Envelope(const char* name) : -channel_name(name) { -} +Envelope::Envelope(const char *name) : channel_name(name) +{} void Envelope::Reactivate() { @@ -66,7 +65,7 @@ bool Envelope::ClampSample(intptr_t &sample, const intptr_t lip) { - if (abs(sample) > edge) { + if (std::abs(sample) > edge) { sample = clamp(sample, -lip, lip); return true; } @@ -104,6 +103,7 @@ // Should we deactivate the envelope? if (++frames_done > expire_after_frames || edge >= edge_limit) { process = &Envelope::Skip; + (void)channel_name; // MAYBE_UNUSED in release builds DEBUG_LOG_MSG("ENVELOPE: %s done after %u frames, peak sample was %u", channel_name, frames_done, edge); } diff -Nru dosbox-staging-0.76.0/src/hardware/gameblaster.cpp dosbox-staging-0.77.0/src/hardware/gameblaster.cpp --- dosbox-staging-0.76.0/src/hardware/gameblaster.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/gameblaster.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -118,7 +118,7 @@ return retval; } -class CMS : public Module_base { +class CMS final : public Module_base { private: IO_WriteHandleObject WriteHandler = {}; IO_WriteHandleObject DetWriteHandler = {}; diff -Nru dosbox-staging-0.76.0/src/hardware/.gitignore dosbox-staging-0.77.0/src/hardware/.gitignore --- dosbox-staging-0.76.0/src/hardware/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/hardware/gus.cpp dosbox-staging-0.77.0/src/hardware/gus.cpp --- dosbox-staging-0.76.0/src/hardware/gus.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/gus.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2020-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ #include #include #include +#include #include "control.h" #include "dma.h" @@ -44,13 +45,8 @@ // AdLib emulation state constant constexpr uint8_t ADLIB_CMD_DEFAULT = 85u; -// Amplitude level constants -constexpr float AUDIO_SAMPLE_MAX = static_cast(MAX_AUDIO); -constexpr float AUDIO_SAMPLE_MIN = static_cast(MIN_AUDIO); - // Buffer and memory constants constexpr int BUFFER_FRAMES = 48; -constexpr int BUFFER_SAMPLES = BUFFER_FRAMES * 2; // 2 samples/frame (left & right) constexpr uint32_t RAM_SIZE = 1024 * 1024; // 1 MiB // DMA transfer size and rate constants @@ -113,7 +109,6 @@ }; // Collection types involving constant quantities -using accumulator_array_t = std::array; using address_array_t = std::array; using autoexec_array_t = std::array; using pan_scalars_array_t = std::array; @@ -121,9 +116,10 @@ using read_io_array_t = std::array; using vol_scalars_array_t = std::array; using write_io_array_t = std::array; +using mixer_channel_ptr_t = std::unique_ptr; // A Voice is used by the Gus class and instantiates 32 of these. -// Each voice represents a single "mono" stream of audio having its own +// Each voice represents a single "mono" render_buffer of audio having its own // characteristics defined by the running program, such as: // - being 8bit or 16bit // - having a "position" along a left-right axis (panned) @@ -134,12 +130,11 @@ class Voice { public: Voice(uint8_t num, VoiceIrq &irq) noexcept; - void GenerateSamples(accumulator_array_t &stream, + void GenerateSamples(std::vector &render_buffer, const ram_array_t &ram, const vol_scalars_array_t &vol_scalars, const pan_scalars_array_t &pan_scalars, - const int requested_frames, - const bool dac_enabled); + uint16_t requested_frames); uint8_t ReadVolState() const noexcept; uint8_t ReadWaveState() const noexcept; @@ -166,8 +161,8 @@ float GetSample(const ram_array_t &ram) noexcept; int32_t PopWavePos() noexcept; float PopVolScalar(const vol_scalars_array_t &vol_scalars); - float Read8BitSample(const ram_array_t &ram, const int32_t addr) const noexcept; - float Read16BitSample(const ram_array_t &ram, const int32_t addr) const noexcept; + float Read8BitSample(const ram_array_t &ram, int32_t addr) const noexcept; + float Read16BitSample(const ram_array_t &ram, int32_t addr) const noexcept; uint8_t ReadCtrlState(const VoiceCtrl &ctrl) const noexcept; void IncrementCtrlPos(VoiceCtrl &ctrl, bool skip_loop) noexcept; bool UpdateCtrlState(VoiceCtrl &ctrl, uint8_t state) noexcept; @@ -201,14 +196,15 @@ // - Reads or provides audio samples via direct memory access (DMA) // - Provides shared resources to all of the Voices, such as the volume // reducing table, constant-power panning table, and IRQ states. -// - Integrates the audio from each active voice into a 16-bit stereo output -// stream without resampling. +// - Accumulates the audio from each active voice into a floating point +// vector (the render_buffer), without resampling. // - Populates an autoexec line (ULTRASND=...) with its port, irq, and dma // addresses. // class Gus { public: Gus(uint16_t port, uint8_t dma, uint8_t irq, const std::string &dir); + virtual ~Gus(); bool CheckTimer(size_t t); void PrintStats(); @@ -245,10 +241,10 @@ void PopulatePanScalars() noexcept; void PopulateVolScalars() noexcept; void PrepareForPlayback() noexcept; - size_t ReadFromPort(const size_t port, const size_t iolen); + size_t ReadFromPort(size_t port, size_t iolen); void RegisterIoHandlers(); void Reset(uint8_t state); - void SetLevelCallback(const AudioFrame &level); + void SetLevelCallback(const AudioFrame &levels); void StopPlayback(); void UpdateDmaAddress(uint8_t new_address); void UpdateWaveMsw(int32_t &addr) const noexcept; @@ -258,7 +254,8 @@ // Collections vol_scalars_array_t vol_scalars = {{}}; - accumulator_array_t accumulator = {{0}}; + std::vector render_buffer = {}; + std::vector play_buffer = {}; pan_scalars_array_t pan_scalars = {{}}; ram_array_t ram = {{0u}}; read_io_array_t read_handlers = {}; // std::functions @@ -272,12 +269,10 @@ // Struct and pointer members VoiceIrq voice_irq = {}; - MixerObject mixer_channel = {}; - AudioFrame mixer_level = {1, 1}; - SoftLimiter soft_limiter; - Voice *voice = nullptr; + SoftLimiter soft_limiter; + Voice *target_voice = nullptr; DmaChannel *dma_channel = nullptr; - MixerChannel *audio_channel = nullptr; + mixer_channel_ptr_t audio_channel{nullptr, MIXER_DelChannel}; uint8_t &adlib_command_reg = adlib_commandreg; // Port address @@ -424,34 +419,32 @@ sample += (next_sample - sample) * static_cast(fraction) * WAVE_WIDTH_INV; } - assert(sample >= AUDIO_SAMPLE_MIN && sample <= AUDIO_SAMPLE_MAX); + assert(sample >= static_cast(MIN_AUDIO) && + sample <= static_cast(MAX_AUDIO)); return sample; } -void Voice::GenerateSamples(accumulator_array_t &stream, +void Voice::GenerateSamples(std::vector &render_buffer, const ram_array_t &ram, const vol_scalars_array_t &vol_scalars, const pan_scalars_array_t &pan_scalars, - const int requested_frames, - const bool dac_enabled) + const uint16_t requested_frames) { if (vol_ctrl.state & wave_ctrl.state & CTRL::DISABLED) return; // Setup our iterators and pan percents - auto v = stream.begin(); - const auto last_v = v + static_cast(requested_frames) * 2; - assert(last_v <= stream.end()); + auto val = render_buffer.begin(); + const auto last_val = val + requested_frames * 2; // L * R channels + assert(last_val <= render_buffer.end()); const auto pan_scalar = pan_scalars.at(pan_position); - // Add the samples to the stream, angled in L-R space - while (v < last_v) { + // Add the samples to the render_buffer, angled in L-R space + while (val < last_val) { float sample = GetSample(ram); sample *= PopVolScalar(vol_scalars); - if (dac_enabled) { - *v++ += sample * pan_scalar.left; - *v++ += sample * pan_scalar.right; - } + *val++ += sample * pan_scalar.left; + *val++ += sample * pan_scalar.right; } // Keep track of how many ms this voice has generated Is8Bit() ? generated_8bit_ms++ : generated_16bit_ms++; @@ -588,7 +581,9 @@ } Gus::Gus(uint16_t port, uint8_t dma, uint8_t irq, const std::string &ultradir) - : soft_limiter("GUS", mixer_level), + : render_buffer(BUFFER_FRAMES * 2), // 2 samples/frame, L & R channels + play_buffer(BUFFER_FRAMES * 2), // 2 samples/frame, L & R channels + soft_limiter("GUS"), port_base(port - 0x200u), dma2(dma), irq1(irq), @@ -602,8 +597,10 @@ RegisterIoHandlers(); // Register the Audio and DMA channels - audio_channel = mixer_channel.Install( - std::bind(&Gus::AudioCallback, this, std::placeholders::_1), 1, "GUS"); + const auto mixer_callback = std::bind(&Gus::AudioCallback, this, + std::placeholders::_1); + audio_channel = mixer_channel_ptr_t(MIXER_AddChannel(mixer_callback, 1, "GUS"), + MIXER_DelChannel); assert(audio_channel); // Let the mixer command adjust the GUS's internal amplitude level's const auto set_level_callback = std::bind(&Gus::SetLevelCallback, this, _1); @@ -630,32 +627,35 @@ } } -void Gus::SetLevelCallback(const AudioFrame &requested_level) +void Gus::SetLevelCallback(const AudioFrame &levels) { - // Allow amplitudes to scale from silent up to 20-fold - mixer_level.left = clamp(requested_level.left, 0.0f, 20.0f); - mixer_level.right = clamp(requested_level.right, 0.0f, 20.0f); + soft_limiter.UpdateLevels(levels, 1); } void Gus::AudioCallback(const uint16_t requested_frames) { uint16_t generated_frames = 0; while (generated_frames < requested_frames) { - // Zero the accumulator array values - for (auto &val : accumulator) - val = 0; - - const uint16_t frames = std::min(BUFFER_FRAMES, - requested_frames - generated_frames); - auto v = voices.begin(); - const auto v_end = v + active_voices; - while (v < v_end && *v) { - v->get()->GenerateSamples(accumulator, ram, vol_scalars, - pan_scalars, frames, dac_enabled); - ++v; + const uint16_t frames = static_cast( + std::min(BUFFER_FRAMES, requested_frames - generated_frames)); + + // Zero our buffer. The audio sequence for each active voice + // will be accumulated one at a time by the buffer's elements. + assert(frames <= render_buffer.size()); + std::fill(render_buffer.begin(), render_buffer.end(), 0); + + if (dac_enabled) { + auto voice = voices.begin(); + const auto last_voice = voice + active_voices; + while (voice < last_voice && *voice) { + voice->get()->GenerateSamples(render_buffer, + ram, vol_scalars, + pan_scalars, frames); + ++voice; + } } - const auto &out_stream = soft_limiter.Apply(accumulator, frames); - audio_channel->AddSamples_s16(frames, out_stream.data()); + soft_limiter.Process(render_buffer, frames, play_buffer); + audio_channel->AddSamples_s16(frames, play_buffer.data()); CheckVoiceIrq(); generated_frames += frames; } @@ -840,12 +840,12 @@ { constexpr auto VOLUME_LEVEL_DIVISOR = 1.0 + DELTA_DB; double scalar = 1.0; - auto v = vol_scalars.end(); + auto volume = vol_scalars.end(); // The last element starts at 1.0 and we divide downward to // the first element that holds zero, which is directly assigned // after the loop. - while (v != vol_scalars.begin()) { - *(--v) = static_cast(scalar); + while (volume != vol_scalars.begin()) { + *(--volume) = static_cast(scalar); scalar /= VOLUME_LEVEL_DIVISOR; } vol_scalars.front() = 0.0f; @@ -913,8 +913,8 @@ void Gus::PrepareForPlayback() noexcept { // Initialize the voice states - for (auto &v : voices) - v->ResetCtrls(); + for (auto &voice : voices) + voice->ResetCtrls(); // Initialize the OPL emulator state adlib_command_reg = ADLIB_CMD_DEFAULT; @@ -936,13 +936,13 @@ uint32_t combined_16bit_ms = 0u; uint32_t used_8bit_voices = 0u; uint32_t used_16bit_voices = 0u; - for (const auto &v : voices) { - if (v->generated_8bit_ms) { - combined_8bit_ms += v->generated_8bit_ms; + for (const auto &voice : voices) { + if (voice->generated_8bit_ms) { + combined_8bit_ms += voice->generated_8bit_ms; used_8bit_voices++; } - if (v->generated_16bit_ms) { - combined_16bit_ms += v->generated_16bit_ms; + if (voice->generated_16bit_ms) { + combined_16bit_ms += voice->generated_16bit_ms; used_16bit_voices++; } } @@ -1062,7 +1062,7 @@ // to the voice-specific register switch below. } - if (!voice) + if (!target_voice) return (selected_register == 0x80 || selected_register == 0x8d) ? 0x0300 : 0u; @@ -1070,23 +1070,24 @@ // Registers that read from from the current voice switch (selected_register) { case 0x80: // Voice wave control read register - return static_cast(voice->ReadWaveState() << 8); + return static_cast(target_voice->ReadWaveState() << 8); case 0x82: // Voice MSB start address register - return static_cast(voice->wave_ctrl.start >> 16); + return static_cast(target_voice->wave_ctrl.start >> 16); case 0x83: // Voice LSW start address register - return static_cast(voice->wave_ctrl.start); + return static_cast(target_voice->wave_ctrl.start); case 0x89: // Voice volume register { - const int i = ceil_sdivide(voice->vol_ctrl.pos, VOLUME_INC_SCALAR); + const int i = ceil_sdivide(target_voice->vol_ctrl.pos, + VOLUME_INC_SCALAR); assert(i >= 0 && i < static_cast(vol_scalars.size())); return static_cast(i << 4); } case 0x8a: // Voice MSB current address register - return static_cast(voice->wave_ctrl.pos >> 16); + return static_cast(target_voice->wave_ctrl.pos >> 16); case 0x8b: // Voice LSW current address register - return static_cast(voice->wave_ctrl.pos); + return static_cast(target_voice->wave_ctrl.pos); case 0x8d: // Voice volume control register - return static_cast(voice->ReadVolState() << 8); + return static_cast(target_voice->ReadVolState() << 8); default: #if LOG_GUS LOG_MSG("GUS: Register %#x not implemented for reading", @@ -1146,7 +1147,7 @@ timer_ctrl = 0u; sample_ctrl = 0u; - voice = nullptr; + target_voice = nullptr; voice_index = 0u; active_voices = 0u; @@ -1246,7 +1247,7 @@ break; case 0x302: voice_index = val & 31; - voice = voices.at(voice_index).get(); + target_voice = voices.at(voice_index).get(); break; case 0x303: selected_register = static_cast(val); @@ -1296,7 +1297,7 @@ { // Registers that write to the general DSP switch (selected_register) { - case 0xe: // Set active voice register + case 0xe: // Set number of active voices selected_register = register_data >> 8; // Jazz Jackrabbit needs this { const uint8_t num_voices = 1 + ((register_data >> 8) & 31); @@ -1360,67 +1361,67 @@ default: break; // If the above weren't triggered, then fall-through - // to the voice-specific switch below. + // to the target_voice-specific switch below. } - // All the registers below here involve voices - if (!voice) + // All the registers below operated on the target voice + if (!target_voice) return; uint8_t data = 0; // Registers that write to the current voice switch (selected_register) { case 0x0: // Voice wave control register - if (voice->UpdateWaveState(register_data >> 8)) + if (target_voice->UpdateWaveState(register_data >> 8)) CheckVoiceIrq(); break; case 0x1: // Voice rate control register - voice->WriteWaveRate(register_data); + target_voice->WriteWaveRate(register_data); break; case 0x2: // Voice MSW start address register - UpdateWaveMsw(voice->wave_ctrl.start); + UpdateWaveMsw(target_voice->wave_ctrl.start); break; case 0x3: // Voice LSW start address register - UpdateWaveLsw(voice->wave_ctrl.start); + UpdateWaveLsw(target_voice->wave_ctrl.start); break; case 0x4: // Voice MSW end address register - UpdateWaveMsw(voice->wave_ctrl.end); + UpdateWaveMsw(target_voice->wave_ctrl.end); break; case 0x5: // Voice LSW end address register - UpdateWaveLsw(voice->wave_ctrl.end); + UpdateWaveLsw(target_voice->wave_ctrl.end); break; case 0x6: // Voice volume rate register - voice->WriteVolRate(register_data >> 8); + target_voice->WriteVolRate(register_data >> 8); break; case 0x7: // Voice volume start register EEEEMMMM data = register_data >> 8; // Don't need to bounds-check the value because it's implied: // 'data' is a uint8, so is 255 at most. 255 << 4 = 4080, which // falls within-bounds of the 4096-long vol_scalars array. - voice->vol_ctrl.start = (data << 4) * VOLUME_INC_SCALAR; + target_voice->vol_ctrl.start = (data << 4) * VOLUME_INC_SCALAR; break; case 0x8: // Voice volume end register EEEEMMMM data = register_data >> 8; // Same as above regarding bound-checking. - voice->vol_ctrl.end = (data << 4) * VOLUME_INC_SCALAR; + target_voice->vol_ctrl.end = (data << 4) * VOLUME_INC_SCALAR; break; case 0x9: // Voice current volume register // Don't need to bounds-check the value because it's implied: // reg data is a uint16, and 65535 >> 4 takes it down to 4095, // which is the last element in the 4096-long vol_scalars array. - voice->vol_ctrl.pos = (register_data >> 4) * VOLUME_INC_SCALAR; + target_voice->vol_ctrl.pos = (register_data >> 4) * VOLUME_INC_SCALAR; break; case 0xa: // Voice MSW current address register - UpdateWaveMsw(voice->wave_ctrl.pos); + UpdateWaveMsw(target_voice->wave_ctrl.pos); break; case 0xb: // Voice LSW current address register - UpdateWaveLsw(voice->wave_ctrl.pos); + UpdateWaveLsw(target_voice->wave_ctrl.pos); break; case 0xc: // Voice pan pot register - voice->WritePanPot(register_data >> 8); + target_voice->WritePanPot(register_data >> 8); break; case 0xd: // Voice volume control register - if (voice->UpdateVolState(register_data >> 8)) + if (target_voice->UpdateVolState(register_data >> 8)) CheckVoiceIrq(); break; default: @@ -1433,11 +1434,31 @@ return; } +Gus::~Gus() +{ + DEBUG_LOG_MSG("GUS: Shutting down"); + StopPlayback(); + + // remove the mixer channel + audio_channel.reset(); + + // remove the IO handlers + for (auto &rh : read_handlers) + rh.Uninstall(); + for (auto &wh : write_handlers) + wh.Uninstall(); +} + static void gus_destroy(MAYBE_UNUSED Section *sec) { + // GUS destroy is run when the user wants to deactivate the GUS: + // C:\> config -set gus=false + // TODO: therefore, this function should also remove the + // ULTRASND and ULTRADIR environment variables. + if (gus) { gus->PrintStats(); - gus.reset(nullptr); + gus.reset(); } } @@ -1498,7 +1519,7 @@ void GUS_AddConfigSection(Config *conf) { assert(conf); - Section_prop *sec = conf->AddSection_prop("gus", &gus_init); + Section_prop *sec = conf->AddSection_prop("gus", &gus_init, true); assert(sec); init_gus_dosbox_settings(*sec); } diff -Nru dosbox-staging-0.76.0/src/hardware/hardware.cpp dosbox-staging-0.77.0/src/hardware/hardware.cpp --- dosbox-staging-0.76.0/src/hardware/hardware.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/hardware.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,21 +16,23 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "hardware.h" + #include #include #include #include +#include "cross.h" #include "dosbox.h" -#include "hardware.h" -#include "setup.h" -#include "support.h" -#include "mem.h" +#include "fs_utils.h" #include "mapper.h" +#include "mem.h" #include "pic.h" #include "render.h" -#include "cross.h" -#include "fs_utils.h" +#include "setup.h" +#include "string_utils.h" +#include "support.h" #if (C_SSHOT) #include @@ -306,6 +308,30 @@ } #endif +void CAPTURE_VideoStart() { +#if (C_SSHOT) + if (CaptureState & CAPTURE_VIDEO) { + LOG_MSG("Already capturing video."); + } else { + CAPTURE_VideoEvent(true); + } +#else + LOG_MSG("Avi capturing has not been compiled in"); +#endif +} + +void CAPTURE_VideoStop() { +#if (C_SSHOT) + if (CaptureState & CAPTURE_VIDEO) { + CAPTURE_VideoEvent(true); + } else { + LOG_MSG("Not capturing video."); + } +#else + LOG_MSG("Avi capturing has not been compiled in"); +#endif +} + void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags, float fps, Bit8u * data, Bit8u * pal) { #if (C_SSHOT) Bitu i; @@ -752,22 +778,22 @@ } } -class HARDWARE:public Module_base{ +class HARDWARE final : public Module_base{ public: HARDWARE(Section* configuration):Module_base(configuration){ Section_prop * section = static_cast(configuration); Prop_path* proppath= section->Get_path("captures"); capturedir = proppath->realpath; CaptureState = 0; - MAPPER_AddHandler(CAPTURE_WaveEvent, SDL_SCANCODE_F6, MMOD1, - "recwave", "Rec. Audio"); + MAPPER_AddHandler(CAPTURE_WaveEvent, SDL_SCANCODE_F6, + PRIMARY_MOD, "recwave", "Rec. Audio"); MAPPER_AddHandler(CAPTURE_MidiEvent, SDL_SCANCODE_UNKNOWN, 0, "caprawmidi", "Rec. MIDI"); #if (C_SSHOT) - MAPPER_AddHandler(CAPTURE_ScreenShotEvent, SDL_SCANCODE_F5, MMOD1, - "scrshot", "Screenshot"); - MAPPER_AddHandler(CAPTURE_VideoEvent, SDL_SCANCODE_F7, MMOD1, - "video", "Rec. Video"); + MAPPER_AddHandler(CAPTURE_ScreenShotEvent, SDL_SCANCODE_F5, + PRIMARY_MOD, "scrshot", "Screenshot"); + MAPPER_AddHandler(CAPTURE_VideoEvent, SDL_SCANCODE_F7, + PRIMARY_MOD, "video", "Rec. Video"); #endif } ~HARDWARE(){ @@ -779,13 +805,15 @@ } }; -static HARDWARE* test; +static HARDWARE *hardware_module; -void HARDWARE_Destroy(Section * sec) { - delete test; +void HARDWARE_Destroy(Section *sec) +{ + delete hardware_module; } -void HARDWARE_Init(Section * sec) { - test = new HARDWARE(sec); - sec->AddDestroyFunction(&HARDWARE_Destroy,true); +void HARDWARE_Init(Section *sec) +{ + hardware_module = new HARDWARE(sec); + sec->AddDestroyFunction(&HARDWARE_Destroy, true); } diff -Nru dosbox-staging-0.76.0/src/hardware/innovation.cpp dosbox-staging-0.77.0/src/hardware/innovation.cpp --- dosbox-staging-0.76.0/src/hardware/innovation.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/innovation.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,318 @@ +/* + * Copyright (C) 2021-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "innovation.h" + +#include "control.h" +#include "pic.h" + +// Innovation Settings +// ------------------- +constexpr uint16_t SAMPLES_PER_BUFFER = 2048; + +void Innovation::Open(const std::string &model_choice, + const std::string &clock_choice, + const int filter_strength_6581, + const int filter_strength_8580, + const int port_choice) +{ + Close(); + + // Sentinel + if (model_choice == "none") + return; + + std::string model_name; + int filter_strength = 0; + auto sid_service = std::make_unique(); + + // Setup the model and filter + if (model_choice == "8580") { + model_name = "8580"; + sid_service->setChipModel(reSIDfp::MOS8580); + filter_strength = filter_strength_8580; + if (filter_strength > 0) { + sid_service->enableFilter(true); + sid_service->setFilter8580Curve(filter_strength / 100.0); + } + } else { + model_name = "6581"; + sid_service->setChipModel(reSIDfp::MOS6581); + filter_strength = filter_strength_6581; + if (filter_strength > 0) { + sid_service->enableFilter(true); + sid_service->setFilter6581Curve(filter_strength / 100.0); + } + } + + // Determine chip clock frequency + if (clock_choice == "default") + chip_clock = 894886.25; + else if (clock_choice == "c64ntsc") + chip_clock = 1022727.14; + else if (clock_choice == "c64pal") + chip_clock = 985250; + else if (clock_choice == "hardsid") + chip_clock = 1000000; + assert(chip_clock); + + // Setup the mixer and get it's sampling rate + using namespace std::placeholders; + const auto mixer_callback = std::bind(&Innovation::MixerCallBack, this, _1); + channel_t mixer_channel(MIXER_AddChannel(mixer_callback, 0, "INNOVATION"), + MIXER_DelChannel); + sid_sample_rate = mixer_channel->GetSampleRate(); + + // Determine the passband frequency, which is capped at 90% of Nyquist. + const double passband = 0.9 * sid_sample_rate / 2; + + // Assign the sampling parameters + sid_service->setSamplingParameters(chip_clock, reSIDfp::RESAMPLE, + sid_sample_rate, passband); + + // Setup and assign the port address + const auto read_from = std::bind(&Innovation::ReadFromPort, this, _1, _2); + const auto write_to = std::bind(&Innovation::WriteToPort, this, _1, _2, _3); + base_port = static_cast(port_choice); + read_handler.Install(base_port, read_from, IO_MB, 0x20); + write_handler.Install(base_port, write_to, IO_MB, 0x20); + + // Move the locals into members + service = std::move(sid_service); + channel = std::move(mixer_channel); + + // Ready state-values for rendering + last_used = 0; + play_buffer_pos = 0; + keep_rendering = true; + + // Start rendering + renderer = std::thread(std::bind(&Innovation::Render, this)); + set_thread_name(renderer, "dosbox:innovatn"); // < 16-character cap + play_buffer = playable.Dequeue(); // populate the first play buffer + + if (filter_strength == 0) + LOG_MSG("INNOVATION: Running on port %xh with a SID %s at %0.3f MHz", + base_port, model_name.c_str(), chip_clock / 1000000.0); + else + LOG_MSG("INNOVATION: Running on port %xh with a SID %s at %0.3f MHz filtering at %d%%", + base_port, model_name.c_str(), chip_clock / 1000000.0, + filter_strength); + + is_open = true; +} + +void Innovation::Close() +{ + if (!is_open) + return; + + DEBUG_LOG_MSG("INNOVATION: Shutting down the SSI-2001 on port %xh", base_port); + + // Stop playback + if (channel) + channel->Enable(false); + + // Stop rendering and drain the queues + keep_rendering = false; + if (!backstock.Size()) + backstock.Enqueue(std::move(play_buffer)); + while (playable.Size()) + play_buffer = playable.Dequeue(); + + // Wait for the rendering thread to finish + if (renderer.joinable()) + renderer.join(); + + // Remove the IO handlers before removing the SID device + read_handler.Uninstall(); + write_handler.Uninstall(); + + // Reset the members + channel.reset(); + service.reset(); + is_open = false; +} + +size_t Innovation::ReadFromPort(size_t port, MAYBE_UNUSED size_t iolen) +{ + const auto sid_port = static_cast(port - base_port); + const std::lock_guard lock(service_mutex); + return service->read(sid_port); +} + +void Innovation::WriteToPort(size_t port, size_t val, MAYBE_UNUSED size_t iolen) +{ + assert(val <= UINT8_MAX); + const auto data = static_cast(val); // 8-bit IO + const auto sid_port = static_cast(port - base_port); + { // service-lock + const std::lock_guard lock(service_mutex); + service->write(sid_port, data); + } + // Turn on the channel after the data's written + if (!last_used) { + channel->Enable(true); + } + last_used = PIC_Ticks; +} + +void Innovation::Render() +{ + const auto cycles_per_sample = static_cast(chip_clock / + sid_sample_rate); + + // Allocate one buffer and reuse it for the duration. + std::vector buffer(SAMPLES_PER_BUFFER); + + // Populate the backstock queue using copies of the current buffer. + while (backstock.Size() < backstock.MaxCapacity() - 1) + backstock.Enqueue(buffer); // copied + backstock.Enqueue(std::move(buffer)); // moved; buffer is hollow + assert(backstock.Size() == backstock.MaxCapacity()); + + while (keep_rendering.load()) { + // Variables populated during rendering. + uint16_t n = 0; + buffer = backstock.Dequeue(); + std::unique_lock lock(service_mutex); + + while (n < SAMPLES_PER_BUFFER) { + const auto buffer_pos = buffer.data() + n; + const auto n_remaining = SAMPLES_PER_BUFFER - n; + const auto cycles = static_cast(cycles_per_sample * n_remaining); + n += service->clock(cycles, buffer_pos); + } + assert(n == SAMPLES_PER_BUFFER); + lock.unlock(); + + // The buffer is now populated so move it into the playable queue. + playable.Enqueue(std::move(buffer)); + } +} + +void Innovation::MixerCallBack(uint16_t requested_samples) +{ + while (requested_samples) { + const auto n = std::min(GetRemainingSamples(), requested_samples); + const auto buffer_pos = play_buffer.data() + play_buffer_pos; + channel->AddSamples_m16(n, buffer_pos); + requested_samples -= n; + play_buffer_pos += n; + } + // Stop the channel after 5 seconds of idle-time. + if (last_used + 5000 < PIC_Ticks) { + last_used = 0; + channel->Enable(false); + } +} + +// Return the number of samples left to play in the current buffer. +uint16_t Innovation::GetRemainingSamples() +{ + // If the current buffer has some samples left, then return those ... + if (play_buffer_pos < SAMPLES_PER_BUFFER) + return SAMPLES_PER_BUFFER - play_buffer_pos; + + // Otherwise put the spent buffer in backstock and get the next buffer. + backstock.Enqueue(std::move(play_buffer)); + play_buffer = playable.Dequeue(); + play_buffer_pos = 0; // reset the sample counter to the beginning. + + return SAMPLES_PER_BUFFER; +} + +Innovation innovation; +static void innovation_destroy(MAYBE_UNUSED Section *sec) +{ + innovation.Close(); +} + +static void innovation_init(Section *sec) +{ + assert(sec); + Section_prop *conf = static_cast(sec); + + const auto model_choice = conf->Get_string("sidmodel"); + const auto clock_choice = conf->Get_string("sidclock"); + const auto port_choice = conf->Get_hex("sidport"); + const auto filter_strength_6581 = conf->Get_int("6581filter"); + const auto filter_strength_8580 = conf->Get_int("8580filter"); + + innovation.Open(model_choice, clock_choice, filter_strength_6581, + filter_strength_8580, port_choice); + + sec->AddDestroyFunction(&innovation_destroy, true); +} + +static void init_innovation_dosbox_settings(Section_prop &sec_prop) +{ + constexpr auto when_idle = Property::Changeable::WhenIdle; + + // Chip type + auto *str_prop = sec_prop.Add_string("sidmodel", when_idle, "none"); + const char *sid_models[] = {"auto", "6581", "8580", "none", 0}; + str_prop->Set_values(sid_models); + str_prop->Set_help( + "Model of chip to emulate in the Innovation SSI-2001 card:\n" + " - auto: Selects the 6581 chip.\n" + " - 6581: The original chip, known for its bassy and rich character.\n" + " - 8580: A later revision that more closely matched the SID specification.\n" + " It fixed the 6581's DC bias and is less prone to distortion.\n" + " The 8580 is an option on reproduction cards, like the DuoSID.\n" + " - none: Disables the card."); + + // Chip clock frequency + str_prop = sec_prop.Add_string("sidclock", when_idle, "default"); + const char *sid_clocks[] = {"default", "c64ntsc", "c64pal", "hardsid", 0}; + str_prop->Set_values(sid_clocks); + str_prop->Set_help( + "The SID chip's clock frequency, which is jumperable on reproduction cards.\n" + " - default: uses 0.895 MHz, per the original SSI-2001 card.\n" + " - c64ntsc: uses 1.023 MHz, per NTSC Commodore PCs and the DuoSID.\n" + " - c64pal: uses 0.985 MHz, per PAL Commodore PCs and the DuoSID.\n" + " - hardsid: uses 1.000 MHz, available on the DuoSID."); + + // IO Address + auto *hex_prop = sec_prop.Add_hex("sidport", when_idle, 0x280); + const char *sid_ports[] = {"240", "260", "280", "2a0", "2c0", 0}; + hex_prop->Set_values(sid_ports); + hex_prop->Set_help("The IO port address of the Innovation SSI-2001."); + + // Filter strengths + auto *int_prop = sec_prop.Add_int("6581filter", when_idle, 50); + int_prop->SetMinMax(0, 100); + int_prop->Set_help( + "The SID's analog filtering meant that each chip was physically unique.\n" + "Adjusts the 6581's filtering strength as a percent from 0 to 100."); + + int_prop = sec_prop.Add_int("8580filter", when_idle, 50); + int_prop->SetMinMax(0, 100); + int_prop->Set_help( + "Adjusts the 8580's filtering strength as a percent from 0 to 100."); +} + +void INNOVATION_AddConfigSection(Config *conf) +{ + assert(conf); + Section_prop *sec = conf->AddSection_prop("innovation", + &innovation_init, true); + assert(sec); + init_innovation_dosbox_settings(*sec); +} diff -Nru dosbox-staging-0.76.0/src/hardware/innovation.h dosbox-staging-0.77.0/src/hardware/innovation.h --- dosbox-staging-0.76.0/src/hardware/innovation.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/innovation.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DOSBOX_INNOVATION_H +#define DOSBOX_INNOVATION_H + +#include "dosbox.h" + +#include +#include +#include +#include +#include +#include + +#include "mixer.h" +#include "inout.h" +#include "rwqueue.h" +#include "../libs/residfp/SID.h" + +class Innovation { +public: + Innovation() : keep_rendering(false) {} + void Open(const std::string &model_choice, + const std::string &clock_choice, + int filter_strength_6581, + int filter_strength_8580, + int port_choice); + + void Close(); + ~Innovation() { Close(); } + +private: + using channel_t = std::unique_ptr; + + void Render(); + uint16_t GetRemainingSamples(); + void MixerCallBack(uint16_t requested_samples); + size_t ReadFromPort(size_t port, MAYBE_UNUSED size_t iolen); + void WriteToPort(size_t port, size_t val, MAYBE_UNUSED size_t iolen); + + // Managed objects + channel_t channel{nullptr, MIXER_DelChannel}; + + IO_ReadHandleObject read_handler = {}; + IO_WriteHandleObject write_handler = {}; + + std::vector play_buffer = {}; + static constexpr auto num_buffers = 4; + RWQueue> playable{num_buffers}; + RWQueue> backstock{num_buffers}; + std::thread renderer = {}; + std::mutex service_mutex = {}; + std::unique_ptr service = {}; + std::atomic_bool keep_rendering = {}; + + // Scalar members + uint16_t base_port = 0; + double chip_clock = 0; + double sid_sample_rate = 0; + size_t last_used = 0; + uint16_t play_buffer_pos = 0; + bool is_open = false; +}; + +#endif diff -Nru dosbox-staging-0.76.0/src/hardware/iohandler.cpp dosbox-staging-0.77.0/src/hardware/iohandler.cpp --- dosbox-staging-0.76.0/src/hardware/iohandler.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/iohandler.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,10 +19,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include -#include "dosbox.h" #include "inout.h" + +#include +#include +#include + #include "setup.h" #include "cpu.h" #include "../src/cpu/lazyflags.h" @@ -579,7 +584,7 @@ return retval; } -class IO :public Module_base { +class IO final : public Module_base { public: IO(Section* configuration):Module_base(configuration){ iof_queue.used = 0; diff -Nru dosbox-staging-0.76.0/src/hardware/ipx.cpp dosbox-staging-0.77.0/src/hardware/ipx.cpp --- dosbox-staging-0.76.0/src/hardware/ipx.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/ipx.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ #include #include #include "cross.h" -#include "support.h" +#include "string_utils.h" #include "cpu.h" #include "regs.h" #include "inout.h" @@ -361,7 +361,7 @@ } tmpECB = tmp2ECB; } - LOG_MSG("!!!! Rouge AES !!!!" ); + LOG_MSG("!!!! Rogue AES !!!!" ); } static void sendPacket(ECBClass* sendecb); @@ -797,11 +797,11 @@ } else { // Wait for return packet from server. // This will contain our IPX address and port num - Bit32u ticks, elapsed; - ticks = GetTicks(); + Bit32u elapsed; + const auto ticks = GetTicks(); while(true) { - elapsed = GetTicks() - ticks; + elapsed = GetTicksSince(ticks); if(elapsed > 5000) { LOG_MSG("Timeout connecting to server at %s", strAddr); SDLNet_UDP_Close(ipxClientSocket); @@ -850,7 +850,7 @@ return; } -class IPXNET : public Program { +class IPXNET final : public Program { public: void HelpCommand(const char *helpStr) { // Help on connect command @@ -1034,7 +1034,6 @@ } if(strcasecmp("ping", temp_line.c_str()) == 0) { - Bit32u ticks; IPXHeader pingHead; if(!incomingPacket.connected) { @@ -1044,11 +1043,15 @@ TIMER_DelTickHandler(&IPX_ClientLoop); WriteOut("Sending broadcast ping:\n\n"); pingSend(); - ticks = GetTicks(); - while((GetTicks() - ticks) < 1500) { + const auto ticks = GetTicks(); + while ((GetTicksSince(ticks)) < 1500) { CALLBACK_Idle(); if(pingCheck(&pingHead)) { - WriteOut("Response from %d.%d.%d.%d, port %d time=%dms\n", CONVIP(pingHead.src.addr.byIP.host), SDLNet_Read16(&pingHead.src.addr.byIP.port), GetTicks() - ticks); + WriteOut( + "Response from %d.%d.%d.%d, port %d time=%dms\n", + CONVIP(pingHead.src.addr.byIP.host), + SDLNet_Read16(&pingHead.src.addr.byIP.port), + GetTicksSince(ticks)); } } TIMER_AddTickHandler(&IPX_ClientLoop); @@ -1086,7 +1089,7 @@ void VFILE_Remove(const char *name); -class IPX : public Module_base { +class IPX final : public Module_base { private: CALLBACK_HandlerObject callback_ipx = {}; CALLBACK_HandlerObject callback_esr = {}; diff -Nru dosbox-staging-0.76.0/src/hardware/ipxserver.cpp dosbox-staging-0.77.0/src/hardware/ipxserver.cpp --- dosbox-staging-0.76.0/src/hardware/ipxserver.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/ipxserver.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/joystick.cpp dosbox-staging-0.77.0/src/hardware/joystick.cpp --- dosbox-staging-0.76.0/src/hardware/joystick.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/joystick.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,17 +16,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "joystick.h" #include #include -#include "dosbox.h" + +#include "control.h" #include "inout.h" -#include "setup.h" -#include "joystick.h" #include "pic.h" #include "support.h" - //TODO: higher axis can't be mapped. Find out why again //Set to true, to enable automated switching back to square on circle mode if the inputs are outside the cirle. @@ -134,7 +133,7 @@ }; -JoystickType joytype; +JoystickType joytype = JOY_UNSET; static JoyStick stick[2]; static Bitu last_write = 0; @@ -284,7 +283,35 @@ return stick[1].ypos; } -class JOYSTICK : public Module_base { +void JOYSTICK_ParseConfiguredType() +{ + const auto conf = control->GetSection("joystick"); + const auto section = static_cast(conf); + const char *type = section->Get_string("joysticktype"); + + if (!strcasecmp(type, "none")) + joytype = JOY_NONE; + else if (!strcasecmp(type, "false")) + joytype = JOY_NONE; + else if (!strcasecmp(type, "auto")) + joytype = JOY_AUTO; + else if (!strcasecmp(type, "2axis")) + joytype = JOY_2AXIS; + else if (!strcasecmp(type, "4axis")) + joytype = JOY_4AXIS; + else if (!strcasecmp(type, "4axis_2")) + joytype = JOY_4AXIS_2; + else if (!strcasecmp(type, "fcs")) + joytype = JOY_FCS; + else if (!strcasecmp(type, "ch")) + joytype = JOY_CH; + else + joytype = JOY_AUTO; + + assert(joytype != JOY_UNSET); +} + +class JOYSTICK final : public Module_base { private: IO_ReadHandleObject ReadHandler = {}; IO_WriteHandleObject WriteHandler = {}; @@ -292,18 +319,9 @@ public: JOYSTICK(Section *configuration) : Module_base(configuration) { - Section_prop * section = static_cast(configuration); - const char * type = section->Get_string("joysticktype"); - if (!strcasecmp(type,"none")) joytype = JOY_NONE; - else if (!strcasecmp(type,"false")) joytype = JOY_NONE; - else if (!strcasecmp(type,"auto")) joytype = JOY_AUTO; - else if (!strcasecmp(type,"2axis")) joytype = JOY_2AXIS; - else if (!strcasecmp(type,"4axis")) joytype = JOY_4AXIS; - else if (!strcasecmp(type,"4axis_2")) joytype = JOY_4AXIS_2; - else if (!strcasecmp(type,"fcs")) joytype = JOY_FCS; - else if (!strcasecmp(type,"ch")) joytype = JOY_CH; - else joytype = JOY_AUTO; + JOYSTICK_ParseConfiguredType(); + const auto section = static_cast(configuration); bool timed = section->Get_bool("timed"); if (timed) { ReadHandler.Install(0x201,read_p201_timed,IO_MB); diff -Nru dosbox-staging-0.76.0/src/hardware/keyboard.cpp dosbox-staging-0.77.0/src/hardware/keyboard.cpp --- dosbox-staging-0.76.0/src/hardware/keyboard.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/keyboard.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,14 +59,14 @@ else PIC_ActivateIRQ(1); } -static void KEYBOARD_TransferBuffer(Bitu val) { - keyb.scheduled=false; +static void KEYBOARD_TransferBuffer(Bitu /*val*/) { + keyb.scheduled = false; if (!keyb.used) { LOG(LOG_KEYBOARD,LOG_NORMAL)("Transfer started with empty buffer"); return; } KEYBOARD_SetPort60(keyb.buffer[keyb.pos]); - if (++keyb.pos>=KEYBUFSIZE) keyb.pos-=KEYBUFSIZE; + if (++keyb.pos >= KEYBUFSIZE) keyb.pos -= KEYBUFSIZE; keyb.used--; } @@ -95,16 +95,16 @@ } -static Bitu read_p60(Bitu port,Bitu iolen) { - keyb.p60changed=false; +static Bitu read_p60(Bitu /*port*/,Bitu /*iolen*/) { + keyb.p60changed = false; if (!keyb.scheduled && keyb.used) { - keyb.scheduled=true; + keyb.scheduled = true; PIC_AddEvent(KEYBOARD_TransferBuffer,KEYDELAY); } return keyb.p60data; -} +} -static void write_p60(Bitu port,Bitu val,Bitu iolen) { +static void write_p60(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { switch (keyb.command) { case CMD_NONE: /* None */ /* No active command this would normally get sent to the keyboard then */ @@ -131,7 +131,7 @@ keyb.scanning=true; break; case 0xf5: /* Reset keyboard and disable scanning */ - LOG(LOG_KEYBOARD,LOG_NORMAL)("Reset, disable scanning"); + LOG(LOG_KEYBOARD,LOG_NORMAL)("Reset, disable scanning"); keyb.scanning=false; KEYBOARD_AddBuffer(0xfa); /* Acknowledge */ break; @@ -142,7 +142,7 @@ break; default: /* Just always acknowledge strange commands */ - LOG(LOG_KEYBOARD,LOG_ERROR)("60:Unhandled command %X",val); + LOG(LOG_KEYBOARD,LOG_ERROR)("60:Unhandled command %" sBitfs(X),val); KEYBOARD_AddBuffer(0xfa); /* Acknowledge */ } return; @@ -153,7 +153,7 @@ case CMD_SETTYPERATE: { static const int delay[] = { 250, 500, 750, 1000 }; - static const int repeat[] = + static const int repeat[] = { 33,37,42,46,50,54,58,63,67,75,83,92,100, 109,118,125,133,149,167,182,200,217,233, 250,270,303,333,370,400,435,476,500 }; @@ -172,29 +172,29 @@ extern bool TIMER_GetOutput2(void); static Bit8u port_61_data = 0; -static Bitu read_p61(Bitu port,Bitu iolen) { - if (TIMER_GetOutput2()) port_61_data|=0x20; - else port_61_data&=~0x20; - port_61_data^=0x10; +static Bitu read_p61(Bitu /*port*/,Bitu /*iolen*/) { + if (TIMER_GetOutput2()) port_61_data |= 0x20; + else port_61_data &=~0x20; + port_61_data ^= 0x10; return port_61_data; } extern void TIMER_SetGate2(bool); -static void write_p61(Bitu port,Bitu val,Bitu iolen) { +static void write_p61(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { if ((port_61_data ^ val) & 3) { - if((port_61_data ^ val) & 1) TIMER_SetGate2(val&0x1); + if ((port_61_data ^ val) & 1) TIMER_SetGate2(val&0x1); PCSPEAKER_SetType(val & 3); } port_61_data = val; } -static Bitu read_p62(Bitu port,Bitu iolen) { - Bit8u ret=~0x20; - if (TIMER_GetOutput2()) ret|=0x20; +static Bitu read_p62(Bitu /*port*/,Bitu /*iolen*/) { + Bit8u ret = ~0x20; + if (TIMER_GetOutput2()) ret |= 0x20; return ret; } -static void write_p64(Bitu port,Bitu val,Bitu iolen) { +static void write_p64(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { switch (val) { case 0xae: /* Activate keyboard */ keyb.active=true; @@ -215,13 +215,13 @@ keyb.command=CMD_SETOUTPORT; break; default: - LOG(LOG_KEYBOARD,LOG_ERROR)("Port 64 write with val %d",val); + LOG(LOG_KEYBOARD,LOG_ERROR)("Port 64 write with val %" sBitfs(X) ,val); break; } } -static Bitu read_p64(Bitu port,Bitu iolen) { - Bit8u status= 0x1c | (keyb.p60changed? 0x1 : 0x0); +static Bitu read_p64(Bitu /*port*/,Bitu /*iolen*/) { + Bit8u status = 0x1c | (keyb.p60changed ? 0x1 : 0x0); return status; } @@ -231,13 +231,13 @@ case KBD_esc:ret=1;break; case KBD_1:ret=2;break; case KBD_2:ret=3;break; - case KBD_3:ret=4;break; + case KBD_3:ret=4;break; case KBD_4:ret=5;break; case KBD_5:ret=6;break; - case KBD_6:ret=7;break; + case KBD_6:ret=7;break; case KBD_7:ret=8;break; case KBD_8:ret=9;break; - case KBD_9:ret=10;break; + case KBD_9:ret=10;break; case KBD_0:ret=11;break; case KBD_minus:ret=12;break; @@ -245,15 +245,15 @@ case KBD_backspace:ret=14;break; case KBD_tab:ret=15;break; - case KBD_q:ret=16;break; + case KBD_q:ret=16;break; case KBD_w:ret=17;break; - case KBD_e:ret=18;break; + case KBD_e:ret=18;break; case KBD_r:ret=19;break; - case KBD_t:ret=20;break; + case KBD_t:ret=20;break; case KBD_y:ret=21;break; - case KBD_u:ret=22;break; + case KBD_u:ret=22;break; case KBD_i:ret=23;break; - case KBD_o:ret=24;break; + case KBD_o:ret=24;break; case KBD_p:ret=25;break; case KBD_leftbracket:ret=26;break; @@ -265,10 +265,10 @@ case KBD_s:ret=31;break; case KBD_d:ret=32;break; case KBD_f:ret=33;break; - case KBD_g:ret=34;break; - case KBD_h:ret=35;break; + case KBD_g:ret=34;break; + case KBD_h:ret=35;break; case KBD_j:ret=36;break; - case KBD_k:ret=37;break; + case KBD_k:ret=37;break; case KBD_l:ret=38;break; case KBD_semicolon:ret=39;break; @@ -341,6 +341,11 @@ case KBD_pagedown:extend=true;ret=81;break; case KBD_insert:extend=true;ret=82;break; case KBD_delete:extend=true;ret=83;break; + case KBD_leftgui: ret = 89; break; + case KBD_rightgui: + extend = true; + ret = 89; + break; case KBD_pause: KEYBOARD_AddBuffer(0xe1); KEYBOARD_AddBuffer(29|(pressed?0:0x80)); @@ -358,7 +363,7 @@ } /* Add the actual key in the keyboard queue */ if (pressed) { - if (keyb.repeat.key == keytype) keyb.repeat.wait = keyb.repeat.rate; + if (keyb.repeat.key == keytype) keyb.repeat.wait = keyb.repeat.rate; else keyb.repeat.wait = keyb.repeat.pause; keyb.repeat.key = keytype; } else { @@ -380,24 +385,24 @@ } } -void KEYBOARD_Init(Section* sec) { +void KEYBOARD_Init(Section* /*sec*/) { IO_RegisterWriteHandler(0x60,write_p60,IO_MB); IO_RegisterReadHandler(0x60,read_p60,IO_MB); IO_RegisterWriteHandler(0x61,write_p61,IO_MB); IO_RegisterReadHandler(0x61,read_p61,IO_MB); - if (machine==MCH_CGA || machine==MCH_HERC) IO_RegisterReadHandler(0x62,read_p62,IO_MB); + if (machine == MCH_CGA || machine == MCH_HERC) IO_RegisterReadHandler(0x62,read_p62,IO_MB); IO_RegisterWriteHandler(0x64,write_p64,IO_MB); IO_RegisterReadHandler(0x64,read_p64,IO_MB); TIMER_AddTickHandler(&KEYBOARD_TickHandler); write_p61(0,0,0); /* Init the keyb struct */ - keyb.active=true; - keyb.scanning=true; - keyb.command=CMD_NONE; - keyb.p60changed=false; - keyb.repeat.key=KBD_NONE; - keyb.repeat.pause=500; - keyb.repeat.rate=33; - keyb.repeat.wait=0; + keyb.active = true; + keyb.scanning = true; + keyb.command = CMD_NONE; + keyb.p60changed = false; + keyb.repeat.key = KBD_NONE; + keyb.repeat.pause = 500; + keyb.repeat.rate = 33; + keyb.repeat.wait = 0; KEYBOARD_ClrBuffer(); } diff -Nru dosbox-staging-0.76.0/src/hardware/Makefile.am dosbox-staging-0.77.0/src/hardware/Makefile.am --- dosbox-staging-0.76.0/src/hardware/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -SUBDIRS = \ - mame \ - serialport - -EXTRA_DIST = \ - adlib.h \ - dbopl.h \ - opl.cpp \ - opl.h \ - pci_devices.h - -noinst_LIBRARIES = libhardware.a - -libhardware_a_SOURCES = \ - adlib.cpp \ - cmos.cpp \ - dbopl.cpp \ - dc_silencer.cpp \ - dc_silencer.h \ - disney.cpp \ - dma.cpp \ - envelope.cpp \ - gameblaster.cpp \ - gus.cpp \ - hardware.cpp \ - iohandler.cpp \ - ipx.cpp \ - ipxserver.cpp \ - joystick.cpp \ - keyboard.cpp \ - memory.cpp \ - mixer.cpp \ - mpu401.cpp \ - pci_bus.cpp \ - pcspeaker.cpp \ - pic.cpp \ - sblaster.cpp \ - tandy_sound.cpp \ - timer.cpp \ - vga_attr.cpp \ - vga.cpp \ - vga_crtc.cpp \ - vga_dac.cpp \ - vga_draw.cpp \ - vga_gfx.cpp \ - vga_memory.cpp \ - vga_misc.cpp \ - vga_other.cpp \ - vga_paradise.cpp \ - vga_s3.cpp \ - vga_seq.cpp \ - vga_tseng.cpp \ - vga_xga.cpp diff -Nru dosbox-staging-0.76.0/src/hardware/mame/emu.h dosbox-staging-0.77.0/src/hardware/mame/emu.h --- dosbox-staging-0.76.0/src/hardware/mame/emu.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/emu.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,26 @@ -#ifndef DOSBOX_EMU_H -#define DOSBOX_EMU_H +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2017-2020 The DOSBox Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#ifndef DOSBOX_MAME_EMU_H +#define DOSBOX_MAME_EMU_H #include "dosbox.h" @@ -128,10 +148,6 @@ } }; -static inline void auto_free(const device_t::machine_t& machine, void * buffer) { - free(buffer); -} - #define auto_alloc_array_clear(m, t, c) calloc(c, sizeof(t) ) #define auto_alloc_clear(m, t) static_cast( calloc(1, sizeof(t) ) ) diff -Nru dosbox-staging-0.76.0/src/hardware/mame/fmopl.cpp dosbox-staging-0.77.0/src/hardware/mame/fmopl.cpp --- dosbox-staging-0.76.0/src/hardware/mame/fmopl.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/fmopl.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,5 @@ -// license:GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0-or-later +// // copyright-holders:Jarek Burczynski,Tatsuyuki Satoh /* ** @@ -69,12 +70,11 @@ verify volume of the FM part on the Y8950 */ +#include "support.h" + #include "emu.h" #include "ymdeltat.h" #include "fmopl.h" - - - /* output final shift */ #if (OPL_SAMPLE_BITS==16) #define FINAL_SH (0) @@ -636,7 +636,9 @@ { if (!SLOT->FB) out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable); + const auto out_shifted = left_shift_signed(out, SLOT->FB); + SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, out_shifted, + SLOT->wavetable); } /* SLOT 2 */ @@ -716,7 +718,9 @@ { if (!SLOT->FB) out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable); + const auto out_shifted = left_shift_signed(out, SLOT->FB); + SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, out_shifted, + SLOT->wavetable); } /* SLOT 2 */ @@ -960,7 +964,8 @@ 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) ]; + const auto pm_shifted = left_shift_signed(pm, 16); + uint32_t const p = (env<<4) + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + pm_shifted)) >> FREQ_SH) & SIN_MASK) ]; return (p >= TL_TAB_LEN) ? 0 : tl_tab[p]; } @@ -1600,7 +1605,8 @@ break; #endif default: - device->logerror("FMOPL.C: write to unknown register: %02x\n",r); + if (device) + device->logerror("FMOPL.C: write to unknown register: %02x\n", r); break; } break; @@ -1991,7 +1997,11 @@ static void OPLDestroy(FM_OPL *OPL) { FM_OPL::UnLockTable(); - auto_free(OPL->device->machine(), OPL); + if (!OPL) + return; + + free(OPL); + OPL = nullptr; } /* Optional handlers */ diff -Nru dosbox-staging-0.76.0/src/hardware/mame/fmopl.h dosbox-staging-0.77.0/src/hardware/mame/fmopl.h --- dosbox-staging-0.76.0/src/hardware/mame/fmopl.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/fmopl.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,7 @@ -// license:GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0-or-later +// // copyright-holders:Jarek Burczynski,Tatsuyuki Satoh + #ifndef MAME_SOUND_FMOPL_H #define MAME_SOUND_FMOPL_H diff -Nru dosbox-staging-0.76.0/src/hardware/mame/.gitignore dosbox-staging-0.77.0/src/hardware/mame/.gitignore --- dosbox-staging-0.76.0/src/hardware/mame/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/hardware/mame/Makefile.am dosbox-staging-0.77.0/src/hardware/mame/Makefile.am --- dosbox-staging-0.76.0/src/hardware/mame/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libmame.a - -libmame_a_SOURCES = \ - emu.h \ - fmopl.cpp \ - fmopl.h \ - saa1099.cpp \ - saa1099.h \ - sn76496.cpp \ - sn76496.h \ - ymdeltat.cpp \ - ymdeltat.h \ - ymf262.cpp \ - ymf262.h diff -Nru dosbox-staging-0.76.0/src/hardware/mame/saa1099.cpp dosbox-staging-0.77.0/src/hardware/mame/saa1099.cpp --- dosbox-staging-0.76.0/src/hardware/mame/saa1099.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/saa1099.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,5 @@ -// license:BSD-3-Clause +// SPDX-License-Identifier: BSD-3-Clause +// // copyright-holders:Juergen Buchmueller, Manuel Abadia /*************************************************************************** @@ -220,7 +221,10 @@ // sound_stream_update - handle a stream update //------------------------------------------------- -void saa1099_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +void saa1099_device::sound_stream_update(MAYBE_UNUSED sound_stream &stream, + MAYBE_UNUSED stream_sample_t **inputs, + stream_sample_t **outputs, + int samples) { int j, ch; /* if the channels are disabled we're done */ @@ -317,7 +321,6 @@ } } - void saa1099_device::envelope_w(int ch) { if (m_env_enable[ch]) diff -Nru dosbox-staging-0.76.0/src/hardware/mame/saa1099.h dosbox-staging-0.77.0/src/hardware/mame/saa1099.h --- dosbox-staging-0.76.0/src/hardware/mame/saa1099.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/saa1099.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,7 @@ -// license:BSD-3-Clause +// SPDX-License-Identifier: BSD-3-Clause +// // copyright-holders:Juergen Buchmueller, Manuel Abadia + /********************************************** Philips SAA1099 Sound driver **********************************************/ @@ -25,7 +27,7 @@ // ======================> saa1099_device -class saa1099_device : public device_t, public device_sound_interface { +class saa1099_device final : public device_t, public device_sound_interface { public: saa1099_device(const machine_config &mconfig, const char *tag, diff -Nru dosbox-staging-0.76.0/src/hardware/mame/sn76496.cpp dosbox-staging-0.77.0/src/hardware/mame/sn76496.cpp --- dosbox-staging-0.76.0/src/hardware/mame/sn76496.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/sn76496.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,5 @@ -// license:BSD-3-Clause +// SPDX-License-Identifier: BSD-3-Clause +// // copyright-holders:Nicola Salmoria /*************************************************************************** diff -Nru dosbox-staging-0.76.0/src/hardware/mame/sn76496.h dosbox-staging-0.77.0/src/hardware/mame/sn76496.h --- dosbox-staging-0.76.0/src/hardware/mame/sn76496.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/sn76496.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,11 +1,10 @@ -// license:BSD-3-Clause +// SPDX-License-Identifier: BSD-3-Clause +// // copyright-holders:Nicola Salmoria + #ifndef MAME_SOUND_SN76496_H #define MAME_SOUND_SN76496_H -#pragma once - - DECLARE_DEVICE_TYPE(SN76496, sn76496_device) DECLARE_DEVICE_TYPE(U8106, u8106_device) DECLARE_DEVICE_TYPE(Y2404, y2404_device) @@ -101,35 +100,35 @@ }; // SN76496: Whitenoise verified, phase verified, periodic verified (by Michael Zapf) -class sn76496_device : public sn76496_base_device +class sn76496_device final : public sn76496_base_device { public: sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // U8106 not verified yet. todo: verify; (a custom marked sn76489? only used on mr. do and maybe other universal games) -class u8106_device : public sn76496_base_device +class u8106_device final : public sn76496_base_device { public: u8106_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // Y2404 not verified yet. todo: verify; (don't be fooled by the Y, it's a TI chip, not Yamaha) -class y2404_device : public sn76496_base_device +class y2404_device final : public sn76496_base_device { public: y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // NCR8496 whitenoise verified, phase verified; verified by ValleyBell & NewRisingSun -class sn76489_device : public sn76496_base_device +class sn76489_device final : public sn76496_base_device { public: sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // PSSJ-3 whitenoise verified, phase verified; verified by ValleyBell & NewRisingSun -class pssj3_device : public sn76496_base_device +class pssj3_device final : public sn76496_base_device { public: pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -137,42 +136,42 @@ // SN76489A: whitenoise verified, phase verified, periodic verified (by plgdavid) -class sn76489a_device : public sn76496_base_device +class sn76489a_device final : public sn76496_base_device { public: sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // SN76494 not verified, (according to datasheet: same as sn76489a but without the /8 divider) -class sn76494_device : public sn76496_base_device +class sn76494_device final : public sn76496_base_device { public: sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // SN94624 whitenoise verified, phase verified, period verified; verified by PlgDavid -class sn94624_device : public sn76496_base_device +class sn94624_device final : public sn76496_base_device { public: sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // NCR8496 not verified; info from smspower wiki and vgmpf wiki -class ncr8496_device : public sn76496_base_device +class ncr8496_device final : public sn76496_base_device { public: ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // Verified by Justin Kerk -class gamegear_device : public sn76496_base_device +class gamegear_device final : public sn76496_base_device { public: gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; // todo: verify; from smspower wiki, assumed to have same invert as gamegear -class segapsg_device : public sn76496_base_device +class segapsg_device final : public sn76496_base_device { public: segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff -Nru dosbox-staging-0.76.0/src/hardware/mame/ymdeltat.cpp dosbox-staging-0.77.0/src/hardware/mame/ymdeltat.cpp --- dosbox-staging-0.76.0/src/hardware/mame/ymdeltat.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/ymdeltat.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,5 @@ -// license:GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0-or-later +// // copyright-holders:Jarek Burczynski /* ** diff -Nru dosbox-staging-0.76.0/src/hardware/mame/ymdeltat.h dosbox-staging-0.77.0/src/hardware/mame/ymdeltat.h --- dosbox-staging-0.76.0/src/hardware/mame/ymdeltat.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/ymdeltat.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,11 +1,10 @@ -// license:GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0-or-later +// // copyright-holders:Jarek Burczynski + #ifndef MAME_SOUND_YMDELTAT_H #define MAME_SOUND_YMDELTAT_H -#pragma once - - typedef void (*STATUS_CHANGE_HANDLER)(void *chip, uint8_t status_bits); diff -Nru dosbox-staging-0.76.0/src/hardware/mame/ymf262.cpp dosbox-staging-0.77.0/src/hardware/mame/ymf262.cpp --- dosbox-staging-0.76.0/src/hardware/mame/ymf262.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/ymf262.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,5 @@ -// license:GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0-or-later +// // copyright-holders:Jarek Burczynski /* ** @@ -54,11 +55,11 @@ */ +#include "support.h" #include "emu.h" #include "ymf262.h" - /* output final shift */ #if (OPL3_SAMPLE_BITS==16) #define FINAL_SH (0) @@ -616,9 +617,6 @@ }; -/* 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]) @@ -885,7 +883,10 @@ { uint32_t p; - p = (env<<4) + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + (pm<<16))) >> FREQ_SH) & SIN_MASK) ]; + const auto pm_shifted = left_shift_signed(pm, 16); + p = (env << 4) + + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + pm_shifted)) >> FREQ_SH) & + SIN_MASK)]; if (p >= TL_TAB_LEN) return 0; @@ -927,7 +928,9 @@ { if (!SLOT->FB) out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable); + const auto out_shifted = left_shift_signed(out, SLOT->FB); + SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, out_shifted, + SLOT->wavetable); } if (SLOT->connect) { *SLOT->connect += SLOT->op1_out[1]; @@ -1036,7 +1039,9 @@ { if (!SLOT->FB) out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable); + const auto out_shifted = left_shift_signed(out, SLOT->FB); + SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, out_shifted, + SLOT->wavetable); } /* SLOT 2 */ @@ -1330,15 +1335,6 @@ return 1; } -static void OPLCloseTable(void) -{ -#ifdef SAVE_SAMPLE - fclose(sample[0]); -#endif -} - - - static void OPL3_initalize(OPL3 *chip) { int i; @@ -1784,7 +1780,8 @@ break; default: - chip->device->logerror("YMF262: write to unknown register: %02x value=%02x\n",r,v); + if (chip->device) + chip->device->logerror("YMF262: write to unknown register: %02x value=%02x\n",r,v); break; } break; @@ -2282,33 +2279,6 @@ } } -/* lock/unlock for common table */ -static int OPL3_LockTable(device_t *device) -{ - num_lock++; - if (num_lock > 1) { - return 0; - } - - /* first time */ - - 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; @@ -2356,18 +2326,16 @@ /* 'rate' is sampling rate */ static OPL3 *OPL3Create(device_t *device, int clock, int rate, int type) { - // Guard - if (device == nullptr) { - return nullptr; - } - OPL3 *chip; + // The MAME device type has been stubbed out, therefore we + // expect and assume it's a nullptr (and confirm it here) + assert(device == nullptr); - if (OPL3_LockTable(device) == -1) { - return nullptr; - } + OPL3 *chip = nullptr; + + init_tables(); /* allocate memory block */ - chip = auto_alloc_clear(device->machine(), OPL3); + chip = auto_alloc_clear(device, OPL3); if (chip == nullptr) { device->logerror("Could not allocate memory for OPL3 chip"); return nullptr; @@ -2389,8 +2357,11 @@ /* Destroy one of virtual YMF262 */ static void OPL3Destroy(OPL3 *chip) { - OPL3_UnLockTable(); - auto_free(chip->device->machine(), chip); + if (!chip) + return; + + free(chip); + chip = nullptr; } diff -Nru dosbox-staging-0.76.0/src/hardware/mame/ymf262.h dosbox-staging-0.77.0/src/hardware/mame/ymf262.h --- dosbox-staging-0.76.0/src/hardware/mame/ymf262.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mame/ymf262.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,10 +1,10 @@ -// license:GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0-or-later +// // copyright-holders:Jarek Burczynski + #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 @@ -36,5 +36,4 @@ 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); - #endif // MAME_SOUND_YMF262_H diff -Nru dosbox-staging-0.76.0/src/hardware/memory.cpp dosbox-staging-0.77.0/src/hardware/memory.cpp --- dosbox-staging-0.76.0/src/hardware/memory.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/memory.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,7 +58,7 @@ HostPt MemBase; -class IllegalPageHandler : public PageHandler { +class IllegalPageHandler final : public PageHandler { public: IllegalPageHandler() { flags=PFLAG_INIT|PFLAG_NOCODE; @@ -101,7 +101,7 @@ } }; -class ROMPageHandler : public RAMPageHandler { +class ROMPageHandler final : public RAMPageHandler { public: ROMPageHandler() { flags=PFLAG_READABLE|PFLAG_HASROM; @@ -184,8 +184,9 @@ } } -void MEM_BlockWrite(PhysPt pt,void const * const data,Bitu size) { - Bit8u const * read = reinterpret_cast(data); +void MEM_BlockWrite(PhysPt pt, const void *data, size_t size) +{ + const uint8_t *read = static_cast(data); while (size--) { mem_writeb_inline(pt++,*read++); } @@ -525,14 +526,16 @@ return memory.a20.controlport | (memory.a20.enabled ? 0x02 : 0); } -void RemoveEMSPageFrame(void) { +void MEM_RemoveEMSPageFrame() +{ /* Setup rom at 0xe0000-0xf0000 */ for (Bitu ct=0xe0;ct<0xf0;ct++) { memory.phandlers[ct] = &rom_page_handler; } } -void PreparePCJRCartRom(void) { +void MEM_PreparePCJRCartRom() +{ /* Setup rom at 0xd0000-0xe0000 */ for (Bitu ct=0xd0;ct<0xe0;ct++) { memory.phandlers[ct] = &rom_page_handler; @@ -541,7 +544,7 @@ HostPt GetMemBase(void) { return MemBase; } -class MEMORY : public Module_base { +class MEMORY final : public Module_base { private: IO_ReadHandleObject ReadHandler{}; IO_WriteHandleObject WriteHandler{}; @@ -571,7 +574,7 @@ } memset((void*)MemBase, 0, memsize * 1024 * 1024); memory.pages = (memsize * 1024 * 1024) / 4096; - LOG_MSG("MEMORY: Base address: %p", MemBase); + LOG_MSG("MEMORY: Base address: %p", static_cast(MemBase)); LOG_MSG("MEMORY: Using %d DOS memory pages (%u MiB)", static_cast(memory.pages), memsize); diff -Nru dosbox-staging-0.76.0/src/hardware/meson.build dosbox-staging-0.77.0/src/hardware/meson.build --- dosbox-staging-0.76.0/src/hardware/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,72 @@ +libhardware_sources = files([ + 'adlib.cpp', + 'cmos.cpp', + 'dbopl.cpp', + 'dc_silencer.cpp', + 'disney.cpp', + 'dma.cpp', + 'envelope.cpp', + 'gameblaster.cpp', + 'gus.cpp', + 'hardware.cpp', + 'innovation.cpp', + 'iohandler.cpp', + 'ipx.cpp', + 'ipxserver.cpp', + 'joystick.cpp', + 'keyboard.cpp', + 'mame/fmopl.cpp', + 'mame/saa1099.cpp', + 'mame/sn76496.cpp', + 'mame/ymdeltat.cpp', + 'mame/ymf262.cpp', + 'memory.cpp', + 'mixer.cpp', + 'mpu401.cpp', + 'ne2000.cpp', + 'pci_bus.cpp', + 'pcspeaker.cpp', + 'ps1audio.cpp', + 'pic.cpp', + 'sblaster.cpp', + 'serialport/directserial.cpp', + 'serialport/libserial.cpp', + 'serialport/misc_util.cpp', + 'serialport/nullmodem.cpp', + 'serialport/serialdummy.cpp', + 'serialport/serialport.cpp', + 'serialport/softmodem.cpp', + 'tandy_sound.cpp', + 'timer.cpp', + 'vga_attr.cpp', + 'vga.cpp', + 'vga_crtc.cpp', + 'vga_dac.cpp', + 'vga_draw.cpp', + 'vga_gfx.cpp', + 'vga_memory.cpp', + 'vga_misc.cpp', + 'vga_other.cpp', + 'vga_paradise.cpp', + 'vga_s3.cpp', + 'vga_seq.cpp', + 'vga_tseng.cpp', + 'vga_xga.cpp', +]) + +libhardware = static_library('hardware', libhardware_sources, + include_directories : incdir, + dependencies : [ + libnuked_dep, + pcap_dep, + png_dep, + libresidfp_dep, + sdl2_dep, + sdl2_net_dep, + slirp_dep, + winsock2_dep, + ]) + +libhardware_dep = declare_dependency(link_with : libhardware) + +internal_deps += libhardware_dep diff -Nru dosbox-staging-0.76.0/src/hardware/mixer.cpp dosbox-staging-0.77.0/src/hardware/mixer.cpp --- dosbox-staging-0.76.0/src/hardware/mixer.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mixer.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,15 +19,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* - Remove the sdl code from here and have it handled in the sdlmain. - That should call the mixer start from there or something. -*/ - // #define DEBUG 1 #include "mixer.h" +#include #include #include #include @@ -47,7 +46,7 @@ #include "timer.h" #include "setup.h" #include "cross.h" -#include "support.h" +#include "string_utils.h" #include "mapper.h" #include "hardware.h" #include "programs.h" @@ -64,7 +63,7 @@ #define FREQ_NEXT ( 1 << FREQ_SHIFT) #define FREQ_MASK ( FREQ_NEXT -1 ) -#define TICK_SHIFT 14 +#define TICK_SHIFT 24 #define TICK_NEXT ( 1 << TICK_SHIFT) #define TICK_MASK (TICK_NEXT -1) @@ -353,14 +352,37 @@ offset[0] = offset[1] = 0; } -//4 seems to work . Disabled for now +// Floating-point conversion from unsigned 8-bit to signed 16-bit. +// This is only used to populate a lookup table that's 20-fold faster. +constexpr int16_t u8to16(const int u_val) +{ + assert(u_val >= 0 && u_val <= UINT8_MAX); + const auto s_val = u_val - 128; + if (s_val > 0) { + constexpr auto scalar = INT16_MAX / 127.0; + return static_cast(round(s_val * scalar)); + } + return static_cast(s_val * 256); +} + +// 8-bit to 16-bit lookup tables +static int16_t lut_u8to16[UINT8_MAX + 1] = {}; +constexpr int16_t *lut_s8to16 = lut_u8to16 + 128; + +constexpr void fill_8to16_lut() +{ + for (int i = 0; i <= UINT8_MAX; ++i) + lut_u8to16[i] = u8to16(i); +} + +// 4 seems to work . Disabled for now #define MIXER_UPRAMP_STEPS 0 #define MIXER_UPRAMP_SAVE 512 template inline void MixerChannel::AddSamples(Bitu len, const Type* data) { last_samples_were_stereo = stereo; - + //Position where to write the data Bitu mixpos = mixer.pos + done; //Position in the incoming data @@ -391,19 +413,22 @@ } if ( sizeof( Type) == 1) { + // unsigned 8-bit if (!signeddata) { if (stereo) { - next_sample[0]=(((Bit8s)(data[pos*2+0] ^ 0x80)) << 8); - next_sample[1]=(((Bit8s)(data[pos*2+1] ^ 0x80)) << 8); + next_sample[0] = lut_u8to16[data[pos * 2 + 0]]; + next_sample[1] = lut_u8to16[data[pos * 2 + 1]]; } else { - next_sample[0]=(((Bit8s)(data[pos] ^ 0x80)) << 8); + next_sample[0] = lut_u8to16[data[pos]]; } - } else { + } + // signed 8-bit + else { if (stereo) { - next_sample[0]=(data[pos*2+0] << 8); - next_sample[1]=(data[pos*2+1] << 8); + next_sample[0] = lut_s8to16[data[pos * 2 + 0]]; + next_sample[1] = lut_s8to16[data[pos * 2 + 1]]; } else { - next_sample[0]=(data[pos] << 8); + next_sample[0] = lut_s8to16[data[pos]]; } } //16bit and 32bit both contain 16bit data internally @@ -607,7 +632,7 @@ extern bool ticksLocked; static inline bool Mixer_irq_important() { - /* In some states correct timing of the irqs is more important then + /* In some states correct timing of the irqs is more important than * non stuttering audo */ return (ticksLocked || (CaptureState & (CAPTURE_WAVE|CAPTURE_VIDEO))); } @@ -682,6 +707,8 @@ mixer.done=0; } +#define INDEX_SHIFT_LOCAL 14 + static void SDLCALL MIXER_CallBack(MAYBE_UNUSED void *userdata, Uint8 *stream, int len) { memset(stream, 0, len); @@ -690,15 +717,17 @@ Bitu reduce; Bitu pos; //Local resampling counter to manipulate the data when sending it off to the callback - Bitu index, index_add; + Bitu index_add = (1< (need >>7) ) //Max 1 procent stretch. + if((need - mixer.done) > (need >>7) ) //Max 1 percent stretch. return; reduce = mixer.done; - index_add = (reduce << TICK_SHIFT) / need; + index_add = (reduce << INDEX_SHIFT_LOCAL) / need; mixer.tick_add = calc_tickadd(mixer.freq+mixer.min_needed); } else if (mixer.done < mixer.max_needed) { Bitu left = mixer.done - need; @@ -714,10 +743,10 @@ } // LOG_MSG("needed underrun need %d, have %d, min %d, left %d", need, mixer.done, mixer.min_needed, left); reduce = need - left; - index_add = (reduce << TICK_SHIFT) / need; + index_add = (reduce << INDEX_SHIFT_LOCAL) / need; } else { reduce = need; - index_add = (1 << TICK_SHIFT); + index_add = (1 << INDEX_SHIFT_LOCAL); // LOG_MSG("regular run need %d, have %d, min %d, left %d", need, mixer.done, mixer.min_needed, left); /* Mixer tick value being updated: @@ -742,7 +771,7 @@ index_add = MIXER_BUFSIZE - 2*mixer.min_needed; else index_add = mixer.done - 2*mixer.min_needed; - index_add = (index_add << TICK_SHIFT) / need; + index_add = (index_add << INDEX_SHIFT_LOCAL) / need; reduce = mixer.done - 2* mixer.min_needed; mixer.tick_add = calc_tickadd(mixer.freq-(mixer.min_needed/5)); } @@ -760,10 +789,9 @@ mixer.needed -= reduce; pos = mixer.pos; mixer.pos = (mixer.pos + reduce) & MIXER_BUFMASK; - index = 0; if(need != reduce) { while (need--) { - Bitu i = (pos + (index >> TICK_SHIFT )) & MIXER_BUFMASK; + Bitu i = (pos + (index >> INDEX_SHIFT_LOCAL )) & MIXER_BUFMASK; index += index_add; sample=mixer.work[i][0]>>MIXER_VOLSHIFT; *output++=MIXER_CLIP(sample); @@ -791,10 +819,12 @@ } } +#undef INDEX_SHIFT_LOCAL + static void MIXER_Stop(MAYBE_UNUSED Section *sec) {} -class MIXER : public Program { +class MIXER final : public Program { public: void MakeVolume(char * scan,float & vol0,float & vol1) { Bitu w=0; @@ -923,6 +953,11 @@ mixer.tick_add=calc_tickadd(mixer.freq); TIMER_AddTickHandler(MIXER_Mix_NoSound); } else { + // Does SDL want something other than stereo output? + if (obtained.channels != spec.channels) + E_Exit("SDL gave us %u-channel output but we require %u channels", + obtained.channels, spec.channels); + // Does SDL want a different playback rate? assert(obtained.freq > 0 && static_cast(obtained.freq) < UINT32_MAX); @@ -936,7 +971,7 @@ // Does SDL want a different blocksize? const auto obtained_blocksize = obtained.samples; if (obtained_blocksize != mixer.blocksize) { - LOG_MSG("MIXER: SDL changed the blocksize from %u to %u bytes", + LOG_MSG("MIXER: SDL changed the blocksize from %u to %u frames", mixer.blocksize, obtained_blocksize); mixer.blocksize = obtained_blocksize; } @@ -944,14 +979,21 @@ TIMER_AddTickHandler(MIXER_Mix); SDL_PauseAudioDevice(mixer.sdldevice, 0); - LOG_MSG("MIXER: Negotiated a %u-Hz output rate and %u-byte blocksize", - mixer.freq, mixer.blocksize); + LOG_MSG("MIXER: Negotiated %u-channel %u-Hz audio in %u-frame blocks", + obtained.channels, mixer.freq, mixer.blocksize); } + + //1000 = 8 *125 + mixer.tick_counter = (mixer.freq%125)?TICK_NEXT:0; const auto requested_prebuffer = section->Get_int("prebuffer"); mixer.min_needed = static_cast(clamp(requested_prebuffer, 0, 100)); mixer.min_needed = (mixer.freq * mixer.min_needed) / 1000; mixer.max_needed = mixer.blocksize * 2 + 2 * mixer.min_needed; mixer.needed = mixer.min_needed + 1; + + // Initialize the 8-bit to 16-bit lookup table + fill_8to16_lut(); + PROGRAMS_MakeFile("MIXER.COM",MIXER_ProgramStart); } diff -Nru dosbox-staging-0.76.0/src/hardware/mpu401.cpp dosbox-staging-0.77.0/src/hardware/mpu401.cpp --- dosbox-staging-0.76.0/src/hardware/mpu401.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/mpu401.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include #include "dosbox.h" + +#include + #include "inout.h" #include "pic.h" #include "setup.h" @@ -109,14 +111,14 @@ mpu.queue_pos=0; } -static Bitu MPU401_ReadStatus(Bitu port,Bitu iolen) { - Bit8u ret=0x3f; /* Bits 6 and 7 clear */ - if (mpu.state.cmd_pending) ret|=0x40; - if (!mpu.queue_used) ret|=0x80; +static Bitu MPU401_ReadStatus(Bitu /*port*/,Bitu /*iolen*/) { + Bit8u ret = 0x3f; /* Bits 6 and 7 clear */ + if (mpu.state.cmd_pending) ret |= 0x40; + if (!mpu.queue_used) ret |= 0x80; return ret; } -static void MPU401_WriteCommand(Bitu port,Bitu val,Bitu iolen) { +static void MPU401_WriteCommand(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { if (mpu.mode==M_UART && val!=0xff) return; if (mpu.state.reset) { if (mpu.state.cmd_pending || val!=0xff) { @@ -132,7 +134,7 @@ case 2: {MIDI_RawOutByte(0xfa);mpu.clock.cth_counter=mpu.clock.cth_savecount=0;break;} case 3: {MIDI_RawOutByte(0xfb);mpu.clock.cth_counter=mpu.clock.cth_savecount;break;} } - if (val&0x20) LOG(LOG_MISC,LOG_ERROR)("MPU-401:Unhandled Recording Command %x",val); + if (val&0x20) LOG(LOG_MISC,LOG_ERROR)("MPU-401:Unhandled Recording Command %" sBitfs(X),val); switch (val&0xc) { case 0x4: /* Stop */ if (mpu.state.playing && !mpu.clock.clock_to_host) @@ -251,7 +253,7 @@ mpu.state.irq_pending=true; break; case 0xff: /* Reset MPU-401 */ - LOG(LOG_MISC,LOG_NORMAL)("MPU-401:Reset %X",val); + LOG(LOG_MISC,LOG_NORMAL)("MPU-401:Reset %" sBitfs(X),val); PIC_AddEvent(MPU401_ResetDone,MPU401_RESETBUSY); mpu.state.reset=true; if (mpu.mode==M_UART) { @@ -261,7 +263,7 @@ MPU401_Reset(); break; case 0x3f: /* UART mode */ - LOG(LOG_MISC,LOG_NORMAL)("MPU-401:Set UART mode %X",val); + LOG(LOG_MISC,LOG_NORMAL)("MPU-401:Set UART mode %" sBitfs(X),val); mpu.mode=M_UART; break; default:; @@ -270,7 +272,7 @@ QueueByte(MSG_MPU_ACK); } -static Bitu MPU401_ReadData(Bitu port,Bitu iolen) { +static Bitu MPU401_ReadData(Bitu /*port*/,Bitu /*iolen*/) { Bit8u ret=MSG_MPU_ACK; if (mpu.queue_used) { if (mpu.queue_pos>=MPU401_QUEUE) mpu.queue_pos-=MPU401_QUEUE; @@ -303,8 +305,10 @@ return ret; } -static void MPU401_WriteData(Bitu port,Bitu val,Bitu iolen) { - if (mpu.mode==M_UART) {MIDI_RawOutByte(val);return;} +static void MPU401_WriteData(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { + + if (mpu.mode == M_UART) {MIDI_RawOutByte(val);return;} + switch (mpu.state.command_byte) { /* 0xe# command data */ case 0x00: break; @@ -528,8 +532,10 @@ mpu.state.req_mask|=(1<<9); } -static void MPU401_Event(Bitu val) { - if (mpu.mode==M_UART) return; +static void MPU401_Event(Bitu /*val*/) { + + if (mpu.mode == M_UART) return; + if (mpu.state.irq_pending) goto next_event; if (mpu.state.playing) { for (Bitu i=0;i<8;i++) { /* Decrease counters */ @@ -565,7 +571,7 @@ } //Updates counters and requests new data on "End of Input" -static void MPU401_EOIHandler(Bitu val) { +static void MPU401_EOIHandler(Bitu /*val*/) { mpu.state.eoi_scheduled=false; if (mpu.state.send_now) { mpu.state.send_now=false; @@ -625,7 +631,7 @@ for (Bitu i=0;i<8;i++) {mpu.playbuf[i].type=T_OVERFLOW;mpu.playbuf[i].counter=0;} } -class MPU401:public Module_base{ +class MPU401 final : public Module_base{ private: IO_ReadHandleObject ReadHandler[2]; IO_WriteHandleObject WriteHandler[2]; @@ -672,7 +678,7 @@ static MPU401* test; -void MPU401_Destroy(Section* sec){ +void MPU401_Destroy(Section* /*sec*/){ delete test; } diff -Nru dosbox-staging-0.76.0/src/hardware/ne2000.cpp dosbox-staging-0.77.0/src/hardware/ne2000.cpp --- dosbox-staging-0.76.0/src/hardware/ne2000.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/ne2000.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1720 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * Copyright (C) 2008-2010 Ralf Grillenberger + * Copyright (C) 2004-2008 Dean Beeler + * Copyright (C) 2001-2004 Peter Grehan + * Copyright (C) 2001-2004 MandrakeSoft S.A. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "ne2000.h" + +#if C_NE2000 + +#include +#include + +#include + +#include "callback.h" +#include "cpu.h" +#include "inout.h" +#include "pic.h" +#include "setup.h" +#include "support.h" +#include "timer.h" + +/* Couldn't find a real spec for the NE2000 out there, hence this is adapted heavily from Bochs */ + +// Handle to WinPCap device +pcap_t *adhandle = 0; +static void NE2000_TX_Event(Bitu val); + +#ifdef WIN32 +// DLL loading +#define pcap_sendpacket(A,B,C) PacketSendPacket(A,B,C) +#define pcap_close(A) PacketClose(A) +#define pcap_freealldevs(A) PacketFreealldevs(A) +#define pcap_open(A,B,C,D,E,F) PacketOpen(A,B,C,D,E,F) +#define pcap_next_ex(A,B,C) PacketNextEx(A,B,C) +#define pcap_findalldevs_ex(A,B,C,D) PacketFindALlDevsEx(A,B,C,D) + +int (*PacketSendPacket)(pcap_t *, const u_char *, int) = 0; +void (*PacketClose)(pcap_t *) = 0; +void (*PacketFreealldevs)(pcap_if_t *) = 0; +pcap_t* (*PacketOpen)(char const *,int,int,int,struct pcap_rmtauth *,char *) = 0; +int (*PacketNextEx)(pcap_t *, struct pcap_pkthdr **, const u_char **) = 0; +int (*PacketFindALlDevsEx)(char *, struct pcap_rmtauth *, pcap_if_t **, char *) = 0; + +#endif + +//Never completely fill the ne2k ring so that we never +// hit the unclear completely full buffer condition. +#define BX_NE2K_NEVER_FULL_RING (1) + +#define LOG_THIS theNE2kDevice-> +//#define BX_DEBUG +//#define BX_INFO +#define BX_NULL_TIMER_HANDLE 0 +//#define BX_PANIC +//#define BX_ERROR +#define BX_RESET_HARDWARE 0 +#define BX_RESET_SOFTWARE 1 + +static char bxtmp[1024]; + +static inline void BX_INFO(const char *msg,...) { + va_list va; + + va_start(va,msg); + vsnprintf(bxtmp,sizeof(bxtmp)-1,msg,va); + va_end(va); + + LOG(LOG_MISC,LOG_NORMAL)("BX_INFO: %s",bxtmp); +} + +static inline void BX_DEBUG(const char *msg,...) { + + if (false/*TOO MUCH DEBUG INFO*/) { + va_list va; + + va_start(va,msg); + vsnprintf(bxtmp,sizeof(bxtmp)-1,msg,va); + va_end(va); + + // LOG(LOG_MISC,LOG_DEBUG)("BX_DEBUG: %s",bxtmp); + } +} + +static inline void BX_ERROR(const char *msg,...) { + va_list va; + + va_start(va,msg); + vsnprintf(bxtmp,sizeof(bxtmp)-1,msg,va); + va_end(va); + + LOG_MSG("BX_ERROR: %s",bxtmp); +} + +static inline void BX_PANIC(const char *msg,...) { + va_list va; + + va_start(va,msg); + vsnprintf(bxtmp,sizeof(bxtmp)-1,msg,va); + va_end(va); + + LOG_MSG("BX_PANIC: %s",bxtmp); + E_Exit("BX_PANIC condition"); +} + +bx_ne2k_c* theNE2kDevice = NULL; + + +bx_ne2k_c::bx_ne2k_c(void) +{ + s.tx_timer_index = BX_NULL_TIMER_HANDLE; +} + + +bx_ne2k_c::~bx_ne2k_c(void) +{ + // nothing for now +} + +// +// reset - restore state to power-up, cancelling all i/o +// +void +bx_ne2k_c::reset(unsigned type) +{ + (void)type;//UNUSED + BX_DEBUG ("reset"); + // Zero out registers and memory + memset( & BX_NE2K_THIS s.CR, 0, sizeof(BX_NE2K_THIS s.CR) ); + memset( & BX_NE2K_THIS s.ISR, 0, sizeof(BX_NE2K_THIS s.ISR)); + memset( & BX_NE2K_THIS s.IMR, 0, sizeof(BX_NE2K_THIS s.IMR)); + memset( & BX_NE2K_THIS s.DCR, 0, sizeof(BX_NE2K_THIS s.DCR)); + memset( & BX_NE2K_THIS s.TCR, 0, sizeof(BX_NE2K_THIS s.TCR)); + memset( & BX_NE2K_THIS s.TSR, 0, sizeof(BX_NE2K_THIS s.TSR)); + //memset( & BX_NE2K_THIS s.RCR, 0, sizeof(BX_NE2K_THIS s.RCR)); + memset( & BX_NE2K_THIS s.RSR, 0, sizeof(BX_NE2K_THIS s.RSR)); + BX_NE2K_THIS s.tx_timer_active = 0; + BX_NE2K_THIS s.local_dma = 0; + BX_NE2K_THIS s.page_start = 0; + BX_NE2K_THIS s.page_stop = 0; + BX_NE2K_THIS s.bound_ptr = 0; + BX_NE2K_THIS s.tx_page_start = 0; + BX_NE2K_THIS s.num_coll = 0; + BX_NE2K_THIS s.tx_bytes = 0; + BX_NE2K_THIS s.fifo = 0; + BX_NE2K_THIS s.remote_dma = 0; + BX_NE2K_THIS s.remote_start = 0; + BX_NE2K_THIS s.remote_bytes = 0; + BX_NE2K_THIS s.tallycnt_0 = 0; + BX_NE2K_THIS s.tallycnt_1 = 0; + BX_NE2K_THIS s.tallycnt_2 = 0; + + //memset( & BX_NE2K_THIS s.physaddr, 0, sizeof(BX_NE2K_THIS s.physaddr)); + //memset( & BX_NE2K_THIS s.mchash, 0, sizeof(BX_NE2K_THIS s.mchash)); + BX_NE2K_THIS s.curr_page = 0; + + BX_NE2K_THIS s.rempkt_ptr = 0; + BX_NE2K_THIS s.localpkt_ptr = 0; + BX_NE2K_THIS s.address_cnt = 0; + + memset( & BX_NE2K_THIS s.mem, 0, sizeof(BX_NE2K_THIS s.mem)); + + // Set power-up conditions + BX_NE2K_THIS s.CR.stop = 1; + BX_NE2K_THIS s.CR.rdma_cmd = 4; + BX_NE2K_THIS s.ISR.reset = 1; + BX_NE2K_THIS s.DCR.longaddr = 1; + PIC_DeActivateIRQ((unsigned int)s.base_irq); + //DEV_pic_lower_irq(BX_NE2K_THIS s.base_irq); +} + +// +// read_cr/write_cr - utility routines for handling reads/writes to +// the Command Register +// +uint32_t +bx_ne2k_c::read_cr(void) +{ + uint32_t val = + (((unsigned int)(BX_NE2K_THIS s.CR.pgsel & 0x03u) << 6u) | + ((unsigned int)(BX_NE2K_THIS s.CR.rdma_cmd & 0x07u) << 3u) | + (unsigned int)(BX_NE2K_THIS s.CR.tx_packet << 2u) | + (unsigned int)(BX_NE2K_THIS s.CR.start << 1u) | + (unsigned int)(BX_NE2K_THIS s.CR.stop)); + BX_DEBUG("read CR returns 0x%08x", val); + return val; +} + +void +bx_ne2k_c::write_cr(uint32_t value) +{ + BX_DEBUG ("wrote 0x%02x to CR", value); + + // Validate remote-DMA + if ((value & 0x38) == 0x00) { + BX_DEBUG("CR write - invalid rDMA value 0"); + value |= 0x20; /* dma_cmd == 4 is a safe default */ + //value = 0x22; /* dma_cmd == 4 is a safe default */ + } + + // Check for s/w reset + if (value & 0x01) { + BX_NE2K_THIS s.ISR.reset = 1; + BX_NE2K_THIS s.CR.stop = 1; + } else { + BX_NE2K_THIS s.CR.stop = 0; + } + + BX_NE2K_THIS s.CR.rdma_cmd = (value & 0x38) >> 3; + + // If start command issued, the RST bit in the ISR + // must be cleared + if ((value & 0x02) && !BX_NE2K_THIS s.CR.start) { + BX_NE2K_THIS s.ISR.reset = 0; + } + + BX_NE2K_THIS s.CR.start = ((value & 0x02) == 0x02); + BX_NE2K_THIS s.CR.pgsel = (value & 0xc0) >> 6; + + // Check for send-packet command + if (BX_NE2K_THIS s.CR.rdma_cmd == 3) { + // Set up DMA read from receive ring + BX_NE2K_THIS s.remote_start = BX_NE2K_THIS s.remote_dma = + BX_NE2K_THIS s.bound_ptr * 256; + BX_NE2K_THIS s.remote_bytes = *((uint16_t*) & + BX_NE2K_THIS s.mem[BX_NE2K_THIS s.bound_ptr * 256 + 2 - BX_NE2K_MEMSTART]); + BX_INFO("Sending buffer #x%x length %d", + BX_NE2K_THIS s.remote_start, + BX_NE2K_THIS s.remote_bytes); + } + + // Check for start-tx + if ((value & 0x04) && BX_NE2K_THIS s.TCR.loop_cntl) { + // loopback mode + if (BX_NE2K_THIS s.TCR.loop_cntl != 1) { + BX_INFO("Loop mode %d not supported.", BX_NE2K_THIS s.TCR.loop_cntl); + } else { + rx_frame (& BX_NE2K_THIS s.mem[BX_NE2K_THIS s.tx_page_start*256 - + BX_NE2K_MEMSTART], + BX_NE2K_THIS s.tx_bytes); + + // do a TX interrupt + // Generate an interrupt if not masked and not one in progress + if (BX_NE2K_THIS s.IMR.tx_inte && !BX_NE2K_THIS s.ISR.pkt_tx) { + //LOG_MSG("tx complete interrupt"); + PIC_ActivateIRQ((unsigned int)s.base_irq); + } + BX_NE2K_THIS s.ISR.pkt_tx = 1; + } + } else if (value & 0x04) { + // start-tx and no loopback + if (BX_NE2K_THIS s.CR.stop || !BX_NE2K_THIS s.CR.start) + BX_PANIC(("CR write - tx start, dev in reset")); + + if (BX_NE2K_THIS s.tx_bytes == 0) + BX_PANIC(("CR write - tx start, tx bytes == 0")); + +#ifdef notdef + // XXX debug stuff + printf("packet tx (%d bytes):\t", BX_NE2K_THIS s.tx_bytes); + for (int i = 0; i < BX_NE2K_THIS s.tx_bytes; i++) { + printf("%02x ", BX_NE2K_THIS s.mem[BX_NE2K_THIS s.tx_page_start*256 - + BX_NE2K_MEMSTART + i]); + if (i && (((i+1) % 16) == 0)) + printf("\t"); + } + printf(""); +#endif + + // Send the packet to the system driver + /* TODO: Transmit packet */ + //BX_NE2K_THIS ethdev->sendpkt(& BX_NE2K_THIS s.mem[BX_NE2K_THIS s.tx_page_start*256 - BX_NE2K_MEMSTART], BX_NE2K_THIS s.tx_bytes); + pcap_sendpacket(adhandle,&s.mem[s.tx_page_start*256 - BX_NE2K_MEMSTART], s.tx_bytes); + // some more debug + if (BX_NE2K_THIS s.tx_timer_active) { + BX_PANIC(("CR write, tx timer still active")); + PIC_RemoveEvents(NE2000_TX_Event); + } + //LOG_MSG("send packet command"); + //s.tx_timer_index = (64 + 96 + 4*8 + BX_NE2K_THIS s.tx_bytes*8)/10; + s.tx_timer_active = 1; + PIC_AddEvent(NE2000_TX_Event,(float)((64 + 96 + 4*8 + BX_NE2K_THIS s.tx_bytes*8)/10000.0),0); + // Schedule a timer to trigger a tx-complete interrupt + // The number of microseconds is the bit-time / 10. + // The bit-time is the preamble+sfd (64 bits), the + // inter-frame gap (96 bits), the CRC (4 bytes), and the + // the number of bits in the frame (s.tx_bytes * 8). + // + + /* TODO: Code transmit timer */ + /* + bx_pc_system.activate_timer(BX_NE2K_THIS s.tx_timer_index, + (64 + 96 + 4*8 + BX_NE2K_THIS s.tx_bytes*8)/10, + 0); // not continuous + */ + } // end transmit-start branch + + // Linux probes for an interrupt by setting up a remote-DMA read + // of 0 bytes with remote-DMA completion interrupts enabled. + // Detect this here + if (BX_NE2K_THIS s.CR.rdma_cmd == 0x01 && + BX_NE2K_THIS s.CR.start && + BX_NE2K_THIS s.remote_bytes == 0) { + BX_NE2K_THIS s.ISR.rdma_done = 1; + if (BX_NE2K_THIS s.IMR.rdma_inte) { + PIC_ActivateIRQ((unsigned int)s.base_irq); + //DEV_pic_raise_irq(BX_NE2K_THIS s.base_irq); + } + } +} + +// +// chipmem_read/chipmem_write - access the 64K private RAM. +// The ne2000 memory is accessed through the data port of +// the asic (offset 0) after setting up a remote-DMA transfer. +// Both byte and word accesses are allowed. +// The first 16 bytes contains the MAC address at even locations, +// and there is 16K of buffer memory starting at 16K +// +uint32_t bx_ne2k_c::chipmem_read(uint32_t address, unsigned int io_len) +{ + uint32_t retval = 0; + + if ((io_len == 2) && (address & 0x1)) + BX_PANIC(("unaligned chipmem word read")); + + // ROM'd MAC address + if (/*(address >=0) && */address <= 31) { + retval = BX_NE2K_THIS s.macaddr[address]; + if ((io_len == 2u) || (io_len == 4u)) { + retval |= (unsigned int)(BX_NE2K_THIS s.macaddr[address + 1u] << 8u); + if (io_len == 4u) { + retval |= (unsigned int)(BX_NE2K_THIS s.macaddr[address + 2u] << 16u); + retval |= (unsigned int)(BX_NE2K_THIS s.macaddr[address + 3u] << 24u); + } + } + return (retval); + } + + if ((address >= BX_NE2K_MEMSTART) && (address < BX_NE2K_MEMEND)) { + retval = BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART]; + if ((io_len == 2u) || (io_len == 4u)) { + retval |= (unsigned int)(BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART + 1] << 8u); + } + if (io_len == 4u) { + retval |= (unsigned int)(BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART + 2] << 16u); + retval |= (unsigned int)(BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART + 3] << 24u); + } + return (retval); + } + + BX_DEBUG("out-of-bounds chipmem read, %04X", address); + + return (0xff); +} + +void +bx_ne2k_c::chipmem_write(uint32_t address, uint32_t value, unsigned io_len) +{ + if ((io_len == 2) && (address & 0x1)) + BX_PANIC(("unaligned chipmem word write")); + + if ((address >= BX_NE2K_MEMSTART) && (address < BX_NE2K_MEMEND)) { + BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART] = value & 0xff; + if (io_len == 2) + BX_NE2K_THIS s.mem[address - BX_NE2K_MEMSTART + 1] = value >> 8; + } else + BX_DEBUG("out-of-bounds chipmem write, %04X", address); +} + +// +// asic_read/asic_write - This is the high 16 bytes of i/o space +// (the lower 16 bytes is for the DS8390). Only two locations +// are used: offset 0, which is used for data transfer, and +// offset 0xf, which is used to reset the device. +// The data transfer port is used to as 'external' DMA to the +// DS8390. The chip has to have the DMA registers set up, and +// after that, insw/outsw instructions can be used to move +// the appropriate number of bytes to/from the device. +// +uint32_t +bx_ne2k_c::asic_read(uint32_t offset, unsigned int io_len) +{ + uint32_t retval = 0; + + switch (offset) { + case 0x0: // Data register + // + // A read remote-DMA command must have been issued, + // and the source-address and length registers must + // have been initialised. + // + if (io_len > BX_NE2K_THIS s.remote_bytes) + { + BX_ERROR("ne2K: dma read underrun iolen=%d remote_bytes=%d",io_len,BX_NE2K_THIS s.remote_bytes); + //return 0; + } + + //BX_INFO(("ne2k read DMA: addr=%4x remote_bytes=%d",BX_NE2K_THIS s.remote_dma,BX_NE2K_THIS s.remote_bytes)); + retval = chipmem_read(BX_NE2K_THIS s.remote_dma, io_len); + // + // The 8390 bumps the address and decreases the byte count + // by the selected word size after every access, not by + // the amount of data requested by the host (io_len). + // + BX_NE2K_THIS s.remote_dma += (BX_NE2K_THIS s.DCR.wdsize + 1); + if (BX_NE2K_THIS s.remote_dma == BX_NE2K_THIS s.page_stop << 8) { + BX_NE2K_THIS s.remote_dma = BX_NE2K_THIS s.page_start << 8; + } + // keep s.remote_bytes from underflowing + if (BX_NE2K_THIS s.remote_bytes > 1) + BX_NE2K_THIS s.remote_bytes -= (BX_NE2K_THIS s.DCR.wdsize + 1); + else + BX_NE2K_THIS s.remote_bytes = 0; + + // If all bytes have been written, signal remote-DMA complete + if (BX_NE2K_THIS s.remote_bytes == 0) { + BX_NE2K_THIS s.ISR.rdma_done = 1; + if (BX_NE2K_THIS s.IMR.rdma_inte) { + PIC_ActivateIRQ((unsigned int)s.base_irq); + //DEV_pic_raise_irq(BX_NE2K_THIS s.base_irq); + } + } + break; + + case 0xf: // Reset register + theNE2kDevice->reset(BX_RESET_SOFTWARE); + //retval=0x1; + break; + + default: + BX_INFO("asic read invalid address %04x", (unsigned) offset); + break; + } + + return (retval); +} + +void +bx_ne2k_c::asic_write(uint32_t offset, uint32_t value, unsigned io_len) +{ + BX_DEBUG("asic write addr=0x%02x, value=0x%04x", (unsigned) offset, (unsigned) value); + switch (offset) { + case 0x0: // Data register - see asic_read for a description + + if ((io_len == 2) && (BX_NE2K_THIS s.DCR.wdsize == 0)) { + BX_PANIC(("dma write length 2 on byte mode operation")); + break; + } + + if (BX_NE2K_THIS s.remote_bytes == 0) + BX_PANIC(("ne2K: dma write, byte count 0")); + + chipmem_write(BX_NE2K_THIS s.remote_dma, value, io_len); + // is this right ??? asic_read uses DCR.wordsize + BX_NE2K_THIS s.remote_dma += io_len; + if (BX_NE2K_THIS s.remote_dma == BX_NE2K_THIS s.page_stop << 8) { + BX_NE2K_THIS s.remote_dma = BX_NE2K_THIS s.page_start << 8; + } + + BX_NE2K_THIS s.remote_bytes -= io_len; + if (BX_NE2K_THIS s.remote_bytes > BX_NE2K_MEMSIZ) + BX_NE2K_THIS s.remote_bytes = 0; + + // If all bytes have been written, signal remote-DMA complete + if (BX_NE2K_THIS s.remote_bytes == 0) { + BX_NE2K_THIS s.ISR.rdma_done = 1; + if (BX_NE2K_THIS s.IMR.rdma_inte) { + PIC_ActivateIRQ((unsigned int)s.base_irq); + //DEV_pic_raise_irq(BX_NE2K_THIS s.base_irq); + } + } + break; + + case 0xf: // Reset register + theNE2kDevice->reset(BX_RESET_SOFTWARE); + break; + + default: // this is invalid, but happens under win95 device detection + BX_INFO("asic write invalid address %04x, ignoring", (unsigned) offset); + break ; + } +} + +// +// page0_read/page0_write - These routines handle reads/writes to +// the 'zeroth' page of the DS8390 register file +// +uint32_t +bx_ne2k_c::page0_read(uint32_t offset, unsigned int io_len) +{ + BX_DEBUG("page 0 read from port %04x, len=%u", (unsigned) offset, + (unsigned) io_len); + if (io_len > 1) { + BX_ERROR("bad length! page 0 read from port %04x, len=%u", (unsigned) offset, + (unsigned) io_len); /* encountered with win98 hardware probe */ + return 0; + } + + + switch (offset) { + case 0x1: // CLDA0 + return (BX_NE2K_THIS s.local_dma & 0xff); + break; + + case 0x2: // CLDA1 + return (unsigned int)(BX_NE2K_THIS s.local_dma >> 8u); + break; + + case 0x3: // BNRY + return (BX_NE2K_THIS s.bound_ptr); + break; + + case 0x4: // TSR + return + ((unsigned int)(BX_NE2K_THIS s.TSR.ow_coll << 7u) | + (unsigned int)(BX_NE2K_THIS s.TSR.cd_hbeat << 6u) | + (unsigned int)(BX_NE2K_THIS s.TSR.fifo_ur << 5u) | + (unsigned int)(BX_NE2K_THIS s.TSR.no_carrier << 4u) | + (unsigned int)(BX_NE2K_THIS s.TSR.aborted << 3u) | + (unsigned int)(BX_NE2K_THIS s.TSR.collided << 2u) | + (unsigned int)(BX_NE2K_THIS s.TSR.tx_ok)); + break; + + case 0x5: // NCR + return (BX_NE2K_THIS s.num_coll); + break; + + case 0x6: // FIFO + // reading FIFO is only valid in loopback mode + BX_ERROR(("reading FIFO not supported yet")); + return (BX_NE2K_THIS s.fifo); + break; + + case 0x7: // ISR + return + ((unsigned int)(BX_NE2K_THIS s.ISR.reset << 7u) | + (unsigned int)(BX_NE2K_THIS s.ISR.rdma_done << 6u) | + (unsigned int)(BX_NE2K_THIS s.ISR.cnt_oflow << 5u) | + (unsigned int)(BX_NE2K_THIS s.ISR.overwrite << 4u) | + (unsigned int)(BX_NE2K_THIS s.ISR.tx_err << 3u) | + (unsigned int)(BX_NE2K_THIS s.ISR.rx_err << 2u) | + (unsigned int)(BX_NE2K_THIS s.ISR.pkt_tx << 1u) | + (unsigned int)(BX_NE2K_THIS s.ISR.pkt_rx)); + break; + + case 0x8: // CRDA0 + return (BX_NE2K_THIS s.remote_dma & 0xff); + break; + + case 0x9: // CRDA1 + return (unsigned int)(BX_NE2K_THIS s.remote_dma >> 8u); + break; + + case 0xa: // reserved + BX_INFO(("reserved read - page 0, 0xa")); + return (0xff); + break; + + case 0xb: // reserved + BX_INFO(("reserved read - page 0, 0xb")); + return (0xff); + break; + + case 0xc: // RSR + return + ((unsigned int)(BX_NE2K_THIS s.RSR.deferred << 7u) | + (unsigned int)(BX_NE2K_THIS s.RSR.rx_disabled << 6u) | + (unsigned int)(BX_NE2K_THIS s.RSR.rx_mbit << 5u) | + (unsigned int)(BX_NE2K_THIS s.RSR.rx_missed << 4u) | + (unsigned int)(BX_NE2K_THIS s.RSR.fifo_or << 3u) | + (unsigned int)(BX_NE2K_THIS s.RSR.bad_falign << 2u) | + (unsigned int)(BX_NE2K_THIS s.RSR.bad_crc << 1u) | + (unsigned int)(BX_NE2K_THIS s.RSR.rx_ok)); + break; + + case 0xd: // CNTR0 + return (BX_NE2K_THIS s.tallycnt_0); + break; + + case 0xe: // CNTR1 + return (BX_NE2K_THIS s.tallycnt_1); + break; + + case 0xf: // CNTR2 + return (BX_NE2K_THIS s.tallycnt_2); + break; + + default: + BX_PANIC("page 0 offset %04x out of range", (unsigned) offset); + } + + return(0); +} + +void +bx_ne2k_c::page0_write(uint32_t offset, uint32_t value, unsigned io_len) +{ + BX_DEBUG("page 0 write to port %04x, len=%u", (unsigned) offset, + (unsigned) io_len); + + // It appears to be a common practice to use outw on page0 regs... + + // break up outw into two outb's + if (io_len == 2) { + page0_write(offset, (value & 0xff), 1); + page0_write(offset + 1, ((value >> 8) & 0xff), 1); + return; + } + + switch (offset) { + case 0x1: // PSTART + BX_NE2K_THIS s.page_start = value; + break; + + case 0x2: // PSTOP + // BX_INFO(("Writing to PSTOP: %02x", value)); + BX_NE2K_THIS s.page_stop = value; + break; + + case 0x3: // BNRY + BX_NE2K_THIS s.bound_ptr = value; + break; + + case 0x4: // TPSR + BX_NE2K_THIS s.tx_page_start = value; + break; + + case 0x5: // TBCR0 + // Clear out low byte and re-insert + BX_NE2K_THIS s.tx_bytes &= 0xff00; + BX_NE2K_THIS s.tx_bytes |= (value & 0xff); + break; + + case 0x6: // TBCR1 + // Clear out high byte and re-insert + BX_NE2K_THIS s.tx_bytes &= 0x00ff; + BX_NE2K_THIS s.tx_bytes |= ((value & 0xff) << 8); + break; + + case 0x7: // ISR + value &= 0x7f; // clear RST bit - status-only bit + // All other values are cleared iff the ISR bit is 1 + BX_NE2K_THIS s.ISR.pkt_rx &= ~((bx_bool)((value & 0x01) == 0x01)); + BX_NE2K_THIS s.ISR.pkt_tx &= ~((bx_bool)((value & 0x02) == 0x02)); + BX_NE2K_THIS s.ISR.rx_err &= ~((bx_bool)((value & 0x04) == 0x04)); + BX_NE2K_THIS s.ISR.tx_err &= ~((bx_bool)((value & 0x08) == 0x08)); + BX_NE2K_THIS s.ISR.overwrite &= ~((bx_bool)((value & 0x10) == 0x10)); + BX_NE2K_THIS s.ISR.cnt_oflow &= ~((bx_bool)((value & 0x20) == 0x20)); + BX_NE2K_THIS s.ISR.rdma_done &= ~((bx_bool)((value & 0x40) == 0x40)); + value = ((unsigned int)(BX_NE2K_THIS s.ISR.rdma_done << 6u) | + (unsigned int)(BX_NE2K_THIS s.ISR.cnt_oflow << 5u) | + (unsigned int)(BX_NE2K_THIS s.ISR.overwrite << 4u) | + (unsigned int)(BX_NE2K_THIS s.ISR.tx_err << 3u) | + (unsigned int)(BX_NE2K_THIS s.ISR.rx_err << 2u) | + (unsigned int)(BX_NE2K_THIS s.ISR.pkt_tx << 1u) | + (unsigned int)(BX_NE2K_THIS s.ISR.pkt_rx)); + value &= ((unsigned int)(BX_NE2K_THIS s.IMR.rdma_inte << 6u) | + (unsigned int)(BX_NE2K_THIS s.IMR.cofl_inte << 5u) | + (unsigned int)(BX_NE2K_THIS s.IMR.overw_inte << 4u) | + (unsigned int)(BX_NE2K_THIS s.IMR.txerr_inte << 3u) | + (unsigned int)(BX_NE2K_THIS s.IMR.rxerr_inte << 2u) | + (unsigned int)(BX_NE2K_THIS s.IMR.tx_inte << 1u) | + (unsigned int)(BX_NE2K_THIS s.IMR.rx_inte)); + if (value == 0) + PIC_DeActivateIRQ((unsigned int)s.base_irq); + //DEV_pic_lower_irq(BX_NE2K_THIS s.base_irq); + break; + + case 0x8: // RSAR0 + // Clear out low byte and re-insert + BX_NE2K_THIS s.remote_start &= 0xff00u; + BX_NE2K_THIS s.remote_start |= (value & 0xffu); + BX_NE2K_THIS s.remote_dma = BX_NE2K_THIS s.remote_start; + break; + + case 0x9: // RSAR1 + // Clear out high byte and re-insert + BX_NE2K_THIS s.remote_start &= 0x00ffu; + BX_NE2K_THIS s.remote_start |= ((value & 0xffu) << 8u); + BX_NE2K_THIS s.remote_dma = BX_NE2K_THIS s.remote_start; + break; + + case 0xa: // RBCR0 + // Clear out low byte and re-insert + BX_NE2K_THIS s.remote_bytes &= 0xff00u; + BX_NE2K_THIS s.remote_bytes |= (value & 0xffu); + break; + + case 0xb: // RBCR1 + // Clear out high byte and re-insert + BX_NE2K_THIS s.remote_bytes &= 0x00ffu; + BX_NE2K_THIS s.remote_bytes |= ((value & 0xffu) << 8u); + break; + + case 0xc: // RCR + // Check if the reserved bits are set + if (value & 0xc0) + BX_INFO(("RCR write, reserved bits set")); + + // Set all other bit-fields + BX_NE2K_THIS s.RCR.errors_ok = ((value & 0x01u) == 0x01u); + BX_NE2K_THIS s.RCR.runts_ok = ((value & 0x02u) == 0x02u); + BX_NE2K_THIS s.RCR.broadcast = ((value & 0x04u) == 0x04u); + BX_NE2K_THIS s.RCR.multicast = ((value & 0x08u) == 0x08u); + BX_NE2K_THIS s.RCR.promisc = ((value & 0x10u) == 0x10u); + BX_NE2K_THIS s.RCR.monitor = ((value & 0x20u) == 0x20u); + + // Monitor bit is a little suspicious... + if (value & 0x20) + BX_INFO(("RCR write, monitor bit set!")); + break; + + case 0xd: // TCR + // Check reserved bits + if (value & 0xe0) + BX_ERROR(("TCR write, reserved bits set")); + + // Test loop mode (not supported) + if (value & 0x06) { + BX_NE2K_THIS s.TCR.loop_cntl = (value & 0x6) >> 1; + BX_INFO("TCR write, loop mode %d not supported", BX_NE2K_THIS s.TCR.loop_cntl); + } else { + BX_NE2K_THIS s.TCR.loop_cntl = 0; + } + + // Inhibit-CRC not supported. + if (value & 0x01) + BX_PANIC(("TCR write, inhibit-CRC not supported")); + + // Auto-transmit disable very suspicious + if (value & 0x08) + BX_PANIC(("TCR write, auto transmit disable not supported")); + + // Allow collision-offset to be set, although not used + BX_NE2K_THIS s.TCR.coll_prio = ((value & 0x08) == 0x08); + break; + + case 0xe: // DCR + // the loopback mode is not suppported yet + if (!(value & 0x08)) { + BX_ERROR(("DCR write, loopback mode selected")); + } + // It is questionable to set longaddr and auto_rx, since they + // aren't supported on the ne2000. Print a warning and continue + if (value & 0x04) + BX_INFO(("DCR write - LAS set ???")); + if (value & 0x10) + BX_INFO(("DCR write - AR set ???")); + + // Set other values. + BX_NE2K_THIS s.DCR.wdsize = ((value & 0x01) == 0x01); + BX_NE2K_THIS s.DCR.endian = ((value & 0x02) == 0x02); + BX_NE2K_THIS s.DCR.longaddr = ((value & 0x04) == 0x04); // illegal ? + BX_NE2K_THIS s.DCR.loop = ((value & 0x08) == 0x08); + BX_NE2K_THIS s.DCR.auto_rx = ((value & 0x10) == 0x10); // also illegal ? + BX_NE2K_THIS s.DCR.fifo_size = (value & 0x50) >> 5; + break; + + case 0xf: // IMR + // Check for reserved bit + if (value & 0x80) + BX_PANIC(("IMR write, reserved bit set")); + + // Set other values + BX_NE2K_THIS s.IMR.rx_inte = ((value & 0x01) == 0x01); + BX_NE2K_THIS s.IMR.tx_inte = ((value & 0x02) == 0x02); + BX_NE2K_THIS s.IMR.rxerr_inte = ((value & 0x04) == 0x04); + BX_NE2K_THIS s.IMR.txerr_inte = ((value & 0x08) == 0x08); + BX_NE2K_THIS s.IMR.overw_inte = ((value & 0x10) == 0x10); + BX_NE2K_THIS s.IMR.cofl_inte = ((value & 0x20) == 0x20); + BX_NE2K_THIS s.IMR.rdma_inte = ((value & 0x40) == 0x40); + if(BX_NE2K_THIS s.ISR.pkt_tx && BX_NE2K_THIS s.IMR.tx_inte) { + LOG_MSG("tx irq retrigger"); + PIC_ActivateIRQ((unsigned int)s.base_irq); + } + break; + default: + BX_PANIC("page 0 write, bad offset %0x", offset); + } +} + + +// +// page1_read/page1_write - These routines handle reads/writes to +// the first page of the DS8390 register file +// +uint32_t +bx_ne2k_c::page1_read(uint32_t offset, unsigned int io_len) +{ + BX_DEBUG("page 1 read from port %04x, len=%u", (unsigned) offset, + (unsigned) io_len); + if (io_len > 1) + BX_PANIC("bad length! page 1 read from port %04x, len=%u", (unsigned) offset, + (unsigned) io_len); + + switch (offset) { + case 0x1: // PAR0-5 + case 0x2: + case 0x3: + case 0x4: + case 0x5: + case 0x6: + return (BX_NE2K_THIS s.physaddr[offset - 1]); + break; + + case 0x7: // CURR + BX_DEBUG("returning current page: %02x", (BX_NE2K_THIS s.curr_page)); + return (BX_NE2K_THIS s.curr_page); + + case 0x8: // MAR0-7 + case 0x9: + case 0xa: + case 0xb: + case 0xc: + case 0xd: + case 0xe: + case 0xf: + return (BX_NE2K_THIS s.mchash[offset - 8]); + break; + + default: + BX_PANIC("page 1 r offset %04x out of range", (unsigned) offset); + } + + return (0); +} + +void +bx_ne2k_c::page1_write(uint32_t offset, uint32_t value, unsigned io_len) +{ + (void)io_len;//UNUSED + BX_DEBUG("page 1 w offset %04x", (unsigned) offset); + switch (offset) { + case 0x1: // PAR0-5 + case 0x2: + case 0x3: + case 0x4: + case 0x5: + case 0x6: + BX_NE2K_THIS s.physaddr[offset - 1] = value; + break; + + case 0x7: // CURR + BX_NE2K_THIS s.curr_page = value; + break; + + case 0x8: // MAR0-7 + case 0x9: + case 0xa: + case 0xb: + case 0xc: + case 0xd: + case 0xe: + case 0xf: + BX_NE2K_THIS s.mchash[offset - 8] = value; + break; + + default: + BX_PANIC("page 1 w offset %04x out of range", (unsigned) offset); + } +} + + +// +// page2_read/page2_write - These routines handle reads/writes to +// the second page of the DS8390 register file +// +uint32_t +bx_ne2k_c::page2_read(uint32_t offset, unsigned int io_len) +{ + BX_DEBUG("page 2 read from port %04x, len=%u", (unsigned) offset, (unsigned) io_len); + + if (io_len > 1) + BX_PANIC("bad length! page 2 read from port %04x, len=%u", (unsigned) offset, (unsigned) io_len); + + switch (offset) { + case 0x1: // PSTART + return (BX_NE2K_THIS s.page_start); + break; + + case 0x2: // PSTOP + return (BX_NE2K_THIS s.page_stop); + break; + + case 0x3: // Remote Next-packet pointer + return (BX_NE2K_THIS s.rempkt_ptr); + break; + + case 0x4: // TPSR + return (BX_NE2K_THIS s.tx_page_start); + break; + + case 0x5: // Local Next-packet pointer + return (BX_NE2K_THIS s.localpkt_ptr); + break; + + case 0x6: // Address counter (upper) + return (unsigned int)(BX_NE2K_THIS s.address_cnt >> 8u); + break; + + case 0x7: // Address counter (lower) + return (unsigned int)(BX_NE2K_THIS s.address_cnt & 0xff); + break; + + case 0x8: // Reserved + case 0x9: + case 0xa: + case 0xb: + BX_ERROR("reserved read - page 2, 0x%02x", (unsigned) offset); + return (0xff); + break; + + case 0xc: // RCR + return + ((unsigned int)(BX_NE2K_THIS s.RCR.monitor << 5u) | + (unsigned int)(BX_NE2K_THIS s.RCR.promisc << 4u) | + (unsigned int)(BX_NE2K_THIS s.RCR.multicast << 3u) | + (unsigned int)(BX_NE2K_THIS s.RCR.broadcast << 2u) | + (unsigned int)(BX_NE2K_THIS s.RCR.runts_ok << 1u) | + (unsigned int)(BX_NE2K_THIS s.RCR.errors_ok)); + break; + + case 0xd: // TCR + return + ((unsigned int)(BX_NE2K_THIS s.TCR.coll_prio << 4u) | + (unsigned int)(BX_NE2K_THIS s.TCR.ext_stoptx << 3u) | + ((unsigned int)(BX_NE2K_THIS s.TCR.loop_cntl & 0x3u) << 1u) | + (unsigned int)(BX_NE2K_THIS s.TCR.crc_disable)); + break; + + case 0xe: // DCR + return + (((unsigned int)(BX_NE2K_THIS s.DCR.fifo_size & 0x3) << 5u) | + (unsigned int)(BX_NE2K_THIS s.DCR.auto_rx << 4u) | + (unsigned int)(BX_NE2K_THIS s.DCR.loop << 3u) | + (unsigned int)(BX_NE2K_THIS s.DCR.longaddr << 2u) | + (unsigned int)(BX_NE2K_THIS s.DCR.endian << 1u) | + (unsigned int)(BX_NE2K_THIS s.DCR.wdsize)); + break; + + case 0xf: // IMR + return + ((unsigned int)(BX_NE2K_THIS s.IMR.rdma_inte << 6u) | + (unsigned int)(BX_NE2K_THIS s.IMR.cofl_inte << 5u) | + (unsigned int)(BX_NE2K_THIS s.IMR.overw_inte << 4u) | + (unsigned int)(BX_NE2K_THIS s.IMR.txerr_inte << 3u) | + (unsigned int)(BX_NE2K_THIS s.IMR.rxerr_inte << 2u) | + (unsigned int)(BX_NE2K_THIS s.IMR.tx_inte << 1u) | + (unsigned int) (BX_NE2K_THIS s.IMR.rx_inte)); + break; + + default: + BX_PANIC("page 2 offset %04x out of range", (unsigned) offset); + } + + return (0); +} + +void +bx_ne2k_c::page2_write(uint32_t offset, uint32_t value, unsigned io_len) +{ + (void)io_len;//UNUSED + // Maybe all writes here should be BX_PANIC()'d, since they + // affect internal operation, but let them through for now + // and print a warning. + if (offset != 0) + BX_ERROR(("page 2 write ?")); + + switch (offset) { + case 0x1: // CLDA0 + // Clear out low byte and re-insert + BX_NE2K_THIS s.local_dma &= 0xff00; + BX_NE2K_THIS s.local_dma |= (value & 0xff); + break; + + case 0x2: // CLDA1 + // Clear out high byte and re-insert + BX_NE2K_THIS s.local_dma &= 0x00ff; + BX_NE2K_THIS s.local_dma |= ((value & 0xff) << 8u); + break; + + case 0x3: // Remote Next-pkt pointer + BX_NE2K_THIS s.rempkt_ptr = value; + break; + + case 0x4: + BX_PANIC(("page 2 write to reserved offset 4")); + break; + + case 0x5: // Local Next-packet pointer + BX_NE2K_THIS s.localpkt_ptr = value; + break; + + case 0x6: // Address counter (upper) + // Clear out high byte and re-insert + BX_NE2K_THIS s.address_cnt &= 0x00ff; + BX_NE2K_THIS s.address_cnt |= ((value & 0xff) << 8); + break; + + case 0x7: // Address counter (lower) + // Clear out low byte and re-insert + BX_NE2K_THIS s.address_cnt &= 0xff00; + BX_NE2K_THIS s.address_cnt |= (value & 0xff); + break; + + case 0x8: + case 0x9: + case 0xa: + case 0xb: + case 0xc: + case 0xd: + case 0xe: + case 0xf: + BX_PANIC("page 2 write to reserved offset %0x", offset); + break; + + default: + BX_PANIC("page 2 write, illegal offset %0x", offset); + break; + } +} + +// +// page3_read/page3_write - writes to this page are illegal +// +uint32_t +bx_ne2k_c::page3_read(uint32_t offset, unsigned int io_len) +{ + (void)offset;//UNUSED + (void)io_len;//UNUSED + BX_PANIC(("page 3 read attempted")); + return (0); +} + +void +bx_ne2k_c::page3_write(uint32_t offset, uint32_t value, unsigned io_len) +{ + (void)value;//UNUSED + (void)offset;//UNUSED + (void)io_len;//UNUSED + BX_PANIC(("page 3 write attempted")); +} + +// +// tx_timer_handler/tx_timer +// +void +bx_ne2k_c::tx_timer_handler(void *this_ptr) +{ + bx_ne2k_c *class_ptr = (bx_ne2k_c *) this_ptr; + + class_ptr->tx_timer(); +} + +void +bx_ne2k_c::tx_timer(void) +{ + BX_DEBUG(("tx_timer")); + BX_NE2K_THIS s.TSR.tx_ok = 1; + // Generate an interrupt if not masked and not one in progress + if (BX_NE2K_THIS s.IMR.tx_inte && !BX_NE2K_THIS s.ISR.pkt_tx) { + //LOG_MSG("tx complete interrupt"); + PIC_ActivateIRQ((unsigned int)s.base_irq); + //DEV_pic_raise_irq(BX_NE2K_THIS s.base_irq); + } //else LOG_MSG("no tx complete interrupt"); + BX_NE2K_THIS s.ISR.pkt_tx = 1; + BX_NE2K_THIS s.tx_timer_active = 0; +} + + +// +// read_handler/read - i/o 'catcher' function called from BOCHS +// mainline when the CPU attempts a read in the i/o space registered +// by this ne2000 instance +// +uint32_t bx_ne2k_c::read_handler(void *this_ptr, uint32_t address, unsigned io_len) +{ +#if !BX_USE_NE2K_SMF + bx_ne2k_c *class_ptr = (bx_ne2k_c *) this_ptr; + + return( class_ptr->read(address, io_len) ); +} + +uint32_t bx_ne2k_c::read(uint32_t address, unsigned io_len) +{ +#else + UNUSED(this_ptr); +#endif // !BX_USE_NE2K_SMF + BX_DEBUG("read addr %x, len %d", address, io_len); + uint32_t retval = 0; + unsigned int offset = (unsigned int)address - (unsigned int)(BX_NE2K_THIS s.base_address); + + if (offset >= 0x10) { + retval = asic_read(offset - 0x10, io_len); + } else if (offset == 0x00) { + retval = read_cr(); + } else { + switch (BX_NE2K_THIS s.CR.pgsel) { + case 0x00: + retval = page0_read(offset, io_len); + break; + + case 0x01: + retval = page1_read(offset, io_len); + break; + + case 0x02: + retval = page2_read(offset, io_len); + break; + + case 0x03: + retval = page3_read(offset, io_len); + break; + + default: + BX_PANIC("ne2K: unknown value of pgsel in read - %d", + BX_NE2K_THIS s.CR.pgsel); + } + } + + return (retval); +} + +// +// write_handler/write - i/o 'catcher' function called from BOCHS +// mainline when the CPU attempts a write in the i/o space registered +// by this ne2000 instance +// +void +bx_ne2k_c::write_handler(void *this_ptr, uint32_t address, uint32_t value, + unsigned io_len) +{ +#if !BX_USE_NE2K_SMF + bx_ne2k_c *class_ptr = (bx_ne2k_c *) this_ptr; + + class_ptr->write(address, value, io_len); +} + +void +bx_ne2k_c::write(uint32_t address, uint32_t value, unsigned io_len) +{ +#else + UNUSED(this_ptr); +#endif // !BX_USE_NE2K_SMF + BX_DEBUG("write with length %d", io_len); + unsigned int offset = (unsigned int)address - (unsigned int)(BX_NE2K_THIS s.base_address); + + // + // The high 16 bytes of i/o space are for the ne2000 asic - + // the low 16 bytes are for the DS8390, with the current + // page being selected by the PS0,PS1 registers in the + // command register + // + if (offset >= 0x10) { + asic_write(offset - 0x10, value, io_len); + } else if (offset == 0x00) { + write_cr(value); + } else { + switch (BX_NE2K_THIS s.CR.pgsel) { + case 0x00: + page0_write(offset, value, io_len); + break; + + case 0x01: + page1_write(offset, value, io_len); + break; + + case 0x02: + page2_write(offset, value, io_len); + break; + + case 0x03: + page3_write(offset, value, io_len); + break; + + default: + BX_PANIC("ne2K: unknown value of pgsel in write - %d", + BX_NE2K_THIS s.CR.pgsel); + } + } +} + + +/* + * mcast_index() - return the 6-bit index into the multicast + * table. Stolen unashamedly from FreeBSD's if_ed.c + */ +unsigned +bx_ne2k_c::mcast_index(const void *dst) +{ +#define POLYNOMIAL 0x04c11db6 + unsigned long crc = 0xffffffffL; + int carry, i, j; + unsigned char b; + unsigned char *ep = (unsigned char *) dst; + + for (i = 6; --i >= 0;) { + b = *ep++; + for (j = 8; --j >= 0;) { + carry = ((crc & 0x80000000L) ? 1 : 0) ^ (b & 0x01); + crc <<= 1; + b >>= 1; + if (carry) + crc = ((crc ^ POLYNOMIAL) | (unsigned int)carry); + } + } + + return (uint32_t)((crc & 0xfffffffful) >> 26ul); /* WARNING: Caller directly uses our 6-bit return as index. If not truncated, will cause a segfault */ +#undef POLYNOMIAL +} + +/* + * Callback from the eth system driver when a frame has arrived + */ +/* +void +bx_ne2k_c::rx_handler(void *arg, const void *buf, unsigned len) +{ + // BX_DEBUG(("rx_handler with length %d", len)); + bx_ne2k_c *class_ptr = (bx_ne2k_c *) arg; + if( + class_ptr->rx_frame(buf, len); +} +*/ +/* + * rx_frame() - called by the platform-specific code when an + * ethernet frame has been received. The destination address + * is tested to see if it should be accepted, and if the + * rx ring has enough room, it is copied into it and + * the receive process is updated + */ +void +bx_ne2k_c::rx_frame(const void *buf, unsigned io_len) +{ + int pages; + int avail; + unsigned idx; +// int wrapped; + int nextpage; + unsigned char pkthdr[4]; + unsigned char *pktbuf = (unsigned char *) buf; + unsigned char *startptr; + static unsigned char bcast_addr[6] = {0xff,0xff,0xff,0xff,0xff,0xff}; + + if(io_len != 60) { + BX_DEBUG("rx_frame with length %d", io_len); + } + + //LOG_MSG("stop=%d, pagestart=%x, dcr_loop=%x, tcr_loopcntl=%x", + // BX_NE2K_THIS s.CR.stop, BX_NE2K_THIS s.page_start, + // BX_NE2K_THIS s.DCR.loop, BX_NE2K_THIS s.TCR.loop_cntl); + if ((BX_NE2K_THIS s.CR.stop != 0) || + (BX_NE2K_THIS s.page_start == 0) /*|| + ((BX_NE2K_THIS s.DCR.loop == 0) && + (BX_NE2K_THIS s.TCR.loop_cntl != 0))*/) { + return; + } + + // Add the pkt header + CRC to the length, and work + // out how many 256-byte pages the frame would occupy + pages = (int)((io_len + 4u + 4u + 255u)/256u); + + if (BX_NE2K_THIS s.curr_page < BX_NE2K_THIS s.bound_ptr) { + avail = BX_NE2K_THIS s.bound_ptr - BX_NE2K_THIS s.curr_page; + } else { + avail = (BX_NE2K_THIS s.page_stop - BX_NE2K_THIS s.page_start) - + (BX_NE2K_THIS s.curr_page - BX_NE2K_THIS s.bound_ptr); +// wrapped = 1; + } + + // Avoid getting into a buffer overflow condition by not attempting + // to do partial receives. The emulation to handle this condition + // seems particularly painful. + if ((avail < pages) +#if BX_NE2K_NEVER_FULL_RING + || (avail == pages) +#endif + ) { + BX_DEBUG("no space"); + return; + } + + if ((io_len < 40/*60*/) && !BX_NE2K_THIS s.RCR.runts_ok) { + BX_DEBUG("rejected small packet, length %d", io_len); + return; + } + // some computers don't care... + if (io_len < 60) io_len=60; + + // Do address filtering if not in promiscuous mode + if (! BX_NE2K_THIS s.RCR.promisc) { + if (!memcmp(buf, bcast_addr, 6)) { + if (!BX_NE2K_THIS s.RCR.broadcast) { + return; + } + } else if (pktbuf[0] & 0x01) { + if (! BX_NE2K_THIS s.RCR.multicast) { + return; + } + idx = mcast_index(buf); + if (!(BX_NE2K_THIS s.mchash[idx >> 3] & (1 << (idx & 0x7)))) { + return; + } + } else if (0 != memcmp(buf, BX_NE2K_THIS s.physaddr, 6)) { + return; + } + } else { + BX_DEBUG(("rx_frame promiscuous receive")); + } + + BX_INFO("rx_frame %d to %x:%x:%x:%x:%x:%x from %x:%x:%x:%x:%x:%x", + io_len, + pktbuf[0], pktbuf[1], pktbuf[2], pktbuf[3], pktbuf[4], pktbuf[5], + pktbuf[6], pktbuf[7], pktbuf[8], pktbuf[9], pktbuf[10], pktbuf[11]); + + nextpage = BX_NE2K_THIS s.curr_page + pages; + if (nextpage >= BX_NE2K_THIS s.page_stop) { + nextpage -= BX_NE2K_THIS s.page_stop - BX_NE2K_THIS s.page_start; + } + + // Setup packet header + pkthdr[0] = 0; // rx status - old behavior + pkthdr[0] = 1; // Probably better to set it all the time + // rather than set it to 0, which is clearly wrong. + if (pktbuf[0] & 0x01) { + pkthdr[0] |= 0x20; // rx status += multicast packet + } + pkthdr[1] = nextpage; // ptr to next packet + pkthdr[2] = (io_len + 4) & 0xff; // length-low + pkthdr[3] = (io_len + 4) >> 8; // length-hi + + // copy into buffer, update curpage, and signal interrupt if config'd + startptr = & BX_NE2K_THIS s.mem[BX_NE2K_THIS s.curr_page * 256 - + BX_NE2K_MEMSTART]; + if ((nextpage > BX_NE2K_THIS s.curr_page) || + ((BX_NE2K_THIS s.curr_page + pages) == BX_NE2K_THIS s.page_stop)) { + memcpy(startptr, pkthdr, 4); + memcpy(startptr + 4, buf, io_len); + BX_NE2K_THIS s.curr_page = nextpage; + } else { + unsigned int endbytes = (unsigned int)(BX_NE2K_THIS s.page_stop - BX_NE2K_THIS s.curr_page) + * 256u; + memcpy(startptr, pkthdr, 4); + memcpy(startptr + 4, buf, (size_t)(endbytes - 4u)); + startptr = & BX_NE2K_THIS s.mem[BX_NE2K_THIS s.page_start * 256u - + BX_NE2K_MEMSTART]; + memcpy(startptr, (void *)(pktbuf + endbytes - 4u), + (size_t)(io_len - endbytes + 8u)); + BX_NE2K_THIS s.curr_page = nextpage; + } + + BX_NE2K_THIS s.RSR.rx_ok = 1; + if (pktbuf[0] & 0x80) { + BX_NE2K_THIS s.RSR.rx_mbit = 1; + } + + BX_NE2K_THIS s.ISR.pkt_rx = 1; + + if (BX_NE2K_THIS s.IMR.rx_inte) { + //LOG_MSG("packet rx interrupt"); + PIC_ActivateIRQ((unsigned int)s.base_irq); + //DEV_pic_raise_irq(BX_NE2K_THIS s.base_irq); + } //else LOG_MSG("no packet rx interrupt"); + +} + +//uint8_t macaddr[6] = { 0xAC, 0xDE, 0x48, 0x8E, 0x89, 0x19 }; + +Bitu dosbox_read(Bitu port, Bitu len) { + Bitu retval = theNE2kDevice->read((uint32_t)port,(unsigned int)len); + //LOG_MSG("ne2k rd port %x val %4x len %d page %d, CS:IP %8x:%8x", + // port, retval, len, theNE2kDevice->s.CR.pgsel,SegValue(cs),reg_eip); + return retval; +} +void dosbox_write(Bitu port, Bitu val, Bitu len) { + //LOG_MSG("ne2k wr port %x val %4x len %d page %d, CS:IP %8x:%8x", + // port, val, len,theNE2kDevice->s.CR.pgsel,SegValue(cs),reg_eip); + theNE2kDevice->write((uint32_t)port, (uint32_t)val, (unsigned int)len); +} + +void bx_ne2k_c::init() +{ + //BX_DEBUG(("Init $Id: ne2k.cc,v 1.56.2.1 2004/02/02 22:37:22 cbothamy Exp $")); + + // Read in values from config file + //BX_NE2K_THIS s.base_address = 0x300; + //BX_NE2K_THIS s.base_irq = 3; + /* + if (BX_NE2K_THIS s.tx_timer_index == BX_NULL_TIMER_HANDLE) { + BX_NE2K_THIS s.tx_timer_index = + bx_pc_system.register_timer(this, tx_timer_handler, 0, + 0,0, "ne2k"); // one-shot, inactive + }*/ + // Register the IRQ and i/o port addresses + //DEV_register_irq(BX_NE2K_THIS s.base_irq, "NE2000 ethernet NIC"); + + //DEV_register_ioread_handler(this, read_handler, addr, "ne2000 NIC", 3); + //DEV_register_iowrite_handler(this, write_handler, addr, "ne2000 NIC", 3); + + + BX_INFO("port 0x%x/32 irq %d mac %02x:%02x:%02x:%02x:%02x:%02x", + (unsigned int)(BX_NE2K_THIS s.base_address), + (int)(BX_NE2K_THIS s.base_irq), + BX_NE2K_THIS s.physaddr[0], + BX_NE2K_THIS s.physaddr[1], + BX_NE2K_THIS s.physaddr[2], + BX_NE2K_THIS s.physaddr[3], + BX_NE2K_THIS s.physaddr[4], + BX_NE2K_THIS s.physaddr[5]); + + // Initialise the mac address area by doubling the physical address + BX_NE2K_THIS s.macaddr[0] = BX_NE2K_THIS s.physaddr[0]; + BX_NE2K_THIS s.macaddr[1] = BX_NE2K_THIS s.physaddr[0]; + BX_NE2K_THIS s.macaddr[2] = BX_NE2K_THIS s.physaddr[1]; + BX_NE2K_THIS s.macaddr[3] = BX_NE2K_THIS s.physaddr[1]; + BX_NE2K_THIS s.macaddr[4] = BX_NE2K_THIS s.physaddr[2]; + BX_NE2K_THIS s.macaddr[5] = BX_NE2K_THIS s.physaddr[2]; + BX_NE2K_THIS s.macaddr[6] = BX_NE2K_THIS s.physaddr[3]; + BX_NE2K_THIS s.macaddr[7] = BX_NE2K_THIS s.physaddr[3]; + BX_NE2K_THIS s.macaddr[8] = BX_NE2K_THIS s.physaddr[4]; + BX_NE2K_THIS s.macaddr[9] = BX_NE2K_THIS s.physaddr[4]; + BX_NE2K_THIS s.macaddr[10] = BX_NE2K_THIS s.physaddr[5]; + BX_NE2K_THIS s.macaddr[11] = BX_NE2K_THIS s.physaddr[5]; + + // ne2k signature + for (Bitu i = 12; i < 32; i++) + BX_NE2K_THIS s.macaddr[i] = 0x57; + + // Bring the register state into power-up state + reset(BX_RESET_HARDWARE); +} + +static void NE2000_TX_Event(Bitu val) { + (void)val;//UNUSED + theNE2kDevice->tx_timer(); +} + +static void NE2000_Poller(void) { + int res; + struct pcap_pkthdr *header; + u_char *pkt_data; +//#if 0 + while((res = pcap_next_ex( adhandle, &header, (const u_char **)&pkt_data)) > 0) { + //LOG_MSG("NE2000: Received %d bytes", header->len); + + // don't receive in loopback modes + if((theNE2kDevice->s.DCR.loop == 0) || (theNE2kDevice->s.TCR.loop_cntl != 0)) + return; + theNE2kDevice->rx_frame(pkt_data, header->len); + } +//#endif +} +#ifdef WIN32 +#include +#endif + +class NE2K final : public Module_base { +private: + // Data + IO_ReadHandleObject ReadHandler8[0x20]; + IO_WriteHandleObject WriteHandler8[0x20]; + IO_ReadHandleObject ReadHandler16[0x10]; + IO_WriteHandleObject WriteHandler16[0x10]; + +public: + bool load_success; + NE2K(Section* configuration):Module_base(configuration) { + Section_prop * section=static_cast(configuration); + + load_success = true; + // enabled? + + if(!section->Get_bool("ne2000")) { + load_success = false; + return; + } + +#ifdef WIN32 +/* + int (*PacketSendPacket)(pcap_t *, const u_char *, int); + void (*PacketClose)(pcap_t *); + void (*PacketFreealldevs)(pcap_if_t *); + pcap_t* (*PacketOpen)(char const *,int,int,int,struct pcap_rmtauth *,char *); + int (*PacketNextEx)(pcap_t *, struct pcap_pkthdr **, const u_char **); + int (*PacketFindALlDevsEx)(char *, struct pcap_rmtauth *, pcap_if_t **, char *); +*/ + // init the library + HINSTANCE pcapinst; + pcapinst = LoadLibrary("WPCAP.DLL"); + if(pcapinst==NULL) { + LOG_MSG("WinPcap has to be installed for the NE2000 to work."); + load_success = false; + return; + } + FARPROC psp; + + psp = GetProcAddress(pcapinst,"pcap_sendpacket"); + if(!PacketSendPacket) PacketSendPacket = + (int (__cdecl *)(pcap_t *,const u_char *,int))psp; + + psp = GetProcAddress(pcapinst,"pcap_close"); + if(!PacketClose) PacketClose = + (void (__cdecl *)(pcap_t *)) psp; + + psp = GetProcAddress(pcapinst,"pcap_freealldevs"); + if(!PacketFreealldevs) PacketFreealldevs = + (void (__cdecl *)(pcap_if_t *)) psp; + + psp = GetProcAddress(pcapinst,"pcap_open"); + if(!PacketOpen) PacketOpen = + (pcap_t* (__cdecl *)(char const *,int,int,int,struct pcap_rmtauth *,char *)) psp; + + psp = GetProcAddress(pcapinst,"pcap_next_ex"); + if(!PacketNextEx) PacketNextEx = + (int (__cdecl *)(pcap_t *, struct pcap_pkthdr **, const u_char **)) psp; + + psp = GetProcAddress(pcapinst,"pcap_findalldevs_ex"); + if(!PacketFindALlDevsEx) PacketFindALlDevsEx = + (int (__cdecl *)(char *, struct pcap_rmtauth *, pcap_if_t **, char *)) psp; + + if(PacketFindALlDevsEx==0 || PacketNextEx==0 || PacketOpen==0 || + PacketFreealldevs==0 || PacketClose==0 || PacketSendPacket==0) { + LOG_MSG("Wrong WinPcap version or something"); + load_success = false; + return; + } + +#endif + + // get irq and base + Bitu irq = (Bitu)section->Get_int("nicirq"); + if(!(irq==3 || irq==4 || irq==5 || irq==6 ||irq==7 || + irq==9 || irq==10 || irq==11 || irq==12 ||irq==14 ||irq==15)) { + irq=3; + } + Bitu base = (Bitu)section->Get_hex("nicbase"); + if(!(base==0x260||base==0x280||base==0x300||base==0x320||base==0x340||base==0x380)) { + base=0x300; + } + + LOG_MSG("NE2000: Base=0x%x irq=%u",(unsigned int)base,(unsigned int)irq); + + // mac address + const char* macstring=section->Get_string("macaddr"); + unsigned int macint[6]; + uint8_t mac[6]; + if(sscanf(macstring,"%02x:%02x:%02x:%02x:%02x:%02x", + &macint[0],&macint[1],&macint[2],&macint[3],&macint[4],&macint[5]) != 6) { + mac[0]=0xac;mac[1]=0xde;mac[2]=0x48; + mac[3]=0x88;mac[4]=0xbb;mac[5]=0xaa; + } else { + mac[0]=macint[0]; mac[1]=macint[1]; + mac[2]=macint[2]; mac[3]=macint[3]; + mac[4]=macint[4]; mac[5]=macint[5]; + } + + // find out which pcap device to use + const char* realnicstring=section->Get_string("realnic"); + pcap_if_t *alldevs; + pcap_if_t *currentdev = NULL; + char errbuf[PCAP_ERRBUF_SIZE]; + unsigned int userdev; +#ifdef WIN32 + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) +#else + if (pcap_findalldevs(&alldevs, errbuf) == -1) +#endif + { + LOG_MSG("Cannot enumerate network interfaces: %s\n", errbuf); + load_success = false; + return; + } + if (!strcasecmp(realnicstring,"list")) { + // print list and quit + Bitu i = 0; + LOG_MSG("\nNetwork Interface List \n-----------------------------------"); + for(currentdev=alldevs; currentdev!=NULL; currentdev=currentdev->next) { + const char* desc = "no description"; + if(currentdev->description) desc=currentdev->description; + i++; + LOG_MSG("%2d. %s\n (%s)\n",(int)i,currentdev->name,desc); + } + pcap_freealldevs(alldevs); + load_success = false; + return; + } else if(1==sscanf(realnicstring,"%u",&userdev)) { + // user passed us a number + Bitu i = 0; + currentdev=alldevs; + while(currentdev!=NULL) { + i++; + if(i==userdev) break; + else currentdev=currentdev->next; + } + } else { + // user might have passed a piece of name + for(currentdev=alldevs; currentdev!=NULL; currentdev=currentdev->next) { + if(strstr(currentdev->name,realnicstring)) { + break; + }else if(currentdev->description!=NULL && + strstr(currentdev->description,realnicstring)) { + break; + } + } + } + + if(currentdev==NULL) { + LOG_MSG("Unable to find network interface - check realnic parameter\n"); + load_success = false; + pcap_freealldevs(alldevs); + return; + } + // print out which interface we are going to use + const char* desc = "no description"; + if(currentdev->description) desc=currentdev->description; + LOG_MSG("Using Network interface:\n%s\n(%s)\n",currentdev->name,desc); + + // attempt to open it +#ifdef WIN32 + if ( (adhandle= pcap_open( + currentdev->name, // name of the device + 65536, // portion of the packet to capture + // 65536 = whole packet + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + -1, // read timeout + NULL, // authentication on the remote machine + errbuf // error buffer + ) ) == NULL) +#else + /*pcap_t *pcap_open_live(const char *device, int snaplen, + int promisc, int to_ms, char *errbuf)*/ + if ( (adhandle= pcap_open_live( + currentdev->name, // name of the device + 65536, // portion of the packet to capture + // 65536 = whole packet + true, // promiscuous mode + -1, // read timeout + errbuf // error buffer + ) ) == NULL) + +#endif + { + LOG_MSG("\nUnable to open the interface: %s.", errbuf); + pcap_freealldevs(alldevs); + load_success = false; + return; + } + pcap_freealldevs(alldevs); +#ifndef WIN32 + pcap_setnonblock(adhandle,1,errbuf); +#endif + // create the bochs NIC class + theNE2kDevice = new bx_ne2k_c (); + memcpy(theNE2kDevice->s.physaddr, mac, 6); + + theNE2kDevice->s.base_address=(uint32_t)base; + theNE2kDevice->s.base_irq=(int)irq; + + theNE2kDevice->init(); + + // install I/O-handlers and timer + for(Bitu i = 0; i < 0x20; i++) { + ReadHandler8[i].Install((i+theNE2kDevice->s.base_address), + dosbox_read,IO_MB|IO_MW); + WriteHandler8[i].Install((i+theNE2kDevice->s.base_address), + dosbox_write,IO_MB|IO_MW); + } + TIMER_AddTickHandler(NE2000_Poller); + } + + ~NE2K() { + if(adhandle) pcap_close(adhandle); + adhandle=0; + if(theNE2kDevice != 0) delete theNE2kDevice; + theNE2kDevice=0; + TIMER_DelTickHandler(NE2000_Poller); + PIC_RemoveEvents(NE2000_TX_Event); + } +}; + +static NE2K* test; +void NE2K_ShutDown(Section* sec) { + (void)sec;//UNUSED + if(test) delete test; + test=0; +} + +void NE2K_Init(Section *sec) +{ + // LOG(LOG_MISC,LOG_DEBUG)("Initializing NE2000 network card emulation"); + + test = new NE2K(sec); + sec->AddDestroyFunction(&NE2K_ShutDown,true); + if(!test->load_success) { + delete test; + test=0; + } +} + +#endif // C_NE2000 diff -Nru dosbox-staging-0.76.0/src/hardware/opl.cpp dosbox-staging-0.77.0/src/hardware/opl.cpp --- dosbox-staging-0.76.0/src/hardware/opl.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/opl.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,7 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team - * OPL2/OPL3 emulation library + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * Copyright (C) 2002-2021 The DOSBox Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - -/* +/* OPL2/OPL3 emulation library + * * Originally based on ADLIBEMU.C, an AdLib/OPL2 emulation library by Ken Silverman * Copyright (C) 1998-2001 Ken Silverman * Ken Silverman's official web site: "http://www.advsys.net/ken" @@ -27,10 +28,8 @@ #include "opl.h" #include -#include // rand() -#include // memset() - -#include "dosbox.h" +#include +#include static fltype recipsamp; // inverse of sampling rate static Bit16s wavtable[WAVEPREC*3]; // wave form table @@ -925,7 +924,8 @@ #endif } -static void OPL_INLINE clipit16(Bit32s ival, Bit16s* outval) { +static INLINE void clipit16(int32_t ival, int16_t *outval) +{ if (ival<32768) { if (ival>-32769) { *outval=(Bit16s)ival; @@ -937,8 +937,6 @@ } } - - // be careful with this // uses cptr and chanval, outputs into outbufl(/outbufr) // for opl3 check if opl3-mode is enabled (which uses stereo panning) diff -Nru dosbox-staging-0.76.0/src/hardware/opl.h dosbox-staging-0.77.0/src/hardware/opl.h --- dosbox-staging-0.76.0/src/hardware/opl.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/opl.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,7 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team - * OPL2/OPL3 emulation library + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * Copyright (C) 2002-2021 The DOSBox Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,37 +18,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - -/* +/* OPL2/OPL3 emulation library + * * Originally based on ADLIBEMU.C, an AdLib/OPL2 emulation library by Ken Silverman * Copyright (C) 1998-2001 Ken Silverman * Ken Silverman's official web site: "http://www.advsys.net/ken" */ +#include "config.h" -#define fltype double - -/* - define Bits, Bitu, Bit32s, Bit32u, Bit16s, Bit16u, Bit8s, Bit8u here -*/ -/* -#include -typedef uintptr_t Bitu; -typedef intptr_t Bits; -typedef uint32_t Bit32u; -typedef int32_t Bit32s; -typedef uint16_t Bit16u; -typedef int16_t Bit16s; -typedef uint8_t Bit8u; -typedef int8_t Bit8s; -*/ +#include "types.h" -/* - define attribution that inlines/forces inlining of a function (optional) -*/ -#define OPL_INLINE INLINE - +#define fltype double #undef NUM_CHANNELS #if defined(OPLTYPE_IS_OPL3) diff -Nru dosbox-staging-0.76.0/src/hardware/pci_bus.cpp dosbox-staging-0.77.0/src/hardware/pci_bus.cpp --- dosbox-staging-0.76.0/src/hardware/pci_bus.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/pci_bus.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -251,7 +251,7 @@ #include "pci_devices.h" -class PCI:public Module_base{ +class PCI final : public Module_base{ private: bool initialized; diff -Nru dosbox-staging-0.76.0/src/hardware/pci_devices.h dosbox-staging-0.77.0/src/hardware/pci_devices.h --- dosbox-staging-0.76.0/src/hardware/pci_devices.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/pci_devices.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/pcspeaker.cpp dosbox-staging-0.77.0/src/hardware/pcspeaker.cpp --- dosbox-staging-0.76.0/src/hardware/pcspeaker.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/pcspeaker.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -456,7 +459,7 @@ else spkr.chan->AddSamples_m16(len, buffer); } -class PCSPEAKER:public Module_base { +class PCSPEAKER final : public Module_base { private: MixerObject MixerChan = {}; public: @@ -486,10 +489,7 @@ spkr.chan->SetPeakAmplitude( static_cast(AMPLITUDE_POSITIVE)); } - ~PCSPEAKER(){ - Section_prop * section=static_cast(m_configuration); - if(!section->Get_bool("pcspeaker")) return; - } + PCSPEAKER(const PCSPEAKER&) = delete; // prevent copying PCSPEAKER& operator= (const PCSPEAKER&) = delete; // prevent assignment }; diff -Nru dosbox-staging-0.76.0/src/hardware/pic.cpp dosbox-staging-0.77.0/src/hardware/pic.cpp --- dosbox-staging-0.76.0/src/hardware/pic.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/pic.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,14 +46,14 @@ void set_imr(Bit8u val); - void check_after_EOI(){ + void check_after_EOI() { //Update the active_irq as an EOI is likely to change that. update_active_irq(); - if((irr&imrr)&isrr) check_for_irq(); + if ((irr&imrr)&isrr) check_for_irq(); } void update_active_irq() { - if(isr == 0) {active_irq = 8; return;} + if (isr == 0) {active_irq = 8; return;} for(Bit8u i = 0, s = 1; i < 8;i++, s<<=1){ if( isr & s){ active_irq = i; @@ -62,7 +62,7 @@ } } - void check_for_irq(){ + void check_for_irq() { const Bit8u possible_irq = (irr&imrr)&isrr; if (possible_irq) { const Bit8u a_irq = special?8:active_irq; @@ -83,24 +83,24 @@ //Removes signal to master/cpu that there is an irq ready. void deactivate(); - void raise_irq(Bit8u val){ + void raise_irq(Bit8u val) { Bit8u bit = 1 << (val); - if((irr & bit)==0) { //value changed (as it is currently not active) - irr|=bit; - if((bit&imrr)&isrr) { //not masked and not in service - if(special || val < active_irq) activate(); + if ((irr & bit) == 0) { //value changed (as it is currently not active) + irr |= bit; + if ((bit&imrr)&isrr) { //not masked and not in service + if (special || val < active_irq) activate(); } } } - void lower_irq(Bit8u val){ + void lower_irq(Bit8u val) { Bit8u bit = 1 << ( val); - if(irr & bit) { //value will change (as it is currently active) - irr&=~bit; - if((bit&imrr)&isrr) { //not masked and not in service + if (irr & bit) { //value will change (as it is currently active) + irr &= ~bit; + if ((bit&imrr)&isrr) { //not masked and not in service //This irq might have toggled PIC_IRQCheck/caused irq 2 on master, when it was raised. //If it is active, then recheck it, we can't just deactivate as there might be more IRQS raised. - if(special || val < active_irq) check_for_irq(); + if (special || val < active_irq) check_for_irq(); } } } @@ -117,7 +117,7 @@ void PIC_Controller::set_imr(Bit8u val) { - if (GCC_UNLIKELY(machine==MCH_PCJR)) { + if (GCC_UNLIKELY(machine == MCH_PCJR)) { //irq 6 is a NMI on the PCJR if (this == &master) val &= ~(1 <<(6)); } @@ -127,12 +127,12 @@ //Test if changed bits are set in irr and are not being served at the moment //Those bits have impact on whether the cpu emulation should be paused or not. - if((irr & change)&isrr) check_for_irq(); + if ((irr & change)&isrr) check_for_irq(); } -void PIC_Controller::activate() { +void PIC_Controller::activate() { //Stops CPU if master, signals master if slave - if(this == &master) { + if (this == &master) { PIC_IRQCheck = 1; //cycles 0, take care of the port IO stuff added in raise_irq base caller. CPU_CycleLeft += CPU_Cycles; @@ -143,17 +143,17 @@ } } -void PIC_Controller::deactivate() { +void PIC_Controller::deactivate() { //removes irq check value if master, signals master if slave - if(this == &master) { + if (this == &master) { PIC_IRQCheck = 0; } else { master.lower_irq(2); } } -void PIC_Controller::start_irq(Bit8u val){ - irr&=~(1<<(val)); +void PIC_Controller::start_irq(Bit8u val) { + irr &= ~(1<<(val)); if (!auto_eoi) { active_irq = val; isr |= 1<<(val); @@ -177,8 +177,8 @@ PICEntry * next_entry; } pic_queue; -static void write_command(Bitu port,Bitu val,Bitu iolen) { - PIC_Controller * pic=&pics[port==0x20 ? 0 : 1]; +static void write_command(Bitu port,Bitu val,Bitu /*iolen*/) { + PIC_Controller * pic = &pics[port==0x20 ? 0 : 1]; if (GCC_UNLIKELY(val&0x10)) { // ICW1 issued if (val&0x04) E_Exit("PIC: 4 byte interval not handled"); @@ -230,8 +230,8 @@ } // end OCW2 } -static void write_data(Bitu port,Bitu val,Bitu iolen) { - PIC_Controller * pic=&pics[port==0x21 ? 0 : 1]; +static void write_data(Bitu port,Bitu val,Bitu /*iolen*/) { + PIC_Controller * pic = &pics[port==0x21 ? 0 : 1]; switch(pic->icw_index) { case 0: /* mask register */ pic->set_imr(val); @@ -255,10 +255,10 @@ /* 0 1 8086/8080 0 mcs-8085 mode 1 1 Auto EOI 0 Normal EOI - 2-3 0x Non buffer Mode - 10 Buffer Mode Slave - 11 Buffer mode Master - 4 Special/Not Special nested mode + 2-3 0x Non buffer Mode + 10 Buffer Mode Slave + 11 Buffer mode Master + 4 Special/Not Special nested mode */ pic->auto_eoi=(val & 0x2)>0; @@ -268,8 +268,7 @@ if ((val & 0x01) == 0) E_Exit("PIC:ICW4: %#" PRIxPTR ", 8085 mode not handled", val); if ((val & 0x10) != 0) - LOG_MSG("PIC:ICW4: %#" PRIxPTR - ", special fully-nested mode not handled", + LOG_MSG("PIC:ICW4: %#" PRIxPTR ", special fully-nested mode not handled", val); if(pic->icw_index++ >= pic->icw_words) pic->icw_index=0; @@ -279,18 +278,18 @@ } -static Bitu read_command(Bitu port,Bitu iolen) { - PIC_Controller * pic=&pics[port==0x20 ? 0 : 1]; - if (pic->request_issr){ +static Bitu read_command(Bitu port,Bitu /*iolen*/) { + PIC_Controller * pic = &pics[port==0x20 ? 0 : 1]; + if (pic->request_issr) { return pic->isr; - } else { + } else { return pic->irr; } } -static Bitu read_data(Bitu port,Bitu iolen) { - PIC_Controller * pic=&pics[port==0x21 ? 0 : 1]; +static Bitu read_data(Bitu port,Bitu /*iolen*/) { + PIC_Controller * pic = &pics[port==0x21 ? 0 : 1]; return pic->imr; } @@ -324,7 +323,7 @@ pic->lower_irq(t); } -static void slave_startIRQ(){ +static void slave_startIRQ() { Bit8u pic1_irq = 8; const Bit8u p = (slave.irr & slave.imrr)&slave.isrr; const Bit8u max = slave.special?8:slave.active_irq; @@ -342,7 +341,7 @@ CPU_HW_Interrupt(slave.vector_base + pic1_irq); } -static void inline master_startIRQ(Bitu i){ +static void inline master_startIRQ(Bitu i) { master.start_irq(i); CPU_HW_Interrupt(master.vector_base + i); } @@ -449,7 +448,7 @@ } prev_entry=entry; entry=entry->next; - } + } } void PIC_RemoveEvents(PIC_EventHandler handler) { @@ -474,7 +473,7 @@ } prev_entry=entry; entry=entry->next; - } + } } @@ -512,7 +511,7 @@ } } else CPU_Cycles=CPU_CycleLeft; CPU_CycleLeft-=CPU_Cycles; - if (PIC_IRQCheck) PIC_runIRQs(); + if (PIC_IRQCheck) PIC_runIRQs(); return true; } @@ -567,7 +566,7 @@ } /* Use full name to avoid name clash with compile option for position-independent code */ -class PIC_8259A: public Module_base { +class PIC_8259A final : public Module_base { private: IO_ReadHandleObject ReadHandler[4]; IO_WriteHandleObject WriteHandler[4]; @@ -624,7 +623,7 @@ static PIC_8259A* test; -void PIC_Destroy(Section* sec){ +void PIC_Destroy(Section* /*sec*/){ delete test; } diff -Nru dosbox-staging-0.76.0/src/hardware/ps1audio.cpp dosbox-staging-0.77.0/src/hardware/ps1audio.cpp --- dosbox-staging-0.76.0/src/hardware/ps1audio.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/ps1audio.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,454 @@ +/* + * Copyright (C) 2021-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "dosbox.h" + +#include +#include +#include +#include + +#include "control.h" +#include "dma.h" +#include "inout.h" +#include "mem.h" +#include "mixer.h" +#include "pic.h" +#include "setup.h" + +#include "mame/emu.h" +#include "mame/sn76496.h" + +using namespace std::placeholders; +using mixer_channel_t = std::unique_ptr; + +struct Ps1Registers { + uint8_t status = 0; // Read via port 0x202 control status + uint8_t command = 0; // Written via port 0x202 for control, read via 0x200 for DAC + uint8_t divisor = 0; // Read via port 0x203 for FIFO timing + uint8_t fifo_level = 0; // Written via port 0x204 when FIFO is almost empty +}; + +class Ps1Dac { +public: + Ps1Dac(); + ~Ps1Dac(); + +private: + uint8_t CalcStatus() const; + void Reset(bool should_clear_adder); + void Update(uint16_t samples); + uint8_t ReadPresencePort02F(uint16_t port, size_t iolen); + uint8_t ReadCmdResultPort200(uint16_t port, size_t iolen); + uint8_t ReadStatusPort202(uint16_t port, size_t iolen); + uint8_t ReadTimingPort203(uint16_t port, size_t iolen); + uint8_t ReadJoystickPorts204To207(uint16_t port, size_t iolen); + + void WriteDataPort200(uint16_t port, uint8_t data, size_t iolen); + void WriteControlPort202(uint16_t port, uint8_t data, size_t iolen); + void WriteTimingPort203(uint16_t port, uint8_t data, size_t iolen); + void WriteFifoLevelPort204(uint16_t port, uint8_t data, size_t iolen); + + // Constants + static constexpr auto clock_rate_hz = 1000000; + static constexpr auto fifo_size = 2048; + static constexpr auto fifo_size_mask = fifo_size - 1; + static constexpr auto fifo_nearly_empty_val = 128; + static constexpr auto frac_shift = 12; // Fixed precision + static constexpr auto fifo_status_ready_flag = 0x10; + static constexpr auto fifo_full_flag = 0x08; + static constexpr auto fifo_empty_flag = 0x04; + static constexpr auto fifo_nearly_empty_flag = 0x02; // >= 1792 bytes free + static constexpr auto fifo_irq_flag = 0x01; // IRQ triggered by DAC + static constexpr auto fifo_midline = ceil_udivide(static_cast(UINT8_MAX), 2u); + static constexpr auto irq_number = 7; + static constexpr auto bytes_pending_limit = fifo_size << frac_shift; + + // Managed objects + mixer_channel_t channel{nullptr, MIXER_DelChannel}; + IO_ReadHandleObject read_handlers[5] = {}; + IO_WriteHandleObject write_handlers[4] = {}; + Ps1Registers regs = {}; + uint8_t fifo[fifo_size] = {}; + + // Counters + size_t last_write = 0; + uint32_t adder = 0; + uint32_t bytes_pending = 0; + uint32_t read_index_high = 0; + uint32_t sample_rate = 0; + uint16_t read_index = 0; + uint16_t write_index = 0; + int8_t signal_bias = 0; + + // States + bool is_new_transfer = true; + bool is_playing = false; + bool can_trigger_irq = false; +}; + +static void keep_alive_channel(size_t &last_used_on, mixer_channel_t &channel) +{ + last_used_on = PIC_Ticks; + if (!channel->is_enabled) + channel->Enable(true); +} + +static void maybe_suspend_channel(const size_t last_used_on, mixer_channel_t &channel) +{ + const bool last_used_five_seconds_ago = PIC_Ticks > last_used_on + 5000; + if (last_used_five_seconds_ago) + channel->Enable(false); +} + +Ps1Dac::Ps1Dac() +{ + const auto callback = std::bind(&Ps1Dac::Update, this, _1); + channel = mixer_channel_t(MIXER_AddChannel(callback, 0, "PS1DAC"), + MIXER_DelChannel); + assert(channel); + + // Register DAC per-port read handlers + read_handlers[0].Install(0x02F, + std::bind(&Ps1Dac::ReadPresencePort02F, this, _1, _2), + IO_MB); + read_handlers[1].Install(0x200, + std::bind(&Ps1Dac::ReadCmdResultPort200, this, _1, _2), + IO_MB); + read_handlers[2].Install(0x202, + std::bind(&Ps1Dac::ReadStatusPort202, this, _1, _2), + IO_MB); + read_handlers[3].Install(0x203, + std::bind(&Ps1Dac::ReadTimingPort203, this, _1, _2), + IO_MB); + read_handlers[4].Install(0x204, // to 0x207 + std::bind(&Ps1Dac::ReadJoystickPorts204To207, this, _1, _2), + IO_MB, 3); + + // Register DAC per-port write handlers + write_handlers[0].Install(0x200, + std::bind(&Ps1Dac::WriteDataPort200, this, _1, _2, _3), + IO_MB); + write_handlers[1].Install(0x202, + std::bind(&Ps1Dac::WriteControlPort202, this, _1, _2, _3), + IO_MB); + write_handlers[2].Install(0x203, + std::bind(&Ps1Dac::WriteTimingPort203, this, _1, _2, _3), + IO_MB); + write_handlers[3].Install(0x204, + std::bind(&Ps1Dac::WriteFifoLevelPort204, this, _1, _2, _3), + IO_MB); + + // Operate at native sampling rates + sample_rate = channel->GetSampleRate(); + last_write = 0; + Reset(true); +} + +uint8_t Ps1Dac::CalcStatus() const +{ + uint8_t status = regs.status & fifo_irq_flag; + if (!bytes_pending) + status |= fifo_empty_flag; + + if (bytes_pending < (fifo_nearly_empty_val << frac_shift) && + (regs.command & 3) == 3) + status |= fifo_nearly_empty_flag; + + if (bytes_pending > ((fifo_size - 1) << frac_shift)) + status |= fifo_full_flag; + + return status; +} + +void Ps1Dac::Reset(bool should_clear_adder) +{ + PIC_DeActivateIRQ(irq_number); + memset(fifo, fifo_midline, fifo_size); + read_index = 0; + write_index = 0; + read_index_high = 0; + + // Be careful with this, 5 second timeout and Space Quest 4 + if (should_clear_adder) + adder = 0; + + bytes_pending = 0; + regs.status = CalcStatus(); + can_trigger_irq = false; + is_playing = true; + is_new_transfer = true; +} + +void Ps1Dac::WriteDataPort200(MAYBE_UNUSED uint16_t port, uint8_t data, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + if (is_new_transfer) { + is_new_transfer = false; + if (data) { + signal_bias = static_cast(data - fifo_midline); + } + } + regs.status = CalcStatus(); + if (!(regs.status & fifo_full_flag)) { + const auto corrected_data = data - signal_bias; + fifo[write_index++] = static_cast(corrected_data); + write_index &= fifo_size_mask; + bytes_pending += (1 << frac_shift); + + if (bytes_pending > bytes_pending_limit) { + bytes_pending = bytes_pending_limit; + } + } +} + +void Ps1Dac::WriteControlPort202(MAYBE_UNUSED uint16_t port, uint8_t data, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + regs.command = data; + if (data & 3) + can_trigger_irq = true; +} + +void Ps1Dac::WriteTimingPort203(MAYBE_UNUSED uint16_t port, uint8_t data, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + // Clock divisor (maybe trigger first IRQ here). + regs.divisor = data; + + if (data < 45) // common in Infocom games + data = 125; // fallback to a default 8 KHz data rate + const auto data_rate_hz = static_cast(clock_rate_hz / data); + adder = (data_rate_hz << frac_shift) / sample_rate; + + regs.status = CalcStatus(); + if ((regs.status & fifo_nearly_empty_flag) && (can_trigger_irq)) { + // Generate request for stuff. + regs.status |= fifo_irq_flag; + can_trigger_irq = false; + PIC_ActivateIRQ(irq_number); + } +} + +void Ps1Dac::WriteFifoLevelPort204(MAYBE_UNUSED uint16_t port, uint8_t data, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + regs.fifo_level = data; + if (!data) + Reset(true); + // When the Microphone is used (PS1MIC01), it writes 0x08 to this during + // playback presumably beacuse the card is constantly filling the + // analog-to-digital buffer. +} + +uint8_t Ps1Dac::ReadPresencePort02F(MAYBE_UNUSED uint16_t port, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + return 0xff; +} + +uint8_t Ps1Dac::ReadCmdResultPort200(MAYBE_UNUSED uint16_t port, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + regs.status &= ~fifo_status_ready_flag; + return regs.command; +} + +uint8_t Ps1Dac::ReadStatusPort202(MAYBE_UNUSED uint16_t port, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + regs.status = CalcStatus(); + return regs.status; +} + +// Used by Stunt Island and Roger Rabbit 2 during setup. +uint8_t Ps1Dac::ReadTimingPort203(MAYBE_UNUSED uint16_t port, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + return regs.divisor; +} + +// Used by Bush Buck as an alternate detection method. +uint8_t Ps1Dac::ReadJoystickPorts204To207(MAYBE_UNUSED uint16_t port, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + return 0; +} + +void Ps1Dac::Update(uint16_t samples) +{ + uint8_t *buffer = MixTemp; + + int32_t pending = 0; + uint32_t add = 0; + uint32_t pos = read_index_high; + uint16_t count = samples; + + if (is_playing) { + regs.status = CalcStatus(); + pending = static_cast(bytes_pending); + add = adder; + if ((regs.status & fifo_nearly_empty_flag) && (can_trigger_irq)) { + // More bytes needed. + regs.status |= fifo_irq_flag; + can_trigger_irq = false; + PIC_ActivateIRQ(irq_number); + } + } + + while (count) { + uint8_t out = 0; + if (pending <= 0) { + pending = 0; + while (count--) { + *(buffer++) = fifo_midline; + } + break; + } else { + out = fifo[pos >> frac_shift]; + pos += add; + pos &= (fifo_size << frac_shift) - 1; + pending -= static_cast(add); + } + *(buffer++) = out; + count--; + } + // Update positions and see if we can clear the fifo_full_flag + read_index_high = pos; + read_index = static_cast(pos >> frac_shift); + if (pending < 0) + pending = 0; + bytes_pending = static_cast(pending); + + channel->AddSamples_m8(samples, MixTemp); + maybe_suspend_channel(last_write, channel); +} + +Ps1Dac::~Ps1Dac() +{ + // Stop the game from accessing the IO ports + for (auto &handler : read_handlers) + handler.Uninstall(); + for (auto &handler : write_handlers) + handler.Uninstall(); + + // Stop and remove the mixer callback + if (channel) { + channel->Enable(false); + channel.reset(); + } +} + +class Ps1Synth { +public: + Ps1Synth(); + ~Ps1Synth(); + +private: + void Update(uint16_t samples); + void WriteSoundGeneratorPort205(uint16_t port, uint8_t data, size_t iolen); + + mixer_channel_t channel{nullptr, MIXER_DelChannel}; + IO_WriteHandleObject write_handler = {}; + static constexpr auto clock_rate_hz = 4000000; + sn76496_device device; + static constexpr auto max_samples_expected = 64; + int16_t buffer[1][max_samples_expected]; + size_t last_write = 0; +}; + +Ps1Synth::Ps1Synth() : device(machine_config(), 0, 0, clock_rate_hz) +{ + const auto callback = std::bind(&Ps1Synth::Update, this, _1); + channel = mixer_channel_t(MIXER_AddChannel(callback, 0, "PS1"), + MIXER_DelChannel); + assert(channel); + + const auto generate_sound = std::bind(&Ps1Synth::WriteSoundGeneratorPort205, this, _1, _2, _3); + write_handler.Install(0x205, generate_sound, IO_MB); + static_cast(device).device_start(); + + auto sample_rate = static_cast(channel->GetSampleRate()); + device.convert_samplerate(sample_rate); + last_write = 0; +} + +void Ps1Synth::WriteSoundGeneratorPort205(MAYBE_UNUSED uint16_t port, uint8_t data, MAYBE_UNUSED size_t iolen) +{ + keep_alive_channel(last_write, channel); + device.write(data); +} + +void Ps1Synth::Update(uint16_t samples) +{ + assert(samples <= max_samples_expected); + + // sound_stream_update's API requires an array of two pointers that + // point to either the mono array head or left and right heads. In this + // case, we're using a mono array but we still want to comply with the + // API, so we give it a valid two-element pointer array. + int16_t *buffer_head[] = {buffer[0], buffer[0]}; + + device_sound_interface::sound_stream ss; + static_cast(device).sound_stream_update( + ss, nullptr, buffer_head, samples); + channel->AddSamples_m16(samples, buffer[0]); + maybe_suspend_channel(last_write, channel); +} + +Ps1Synth::~Ps1Synth() +{ + // Stop the game from accessing the IO ports + write_handler.Uninstall(); + + if (channel) { + channel->Enable(false); + channel.reset(); + } +} + +static std::unique_ptr ps1_dac = {}; +static std::unique_ptr ps1_synth = {}; + +static void PS1AUDIO_ShutDown(MAYBE_UNUSED Section *sec) +{ + LOG_MSG("PS/1: Shutting down IBM PS/1 Audio card"); + ps1_dac.reset(); + ps1_synth.reset(); +} + +bool PS1AUDIO_IsEnabled() +{ + const auto section = control->GetSection("speaker"); + assert(section); + const auto properties = static_cast(section); + return properties->Get_bool("ps1audio"); +} + +void PS1AUDIO_Init(MAYBE_UNUSED Section *sec) +{ + if (!PS1AUDIO_IsEnabled()) + return; + + ps1_dac = std::make_unique(); + ps1_synth = std::make_unique(); + + LOG_MSG("PS/1: Initialized IBM PS/1 Audio card"); + sec->AddDestroyFunction(&PS1AUDIO_ShutDown, true); +} diff -Nru dosbox-staging-0.76.0/src/hardware/sblaster.cpp dosbox-staging-0.77.0/src/hardware/sblaster.cpp --- dosbox-staging-0.76.0/src/hardware/sblaster.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/sblaster.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,17 +16,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "hardware.h" + #include #include #include #include #include -#include "dosbox.h" + #include "inout.h" #include "mixer.h" #include "dma.h" #include "pic.h" -#include "hardware.h" #include "setup.h" #include "support.h" #include "shell.h" @@ -102,7 +103,7 @@ Bit32u singlesize; //size for single cycle transfers Bit32u autosize; //size for auto init transfers Bitu left; //Left in active cycle - Bitu min; + Bitu min; Bit64u start; union { Bit8u b8[DMA_BUFSIZE]; @@ -391,7 +392,7 @@ Bits samp = sample + scale; - if ((samp < 0) || (samp > 63)) { + if ((samp < 0) || (samp > 63)) { LOG(LOG_SB,LOG_ERROR)("Bad ADPCM-4 sample"); if(samp < 0 ) samp = 0; if(samp > 63) samp = 63; @@ -402,7 +403,7 @@ else if (ref < 0x00) reference = 0x00; else reference = (Bit8u)(ref&0xff); scale = (scale + adjustMap[samp]) & 0xff; - + return reference; } @@ -436,7 +437,7 @@ } INLINE Bit8u decode_ADPCM_3_sample(Bit8u sample,Bit8u & reference,Bits& scale) { - static const Bit8s scaleMap[40] = { + static const Bit8s scaleMap[40] = { 0, 1, 2, 3, 0, -1, -2, -3, 1, 3, 5, 7, -1, -3, -5, -7, 2, 6, 10, 14, -2, -6, -10, -14, @@ -474,10 +475,10 @@ //Determine how much you should read if(sb.dma.autoinit) { - if (sb.dma.left <= size) + if (sb.dma.left <= size) size = sb.dma.left; } else { - if (sb.dma.left <= sb.dma.min) + if (sb.dma.left <= sb.dma.min) size = sb.dma.left; } @@ -533,7 +534,7 @@ read=sb.dma.chan->Read(size,&sb.dma.buf.b8[sb.dma.remain_size]); Bitu total=read+sb.dma.remain_size; if (!sb.dma.sign) sb.chan->AddSamples_s8(total>>1,sb.dma.buf.b8); - else sb.chan->AddSamples_s8s(total>>1,(Bit8s*)sb.dma.buf.b8); + else sb.chan->AddSamples_s8s(total>>1,(Bit8s*)sb.dma.buf.b8); if (total&1) { sb.dma.remain_size=1; sb.dma.buf.b8[0]=sb.dma.buf.b8[total-1]; @@ -550,7 +551,7 @@ /* In DSP_DMA_16_ALIASED mode temporarily divide by 2 to get number of 16-bit samples, because 8-bit DMA Read returns byte size, while in DSP_DMA_16 mode 16-bit DMA Read returns word size */ - read=sb.dma.chan->Read(size,(Bit8u *)&sb.dma.buf.b16[sb.dma.remain_size]) + read=sb.dma.chan->Read(size,(Bit8u *)&sb.dma.buf.b16[sb.dma.remain_size]) >> (sb.dma.mode==DSP_DMA_16_ALIASED ? 1:0); Bitu total=read+sb.dma.remain_size; #if defined(WORDS_BIGENDIAN) @@ -565,7 +566,7 @@ sb.dma.buf.b16[0]=sb.dma.buf.b16[total-1]; } else sb.dma.remain_size=0; } else { - read=sb.dma.chan->Read(size,(Bit8u *)sb.dma.buf.b16) + read=sb.dma.chan->Read(size,(Bit8u *)sb.dma.buf.b16) >> (sb.dma.mode==DSP_DMA_16_ALIASED ? 1:0); #if defined(WORDS_BIGENDIAN) if (sb.dma.sign) sb.chan->AddSamples_m16_nonnative(read,sb.dma.buf.b16); @@ -589,7 +590,7 @@ PIC_RemoveEvents(ProcessDMATransfer); if (sb.dma.mode >= DSP_DMA_16) SB_RaiseIRQ(SB_IRQ_16); - else + else SB_RaiseIRQ(SB_IRQ_8); if (!sb.dma.autoinit) { @@ -730,7 +731,7 @@ sb.dma.mode = mode; sb.dma.stereo = stereo; //Double the reading speed for stereo mode - if (sb.dma.stereo) + if (sb.dma.stereo) sb.dma.mul*=2; sb.dma.rate=(sb.freq*sb.dma.mul) >> SB_SH; sb.dma.min=(sb.dma.rate*3)/1000; @@ -751,7 +752,7 @@ static void DSP_PrepareDMA_Old(DMA_MODES mode,bool autoinit,bool sign) { sb.dma.sign=sign; - if (!autoinit) + if (!autoinit) sb.dma.singlesize=1+sb.dsp.in.data[0]+(sb.dsp.in.data[1] << 8); sb.dma.chan=GetDMAChannel(sb.hw.dma8); DSP_DoDMATransfer(mode,sb.freq / (sb.mixer.stereo ? 2 : 1), autoinit, sb.mixer.stereo); @@ -892,7 +893,7 @@ Bitu DEBUG_EnableDebugger(void); #define DSP_SB16_ONLY if (sb.type != SBT_16) { LOG(LOG_SB,LOG_ERROR)("DSP:Command %2X requires SB16",sb.dsp.cmd); break; } -#define DSP_SB2_ABOVE if (sb.type <= SBT_1) { LOG(LOG_SB,LOG_ERROR)("DSP:Command %2X requires SB2 or above",sb.dsp.cmd); break; } +#define DSP_SB2_ABOVE if (sb.type <= SBT_1) { LOG(LOG_SB,LOG_ERROR)("DSP:Command %2X requires SB2 or above",sb.dsp.cmd); break; } static void DSP_DoCommand(void) { // LOG_MSG("DSP Command %X",sb.dsp.cmd); @@ -990,26 +991,26 @@ sb.dma.autosize=1+sb.dsp.in.data[0]+(sb.dsp.in.data[1] << 8); break; case 0x75: /* 075h : Single Cycle 4-bit ADPCM Reference */ - sb.adpcm.haveref=true; + sb.adpcm.haveref = true; FALLTHROUGH; - case 0x74: /* 074h : Single Cycle 4-bit ADPCM */ + case 0x74: /* 074h : Single Cycle 4-bit ADPCM */ DSP_PrepareDMA_Old(DSP_DMA_4,false,false); break; case 0x77: /* 077h : Single Cycle 3-bit(2.6bit) ADPCM Reference*/ - sb.adpcm.haveref=true; + sb.adpcm.haveref = true; FALLTHROUGH; - case 0x76: /* 074h : Single Cycle 3-bit(2.6bit) ADPCM */ + case 0x76: /* 076h : Single Cycle 3-bit(2.6bit) ADPCM */ DSP_PrepareDMA_Old(DSP_DMA_3,false,false); break; case 0x7d: /* Auto Init 4-bit ADPCM Reference */ DSP_SB2_ABOVE; - sb.adpcm.haveref=true; + sb.adpcm.haveref = true; DSP_PrepareDMA_Old(DSP_DMA_4,true,false); break; case 0x17: /* 017h : Single Cycle 2-bit ADPCM Reference*/ - sb.adpcm.haveref=true; + sb.adpcm.haveref = true; FALLTHROUGH; - case 0x16: /* 074h : Single Cycle 2-bit ADPCM */ + case 0x16: /* 016h : Single Cycle 2-bit ADPCM */ DSP_PrepareDMA_Old(DSP_DMA_2,false,false); break; case 0x80: /* Silence DAC */ @@ -1120,11 +1121,11 @@ break; case 0xf2: /* Trigger 8bit IRQ */ //Small delay in order to emulate the slowness of the DSP, fixes Llamatron 2012 and Lemmings 3D - PIC_AddEvent(&DSP_RaiseIRQEvent,0.01f); + PIC_AddEvent(&DSP_RaiseIRQEvent,0.01f); LOG(LOG_SB, LOG_NORMAL)("Trigger 8bit IRQ command"); break; case 0xf3: /* Trigger 16bit IRQ */ - DSP_SB16_ONLY; + DSP_SB16_ONLY; SB_RaiseIRQ(SB_IRQ_16); LOG(LOG_SB, LOG_NORMAL)("Trigger 16bit IRQ command"); break; @@ -1644,7 +1645,7 @@ } } -class SBLASTER: public Module_base { +class SBLASTER final : public Module_base { private: /* Data */ IO_ReadHandleObject ReadHandler[0x10]; @@ -1668,10 +1669,10 @@ if (type==SBT_16) { if ((!IS_EGAVGA_ARCH) || !SecondDMAControllerAvailable()) type=SBT_PRO2; } - + /* OPL/CMS Init */ const char * omode=config->Get_string("oplmode"); - if (!strcasecmp(omode,"none")) opl_mode=OPL_none; + if (!strcasecmp(omode,"none")) opl_mode=OPL_none; else if (!strcasecmp(omode,"cms")) opl_mode=OPL_cms; else if (!strcasecmp(omode,"opl2")) opl_mode=OPL_opl2; else if (!strcasecmp(omode,"dualopl2")) opl_mode=OPL_dualopl2; @@ -1698,7 +1699,7 @@ opl_mode=OPL_opl3; break; } - } + } } public: @@ -1724,7 +1725,7 @@ sb.mixer.stereo=false; Find_Type_And_Opl(section,sb.type,oplmode); - + switch (oplmode) { case OPL_none: WriteHandler[0].Install(0x388,adlib_gusforward,IO_MB); @@ -1752,7 +1753,7 @@ for (i=4;i<=0xf;i++) { if (i==8 || i==9) continue; //Disable mixer ports for lower soundblaster - if ((sb.type==SBT_1 || sb.type==SBT_2) && (i==4 || i==5)) continue; + if ((sb.type==SBT_1 || sb.type==SBT_2) && (i==4 || i==5)) continue; ReadHandler[i].Install(sb.hw.base+i,read_sb,IO_MB); WriteHandler[i].Install(sb.hw.base+i,write_sb,IO_MB); } @@ -1795,14 +1796,14 @@ break; } if (sb.type==SBT_NONE || sb.type==SBT_GB) return; - DSP_Reset(); // Stop everything - } + DSP_Reset(); // Stop everything + } }; //End of SBLASTER class static SBLASTER* test; void SBLASTER_ShutDown(Section* /*sec*/) { - delete test; + delete test; } void SBLASTER_Init(Section* sec) { diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/directserial.cpp dosbox-staging-0.77.0/src/hardware/serialport/directserial.cpp --- dosbox-staging-0.76.0/src/hardware/serialport/directserial.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/directserial.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include "dosbox.h" #if C_DIRECTSERIAL @@ -320,4 +319,4 @@ SERIAL_setDTR(comport,val); } -#endif +#endif // C_DIRECTSERIAL diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/directserial.h dosbox-staging-0.77.0/src/hardware/serialport/directserial.h --- dosbox-staging-0.76.0/src/hardware/serialport/directserial.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/directserial.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// include guard #ifndef DOSBOX_DIRECTSERIAL_WIN32_H #define DOSBOX_DIRECTSERIAL_WIN32_H @@ -30,7 +28,7 @@ #include "libserial.h" -class CDirectSerial : public CSerial { +class CDirectSerial final : public CSerial { public: CDirectSerial(const CDirectSerial &) = delete; // prevent copying CDirectSerial &operator=(const CDirectSerial &) = delete; // prevent @@ -70,4 +68,5 @@ }; #endif // C_DIRECTSERIAL -#endif // include guard + +#endif diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/.gitignore dosbox-staging-0.77.0/src/hardware/serialport/.gitignore --- dosbox-staging-0.76.0/src/hardware/serialport/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/libserial.cpp dosbox-staging-0.77.0/src/hardware/serialport/libserial.cpp --- dosbox-staging-0.76.0/src/hardware/serialport/libserial.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/libserial.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include "libserial.h" #include "config.h" @@ -476,5 +475,5 @@ long flag = TIOCM_RTS; ioctl(port->porthandle, value?TIOCMBIS:TIOCMBIC, &flag); } -#endif +#endif diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/libserial.h dosbox-staging-0.77.0/src/hardware/serialport/libserial.h --- dosbox-staging-0.76.0/src/hardware/serialport/libserial.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/libserial.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/Makefile.am dosbox-staging-0.77.0/src/hardware/serialport/Makefile.am --- dosbox-staging-0.76.0/src/hardware/serialport/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libserial.a - -libserial_a_SOURCES = \ - directserial.cpp \ - directserial.h \ - libserial.cpp \ - libserial.h \ - misc_util.cpp \ - misc_util.h \ - nullmodem.cpp \ - nullmodem.h \ - serialdummy.cpp \ - serialdummy.h \ - serialport.cpp \ - softmodem.cpp \ - softmodem.h diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/misc_util.cpp dosbox-staging-0.77.0/src/hardware/serialport/misc_util.cpp --- dosbox-staging-0.76.0/src/hardware/serialport/misc_util.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/misc_util.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/misc_util.h dosbox-staging-0.77.0/src/hardware/serialport/misc_util.h --- dosbox-staging-0.76.0/src/hardware/serialport/misc_util.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/misc_util.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/nullmodem.cpp dosbox-staging-0.77.0/src/hardware/serialport/nullmodem.cpp --- dosbox-staging-0.76.0/src/hardware/serialport/nullmodem.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/nullmodem.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/nullmodem.h dosbox-staging-0.77.0/src/hardware/serialport/nullmodem.h --- dosbox-staging-0.76.0/src/hardware/serialport/nullmodem.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/nullmodem.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ #define SERIAL_NULLMODEM_DTR_EVENT SERIAL_BASE_EVENT_COUNT+3 #define SERIAL_NULLMODEM_EVENT_COUNT SERIAL_BASE_EVENT_COUNT+3 -class CNullModem : public CSerial { +class CNullModem final : public CSerial { public: CNullModem(const CNullModem &) = delete; // prevent copying CNullModem &operator=(const CNullModem &) = delete; // prevent assignment diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/serialdummy.cpp dosbox-staging-0.77.0/src/hardware/serialport/serialdummy.cpp --- dosbox-staging-0.76.0/src/hardware/serialport/serialdummy.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/serialdummy.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/serialdummy.h dosbox-staging-0.77.0/src/hardware/serialport/serialdummy.h --- dosbox-staging-0.76.0/src/hardware/serialport/serialdummy.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/serialdummy.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ //#define CHECKIT_TESTPLUG -class CSerialDummy : public CSerial { +class CSerialDummy final : public CSerial { public: CSerialDummy(const uint8_t port_idx, CommandLine *cmd); ~CSerialDummy(); diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/serialport.cpp dosbox-staging-0.77.0/src/hardware/serialport/serialport.cpp --- dosbox-staging-0.76.0/src/hardware/serialport/serialport.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/serialport.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -185,7 +185,7 @@ // copied from DEBUG_SHOWMSG char buf[512]; buf[0]=0; - sprintf(buf,"%12.3f [% 7u] ",PIC_FullIndex(), SDL_GetTicks()); + sprintf(buf, "%12.3f [% 7lld] ", PIC_FullIndex(), GetTicks()); va_list msg; va_start(msg,format); vsprintf(buf+strlen(buf),format,msg); @@ -1174,7 +1174,7 @@ overrunIF0=0; breakErrors=0; - for (uint32_t i = 0; i <= 7; i++) { + for (uint32_t i = 0; i < SERIAL_IO_HANDLERS; ++i) { WriteHandler[i].Install (i + base, SERIAL_Write, IO_MB); ReadHandler[i].Install(i + base, SERIAL_Read, IO_MB); } @@ -1193,84 +1193,96 @@ DOS_DelDevice(mydosdevice); for (uint16_t i = 0; i <= SERIAL_BASE_EVENT_COUNT; i++) removeEvent(i); + + // Free the fifos and devices + delete(errorfifo); + errorfifo = nullptr; + delete(rxfifo); + rxfifo = nullptr; + delete(txfifo); + txfifo = nullptr; + + // Uninstall the IO handlers + for (uint32_t i = 0; i < SERIAL_IO_HANDLERS; ++i) { + WriteHandler[i].Uninstall(); + ReadHandler[i].Uninstall(); + } +} + +static bool idle(const double start, const uint32_t timeout) +{ + CALLBACK_Idle(); + return PIC_FullIndex() - start > timeout; } bool CSerial::Getchar(uint8_t *data, uint8_t *lsr, bool wait_dsr, uint32_t timeout) { const double starttime = PIC_FullIndex(); - // wait for DSR on - if(wait_dsr) { - while (!(Read_MSR() & MSR_DSR_MASK) && - (starttime > PIC_FullIndex() - timeout)) - CALLBACK_Idle(); - if(!(starttime>PIC_FullIndex()-timeout)) { -#if SERIAL_DEBUG - log_ser(dbg_aux,"Getchar status timeout: MSR 0x%x",Read_MSR()); -#endif - return false; - } + bool timed_out = false; + + // Wait until we're ready to receive (or we've timed out) + const uint32_t ready_flag = (wait_dsr ? MSR_DSR_MASK : 0x0); + while ((Read_MSR() & ready_flag) != ready_flag && !timed_out) + timed_out = idle(starttime, timeout); + + // wait for a byte to arrive (or we've timed out) + *lsr = static_cast(Read_LSR()); + while (!(*lsr & LSR_RX_DATA_READY_MASK) && !timed_out) { + timed_out = idle(starttime, timeout); + *lsr = static_cast(Read_LSR()); } - // wait for a byte to arrive - while (!((*lsr = static_cast(Read_LSR())) & LSR_RX_DATA_READY_MASK) && - (starttime > PIC_FullIndex() - timeout)) - CALLBACK_Idle(); - if(!(starttime>PIC_FullIndex()-timeout)) { + if (timed_out) { #if SERIAL_DEBUG log_ser(dbg_aux,"Getchar data timeout: MSR 0x%x",Read_MSR()); #endif return false; } - *data = static_cast(Read_RHR()); + *data = static_cast(Read_RHR()); #if SERIAL_DEBUG log_ser(dbg_aux,"Getchar read 0x%x",*data); #endif return true; } +/* +Three criteria need to be met before we can send the next character to the +receiver: +- our transfer queue needs to be empty (Tx hold high) +- the receiver says it's ready (DSR high), provided DSR was enabled +- the receiver says we are clear to send (CTS high), provided CTS was enabled +*/ bool CSerial::Putchar(uint8_t data, bool wait_dsr, bool wait_cts, uint32_t timeout) { - const double starttime = PIC_FullIndex(); - // wait for it to become empty - while (!(Read_LSR() & LSR_TX_HOLDING_EMPTY_MASK)) { - CALLBACK_Idle(); - } - // wait for DSR+CTS on - if (wait_dsr || wait_cts) { - if (wait_dsr && wait_cts) { - constexpr auto dsr_cts_mask = MSR_DSR_MASK | MSR_CTS_MASK; - while (((Read_MSR() & dsr_cts_mask) != dsr_cts_mask) && - (starttime > PIC_FullIndex() - timeout)) { - CALLBACK_Idle(); - } - } else if (wait_dsr) { - while (!(Read_MSR() & MSR_DSR_MASK) && - (starttime > PIC_FullIndex() - timeout)) { - CALLBACK_Idle(); - } - } else if (wait_cts) { - while (!(Read_MSR() & MSR_CTS_MASK) && - (starttime > PIC_FullIndex() - timeout)) { - CALLBACK_Idle(); - } - } - if (!(starttime > PIC_FullIndex() - timeout)) { + const double start_time = PIC_FullIndex(); + bool timed_out = false; + + // Wait until our transfer queue is empty (or we've timed out) + while (!(Read_LSR() & LSR_TX_HOLDING_EMPTY_MASK) && !timed_out) + timed_out = idle(start_time, timeout); + + // Wait until the receiver is ready (or we've timed out) + const uint32_t ready_flags = (wait_dsr ? MSR_DSR_MASK : 0x0) | + (wait_cts ? MSR_CTS_MASK : 0x0); + while ((Read_MSR() & ready_flags) != ready_flags && !timed_out) + timed_out = idle(start_time, timeout); + + if (timed_out) { #if SERIAL_DEBUG - log_ser(dbg_aux, "Putchar timeout: MSR 0x%x", Read_MSR()); + log_ser(dbg_aux, "Putchar timeout: MSR 0x%x", Read_MSR()); #endif - return false; - } + return false; } - Write_THR(data); + Write_THR(data); #if SERIAL_DEBUG - log_ser(dbg_aux,"Putchar 0x%x",data); -#endif + log_ser(dbg_aux, "Putchar 0x%x", data); +#endif return true; } -class SERIALPORTS:public Module_base { +class SERIALPORTS final : public Module_base { public: SERIALPORTS (Section * configuration):Module_base (configuration) { uint16_t biosParameter[SERIAL_MAX_PORTS] = {0}; diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/softmodem.cpp dosbox-staging-0.77.0/src/hardware/serialport/softmodem.cpp --- dosbox-staging-0.76.0/src/hardware/serialport/softmodem.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/softmodem.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include "dosbox.h" #if C_MODEM + #include #include #include @@ -26,7 +27,7 @@ #include #include -#include "support.h" +#include "string_utils.h" #include "serialport.h" #include "softmodem.h" #include "misc_util.h" @@ -1048,4 +1049,4 @@ } */ -#endif +#endif // C_MODEM diff -Nru dosbox-staging-0.76.0/src/hardware/serialport/softmodem.h dosbox-staging-0.77.0/src/hardware/serialport/softmodem.h --- dosbox-staging-0.76.0/src/hardware/serialport/softmodem.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/serialport/softmodem.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,15 +16,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef DOSBOX_SERIALMODEM_H #define DOSBOX_SERIALMODEM_H +#include "dosbox.h" + +#if C_MODEM + #include #include -#include "dosbox.h" -#if C_MODEM #include "serialport.h" #include "misc_util.h" @@ -169,7 +170,7 @@ #define MREG_DTR_DELAY 25 -class CSerialModem : public CSerial { +class CSerialModem final : public CSerial { public: CSerialModem(const uint8_t port_idx, CommandLine *cmd); ~CSerialModem(); @@ -263,5 +264,7 @@ char str[256] = {0}; } dial; }; -#endif + +#endif // C_MODEM + #endif diff -Nru dosbox-staging-0.76.0/src/hardware/tandy_sound.cpp dosbox-staging-0.77.0/src/hardware/tandy_sound.cpp --- dosbox-staging-0.76.0/src/hardware/tandy_sound.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/tandy_sound.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -317,7 +317,7 @@ tandy.dac.chan->AddSamples_m8(requested, buf); } -class TANDYSOUND: public Module_base { +class TANDYSOUND final : public Module_base { private: IO_WriteHandleObject WriteHandler[4]; IO_ReadHandleObject ReadHandler[4]; diff -Nru dosbox-staging-0.76.0/src/hardware/timer.cpp dosbox-staging-0.77.0/src/hardware/timer.cpp --- dosbox-staging-0.76.0/src/hardware/timer.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/timer.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -412,7 +412,7 @@ return counter_output(2); } -class TIMER:public Module_base{ +class TIMER final : public Module_base{ private: IO_ReadHandleObject ReadHandler[4]; IO_WriteHandleObject WriteHandler[4]; diff -Nru dosbox-staging-0.76.0/src/hardware/vga_attr.cpp dosbox-staging-0.77.0/src/hardware/vga_attr.cpp --- dosbox-staging-0.76.0/src/hardware/vga_attr.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_attr.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -288,6 +288,8 @@ void VGA_SetupAttr(void) { if (IS_EGAVGA_ARCH) { IO_RegisterWriteHandler(0x3c0,write_p3c0,IO_MB); + if (machine==MCH_EGA) + IO_RegisterWriteHandler(0x3c1,write_p3c0,IO_MB); // alias on EGA if (IS_VGA_ARCH) { IO_RegisterReadHandler(0x3c0,read_p3c0,IO_MB); IO_RegisterReadHandler(0x3c1,read_p3c1,IO_MB); diff -Nru dosbox-staging-0.76.0/src/hardware/vga.cpp dosbox-staging-0.77.0/src/hardware/vga.cpp --- dosbox-staging-0.76.0/src/hardware/vga.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #include #include "pic.h" +#include "support.h" #include "video.h" VGA_Type vga; @@ -129,8 +130,7 @@ } } /* Program the s3 clock chip */ - constexpr size_t vga_s3_clk_len = sizeof(vga.s3.clk) / sizeof(*vga.s3.clk); - assert(which < vga_s3_clk_len); + assert(which < ARRAY_LEN(vga.s3.clk)); vga.s3.clk[which].m = best.m; vga.s3.clk[which].r = r; vga.s3.clk[which].n = best.n; diff -Nru dosbox-staging-0.76.0/src/hardware/vga_crtc.cpp dosbox-staging-0.77.0/src/hardware/vga_crtc.cpp --- dosbox-staging-0.76.0/src/hardware/vga_crtc.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_crtc.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,16 +35,16 @@ void vga_write_p3d5(Bitu port,Bitu val,Bitu iolen); Bitu DEBUG_EnableDebugger(void); -void vga_write_p3d4(Bitu port,Bitu val,Bitu iolen) { - crtc(index)=val; +void vga_write_p3d4(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { + crtc(index) = val; } -Bitu vga_read_p3d4(Bitu port,Bitu iolen) { +Bitu vga_read_p3d4(Bitu /*port*/,Bitu /*iolen*/) { return crtc(index); } -void vga_write_p3d5(Bitu port,Bitu val,Bitu iolen) { -// if (crtc(index)>0x18) LOG_MSG("VGA CRCT write %X to reg %X",val,crtc(index)); +void vga_write_p3d5(Bitu /*port*/,Bitu val,Bitu iolen) { +// if (crtc(index) > 0x18) LOG_MSG("VGA CRCT write %" sBitfs(X) " to reg %X",val,crtc(index)); switch(crtc(index)) { case 0x00: /* Horizontal Total Register */ if (crtc(read_only)) break; @@ -90,12 +90,12 @@ 5-6 Number of character clocks to delay start of display after Horizontal Retrace. 7 bit 5 of the End Horizontal Blanking count (See 3d4h index 3 bit 0-4) - */ + */ break; case 0x06: /* Vertical Total Register */ if (crtc(read_only)) break; if (val != crtc(vertical_total)) { - crtc(vertical_total)=val; + crtc(vertical_total)=val; VGA_StartResize(); } /* 0-7 Lower 8 bits of the Vertical Total. Bit 8 is found in 3d4h index 7 @@ -214,7 +214,7 @@ break; case 0x10: /* Vertical Retrace Start Register */ crtc(vertical_retrace_start)=val; - /* + /* 0-7 Lower 8 bits of Vertical Retrace Start. Vertical Retrace starts when the line counter reaches this value. Bit 8 is found in 3d4h index 7 bit 2. Bit 9 is found in 3d4h index 7 bit 7. @@ -222,7 +222,7 @@ break; case 0x11: /* Vertical Retrace End Register */ crtc(vertical_retrace_end)=val; - + if (IS_EGAVGA_ARCH && !(val & 0x10)) { vga.draw.vret_triggered=false; if (GCC_UNLIKELY(machine==MCH_EGA)) PIC_DeActivateIRQ(9); @@ -294,7 +294,7 @@ crtc(start_vertical_blanking)=val; VGA_StartResize(); } - /* + /* 0-7 Lower 8 bits of Vertical Blank Start. Vertical blanking starts when the line counter reaches this value. Bit 8 is found in 3d4h index 7 bit 3. @@ -367,7 +367,7 @@ } } -Bitu vga_read_p3d5(Bitu port,Bitu iolen) { +Bitu vga_read_p3d5(Bitu /*port*/,Bitu iolen) { // LOG_MSG("VGA CRCT read from reg %X",crtc(index)); switch(crtc(index)) { case 0x00: /* Horizontal Total Register */ @@ -383,7 +383,7 @@ case 0x05: /* End Horizontal Retrace Register */ return crtc(end_horizontal_retrace); case 0x06: /* Vertical Total Register */ - return crtc(vertical_total); + return crtc(vertical_total); case 0x07: /* Overflow Register */ return crtc(overflow); case 0x08: /* Preset Row Scan Register */ @@ -432,4 +432,3 @@ - diff -Nru dosbox-staging-0.76.0/src/hardware/vga_dac.cpp dosbox-staging-0.77.0/src/hardware/vga_dac.cpp --- dosbox-staging-0.76.0/src/hardware/vga_dac.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_dac.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,7 +66,7 @@ VGA_DAC_SendColor( index, maskIndex ); } -static void write_p3c6(Bitu port,Bitu val,Bitu iolen) { +static void write_p3c6(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { if ( vga.dac.pel_mask != val ) { LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:DCA:Pel Mask set to %X", val); vga.dac.pel_mask = val; @@ -76,35 +76,35 @@ } -static Bitu read_p3c6(Bitu port,Bitu iolen) { +static Bitu read_p3c6(Bitu /*port*/,Bitu /*iolen*/) { return vga.dac.pel_mask; } -static void write_p3c7(Bitu port,Bitu val,Bitu iolen) { +static void write_p3c7(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { vga.dac.read_index=val; vga.dac.pel_index=0; vga.dac.state=DAC_READ; vga.dac.write_index= val + 1; } -static Bitu read_p3c7(Bitu port,Bitu iolen) { +static Bitu read_p3c7(Bitu /*port*/,Bitu /*iolen*/) { if (vga.dac.state==DAC_READ) return 0x3; else return 0x0; } -static void write_p3c8(Bitu port,Bitu val,Bitu iolen) { +static void write_p3c8(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { vga.dac.write_index=val; vga.dac.pel_index=0; vga.dac.state=DAC_WRITE; vga.dac.read_index= val - 1; } -static Bitu read_p3c8(Bitu port, Bitu iolen){ +static Bitu read_p3c8(Bitu /*port*/, Bitu /*iolen*/){ return vga.dac.write_index; } -static void write_p3c9(Bitu port,Bitu val,Bitu iolen) { +static void write_p3c9(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { val&=0x3f; switch (vga.dac.pel_index) { case 0: @@ -148,7 +148,7 @@ }; } -static Bitu read_p3c9(Bitu port,Bitu iolen) { +static Bitu read_p3c9(Bitu /*port*/,Bitu /*iolen*/) { Bit8u ret; switch (vga.dac.pel_index) { case 0: diff -Nru dosbox-staging-0.76.0/src/hardware/vga_draw.cpp dosbox-staging-0.77.0/src/hardware/vga_draw.cpp --- dosbox-staging-0.76.0/src/hardware/vga_draw.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_draw.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -379,9 +379,16 @@ } else return &vga.tandy.draw_base[vidstart]; } +static bool SkipCursor(Bitu vidstart, Bitu line) +{ + return !vga.draw.cursor.enabled || !(vga.draw.cursor.count & 0x10) || + (line < vga.draw.cursor.sline) || (line > vga.draw.cursor.eline) || + (vga.draw.cursor.address < vidstart); +} + static Bit32u FontMask[2]={0xffffffff,0x0}; -static Bit8u * VGA_TEXT_Draw_Line(Bitu vidstart, Bitu line) { - Bits font_addr; +static uint8_t *VGA_TEXT_Draw_Line(Bitu vidstart, Bitu line) +{ Bit32u * draw=(Bit32u *)TempLine; const Bit8u* vidmem = VGA_Text_Memwrap(vidstart); for (Bitu cx=0;cx> 1; - if (font_addr>=0 && font_addr<(Bits)vga.draw.blocks) { - if (linevga.draw.cursor.eline) goto skip_cursor; + if (SkipCursor(vidstart, line)) + return TempLine; + const Bitu font_addr = (vga.draw.cursor.address - vidstart) >> 1; + if (font_addr < vga.draw.blocks) { draw=(Bit32u *)&TempLine[font_addr*8]; Bit32u att=TXT_FG_Table[vga.tandy.draw_base[vga.draw.cursor.address+1]&0xf]; *draw++=att;*draw++=att; } -skip_cursor: return TempLine; } -static Bit8u * VGA_TEXT_Herc_Draw_Line(Bitu vidstart, Bitu line) { - Bits font_addr; +static uint8_t *VGA_TEXT_Herc_Draw_Line(Bitu vidstart, Bitu line) +{ Bit32u * draw=(Bit32u *)TempLine; const Bit8u* vidmem = VGA_Text_Memwrap(vidstart); @@ -444,11 +449,10 @@ *draw++=(fg&mask2) | (bg&~mask2); } } - if (!vga.draw.cursor.enabled || !(vga.draw.cursor.count&0x10)) goto skip_cursor; - font_addr = (vga.draw.cursor.address-vidstart) >> 1; - if (font_addr>=0 && font_addr<(Bits)vga.draw.blocks) { - if (linevga.draw.cursor.eline) goto skip_cursor; + if (SkipCursor(vidstart, line)) + return TempLine; + const Bitu font_addr = (vga.draw.cursor.address - vidstart) >> 1; + if (font_addr < vga.draw.blocks) { draw=(Bit32u *)&TempLine[font_addr*8]; Bit8u attr = vga.tandy.draw_base[vga.draw.cursor.address+1]; Bit32u cg; @@ -461,9 +465,9 @@ } *draw++=cg;*draw++=cg; } -skip_cursor: return TempLine; } + /* // combined 8/9-dot wide text mode 8bpp line drawing function static Bit8u* VGA_TEXT_Draw_Line(Bitu vidstart, Bitu line) { @@ -523,8 +527,10 @@ return TempLine+16; } */ + // combined 8/9-dot wide text mode 16bpp line drawing function -static Bit8u* VGA_TEXT_Xlat16_Draw_Line(Bitu vidstart, Bitu line) { +static uint8_t *VGA_TEXT_Xlat16_Draw_Line(Bitu vidstart, Bitu line) +{ // keep it aligned: Bit16u* draw = ((Bit16u*)TempLine) + 16 - vga.draw.panning; const Bit8u* vidmem = VGA_Text_Memwrap(vidstart); // pointer to chars+attribs @@ -564,11 +570,10 @@ } } // draw the text mode cursor if needed - if ((vga.draw.cursor.count&0x10) && (line >= vga.draw.cursor.sline) && - (line <= vga.draw.cursor.eline) && vga.draw.cursor.enabled) { + if (!SkipCursor(vidstart, line)) { // the adress of the attribute that makes up the cell the cursor is in - Bits attr_addr = (vga.draw.cursor.address-vidstart) >> 1; - if (attr_addr >= 0 && attr_addr < (Bits)vga.draw.blocks) { + const Bitu attr_addr = (vga.draw.cursor.address - vidstart) >> 1; + if (attr_addr < vga.draw.blocks) { Bitu index = attr_addr * (vga.draw.char9dot? 18:16); draw = (Bit16u*)(&TempLine[index]) + 16 - vga.draw.panning; diff -Nru dosbox-staging-0.76.0/src/hardware/vga_gfx.cpp dosbox-staging-0.77.0/src/hardware/vga_gfx.cpp --- dosbox-staging-0.76.0/src/hardware/vga_gfx.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_gfx.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,15 +24,15 @@ #define gfx(blah) vga.gfx.blah static bool index9warned=false; -static void write_p3ce(Bitu port,Bitu val,Bitu iolen) { +static void write_p3ce(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { gfx(index)=val & 0x0f; } -static Bitu read_p3ce(Bitu port,Bitu iolen) { +static Bitu read_p3ce(Bitu /*port*/,Bitu /*iolen*/) { return gfx(index); } -static void write_p3cf(Bitu port,Bitu val,Bitu iolen) { +static void write_p3cf(Bitu /*port*/,Bitu val,Bitu iolen) { switch (gfx(index)) { case 0: /* Set/Reset Register */ gfx(set_reset)=val & 0x0f; diff -Nru dosbox-staging-0.76.0/src/hardware/vga_memory.cpp dosbox-staging-0.77.0/src/hardware/vga_memory.cpp --- dosbox-staging-0.76.0/src/hardware/vga_memory.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_memory.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -176,7 +176,7 @@ } }; -class VGA_ChainedEGA_Handler : public PageHandler { +class VGA_ChainedEGA_Handler final : public PageHandler { public: Bitu readHandler(PhysPt addr) { return vga.mem.linear[addr]; @@ -264,7 +264,6 @@ class VGA_UnchainedEGA_Handler : public VGA_UnchainedRead_Handler { public: - template< bool wrapping> void writeHandler(PhysPt start, Bit8u val) { Bit32u data=ModeOperation(val); /* Update video memory and the pixel buffer */ @@ -300,30 +299,30 @@ addr += vga.svga.bank_write_full; addr = CHECKED2(addr); MEM_CHANGED( addr << 3); - writeHandler(addr+0,(Bit8u)(val >> 0)); + writeHandler(addr+0,(Bit8u)(val >> 0)); } void writew(PhysPt addr,Bitu val) { addr = PAGING_GetPhysicalAddress(addr) & vgapages.mask; addr += vga.svga.bank_write_full; addr = CHECKED2(addr); MEM_CHANGED( addr << 3); - writeHandler(addr+0,(Bit8u)(val >> 0)); - writeHandler(addr+1,(Bit8u)(val >> 8)); + writeHandler(addr+0,(Bit8u)(val >> 0)); + writeHandler(addr+1,(Bit8u)(val >> 8)); } void writed(PhysPt addr,Bitu val) { addr = PAGING_GetPhysicalAddress(addr) & vgapages.mask; addr += vga.svga.bank_write_full; addr = CHECKED2(addr); MEM_CHANGED( addr << 3); - writeHandler(addr+0,(Bit8u)(val >> 0)); - writeHandler(addr+1,(Bit8u)(val >> 8)); - writeHandler(addr+2,(Bit8u)(val >> 16)); - writeHandler(addr+3,(Bit8u)(val >> 24)); + writeHandler(addr+0,(Bit8u)(val >> 0)); + writeHandler(addr+1,(Bit8u)(val >> 8)); + writeHandler(addr+2,(Bit8u)(val >> 16)); + writeHandler(addr+3,(Bit8u)(val >> 24)); } }; //Slighly unusual version, will directly write 8,16,32 bits values -class VGA_ChainedVGA_Handler : public PageHandler { +class VGA_ChainedVGA_Handler final : public PageHandler { public: VGA_ChainedVGA_Handler() { flags=PFLAG_NOCODE; @@ -415,7 +414,7 @@ } }; -class VGA_UnchainedVGA_Handler : public VGA_UnchainedRead_Handler { +class VGA_UnchainedVGA_Handler final : public VGA_UnchainedRead_Handler { public: void writeHandler( PhysPt addr, Bit8u val ) { Bit32u data=ModeOperation(val); @@ -458,7 +457,7 @@ } }; -class VGA_TEXT_PageHandler : public PageHandler { +class VGA_TEXT_PageHandler final : public PageHandler { public: VGA_TEXT_PageHandler() { flags=PFLAG_NOCODE; @@ -492,7 +491,7 @@ } }; -class VGA_Map_Handler : public PageHandler { +class VGA_Map_Handler final : public PageHandler { public: VGA_Map_Handler() { flags=PFLAG_READABLE|PFLAG_WRITEABLE|PFLAG_NOCODE; @@ -507,7 +506,7 @@ } }; -class VGA_Changes_Handler : public PageHandler { +class VGA_Changes_Handler final : public PageHandler { public: VGA_Changes_Handler() { flags=PFLAG_NOCODE; @@ -553,7 +552,7 @@ } }; -class VGA_LIN4_Handler : public VGA_UnchainedEGA_Handler { +class VGA_LIN4_Handler final : public VGA_UnchainedEGA_Handler { public: VGA_LIN4_Handler() { flags=PFLAG_NOCODE; @@ -562,23 +561,23 @@ addr = vga.svga.bank_write_full + (PAGING_GetPhysicalAddress(addr) & 0xffff); addr = CHECKED4(addr); MEM_CHANGED( addr << 3 ); - writeHandler(addr+0,(Bit8u)(val >> 0)); + writeHandler(addr+0,(Bit8u)(val >> 0)); } void writew(PhysPt addr,Bitu val) { addr = vga.svga.bank_write_full + (PAGING_GetPhysicalAddress(addr) & 0xffff); addr = CHECKED4(addr); MEM_CHANGED( addr << 3 ); - writeHandler(addr+0,(Bit8u)(val >> 0)); - writeHandler(addr+1,(Bit8u)(val >> 8)); + writeHandler(addr+0,(Bit8u)(val >> 0)); + writeHandler(addr+1,(Bit8u)(val >> 8)); } void writed(PhysPt addr,Bitu val) { addr = vga.svga.bank_write_full + (PAGING_GetPhysicalAddress(addr) & 0xffff); addr = CHECKED4(addr); MEM_CHANGED( addr << 3 ); - writeHandler(addr+0,(Bit8u)(val >> 0)); - writeHandler(addr+1,(Bit8u)(val >> 8)); - writeHandler(addr+2,(Bit8u)(val >> 16)); - writeHandler(addr+3,(Bit8u)(val >> 24)); + writeHandler(addr+0,(Bit8u)(val >> 0)); + writeHandler(addr+1,(Bit8u)(val >> 8)); + writeHandler(addr+2,(Bit8u)(val >> 16)); + writeHandler(addr+3,(Bit8u)(val >> 24)); } Bitu readb(PhysPt addr) { addr = vga.svga.bank_read_full + (PAGING_GetPhysicalAddress(addr) & 0xffff); @@ -604,7 +603,7 @@ }; -class VGA_LFBChanges_Handler : public PageHandler { +class VGA_LFBChanges_Handler final : public PageHandler { public: VGA_LFBChanges_Handler() { flags=PFLAG_NOCODE; @@ -644,7 +643,7 @@ } }; -class VGA_LFB_Handler : public PageHandler { +class VGA_LFB_Handler final : public PageHandler { public: VGA_LFB_Handler() { flags=PFLAG_READABLE|PFLAG_WRITEABLE|PFLAG_NOCODE; @@ -661,7 +660,7 @@ extern void XGA_Write(Bitu port, Bitu val, Bitu len); extern Bitu XGA_Read(Bitu port, Bitu len); -class VGA_MMIO_Handler : public PageHandler { +class VGA_MMIO_Handler final : public PageHandler { public: VGA_MMIO_Handler() { flags=PFLAG_NOCODE; @@ -693,7 +692,7 @@ } }; -class VGA_TANDY_PageHandler : public PageHandler { +class VGA_TANDY_PageHandler final : public PageHandler { public: VGA_TANDY_PageHandler() { flags=PFLAG_READABLE|PFLAG_WRITEABLE; @@ -713,7 +712,7 @@ }; -class VGA_PCJR_Handler : public PageHandler { +class VGA_PCJR_Handler final : public PageHandler { public: VGA_PCJR_Handler() { flags=PFLAG_READABLE|PFLAG_WRITEABLE; @@ -730,12 +729,12 @@ } }; -class VGA_HERC_Handler : public PageHandler { +class VGA_HERC_Handler final : public PageHandler { public: VGA_HERC_Handler() { flags=PFLAG_READABLE|PFLAG_WRITEABLE; } - HostPt GetHostReadPt(Bitu phys_page) { + HostPt GetHostReadPt(Bitu /*phys_page*/) { // The 4kB map area is repeated in the 32kB range return &vga.mem.linear[0]; } @@ -744,7 +743,7 @@ } }; -class VGA_Empty_Handler : public PageHandler { +class VGA_Empty_Handler final : public PageHandler { public: VGA_Empty_Handler() { flags=PFLAG_NOCODE; diff -Nru dosbox-staging-0.76.0/src/hardware/vga_misc.cpp dosbox-staging-0.77.0/src/hardware/vga_misc.cpp --- dosbox-staging-0.76.0/src/hardware/vga_misc.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_misc.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ void vga_write_p3d5(Bitu port,Bitu val,Bitu iolen); Bitu vga_read_p3d5(Bitu port,Bitu iolen); -Bitu vga_read_p3da(Bitu port,Bitu iolen) { +Bitu vga_read_p3da(Bitu /*port*/,Bitu /*iolen*/) { Bit8u retval=4; // bit 2 set, needed by Blues Brothers double timeInFrame = PIC_FullIndex()-vga.draw.delay.framestart; @@ -55,7 +55,7 @@ return retval; } -static void write_p3c2(Bitu port,Bitu val,Bitu iolen) { +static void write_p3c2(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { vga.misc_output=val; Bitu base=(val & 0x1) ? 0x3d0 : 0x3b0; @@ -91,20 +91,20 @@ } -static Bitu read_p3cc(Bitu port,Bitu iolen) { +static Bitu read_p3cc(Bitu /*port*/,Bitu /*iolen*/) { return vga.misc_output; } // VGA feature control register -static Bitu read_p3ca(Bitu port,Bitu iolen) { +static Bitu read_p3ca(Bitu /*port*/,Bitu /*iolen*/) { return 0; } -static Bitu read_p3c8(Bitu port,Bitu iolen) { +static Bitu read_p3c8(Bitu /*port*/,Bitu /*iolen*/) { return 0x10; } -static Bitu read_p3c2(Bitu port,Bitu iolen) { +static Bitu read_p3c2(Bitu /*port*/,Bitu /*iolen*/) { Bit8u retval=0; if (machine==MCH_EGA) retval = 0x0F; diff -Nru dosbox-staging-0.76.0/src/hardware/vga_other.cpp dosbox-staging-0.77.0/src/hardware/vga_other.cpp --- dosbox-staging-0.76.0/src/hardware/vga_other.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_other.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -109,7 +109,7 @@ vga.other.lightpen |= (Bit8u)val; break; default: - LOG(LOG_VGAMISC,LOG_NORMAL)("MC6845:Write %X to illegal index %x",val,vga.other.index); + LOG(LOG_VGAMISC,LOG_NORMAL)("MC6845:Write %" sBitfs(X) " to illegal index %x",val,vga.other.index); } } static Bitu read_crtc_data_other(Bitu /*port*/,Bitu /*iolen*/) { @@ -156,7 +156,7 @@ return (Bitu)(~0); } -static void write_lightpen(Bitu port,Bitu val,Bitu) { +static void write_lightpen(Bitu port,Bitu /*val*/,Bitu) { switch (port) { case 0x3db: // Clear lightpen latch vga.other.lightpen_triggered = false; @@ -164,11 +164,11 @@ case 0x3dc: // Preset lightpen latch if (!vga.other.lightpen_triggered) { vga.other.lightpen_triggered = true; // TODO: this shows at port 3ba/3da bit 1 - + double timeInFrame = PIC_FullIndex()-vga.draw.delay.framestart; double timeInLine = fmod(timeInFrame,vga.draw.delay.htotal); Bitu current_scanline = (Bitu)(timeInFrame / vga.draw.delay.htotal); - + vga.other.lightpen = (Bit16u)((vga.draw.address_add/2) * (current_scanline/2)); vga.other.lightpen += (Bit16u)((timeInLine / vga.draw.delay.hdend) * ((float)(vga.draw.address_add/2))); @@ -429,7 +429,7 @@ switch (port) { case 0x3d8: vga.tandy.mode_control=(Bit8u)val; - vga.attr.disabled = (val&0x8)? 0: 1; + vga.attr.disabled = (val&0x8)? 0: 1; if (vga.tandy.mode_control & 0x2) { // graphics mode if (vga.tandy.mode_control & 0x10) {// highres mode if (cga_comp==1 || ((cga_comp==0 && !(val&0x4)) && !mono_cga)) { // composite display @@ -463,7 +463,7 @@ update_cga16_color(); LOG_MSG("%s model CGA selected", new_cga ? "Late" : "Early"); } - + static void Composite(bool pressed) { if (!pressed) return; if (++cga_comp>2) cga_comp=0; @@ -493,7 +493,7 @@ if (vga.tandy.color_select & 0x10) color_set |= 8; // intensity if (vga.tandy.color_select & 0x20) color_set |= 1; // Cyan Mag. White if (vga.tandy.mode_control & 0x04) { // Cyan Red White - color_set |= 1; + color_set |= 1; r_mask &= ~1; } VGA_SetCGA4Table( @@ -686,20 +686,20 @@ break; case 0x3df: // CRT/processor page register - + // Bit 0-2: CRT page PG0-2 // In one- and two bank modes, bit 0-2 select the 16kB memory // area of system RAM that is displayed on the screen. // In 4-banked modes, bit 1-2 select the 32kB memory area. // Bit 2 only has effect when the PCJR upgrade to 128k is installed. - + // Bit 3-5: Processor page CPU_PG // Selects the 16kB area of system RAM that is mapped to - // the B8000h IBM PC video memory window. Since A14-A16 of the + // the B8000h IBM PC video memory window. Since A14-A16 of the // processor are unconditionally replaced with these bits when // B8000h is accessed, the 16kB area is mapped to the 32kB // range twice in a row. (Scuba Venture writes across the boundary) - + // Bit 6-7: Video Address mode // 0: CRTC addresses A0-12 directly, accessing 8k characters // (+8k attributes). Used in text modes (one bank). @@ -807,7 +807,7 @@ static void write_hercules(Bitu port,Bitu val,Bitu /*iolen*/) { switch (port) { case 0x3b8: { - // the protected bits can always be cleared but only be set if the + // the protected bits can always be cleared but only be set if the // protection bits are set if (vga.herc.mode_control&0x2) { // already set diff -Nru dosbox-staging-0.76.0/src/hardware/vga_paradise.cpp dosbox-staging-0.77.0/src/hardware/vga_paradise.cpp --- dosbox-staging-0.76.0/src/hardware/vga_paradise.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_paradise.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,7 +58,7 @@ } } -void write_p3cf_pvga1a(Bitu reg,Bitu val,Bitu iolen) { +void write_p3cf_pvga1a(Bitu reg,Bitu val,Bitu /*iolen*/) { if (pvga1a.locked() && reg >= 0x09 && reg <= 0x0e) return; @@ -103,12 +103,12 @@ pvga1a.PR5 = val; break; default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:GFX:PVGA1A:Write to illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:GFX:PVGA1A:Write to illegal index %2" sBitfs(X), reg); break; } } -Bitu read_p3cf_pvga1a(Bitu reg,Bitu iolen) { +Bitu read_p3cf_pvga1a(Bitu reg,Bitu /*iolen*/) { if (pvga1a.locked() && reg >= 0x09 && reg <= 0x0e) return 0x0; @@ -128,7 +128,7 @@ case 0x0f: return pvga1a.PR5; default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:GFX:PVGA1A:Read from illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:GFX:PVGA1A:Read from illegal index %2" sBitfs(X), reg); break; } @@ -138,7 +138,7 @@ void FinishSetMode_PVGA1A(Bitu /*crtc_base*/, VGA_ModeExtraData* modeData) { pvga1a.biosMode = modeData->modeNo; -// Reset to single bank and set it to 0. May need to unlock first (DPaint locks on exit) + // Reset to single bank and set it to 0. May need to unlock first (DPaint locks on exit) IO_Write(0x3ce, 0x0f); Bitu oldlock = IO_Read(0x3cf); IO_Write(0x3cf, 0x05); @@ -230,12 +230,5 @@ pvga1a.PR1 = 2<<6; } - // Paradise ROM signature - PhysPt rom_base=PhysMake(0xc000,0); - phys_writeb(rom_base+0x007d,'V'); - phys_writeb(rom_base+0x007e,'G'); - phys_writeb(rom_base+0x007f,'A'); - phys_writeb(rom_base+0x0080,'='); - IO_Write(0x3cf, 0x05); // Enable! } diff -Nru dosbox-staging-0.76.0/src/hardware/vga_s3.cpp dosbox-staging-0.77.0/src/hardware/vga_s3.cpp --- dosbox-staging-0.76.0/src/hardware/vga_s3.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_s3.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ #include "vga.h" #include "mem.h" -void SVGA_S3_WriteCRTC(Bitu reg,Bitu val,Bitu iolen) { +void SVGA_S3_WriteCRTC(Bitu reg,Bitu val,Bitu /*iolen*/) { switch (reg) { case 0x31: /* CR31 Memory Configuration */ //TODO Base address @@ -128,7 +128,7 @@ vga.s3.hgc.startaddr |= ((val & 0xf) << 8); if ((((Bitu)vga.s3.hgc.startaddr)<<10)+((64*64*2)/8) > vga.vmemsize) { vga.s3.hgc.startaddr &= 0xff; // put it back to some sane area; - // if read back of this address is ever implemented this needs to change + // if read back of this address is ever implemented this needs to change LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:S3:CRTC: HGC pattern address beyond video memory" ); } break; @@ -163,7 +163,7 @@ vga.config.display_start&=0xF3FFFF; vga.config.display_start|=(val & 3) << 18; if ((vga.svga.bank_read&0x30) ^ ((val&0xc)<<2)) { - vga.svga.bank_read&=0xcf; + vga.svga.bank_read&=0xcf; vga.svga.bank_read|=(val&0xc)<<2; vga.svga.bank_write = vga.svga.bank_read; VGA_SetupHandlers(); @@ -350,7 +350,7 @@ } } -Bitu SVGA_S3_ReadCRTC( Bitu reg, Bitu iolen) { +Bitu SVGA_S3_ReadCRTC( Bitu reg, Bitu /*iolen*/) { switch (reg) { case 0x24: /* attribute controller index (read only) */ case 0x26: @@ -358,7 +358,7 @@ case 0x2d: /* Extended Chip ID (high byte of PCI device ID) */ return 0x88; case 0x2e: /* New Chip ID (low byte of PCI device ID) */ - return 0x11; // Trio64 + return 0x11; // Trio64 case 0x2f: /* Revision */ return 0x00; // Trio64 (exact value?) // return 0x44; // Trio64 V+ @@ -366,7 +366,7 @@ return 0xe1; // Trio+ dual byte case 0x31: /* CR31 Memory Configuration */ //TODO mix in bits from baseaddress; - return vga.s3.reg_31; + return vga.s3.reg_31; case 0x35: /* CR35 CRT Register Lock */ return vga.s3.reg_35|(vga.svga.bank_read & 0xf); case 0x36: /* CR36 Reset State Read 1 */ @@ -426,20 +426,20 @@ return vga.s3.ex_hor_overflow; case 0x5e: /* Extended Vertical Overflow */ return vga.s3.ex_ver_overflow; - case 0x67: /* Extended Miscellaneous Control 2 */ + case 0x67: /* Extended Miscellaneous Control 2 */ return vga.s3.misc_control_2; case 0x69: /* Extended System Control 3 */ - return (Bit8u)((vga.config.display_start & 0x1f0000)>>16); + return (Bit8u)((vga.config.display_start & 0x1f0000)>>16); case 0x6a: /* Extended System Control 4 */ return (Bit8u)(vga.svga.bank_read & 0x7f); case 0x6b: // BIOS scatchpad: LFB address - return vga.s3.reg_6b; + return vga.s3.reg_6b; default: return 0x00; } } -void SVGA_S3_WriteSEQ(Bitu reg,Bitu val,Bitu iolen) { +void SVGA_S3_WriteSEQ(Bitu reg,Bitu val,Bitu /*iolen*/) { if (reg>0x8 && vga.s3.pll.lock!=0x6) return; switch (reg) { case 0x08: @@ -469,7 +469,7 @@ } } -Bitu SVGA_S3_ReadSEQ(Bitu reg,Bitu iolen) { +Bitu SVGA_S3_ReadSEQ(Bitu reg,Bitu /*iolen*/) { /* S3 specific group */ if (reg>0x8 && vga.s3.pll.lock!=0x6) { if (reg<0x1b) return 0; @@ -500,7 +500,7 @@ clock = 25175000; else if (clock == 1) clock = 28322000; - else + else clock=1000*S3_CLOCK(vga.s3.clk[clock].m,vga.s3.clk[clock].n,vga.s3.clk[clock].r); /* Check for dual transfer, master clock/2 */ if (vga.s3.pll.cmd & 0x10) clock/=2; @@ -550,16 +550,4 @@ vga.vmemsize = 4096*1024; vga.s3.reg_36 = 0x1a; // 4mb fast page mode } - - // S3 ROM signature - PhysPt rom_base=PhysMake(0xc000,0); - phys_writeb(rom_base+0x003f,'S'); - phys_writeb(rom_base+0x0040,'3'); - phys_writeb(rom_base+0x0041,' '); - phys_writeb(rom_base+0x0042,'8'); - phys_writeb(rom_base+0x0043,'6'); - phys_writeb(rom_base+0x0044,'C'); - phys_writeb(rom_base+0x0045,'7'); - phys_writeb(rom_base+0x0046,'6'); - phys_writeb(rom_base+0x0047,'4'); } diff -Nru dosbox-staging-0.76.0/src/hardware/vga_seq.cpp dosbox-staging-0.77.0/src/hardware/vga_seq.cpp --- dosbox-staging-0.76.0/src/hardware/vga_seq.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_seq.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/hardware/vga_tseng.cpp dosbox-staging-0.77.0/src/hardware/vga_tseng.cpp --- dosbox-staging-0.76.0/src/hardware/vga_tseng.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_tseng.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ #include "inout.h" #include "mem.h" #include + // Tseng ET4K data typedef struct { Bit8u extensionsEnabled; @@ -62,7 +63,7 @@ return et4k.store_##port##_##index; // Tseng ET4K implementation -void write_p3d5_et4k(Bitu reg,Bitu val,Bitu iolen) { +void write_p3d5_et4k(Bitu reg,Bitu val,Bitu /*iolen*/) { if(!et4k.extensionsEnabled && reg!=0x33) return; @@ -103,7 +104,7 @@ // TODO: Bit 6 may have effect on emulation STORE_ET4K(3d4, 34); - case 0x35: + case 0x35: /* 3d4h index 35h (R/W): Overflow High bit 0 Vertical Blank Start Bit 10 (3d4h index 15h). @@ -171,12 +172,12 @@ } else vga.s3.ex_hor_overflow=(val&0x15); break; default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET4K:Write to illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET4K:Write to illegal index %2" sBitfs(X), reg); break; } } -Bitu read_p3d5_et4k(Bitu reg,Bitu iolen) { +Bitu read_p3d5_et4k(Bitu reg,Bitu /*iolen*/) { if (!et4k.extensionsEnabled && reg!=0x33) return 0x0; switch(reg) { @@ -189,13 +190,13 @@ RESTORE_ET4K(3d4, 37); RESTORE_ET4K(3d4, 3f); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET4K:Read from illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET4K:Read from illegal index %2" sBitfs(X), reg); break; } return 0x0; } -void write_p3c5_et4k(Bitu reg,Bitu val,Bitu iolen) { +void write_p3c5_et4k(Bitu reg,Bitu val,Bitu /*iolen*/) { switch(reg) { /* 3C4h index 6 (R/W): TS State Control @@ -212,17 +213,17 @@ // Unlikely to be used by games (things like ROM enable/disable and emulation of VGA vs EGA) STORE_ET4K(3c4, 07); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET4K:Write to illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET4K:Write to illegal index %2" sBitfs(X), reg); break; } } -Bitu read_p3c5_et4k(Bitu reg,Bitu iolen) { +Bitu read_p3c5_et4k(Bitu reg,Bitu /*iolen*/) { switch(reg) { RESTORE_ET4K(3c4, 06); RESTORE_ET4K(3c4, 07); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET4K:Read from illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET4K:Read from illegal index %2" sBitfs(X), reg); break; } return 0x0; @@ -233,17 +234,17 @@ bit 0-3 64k Write bank number (0..15) 4-7 64k Read bank number (0..15) */ -void write_p3cd_et4k(Bitu port,Bitu val,Bitu iolen) { +void write_p3cd_et4k(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { vga.svga.bank_write = val & 0x0f; vga.svga.bank_read = (val>>4) & 0x0f; VGA_SetupHandlers(); } -Bitu read_p3cd_et4k(Bitu port,Bitu iolen) { +Bitu read_p3cd_et4k(Bitu /*port*/,Bitu /*iolen*/) { return (vga.svga.bank_read<<4)|vga.svga.bank_write; } -void write_p3c0_et4k(Bitu reg,Bitu val,Bitu iolen) { +void write_p3c0_et4k(Bitu reg,Bitu val,Bitu /*iolen*/) { switch(reg) { // 3c0 index 16h: ATC Miscellaneous // VGADOC provides a lot of information, Ferarro documents only two bits @@ -275,17 +276,17 @@ // TODO: Figure out if this has any practical use STORE_ET4K(3c0, 17); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET4K:Write to illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET4K:Write to illegal index %2" sBitfs(X), reg); break; } } -Bitu read_p3c1_et4k(Bitu reg,Bitu iolen) { +Bitu read_p3c1_et4k(Bitu reg,Bitu /*iolen*/) { switch(reg) { RESTORE_ET4K(3c0, 16); RESTORE_ET4K(3c0, 17); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET4K:Read from illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET4K:Read from illegal index %2" sBitfs(X), reg); break; } return 0x0; @@ -321,7 +322,7 @@ // Reinterpret hor_overflow. Curiously, three bits out of four are // in the same places. Input has hdispend (not supported), output // has CRTC offset (also not supported) - Bit8u et4k_hor_overflow = + Bit8u et4k_hor_overflow = (modeData->hor_overflow & 0x01) | (modeData->hor_overflow & 0x04) | (modeData->hor_overflow & 0x10); @@ -499,7 +500,7 @@ return et3k.store_##port##_##index; -void write_p3d5_et3k(Bitu reg,Bitu val,Bitu iolen) { +void write_p3d5_et3k(Bitu reg,Bitu val,Bitu /*iolen*/) { switch(reg) { // 3d4 index 1bh-21h: Hardware zoom control registers // I am not sure if there was a piece of software that used these. @@ -572,12 +573,12 @@ break; default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET3K:Write to illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET3K:Write to illegal index %2" sBitfs(X), reg); break; } } -Bitu read_p3d5_et3k(Bitu reg,Bitu iolen) { +Bitu read_p3d5_et3k(Bitu reg,Bitu /*iolen*/) { switch(reg) { RESTORE_ET3K(3d4, 1b); RESTORE_ET3K(3d4, 1c); @@ -590,30 +591,30 @@ RESTORE_ET3K(3d4, 24); RESTORE_ET3K(3d4, 25); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET3K:Read from illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:CRTC:ET3K:Read from illegal index %2" sBitfs(X), reg); break; } return 0x0; } -void write_p3c5_et3k(Bitu reg,Bitu val,Bitu iolen) { +void write_p3c5_et3k(Bitu reg,Bitu val,Bitu /*iolen*/) { switch(reg) { // Both registers deal mostly with hardware zoom which is not implemented. Other bits // seem to be useless for emulation with the exception of index 7 bit 4 (font select) STORE_ET3K(3c4, 06); STORE_ET3K(3c4, 07); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET3K:Write to illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET3K:Write to illegal index %2" sBitfs(X), reg); break; } } -Bitu read_p3c5_et3k(Bitu reg,Bitu iolen) { +Bitu read_p3c5_et3k(Bitu reg,Bitu /*iolen*/) { switch(reg) { RESTORE_ET3K(3c4, 06); RESTORE_ET3K(3c4, 07); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET3K:Read from illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:SEQ:ET3K:Read from illegal index %2" sBitfs(X), reg); break; } return 0x0; @@ -629,34 +630,34 @@ 2 1M linear memory NOTES: 1M linear memory is not supported */ -void write_p3cd_et3k(Bitu port,Bitu val,Bitu iolen) { +void write_p3cd_et3k(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { vga.svga.bank_write = val & 0x07; vga.svga.bank_read = (val>>3) & 0x07; vga.svga.bank_size = (val&0x40)?64*1024:128*1024; VGA_SetupHandlers(); } -Bitu read_p3cd_et3k(Bitu port,Bitu iolen) { +Bitu read_p3cd_et3k(Bitu /*port*/,Bitu /*iolen*/) { return (vga.svga.bank_read<<3)|vga.svga.bank_write|((vga.svga.bank_size==128*1024)?0:0x40); } -void write_p3c0_et3k(Bitu reg,Bitu val,Bitu iolen) { +void write_p3c0_et3k(Bitu reg,Bitu val,Bitu /*iolen*/) { // See ET4K notes. switch(reg) { STORE_ET3K(3c0, 16); STORE_ET3K(3c0, 17); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET3K:Write to illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET3K:Write to illegal index %2" sBitfs(X), reg); break; } } -Bitu read_p3c1_et3k(Bitu reg,Bitu iolen) { +Bitu read_p3c1_et3k(Bitu reg,Bitu /*iolen*/) { switch(reg) { RESTORE_ET3K(3c0, 16); RESTORE_ET3K(3c0, 17); default: - LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET3K:Read from illegal index %2X", reg); + LOG(LOG_VGAMISC,LOG_NORMAL)("VGA:ATTR:ET3K:Read from illegal index %2" sBitfs(X), reg); break; } return 0x0; @@ -794,14 +795,4 @@ IO_RegisterWriteHandler(0x3cd,write_p3cd_et3k,IO_MB); vga.vmemsize = 512*1024; // Cannot figure how this was supposed to work on the real card - - // Tseng ROM signature - PhysPt rom_base=PhysMake(0xc000,0); - phys_writeb(rom_base+0x0075,' '); - phys_writeb(rom_base+0x0076,'T'); - phys_writeb(rom_base+0x0077,'s'); - phys_writeb(rom_base+0x0078,'e'); - phys_writeb(rom_base+0x0079,'n'); - phys_writeb(rom_base+0x007a,'g'); - phys_writeb(rom_base+0x007b,' '); } diff -Nru dosbox-staging-0.76.0/src/hardware/vga_xga.cpp dosbox-staging-0.77.0/src/hardware/vga_xga.cpp --- dosbox-staging-0.76.0/src/hardware/vga_xga.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/hardware/vga_xga.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -72,7 +72,8 @@ } xga; -void XGA_Write_Multifunc(Bitu val, Bitu len) { +static void XGA_Write_Multifunc(Bitu val) +{ Bitu regselect = val >> 12; Bitu dataval = val & 0xfff; switch(regselect) { @@ -854,10 +855,8 @@ if(mixselect == 0x3) { // TODO lots of guessing here but best results this way - /*if(srcdata == xga.forecolor)*/ mixmode = xga.foremix; - // else - if(srcdata == xga.backcolor || srcdata == 0) - mixmode = xga.backmix; + if(srcdata) mixmode = xga.foremix; + else mixmode = xga.backmix; } Bitu srcval = 0; @@ -888,7 +887,8 @@ } } -void XGA_DrawCmd(Bitu val, Bitu len) { +static void XGA_DrawCmd(Bitu val) +{ Bit16u cmd; cmd = val >> 13; #if XGA_SHOW_COMMAND_TRACE == 1 @@ -1102,7 +1102,7 @@ break; case 0x9ae8: case 0x8118: // Trio64V+ packed MMIO - XGA_DrawCmd(val, len); + XGA_DrawCmd(val); break; case 0xa2e8: XGA_SetDualReg(xga.backcolor, val); @@ -1138,7 +1138,7 @@ xga.foremix = val; break; case 0xbee8: - XGA_Write_Multifunc(val, len); + XGA_Write_Multifunc(val); break; case 0xe2e8: xga.waitcmd.newline = false; diff -Nru dosbox-staging-0.76.0/src/ints/bios.cpp dosbox-staging-0.77.0/src/ints/bios.cpp --- dosbox-staging-0.76.0/src/ints/bios.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/bios.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ #include "serialport.h" #include -#if defined(DB_HAVE_CLOCK_GETTIME) && ! defined(WIN32) +#if defined(HAVE_CLOCK_GETTIME) && !defined(WIN32) //time.h is already included #else #include @@ -494,10 +494,12 @@ static void BIOS_HostTimeSync() { Bit32u milli = 0; -#if defined(DB_HAVE_CLOCK_GETTIME) && ! defined(WIN32) + // TODO investigate if clock_gettime and ftime can be replaced + // by using C++11 chrono +#if defined(HAVE_CLOCK_GETTIME) && !defined(WIN32) struct timespec tp; clock_gettime(CLOCK_REALTIME,&tp); - + struct tm *loctime; loctime = localtime(&tp.tv_sec); milli = (Bit32u) (tp.tv_nsec / 1000000); @@ -505,7 +507,7 @@ /* Setup time and date */ struct timeb timebuffer; ftime(&timebuffer); - + struct tm *loctime; loctime = localtime (&timebuffer.time); milli = (Bit32u) timebuffer.millitm; @@ -720,39 +722,79 @@ static Bitu INT15_Handler(void) { static Bit16u biosConfigSeg=0; switch (reg_ah) { - case 0xC0: /* Get Configuration*/ - { - if (biosConfigSeg==0) biosConfigSeg = DOS_GetMemory(1); //We have 16 bytes - PhysPt data = PhysMake(biosConfigSeg,0); - mem_writew(data,8); // 8 Bytes following - if (IS_TANDY_ARCH) { - if (machine==MCH_TANDY) { - // Model ID (Tandy) - mem_writeb(data+2,0xFF); - } else { - // Model ID (PCJR) - mem_writeb(data+2,0xFD); - } - mem_writeb(data+3,0x0A); // Submodel ID - mem_writeb(data+4,0x10); // Bios Revision - /* Tandy doesn't have a 2nd PIC, left as is for now */ - mem_writeb(data+5,(1<<6)|(1<<5)|(1<<4)); // Feature Byte 1 + case 0x24: //A20 stuff + switch (reg_al) { + case 0: //Disable a20 + MEM_A20_Enable(false); + reg_ah = 0; //call successful + CALLBACK_SCF(false); //clear on success + break; + case 1: //Enable a20 + MEM_A20_Enable( true ); + reg_ah = 0; //call successful + CALLBACK_SCF(false); //clear on success + break; + case 2: //Query a20 + reg_al = MEM_A20_Enabled() ? 0x1 : 0x0; + reg_ah = 0; //call successful + CALLBACK_SCF(false); + break; + case 3: //Get a20 support + reg_bx = 0x3; //Bitmask, keyboard and 0x92 + reg_ah = 0; //call successful + CALLBACK_SCF(false); + break; + default: + goto unhandled; + } + break; + case 0xC0: /* Get Configuration*/ { + if (biosConfigSeg == 0) + biosConfigSeg = DOS_GetMemory(1); // We have 16 bytes + + PhysPt data = PhysMake(biosConfigSeg, 0); + mem_writew(data, 8); // 8 Bytes following + + // Tandy and IBM PCjr + if (IS_TANDY_ARCH) { + if (machine == MCH_TANDY) { + mem_writeb(data + 2, 0xFF); // Model ID (Tandy) } else { - mem_writeb(data+2,0xFC); // Model ID (PC) - mem_writeb(data+3,0x00); // Submodel ID - mem_writeb(data+4,0x01); // Bios Revision - mem_writeb(data+5,(1<<6)|(1<<5)|(1<<4)); // Feature Byte 1 + mem_writeb(data + 2, 0xFD); // Model ID (PCjr) } - mem_writeb(data+6,(1<<6)); // Feature Byte 2 - mem_writeb(data+7,0); // Feature Byte 3 - mem_writeb(data+8,0); // Feature Byte 4 - mem_writeb(data+9,0); // Feature Byte 5 - CPU_SetSegGeneral(es,biosConfigSeg); - reg_bx = 0; - reg_ah = 0; - CALLBACK_SCF(false); - }; break; - case 0x4f: /* BIOS - Keyboard intercept */ + mem_writeb(data + 3, 0x0A); // Submodel ID + mem_writeb(data + 4, 0x10); // Bios Revision + // Feature Bytes 1 and 2 + // Tandy doesn't have a 2nd PIC, left as-is + mem_writeb(data + 5, (1 << 6) | (1 << 5) | (1 << 4)); + mem_writeb(data + 6, (1 << 6)); + } + // IBM PS/1 2011 + else if (PS1AUDIO_IsEnabled()) { + mem_writeb(data + 2, 0xFC); // Model ID + mem_writeb(data + 3, 0x0B); // Submodel ID + mem_writeb(data + 4, 0x00); // Bios Revision + mem_writeb(data + 5, 0b1111'0100); // Feature Byte 1 (0xF4) + mem_writeb(data + 6, 0b0100'0000); // Feature Byte 2 (0x40) + } + // General PCs + else { + mem_writeb(data + 2, 0xFC); // Model ID + mem_writeb(data + 3, 0x00); // Submodel ID + mem_writeb(data + 4, 0x01); // Bios Revision + // Feature Bytes 1 and 2 + mem_writeb(data + 5, (1 << 6) | (1 << 5) | (1 << 4)); + mem_writeb(data + 6, (1 << 6)); + } + mem_writeb(data + 7, 0); // Feature Byte 3 + mem_writeb(data + 8, 0); // Feature Byte 4 + mem_writeb(data + 9, 0); // Feature Byte 5 + CPU_SetSegGeneral(es, biosConfigSeg); + reg_bx = 0; + reg_ah = 0; + CALLBACK_SCF(false); + }; break; + case 0x4f: /* BIOS - Keyboard intercept */ /* Carry should be set but let's just set it just in case */ CALLBACK_SCF(true); break; @@ -965,6 +1007,7 @@ CALLBACK_SCF(true); break; default: + unhandled: LOG(LOG_BIOS,LOG_ERROR)("INT15:Unknown call %4X",reg_ax); reg_ah=0x86; CALLBACK_SCF(true); @@ -1016,6 +1059,12 @@ return CBRET_NONE; } +void BIOS_SetEquipment(Bit16u equipment) { + mem_writew(BIOS_CONFIGURATION,equipment); + if (IS_EGAVGA_ARCH) equipment &= ~0x30; //EGA/VGA startup display mode differs in CMOS + CMOS_SetRegister(0x14,(Bit8u)(equipment&0xff)); //Should be updated on changes +} + void BIOS_ZeroExtendedSize(bool in) { if(in) other_memsystems++; else other_memsystems--; @@ -1025,7 +1074,7 @@ void BIOS_SetupKeyboard(void); void BIOS_SetupDisks(void); -class BIOS:public Module_base{ +class BIOS final : public Module_base{ private: CALLBACK_HandlerObject callback[11]; public: @@ -1299,9 +1348,7 @@ if (machine==MCH_PCJR) config |= 0x100; // Gameport config |= 0x1000; - mem_writew(BIOS_CONFIGURATION,config); - if (IS_EGAVGA_ARCH) config &= ~0x30; //EGA/VGA startup display mode differs in CMOS - CMOS_SetRegister(0x14,(Bit8u)(config&0xff)); //Should be updated on changes + BIOS_SetEquipment(config); /* Setup extended memory size */ IO_Write(0x70,0x30); size_extended=IO_Read(0x71); @@ -1354,9 +1401,7 @@ equipmentword = mem_readw(BIOS_CONFIGURATION); equipmentword &= (~0x0E00); equipmentword |= (portcount << 9); - mem_writew(BIOS_CONFIGURATION,equipmentword); - if (IS_EGAVGA_ARCH) equipmentword &= ~0x30; //EGA/VGA startup display mode differs in CMOS - CMOS_SetRegister(0x14,(Bit8u)(equipmentword&0xff)); //Should be updated on changes + BIOS_SetEquipment(equipmentword); } diff -Nru dosbox-staging-0.76.0/src/ints/bios_disk.cpp dosbox-staging-0.77.0/src/ints/bios_disk.cpp --- dosbox-staging-0.76.0/src/ints/bios_disk.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/bios_disk.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,25 +22,26 @@ #include #include -#include "dosbox.h" #include "callback.h" #include "regs.h" #include "mem.h" #include "dos_inc.h" /* for Drives[] */ #include "drives.h" #include "mapper.h" +#include "string_utils.h" diskGeo DiskGeometryList[] = { - { 160, 8, 1, 40, 0}, - { 180, 9, 1, 40, 0}, - { 200, 10, 1, 40, 0}, - { 320, 8, 2, 40, 1}, - { 360, 9, 2, 40, 1}, - { 400, 10, 2, 40, 1}, - { 720, 9, 2, 80, 3}, - {1200, 15, 2, 80, 2}, - {1440, 18, 2, 80, 4}, - {2880, 36, 2, 80, 6}, + { 160, 8, 1, 40, 0}, // SS/DD 5.25" + { 180, 9, 1, 40, 0}, // SS/DD 5.25" + { 200, 10, 1, 40, 0}, // SS/DD 5.25" (booters) + { 320, 8, 2, 40, 1}, // DS/DD 5.25" + { 360, 9, 2, 40, 1}, // DS/DD 5.25" + { 400, 10, 2, 40, 1}, // DS/DD 5.25" (booters) + { 720, 9, 2, 80, 3}, // DS/DD 3.5" + {1200, 15, 2, 80, 2}, // DS/HD 5.25" + {1440, 18, 2, 80, 4}, // DS/HD 3.5" + {1680, 21, 2, 80, 4}, // DS/HD 3.5" (DMF) + {2880, 36, 2, 80, 6}, // DS/ED 3.5" {0, 0, 0, 0, 0} }; @@ -54,7 +55,7 @@ bool killRead; static bool swapping_requested; -void CMOS_SetRegister(Bitu regNr, Bit8u val); //For setting equipment word +void BIOS_SetEquipment(Bit16u equipment); /* 2 floppys and 2 harddrives, max */ std::array, MAX_DISK_IMAGES> imageDiskList; @@ -97,9 +98,7 @@ equipment&=~0x00C0; equipment|=(numofdisks<<6); } else equipment|=1; - mem_writew(BIOS_CONFIGURATION,equipment); - if (IS_EGAVGA_ARCH) equipment &= ~0x30; //EGA/VGA startup display mode differs in CMOS - CMOS_SetRegister(0x14, (Bit8u)(equipment&0xff)); + BIOS_SetEquipment(equipment); } template @@ -288,7 +287,7 @@ static bool driveInactive(Bit8u driveNum) { if(driveNum>=(2 + MAX_HDD_IMAGES)) { - LOG(LOG_BIOS,LOG_ERROR)("Disk %d non-existant", driveNum); + LOG(LOG_BIOS,LOG_ERROR)("Disk %d non-existent", driveNum); last_status = 0x01; CALLBACK_SCF(true); return true; @@ -604,8 +603,8 @@ /* Setup the Bios Area */ mem_writeb(BIOS_HARDDISK_COUNT,2); - MAPPER_AddHandler(swapInNextDisk, SDL_SCANCODE_F4, MMOD1, "swapimg", - "Swap Image"); + MAPPER_AddHandler(swapInNextDisk, SDL_SCANCODE_F4, PRIMARY_MOD, + "swapimg", "Swap Image"); killRead = false; swapping_requested = false; } diff -Nru dosbox-staging-0.76.0/src/ints/bios_keyboard.cpp dosbox-staging-0.77.0/src/ints/bios_keyboard.cpp --- dosbox-staging-0.76.0/src/ints/bios_keyboard.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/bios_keyboard.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,12 +16,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "bios.h" + #include -#include "dosbox.h" #include "callback.h" #include "mem.h" -#include "bios.h" #include "keyboard.h" #include "regs.h" #include "inout.h" @@ -304,9 +304,9 @@ flags3 &=~0x01; mem_writeb(BIOS_KEYBOARD_FLAGS3,flags3); if (flags2&1) { - /* ctrl-pause (break), special handling needed: + /* Ctrl+Pause (Break), special handling needed: add zero to the keyboard buffer, call int 0x1b which - sets ctrl-c flag which calls int 0x23 in certain dos + sets Ctrl+C flag which calls int 0x23 in certain dos input/output functions; not handled */ } else if ((flags2&8)==0) { /* normal pause key, enter loop */ diff -Nru dosbox-staging-0.76.0/src/ints/ems.cpp dosbox-staging-0.77.0/src/ints/ems.cpp --- dosbox-staging-0.76.0/src/ints/ems.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/ems.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,11 +16,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "dosbox.h" + #include #include #include -#include "dosbox.h" #include "callback.h" #include "mem.h" #include "paging.h" @@ -101,7 +102,7 @@ static Bit16u GEMMIS_seg; -class device_EMM : public DOS_Device { +class device_EMM final : public DOS_Device { public: device_EMM(bool is_emm386_avail) : is_emm386(is_emm386_avail) { @@ -1362,7 +1363,7 @@ return rtype; } -class EMS : public Module_base { +class EMS final : public Module_base { private: uint16_t ems_baseseg = 0; DOS_Device *emm_device = nullptr; diff -Nru dosbox-staging-0.76.0/src/ints/.gitignore dosbox-staging-0.77.0/src/ints/.gitignore --- dosbox-staging-0.76.0/src/ints/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/ints/int10_char.cpp dosbox-staging-0.77.0/src/ints/int10_char.cpp --- dosbox-staging-0.76.0/src/ints/int10_char.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/int10_char.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ #include "callback.h" static void CGA2_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) { - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/2)+cleft); PhysPt src=base+((CurMode->twidth*rold)*(cheight/2)+cleft); Bitu copy=(cright-cleft); @@ -40,7 +40,7 @@ } static void CGA4_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) { - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/2)+cleft)*2; PhysPt src=base+((CurMode->twidth*rold)*(cheight/2)+cleft)*2; Bitu copy=(cright-cleft)*2;Bitu nextline=CurMode->twidth*2; @@ -52,7 +52,7 @@ } static void TANDY16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) { - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; Bit8u banks=CurMode->twidth/10; PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/banks)+cleft)*4; PhysPt src=base+((CurMode->twidth*rold)*(cheight/banks)+cleft)*4; @@ -65,7 +65,7 @@ static void EGA16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) { PhysPt src,dest;Bitu copy; - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; dest=base+(CurMode->twidth*rnew)*cheight+cleft; src=base+(CurMode->twidth*rold)*cheight+cleft; Bitu nextline=CurMode->twidth; @@ -85,7 +85,7 @@ static void VGA_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt base) { PhysPt src,dest;Bitu copy; - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; dest=base+8*((CurMode->twidth*rnew)*cheight+cleft); src=base+8*((CurMode->twidth*rold)*cheight+cleft); Bitu nextline=8*CurMode->twidth; @@ -105,7 +105,7 @@ } static void CGA2_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) { - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; PhysPt dest=base+((CurMode->twidth*row)*(cheight/2)+cleft); Bitu copy=(cright-cleft); Bitu nextline=CurMode->twidth; @@ -120,7 +120,7 @@ } static void CGA4_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) { - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; PhysPt dest=base+((CurMode->twidth*row)*(cheight/2)+cleft)*2; Bitu copy=(cright-cleft)*2;Bitu nextline=CurMode->twidth*2; attr=(attr & 0x3) | ((attr & 0x3) << 2) | ((attr & 0x3) << 4) | ((attr & 0x3) << 6); @@ -134,7 +134,7 @@ } static void TANDY16_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) { - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; Bit8u banks=CurMode->twidth/10; PhysPt dest=base+((CurMode->twidth*row)*(cheight/banks)+cleft)*4; Bitu copy=(cright-cleft)*4;Bitu nextline=CurMode->twidth*4; @@ -155,7 +155,7 @@ /* Enable all Write planes */ IO_Write(0x3c4,2);IO_Write(0x3c5,0xf); /* Write some bytes */ - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; PhysPt dest=base+(CurMode->twidth*row)*cheight+cleft; Bitu nextline=CurMode->twidth; Bitu copy = cheight;Bitu rowsize=(cright-cleft); @@ -168,7 +168,7 @@ static void VGA_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) { /* Write some bytes */ - Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + BIOS_CHEIGHT; PhysPt dest=base+8*((CurMode->twidth*row)*cheight+cleft); Bitu nextline=8*CurMode->twidth; Bitu copy = cheight;Bitu rowsize=8*(cright-cleft); @@ -189,6 +189,18 @@ } } +uint16_t INT10_GetTextColumns() +{ + return real_readw(BIOSMEM_SEG, BIOSMEM_NB_COLS); +} + +uint16_t INT10_GetTextRows() +{ + if (IS_EGAVGA_ARCH) + return real_readb(BIOSMEM_SEG, BIOSMEM_NB_ROWS) + 1; + else + return 25; +} void INT10_ScrollWindow(Bit8u rul,Bit8u cul,Bit8u rlr,Bit8u clr,Bit8s nlines,Bit8u attr,Bit8u page) { /* Do some range checking */ @@ -327,10 +339,9 @@ void INT10_SetCursorShape(Bit8u first,Bit8u last) { real_writew(BIOSMEM_SEG,BIOSMEM_CURSOR_TYPE,last|(first<<8)); - if (machine==MCH_CGA) goto dowrite; - if (IS_TANDY_ARCH) goto dowrite; + if (machine==MCH_CGA || IS_TANDY_ARCH) goto dowrite; /* Skip CGA cursor emulation if EGA/VGA system is active */ - if (!(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x8)) { + if (machine==MCH_HERC || !(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x8)) { /* Check for CGA type 01, invisible */ if ((first & 0x60) == 0x20) { first=0x1e; @@ -338,10 +349,10 @@ goto dowrite; } /* Check if we need to convert CGA Bios cursor values */ - if (!(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x1)) { // set by int10 fun12 sub34 + if (machine==MCH_HERC || !(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x1)) { // set by int10 fun12 sub34 // if (CurMode->mode>0x3) goto dowrite; //Only mode 0-3 are text modes on cga if ((first & 0xe0) || (last & 0xe0)) goto dowrite; - Bit8u cheight=real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT)-1; + Bit8u cheight=((machine==MCH_HERC)?14:real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT))-1; /* Creative routine i based of the original ibmvga bios */ if (lasttype) { case M_TEXT: @@ -488,7 +499,8 @@ /* Externally used by the mouse routine */ RealPt fontdata; Bit16u cols = real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS); - Bit8u back,cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); + Bit8u back; + BIOS_CHEIGHT; switch (CurMode->type) { case M_TEXT: { diff -Nru dosbox-staging-0.76.0/src/ints/int10.cpp dosbox-staging-0.77.0/src/ints/int10.cpp --- dosbox-staging-0.76.0/src/ints/int10.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/int10.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,7 +52,7 @@ switch (reg_ah) { case 0x00: /* Set VideoMode */ - Mouse_BeforeNewVideoMode(true); + Mouse_BeforeNewVideoMode(); INT10_SetVideoMode(reg_al); Mouse_AfterNewVideoMode(true); break; @@ -206,7 +206,8 @@ case 0x11: /* Character generator functions */ if (!IS_EGAVGA_ARCH) break; - if ((reg_al&0xf0)==0x10) Mouse_BeforeNewVideoMode(false); + if ((reg_al & 0xf0) == 0x10) + Mouse_BeforeNewVideoMode(); switch (reg_al) { /* Textmode calls */ case 0x00: /* Load user font */ @@ -449,45 +450,8 @@ break; case 0x1A: /* Display Combination */ if (!IS_VGA_ARCH) break; - if (reg_al==0) { // get dcc - // walk the tables... - RealPt vsavept=real_readd(BIOSMEM_SEG,BIOSMEM_VS_POINTER); - RealPt svstable=real_readd(RealSeg(vsavept),RealOff(vsavept)+0x10); - if (svstable) { - RealPt dcctable=real_readd(RealSeg(svstable),RealOff(svstable)+0x02); - Bit8u entries=real_readb(RealSeg(dcctable),RealOff(dcctable)+0x00); - Bit8u idx=real_readb(BIOSMEM_SEG,BIOSMEM_DCC_INDEX); - // check if index within range - if (idx>8; - else reg_bx=dccentry; - } else reg_bx=0xffff; - } else reg_bx=0xffff; - reg_ax=0x1A; // high part destroyed or zeroed depending on BIOS - } else if (reg_al==1) { // set dcc - Bit8u newidx=0xff; - // walk the tables... - RealPt vsavept=real_readd(BIOSMEM_SEG,BIOSMEM_VS_POINTER); - RealPt svstable=real_readd(RealSeg(vsavept),RealOff(vsavept)+0x10); - if (svstable) { - RealPt dcctable=real_readd(RealSeg(svstable),RealOff(svstable)+0x02); - Bit8u entries=real_readb(RealSeg(dcctable),RealOff(dcctable)+0x00); - if (entries) { - Bitu ct; - Bit16u swpidx=reg_bh|(reg_bl<<8); - // search the ddc index in the dcc table - for (ct=0; ct #include - -#include "dosbox.h" #include "callback.h" #include "mem.h" #include "regs.h" #include "cpu.h" -#include "mouse.h" #include "pic.h" #include "inout.h" #include "int10.h" @@ -386,7 +384,9 @@ // Check video page. Seems to be ignored for text mode. // hence the text mode handled above this - if (real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE)!=mouse.page) return; + // >>> removed because BIOS page is not actual page in some cases, e.g. QQP games +// if (real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE)!=mouse.page) return; + // Check if cursor in update region /* if ((POS_X >= mouse.updateRegion_x[0]) && (POS_X <= mouse.updateRegion_x[1]) && (POS_Y >= mouse.updateRegion_y[0]) && (POS_Y <= mouse.updateRegion_y[1])) { @@ -480,7 +480,7 @@ } else { if (CurMode->type == M_TEXT) { mouse.x = x*real_readw(BIOSMEM_SEG,BIOSMEM_NB_COLS)*8; - mouse.y = y*(real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1)*8; + mouse.y = y*(IS_EGAVGA_ARCH?(real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1):25)*8; } else if ((mouse.max_x < 2048) || (mouse.max_y < 2048) || (mouse.max_x != mouse.max_y)) { if ((mouse.max_x > 0) && (mouse.max_y > 0)) { mouse.x = x*mouse.max_x; @@ -610,7 +610,8 @@ PIC_SetIRQMask(MOUSE_IRQ,false); } -void Mouse_BeforeNewVideoMode(bool setmode) { +void Mouse_BeforeNewVideoMode() +{ if (CurMode->type!=M_TEXT) RestoreCursorBackground(); else RestoreCursorBackgroundText(); mouse.hidden = 1; @@ -634,7 +635,7 @@ case 0x07: { mouse.gran_x = (mode<2)?0xfff0:0xfff8; mouse.gran_y = (Bit16s)0xfff8; - Bitu rows = real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS); + Bitu rows = IS_EGAVGA_ARCH?real_readb(BIOSMEM_SEG,BIOSMEM_NB_ROWS):24; if ((rows == 0) || (rows > 250)) rows = 25 - 1; mouse.max_y = 8*(rows+1) - 1; break; @@ -693,8 +694,9 @@ } //Much too empty, Mouse_NewVideoMode contains stuff that should be in here -static void Mouse_Reset(void) { - Mouse_BeforeNewVideoMode(false); +static void Mouse_Reset() +{ + Mouse_BeforeNewVideoMode(); Mouse_AfterNewVideoMode(false); Mouse_SetMickeyPixelRate(8,16); @@ -769,8 +771,8 @@ reg_dx=mouse.last_pressed_y[but]; reg_bx=mouse.times_pressed[but]; mouse.times_pressed[but]=0; - break; } + break; case 0x06: /* Return Button Release Data */ { Bit16u but=reg_bx; @@ -780,8 +782,8 @@ reg_dx=mouse.last_released_y[but]; reg_bx=mouse.times_released[but]; mouse.times_released[but]=0; - break; } + break; case 0x07: /* Define horizontal cursor range */ { //lemmings set 1-640 and wants that. iron seeds set 0-640 but doesn't like 640 //Iron seed works if newvideo mode with mode 13 sets 0-639 diff -Nru dosbox-staging-0.76.0/src/ints/xms.cpp dosbox-staging-0.77.0/src/ints/xms.cpp --- dosbox-staging-0.76.0/src/ints/xms.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/xms.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -414,7 +414,7 @@ Bitu GetEMSType(Section_prop * section); -class XMS: public Module_base { +class XMS final : public Module_base { private: CALLBACK_HandlerObject callbackhandler; diff -Nru dosbox-staging-0.76.0/src/ints/xms.h dosbox-staging-0.77.0/src/ints/xms.h --- dosbox-staging-0.76.0/src/ints/xms.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/ints/xms.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/libs/decoders/archive.h dosbox-staging-0.77.0/src/libs/decoders/archive.h --- dosbox-staging-0.76.0/src/libs/decoders/archive.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/archive.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,29 +1,31 @@ /* -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to -*/ + * SPDX-License-Identifier: Unlicense + * + * This is free and unencumbered software released into the public domain. + * + * Anyone is free to copy, modify, publish, use, compile, sell, or + * distribute this software, either in source code form or as a compiled + * binary, for any purpose, commercial or non-commercial, and by any + * means. + * + * In jurisdictions that recognize copyright laws, the author or authors + * of this software dedicate any and all copyright interest in the + * software to the public domain. We make this dedication for the benefit + * of the public at large and to the detriment of our heirs and + * successors. We intend this dedication to be an overt act of + * relinquishment in perpetuity of all present and future rights to this + * software under copyright law. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * For more information, please refer to + */ #ifndef ARCHIVE_H__ #define ARCHIVE_H__ diff -Nru dosbox-staging-0.76.0/src/libs/decoders/dr_flac.h dosbox-staging-0.77.0/src/libs/decoders/dr_flac.h --- dosbox-staging-0.76.0/src/libs/decoders/dr_flac.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/dr_flac.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,6 @@ /* FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file. -dr_flac - v0.12.13 - 2020-05-16 +dr_flac - v0.12.29 - 2021-04-02 David Reid - mackron@gmail.com @@ -166,7 +166,7 @@ ... - drflac_free(pSampleData); + drflac_free(pSampleData, NULL); ``` You can read samples as signed 16-bit integer and 32-bit floating-point PCM with the *_s16() and *_f32() family of APIs respectively, but note that these @@ -232,45 +232,44 @@ #define DRFLAC_VERSION_MAJOR 0 #define DRFLAC_VERSION_MINOR 12 -#define DRFLAC_VERSION_REVISION 13 +#define DRFLAC_VERSION_REVISION 29 #define DRFLAC_VERSION_STRING DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION) #include /* For size_t. */ -/* Sized types. Prefer built-in types. Fall back to stdint. */ -#ifdef _MSC_VER - #if defined(__clang__) +/* Sized types. */ +typedef signed char drflac_int8; +typedef unsigned char drflac_uint8; +typedef signed short drflac_int16; +typedef unsigned short drflac_uint16; +typedef signed int drflac_int32; +typedef unsigned int drflac_uint32; +#if defined(_MSC_VER) + typedef signed __int64 drflac_int64; + typedef unsigned __int64 drflac_uint64; +#else + #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wlanguage-extension-token" - #pragma GCC diagnostic ignored "-Wlong-long" - #pragma GCC diagnostic ignored "-Wc++11-long-long" - #endif - typedef signed __int8 drflac_int8; - typedef unsigned __int8 drflac_uint8; - typedef signed __int16 drflac_int16; - typedef unsigned __int16 drflac_uint16; - typedef signed __int32 drflac_int32; - typedef unsigned __int32 drflac_uint32; - typedef signed __int64 drflac_int64; - typedef unsigned __int64 drflac_uint64; - #if defined(__clang__) + #pragma GCC diagnostic ignored "-Wlong-long" + #if defined(__clang__) + #pragma GCC diagnostic ignored "-Wc++11-long-long" + #endif + #endif + typedef signed long long drflac_int64; + typedef unsigned long long drflac_uint64; + #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif +#endif +#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + typedef drflac_uint64 drflac_uintptr; #else - #include - typedef int8_t drflac_int8; - typedef uint8_t drflac_uint8; - typedef int16_t drflac_int16; - typedef uint16_t drflac_uint16; - typedef int32_t drflac_int32; - typedef uint32_t drflac_uint32; - typedef int64_t drflac_int64; - typedef uint64_t drflac_uint64; -#endif -typedef drflac_uint8 drflac_bool8; -typedef drflac_uint32 drflac_bool32; -#define DRFLAC_TRUE 1 -#define DRFLAC_FALSE 0 + typedef drflac_uint32 drflac_uintptr; +#endif +typedef drflac_uint8 drflac_bool8; +typedef drflac_uint32 drflac_bool32; +#define DRFLAC_TRUE 1 +#define DRFLAC_FALSE 0 #if !defined(DRFLAC_API) #if defined(DRFLAC_DLL) @@ -317,7 +316,7 @@ #endif DRFLAC_API void drflac_version(drflac_uint32* pMajor, drflac_uint32* pMinor, drflac_uint32* pRevision); -DRFLAC_API const char* drflac_version_string(); +DRFLAC_API const char* drflac_version_string(void); /* As data is read from the client it is placed into an internal buffer for fast access. This controls the size of that buffer. Larger values means more speed, @@ -409,7 +408,10 @@ typedef struct { - /* The metadata type. Use this to know how to interpret the data below. */ + /* + The metadata type. Use this to know how to interpret the data below. Will be set to one of the + DRFLAC_METADATA_BLOCK_TYPE_* tokens. + */ drflac_uint32 type; /* @@ -553,7 +555,8 @@ Remarks ------- -Use pMetadata->type to determine which metadata block is being handled and how to read the data. +Use pMetadata->type to determine which metadata block is being handled and how to read the data. This +will be set to one of the DRFLAC_METADATA_BLOCK_TYPE_* tokens. */ typedef void (* drflac_meta_proc)(void* pUserData, drflac_metadata* pMetadata); @@ -798,6 +801,8 @@ The STREAMINFO block must be present for this to succeed. Use `drflac_open_relaxed()` to open a FLAC stream where the header may not be present. +Use `drflac_open_with_metadata()` if you need access to metadata. + Seek Also --------- @@ -844,6 +849,8 @@ Opening in relaxed mode will continue reading data from onRead until it finds a valid frame. If a frame is never found it will continue forever. To abort, force your `onRead` callback to return 0, which dr_flac will use as an indicator that the end of the stream was found. + +Use `drflac_open_with_metadata_relaxed()` if you need access to metadata. */ DRFLAC_API drflac* drflac_open_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_container container, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); @@ -883,7 +890,9 @@ This is slower than `drflac_open()`, so avoid this one if you don't need metadata. Internally, this will allocate and free memory on the heap for every metadata block except for STREAMINFO and PADDING blocks. -The caller is notified of the metadata via the `onMeta` callback. All metadata blocks will be handled before the function returns. +The caller is notified of the metadata via the `onMeta` callback. All metadata blocks will be handled before the function returns. This callback takes a +pointer to a `drflac_metadata` object which is a union containing the data of all relevant metadata blocks. Use the `type` member to discriminate against +the different metadata types. The STREAMINFO block must be present for this to succeed. Use `drflac_open_with_metadata_relaxed()` to open a FLAC stream where the header may not be present. @@ -1316,9 +1325,11 @@ ************************************************************************************************************************************************************ ************************************************************************************************************************************************************/ #if defined(DR_FLAC_IMPLEMENTATION) || defined(DRFLAC_IMPLEMENTATION) +#ifndef dr_flac_c +#define dr_flac_c /* Disable some annoying warnings. */ -#if defined(__GNUC__) +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #if __GNUC__ >= 7 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" @@ -1329,6 +1340,9 @@ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif + #ifndef _DEFAULT_SOURCE + #define _DEFAULT_SOURCE + #endif #ifndef __USE_BSD #define __USE_BSD #endif @@ -1353,6 +1367,8 @@ #else #define DRFLAC_INLINE inline __attribute__((always_inline)) #endif +#elif defined(__WATCOMC__) + #define DRFLAC_INLINE __inline #else #define DRFLAC_INLINE #endif @@ -1362,11 +1378,19 @@ #define DRFLAC_X64 #elif defined(__i386) || defined(_M_IX86) #define DRFLAC_X86 -#elif defined(__arm__) || defined(_M_ARM) +#elif defined(__arm__) || defined(_M_ARM) || defined(_M_ARM64) #define DRFLAC_ARM #endif -/* Intrinsics Support */ +/* +Intrinsics Support + +There's a bug in GCC 4.2.x which results in an incorrect compilation error when using _mm_slli_epi32() where it complains with + + "error: shift must be an immediate" + +Unfortuantely dr_flac depends on this for a few things so we're just going to disable SSE on GCC 4.2 and below. +*/ #if !defined(DR_FLAC_NO_SIMD) #if defined(DRFLAC_X64) || defined(DRFLAC_X86) #if defined(_MSC_VER) && !defined(__clang__) @@ -1377,7 +1401,7 @@ #if _MSC_VER >= 1600 && !defined(DRFLAC_NO_SSE41) /* 2010 */ #define DRFLAC_SUPPORT_SSE41 #endif - #else + #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) /* Assume GNUC-style. */ #if defined(__SSE2__) && !defined(DRFLAC_NO_SSE2) #define DRFLAC_SUPPORT_SSE2 @@ -1517,7 +1541,7 @@ } -#if defined(_MSC_VER) && _MSC_VER >= 1500 && (defined(DRFLAC_X86) || defined(DRFLAC_X64)) +#if defined(_MSC_VER) && _MSC_VER >= 1500 && (defined(DRFLAC_X86) || defined(DRFLAC_X64)) && !defined(__clang__) #define DRFLAC_HAS_LZCNT_INTRINSIC #elif (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) #define DRFLAC_HAS_LZCNT_INTRINSIC @@ -1529,7 +1553,7 @@ #endif #endif -#if defined(_MSC_VER) && _MSC_VER >= 1400 +#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(__clang__) #define DRFLAC_HAS_BYTESWAP16_INTRINSIC #define DRFLAC_HAS_BYTESWAP32_INTRINSIC #define DRFLAC_HAS_BYTESWAP64_INTRINSIC @@ -1553,6 +1577,27 @@ #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define DRFLAC_HAS_BYTESWAP16_INTRINSIC #endif +#elif defined(__WATCOMC__) && defined(__386__) + #define DRFLAC_HAS_BYTESWAP16_INTRINSIC + #define DRFLAC_HAS_BYTESWAP32_INTRINSIC + #define DRFLAC_HAS_BYTESWAP64_INTRINSIC + extern __inline drflac_uint16 _watcom_bswap16(drflac_uint16); + extern __inline drflac_uint32 _watcom_bswap32(drflac_uint32); + extern __inline drflac_uint64 _watcom_bswap64(drflac_uint64); +#pragma aux _watcom_bswap16 = \ + "xchg al, ah" \ + parm [ax] \ + modify [ax]; +#pragma aux _watcom_bswap32 = \ + "bswap eax" \ + parm [eax] \ + modify [eax]; +#pragma aux _watcom_bswap64 = \ + "bswap eax" \ + "bswap edx" \ + "xchg eax,edx" \ + parm [eax edx] \ + modify [eax edx]; #endif @@ -1671,7 +1716,7 @@ } } -DRFLAC_API const char* drflac_version_string() +DRFLAC_API const char* drflac_version_string(void) { return DRFLAC_VERSION_STRING; } @@ -1772,10 +1817,12 @@ static DRFLAC_INLINE drflac_uint16 drflac__swap_endian_uint16(drflac_uint16 n) { #ifdef DRFLAC_HAS_BYTESWAP16_INTRINSIC - #if defined(_MSC_VER) + #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ushort(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap16(n); + #elif defined(__WATCOMC__) && defined(__386__) + return _watcom_bswap16(n); #else #error "This compiler does not support the byte swap intrinsic." #endif @@ -1788,7 +1835,7 @@ static DRFLAC_INLINE drflac_uint32 drflac__swap_endian_uint32(drflac_uint32 n) { #ifdef DRFLAC_HAS_BYTESWAP32_INTRINSIC - #if defined(_MSC_VER) + #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(DRFLAC_64BIT) /* <-- 64-bit inline assembly has not been tested, so disabling for now. */ @@ -1805,6 +1852,8 @@ #else return __builtin_bswap32(n); #endif + #elif defined(__WATCOMC__) && defined(__386__) + return _watcom_bswap32(n); #else #error "This compiler does not support the byte swap intrinsic." #endif @@ -1819,22 +1868,25 @@ static DRFLAC_INLINE drflac_uint64 drflac__swap_endian_uint64(drflac_uint64 n) { #ifdef DRFLAC_HAS_BYTESWAP64_INTRINSIC - #if defined(_MSC_VER) + #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_uint64(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap64(n); + #elif defined(__WATCOMC__) && defined(__386__) + return _watcom_bswap64(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else - return ((n & (drflac_uint64)0xFF00000000000000) >> 56) | - ((n & (drflac_uint64)0x00FF000000000000) >> 40) | - ((n & (drflac_uint64)0x0000FF0000000000) >> 24) | - ((n & (drflac_uint64)0x000000FF00000000) >> 8) | - ((n & (drflac_uint64)0x00000000FF000000) << 8) | - ((n & (drflac_uint64)0x0000000000FF0000) << 24) | - ((n & (drflac_uint64)0x000000000000FF00) << 40) | - ((n & (drflac_uint64)0x00000000000000FF) << 56); + /* Weird "<< 32" bitshift is required for C89 because it doesn't support 64-bit constants. Should be optimized out by a good compiler. */ + return ((n & ((drflac_uint64)0xFF000000 << 32)) >> 56) | + ((n & ((drflac_uint64)0x00FF0000 << 32)) >> 40) | + ((n & ((drflac_uint64)0x0000FF00 << 32)) >> 24) | + ((n & ((drflac_uint64)0x000000FF << 32)) >> 8) | + ((n & ((drflac_uint64)0xFF000000 )) << 8) | + ((n & ((drflac_uint64)0x00FF0000 )) << 24) | + ((n & ((drflac_uint64)0x0000FF00 )) << 40) | + ((n & ((drflac_uint64)0x000000FF )) << 56); #endif } @@ -2388,7 +2440,6 @@ static drflac_bool32 drflac__read_int32(drflac_bs* bs, unsigned int bitCount, drflac_int32* pResult) { drflac_uint32 result; - drflac_uint32 signbit; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pResult != NULL); @@ -2399,8 +2450,12 @@ return DRFLAC_FALSE; } - signbit = ((result >> (bitCount-1)) & 0x01); - result |= (~signbit + 1) << bitCount; + /* Do not attempt to shift by 32 as it's undefined. */ + if (bitCount < 32) { + drflac_uint32 signbit; + signbit = ((result >> (bitCount-1)) & 0x01); + result |= (~signbit + 1) << bitCount; + } *pResult = (drflac_int32)result; return DRFLAC_TRUE; @@ -2623,9 +2678,12 @@ #if defined(DRFLAC_HAS_LZCNT_INTRINSIC) #define DRFLAC_IMPLEMENT_CLZ_LZCNT #endif -#if defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(DRFLAC_X64) || defined(DRFLAC_X86)) +#if defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(DRFLAC_X64) || defined(DRFLAC_X86)) && !defined(__clang__) #define DRFLAC_IMPLEMENT_CLZ_MSVC #endif +#if defined(__WATCOMC__) && defined(__386__) +#define DRFLAC_IMPLEMENT_CLZ_WATCOM +#endif static DRFLAC_INLINE drflac_uint32 drflac__clz_software(drflac_cache_t x) { @@ -2678,7 +2736,25 @@ static DRFLAC_INLINE drflac_uint32 drflac__clz_lzcnt(drflac_cache_t x) { -#if defined(_MSC_VER) && !defined(__clang__) + /* + It's critical for competitive decoding performance that this function be highly optimal. With MSVC we can use the __lzcnt64() and __lzcnt() intrinsics + to achieve good performance, however on GCC and Clang it's a little bit more annoying. The __builtin_clzl() and __builtin_clzll() intrinsics leave + it undefined as to the return value when `x` is 0. We need this to be well defined as returning 32 or 64, depending on whether or not it's a 32- or + 64-bit build. To work around this we would need to add a conditional to check for the x = 0 case, but this creates unnecessary inefficiency. To work + around this problem I have written some inline assembly to emit the LZCNT (x86) or CLZ (ARM) instruction directly which removes the need to include + the conditional. This has worked well in the past, but for some reason Clang's MSVC compatible driver, clang-cl, does not seem to be handling this + in the same way as the normal Clang driver. It seems that `clang-cl` is just outputting the wrong results sometimes, maybe due to some register + getting clobbered? + + I'm not sure if this is a bug with dr_flac's inlined assembly (most likely), a bug in `clang-cl` or just a misunderstanding on my part with inline + assembly rules for `clang-cl`. If somebody can identify an error in dr_flac's inlined assembly I'm happy to get that fixed. + + Fortunately there is an easy workaround for this. Clang implements MSVC-specific intrinsics for compatibility. It also defines _MSC_VER for extra + compatibility. We can therefore just check for _MSC_VER and use the MSVC intrinsic which, fortunately for us, Clang supports. It would still be nice + to know how to fix the inlined assembly for correctness sake, however. + */ + +#if defined(_MSC_VER) /*&& !defined(__clang__)*/ /* <-- Intentionally wanting Clang to use the MSVC __lzcnt64/__lzcnt intrinsics due to above ^. */ #ifdef DRFLAC_64BIT return (drflac_uint32)__lzcnt64(x); #else @@ -2690,7 +2766,7 @@ { drflac_uint64 r; __asm__ __volatile__ ( - "lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) + "lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return (drflac_uint32)r; @@ -2699,7 +2775,7 @@ { drflac_uint32 r; __asm__ __volatile__ ( - "lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) + "lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return r; @@ -2755,6 +2831,16 @@ } #endif +#ifdef DRFLAC_IMPLEMENT_CLZ_WATCOM +static __inline drflac_uint32 drflac__clz_watcom (drflac_uint32); +#pragma aux drflac__clz_watcom = \ + "bsr eax, eax" \ + "xor eax, 31" \ + parm [eax] nomemory \ + value [eax] \ + modify exact [eax] nomemory; +#endif + static DRFLAC_INLINE drflac_uint32 drflac__clz(drflac_cache_t x) { #ifdef DRFLAC_IMPLEMENT_CLZ_LZCNT @@ -2765,6 +2851,8 @@ { #ifdef DRFLAC_IMPLEMENT_CLZ_MSVC return drflac__clz_msvc(x); +#elif defined(DRFLAC_IMPLEMENT_CLZ_WATCOM) + return (x == 0) ? sizeof(x)*8 : drflac__clz_watcom(x); #else return drflac__clz_software(x); #endif @@ -3148,7 +3236,6 @@ drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); - DRFLAC_ASSERT(count > 0); DRFLAC_ASSERT(pSamplesOut != NULL); for (i = 0; i < count; ++i) { @@ -3530,7 +3617,6 @@ drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); - DRFLAC_ASSERT(count > 0); DRFLAC_ASSERT(pSamplesOut != NULL); (void)bitsPerSample; @@ -3576,7 +3662,6 @@ drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); - DRFLAC_ASSERT(count > 0); DRFLAC_ASSERT(pSamplesOut != NULL); if (order == 0) { @@ -4130,7 +4215,6 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { DRFLAC_ASSERT(bs != NULL); - DRFLAC_ASSERT(count > 0); DRFLAC_ASSERT(pSamplesOut != NULL); /* In my testing the order is rarely > 12, so in this case I'm going to simplify the SSE implementation by only handling order <= 12. */ @@ -4629,7 +4713,6 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { DRFLAC_ASSERT(bs != NULL); - DRFLAC_ASSERT(count > 0); DRFLAC_ASSERT(pSamplesOut != NULL); /* In my testing the order is rarely > 12, so in this case I'm going to simplify the NEON implementation by only handling order <= 12. */ @@ -4672,7 +4755,6 @@ drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); - DRFLAC_ASSERT(count > 0); for (i = 0; i < count; ++i) { if (!drflac__seek_rice_parts(bs, riceParam)) { @@ -4688,7 +4770,6 @@ drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); - DRFLAC_ASSERT(count > 0); DRFLAC_ASSERT(unencodedBitsPerSample <= 31); /* <-- unencodedBitsPerSample is a 5 bit number, so cannot exceed 31. */ DRFLAC_ASSERT(pSamplesOut != NULL); @@ -4752,7 +4833,7 @@ } /* Validation check. */ - if ((blockSize / (1 << partitionOrder)) <= order) { + if ((blockSize / (1 << partitionOrder)) < order) { return DRFLAC_FALSE; } @@ -4991,6 +5072,18 @@ return DRFLAC_FALSE; } + /* + From the FLAC specification: + + Quantized linear predictor coefficient shift needed in bits (NOTE: this number is signed two's-complement) + + Emphasis on the "signed two's-complement". In practice there does not seem to be any encoders nor decoders supporting negative shifts. For now dr_flac is + not going to support negative shifts as I don't have any reference files. However, when a reference file comes through I will consider adding support. + */ + if (lpcShift < 0) { + return DRFLAC_FALSE; + } + DRFLAC_ZERO_MEMORY(coefficients, sizeof(coefficients)); for (i = 0; i < lpcOrder; ++i) { if (!drflac__read_int32(bs, lpcPrecision, coefficients + i)) { @@ -5112,7 +5205,8 @@ DRFLAC_ASSERT(blockSize > 0); if (blockSize == 1) { header->blockSizeInPCMFrames = 192; - } else if (blockSize >= 2 && blockSize <= 5) { + } else if (blockSize <= 5) { + DRFLAC_ASSERT(blockSize >= 2); header->blockSizeInPCMFrames = 576 * (1 << (blockSize - 2)); } else if (blockSize == 6) { if (!drflac__read_uint16(bs, 8, &header->blockSizeInPCMFrames)) { @@ -5706,6 +5800,9 @@ *pLastSuccessfulSeekOffset = pFlac->firstFLACFramePosInBytes; for (;;) { + /* After rangeLo == rangeHi == targetByte fails, we need to break out. */ + drflac_uint64 lastTargetByte = targetByte; + /* When seeking to a byte, failure probably means we've attempted to seek beyond the end of the stream. To counter this we just halve it each attempt. */ if (!drflac__seek_to_byte(&pFlac->bs, targetByte)) { /* If we couldn't even seek to the first byte in the stream we have a problem. Just abandon the whole thing. */ @@ -5746,6 +5843,11 @@ } #endif } + + /* We already tried this byte and there are no more to try, break out. */ + if(targetByte == lastTargetByte) { + return DRFLAC_FALSE; + } } /* The current PCM frame needs to be updated based on the frame we just seeked to. */ @@ -8258,7 +8360,7 @@ static drflac_result drflac_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) { -#if _MSC_VER && _MSC_VER >= 1400 +#if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err; #endif @@ -8270,7 +8372,7 @@ return DRFLAC_INVALID_ARGS; } -#if _MSC_VER && _MSC_VER >= 1400 +#if defined(_MSC_VER) && _MSC_VER >= 1400 err = fopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return drflac_result_from_errno(err); @@ -8305,12 +8407,13 @@ * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). + * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) - #if defined(_MSC_VER) || defined(__MINGW64__) || !defined(__STRICT_ANSI__) + #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define DRFLAC_HAS_WFOPEN #endif #endif @@ -11280,6 +11383,7 @@ return drflac__seek_to_first_frame(pFlac); } else { drflac_bool32 wasSuccessful = DRFLAC_FALSE; + drflac_uint64 originalPCMFrame = pFlac->currentPCMFrame; /* Clamp the sample to the end. */ if (pcmFrameIndex > pFlac->totalPCMFrameCount) { @@ -11337,7 +11441,16 @@ } } - pFlac->currentPCMFrame = pcmFrameIndex; + if (wasSuccessful) { + pFlac->currentPCMFrame = pcmFrameIndex; + } else { + /* Seek failed. Try putting the decoder back to it's original state. */ + if (drflac_seek_to_pcm_frame(pFlac, originalPCMFrame) == DRFLAC_FALSE) { + /* Failed to seek back to the original PCM frame. Fall back to 0. */ + drflac_seek_to_pcm_frame(pFlac, 0); + } + } + return wasSuccessful; } } @@ -11728,15 +11841,66 @@ return DRFLAC_TRUE; } -#if defined(__GNUC__) +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif +#endif /* dr_flac_c */ #endif /* DR_FLAC_IMPLEMENTATION */ /* REVISION HISTORY ================ +v0.12.29 - 2021-04-02 + - Fix a bug where the running PCM frame index is set to an invalid value when over-seeking. + - Fix a decoding error due to an incorrect validation check. + +v0.12.28 - 2021-02-21 + - Fix a warning due to referencing _MSC_VER when it is undefined. + +v0.12.27 - 2021-01-31 + - Fix a static analysis warning. + +v0.12.26 - 2021-01-17 + - Fix a compilation warning due to _BSD_SOURCE being deprecated. + +v0.12.25 - 2020-12-26 + - Update documentation. + +v0.12.24 - 2020-11-29 + - Fix ARM64/NEON detection when compiling with MSVC. + +v0.12.23 - 2020-11-21 + - Fix compilation with OpenWatcom. + +v0.12.22 - 2020-11-01 + - Fix an error with the previous release. + +v0.12.21 - 2020-11-01 + - Fix a possible deadlock when seeking. + - Improve compiler support for older versions of GCC. + +v0.12.20 - 2020-09-08 + - Fix a compilation error on older compilers. + +v0.12.19 - 2020-08-30 + - Fix a bug due to an undefined 32-bit shift. + +v0.12.18 - 2020-08-14 + - Fix a crash when compiling with clang-cl. + +v0.12.17 - 2020-08-02 + - Simplify sized types. + +v0.12.16 - 2020-07-25 + - Fix a compilation warning. + +v0.12.15 - 2020-07-06 + - Check for negative LPC shifts and return an error. + +v0.12.14 - 2020-06-23 + - Add include guard for the implementation section. + v0.12.13 - 2020-05-16 - Add compile-time and run-time version querying. - DRFLAC_VERSION_MINOR diff -Nru dosbox-staging-0.76.0/src/libs/decoders/dr_mp3.h dosbox-staging-0.77.0/src/libs/decoders/dr_mp3.h --- dosbox-staging-0.76.0/src/libs/decoders/dr_mp3.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/dr_mp3.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,6 @@ /* MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file. -dr_mp3 - v0.6.11 - 2020-05-26 +dr_mp3 - v0.6.26 - 2021-01-31 David Reid - mackron@gmail.com @@ -95,45 +95,44 @@ #define DRMP3_VERSION_MAJOR 0 #define DRMP3_VERSION_MINOR 6 -#define DRMP3_VERSION_REVISION 11 +#define DRMP3_VERSION_REVISION 26 #define DRMP3_VERSION_STRING DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION) #include /* For size_t. */ -/* Sized types. Prefer built-in types. Fall back to stdint. */ -#ifdef _MSC_VER - #if defined(__clang__) +/* Sized types. */ +typedef signed char drmp3_int8; +typedef unsigned char drmp3_uint8; +typedef signed short drmp3_int16; +typedef unsigned short drmp3_uint16; +typedef signed int drmp3_int32; +typedef unsigned int drmp3_uint32; +#if defined(_MSC_VER) + typedef signed __int64 drmp3_int64; + typedef unsigned __int64 drmp3_uint64; +#else + #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wlanguage-extension-token" - #pragma GCC diagnostic ignored "-Wlong-long" - #pragma GCC diagnostic ignored "-Wc++11-long-long" - #endif - typedef signed __int8 drmp3_int8; - typedef unsigned __int8 drmp3_uint8; - typedef signed __int16 drmp3_int16; - typedef unsigned __int16 drmp3_uint16; - typedef signed __int32 drmp3_int32; - typedef unsigned __int32 drmp3_uint32; - typedef signed __int64 drmp3_int64; - typedef unsigned __int64 drmp3_uint64; - #if defined(__clang__) + #pragma GCC diagnostic ignored "-Wlong-long" + #if defined(__clang__) + #pragma GCC diagnostic ignored "-Wc++11-long-long" + #endif + #endif + typedef signed long long drmp3_int64; + typedef unsigned long long drmp3_uint64; + #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif +#endif +#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + typedef drmp3_uint64 drmp3_uintptr; #else - #include - typedef int8_t drmp3_int8; - typedef uint8_t drmp3_uint8; - typedef int16_t drmp3_int16; - typedef uint16_t drmp3_uint16; - typedef int32_t drmp3_int32; - typedef uint32_t drmp3_uint32; - typedef int64_t drmp3_int64; - typedef uint64_t drmp3_uint64; -#endif -typedef drmp3_uint8 drmp3_bool8; -typedef drmp3_uint32 drmp3_bool32; -#define DRMP3_TRUE 1 -#define DRMP3_FALSE 0 + typedef drmp3_uint32 drmp3_uintptr; +#endif +typedef drmp3_uint8 drmp3_bool8; +typedef drmp3_uint32 drmp3_bool32; +#define DRMP3_TRUE 1 +#define DRMP3_FALSE 0 #if !defined(DRMP3_API) #if defined(DRMP3_DLL) @@ -240,13 +239,15 @@ #else #define DRMP3_INLINE inline __attribute__((always_inline)) #endif +#elif defined(__WATCOMC__) + #define DRMP3_INLINE __inline #else #define DRMP3_INLINE #endif DRMP3_API void drmp3_version(drmp3_uint32* pMajor, drmp3_uint32* pMinor, drmp3_uint32* pRevision); -DRMP3_API const char* drmp3_version_string(); +DRMP3_API const char* drmp3_version_string(void); /* @@ -280,14 +281,6 @@ Main API (Pull API) =================== */ -#ifndef DRMP3_DEFAULT_CHANNELS -#define DRMP3_DEFAULT_CHANNELS 2 -#endif -#ifndef DRMP3_DEFAULT_SAMPLE_RATE -#define DRMP3_DEFAULT_SAMPLE_RATE 44100 -#endif - - typedef enum { drmp3_seek_origin_start, @@ -523,6 +516,9 @@ ************************************************************************************************************************************************************ ************************************************************************************************************************************************************/ #if defined(DR_MP3_IMPLEMENTATION) || defined(DRMP3_IMPLEMENTATION) +#ifndef dr_mp3_c +#define dr_mp3_c + #include #include #include /* For INT_MAX */ @@ -542,7 +538,7 @@ } } -DRMP3_API const char* drmp3_version_string() +DRMP3_API const char* drmp3_version_string(void) { return DRMP3_VERSION_STRING; } @@ -594,7 +590,7 @@ #if !defined(DR_MP3_NO_SIMD) -#if !defined(DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(_M_ARM64) || defined(__x86_64__) || defined(__aarch64__)) +#if !defined(DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64)) /* x64 always have SSE2, arm64 always have neon, no need for generic code */ #define DR_MP3_ONLY_SIMD #endif @@ -670,7 +666,7 @@ return g_have_simd - 1; #endif } -#elif defined(__ARM_NEON) || defined(__aarch64__) +#elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) #include #define DRMP3_HAVE_SSE 0 #define DRMP3_HAVE_SIMD 1 @@ -703,7 +699,7 @@ #endif -#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) +#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) #define DRMP3_HAVE_ARMV6 1 static __inline__ __attribute__((always_inline)) drmp3_int32 drmp3_clip_int16_arm(int32_t a) { @@ -711,6 +707,8 @@ __asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a)); return x; } +#else +#define DRMP3_HAVE_ARMV6 0 #endif @@ -1864,7 +1862,7 @@ } else #endif #ifdef DR_MP3_ONLY_SIMD - {} + {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */ #else for (; k < n; k++) { @@ -2097,7 +2095,7 @@ } else #endif #ifdef DR_MP3_ONLY_SIMD - {} + {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */ #else for (i = 14; i >= 0; i--) { @@ -2650,7 +2648,10 @@ size_t bytesRead; /* First we need to move the data down. */ - memmove(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); + if (pMP3->pData != NULL) { + memmove(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); + } + pMP3->dataConsumed = 0; if (pMP3->dataCapacity < DRMP3_DATA_CHUNK_SIZE) { @@ -2684,6 +2685,9 @@ return 0; /* File too big. */ } + DRMP3_ASSERT(pMP3->pData != NULL); + DRMP3_ASSERT(pMP3->dataCapacity > 0); + pcmFramesRead = drmp3dec_decode_frame(&pMP3->decoder, pMP3->pData + pMP3->dataConsumed, (int)pMP3->dataSize, pPCMFrames, &info); /* <-- Safe size_t -> int conversion thanks to the check above. */ /* Consume the data. */ @@ -2819,7 +2823,7 @@ /* Decode the first frame to confirm that it is indeed a valid MP3 stream. */ if (!drmp3_decode_next_frame(pMP3)) { - drmp3_uninit(pMP3); + drmp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks); /* The call above may have allocated memory. Need to make sure it's freed before aborting. */ return DRMP3_FALSE; /* Not a valid MP3 stream. */ } @@ -3368,12 +3372,13 @@ * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). + * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) - #if defined(_MSC_VER) || defined(__MINGW64__) || !defined(__STRICT_ANSI__) + #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define DRMP3_HAS_WFOPEN #endif #endif @@ -3474,22 +3479,38 @@ DRMP3_API drmp3_bool32 drmp3_init_file(drmp3* pMP3, const char* pFilePath, const drmp3_allocation_callbacks* pAllocationCallbacks) { + drmp3_bool32 result; FILE* pFile; + if (drmp3_fopen(&pFile, pFilePath, "rb") != DRMP3_SUCCESS) { return DRMP3_FALSE; } - return drmp3_init(pMP3, drmp3__on_read_stdio, drmp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); + result = drmp3_init(pMP3, drmp3__on_read_stdio, drmp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); + if (result != DRMP3_TRUE) { + fclose(pFile); + return result; + } + + return DRMP3_TRUE; } DRMP3_API drmp3_bool32 drmp3_init_file_w(drmp3* pMP3, const wchar_t* pFilePath, const drmp3_allocation_callbacks* pAllocationCallbacks) { + drmp3_bool32 result; FILE* pFile; + if (drmp3_wfopen(&pFile, pFilePath, L"rb", pAllocationCallbacks) != DRMP3_SUCCESS) { return DRMP3_FALSE; } - return drmp3_init(pMP3, drmp3__on_read_stdio, drmp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); + result = drmp3_init(pMP3, drmp3__on_read_stdio, drmp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); + if (result != DRMP3_TRUE) { + fclose(pFile); + return result; + } + + return DRMP3_TRUE; } #endif @@ -3501,7 +3522,11 @@ #ifndef DR_MP3_NO_STDIO if (pMP3->onRead == drmp3__on_read_stdio) { - fclose((FILE*)pMP3->pUserData); + FILE* pFile = (FILE*)pMP3->pUserData; + if (pFile != NULL) { + fclose(pFile); + pMP3->pUserData = NULL; /* Make sure the file handle is cleared to NULL to we don't attempt to close it a second time. */ + } } #endif @@ -3642,7 +3667,7 @@ break; } - drmp3_s16_to_f32((float*)DRMP3_OFFSET_PTR(pBufferOut, sizeof(drmp3_int16) * totalPCMFramesRead * pMP3->channels), pTempS16, framesJustRead * pMP3->channels); + drmp3_s16_to_f32((float*)DRMP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalPCMFramesRead * pMP3->channels), pTempS16, framesJustRead * pMP3->channels); totalPCMFramesRead += framesJustRead; } @@ -4339,7 +4364,8 @@ } } -#endif /*DR_MP3_IMPLEMENTATION*/ +#endif /* dr_mp3_c */ +#endif /*DR_MP3_IMPLEMENTATION*/ /* DIFFERENCES BETWEEN minimp3 AND dr_mp3 @@ -4424,6 +4450,51 @@ /* REVISION HISTORY ================ +v0.6.26 - 2021-01-31 + - Bring up to date with minimp3. + +v0.6.25 - 2020-12-26 + - Remove DRMP3_DEFAULT_CHANNELS and DRMP3_DEFAULT_SAMPLE_RATE which are leftovers from some removed APIs. + +v0.6.24 - 2020-12-07 + - Fix a typo in version date for 0.6.23. + +v0.6.23 - 2020-12-03 + - Fix an error where a file can be closed twice when initialization of the decoder fails. + +v0.6.22 - 2020-12-02 + - Fix an error where it's possible for a file handle to be left open when initialization of the decoder fails. + +v0.6.21 - 2020-11-28 + - Bring up to date with minimp3. + +v0.6.20 - 2020-11-21 + - Fix compilation with OpenWatcom. + +v0.6.19 - 2020-11-13 + - Minor code clean up. + +v0.6.18 - 2020-11-01 + - Improve compiler support for older versions of GCC. + +v0.6.17 - 2020-09-28 + - Bring up to date with minimp3. + +v0.6.16 - 2020-08-02 + - Simplify sized types. + +v0.6.15 - 2020-07-25 + - Fix a compilation warning. + +v0.6.14 - 2020-07-23 + - Fix undefined behaviour with memmove(). + +v0.6.13 - 2020-07-06 + - Fix a bug when converting from s16 to f32 in drmp3_read_pcm_frames_f32(). + +v0.6.12 - 2020-06-23 + - Add include guard for the implementation section. + v0.6.11 - 2020-05-26 - Fix use of uninitialized variable error. diff -Nru dosbox-staging-0.76.0/src/libs/decoders/dr_wav.h dosbox-staging-0.77.0/src/libs/decoders/dr_wav.h --- dosbox-staging-0.76.0/src/libs/decoders/dr_wav.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/dr_wav.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,6 @@ /* WAV audio loader and writer. Choice of public domain or MIT-0. See license statements at the end of this file. -dr_wav - v0.12.4 - 2020-05-16 +dr_wav - v0.12.20 - 2021-06-11 David Reid - mackron@gmail.com @@ -15,10 +15,10 @@ Changes to Chunk Callback ------------------------- -dr_wav supports the ability to fire a callback when a chunk is encounted (except for WAVE and FMT chunks). The callback has been update to include both the +dr_wav supports the ability to fire a callback when a chunk is encounted (except for WAVE and FMT chunks). The callback has been updated to include both the container (RIFF or Wave64) and the FMT chunk which contains information about the format of the data in the wave file. -Previously, there was no direct way to determine the container, and therefore no way discriminate against the different IDs in the chunk header (RIFF and +Previously, there was no direct way to determine the container, and therefore no way to discriminate against the different IDs in the chunk header (RIFF and Wave64 containers encode chunk ID's differently). The `container` parameter can be used to know which ID to use. Sometimes it can be useful to know the data format at the time the chunk callback is fired. A pointer to a `drwav_fmt` object is now passed into the chunk @@ -65,7 +65,7 @@ ... - drwav_free(pSampleData); + drwav_free(pSampleData, NULL); ``` The examples above use versions of the API that convert the audio data to a consistent format (32-bit signed PCM, in this case), but you can still output the @@ -144,45 +144,44 @@ #define DRWAV_VERSION_MAJOR 0 #define DRWAV_VERSION_MINOR 12 -#define DRWAV_VERSION_REVISION 4 +#define DRWAV_VERSION_REVISION 20 #define DRWAV_VERSION_STRING DRWAV_XSTRINGIFY(DRWAV_VERSION_MAJOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_MINOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_REVISION) #include /* For size_t. */ -/* Sized types. Prefer built-in types. Fall back to stdint. */ -#ifdef _MSC_VER - #if defined(__clang__) +/* Sized types. */ +typedef signed char drwav_int8; +typedef unsigned char drwav_uint8; +typedef signed short drwav_int16; +typedef unsigned short drwav_uint16; +typedef signed int drwav_int32; +typedef unsigned int drwav_uint32; +#if defined(_MSC_VER) + typedef signed __int64 drwav_int64; + typedef unsigned __int64 drwav_uint64; +#else + #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wlanguage-extension-token" - #pragma GCC diagnostic ignored "-Wlong-long" - #pragma GCC diagnostic ignored "-Wc++11-long-long" - #endif - typedef signed __int8 drwav_int8; - typedef unsigned __int8 drwav_uint8; - typedef signed __int16 drwav_int16; - typedef unsigned __int16 drwav_uint16; - typedef signed __int32 drwav_int32; - typedef unsigned __int32 drwav_uint32; - typedef signed __int64 drwav_int64; - typedef unsigned __int64 drwav_uint64; - #if defined(__clang__) + #pragma GCC diagnostic ignored "-Wlong-long" + #if defined(__clang__) + #pragma GCC diagnostic ignored "-Wc++11-long-long" + #endif + #endif + typedef signed long long drwav_int64; + typedef unsigned long long drwav_uint64; + #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif +#endif +#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + typedef drwav_uint64 drwav_uintptr; #else - #include - typedef int8_t drwav_int8; - typedef uint8_t drwav_uint8; - typedef int16_t drwav_int16; - typedef uint16_t drwav_uint16; - typedef int32_t drwav_int32; - typedef uint32_t drwav_uint32; - typedef int64_t drwav_int64; - typedef uint64_t drwav_uint64; + typedef drwav_uint32 drwav_uintptr; #endif -typedef drwav_uint8 drwav_bool8; -typedef drwav_uint32 drwav_bool32; -#define DRWAV_TRUE 1 -#define DRWAV_FALSE 0 +typedef drwav_uint8 drwav_bool8; +typedef drwav_uint32 drwav_bool32; +#define DRWAV_TRUE 1 +#define DRWAV_FALSE 0 #if !defined(DRWAV_API) #if defined(DRWAV_DLL) @@ -288,7 +287,7 @@ #define DRWAV_SEQUENTIAL 0x00000001 DRWAV_API void drwav_version(drwav_uint32* pMajor, drwav_uint32* pMinor, drwav_uint32* pRevision); -DRWAV_API const char* drwav_version_string(); +DRWAV_API const char* drwav_version_string(void); typedef enum { @@ -299,7 +298,8 @@ typedef enum { drwav_container_riff, - drwav_container_w64 + drwav_container_w64, + drwav_container_rf64 } drwav_container; typedef struct @@ -420,8 +420,8 @@ To read data from the chunk, call onRead(), passing in pReadSeekUserData as the first parameter. Do the same for seeking with onSeek(). The return value must be the total number of bytes you have read _plus_ seeked. -Use the `container` argument to discriminate the fields in `pChunkHeader->id`. If the container is `drwav_container_riff` you should use `id.fourcc`, -otherwise you should use `id.guid`. +Use the `container` argument to discriminate the fields in `pChunkHeader->id`. If the container is `drwav_container_riff` or `drwav_container_rf64` you should +use `id.fourcc`, otherwise you should use `id.guid`. The `pFMT` parameter can be used to determine the data format of the wave file. Use `drwav_fmt_get_format()` to get the sample format, which will be one of the `DR_WAVE_FORMAT_*` identifiers. @@ -535,7 +535,7 @@ /* The size in bytes of the data chunk. */ drwav_uint64 dataChunkDataSize; - /* The position in the stream of the first byte of the data chunk. This is used for seeking. */ + /* The position in the stream of the first data byte of the data chunk. This is used for seeking. */ drwav_uint64 dataChunkDataPos; /* The number of bytes remaining in the data chunk. */ @@ -674,6 +674,8 @@ Consider using drwav_read_pcm_frames_s16(), drwav_read_pcm_frames_s32() or drwav_read_pcm_frames_f32() for reading sample data in a consistent format. +pBufferOut can be NULL in which case a seek will be performed. + Returns the number of bytes actually read. */ DRWAV_API size_t drwav_read_raw(drwav* pWav, size_t bytesToRead, void* pBufferOut); @@ -689,6 +691,8 @@ This function will only work when sample data is of a fixed size and uncompressed. If you are using a compressed format consider using drwav_read_raw() or drwav_read_pcm_frames_s16/s32/f32(). + +pBufferOut can be NULL in which case a seek will be performed. */ DRWAV_API drwav_uint64 drwav_read_pcm_frames(drwav* pWav, drwav_uint64 framesToRead, void* pBufferOut); DRWAV_API drwav_uint64 drwav_read_pcm_frames_le(drwav* pWav, drwav_uint64 framesToRead, void* pBufferOut); @@ -728,6 +732,8 @@ /* Reads a chunk of audio data and converts it to signed 16-bit PCM samples. +pBufferOut can be NULL in which case a seek will be performed. + Returns the number of PCM frames actually read. If the return value is less than it means the end of the file has been reached. @@ -761,6 +767,8 @@ /* Reads a chunk of audio data and converts it to IEEE 32-bit floating point samples. +pBufferOut can be NULL in which case a seek will be performed. + Returns the number of PCM frames actually read. If the return value is less than it means the end of the file has been reached. @@ -794,6 +802,8 @@ /* Reads a chunk of audio data and converts it to signed 32-bit PCM samples. +pBufferOut can be NULL in which case a seek will be performed. + Returns the number of PCM frames actually read. If the return value is less than it means the end of the file has been reached. @@ -872,8 +882,8 @@ dr_wav will manage the memory allocations, however it is up to the caller to free the data with drwav_free(). -The buffer will remain allocated even after drwav_uninit() is called. Indeed, the buffer should not be -considered valid until after drwav_uninit() has been called anyway. +The buffer will remain allocated even after drwav_uninit() is called. The buffer should not be considered valid +until after drwav_uninit() has been called. */ DRWAV_API drwav_bool32 drwav_init_memory_write(drwav* pWav, void** ppData, size_t* pDataSize, const drwav_data_format* pFormat, const drwav_allocation_callbacks* pAllocationCallbacks); DRWAV_API drwav_bool32 drwav_init_memory_write_sequential(drwav* pWav, void** ppData, size_t* pDataSize, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, const drwav_allocation_callbacks* pAllocationCallbacks); @@ -943,6 +953,9 @@ ************************************************************************************************************************************************************ ************************************************************************************************************************************************************/ #if defined(DR_WAV_IMPLEMENTATION) || defined(DRWAV_IMPLEMENTATION) +#ifndef dr_wav_c +#define dr_wav_c + #include #include /* For memcpy(), memset() */ #include /* For INT_MAX */ @@ -1008,6 +1021,8 @@ #else #define DRWAV_INLINE inline __attribute__((always_inline)) #endif +#elif defined(__WATCOMC__) + #define DRWAV_INLINE __inline #else #define DRWAV_INLINE #endif @@ -1063,7 +1078,7 @@ } } -DRWAV_API const char* drwav_version_string() +DRWAV_API const char* drwav_version_string(void) { return DRWAV_VERSION_STRING; } @@ -1084,34 +1099,12 @@ static const drwav_uint8 drwavGUID_W64_RIFF[16] = {0x72,0x69,0x66,0x66, 0x2E,0x91, 0xCF,0x11, 0xA5,0xD6, 0x28,0xDB,0x04,0xC1,0x00,0x00}; /* 66666972-912E-11CF-A5D6-28DB04C10000 */ static const drwav_uint8 drwavGUID_W64_WAVE[16] = {0x77,0x61,0x76,0x65, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; /* 65766177-ACF3-11D3-8CD1-00C04F8EDB8A */ -static const drwav_uint8 drwavGUID_W64_JUNK[16] = {0x6A,0x75,0x6E,0x6B, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; /* 6B6E756A-ACF3-11D3-8CD1-00C04F8EDB8A */ +/*static const drwav_uint8 drwavGUID_W64_JUNK[16] = {0x6A,0x75,0x6E,0x6B, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A};*/ /* 6B6E756A-ACF3-11D3-8CD1-00C04F8EDB8A */ static const drwav_uint8 drwavGUID_W64_FMT [16] = {0x66,0x6D,0x74,0x20, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; /* 20746D66-ACF3-11D3-8CD1-00C04F8EDB8A */ static const drwav_uint8 drwavGUID_W64_FACT[16] = {0x66,0x61,0x63,0x74, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; /* 74636166-ACF3-11D3-8CD1-00C04F8EDB8A */ static const drwav_uint8 drwavGUID_W64_DATA[16] = {0x64,0x61,0x74,0x61, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; /* 61746164-ACF3-11D3-8CD1-00C04F8EDB8A */ static const drwav_uint8 drwavGUID_W64_SMPL[16] = {0x73,0x6D,0x70,0x6C, 0xF3,0xAC, 0xD3,0x11, 0x8C,0xD1, 0x00,0xC0,0x4F,0x8E,0xDB,0x8A}; /* 6C706D73-ACF3-11D3-8CD1-00C04F8EDB8A */ -static DRWAV_INLINE drwav_bool32 drwav__guid_equal(const drwav_uint8 a[16], const drwav_uint8 b[16]) -{ - int i; - for (i = 0; i < 16; i += 1) { - if (a[i] != b[i]) { - return DRWAV_FALSE; - } - } - - return DRWAV_TRUE; -} - -static DRWAV_INLINE drwav_bool32 drwav__fourcc_equal(const drwav_uint8* a, const char* b) -{ - return - a[0] == b[0] && - a[1] == b[1] && - a[2] == b[2] && - a[3] == b[3]; -} - - static DRWAV_INLINE int drwav__is_little_endian(void) { @@ -1125,37 +1118,6 @@ #endif } -static DRWAV_INLINE drwav_uint16 drwav__bytes_to_u16(const drwav_uint8* data) -{ - return (data[0] << 0) | (data[1] << 8); -} - -static DRWAV_INLINE drwav_int16 drwav__bytes_to_s16(const drwav_uint8* data) -{ - return (short)drwav__bytes_to_u16(data); -} - -static DRWAV_INLINE drwav_uint32 drwav__bytes_to_u32(const drwav_uint8* data) -{ - return (data[0] << 0) | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); -} - -static DRWAV_INLINE drwav_int32 drwav__bytes_to_s32(const drwav_uint8* data) -{ - return (drwav_int32)drwav__bytes_to_u32(data); -} - -static DRWAV_INLINE drwav_uint64 drwav__bytes_to_u64(const drwav_uint8* data) -{ - return - ((drwav_uint64)data[0] << 0) | ((drwav_uint64)data[1] << 8) | ((drwav_uint64)data[2] << 16) | ((drwav_uint64)data[3] << 24) | - ((drwav_uint64)data[4] << 32) | ((drwav_uint64)data[5] << 40) | ((drwav_uint64)data[6] << 48) | ((drwav_uint64)data[7] << 56); -} - -static DRWAV_INLINE drwav_int64 drwav__bytes_to_s64(const drwav_uint8* data) -{ - return (drwav_int64)drwav__bytes_to_u64(data); -} static DRWAV_INLINE void drwav__bytes_to_guid(const drwav_uint8* data, drwav_uint8* guid) { @@ -1224,14 +1186,15 @@ #error "This compiler does not support the byte swap intrinsic." #endif #else - return ((n & (drwav_uint64)0xFF00000000000000) >> 56) | - ((n & (drwav_uint64)0x00FF000000000000) >> 40) | - ((n & (drwav_uint64)0x0000FF0000000000) >> 24) | - ((n & (drwav_uint64)0x000000FF00000000) >> 8) | - ((n & (drwav_uint64)0x00000000FF000000) << 8) | - ((n & (drwav_uint64)0x0000000000FF0000) << 24) | - ((n & (drwav_uint64)0x000000000000FF00) << 40) | - ((n & (drwav_uint64)0x00000000000000FF) << 56); + /* Weird "<< 32" bitshift is required for C89 because it doesn't support 64-bit constants. Should be optimized out by a good compiler. */ + return ((n & ((drwav_uint64)0xFF000000 << 32)) >> 56) | + ((n & ((drwav_uint64)0x00FF0000 << 32)) >> 40) | + ((n & ((drwav_uint64)0x0000FF00 << 32)) >> 24) | + ((n & ((drwav_uint64)0x000000FF << 32)) >> 8) | + ((n & ((drwav_uint64)0xFF000000 )) << 8) | + ((n & ((drwav_uint64)0x00FF0000 )) << 24) | + ((n & ((drwav_uint64)0x0000FF00 )) << 40) | + ((n & ((drwav_uint64)0x000000FF )) << 56); #endif } @@ -1406,26 +1369,26 @@ } -static void* drwav__malloc_default(size_t sz, void* pUserData) +DRWAV_PRIVATE void* drwav__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return DRWAV_MALLOC(sz); } -static void* drwav__realloc_default(void* p, size_t sz, void* pUserData) +DRWAV_PRIVATE void* drwav__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return DRWAV_REALLOC(p, sz); } -static void drwav__free_default(void* p, void* pUserData) +DRWAV_PRIVATE void drwav__free_default(void* p, void* pUserData) { (void)pUserData; DRWAV_FREE(p); } -static void* drwav__malloc_from_callbacks(size_t sz, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE void* drwav__malloc_from_callbacks(size_t sz, const drwav_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; @@ -1443,7 +1406,7 @@ return NULL; } -static void* drwav__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE void* drwav__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const drwav_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; @@ -1473,7 +1436,7 @@ return NULL; } -static void drwav__free_from_callbacks(void* p, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE void drwav__free_from_callbacks(void* p, const drwav_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; @@ -1485,7 +1448,7 @@ } -static drwav_allocation_callbacks drwav_copy_allocation_callbacks_or_defaults(const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_allocation_callbacks drwav_copy_allocation_callbacks_or_defaults(const drwav_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { /* Copy. */ @@ -1509,23 +1472,23 @@ formatTag == DR_WAVE_FORMAT_DVI_ADPCM; } -static unsigned int drwav__chunk_padding_size_riff(drwav_uint64 chunkSize) +DRWAV_PRIVATE unsigned int drwav__chunk_padding_size_riff(drwav_uint64 chunkSize) { return (unsigned int)(chunkSize % 2); } -static unsigned int drwav__chunk_padding_size_w64(drwav_uint64 chunkSize) +DRWAV_PRIVATE unsigned int drwav__chunk_padding_size_w64(drwav_uint64 chunkSize) { return (unsigned int)(chunkSize % 8); } -static drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav_uint64 samplesToRead, drwav_int16* pBufferOut); -static drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uint64 samplesToRead, drwav_int16* pBufferOut); -static drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount); +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav_uint64 samplesToRead, drwav_int16* pBufferOut); +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uint64 samplesToRead, drwav_int16* pBufferOut); +DRWAV_PRIVATE drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount); -static drwav_result drwav__read_chunk_header(drwav_read_proc onRead, void* pUserData, drwav_container container, drwav_uint64* pRunningBytesReadOut, drwav_chunk_header* pHeaderOut) +DRWAV_PRIVATE drwav_result drwav__read_chunk_header(drwav_read_proc onRead, void* pUserData, drwav_container container, drwav_uint64* pRunningBytesReadOut, drwav_chunk_header* pHeaderOut) { - if (container == drwav_container_riff) { + if (container == drwav_container_riff || container == drwav_container_rf64) { drwav_uint8 sizeInBytes[4]; if (onRead(pUserData, pHeaderOut->id.fourcc, 4) != 4) { @@ -1536,7 +1499,7 @@ return DRWAV_INVALID_FILE; } - pHeaderOut->sizeInBytes = drwav__bytes_to_u32(sizeInBytes); + pHeaderOut->sizeInBytes = drwav_bytes_to_u32(sizeInBytes); pHeaderOut->paddingSize = drwav__chunk_padding_size_riff(pHeaderOut->sizeInBytes); *pRunningBytesReadOut += 8; } else { @@ -1550,7 +1513,7 @@ return DRWAV_INVALID_FILE; } - pHeaderOut->sizeInBytes = drwav__bytes_to_u64(sizeInBytes) - 24; /* <-- Subtract 24 because w64 includes the size of the header. */ + pHeaderOut->sizeInBytes = drwav_bytes_to_u64(sizeInBytes) - 24; /* <-- Subtract 24 because w64 includes the size of the header. */ pHeaderOut->paddingSize = drwav__chunk_padding_size_w64(pHeaderOut->sizeInBytes); *pRunningBytesReadOut += 24; } @@ -1558,7 +1521,7 @@ return DRWAV_SUCCESS; } -static drwav_bool32 drwav__seek_forward(drwav_seek_proc onSeek, drwav_uint64 offset, void* pUserData) +DRWAV_PRIVATE drwav_bool32 drwav__seek_forward(drwav_seek_proc onSeek, drwav_uint64 offset, void* pUserData) { drwav_uint64 bytesRemainingToSeek = offset; while (bytesRemainingToSeek > 0) { @@ -1578,7 +1541,7 @@ return DRWAV_TRUE; } -static drwav_bool32 drwav__seek_from_start(drwav_seek_proc onSeek, drwav_uint64 offset, void* pUserData) +DRWAV_PRIVATE drwav_bool32 drwav__seek_from_start(drwav_seek_proc onSeek, drwav_uint64 offset, void* pUserData) { if (offset <= 0x7FFFFFFF) { return onSeek(pUserData, (int)offset, drwav_seek_origin_start); @@ -1606,7 +1569,7 @@ } -static drwav_bool32 drwav__read_fmt(drwav_read_proc onRead, drwav_seek_proc onSeek, void* pUserData, drwav_container container, drwav_uint64* pRunningBytesReadOut, drwav_fmt* fmtOut) +DRWAV_PRIVATE drwav_bool32 drwav__read_fmt(drwav_read_proc onRead, drwav_seek_proc onSeek, void* pUserData, drwav_container container, drwav_uint64* pRunningBytesReadOut, drwav_fmt* fmtOut) { drwav_chunk_header header; drwav_uint8 fmt[16]; @@ -1617,7 +1580,7 @@ /* Skip non-fmt chunks. */ - while ((container == drwav_container_riff && !drwav__fourcc_equal(header.id.fourcc, "fmt ")) || (container == drwav_container_w64 && !drwav__guid_equal(header.id.guid, drwavGUID_W64_FMT))) { + while (((container == drwav_container_riff || container == drwav_container_rf64) && !drwav_fourcc_equal(header.id.fourcc, "fmt ")) || (container == drwav_container_w64 && !drwav_guid_equal(header.id.guid, drwavGUID_W64_FMT))) { if (!drwav__seek_forward(onSeek, header.sizeInBytes + header.paddingSize, pUserData)) { return DRWAV_FALSE; } @@ -1631,12 +1594,12 @@ /* Validation. */ - if (container == drwav_container_riff) { - if (!drwav__fourcc_equal(header.id.fourcc, "fmt ")) { + if (container == drwav_container_riff || container == drwav_container_rf64) { + if (!drwav_fourcc_equal(header.id.fourcc, "fmt ")) { return DRWAV_FALSE; } } else { - if (!drwav__guid_equal(header.id.guid, drwavGUID_W64_FMT)) { + if (!drwav_guid_equal(header.id.guid, drwavGUID_W64_FMT)) { return DRWAV_FALSE; } } @@ -1647,12 +1610,12 @@ } *pRunningBytesReadOut += sizeof(fmt); - fmtOut->formatTag = drwav__bytes_to_u16(fmt + 0); - fmtOut->channels = drwav__bytes_to_u16(fmt + 2); - fmtOut->sampleRate = drwav__bytes_to_u32(fmt + 4); - fmtOut->avgBytesPerSec = drwav__bytes_to_u32(fmt + 8); - fmtOut->blockAlign = drwav__bytes_to_u16(fmt + 12); - fmtOut->bitsPerSample = drwav__bytes_to_u16(fmt + 14); + fmtOut->formatTag = drwav_bytes_to_u16(fmt + 0); + fmtOut->channels = drwav_bytes_to_u16(fmt + 2); + fmtOut->sampleRate = drwav_bytes_to_u32(fmt + 4); + fmtOut->avgBytesPerSec = drwav_bytes_to_u32(fmt + 8); + fmtOut->blockAlign = drwav_bytes_to_u16(fmt + 12); + fmtOut->bitsPerSample = drwav_bytes_to_u16(fmt + 14); fmtOut->extendedSize = 0; fmtOut->validBitsPerSample = 0; @@ -1670,7 +1633,7 @@ bytesReadSoFar = 18; - fmtOut->extendedSize = drwav__bytes_to_u16(fmt_cbSize); + fmtOut->extendedSize = drwav_bytes_to_u16(fmt_cbSize); if (fmtOut->extendedSize > 0) { /* Simple validation. */ if (fmtOut->formatTag == DR_WAVE_FORMAT_EXTENSIBLE) { @@ -1685,8 +1648,8 @@ return DRWAV_FALSE; /* Expecting more data. */ } - fmtOut->validBitsPerSample = drwav__bytes_to_u16(fmtext + 0); - fmtOut->channelMask = drwav__bytes_to_u32(fmtext + 2); + fmtOut->validBitsPerSample = drwav_bytes_to_u16(fmtext + 0); + fmtOut->channelMask = drwav_bytes_to_u32(fmtext + 2); drwav__bytes_to_guid(fmtext + 6, fmtOut->subFormat); } else { if (!onSeek(pUserData, fmtOut->extendedSize, drwav_seek_origin_current)) { @@ -1716,7 +1679,7 @@ } -static size_t drwav__on_read(drwav_read_proc onRead, void* pUserData, void* pBufferOut, size_t bytesToRead, drwav_uint64* pCursor) +DRWAV_PRIVATE size_t drwav__on_read(drwav_read_proc onRead, void* pUserData, void* pBufferOut, size_t bytesToRead, drwav_uint64* pCursor) { size_t bytesRead; @@ -1729,7 +1692,7 @@ } #if 0 -static drwav_bool32 drwav__on_seek(drwav_seek_proc onSeek, void* pUserData, int offset, drwav_seek_origin origin, drwav_uint64* pCursor) +DRWAV_PRIVATE drwav_bool32 drwav__on_seek(drwav_seek_proc onSeek, void* pUserData, int offset, drwav_seek_origin origin, drwav_uint64* pCursor) { DRWAV_ASSERT(onSeek != NULL); DRWAV_ASSERT(pCursor != NULL); @@ -1750,7 +1713,7 @@ -static drwav_uint32 drwav_get_bytes_per_pcm_frame(drwav* pWav) +DRWAV_PRIVATE drwav_uint32 drwav_get_bytes_per_pcm_frame(drwav* pWav) { /* The bytes per frame is a bit ambiguous. It can be either be based on the bits per sample, or the block align. The way I'm doing it here @@ -1773,11 +1736,11 @@ if (pFMT->formatTag != DR_WAVE_FORMAT_EXTENSIBLE) { return pFMT->formatTag; } else { - return drwav__bytes_to_u16(pFMT->subFormat); /* Only the first two bytes are required. */ + return drwav_bytes_to_u16(pFMT->subFormat); /* Only the first two bytes are required. */ } } -static drwav_bool32 drwav_preinit(drwav* pWav, drwav_read_proc onRead, drwav_seek_proc onSeek, void* pReadSeekUserData, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_bool32 drwav_preinit(drwav* pWav, drwav_read_proc onRead, drwav_seek_proc onSeek, void* pReadSeekUserData, const drwav_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL || onRead == NULL || onSeek == NULL) { return DRWAV_FALSE; @@ -1796,7 +1759,7 @@ return DRWAV_TRUE; } -static drwav_bool32 drwav_init__internal(drwav* pWav, drwav_chunk_proc onChunk, void* pChunkUserData, drwav_uint32 flags) +DRWAV_PRIVATE drwav_bool32 drwav_init__internal(drwav* pWav, drwav_chunk_proc onChunk, void* pChunkUserData, drwav_uint32 flags) { /* This function assumes drwav_preinit() has been called beforehand. */ @@ -1805,9 +1768,9 @@ drwav_uint8 riff[4]; drwav_fmt fmt; unsigned short translatedFormatTag; - drwav_uint64 sampleCountFromFactChunk; drwav_bool32 foundDataChunk; - drwav_uint64 dataChunkSize; + drwav_uint64 dataChunkSize = 0; /* <-- Important! Don't explicitly set this to 0 anywhere else. Calculation of the size of the data chunk is performed in different paths depending on the container. */ + drwav_uint64 sampleCountFromFactChunk = 0; /* Same as dataChunkSize - make sure this is the only place this is initialized to 0. */ drwav_uint64 chunkSize; cursor = 0; @@ -1822,9 +1785,9 @@ The first 4 bytes can be used to identify the container. For RIFF files it will start with "RIFF" and for w64 it will start with "riff". */ - if (drwav__fourcc_equal(riff, "RIFF")) { + if (drwav_fourcc_equal(riff, "RIFF")) { pWav->container = drwav_container_riff; - } else if (drwav__fourcc_equal(riff, "riff")) { + } else if (drwav_fourcc_equal(riff, "riff")) { int i; drwav_uint8 riff2[12]; @@ -1840,12 +1803,14 @@ return DRWAV_FALSE; } } + } else if (drwav_fourcc_equal(riff, "RF64")) { + pWav->container = drwav_container_rf64; } else { return DRWAV_FALSE; /* Unknown or unsupported container. */ } - if (pWav->container == drwav_container_riff) { + if (pWav->container == drwav_container_riff || pWav->container == drwav_container_rf64) { drwav_uint8 chunkSizeBytes[4]; drwav_uint8 wave[4]; @@ -1854,15 +1819,21 @@ return DRWAV_FALSE; } - if (drwav__bytes_to_u32(chunkSizeBytes) < 36) { - return DRWAV_FALSE; /* Chunk size should always be at least 36 bytes. */ + if (pWav->container == drwav_container_riff) { + if (drwav_bytes_to_u32(chunkSizeBytes) < 36) { + return DRWAV_FALSE; /* Chunk size should always be at least 36 bytes. */ + } + } else { + if (drwav_bytes_to_u32(chunkSizeBytes) != 0xFFFFFFFF) { + return DRWAV_FALSE; /* Chunk size should always be set to -1/0xFFFFFFFF for RF64. The actual size is retrieved later. */ + } } if (drwav__on_read(pWav->onRead, pWav->pUserData, wave, sizeof(wave), &cursor) != sizeof(wave)) { return DRWAV_FALSE; } - if (!drwav__fourcc_equal(wave, "WAVE")) { + if (!drwav_fourcc_equal(wave, "WAVE")) { return DRWAV_FALSE; /* Expecting "WAVE". */ } } else { @@ -1874,7 +1845,7 @@ return DRWAV_FALSE; } - if (drwav__bytes_to_u64(chunkSizeBytes) < 80) { + if (drwav_bytes_to_u64(chunkSizeBytes) < 80) { return DRWAV_FALSE; } @@ -1882,12 +1853,60 @@ return DRWAV_FALSE; } - if (!drwav__guid_equal(wave, drwavGUID_W64_WAVE)) { + if (!drwav_guid_equal(wave, drwavGUID_W64_WAVE)) { return DRWAV_FALSE; } } + /* For RF64, the "ds64" chunk must come next, before the "fmt " chunk. */ + if (pWav->container == drwav_container_rf64) { + drwav_uint8 sizeBytes[8]; + drwav_uint64 bytesRemainingInChunk; + drwav_chunk_header header; + drwav_result result = drwav__read_chunk_header(pWav->onRead, pWav->pUserData, pWav->container, &cursor, &header); + if (result != DRWAV_SUCCESS) { + return DRWAV_FALSE; + } + + if (!drwav_fourcc_equal(header.id.fourcc, "ds64")) { + return DRWAV_FALSE; /* Expecting "ds64". */ + } + + bytesRemainingInChunk = header.sizeInBytes + header.paddingSize; + + /* We don't care about the size of the RIFF chunk - skip it. */ + if (!drwav__seek_forward(pWav->onSeek, 8, pWav->pUserData)) { + return DRWAV_FALSE; + } + bytesRemainingInChunk -= 8; + cursor += 8; + + + /* Next 8 bytes is the size of the "data" chunk. */ + if (drwav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) { + return DRWAV_FALSE; + } + bytesRemainingInChunk -= 8; + dataChunkSize = drwav_bytes_to_u64(sizeBytes); + + + /* Next 8 bytes is the same count which we would usually derived from the FACT chunk if it was available. */ + if (drwav__on_read(pWav->onRead, pWav->pUserData, sizeBytes, sizeof(sizeBytes), &cursor) != sizeof(sizeBytes)) { + return DRWAV_FALSE; + } + bytesRemainingInChunk -= 8; + sampleCountFromFactChunk = drwav_bytes_to_u64(sizeBytes); + + + /* Skip over everything else. */ + if (!drwav__seek_forward(pWav->onSeek, bytesRemainingInChunk, pWav->pUserData)) { + return DRWAV_FALSE; + } + cursor += bytesRemainingInChunk; + } + + /* The next bytes should be the "fmt " chunk. */ if (!drwav__read_fmt(pWav->onRead, pWav->onSeek, pWav->pUserData, pWav->container, &cursor, &fmt)) { return DRWAV_FALSE; /* Failed to read the "fmt " chunk. */ @@ -1905,13 +1924,10 @@ /* Translate the internal format. */ translatedFormatTag = fmt.formatTag; if (translatedFormatTag == DR_WAVE_FORMAT_EXTENSIBLE) { - translatedFormatTag = drwav__bytes_to_u16(fmt.subFormat + 0); + translatedFormatTag = drwav_bytes_to_u16(fmt.subFormat + 0); } - - sampleCountFromFactChunk = 0; - /* We need to enumerate over each chunk for two reasons: 1) The "data" chunk may not be the next one @@ -1920,7 +1936,6 @@ In order to correctly report each chunk back to the client we will need to keep looping until the end of the file. */ foundDataChunk = DRWAV_FALSE; - dataChunkSize = 0; /* The next chunk we care about is the "data" chunk. This is not necessarily the next chunk so we'll need to loop. */ for (;;) @@ -1956,13 +1971,15 @@ } chunkSize = header.sizeInBytes; - if (pWav->container == drwav_container_riff) { - if (drwav__fourcc_equal(header.id.fourcc, "data")) { + if (pWav->container == drwav_container_riff || pWav->container == drwav_container_rf64) { + if (drwav_fourcc_equal(header.id.fourcc, "data")) { foundDataChunk = DRWAV_TRUE; - dataChunkSize = chunkSize; + if (pWav->container != drwav_container_rf64) { /* The data chunk size for RF64 will always be set to 0xFFFFFFFF here. It was set to it's true value earlier. */ + dataChunkSize = chunkSize; + } } } else { - if (drwav__guid_equal(header.id.guid, drwavGUID_W64_DATA)) { + if (drwav_guid_equal(header.id.guid, drwavGUID_W64_DATA)) { foundDataChunk = DRWAV_TRUE; dataChunkSize = chunkSize; } @@ -1978,7 +1995,7 @@ /* Optional. Get the total sample count from the FACT chunk. This is useful for compressed formats. */ if (pWav->container == drwav_container_riff) { - if (drwav__fourcc_equal(header.id.fourcc, "fact")) { + if (drwav_fourcc_equal(header.id.fourcc, "fact")) { drwav_uint32 sampleCount; if (drwav__on_read(pWav->onRead, pWav->pUserData, &sampleCount, 4, &cursor) != 4) { return DRWAV_FALSE; @@ -1999,8 +2016,8 @@ sampleCountFromFactChunk = 0; } } - } else { - if (drwav__guid_equal(header.id.guid, drwavGUID_W64_FACT)) { + } else if (pWav->container == drwav_container_w64) { + if (drwav_guid_equal(header.id.guid, drwavGUID_W64_FACT)) { if (drwav__on_read(pWav->onRead, pWav->pUserData, &sampleCountFromFactChunk, 8, &cursor) != 8) { return DRWAV_FALSE; } @@ -2010,11 +2027,13 @@ pWav->dataChunkDataPos = cursor; } } + } else if (pWav->container == drwav_container_rf64) { + /* We retrieved the sample count from the ds64 chunk earlier so no need to do that here. */ } /* "smpl" chunk. */ - if (pWav->container == drwav_container_riff) { - if (drwav__fourcc_equal(header.id.fourcc, "smpl")) { + if (pWav->container == drwav_container_riff || pWav->container == drwav_container_rf64) { + if (drwav_fourcc_equal(header.id.fourcc, "smpl")) { drwav_uint8 smplHeaderData[36]; /* 36 = size of the smpl header section, not including the loop data. */ if (chunkSize >= sizeof(smplHeaderData)) { drwav_uint64 bytesJustRead = drwav__on_read(pWav->onRead, pWav->pUserData, smplHeaderData, sizeof(smplHeaderData), &cursor); @@ -2023,15 +2042,15 @@ if (bytesJustRead == sizeof(smplHeaderData)) { drwav_uint32 iLoop; - pWav->smpl.manufacturer = drwav__bytes_to_u32(smplHeaderData+0); - pWav->smpl.product = drwav__bytes_to_u32(smplHeaderData+4); - pWav->smpl.samplePeriod = drwav__bytes_to_u32(smplHeaderData+8); - pWav->smpl.midiUnityNotes = drwav__bytes_to_u32(smplHeaderData+12); - pWav->smpl.midiPitchFraction = drwav__bytes_to_u32(smplHeaderData+16); - pWav->smpl.smpteFormat = drwav__bytes_to_u32(smplHeaderData+20); - pWav->smpl.smpteOffset = drwav__bytes_to_u32(smplHeaderData+24); - pWav->smpl.numSampleLoops = drwav__bytes_to_u32(smplHeaderData+28); - pWav->smpl.samplerData = drwav__bytes_to_u32(smplHeaderData+32); + pWav->smpl.manufacturer = drwav_bytes_to_u32(smplHeaderData+0); + pWav->smpl.product = drwav_bytes_to_u32(smplHeaderData+4); + pWav->smpl.samplePeriod = drwav_bytes_to_u32(smplHeaderData+8); + pWav->smpl.midiUnityNotes = drwav_bytes_to_u32(smplHeaderData+12); + pWav->smpl.midiPitchFraction = drwav_bytes_to_u32(smplHeaderData+16); + pWav->smpl.smpteFormat = drwav_bytes_to_u32(smplHeaderData+20); + pWav->smpl.smpteOffset = drwav_bytes_to_u32(smplHeaderData+24); + pWav->smpl.numSampleLoops = drwav_bytes_to_u32(smplHeaderData+28); + pWav->smpl.samplerData = drwav_bytes_to_u32(smplHeaderData+32); for (iLoop = 0; iLoop < pWav->smpl.numSampleLoops && iLoop < drwav_countof(pWav->smpl.loops); ++iLoop) { drwav_uint8 smplLoopData[24]; /* 24 = size of a loop section in the smpl chunk. */ @@ -2039,12 +2058,12 @@ chunkSize -= bytesJustRead; if (bytesJustRead == sizeof(smplLoopData)) { - pWav->smpl.loops[iLoop].cuePointId = drwav__bytes_to_u32(smplLoopData+0); - pWav->smpl.loops[iLoop].type = drwav__bytes_to_u32(smplLoopData+4); - pWav->smpl.loops[iLoop].start = drwav__bytes_to_u32(smplLoopData+8); - pWav->smpl.loops[iLoop].end = drwav__bytes_to_u32(smplLoopData+12); - pWav->smpl.loops[iLoop].fraction = drwav__bytes_to_u32(smplLoopData+16); - pWav->smpl.loops[iLoop].playCount = drwav__bytes_to_u32(smplLoopData+20); + pWav->smpl.loops[iLoop].cuePointId = drwav_bytes_to_u32(smplLoopData+0); + pWav->smpl.loops[iLoop].type = drwav_bytes_to_u32(smplLoopData+4); + pWav->smpl.loops[iLoop].start = drwav_bytes_to_u32(smplLoopData+8); + pWav->smpl.loops[iLoop].end = drwav_bytes_to_u32(smplLoopData+12); + pWav->smpl.loops[iLoop].fraction = drwav_bytes_to_u32(smplLoopData+16); + pWav->smpl.loops[iLoop].playCount = drwav_bytes_to_u32(smplLoopData+20); } else { break; /* Break from the smpl loop for loop. */ } @@ -2055,7 +2074,7 @@ } } } else { - if (drwav__guid_equal(header.id.guid, drwavGUID_W64_SMPL)) { + if (drwav_guid_equal(header.id.guid, drwavGUID_W64_SMPL)) { /* This path will be hit when a W64 WAV file contains a smpl chunk. I don't have a sample file to test this path, so a contribution is welcome to add support for this. @@ -2179,18 +2198,17 @@ } -static drwav_uint32 drwav__riff_chunk_size_riff(drwav_uint64 dataChunkSize) +DRWAV_PRIVATE drwav_uint32 drwav__riff_chunk_size_riff(drwav_uint64 dataChunkSize) { - drwav_uint32 dataSubchunkPaddingSize = drwav__chunk_padding_size_riff(dataChunkSize); - - if (dataChunkSize <= (0xFFFFFFFFUL - 36 - dataSubchunkPaddingSize)) { - return 36 + (drwav_uint32)(dataChunkSize + dataSubchunkPaddingSize); - } else { - return 0xFFFFFFFF; + drwav_uint64 chunkSize = 4 + 24 + dataChunkSize + drwav__chunk_padding_size_riff(dataChunkSize); /* 4 = "WAVE". 24 = "fmt " chunk. */ + if (chunkSize > 0xFFFFFFFFUL) { + chunkSize = 0xFFFFFFFFUL; } + + return (drwav_uint32)chunkSize; /* Safe cast due to the clamp above. */ } -static drwav_uint32 drwav__data_chunk_size_riff(drwav_uint64 dataChunkSize) +DRWAV_PRIVATE drwav_uint32 drwav__data_chunk_size_riff(drwav_uint64 dataChunkSize) { if (dataChunkSize <= 0xFFFFFFFFUL) { return (drwav_uint32)dataChunkSize; @@ -2199,20 +2217,81 @@ } } -static drwav_uint64 drwav__riff_chunk_size_w64(drwav_uint64 dataChunkSize) +DRWAV_PRIVATE drwav_uint64 drwav__riff_chunk_size_w64(drwav_uint64 dataChunkSize) { drwav_uint64 dataSubchunkPaddingSize = drwav__chunk_padding_size_w64(dataChunkSize); return 80 + 24 + dataChunkSize + dataSubchunkPaddingSize; /* +24 because W64 includes the size of the GUID and size fields. */ } -static drwav_uint64 drwav__data_chunk_size_w64(drwav_uint64 dataChunkSize) +DRWAV_PRIVATE drwav_uint64 drwav__data_chunk_size_w64(drwav_uint64 dataChunkSize) { return 24 + dataChunkSize; /* +24 because W64 includes the size of the GUID and size fields. */ } +DRWAV_PRIVATE drwav_uint64 drwav__riff_chunk_size_rf64(drwav_uint64 dataChunkSize) +{ + drwav_uint64 chunkSize = 4 + 36 + 24 + dataChunkSize + drwav__chunk_padding_size_riff(dataChunkSize); /* 4 = "WAVE". 36 = "ds64" chunk. 24 = "fmt " chunk. */ + if (chunkSize > 0xFFFFFFFFUL) { + chunkSize = 0xFFFFFFFFUL; + } -static drwav_bool32 drwav_preinit_write(drwav* pWav, const drwav_data_format* pFormat, drwav_bool32 isSequential, drwav_write_proc onWrite, drwav_seek_proc onSeek, void* pUserData, const drwav_allocation_callbacks* pAllocationCallbacks) + return chunkSize; +} + +DRWAV_PRIVATE drwav_uint64 drwav__data_chunk_size_rf64(drwav_uint64 dataChunkSize) +{ + return dataChunkSize; +} + + +DRWAV_PRIVATE size_t drwav__write(drwav* pWav, const void* pData, size_t dataSize) +{ + DRWAV_ASSERT(pWav != NULL); + DRWAV_ASSERT(pWav->onWrite != NULL); + + /* Generic write. Assumes no byte reordering required. */ + return pWav->onWrite(pWav->pUserData, pData, dataSize); +} + +DRWAV_PRIVATE size_t drwav__write_u16ne_to_le(drwav* pWav, drwav_uint16 value) +{ + DRWAV_ASSERT(pWav != NULL); + DRWAV_ASSERT(pWav->onWrite != NULL); + + if (!drwav__is_little_endian()) { + value = drwav__bswap16(value); + } + + return drwav__write(pWav, &value, 2); +} + +DRWAV_PRIVATE size_t drwav__write_u32ne_to_le(drwav* pWav, drwav_uint32 value) +{ + DRWAV_ASSERT(pWav != NULL); + DRWAV_ASSERT(pWav->onWrite != NULL); + + if (!drwav__is_little_endian()) { + value = drwav__bswap32(value); + } + + return drwav__write(pWav, &value, 4); +} + +DRWAV_PRIVATE size_t drwav__write_u64ne_to_le(drwav* pWav, drwav_uint64 value) +{ + DRWAV_ASSERT(pWav != NULL); + DRWAV_ASSERT(pWav->onWrite != NULL); + + if (!drwav__is_little_endian()) { + value = drwav__bswap64(value); + } + + return drwav__write(pWav, &value, 8); +} + + +DRWAV_PRIVATE drwav_bool32 drwav_preinit_write(drwav* pWav, const drwav_data_format* pFormat, drwav_bool32 isSequential, drwav_write_proc onWrite, drwav_seek_proc onSeek, void* pUserData, const drwav_allocation_callbacks* pAllocationCallbacks) { if (pWav == NULL || onWrite == NULL) { return DRWAV_FALSE; @@ -2252,7 +2331,7 @@ return DRWAV_TRUE; } -static drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount) +DRWAV_PRIVATE drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount) { /* The function assumes drwav_preinit_write() was called beforehand. */ @@ -2284,67 +2363,75 @@ /* "RIFF" chunk. */ if (pFormat->container == drwav_container_riff) { - drwav_uint32 chunkSizeRIFF = 36 + (drwav_uint32)initialDataChunkSize; /* +36 = "RIFF"+[RIFF Chunk Size]+"WAVE" + [sizeof "fmt " chunk] */ - runningPos += pWav->onWrite(pWav->pUserData, "RIFF", 4); - runningPos += pWav->onWrite(pWav->pUserData, &chunkSizeRIFF, 4); - runningPos += pWav->onWrite(pWav->pUserData, "WAVE", 4); - } else { - drwav_uint64 chunkSizeRIFF = 80 + 24 + initialDataChunkSize; /* +24 because W64 includes the size of the GUID and size fields. */ - runningPos += pWav->onWrite(pWav->pUserData, drwavGUID_W64_RIFF, 16); - runningPos += pWav->onWrite(pWav->pUserData, &chunkSizeRIFF, 8); - runningPos += pWav->onWrite(pWav->pUserData, drwavGUID_W64_WAVE, 16); + drwav_uint32 chunkSizeRIFF = 28 + (drwav_uint32)initialDataChunkSize; /* +28 = "WAVE" + [sizeof "fmt " chunk] */ + runningPos += drwav__write(pWav, "RIFF", 4); + runningPos += drwav__write_u32ne_to_le(pWav, chunkSizeRIFF); + runningPos += drwav__write(pWav, "WAVE", 4); + } else if (pFormat->container == drwav_container_w64) { + drwav_uint64 chunkSizeRIFF = 80 + 24 + initialDataChunkSize; /* +24 because W64 includes the size of the GUID and size fields. */ + runningPos += drwav__write(pWav, drwavGUID_W64_RIFF, 16); + runningPos += drwav__write_u64ne_to_le(pWav, chunkSizeRIFF); + runningPos += drwav__write(pWav, drwavGUID_W64_WAVE, 16); + } else if (pFormat->container == drwav_container_rf64) { + runningPos += drwav__write(pWav, "RF64", 4); + runningPos += drwav__write_u32ne_to_le(pWav, 0xFFFFFFFF); /* Always 0xFFFFFFFF for RF64. Set to a proper value in the "ds64" chunk. */ + runningPos += drwav__write(pWav, "WAVE", 4); } + + /* "ds64" chunk (RF64 only). */ + if (pFormat->container == drwav_container_rf64) { + drwav_uint32 initialds64ChunkSize = 28; /* 28 = [Size of RIFF (8 bytes)] + [Size of DATA (8 bytes)] + [Sample Count (8 bytes)] + [Table Length (4 bytes)]. Table length always set to 0. */ + drwav_uint64 initialRiffChunkSize = 8 + initialds64ChunkSize + initialDataChunkSize; /* +8 for the ds64 header. */ + + runningPos += drwav__write(pWav, "ds64", 4); + runningPos += drwav__write_u32ne_to_le(pWav, initialds64ChunkSize); /* Size of ds64. */ + runningPos += drwav__write_u64ne_to_le(pWav, initialRiffChunkSize); /* Size of RIFF. Set to true value at the end. */ + runningPos += drwav__write_u64ne_to_le(pWav, initialDataChunkSize); /* Size of DATA. Set to true value at the end. */ + runningPos += drwav__write_u64ne_to_le(pWav, totalSampleCount); /* Sample count. */ + runningPos += drwav__write_u32ne_to_le(pWav, 0); /* Table length. Always set to zero in our case since we're not doing any other chunks than "DATA". */ + } + + /* "fmt " chunk. */ - if (pFormat->container == drwav_container_riff) { + if (pFormat->container == drwav_container_riff || pFormat->container == drwav_container_rf64) { chunkSizeFMT = 16; - runningPos += pWav->onWrite(pWav->pUserData, "fmt ", 4); - runningPos += pWav->onWrite(pWav->pUserData, &chunkSizeFMT, 4); - } else { + runningPos += drwav__write(pWav, "fmt ", 4); + runningPos += drwav__write_u32ne_to_le(pWav, (drwav_uint32)chunkSizeFMT); + } else if (pFormat->container == drwav_container_w64) { chunkSizeFMT = 40; - runningPos += pWav->onWrite(pWav->pUserData, drwavGUID_W64_FMT, 16); - runningPos += pWav->onWrite(pWav->pUserData, &chunkSizeFMT, 8); + runningPos += drwav__write(pWav, drwavGUID_W64_FMT, 16); + runningPos += drwav__write_u64ne_to_le(pWav, chunkSizeFMT); } - runningPos += pWav->onWrite(pWav->pUserData, &pWav->fmt.formatTag, 2); - runningPos += pWav->onWrite(pWav->pUserData, &pWav->fmt.channels, 2); - runningPos += pWav->onWrite(pWav->pUserData, &pWav->fmt.sampleRate, 4); - runningPos += pWav->onWrite(pWav->pUserData, &pWav->fmt.avgBytesPerSec, 4); - runningPos += pWav->onWrite(pWav->pUserData, &pWav->fmt.blockAlign, 2); - runningPos += pWav->onWrite(pWav->pUserData, &pWav->fmt.bitsPerSample, 2); - - pWav->dataChunkDataPos = runningPos; + runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.formatTag); + runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.channels); + runningPos += drwav__write_u32ne_to_le(pWav, pWav->fmt.sampleRate); + runningPos += drwav__write_u32ne_to_le(pWav, pWav->fmt.avgBytesPerSec); + runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.blockAlign); + runningPos += drwav__write_u16ne_to_le(pWav, pWav->fmt.bitsPerSample); /* "data" chunk. */ if (pFormat->container == drwav_container_riff) { drwav_uint32 chunkSizeDATA = (drwav_uint32)initialDataChunkSize; - runningPos += pWav->onWrite(pWav->pUserData, "data", 4); - runningPos += pWav->onWrite(pWav->pUserData, &chunkSizeDATA, 4); - } else { - drwav_uint64 chunkSizeDATA = 24 + initialDataChunkSize; /* +24 because W64 includes the size of the GUID and size fields. */ - runningPos += pWav->onWrite(pWav->pUserData, drwavGUID_W64_DATA, 16); - runningPos += pWav->onWrite(pWav->pUserData, &chunkSizeDATA, 8); + runningPos += drwav__write(pWav, "data", 4); + runningPos += drwav__write_u32ne_to_le(pWav, chunkSizeDATA); + } else if (pFormat->container == drwav_container_w64) { + drwav_uint64 chunkSizeDATA = 24 + initialDataChunkSize; /* +24 because W64 includes the size of the GUID and size fields. */ + runningPos += drwav__write(pWav, drwavGUID_W64_DATA, 16); + runningPos += drwav__write_u64ne_to_le(pWav, chunkSizeDATA); + } else if (pFormat->container == drwav_container_rf64) { + runningPos += drwav__write(pWav, "data", 4); + runningPos += drwav__write_u32ne_to_le(pWav, 0xFFFFFFFF); /* Always set to 0xFFFFFFFF for RF64. The true size of the data chunk is specified in the ds64 chunk. */ } - - /* Simple validation. */ - if (pFormat->container == drwav_container_riff) { - if (runningPos != 20 + chunkSizeFMT + 8) { - return DRWAV_FALSE; - } - } else { - if (runningPos != 40 + chunkSizeFMT + 24) { - return DRWAV_FALSE; - } - } - - /* Set some properties for the client's convenience. */ pWav->container = pFormat->container; pWav->channels = (drwav_uint16)pFormat->channels; pWav->sampleRate = pFormat->sampleRate; pWav->bitsPerSample = (drwav_uint16)pFormat->bitsPerSample; pWav->translatedFormatTag = (drwav_uint16)pFormat->format; + pWav->dataChunkDataPos = runningPos; return DRWAV_TRUE; } @@ -2382,14 +2469,17 @@ /* Casting totalSampleCount to drwav_int64 for VC6 compatibility. No issues in practice because nobody is going to exhaust the whole 63 bits. */ drwav_uint64 targetDataSizeBytes = (drwav_uint64)((drwav_int64)totalSampleCount * pFormat->channels * pFormat->bitsPerSample/8.0); drwav_uint64 riffChunkSizeBytes; - drwav_uint64 fileSizeBytes; + drwav_uint64 fileSizeBytes = 0; if (pFormat->container == drwav_container_riff) { riffChunkSizeBytes = drwav__riff_chunk_size_riff(targetDataSizeBytes); - fileSizeBytes = (8 + riffChunkSizeBytes); /* +8 because WAV doesn't include the size of the ChunkID and ChunkSize fields. */ - } else { + fileSizeBytes = (8 + riffChunkSizeBytes); /* +8 because WAV doesn't include the size of the ChunkID and ChunkSize fields. */ + } else if (pFormat->container == drwav_container_w64) { riffChunkSizeBytes = drwav__riff_chunk_size_w64(targetDataSizeBytes); fileSizeBytes = riffChunkSizeBytes; + } else if (pFormat->container == drwav_container_rf64) { + riffChunkSizeBytes = drwav__riff_chunk_size_rf64(targetDataSizeBytes); + fileSizeBytes = (8 + riffChunkSizeBytes); /* +8 because WAV doesn't include the size of the ChunkID and ChunkSize fields. */ } return fileSizeBytes; @@ -2400,7 +2490,7 @@ /* drwav_result_from_errno() is only used for fopen() and wfopen() so putting it inside DR_WAV_NO_STDIO for now. If something else needs this later we can move it out. */ #include -static drwav_result drwav_result_from_errno(int e) +DRWAV_PRIVATE drwav_result drwav_result_from_errno(int e) { switch (e) { @@ -2802,9 +2892,9 @@ } } -static drwav_result drwav_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) +DRWAV_PRIVATE drwav_result drwav_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) { -#if _MSC_VER && _MSC_VER >= 1400 +#if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err; #endif @@ -2816,7 +2906,7 @@ return DRWAV_INVALID_ARGS; } -#if _MSC_VER && _MSC_VER >= 1400 +#if defined(_MSC_VER) && _MSC_VER >= 1400 err = fopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return drwav_result_from_errno(err); @@ -2851,17 +2941,18 @@ * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). + * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) - #if defined(_MSC_VER) || defined(__MINGW64__) || !defined(__STRICT_ANSI__) + #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define DRWAV_HAS_WFOPEN #endif #endif -static drwav_result drwav_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_result drwav_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const drwav_allocation_callbacks* pAllocationCallbacks) { if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ @@ -2944,17 +3035,17 @@ } -static size_t drwav__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead) +DRWAV_PRIVATE size_t drwav__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead) { return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData); } -static size_t drwav__on_write_stdio(void* pUserData, const void* pData, size_t bytesToWrite) +DRWAV_PRIVATE size_t drwav__on_write_stdio(void* pUserData, const void* pData, size_t bytesToWrite) { return fwrite(pData, 1, bytesToWrite, (FILE*)pUserData); } -static drwav_bool32 drwav__on_seek_stdio(void* pUserData, int offset, drwav_seek_origin origin) +DRWAV_PRIVATE drwav_bool32 drwav__on_seek_stdio(void* pUserData, int offset, drwav_seek_origin origin) { return fseek((FILE*)pUserData, offset, (origin == drwav_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } @@ -2965,7 +3056,7 @@ } -static drwav_bool32 drwav_init_file__internal_FILE(drwav* pWav, FILE* pFile, drwav_chunk_proc onChunk, void* pChunkUserData, drwav_uint32 flags, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_bool32 drwav_init_file__internal_FILE(drwav* pWav, FILE* pFile, drwav_chunk_proc onChunk, void* pChunkUserData, drwav_uint32 flags, const drwav_allocation_callbacks* pAllocationCallbacks) { drwav_bool32 result; @@ -3012,7 +3103,7 @@ } -static drwav_bool32 drwav_init_file_write__internal_FILE(drwav* pWav, FILE* pFile, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_bool32 drwav_init_file_write__internal_FILE(drwav* pWav, FILE* pFile, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) { drwav_bool32 result; @@ -3031,7 +3122,7 @@ return DRWAV_TRUE; } -static drwav_bool32 drwav_init_file_write__internal(drwav* pWav, const char* filename, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_bool32 drwav_init_file_write__internal(drwav* pWav, const char* filename, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (drwav_fopen(&pFile, filename, "wb") != DRWAV_SUCCESS) { @@ -3042,7 +3133,7 @@ return drwav_init_file_write__internal_FILE(pWav, pFile, pFormat, totalSampleCount, isSequential, pAllocationCallbacks); } -static drwav_bool32 drwav_init_file_write_w__internal(drwav* pWav, const wchar_t* filename, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_bool32 drwav_init_file_write_w__internal(drwav* pWav, const wchar_t* filename, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) { FILE* pFile; if (drwav_wfopen(&pFile, filename, L"wb", pAllocationCallbacks) != DRWAV_SUCCESS) { @@ -3093,7 +3184,7 @@ #endif /* DR_WAV_NO_STDIO */ -static size_t drwav__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) +DRWAV_PRIVATE size_t drwav__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) { drwav* pWav = (drwav*)pUserData; size_t bytesRemaining; @@ -3114,7 +3205,7 @@ return bytesToRead; } -static drwav_bool32 drwav__on_seek_memory(void* pUserData, int offset, drwav_seek_origin origin) +DRWAV_PRIVATE drwav_bool32 drwav__on_seek_memory(void* pUserData, int offset, drwav_seek_origin origin) { drwav* pWav = (drwav*)pUserData; DRWAV_ASSERT(pWav != NULL); @@ -3143,7 +3234,7 @@ return DRWAV_TRUE; } -static size_t drwav__on_write_memory(void* pUserData, const void* pDataIn, size_t bytesToWrite) +DRWAV_PRIVATE size_t drwav__on_write_memory(void* pUserData, const void* pDataIn, size_t bytesToWrite) { drwav* pWav = (drwav*)pUserData; size_t bytesRemaining; @@ -3183,7 +3274,7 @@ return bytesToWrite; } -static drwav_bool32 drwav__on_seek_memory_write(void* pUserData, int offset, drwav_seek_origin origin) +DRWAV_PRIVATE drwav_bool32 drwav__on_seek_memory_write(void* pUserData, int offset, drwav_seek_origin origin) { drwav* pWav = (drwav*)pUserData; DRWAV_ASSERT(pWav != NULL); @@ -3235,7 +3326,7 @@ } -static drwav_bool32 drwav_init_memory_write__internal(drwav* pWav, void** ppData, size_t* pDataSize, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) +DRWAV_PRIVATE drwav_bool32 drwav_init_memory_write__internal(drwav* pWav, void** ppData, size_t* pDataSize, const drwav_data_format* pFormat, drwav_uint64 totalSampleCount, drwav_bool32 isSequential, const drwav_allocation_callbacks* pAllocationCallbacks) { if (ppData == NULL || pDataSize == NULL) { return DRWAV_FALSE; @@ -3295,7 +3386,7 @@ drwav_uint32 paddingSize = 0; /* Padding. Do not adjust pWav->dataChunkDataSize - this should not include the padding. */ - if (pWav->container == drwav_container_riff) { + if (pWav->container == drwav_container_riff || pWav->container == drwav_container_rf64) { paddingSize = drwav__chunk_padding_size_riff(pWav->dataChunkDataSize); } else { paddingSize = drwav__chunk_padding_size_w64(pWav->dataChunkDataSize); @@ -3303,7 +3394,7 @@ if (paddingSize > 0) { drwav_uint64 paddingData = 0; - pWav->onWrite(pWav->pUserData, &paddingData, paddingSize); + drwav__write(pWav, &paddingData, paddingSize); /* Byte order does not matter for this. */ } /* @@ -3315,25 +3406,40 @@ /* The "RIFF" chunk size. */ if (pWav->onSeek(pWav->pUserData, 4, drwav_seek_origin_start)) { drwav_uint32 riffChunkSize = drwav__riff_chunk_size_riff(pWav->dataChunkDataSize); - pWav->onWrite(pWav->pUserData, &riffChunkSize, 4); + drwav__write_u32ne_to_le(pWav, riffChunkSize); } - /* the "data" chunk size. */ - if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos + 4, drwav_seek_origin_start)) { + /* The "data" chunk size. */ + if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 4, drwav_seek_origin_start)) { drwav_uint32 dataChunkSize = drwav__data_chunk_size_riff(pWav->dataChunkDataSize); - pWav->onWrite(pWav->pUserData, &dataChunkSize, 4); + drwav__write_u32ne_to_le(pWav, dataChunkSize); } - } else { + } else if (pWav->container == drwav_container_w64) { /* The "RIFF" chunk size. */ if (pWav->onSeek(pWav->pUserData, 16, drwav_seek_origin_start)) { drwav_uint64 riffChunkSize = drwav__riff_chunk_size_w64(pWav->dataChunkDataSize); - pWav->onWrite(pWav->pUserData, &riffChunkSize, 8); + drwav__write_u64ne_to_le(pWav, riffChunkSize); } /* The "data" chunk size. */ - if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos + 16, drwav_seek_origin_start)) { + if (pWav->onSeek(pWav->pUserData, (int)pWav->dataChunkDataPos - 8, drwav_seek_origin_start)) { drwav_uint64 dataChunkSize = drwav__data_chunk_size_w64(pWav->dataChunkDataSize); - pWav->onWrite(pWav->pUserData, &dataChunkSize, 8); + drwav__write_u64ne_to_le(pWav, dataChunkSize); + } + } else if (pWav->container == drwav_container_rf64) { + /* We only need to update the ds64 chunk. The "RIFF" and "data" chunks always have their sizes set to 0xFFFFFFFF for RF64. */ + int ds64BodyPos = 12 + 8; + + /* The "RIFF" chunk size. */ + if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 0, drwav_seek_origin_start)) { + drwav_uint64 riffChunkSize = drwav__riff_chunk_size_rf64(pWav->dataChunkDataSize); + drwav__write_u64ne_to_le(pWav, riffChunkSize); + } + + /* The "data" chunk size. */ + if (pWav->onSeek(pWav->pUserData, ds64BodyPos + 8, drwav_seek_origin_start)) { + drwav_uint64 dataChunkSize = drwav__data_chunk_size_rf64(pWav->dataChunkDataSize); + drwav__write_u64ne_to_le(pWav, dataChunkSize); } } } @@ -3365,7 +3471,7 @@ { size_t bytesRead; - if (pWav == NULL || bytesToRead == 0 || pBufferOut == NULL) { + if (pWav == NULL || bytesToRead == 0) { return 0; } @@ -3373,7 +3479,41 @@ bytesToRead = (size_t)pWav->bytesRemaining; } - bytesRead = pWav->onRead(pWav->pUserData, pBufferOut, bytesToRead); + if (pBufferOut != NULL) { + bytesRead = pWav->onRead(pWav->pUserData, pBufferOut, bytesToRead); + } else { + /* We need to seek. If we fail, we need to read-and-discard to make sure we get a good byte count. */ + bytesRead = 0; + while (bytesRead < bytesToRead) { + size_t bytesToSeek = (bytesToRead - bytesRead); + if (bytesToSeek > 0x7FFFFFFF) { + bytesToSeek = 0x7FFFFFFF; + } + + if (pWav->onSeek(pWav->pUserData, (int)bytesToSeek, drwav_seek_origin_current) == DRWAV_FALSE) { + break; + } + + bytesRead += bytesToSeek; + } + + /* When we get here we may need to read-and-discard some data. */ + while (bytesRead < bytesToRead) { + drwav_uint8 buffer[4096]; + size_t bytesSeeked; + size_t bytesToSeek = (bytesToRead - bytesRead); + if (bytesToSeek > sizeof(buffer)) { + bytesToSeek = sizeof(buffer); + } + + bytesSeeked = pWav->onRead(pWav->pUserData, buffer, bytesToSeek); + bytesRead += bytesSeeked; + + if (bytesSeeked < bytesToSeek) { + break; /* Reached the end. */ + } + } + } pWav->bytesRemaining -= bytesRead; return bytesRead; @@ -3384,8 +3524,9 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_le(drwav* pWav, drwav_uint64 framesToRead, void* pBufferOut) { drwav_uint32 bytesPerFrame; + drwav_uint64 bytesToRead; /* Intentionally uint64 instead of size_t so we can do a check that we're not reading too much on 32-bit builds. */ - if (pWav == NULL || framesToRead == 0 || pBufferOut == NULL) { + if (pWav == NULL || framesToRead == 0) { return 0; } @@ -3400,17 +3541,29 @@ } /* Don't try to read more samples than can potentially fit in the output buffer. */ - if (framesToRead * bytesPerFrame > DRWAV_SIZE_MAX) { - framesToRead = DRWAV_SIZE_MAX / bytesPerFrame; + bytesToRead = framesToRead * bytesPerFrame; + if (bytesToRead > DRWAV_SIZE_MAX) { + bytesToRead = (DRWAV_SIZE_MAX / bytesPerFrame) * bytesPerFrame; /* Round the number of bytes to read to a clean frame boundary. */ } - return drwav_read_raw(pWav, (size_t)(framesToRead * bytesPerFrame), pBufferOut) / bytesPerFrame; + /* + Doing an explicit check here just to make it clear that we don't want to be attempt to read anything if there's no bytes to read. There + *could* be a time where it evaluates to 0 due to overflowing. + */ + if (bytesToRead == 0) { + return 0; + } + + return drwav_read_raw(pWav, (size_t)bytesToRead, pBufferOut) / bytesPerFrame; } DRWAV_API drwav_uint64 drwav_read_pcm_frames_be(drwav* pWav, drwav_uint64 framesToRead, void* pBufferOut) { drwav_uint64 framesRead = drwav_read_pcm_frames_le(pWav, framesToRead, pBufferOut); - drwav__bswap_samples(pBufferOut, framesRead*pWav->channels, drwav_get_bytes_per_pcm_frame(pWav)/pWav->channels, pWav->translatedFormatTag); + + if (pBufferOut != NULL) { + drwav__bswap_samples(pBufferOut, framesRead*pWav->channels, drwav_get_bytes_per_pcm_frame(pWav)/pWav->channels, pWav->translatedFormatTag); + } return framesRead; } @@ -3426,7 +3579,7 @@ -DRWAV_API drwav_bool32 drwav_seek_to_first_pcm_frame(drwav* pWav) +DRWAV_PRIVATE drwav_bool32 drwav_seek_to_first_pcm_frame(drwav* pWav) { if (pWav->onWrite != NULL) { return DRWAV_FALSE; /* No seeking in write mode. */ @@ -3438,6 +3591,15 @@ if (drwav__is_compressed_format_tag(pWav->translatedFormatTag)) { pWav->compressed.iCurrentPCMFrame = 0; + + /* Cached data needs to be cleared for compressed formats. */ + if (pWav->translatedFormatTag == DR_WAVE_FORMAT_ADPCM) { + DRWAV_ZERO_OBJECT(&pWav->msadpcm); + } else if (pWav->translatedFormatTag == DR_WAVE_FORMAT_DVI_ADPCM) { + DRWAV_ZERO_OBJECT(&pWav->ima); + } else { + DRWAV_ASSERT(DRWAV_FALSE); /* If this assertion is triggered it means I've implemented a new compressed format but forgot to add a branch for it here. */ + } } pWav->bytesRemaining = pWav->dataChunkDataSize; @@ -3667,17 +3829,18 @@ } -static drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__msadpcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { drwav_uint64 totalFramesRead = 0; DRWAV_ASSERT(pWav != NULL); DRWAV_ASSERT(framesToRead > 0); - DRWAV_ASSERT(pBufferOut != NULL); /* TODO: Lots of room for optimization here. */ - while (framesToRead > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) { + while (pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) { + DRWAV_ASSERT(framesToRead > 0); /* This loop iteration will never get hit with framesToRead == 0 because it's asserted at the top, and we check for 0 inside the loop just below. */ + /* If there are no cached frames we need to load a new block. */ if (pWav->msadpcm.cachedFrameCount == 0 && pWav->msadpcm.bytesRemainingInBlock == 0) { if (pWav->channels == 1) { @@ -3689,9 +3852,9 @@ pWav->msadpcm.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); pWav->msadpcm.predictor[0] = header[0]; - pWav->msadpcm.delta[0] = drwav__bytes_to_s16(header + 1); - pWav->msadpcm.prevFrames[0][1] = (drwav_int32)drwav__bytes_to_s16(header + 3); - pWav->msadpcm.prevFrames[0][0] = (drwav_int32)drwav__bytes_to_s16(header + 5); + pWav->msadpcm.delta[0] = drwav_bytes_to_s16(header + 1); + pWav->msadpcm.prevFrames[0][1] = (drwav_int32)drwav_bytes_to_s16(header + 3); + pWav->msadpcm.prevFrames[0][0] = (drwav_int32)drwav_bytes_to_s16(header + 5); pWav->msadpcm.cachedFrames[2] = pWav->msadpcm.prevFrames[0][0]; pWav->msadpcm.cachedFrames[3] = pWav->msadpcm.prevFrames[0][1]; pWav->msadpcm.cachedFrameCount = 2; @@ -3705,12 +3868,12 @@ pWav->msadpcm.predictor[0] = header[0]; pWav->msadpcm.predictor[1] = header[1]; - pWav->msadpcm.delta[0] = drwav__bytes_to_s16(header + 2); - pWav->msadpcm.delta[1] = drwav__bytes_to_s16(header + 4); - pWav->msadpcm.prevFrames[0][1] = (drwav_int32)drwav__bytes_to_s16(header + 6); - pWav->msadpcm.prevFrames[1][1] = (drwav_int32)drwav__bytes_to_s16(header + 8); - pWav->msadpcm.prevFrames[0][0] = (drwav_int32)drwav__bytes_to_s16(header + 10); - pWav->msadpcm.prevFrames[1][0] = (drwav_int32)drwav__bytes_to_s16(header + 12); + pWav->msadpcm.delta[0] = drwav_bytes_to_s16(header + 2); + pWav->msadpcm.delta[1] = drwav_bytes_to_s16(header + 4); + pWav->msadpcm.prevFrames[0][1] = (drwav_int32)drwav_bytes_to_s16(header + 6); + pWav->msadpcm.prevFrames[1][1] = (drwav_int32)drwav_bytes_to_s16(header + 8); + pWav->msadpcm.prevFrames[0][0] = (drwav_int32)drwav_bytes_to_s16(header + 10); + pWav->msadpcm.prevFrames[1][0] = (drwav_int32)drwav_bytes_to_s16(header + 12); pWav->msadpcm.cachedFrames[0] = pWav->msadpcm.prevFrames[0][0]; pWav->msadpcm.cachedFrames[1] = pWav->msadpcm.prevFrames[1][0]; @@ -3722,12 +3885,15 @@ /* Output anything that's cached. */ while (framesToRead > 0 && pWav->msadpcm.cachedFrameCount > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) { - drwav_uint32 iSample = 0; - for (iSample = 0; iSample < pWav->channels; iSample += 1) { - pBufferOut[iSample] = (drwav_int16)pWav->msadpcm.cachedFrames[(drwav_countof(pWav->msadpcm.cachedFrames) - (pWav->msadpcm.cachedFrameCount*pWav->channels)) + iSample]; + if (pBufferOut != NULL) { + drwav_uint32 iSample = 0; + for (iSample = 0; iSample < pWav->channels; iSample += 1) { + pBufferOut[iSample] = (drwav_int16)pWav->msadpcm.cachedFrames[(drwav_countof(pWav->msadpcm.cachedFrames) - (pWav->msadpcm.cachedFrameCount*pWav->channels)) + iSample]; + } + + pBufferOut += pWav->channels; } - pBufferOut += pWav->channels; framesToRead -= 1; totalFramesRead += 1; pWav->compressed.iCurrentPCMFrame += 1; @@ -3735,7 +3901,7 @@ } if (framesToRead == 0) { - return totalFramesRead; + break; } @@ -3845,17 +4011,36 @@ } -static drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { drwav_uint64 totalFramesRead = 0; + drwav_uint32 iChannel; + + static drwav_int32 indexTable[16] = { + -1, -1, -1, -1, 2, 4, 6, 8, + -1, -1, -1, -1, 2, 4, 6, 8 + }; + + static drwav_int32 stepTable[89] = { + 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, + 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, + 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, + 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, + 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, + 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, + 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, + 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, + 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 + }; DRWAV_ASSERT(pWav != NULL); DRWAV_ASSERT(framesToRead > 0); - DRWAV_ASSERT(pBufferOut != NULL); /* TODO: Lots of room for optimization here. */ - while (framesToRead > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) { + while (pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) { + DRWAV_ASSERT(framesToRead > 0); /* This loop iteration will never get hit with framesToRead == 0 because it's asserted at the top, and we check for 0 inside the loop just below. */ + /* If there are no cached samples we need to load a new block. */ if (pWav->ima.cachedFrameCount == 0 && pWav->ima.bytesRemainingInBlock == 0) { if (pWav->channels == 1) { @@ -3866,7 +4051,13 @@ } pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); - pWav->ima.predictor[0] = drwav__bytes_to_s16(header + 0); + if (header[2] >= drwav_countof(stepTable)) { + pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, drwav_seek_origin_current); + pWav->ima.bytesRemainingInBlock = 0; + return totalFramesRead; /* Invalid data. */ + } + + pWav->ima.predictor[0] = drwav_bytes_to_s16(header + 0); pWav->ima.stepIndex[0] = header[2]; pWav->ima.cachedFrames[drwav_countof(pWav->ima.cachedFrames) - 1] = pWav->ima.predictor[0]; pWav->ima.cachedFrameCount = 1; @@ -3878,9 +4069,15 @@ } pWav->ima.bytesRemainingInBlock = pWav->fmt.blockAlign - sizeof(header); - pWav->ima.predictor[0] = drwav__bytes_to_s16(header + 0); + if (header[2] >= drwav_countof(stepTable) || header[6] >= drwav_countof(stepTable)) { + pWav->onSeek(pWav->pUserData, pWav->ima.bytesRemainingInBlock, drwav_seek_origin_current); + pWav->ima.bytesRemainingInBlock = 0; + return totalFramesRead; /* Invalid data. */ + } + + pWav->ima.predictor[0] = drwav_bytes_to_s16(header + 0); pWav->ima.stepIndex[0] = header[2]; - pWav->ima.predictor[1] = drwav__bytes_to_s16(header + 4); + pWav->ima.predictor[1] = drwav_bytes_to_s16(header + 4); pWav->ima.stepIndex[1] = header[6]; pWav->ima.cachedFrames[drwav_countof(pWav->ima.cachedFrames) - 2] = pWav->ima.predictor[0]; @@ -3891,12 +4088,14 @@ /* Output anything that's cached. */ while (framesToRead > 0 && pWav->ima.cachedFrameCount > 0 && pWav->compressed.iCurrentPCMFrame < pWav->totalPCMFrameCount) { - drwav_uint32 iSample; - for (iSample = 0; iSample < pWav->channels; iSample += 1) { - pBufferOut[iSample] = (drwav_int16)pWav->ima.cachedFrames[(drwav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + iSample]; + if (pBufferOut != NULL) { + drwav_uint32 iSample; + for (iSample = 0; iSample < pWav->channels; iSample += 1) { + pBufferOut[iSample] = (drwav_int16)pWav->ima.cachedFrames[(drwav_countof(pWav->ima.cachedFrames) - (pWav->ima.cachedFrameCount*pWav->channels)) + iSample]; + } + pBufferOut += pWav->channels; } - pBufferOut += pWav->channels; framesToRead -= 1; totalFramesRead += 1; pWav->compressed.iCurrentPCMFrame += 1; @@ -3904,7 +4103,7 @@ } if (framesToRead == 0) { - return totalFramesRead; + break; } /* @@ -3915,25 +4114,6 @@ if (pWav->ima.bytesRemainingInBlock == 0) { continue; } else { - static drwav_int32 indexTable[16] = { - -1, -1, -1, -1, 2, 4, 6, 8, - -1, -1, -1, -1, 2, 4, 6, 8 - }; - - static drwav_int32 stepTable[89] = { - 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, - 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, - 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, - 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, - 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, - 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, - 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, - 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, - 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 - }; - - drwav_uint32 iChannel; - /* From what I can tell with stereo streams, it looks like every 4 bytes (8 samples) is for one channel. So it goes 4 bytes for the left channel, 4 bytes for the right channel. @@ -4041,7 +4221,7 @@ -static void drwav__pcm_to_s16(drwav_int16* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) +DRWAV_PRIVATE void drwav__pcm_to_s16(drwav_int16* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { unsigned int i; @@ -4093,7 +4273,7 @@ } } -static void drwav__ieee_to_s16(drwav_int16* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) +DRWAV_PRIVATE void drwav__ieee_to_s16(drwav_int16* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { drwav_f32_to_s16(pOut, (const float*)pIn, totalSampleCount); @@ -4108,14 +4288,14 @@ } } -static drwav_uint64 drwav_read_pcm_frames_s16__pcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__pcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { - drwav_uint32 bytesPerFrame; drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; + drwav_uint32 bytesPerFrame; /* Fast path. */ - if (pWav->translatedFormatTag == DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 16) { + if ((pWav->translatedFormatTag == DR_WAVE_FORMAT_PCM && pWav->bitsPerSample == 16) || pBufferOut == NULL) { return drwav_read_pcm_frames(pWav, framesToRead, pBufferOut); } @@ -4142,12 +4322,17 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s16__ieee(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__ieee(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; + drwav_uint32 bytesPerFrame; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (pBufferOut == NULL) { + return drwav_read_pcm_frames(pWav, framesToRead, NULL); + } + + bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } @@ -4170,12 +4355,17 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s16__alaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__alaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; + drwav_uint32 bytesPerFrame; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (pBufferOut == NULL) { + return drwav_read_pcm_frames(pWav, framesToRead, NULL); + } + + bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } @@ -4198,12 +4388,17 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s16__mulaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s16__mulaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; + drwav_uint32 bytesPerFrame; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (pBufferOut == NULL) { + return drwav_read_pcm_frames(pWav, framesToRead, NULL); + } + + bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); if (bytesPerFrame == 0) { return 0; } @@ -4228,10 +4423,14 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_s16(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { - if (pWav == NULL || framesToRead == 0 || pBufferOut == NULL) { + if (pWav == NULL || framesToRead == 0) { return 0; } + if (pBufferOut == NULL) { + return drwav_read_pcm_frames(pWav, framesToRead, NULL); + } + /* Don't try to read more samples than can potentially fit in the output buffer. */ if (framesToRead * pWav->channels * sizeof(drwav_int16) > DRWAV_SIZE_MAX) { framesToRead = DRWAV_SIZE_MAX / sizeof(drwav_int16) / pWav->channels; @@ -4267,7 +4466,7 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_s16le(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { drwav_uint64 framesRead = drwav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut); - if (!drwav__is_little_endian()) { + if (pBufferOut != NULL && drwav__is_little_endian() == DRWAV_FALSE) { drwav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels); } @@ -4277,7 +4476,7 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_s16be(drwav* pWav, drwav_uint64 framesToRead, drwav_int16* pBufferOut) { drwav_uint64 framesRead = drwav_read_pcm_frames_s16(pWav, framesToRead, pBufferOut); - if (drwav__is_little_endian()) { + if (pBufferOut != NULL && drwav__is_little_endian() == DRWAV_TRUE) { drwav__bswap_samples_s16(pBufferOut, framesRead*pWav->channels); } @@ -4367,7 +4566,7 @@ -static void drwav__pcm_to_f32(float* pOut, const drwav_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) +DRWAV_PRIVATE void drwav__pcm_to_f32(float* pOut, const drwav_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) { unsigned int i; @@ -4416,7 +4615,7 @@ } } -static void drwav__ieee_to_f32(float* pOut, const drwav_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) +DRWAV_PRIVATE void drwav__ieee_to_f32(float* pOut, const drwav_uint8* pIn, size_t sampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { unsigned int i; @@ -4435,12 +4634,12 @@ } -static drwav_uint64 drwav_read_pcm_frames_f32__pcm(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_f32__pcm(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (bytesPerFrame == 0) { return 0; } @@ -4463,7 +4662,7 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_f32__msadpcm(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_f32__msadpcm(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { /* We're just going to borrow the implementation from the drwav_read_s16() since ADPCM is a little bit more complicated than other formats and I don't @@ -4471,6 +4670,7 @@ */ drwav_uint64 totalFramesRead = 0; drwav_int16 samples16[2048]; + while (framesToRead > 0) { drwav_uint64 framesRead = drwav_read_pcm_frames_s16(pWav, drwav_min(framesToRead, drwav_countof(samples16)/pWav->channels), samples16); if (framesRead == 0) { @@ -4487,7 +4687,7 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_f32__ima(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_f32__ima(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { /* We're just going to borrow the implementation from the drwav_read_s16() since IMA-ADPCM is a little bit more complicated than other formats and I don't @@ -4495,6 +4695,7 @@ */ drwav_uint64 totalFramesRead = 0; drwav_int16 samples16[2048]; + while (framesToRead > 0) { drwav_uint64 framesRead = drwav_read_pcm_frames_s16(pWav, drwav_min(framesToRead, drwav_countof(samples16)/pWav->channels), samples16); if (framesRead == 0) { @@ -4511,7 +4712,7 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_f32__ieee(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_f32__ieee(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; @@ -4545,11 +4746,12 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_f32__alaw(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_f32__alaw(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (bytesPerFrame == 0) { return 0; } @@ -4572,12 +4774,12 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_f32__mulaw(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_f32__mulaw(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (bytesPerFrame == 0) { return 0; } @@ -4602,10 +4804,14 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_f32(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { - if (pWav == NULL || framesToRead == 0 || pBufferOut == NULL) { + if (pWav == NULL || framesToRead == 0) { return 0; } + if (pBufferOut == NULL) { + return drwav_read_pcm_frames(pWav, framesToRead, NULL); + } + /* Don't try to read more samples than can potentially fit in the output buffer. */ if (framesToRead * pWav->channels * sizeof(float) > DRWAV_SIZE_MAX) { framesToRead = DRWAV_SIZE_MAX / sizeof(float) / pWav->channels; @@ -4641,7 +4847,7 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_f32le(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { drwav_uint64 framesRead = drwav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut); - if (!drwav__is_little_endian()) { + if (pBufferOut != NULL && drwav__is_little_endian() == DRWAV_FALSE) { drwav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels); } @@ -4651,7 +4857,7 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_f32be(drwav* pWav, drwav_uint64 framesToRead, float* pBufferOut) { drwav_uint64 framesRead = drwav_read_pcm_frames_f32(pWav, framesToRead, pBufferOut); - if (drwav__is_little_endian()) { + if (pBufferOut != NULL && drwav__is_little_endian() == DRWAV_TRUE) { drwav__bswap_samples_f32(pBufferOut, framesRead*pWav->channels); } @@ -4710,7 +4916,12 @@ } for (i = 0; i < sampleCount; ++i) { - double x = (double)(((drwav_int32)(((drwav_uint32)(pIn[i*3+0]) << 8) | ((drwav_uint32)(pIn[i*3+1]) << 16) | ((drwav_uint32)(pIn[i*3+2])) << 24)) >> 8); + double x; + drwav_uint32 a = ((drwav_uint32)(pIn[i*3+0]) << 8); + drwav_uint32 b = ((drwav_uint32)(pIn[i*3+1]) << 16); + drwav_uint32 c = ((drwav_uint32)(pIn[i*3+2]) << 24); + + x = (double)((drwav_int32)(a | b | c) >> 8); *pOut++ = (float)(x * 0.00000011920928955078125); } } @@ -4768,7 +4979,7 @@ -static void drwav__pcm_to_s32(drwav_int32* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) +DRWAV_PRIVATE void drwav__pcm_to_s32(drwav_int32* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { unsigned int i; @@ -4819,7 +5030,7 @@ } } -static void drwav__ieee_to_s32(drwav_int32* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) +DRWAV_PRIVATE void drwav__ieee_to_s32(drwav_int32* pOut, const drwav_uint8* pIn, size_t totalSampleCount, unsigned int bytesPerSample) { if (bytesPerSample == 4) { drwav_f32_to_s32(pOut, (const float*)pIn, totalSampleCount); @@ -4835,7 +5046,7 @@ } -static drwav_uint64 drwav_read_pcm_frames_s32__pcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s32__pcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; @@ -4869,7 +5080,7 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s32__msadpcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s32__msadpcm(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { /* We're just going to borrow the implementation from the drwav_read_s16() since ADPCM is a little bit more complicated than other formats and I don't @@ -4877,6 +5088,7 @@ */ drwav_uint64 totalFramesRead = 0; drwav_int16 samples16[2048]; + while (framesToRead > 0) { drwav_uint64 framesRead = drwav_read_pcm_frames_s16(pWav, drwav_min(framesToRead, drwav_countof(samples16)/pWav->channels), samples16); if (framesRead == 0) { @@ -4893,7 +5105,7 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s32__ima(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s32__ima(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { /* We're just going to borrow the implementation from the drwav_read_s16() since IMA-ADPCM is a little bit more complicated than other formats and I don't @@ -4901,6 +5113,7 @@ */ drwav_uint64 totalFramesRead = 0; drwav_int16 samples16[2048]; + while (framesToRead > 0) { drwav_uint64 framesRead = drwav_read_pcm_frames_s16(pWav, drwav_min(framesToRead, drwav_countof(samples16)/pWav->channels), samples16); if (framesRead == 0) { @@ -4917,12 +5130,12 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s32__ieee(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s32__ieee(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (bytesPerFrame == 0) { return 0; } @@ -4945,12 +5158,12 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s32__alaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s32__alaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (bytesPerFrame == 0) { return 0; } @@ -4973,12 +5186,12 @@ return totalFramesRead; } -static drwav_uint64 drwav_read_pcm_frames_s32__mulaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) +DRWAV_PRIVATE drwav_uint64 drwav_read_pcm_frames_s32__mulaw(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { drwav_uint64 totalFramesRead; drwav_uint8 sampleData[4096]; - drwav_uint32 bytesPerFrame = drwav_get_bytes_per_pcm_frame(pWav); + if (bytesPerFrame == 0) { return 0; } @@ -5003,16 +5216,19 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_s32(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { - if (pWav == NULL || framesToRead == 0 || pBufferOut == NULL) { + if (pWav == NULL || framesToRead == 0) { return 0; } + if (pBufferOut == NULL) { + return drwav_read_pcm_frames(pWav, framesToRead, NULL); + } + /* Don't try to read more samples than can potentially fit in the output buffer. */ if (framesToRead * pWav->channels * sizeof(drwav_int32) > DRWAV_SIZE_MAX) { framesToRead = DRWAV_SIZE_MAX / sizeof(drwav_int32) / pWav->channels; } - if (pWav->translatedFormatTag == DR_WAVE_FORMAT_PCM) { return drwav_read_pcm_frames_s32__pcm(pWav, framesToRead, pBufferOut); } @@ -5043,7 +5259,7 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_s32le(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { drwav_uint64 framesRead = drwav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut); - if (!drwav__is_little_endian()) { + if (pBufferOut != NULL && drwav__is_little_endian() == DRWAV_FALSE) { drwav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels); } @@ -5053,7 +5269,7 @@ DRWAV_API drwav_uint64 drwav_read_pcm_frames_s32be(drwav* pWav, drwav_uint64 framesToRead, drwav_int32* pBufferOut) { drwav_uint64 framesRead = drwav_read_pcm_frames_s32(pWav, framesToRead, pBufferOut); - if (drwav__is_little_endian()) { + if (pBufferOut != NULL && drwav__is_little_endian() == DRWAV_TRUE) { drwav__bswap_samples_s32(pBufferOut, framesRead*pWav->channels); } @@ -5159,7 +5375,7 @@ -static drwav_int16* drwav__read_pcm_frames_and_close_s16(drwav* pWav, unsigned int* channels, unsigned int* sampleRate, drwav_uint64* totalFrameCount) +DRWAV_PRIVATE drwav_int16* drwav__read_pcm_frames_and_close_s16(drwav* pWav, unsigned int* channels, unsigned int* sampleRate, drwav_uint64* totalFrameCount) { drwav_uint64 sampleDataSize; drwav_int16* pSampleData; @@ -5201,7 +5417,7 @@ return pSampleData; } -static float* drwav__read_pcm_frames_and_close_f32(drwav* pWav, unsigned int* channels, unsigned int* sampleRate, drwav_uint64* totalFrameCount) +DRWAV_PRIVATE float* drwav__read_pcm_frames_and_close_f32(drwav* pWav, unsigned int* channels, unsigned int* sampleRate, drwav_uint64* totalFrameCount) { drwav_uint64 sampleDataSize; float* pSampleData; @@ -5243,7 +5459,7 @@ return pSampleData; } -static drwav_int32* drwav__read_pcm_frames_and_close_s32(drwav* pWav, unsigned int* channels, unsigned int* sampleRate, drwav_uint64* totalFrameCount) +DRWAV_PRIVATE drwav_int32* drwav__read_pcm_frames_and_close_s32(drwav* pWav, unsigned int* channels, unsigned int* sampleRate, drwav_uint64* totalFrameCount) { drwav_uint64 sampleDataSize; drwav_int32* pSampleData; @@ -5555,45 +5771,59 @@ DRWAV_API drwav_uint16 drwav_bytes_to_u16(const drwav_uint8* data) { - return drwav__bytes_to_u16(data); + return ((drwav_uint16)data[0] << 0) | ((drwav_uint16)data[1] << 8); } DRWAV_API drwav_int16 drwav_bytes_to_s16(const drwav_uint8* data) { - return drwav__bytes_to_s16(data); + return (drwav_int16)drwav_bytes_to_u16(data); } DRWAV_API drwav_uint32 drwav_bytes_to_u32(const drwav_uint8* data) { - return drwav__bytes_to_u32(data); + return ((drwav_uint32)data[0] << 0) | ((drwav_uint32)data[1] << 8) | ((drwav_uint32)data[2] << 16) | ((drwav_uint32)data[3] << 24); } DRWAV_API drwav_int32 drwav_bytes_to_s32(const drwav_uint8* data) { - return drwav__bytes_to_s32(data); + return (drwav_int32)drwav_bytes_to_u32(data); } DRWAV_API drwav_uint64 drwav_bytes_to_u64(const drwav_uint8* data) { - return drwav__bytes_to_u64(data); + return + ((drwav_uint64)data[0] << 0) | ((drwav_uint64)data[1] << 8) | ((drwav_uint64)data[2] << 16) | ((drwav_uint64)data[3] << 24) | + ((drwav_uint64)data[4] << 32) | ((drwav_uint64)data[5] << 40) | ((drwav_uint64)data[6] << 48) | ((drwav_uint64)data[7] << 56); } DRWAV_API drwav_int64 drwav_bytes_to_s64(const drwav_uint8* data) { - return drwav__bytes_to_s64(data); + return (drwav_int64)drwav_bytes_to_u64(data); } DRWAV_API drwav_bool32 drwav_guid_equal(const drwav_uint8 a[16], const drwav_uint8 b[16]) { - return drwav__guid_equal(a, b); + int i; + for (i = 0; i < 16; i += 1) { + if (a[i] != b[i]) { + return DRWAV_FALSE; + } + } + + return DRWAV_TRUE; } DRWAV_API drwav_bool32 drwav_fourcc_equal(const drwav_uint8* a, const char* b) { - return drwav__fourcc_equal(a, b); + return + a[0] == b[0] && + a[1] == b[1] && + a[2] == b[2] && + a[3] == b[3]; } +#endif /* dr_wav_c */ #endif /* DR_WAV_IMPLEMENTATION */ /* @@ -5784,6 +6014,61 @@ /* REVISION HISTORY ================ +v0.12.20 - 2021-06-11 + - Fix some undefined behavior. + +v0.12.19 - 2021-02-21 + - Fix a warning due to referencing _MSC_VER when it is undefined. + - Minor improvements to the management of some internal state concerning the data chunk cursor. + +v0.12.18 - 2021-01-31 + - Clean up some static analysis warnings. + +v0.12.17 - 2021-01-17 + - Minor fix to sample code in documentation. + - Correctly qualify a private API as private rather than public. + - Code cleanup. + +v0.12.16 - 2020-12-02 + - Fix a bug when trying to read more bytes than can fit in a size_t. + +v0.12.15 - 2020-11-21 + - Fix compilation with OpenWatcom. + +v0.12.14 - 2020-11-13 + - Minor code clean up. + +v0.12.13 - 2020-11-01 + - Improve compiler support for older versions of GCC. + +v0.12.12 - 2020-09-28 + - Add support for RF64. + - Fix a bug in writing mode where the size of the RIFF chunk incorrectly includes the header section. + +v0.12.11 - 2020-09-08 + - Fix a compilation error on older compilers. + +v0.12.10 - 2020-08-24 + - Fix a bug when seeking with ADPCM formats. + +v0.12.9 - 2020-08-02 + - Simplify sized types. + +v0.12.8 - 2020-07-25 + - Fix a compilation warning. + +v0.12.7 - 2020-07-15 + - Fix some bugs on big-endian architectures. + - Fix an error in s24 to f32 conversion. + +v0.12.6 - 2020-06-23 + - Change drwav_read_*() to allow NULL to be passed in as the output buffer which is equivalent to a forward seek. + - Fix a buffer overflow when trying to decode invalid IMA-ADPCM files. + - Add include guard for the implementation section. + +v0.12.5 - 2020-05-27 + - Minor documentation fix. + v0.12.4 - 2020-05-16 - Replace assert() with DRWAV_ASSERT(). - Add compile-time and run-time version querying. diff -Nru dosbox-staging-0.76.0/src/libs/decoders/flac.c dosbox-staging-0.77.0/src/libs/decoders/flac.c --- dosbox-staging-0.76.0/src/libs/decoders/flac.c 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/flac.c 2021-07-02 15:47:39.000000000 +0000 @@ -1,9 +1,9 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * Copyright (C) 2001-2017 Ryan C. Gordon - * Copyright (C) 2018-2019 Kevin R. Croft - * Copyright (C) 2020-2020 The dosbox-staging team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -160,7 +160,7 @@ { extensions_flac, "Free Lossless Audio Codec (FLAC)", - "The dosbox-staging team" + "The DOSBox Staging Team" }, FLAC_init, /* init() method */ diff -Nru dosbox-staging-0.76.0/src/libs/decoders/Makefile.am dosbox-staging-0.77.0/src/libs/decoders/Makefile.am --- dosbox-staging-0.76.0/src/libs/decoders/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libdecoders.a - -libdecoders_a_SOURCES = \ - archive.h \ - dr_flac.h \ - dr_mp3.h \ - dr_wav.h \ - flac.c \ - mp3.cpp \ - mp3_seek_table.cpp \ - mp3_seek_table.h \ - SDL_sound.c \ - SDL_sound.h \ - SDL_sound_internal.h \ - stb.h \ - stb_vorbis.h \ - vorbis.c \ - wav.c \ - xxhash.h - -libdecoders_a_CXXFLAGS = \ - $(AM_CXXFLAGS) \ - $(CXXFLAGS) \ - -Wpedantic \ - -Wall - -libdecoders_a_CFLAGS = \ - $(AM_CFLAGS) \ - $(CFLAGS) \ - -Wpedantic \ - -Wall - -if USE_OPUS -libdecoders_a_SOURCES += opus.cpp -libdecoders_a_CFLAGS += -DUSE_OPUS # Ensures Opus is registered in SDL_sound.c -libdecoders_a_CXXFLAGS += $(OPUSFILE_CFLAGS) # Ensures opus.cpp find the header -endif diff -Nru dosbox-staging-0.76.0/src/libs/decoders/meson.build dosbox-staging-0.77.0/src/libs/decoders/meson.build --- dosbox-staging-0.76.0/src/libs/decoders/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,13 @@ +libdecoders_sources = files([ + 'flac.c', + 'mp3.cpp', + 'mp3_seek_table.cpp', + 'opus.cpp', + 'SDL_sound.c', + 'vorbis.c', + 'wav.c', +]) + +libdecoders = static_library('decoders', libdecoders_sources, + include_directories : incdir, + dependencies : [sdl2_dep, opus_dep]) diff -Nru dosbox-staging-0.76.0/src/libs/decoders/mp3.cpp dosbox-staging-0.77.0/src/libs/decoders/mp3.cpp --- dosbox-staging-0.76.0/src/libs/decoders/mp3.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/mp3.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,9 +1,9 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * Copyright (C) 2001-2017 Ryan C. Gordon - * Copyright (C) 2018-2019 Kevin R. Croft - * Copyright (C) 2020-2020 The dosbox-staging team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +27,10 @@ * - dr_libs: https://github.com/mackron/dr_libs (source) * - dr_mp3: http://mackron.github.io/dr_mp3.html (website) */ -#include + +#include "config.h" + +#include "support.h" #include "mp3_seek_table.h" #define DR_MP3_IMPLEMENTATION @@ -168,7 +171,7 @@ { extensions_mp3, "MPEG-1 Audio Layer I-III", - "The dosbox-staging team" + "The DOSBox Staging Team" }, MP3_init, /* init() method */ diff -Nru dosbox-staging-0.76.0/src/libs/decoders/mp3_seek_table.cpp dosbox-staging-0.77.0/src/libs/decoders/mp3_seek_table.cpp --- dosbox-staging-0.76.0/src/libs/decoders/mp3_seek_table.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/mp3_seek_table.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,25 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* * DOSBox MP3 Seek Table Handler * ----------------------------- * @@ -49,33 +70,9 @@ * The seek-table file is versioned (see SEEK_TABLE_IDENTIFIER befow), * therefore, if the format and version is updated, then the seek-table * will be regenerated. - - * The seek table handler makes use of the following single-header public libraries: - * - dr_mp3: http://mackron.github.io/dr_mp3.html, by David Reid - * - archive: https://github.com/voidah/archive, by Arthur Ouellet - * - xxHash: http://cyan4973.github.io/xxHash, by Yann Collet - * - * Copyright (C) 2020 The dosbox-staging team - * Copyright (C) 2018-2019 Kevin R. Croft - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if HAVE_CONFIG_H -# include -#endif +#include "mp3_seek_table.h" // System headers #include @@ -88,7 +85,6 @@ #define XXH_INLINE_ALL #include "xxhash.h" -#include "mp3_seek_table.h" // C++ scope modifiers using std::map; diff -Nru dosbox-staging-0.76.0/src/libs/decoders/mp3_seek_table.h dosbox-staging-0.77.0/src/libs/decoders/mp3_seek_table.h --- dosbox-staging-0.76.0/src/libs/decoders/mp3_seek_table.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/mp3_seek_table.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,16 +1,8 @@ /* - * DOSBox MP3 Seek Table Handler - * ----------------------------- - * See mp3_seek_table.cpp for more documentation. + * SPDX-License-Identifier: GPL-2.0-or-later * - * The seek table handler makes use of the following single-header - * public libraries: - * - dr_mp3: http://mackron.github.io/dr_mp3.html, by David Reid - * - archive: https://github.com/voidah/archive, by Arthur Ouellet - * - xxHash: http://cyan4973.github.io/xxHash, by Yann Collet - * - * Copyright (C) 2020 The dosbox-staging team - * Copyright (C) 2018-2019 Kevin R. Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +19,22 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef DOSBOX_MP3_SEEK_TABLE_H +#define DOSBOX_MP3_SEEK_TABLE_H + +/* DOSBox MP3 Seek Table Handler + * ----------------------------- + * See mp3_seek_table.cpp for more documentation. + * + * The seek table handler makes use of the following single-header + * public libraries: + * - dr_mp3: http://mackron.github.io/dr_mp3.html, by David Reid + * - archive: https://github.com/voidah/archive, by Arthur Ouellet + * - xxHash: http://cyan4973.github.io/xxHash, by Yann Collet + */ + +#include "config.h" + #include // provides: vector #include // provides: SDL_RWops #include "archive.h" // provides: archive @@ -63,3 +71,5 @@ mp3_t* p_mp3, const char* seektable_filename, bool &result); + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/decoders/opus.cpp dosbox-staging-0.77.0/src/libs/decoders/opus.cpp --- dosbox-staging-0.76.0/src/libs/decoders/opus.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/opus.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,19 +1,8 @@ /* - * DOSBox Opus decoder API implementation - * -------------------------------------- - * This decoders makes use of: - * - libopusfile, for .opus file handing and frame decoding + * SPDX-License-Identifier: GPL-2.0-or-later * - * Source links - * - opusfile: https://github.com/xiph/opusfile - * - opus-tools: https://github.com/xiph/opus-tools - * - * Documentation references - * - Ogg Opus: https://www.opus-codec.org/docs - * - OpusFile: https://mf4.xiph.org/jenkins/view/opus/job/opusfile-unix/ws/doc/html/index.html - * - * Copyright (C) 2020 The dosbox-staging team - * Copyright (C) 2018-2019 Kevin R. Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,13 +19,27 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* + * DOSBox Opus decoder API implementation + * -------------------------------------- + * This decoders makes use of: + * - libopusfile, for .opus file handing and frame decoding + * + * Source links + * - opusfile: https://github.com/xiph/opusfile + * - opus-tools: https://github.com/xiph/opus-tools + * + * Documentation references + * - Ogg Opus: https://www.opus-codec.org/docs + * - OpusFile: https://mf4.xiph.org/jenkins/view/opus/job/opusfile-unix/ws/doc/html/index.html + */ + // #define DEBUG_CHATTER 1 -#if HAVE_CONFIG_H -# include -#endif +#include "config.h" #include +#include #include #include @@ -47,8 +50,8 @@ #include "SDL_sound_internal.h" // Opus's internal sampling rates to which all encoded streams get resampled -#define OPUS_SAMPLE_RATE 48000u -#define OPUS_SAMPLE_RATE_PER_MS 48u +constexpr auto OPUS_FRAMES_PER_S = 48000; +constexpr auto OPUS_FRAMES_PER_MS = 48; static int32_t opus_init(void) { @@ -139,11 +142,10 @@ "OPUS: The position from where to seek is invalid"); const int64_t offset_after_seek = SDL_RWseek(static_cast(stream), - static_cast(offset), - whence); + offset, whence); SNDDBG(("Opus ops seek: " - "{requested offset: %ld, seeked offset: %ld}\n", - offset, offset_after_seek)); + "requested: %" PRId64 " and got: %" PRId64 "\n", + static_cast(offset), offset_after_seek)); return (offset_after_seek != -1 ? 0 : -1); } /* RWops_opus_seek */ @@ -175,8 +177,7 @@ assertm(stream, "OPUS: Input is not initialized"); const int64_t current_offset = SDL_RWtell(static_cast(stream)); - SNDDBG(("Opus ops tell: " - "%ld\n", current_offset)); + SNDDBG(("Opus ops tell: % " PRId64 "\n",current_offset)); return current_offset; } /* RWops_opus_tell */ @@ -254,38 +255,41 @@ assertm(sample, "OPUS: Input is not initialized"); (void) ext; // deliberately unused, but present for API compliance - int32_t rcode = 0; // assume failure until determined otherwise auto *internal = static_cast(sample->opaque); - OggOpusFile *of = op_open_callbacks(internal->rw, &RWops_opus_callbacks, nullptr, 0, &rcode); + int32_t open_result = 1; // op_open will set to 0 on success + OggOpusFile *of = op_open_callbacks(internal->rw, &RWops_opus_callbacks, + nullptr, 0, &open_result); internal->decoder_private = of; // Had a problem during the open - if (rcode != 0) { // op_open will set rcode to non-zero + if (open_result != 0) { opus_close(sample); - SNDDBG(("OPUS: open error: " - "'Could not open file due errno: %d'\n", rcode)); + SNDDBG(("OPUS: open failed, errno: %d'\n", open_result)); return 0; // We return 0 to indicate failure from opus_open - } else - rcode = 1; // Otherwise open succeeded, so set rcode to 1 + } const OpusHead* oh = op_head(of, -1); output_opus_info(of, oh); // Populate track properties - sample->actual.rate = OPUS_SAMPLE_RATE; + sample->actual.rate = OPUS_FRAMES_PER_S; sample->actual.channels = static_cast(oh->channel_count); sample->flags = op_seekable(of) ? SOUND_SAMPLEFLAG_CANSEEK: 0; sample->actual.format = AUDIO_S16SYS; // Populate the track's duration in milliseconds (or -1 if bad) - const auto pcm_result = static_cast(op_pcm_total(of, -1)); - if (pcm_result == OP_EINVAL) + const int64_t pcm_frames = op_pcm_total(of, -1); + + if (pcm_frames == OP_EINVAL) { internal->total_time = -1; - else { - constexpr auto frames_per_ms = static_cast(OPUS_SAMPLE_RATE_PER_MS); - internal->total_time = ceil_sdivide(pcm_result, frames_per_ms); + return 0; // couldn't determine length; something's wrong! } - return rcode; + constexpr int64_t frames_per_ms = OPUS_FRAMES_PER_MS; + const int64_t track_ms = ceil_sdivide(pcm_frames, frames_per_ms); + + assertm(track_ms <= INT32_MAX, "OPUS: Irack exceeds 2^31 ms (596 hrs)"); + internal->total_time = static_cast(track_ms); + return 1; // success! } /* opus_open */ /* @@ -345,35 +349,33 @@ // Guard against invalid input assertm(sample, "OPUS: Input is not initialized"); - int rcode = -1; - auto *internal = static_cast(sample->opaque); auto *of = static_cast(internal->decoder_private); + // convert the desired ms offset into OPUS PCM samples + const ogg_int64_t desired_pcm = ms * OPUS_FRAMES_PER_MS; + const int seek_result = op_pcm_seek(of, desired_pcm); + #if (defined DEBUG_CHATTER) - const float total_seconds = ms / 1000.0; - uint8_t minutes = total_seconds / 60; - const double seconds = - static_cast(total_seconds) % 60 - + total_seconds - - static_cast(total_seconds); - const uint8_t hours = minutes / 60; - minutes = minutes % 60; + int milliseconds = static_cast(ms); + int seconds = milliseconds / 1000; + milliseconds %= 1000; + int minutes = seconds / 60; + seconds %= 60; + const int hours = minutes / 60; + minutes %= 60; + + SNDDBG(("Opus seek requested: " + "at time %02d:%02d:%02d.%03d and PCM byte %" PRId64 "}\n", + hours, minutes, seconds, milliseconds, desired_pcm)); #endif - // convert the desired ms offset into OPUS PCM samples - const ogg_int64_t desired_pcm = ms * OPUS_SAMPLE_RATE_PER_MS; - rcode = op_pcm_seek(of, desired_pcm); - - if (rcode != 0) { - SNDDBG(("Opus seek problem, see errno: %d\n", rcode)); + if (seek_result != 0) { + SNDDBG(("Opus seek failed, errno: %d\n", seek_result)); sample->flags |= SOUND_SAMPLEFLAG_ERROR; - } else { - SNDDBG(("Opus seek in file: " - "{requested_time: '%02d:%02d:%.2f', becomes_opus_pcm: %ld}\n", - hours, minutes, seconds, desired_pcm)); } - return (rcode == 0); + + return (seek_result == 0); } /* opus_seek */ /* @@ -397,7 +399,7 @@ { extensions_opus, "Ogg Opus audio using libopusfile", - "The dosbox-staging team" + "The DOSBox Staging Team", }, opus_init, /* init() method */ diff -Nru dosbox-staging-0.76.0/src/libs/decoders/SDL_sound.c dosbox-staging-0.77.0/src/libs/decoders/SDL_sound.c --- dosbox-staging-0.76.0/src/libs/decoders/SDL_sound.c 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/SDL_sound.c 2021-07-02 15:47:39.000000000 +0000 @@ -1,16 +1,8 @@ /* - * Modified SDL Sound API implementation - * ------------------------------------- - * This file implements the API, the documentation for which can - * be found in SDL_sound.h. This API has been changed from its - * original implementation as follows: - * - Cut down in size; most notably exclusion of the conversion routines - * - Small bug fixes and warnings cleaned up - * - Elimination of intermediate buffers, allowing direct decoding - * - Moved from sample-based logic to frame-based (channel-agnostic) + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020 The dosbox-staging team - * Copyright (C) 2018-2019 Kevin R. Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * Copyright (C) 2001-2017 Ryan C. Gordon * * This program is free software; you can redistribute it and/or modify @@ -28,6 +20,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* + * Modified SDL Sound API implementation + * ------------------------------------- + * This file implements the API, the documentation for which can + * be found in SDL_sound.h. This API has been changed from its + * original implementation as follows: + * - Cut down in size; most notably exclusion of the conversion routines + * - Small bug fixes and warnings cleaned up + * - Elimination of intermediate buffers, allowing direct decoding + * - Moved from sample-based logic to frame-based (channel-agnostic) + */ + #include #include @@ -51,9 +55,7 @@ /* Supported decoder drivers... */ extern const Sound_DecoderFunctions __Sound_DecoderFunctions_FLAC; extern const Sound_DecoderFunctions __Sound_DecoderFunctions_MP3; -#ifdef USE_OPUS extern const Sound_DecoderFunctions __Sound_DecoderFunctions_OPUS; -#endif extern const Sound_DecoderFunctions __Sound_DecoderFunctions_VORBIS; extern const Sound_DecoderFunctions __Sound_DecoderFunctions_WAV; @@ -61,9 +63,7 @@ { { 0, &__Sound_DecoderFunctions_FLAC }, { 0, &__Sound_DecoderFunctions_MP3 }, -#ifdef USE_OPUS { 0, &__Sound_DecoderFunctions_OPUS }, -#endif { 0, &__Sound_DecoderFunctions_VORBIS }, { 0, &__Sound_DecoderFunctions_WAV }, { 0, NULL } diff -Nru dosbox-staging-0.76.0/src/libs/decoders/SDL_sound.h dosbox-staging-0.77.0/src/libs/decoders/SDL_sound.h --- dosbox-staging-0.76.0/src/libs/decoders/SDL_sound.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/SDL_sound.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,26 @@ /* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft + * Copyright (C) 2001-2017 Ryan C. Gordon + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* * Modified SDL Sound API * ---------------------- * The basic gist of SDL_sound is that you use an SDL_RWops to get sound data @@ -21,24 +43,6 @@ * - .OGG (Ogg Vorbis support via the std_vorbis single-header decoder) * - .OPUS (Ogg Opus support via the Opusfile and SpeexDSP libraries) * - .FLAC (Free Lossless Audio Codec support via the dr_flac single-header decoder) - * - * Copyright (C) 2020 The dosbox-staging team - * Copyright (C) 2018-2019 Kevin R. Croft - * Copyright (C) 2001-2017 Ryan C. Gordon - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _INCLUDE_SDL_SOUND_H_ @@ -142,7 +146,6 @@ const char **extensions; /**< File extensions, list ends with NULL. */ const char *description; /**< Human readable description of decoder. */ const char *author; /**< "Name Of Author \" */ - const char *url; /**< URL specific to this decoder. */ } Sound_DecoderInfo; diff -Nru dosbox-staging-0.76.0/src/libs/decoders/SDL_sound_internal.h dosbox-staging-0.77.0/src/libs/decoders/SDL_sound_internal.h --- dosbox-staging-0.76.0/src/libs/decoders/SDL_sound_internal.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/SDL_sound_internal.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,11 +1,8 @@ /* - * Modified SDL Sound API implementation - * ------------------------------------- - * Internal function/structure declaration. Do NOT include in your - * application. + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020 The dosbox-staging team - * Copyright (C) 2018-2019 Kevin R. Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * Copyright (C) 2001-2017 Ryan C. Gordon * * This program is free software; you can redistribute it and/or modify @@ -23,6 +20,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* + * Modified SDL Sound API implementation + * ------------------------------------- + * Internal function/structure declaration. Do NOT include in your + * application. + */ + #ifndef _INCLUDE_SDL_SOUND_INTERNAL_H_ #define _INCLUDE_SDL_SOUND_INTERNAL_H_ @@ -294,4 +298,3 @@ #endif /* defined _INCLUDE_SDL_SOUND_INTERNAL_H_ */ /* end of SDL_sound_internal.h ... */ - diff -Nru dosbox-staging-0.76.0/src/libs/decoders/stb_vorbis.h dosbox-staging-0.77.0/src/libs/decoders/stb_vorbis.h --- dosbox-staging-0.76.0/src/libs/decoders/stb_vorbis.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/stb_vorbis.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,4 +1,4 @@ -// Ogg Vorbis audio decoder - v1.19 - public domain +// Ogg Vorbis audio decoder - v1.20 - public domain // http://nothings.org/stb_vorbis/ // // Original version written by Sean Barrett in 2007. @@ -31,9 +31,11 @@ // Phillip Bennefall Rohit Thiago Goulart // github:manxorist saga musix github:infatum // Timur Gagiev Maxwell Koo Peter Waller -// github:audinowho Dougall Johnson +// github:audinowho Dougall Johnson David Reid +// github:Clownacy Pedro J. Estebanez Remi Verschelde // // Partial history: +// 1.20 - 2020-07-11 - several small fixes // 1.19 - 2020-02-05 - warnings // 1.18 - 2020-02-02 - fix seek bugs; parse header comments; misc warnings etc. // 1.17 - 2019-07-08 - fix CVE-2019-13217..CVE-2019-13223 (by ForAllSecure) @@ -582,7 +584,7 @@ #if defined(_MSC_VER) || defined(__MINGW32__) #include #endif - #if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__) + #if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__) #include #endif #else // STB_VORBIS_NO_CRT @@ -941,7 +943,7 @@ #define array_size_required(count,size) (count*(sizeof(void *)+(size))) #define temp_alloc(f,size) (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size)) -// #define temp_free(f,p) 0 +// #define temp_free(f,p) (void)0 #define temp_alloc_save(f) ((f)->temp_offset) #define temp_alloc_restore(f,p) ((f)->temp_offset = (p)) @@ -993,7 +995,7 @@ static void setup_temp_free(vorb *f, void *p, int sz) { if (f->alloc.alloc_buffer) { - f->temp_offset += (sz+3)&~3; + f->temp_offset += (sz+7)&~7; return; } free(p); @@ -1677,6 +1679,8 @@ f->valid_bits += 8; } } + + assert(f->valid_bits >= n); z = f->acc & ((1 << n)-1); f->acc >>= n; f->valid_bits -= n; @@ -2639,6 +2643,23 @@ z[-7] = k11 + k22; // z1 - z5 - z2 + z6 } +// On x86 targets, Clang's O2 and O3 optimizer fails to properly compile the while +// loop inside imdct_step3_inner_s_loop_ld654. Therefore, this function acts as a +// small speedbump that sufficiently disrupts the optimizer such that it produces a +// working result at all optimization levels. +// +// To test if this is fixed in the future, simply comment-out __attribute__((noinline)) +// and build with O2 or O3 optimizations. When Clang properly handles it, the z[-15] +// assignment can be placed back into the while loop instead of this function call. +// +#if defined(__clang__) && (C_TARGETCPU == X86 || C_TARGETCPU == X86_64) +__attribute__((noinline)) +#endif +static void imdct_step3_inner_s_loop_ld654_z15(float *z, const float k00, const float k11, const float A2) +{ + z[-15] = (k00-k11) * A2; +} + static void imdct_step3_inner_s_loop_ld654(int n, float *e, int i_off, float *A, int base_n) { int a_off = base_n >> 3; @@ -2675,7 +2696,7 @@ z[ -6] = z[ -6] + z[-14]; z[ -7] = z[ -7] + z[-15]; z[-14] = (k00+k11) * A2; - z[-15] = (k00-k11) * A2; + imdct_step3_inner_s_loop_ld654_z15(z, k00, k11, A2); iter_54(z); iter_54(z-8); @@ -3705,6 +3726,7 @@ //file vendor len = get32_packet(f); f->vendor = (char*)setup_malloc(f, sizeof(char) * (len+1)); + if (f->vendor == NULL) return error(f, VORBIS_outofmem); for(i=0; i < len; ++i) { f->vendor[i] = get8_packet(f); } @@ -3712,11 +3734,13 @@ //user comments f->comment_list_length = get32_packet(f); f->comment_list = (char**)setup_malloc(f, sizeof(char*) * (f->comment_list_length)); + // fixes https://github.com/nothings/stb/issues/1021 + if (f->comment_list_length > 0 && f->comment_list == NULL) return error(f, VORBIS_outofmem); for(i=0; i < f->comment_list_length; ++i) { len = get32_packet(f); f->comment_list[i] = (char*)setup_malloc(f, sizeof(char) * (len+1)); - + if (f->comment_list[i] == NULL) return error(f, VORBIS_outofmem); for(j=0; j < len; ++j) { f->comment_list[i][j] = get8_packet(f); } @@ -4330,7 +4354,7 @@ memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start if (z) { p->alloc = *z; - p->alloc.alloc_buffer_length_in_bytes = (p->alloc.alloc_buffer_length_in_bytes+3) & ~3; + p->alloc.alloc_buffer_length_in_bytes &= ~7; p->temp_offset = p->alloc.alloc_buffer_length_in_bytes; } p->eof = 0; @@ -4640,7 +4664,7 @@ header[i] = get8(f); if (f->eof) return 0; if (header[4] != 0) goto invalid; - goal = header[22] + (header[23] << 8) + (header[24]<<16) + (header[25]<<24); + goal = header[22] | (header[23] << 8) | (header[24] << 16) | (header[25] << 24); for (i=22; i < 26; ++i) header[i] = 0; crc = 0; diff -Nru dosbox-staging-0.76.0/src/libs/decoders/vorbis.c dosbox-staging-0.77.0/src/libs/decoders/vorbis.c --- dosbox-staging-0.76.0/src/libs/decoders/vorbis.c 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/vorbis.c 2021-07-02 15:47:39.000000000 +0000 @@ -1,11 +1,8 @@ /* - * DOSBox MP3 decoder API implementation - * ------------------------------------- - * It makes use of the stand-alone STB Vorbis library: - * - STB: https://github.com/nothings/stb (source) - * - STB: https://twitter.com/nothings (website/author info) + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2018-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * Copyright (C) 2001-2017 Ryan C. Gordon * * This program is free software; you can redistribute it and/or modify @@ -23,6 +20,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* + * DOSBox Vorbis decoder API implementation + * ------------------------------------- + * It makes use of the stand-alone STB Vorbis library: + * - STB: https://github.com/nothings/stb (source) + * - STB: https://twitter.com/nothings (website/author info) + */ + #if HAVE_CONFIG_H # include #endif @@ -210,7 +215,7 @@ { extensions_vorbis, "Ogg Vorbis audio", - "The dosbox-staging team" + "The DOSBox Staging Team" }, VORBIS_init, /* init() method */ diff -Nru dosbox-staging-0.76.0/src/libs/decoders/wav.c dosbox-staging-0.77.0/src/libs/decoders/wav.c --- dosbox-staging-0.76.0/src/libs/decoders/wav.c 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/decoders/wav.c 2021-07-02 15:47:39.000000000 +0000 @@ -1,13 +1,8 @@ /* - * DOSBox MP3 decoder API implementation - * ------------------------------------- - * It makes use of the dr_wav library by David Reid (mackron@gmail.com) - * Source links: - * - dr_libs: https://github.com/mackron/dr_libs (source) - * - dr_wav: http://mackron.github.io/dr_wav.html (website) + * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2020 The dosbox-staging team - * Copyright (C) 2018-2019 Kevin R. Croft + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2018-2021 Kevin R. Croft * Copyright (C) 2001-2017 Ryan C. Gordon * * This program is free software; you can redistribute it and/or modify @@ -25,6 +20,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/* + * DOSBox WAV decoder API implementation + * ------------------------------------- + * It makes use of the dr_wav library by David Reid (mackron@gmail.com) + * Source links: + * - dr_libs: https://github.com/mackron/dr_libs (source) + * - dr_wav: http://mackron.github.io/dr_wav.html (website) + */ + #if HAVE_CONFIG_H # include #endif @@ -167,7 +171,7 @@ { extensions_wav, "WAV Audio Codec", - "The dosbox-staging team" + "The DOSBox Staging Team" }, WAV_init, /* init() method */ diff -Nru dosbox-staging-0.76.0/src/libs/.gitignore dosbox-staging-0.77.0/src/libs/.gitignore --- dosbox-staging-0.76.0/src/libs/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/libs/gui_tk/.gitignore dosbox-staging-0.77.0/src/libs/gui_tk/.gitignore --- dosbox-staging-0.76.0/src/libs/gui_tk/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/gui_tk/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/libs/gui_tk/Makefile.am dosbox-staging-0.77.0/src/libs/gui_tk/Makefile.am --- dosbox-staging-0.76.0/src/libs/gui_tk/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/gui_tk/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libgui_tk.a -libgui_tk_a_SOURCES = gui_tk.cpp gui_tk.h diff -Nru dosbox-staging-0.76.0/src/libs/Makefile.am dosbox-staging-0.77.0/src/libs/Makefile.am --- dosbox-staging-0.76.0/src/libs/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -SUBDIRS = zmbv gui_tk decoders nuked ppscale diff -Nru dosbox-staging-0.76.0/src/libs/nuked/Makefile.am dosbox-staging-0.77.0/src/libs/nuked/Makefile.am --- dosbox-staging-0.76.0/src/libs/nuked/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/nuked/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -EXTRA_DIST = nukedopl.h - -noinst_LIBRARIES = libnuked.a - -libnuked_a_SOURCES = nukedopl.cpp diff -Nru dosbox-staging-0.76.0/src/libs/nuked/meson.build dosbox-staging-0.77.0/src/libs/nuked/meson.build --- dosbox-staging-0.76.0/src/libs/nuked/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/nuked/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +libnuked = static_library('nuked', ['opl3.c']) diff -Nru dosbox-staging-0.76.0/src/libs/nuked/nukedopl.cpp dosbox-staging-0.77.0/src/libs/nuked/nukedopl.cpp --- dosbox-staging-0.76.0/src/libs/nuked/nukedopl.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/nuked/nukedopl.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,1377 +0,0 @@ -// -// Copyright (C) 2013-2018 Alexey Khokholov (Nuke.YKT) -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// -// Nuked OPL3 emulator. -// Thanks: -// MAME Development Team(Jarek Burczynski, Tatsuyuki Satoh): -// Feedback and Rhythm part calculation information. -// forums.submarine.org.uk(carbon14, opl3): -// Tremolo and phase generator calculation information. -// OPLx decapsulated(Matthew Gambrell, Olli Niemitalo): -// OPL2 ROMs. -// siliconpr0n.org(John McMaster, digshadow): -// YMF262 and VRC VII decaps and die shots. -// -// version: 1.8 -// - -#include -#include -#include -#include "nukedopl.h" - -#define RSM_FRAC 10 - -// Channel types - -enum { - ch_2op = 0, - ch_4op = 1, - ch_4op2 = 2, - ch_drum = 3 -}; - -// Envelope key types - -enum { - egk_norm = 0x01, - egk_drum = 0x02 -}; - - -// -// logsin table -// - -static const Bit16u logsinrom[256] = { - 0x859, 0x6c3, 0x607, 0x58b, 0x52e, 0x4e4, 0x4a6, 0x471, - 0x443, 0x41a, 0x3f5, 0x3d3, 0x3b5, 0x398, 0x37e, 0x365, - 0x34e, 0x339, 0x324, 0x311, 0x2ff, 0x2ed, 0x2dc, 0x2cd, - 0x2bd, 0x2af, 0x2a0, 0x293, 0x286, 0x279, 0x26d, 0x261, - 0x256, 0x24b, 0x240, 0x236, 0x22c, 0x222, 0x218, 0x20f, - 0x206, 0x1fd, 0x1f5, 0x1ec, 0x1e4, 0x1dc, 0x1d4, 0x1cd, - 0x1c5, 0x1be, 0x1b7, 0x1b0, 0x1a9, 0x1a2, 0x19b, 0x195, - 0x18f, 0x188, 0x182, 0x17c, 0x177, 0x171, 0x16b, 0x166, - 0x160, 0x15b, 0x155, 0x150, 0x14b, 0x146, 0x141, 0x13c, - 0x137, 0x133, 0x12e, 0x129, 0x125, 0x121, 0x11c, 0x118, - 0x114, 0x10f, 0x10b, 0x107, 0x103, 0x0ff, 0x0fb, 0x0f8, - 0x0f4, 0x0f0, 0x0ec, 0x0e9, 0x0e5, 0x0e2, 0x0de, 0x0db, - 0x0d7, 0x0d4, 0x0d1, 0x0cd, 0x0ca, 0x0c7, 0x0c4, 0x0c1, - 0x0be, 0x0bb, 0x0b8, 0x0b5, 0x0b2, 0x0af, 0x0ac, 0x0a9, - 0x0a7, 0x0a4, 0x0a1, 0x09f, 0x09c, 0x099, 0x097, 0x094, - 0x092, 0x08f, 0x08d, 0x08a, 0x088, 0x086, 0x083, 0x081, - 0x07f, 0x07d, 0x07a, 0x078, 0x076, 0x074, 0x072, 0x070, - 0x06e, 0x06c, 0x06a, 0x068, 0x066, 0x064, 0x062, 0x060, - 0x05e, 0x05c, 0x05b, 0x059, 0x057, 0x055, 0x053, 0x052, - 0x050, 0x04e, 0x04d, 0x04b, 0x04a, 0x048, 0x046, 0x045, - 0x043, 0x042, 0x040, 0x03f, 0x03e, 0x03c, 0x03b, 0x039, - 0x038, 0x037, 0x035, 0x034, 0x033, 0x031, 0x030, 0x02f, - 0x02e, 0x02d, 0x02b, 0x02a, 0x029, 0x028, 0x027, 0x026, - 0x025, 0x024, 0x023, 0x022, 0x021, 0x020, 0x01f, 0x01e, - 0x01d, 0x01c, 0x01b, 0x01a, 0x019, 0x018, 0x017, 0x017, - 0x016, 0x015, 0x014, 0x014, 0x013, 0x012, 0x011, 0x011, - 0x010, 0x00f, 0x00f, 0x00e, 0x00d, 0x00d, 0x00c, 0x00c, - 0x00b, 0x00a, 0x00a, 0x009, 0x009, 0x008, 0x008, 0x007, - 0x007, 0x007, 0x006, 0x006, 0x005, 0x005, 0x005, 0x004, - 0x004, 0x004, 0x003, 0x003, 0x003, 0x002, 0x002, 0x002, - 0x002, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, - 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000 -}; - -// -// exp table -// - -static const Bit16u exprom[256] = { - 0x7fa, 0x7f5, 0x7ef, 0x7ea, 0x7e4, 0x7df, 0x7da, 0x7d4, - 0x7cf, 0x7c9, 0x7c4, 0x7bf, 0x7b9, 0x7b4, 0x7ae, 0x7a9, - 0x7a4, 0x79f, 0x799, 0x794, 0x78f, 0x78a, 0x784, 0x77f, - 0x77a, 0x775, 0x770, 0x76a, 0x765, 0x760, 0x75b, 0x756, - 0x751, 0x74c, 0x747, 0x742, 0x73d, 0x738, 0x733, 0x72e, - 0x729, 0x724, 0x71f, 0x71a, 0x715, 0x710, 0x70b, 0x706, - 0x702, 0x6fd, 0x6f8, 0x6f3, 0x6ee, 0x6e9, 0x6e5, 0x6e0, - 0x6db, 0x6d6, 0x6d2, 0x6cd, 0x6c8, 0x6c4, 0x6bf, 0x6ba, - 0x6b5, 0x6b1, 0x6ac, 0x6a8, 0x6a3, 0x69e, 0x69a, 0x695, - 0x691, 0x68c, 0x688, 0x683, 0x67f, 0x67a, 0x676, 0x671, - 0x66d, 0x668, 0x664, 0x65f, 0x65b, 0x657, 0x652, 0x64e, - 0x649, 0x645, 0x641, 0x63c, 0x638, 0x634, 0x630, 0x62b, - 0x627, 0x623, 0x61e, 0x61a, 0x616, 0x612, 0x60e, 0x609, - 0x605, 0x601, 0x5fd, 0x5f9, 0x5f5, 0x5f0, 0x5ec, 0x5e8, - 0x5e4, 0x5e0, 0x5dc, 0x5d8, 0x5d4, 0x5d0, 0x5cc, 0x5c8, - 0x5c4, 0x5c0, 0x5bc, 0x5b8, 0x5b4, 0x5b0, 0x5ac, 0x5a8, - 0x5a4, 0x5a0, 0x59c, 0x599, 0x595, 0x591, 0x58d, 0x589, - 0x585, 0x581, 0x57e, 0x57a, 0x576, 0x572, 0x56f, 0x56b, - 0x567, 0x563, 0x560, 0x55c, 0x558, 0x554, 0x551, 0x54d, - 0x549, 0x546, 0x542, 0x53e, 0x53b, 0x537, 0x534, 0x530, - 0x52c, 0x529, 0x525, 0x522, 0x51e, 0x51b, 0x517, 0x514, - 0x510, 0x50c, 0x509, 0x506, 0x502, 0x4ff, 0x4fb, 0x4f8, - 0x4f4, 0x4f1, 0x4ed, 0x4ea, 0x4e7, 0x4e3, 0x4e0, 0x4dc, - 0x4d9, 0x4d6, 0x4d2, 0x4cf, 0x4cc, 0x4c8, 0x4c5, 0x4c2, - 0x4be, 0x4bb, 0x4b8, 0x4b5, 0x4b1, 0x4ae, 0x4ab, 0x4a8, - 0x4a4, 0x4a1, 0x49e, 0x49b, 0x498, 0x494, 0x491, 0x48e, - 0x48b, 0x488, 0x485, 0x482, 0x47e, 0x47b, 0x478, 0x475, - 0x472, 0x46f, 0x46c, 0x469, 0x466, 0x463, 0x460, 0x45d, - 0x45a, 0x457, 0x454, 0x451, 0x44e, 0x44b, 0x448, 0x445, - 0x442, 0x43f, 0x43c, 0x439, 0x436, 0x433, 0x430, 0x42d, - 0x42a, 0x428, 0x425, 0x422, 0x41f, 0x41c, 0x419, 0x416, - 0x414, 0x411, 0x40e, 0x40b, 0x408, 0x406, 0x403, 0x400 -}; - -// -// freq mult table multiplied by 2 -// -// 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 12, 12, 15, 15 -// - -static const Bit8u mt[16] = { - 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 20, 24, 24, 30, 30 -}; - -// -// ksl table -// - -static const Bit8u kslrom[16] = { - 0, 32, 40, 45, 48, 51, 53, 55, 56, 58, 59, 60, 61, 62, 63, 64 -}; - -static const Bit8u kslshift[4] = { - 8, 1, 2, 0 -}; - -// -// envelope generator constants -// - -static const Bit8u eg_incstep[4][4] = { - { 0, 0, 0, 0 }, - { 1, 0, 0, 0 }, - { 1, 0, 1, 0 }, - { 1, 1, 1, 0 } -}; - -// -// address decoding -// - -static const Bit8s ad_slot[0x20] = { - 0, 1, 2, 3, 4, 5, -1, -1, 6, 7, 8, 9, 10, 11, -1, -1, - 12, 13, 14, 15, 16, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -static const Bit8u ch_slot[18] = { - 0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, 24, 25, 26, 30, 31, 32 -}; - -// -// Envelope generator -// - -typedef Bit16s(*envelope_sinfunc)(Bit16u phase, Bit16u envelope); -typedef void(*envelope_genfunc)(opl3_slot *slott); - -static Bit16s OPL3_EnvelopeCalcExp(Bit32u level) -{ - if (level > 0x1fff) - { - level = 0x1fff; - } - return (exprom[level & 0xff] << 1) >> (level >> 8); -} - -static Bit16s OPL3_EnvelopeCalcSin0(Bit16u phase, Bit16u envelope) -{ - Bit16u out = 0; - Bit16u neg = 0; - phase &= 0x3ff; - if (phase & 0x200) - { - neg = 0xffff; - } - if (phase & 0x100) - { - out = logsinrom[(phase & 0xff) ^ 0xff]; - } - else - { - out = logsinrom[phase & 0xff]; - } - return OPL3_EnvelopeCalcExp(out + (envelope << 3)) ^ neg; -} - -static Bit16s OPL3_EnvelopeCalcSin1(Bit16u phase, Bit16u envelope) -{ - Bit16u out = 0; - phase &= 0x3ff; - if (phase & 0x200) - { - out = 0x1000; - } - else if (phase & 0x100) - { - out = logsinrom[(phase & 0xff) ^ 0xff]; - } - else - { - out = logsinrom[phase & 0xff]; - } - return OPL3_EnvelopeCalcExp(out + (envelope << 3)); -} - -static Bit16s OPL3_EnvelopeCalcSin2(Bit16u phase, Bit16u envelope) -{ - Bit16u out = 0; - phase &= 0x3ff; - if (phase & 0x100) - { - out = logsinrom[(phase & 0xff) ^ 0xff]; - } - else - { - out = logsinrom[phase & 0xff]; - } - return OPL3_EnvelopeCalcExp(out + (envelope << 3)); -} - -static Bit16s OPL3_EnvelopeCalcSin3(Bit16u phase, Bit16u envelope) -{ - Bit16u out = 0; - phase &= 0x3ff; - if (phase & 0x100) - { - out = 0x1000; - } - else - { - out = logsinrom[phase & 0xff]; - } - return OPL3_EnvelopeCalcExp(out + (envelope << 3)); -} - -static Bit16s OPL3_EnvelopeCalcSin4(Bit16u phase, Bit16u envelope) -{ - Bit16u out = 0; - Bit16u neg = 0; - phase &= 0x3ff; - if ((phase & 0x300) == 0x100) - { - neg = 0xffff; - } - if (phase & 0x200) - { - out = 0x1000; - } - else if (phase & 0x80) - { - out = logsinrom[((phase ^ 0xff) << 1) & 0xff]; - } - else - { - out = logsinrom[(phase << 1) & 0xff]; - } - return OPL3_EnvelopeCalcExp(out + (envelope << 3)) ^ neg; -} - -static Bit16s OPL3_EnvelopeCalcSin5(Bit16u phase, Bit16u envelope) -{ - Bit16u out = 0; - phase &= 0x3ff; - if (phase & 0x200) - { - out = 0x1000; - } - else if (phase & 0x80) - { - out = logsinrom[((phase ^ 0xff) << 1) & 0xff]; - } - else - { - out = logsinrom[(phase << 1) & 0xff]; - } - return OPL3_EnvelopeCalcExp(out + (envelope << 3)); -} - -static Bit16s OPL3_EnvelopeCalcSin6(Bit16u phase, Bit16u envelope) -{ - Bit16u neg = 0; - phase &= 0x3ff; - if (phase & 0x200) - { - neg = 0xffff; - } - return OPL3_EnvelopeCalcExp(envelope << 3) ^ neg; -} - -static Bit16s OPL3_EnvelopeCalcSin7(Bit16u phase, Bit16u envelope) -{ - Bit16u out = 0; - Bit16u neg = 0; - phase &= 0x3ff; - if (phase & 0x200) - { - neg = 0xffff; - phase = (phase & 0x1ff) ^ 0x1ff; - } - out = phase << 3; - return OPL3_EnvelopeCalcExp(out + (envelope << 3)) ^ neg; -} - -static const envelope_sinfunc envelope_sin[8] = { - OPL3_EnvelopeCalcSin0, - OPL3_EnvelopeCalcSin1, - OPL3_EnvelopeCalcSin2, - OPL3_EnvelopeCalcSin3, - OPL3_EnvelopeCalcSin4, - OPL3_EnvelopeCalcSin5, - OPL3_EnvelopeCalcSin6, - OPL3_EnvelopeCalcSin7 -}; - -enum envelope_gen_num -{ - envelope_gen_num_attack = 0, - envelope_gen_num_decay = 1, - envelope_gen_num_sustain = 2, - envelope_gen_num_release = 3 -}; - -static void OPL3_EnvelopeUpdateKSL(opl3_slot *slot) -{ - Bit16s ksl = (kslrom[slot->channel->f_num >> 6] << 2) - - ((0x08 - slot->channel->block) << 5); - if (ksl < 0) - { - ksl = 0; - } - slot->eg_ksl = (Bit8u)ksl; -} - -static void OPL3_EnvelopeCalc(opl3_slot *slot) -{ - Bit8u nonzero; - Bit8u rate; - Bit8u rate_hi; - Bit8u rate_lo; - Bit8u reg_rate = 0; - Bit8u ks; - Bit8u eg_shift, shift; - Bit16u eg_rout; - Bit16s eg_inc; - Bit8u eg_off; - Bit8u reset = 0; - slot->eg_out = slot->eg_rout + (slot->reg_tl << 2) - + (slot->eg_ksl >> kslshift[slot->reg_ksl]) + *slot->trem; - if (slot->key && slot->eg_gen == envelope_gen_num_release) - { - reset = 1; - reg_rate = slot->reg_ar; - } - else - { - switch (slot->eg_gen) - { - case envelope_gen_num_attack: - reg_rate = slot->reg_ar; - break; - case envelope_gen_num_decay: - reg_rate = slot->reg_dr; - break; - case envelope_gen_num_sustain: - if (!slot->reg_type) - { - reg_rate = slot->reg_rr; - } - break; - case envelope_gen_num_release: - reg_rate = slot->reg_rr; - break; - } - } - slot->pg_reset = reset; - ks = slot->channel->ksv >> ((slot->reg_ksr ^ 1) << 1); - nonzero = (reg_rate != 0); - rate = ks + (reg_rate << 2); - rate_hi = rate >> 2; - rate_lo = rate & 0x03; - if (rate_hi & 0x10) - { - rate_hi = 0x0f; - } - eg_shift = rate_hi + slot->chip->eg_add; - shift = 0; - if (nonzero) - { - if (rate_hi < 12) - { - if (slot->chip->eg_state) - { - switch (eg_shift) - { - case 12: - shift = 1; - break; - case 13: - shift = (rate_lo >> 1) & 0x01; - break; - case 14: - shift = rate_lo & 0x01; - break; - default: - break; - } - } - } - else - { - shift = (rate_hi & 0x03) + eg_incstep[rate_lo][slot->chip->timer & 0x03]; - if (shift & 0x04) - { - shift = 0x03; - } - if (!shift) - { - shift = slot->chip->eg_state; - } - } - } - eg_rout = slot->eg_rout; - eg_inc = 0; - eg_off = 0; - // Instant attack - if (reset && rate_hi == 0x0f) - { - eg_rout = 0x00; - } - // Envelope off - if ((slot->eg_rout & 0x1f8) == 0x1f8) - { - eg_off = 1; - } - if (slot->eg_gen != envelope_gen_num_attack && !reset && eg_off) - { - eg_rout = 0x1ff; - } - switch (slot->eg_gen) - { - case envelope_gen_num_attack: - if (!slot->eg_rout) - { - slot->eg_gen = envelope_gen_num_decay; - } - else if (slot->key && shift > 0 && rate_hi != 0x0f) - { - eg_inc = ((~slot->eg_rout) << shift) >> 4; - } - break; - case envelope_gen_num_decay: - if ((slot->eg_rout >> 4) == slot->reg_sl) - { - slot->eg_gen = envelope_gen_num_sustain; - } - else if (!eg_off && !reset && shift > 0) - { - eg_inc = 1 << (shift - 1); - } - break; - case envelope_gen_num_sustain: - case envelope_gen_num_release: - if (!eg_off && !reset && shift > 0) - { - eg_inc = 1 << (shift - 1); - } - break; - } - slot->eg_rout = (eg_rout + eg_inc) & 0x1ff; - // Key off - if (reset) - { - slot->eg_gen = envelope_gen_num_attack; - } - if (!slot->key) - { - slot->eg_gen = envelope_gen_num_release; - } -} - -static void OPL3_EnvelopeKeyOn(opl3_slot *slot, Bit8u type) -{ - slot->key |= type; -} - -static void OPL3_EnvelopeKeyOff(opl3_slot *slot, Bit8u type) -{ - slot->key &= ~type; -} - -// -// Phase Generator -// - -static void OPL3_PhaseGenerate(opl3_slot *slot) -{ - opl3_chip *chip; - Bit16u f_num; - Bit32u basefreq; - Bit8u rm_xor, n_bit; - Bit32u noise; - Bit16u phase; - - chip = slot->chip; - f_num = slot->channel->f_num; - if (slot->reg_vib) - { - Bit8s range; - Bit8u vibpos; - - range = (f_num >> 7) & 7; - vibpos = slot->chip->vibpos; - - if (!(vibpos & 3)) - { - range = 0; - } - else if (vibpos & 1) - { - range >>= 1; - } - range >>= slot->chip->vibshift; - - if (vibpos & 4) - { - range = -range; - } - f_num += range; - } - basefreq = (f_num << slot->channel->block) >> 1; - phase = (Bit16u)(slot->pg_phase >> 9); - if (slot->pg_reset) - { - slot->pg_phase = 0; - } - slot->pg_phase += (basefreq * mt[slot->reg_mult]) >> 1; - // Rhythm mode - noise = chip->noise; - slot->pg_phase_out = phase; - if (slot->slot_num == 13) // hh - { - chip->rm_hh_bit2 = (phase >> 2) & 1; - chip->rm_hh_bit3 = (phase >> 3) & 1; - chip->rm_hh_bit7 = (phase >> 7) & 1; - chip->rm_hh_bit8 = (phase >> 8) & 1; - } - if (slot->slot_num == 17 && (chip->rhy & 0x20)) // tc - { - chip->rm_tc_bit3 = (phase >> 3) & 1; - chip->rm_tc_bit5 = (phase >> 5) & 1; - } - if (chip->rhy & 0x20) - { - rm_xor = (chip->rm_hh_bit2 ^ chip->rm_hh_bit7) - | (chip->rm_hh_bit3 ^ chip->rm_tc_bit5) - | (chip->rm_tc_bit3 ^ chip->rm_tc_bit5); - switch (slot->slot_num) - { - case 13: // hh - slot->pg_phase_out = rm_xor << 9; - if (rm_xor ^ (noise & 1)) - { - slot->pg_phase_out |= 0xd0; - } - else - { - slot->pg_phase_out |= 0x34; - } - break; - case 16: // sd - slot->pg_phase_out = (chip->rm_hh_bit8 << 9) - | ((chip->rm_hh_bit8 ^ (noise & 1)) << 8); - break; - case 17: // tc - slot->pg_phase_out = (rm_xor << 9) | 0x80; - break; - default: - break; - } - } - n_bit = ((noise >> 14) ^ noise) & 0x01; - chip->noise = (noise >> 1) | (n_bit << 22); -} - -// -// Slot -// - -static void OPL3_SlotWrite20(opl3_slot *slot, Bit8u data) -{ - if ((data >> 7) & 0x01) - { - slot->trem = &slot->chip->tremolo; - } - else - { - slot->trem = (Bit8u*)&slot->chip->zeromod; - } - slot->reg_vib = (data >> 6) & 0x01; - slot->reg_type = (data >> 5) & 0x01; - slot->reg_ksr = (data >> 4) & 0x01; - slot->reg_mult = data & 0x0f; -} - -static void OPL3_SlotWrite40(opl3_slot *slot, Bit8u data) -{ - slot->reg_ksl = (data >> 6) & 0x03; - slot->reg_tl = data & 0x3f; - OPL3_EnvelopeUpdateKSL(slot); -} - -static void OPL3_SlotWrite60(opl3_slot *slot, Bit8u data) -{ - slot->reg_ar = (data >> 4) & 0x0f; - slot->reg_dr = data & 0x0f; -} - -static void OPL3_SlotWrite80(opl3_slot *slot, Bit8u data) -{ - slot->reg_sl = (data >> 4) & 0x0f; - if (slot->reg_sl == 0x0f) - { - slot->reg_sl = 0x1f; - } - slot->reg_rr = data & 0x0f; -} - -static void OPL3_SlotWriteE0(opl3_slot *slot, Bit8u data) -{ - slot->reg_wf = data & 0x07; - if (slot->chip->newm == 0x00) - { - slot->reg_wf &= 0x03; - } -} - -static void OPL3_SlotGenerate(opl3_slot *slot) -{ - slot->out = envelope_sin[slot->reg_wf](slot->pg_phase_out + *slot->mod, slot->eg_out); -} - -static void OPL3_SlotCalcFB(opl3_slot *slot) -{ - if (slot->channel->fb != 0x00) - { - slot->fbmod = (slot->prout + slot->out) >> (0x09 - slot->channel->fb); - } - else - { - slot->fbmod = 0; - } - slot->prout = slot->out; -} - -// -// Channel -// - -static void OPL3_ChannelSetupAlg(opl3_channel *channel); - -static void OPL3_ChannelUpdateRhythm(opl3_chip *chip, Bit8u data) -{ - opl3_channel *channel6; - opl3_channel *channel7; - opl3_channel *channel8; - Bit8u chnum; - - chip->rhy = data & 0x3f; - if (chip->rhy & 0x20) - { - channel6 = &chip->channel[6]; - channel7 = &chip->channel[7]; - channel8 = &chip->channel[8]; - channel6->out[0] = &channel6->slots[1]->out; - channel6->out[1] = &channel6->slots[1]->out; - channel6->out[2] = &chip->zeromod; - channel6->out[3] = &chip->zeromod; - channel7->out[0] = &channel7->slots[0]->out; - channel7->out[1] = &channel7->slots[0]->out; - channel7->out[2] = &channel7->slots[1]->out; - channel7->out[3] = &channel7->slots[1]->out; - channel8->out[0] = &channel8->slots[0]->out; - channel8->out[1] = &channel8->slots[0]->out; - channel8->out[2] = &channel8->slots[1]->out; - channel8->out[3] = &channel8->slots[1]->out; - for (chnum = 6; chnum < 9; chnum++) - { - chip->channel[chnum].chtype = ch_drum; - } - OPL3_ChannelSetupAlg(channel6); - OPL3_ChannelSetupAlg(channel7); - OPL3_ChannelSetupAlg(channel8); - //hh - if (chip->rhy & 0x01) - { - OPL3_EnvelopeKeyOn(channel7->slots[0], egk_drum); - } - else - { - OPL3_EnvelopeKeyOff(channel7->slots[0], egk_drum); - } - //tc - if (chip->rhy & 0x02) - { - OPL3_EnvelopeKeyOn(channel8->slots[1], egk_drum); - } - else - { - OPL3_EnvelopeKeyOff(channel8->slots[1], egk_drum); - } - //tom - if (chip->rhy & 0x04) - { - OPL3_EnvelopeKeyOn(channel8->slots[0], egk_drum); - } - else - { - OPL3_EnvelopeKeyOff(channel8->slots[0], egk_drum); - } - //sd - if (chip->rhy & 0x08) - { - OPL3_EnvelopeKeyOn(channel7->slots[1], egk_drum); - } - else - { - OPL3_EnvelopeKeyOff(channel7->slots[1], egk_drum); - } - //bd - if (chip->rhy & 0x10) - { - OPL3_EnvelopeKeyOn(channel6->slots[0], egk_drum); - OPL3_EnvelopeKeyOn(channel6->slots[1], egk_drum); - } - else - { - OPL3_EnvelopeKeyOff(channel6->slots[0], egk_drum); - OPL3_EnvelopeKeyOff(channel6->slots[1], egk_drum); - } - } - else - { - for (chnum = 6; chnum < 9; chnum++) - { - chip->channel[chnum].chtype = ch_2op; - OPL3_ChannelSetupAlg(&chip->channel[chnum]); - OPL3_EnvelopeKeyOff(chip->channel[chnum].slots[0], egk_drum); - OPL3_EnvelopeKeyOff(chip->channel[chnum].slots[1], egk_drum); - } - } -} - -static void OPL3_ChannelWriteA0(opl3_channel *channel, Bit8u data) -{ - if (channel->chip->newm && channel->chtype == ch_4op2) - { - return; - } - channel->f_num = (channel->f_num & 0x300) | data; - channel->ksv = (channel->block << 1) - | ((channel->f_num >> (0x09 - channel->chip->nts)) & 0x01); - OPL3_EnvelopeUpdateKSL(channel->slots[0]); - OPL3_EnvelopeUpdateKSL(channel->slots[1]); - if (channel->chip->newm && channel->chtype == ch_4op) - { - channel->pair->f_num = channel->f_num; - channel->pair->ksv = channel->ksv; - OPL3_EnvelopeUpdateKSL(channel->pair->slots[0]); - OPL3_EnvelopeUpdateKSL(channel->pair->slots[1]); - } -} - -static void OPL3_ChannelWriteB0(opl3_channel *channel, Bit8u data) -{ - if (channel->chip->newm && channel->chtype == ch_4op2) - { - return; - } - channel->f_num = (channel->f_num & 0xff) | ((data & 0x03) << 8); - channel->block = (data >> 2) & 0x07; - channel->ksv = (channel->block << 1) - | ((channel->f_num >> (0x09 - channel->chip->nts)) & 0x01); - OPL3_EnvelopeUpdateKSL(channel->slots[0]); - OPL3_EnvelopeUpdateKSL(channel->slots[1]); - if (channel->chip->newm && channel->chtype == ch_4op) - { - channel->pair->f_num = channel->f_num; - channel->pair->block = channel->block; - channel->pair->ksv = channel->ksv; - OPL3_EnvelopeUpdateKSL(channel->pair->slots[0]); - OPL3_EnvelopeUpdateKSL(channel->pair->slots[1]); - } -} - -static void OPL3_ChannelSetupAlg(opl3_channel *channel) -{ - if (channel->chtype == ch_drum) - { - if (channel->ch_num == 7 || channel->ch_num == 8) - { - channel->slots[0]->mod = &channel->chip->zeromod; - channel->slots[1]->mod = &channel->chip->zeromod; - return; - } - switch (channel->alg & 0x01) - { - case 0x00: - channel->slots[0]->mod = &channel->slots[0]->fbmod; - channel->slots[1]->mod = &channel->slots[0]->out; - break; - case 0x01: - channel->slots[0]->mod = &channel->slots[0]->fbmod; - channel->slots[1]->mod = &channel->chip->zeromod; - break; - } - return; - } - if (channel->alg & 0x08) - { - return; - } - if (channel->alg & 0x04) - { - channel->pair->out[0] = &channel->chip->zeromod; - channel->pair->out[1] = &channel->chip->zeromod; - channel->pair->out[2] = &channel->chip->zeromod; - channel->pair->out[3] = &channel->chip->zeromod; - switch (channel->alg & 0x03) - { - case 0x00: - channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; - channel->pair->slots[1]->mod = &channel->pair->slots[0]->out; - channel->slots[0]->mod = &channel->pair->slots[1]->out; - channel->slots[1]->mod = &channel->slots[0]->out; - channel->out[0] = &channel->slots[1]->out; - channel->out[1] = &channel->chip->zeromod; - channel->out[2] = &channel->chip->zeromod; - channel->out[3] = &channel->chip->zeromod; - break; - case 0x01: - channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; - channel->pair->slots[1]->mod = &channel->pair->slots[0]->out; - channel->slots[0]->mod = &channel->chip->zeromod; - channel->slots[1]->mod = &channel->slots[0]->out; - channel->out[0] = &channel->pair->slots[1]->out; - channel->out[1] = &channel->slots[1]->out; - channel->out[2] = &channel->chip->zeromod; - channel->out[3] = &channel->chip->zeromod; - break; - case 0x02: - channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; - channel->pair->slots[1]->mod = &channel->chip->zeromod; - channel->slots[0]->mod = &channel->pair->slots[1]->out; - channel->slots[1]->mod = &channel->slots[0]->out; - channel->out[0] = &channel->pair->slots[0]->out; - channel->out[1] = &channel->slots[1]->out; - channel->out[2] = &channel->chip->zeromod; - channel->out[3] = &channel->chip->zeromod; - break; - case 0x03: - channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; - channel->pair->slots[1]->mod = &channel->chip->zeromod; - channel->slots[0]->mod = &channel->pair->slots[1]->out; - channel->slots[1]->mod = &channel->chip->zeromod; - channel->out[0] = &channel->pair->slots[0]->out; - channel->out[1] = &channel->slots[0]->out; - channel->out[2] = &channel->slots[1]->out; - channel->out[3] = &channel->chip->zeromod; - break; - } - } - else - { - switch (channel->alg & 0x01) - { - case 0x00: - channel->slots[0]->mod = &channel->slots[0]->fbmod; - channel->slots[1]->mod = &channel->slots[0]->out; - channel->out[0] = &channel->slots[1]->out; - channel->out[1] = &channel->chip->zeromod; - channel->out[2] = &channel->chip->zeromod; - channel->out[3] = &channel->chip->zeromod; - break; - case 0x01: - channel->slots[0]->mod = &channel->slots[0]->fbmod; - channel->slots[1]->mod = &channel->chip->zeromod; - channel->out[0] = &channel->slots[0]->out; - channel->out[1] = &channel->slots[1]->out; - channel->out[2] = &channel->chip->zeromod; - channel->out[3] = &channel->chip->zeromod; - break; - } - } -} - -static void OPL3_ChannelWriteC0(opl3_channel *channel, Bit8u data) -{ - channel->fb = (data & 0x0e) >> 1; - channel->con = data & 0x01; - channel->alg = channel->con; - if (channel->chip->newm) - { - if (channel->chtype == ch_4op) - { - channel->pair->alg = 0x04 | (channel->con << 1) | (channel->pair->con); - channel->alg = 0x08; - OPL3_ChannelSetupAlg(channel->pair); - } - else if (channel->chtype == ch_4op2) - { - channel->alg = 0x04 | (channel->pair->con << 1) | (channel->con); - channel->pair->alg = 0x08; - OPL3_ChannelSetupAlg(channel); - } - else - { - OPL3_ChannelSetupAlg(channel); - } - } - else - { - OPL3_ChannelSetupAlg(channel); - } - if (channel->chip->newm) - { - channel->cha = ((data >> 4) & 0x01) ? ~0 : 0; - channel->chb = ((data >> 5) & 0x01) ? ~0 : 0; - } - else - { - channel->cha = channel->chb = (Bit16u)~0; - } -} - -static void OPL3_ChannelKeyOn(opl3_channel *channel) -{ - if (channel->chip->newm) - { - if (channel->chtype == ch_4op) - { - OPL3_EnvelopeKeyOn(channel->slots[0], egk_norm); - OPL3_EnvelopeKeyOn(channel->slots[1], egk_norm); - OPL3_EnvelopeKeyOn(channel->pair->slots[0], egk_norm); - OPL3_EnvelopeKeyOn(channel->pair->slots[1], egk_norm); - } - else if (channel->chtype == ch_2op || channel->chtype == ch_drum) - { - OPL3_EnvelopeKeyOn(channel->slots[0], egk_norm); - OPL3_EnvelopeKeyOn(channel->slots[1], egk_norm); - } - } - else - { - OPL3_EnvelopeKeyOn(channel->slots[0], egk_norm); - OPL3_EnvelopeKeyOn(channel->slots[1], egk_norm); - } -} - -static void OPL3_ChannelKeyOff(opl3_channel *channel) -{ - if (channel->chip->newm) - { - if (channel->chtype == ch_4op) - { - OPL3_EnvelopeKeyOff(channel->slots[0], egk_norm); - OPL3_EnvelopeKeyOff(channel->slots[1], egk_norm); - OPL3_EnvelopeKeyOff(channel->pair->slots[0], egk_norm); - OPL3_EnvelopeKeyOff(channel->pair->slots[1], egk_norm); - } - else if (channel->chtype == ch_2op || channel->chtype == ch_drum) - { - OPL3_EnvelopeKeyOff(channel->slots[0], egk_norm); - OPL3_EnvelopeKeyOff(channel->slots[1], egk_norm); - } - } - else - { - OPL3_EnvelopeKeyOff(channel->slots[0], egk_norm); - OPL3_EnvelopeKeyOff(channel->slots[1], egk_norm); - } -} - -static void OPL3_ChannelSet4Op(opl3_chip *chip, Bit8u data) -{ - Bit8u bit; - Bit8u chnum; - for (bit = 0; bit < 6; bit++) - { - chnum = bit; - if (bit >= 3) - { - chnum += 9 - 3; - } - if ((data >> bit) & 0x01) - { - chip->channel[chnum].chtype = ch_4op; - chip->channel[chnum + 3].chtype = ch_4op2; - } - else - { - chip->channel[chnum].chtype = ch_2op; - chip->channel[chnum + 3].chtype = ch_2op; - } - } -} - -static Bit16s OPL3_ClipSample(Bit32s sample) -{ - if (sample > 32767) - { - sample = 32767; - } - else if (sample < -32768) - { - sample = -32768; - } - return (Bit16s)sample; -} - -void OPL3_Generate(opl3_chip *chip, Bit16s *buf) -{ - Bit8u ii; - Bit8u jj; - Bit16s accm; - Bit8u shift = 0; - - buf[1] = OPL3_ClipSample(chip->mixbuff[1]); - - for (ii = 0; ii < 15; ii++) - { - OPL3_SlotCalcFB(&chip->slot[ii]); - OPL3_EnvelopeCalc(&chip->slot[ii]); - OPL3_PhaseGenerate(&chip->slot[ii]); - OPL3_SlotGenerate(&chip->slot[ii]); - } - - chip->mixbuff[0] = 0; - for (ii = 0; ii < 18; ii++) - { - accm = 0; - for (jj = 0; jj < 4; jj++) - { - accm += *chip->channel[ii].out[jj]; - } - chip->mixbuff[0] += (Bit16s)(accm & chip->channel[ii].cha); - } - - for (ii = 15; ii < 18; ii++) - { - OPL3_SlotCalcFB(&chip->slot[ii]); - OPL3_EnvelopeCalc(&chip->slot[ii]); - OPL3_PhaseGenerate(&chip->slot[ii]); - OPL3_SlotGenerate(&chip->slot[ii]); - } - - buf[0] = OPL3_ClipSample(chip->mixbuff[0]); - - for (ii = 18; ii < 33; ii++) - { - OPL3_SlotCalcFB(&chip->slot[ii]); - OPL3_EnvelopeCalc(&chip->slot[ii]); - OPL3_PhaseGenerate(&chip->slot[ii]); - OPL3_SlotGenerate(&chip->slot[ii]); - } - - chip->mixbuff[1] = 0; - for (ii = 0; ii < 18; ii++) - { - accm = 0; - for (jj = 0; jj < 4; jj++) - { - accm += *chip->channel[ii].out[jj]; - } - chip->mixbuff[1] += (Bit16s)(accm & chip->channel[ii].chb); - } - - for (ii = 33; ii < 36; ii++) - { - OPL3_SlotCalcFB(&chip->slot[ii]); - OPL3_EnvelopeCalc(&chip->slot[ii]); - OPL3_PhaseGenerate(&chip->slot[ii]); - OPL3_SlotGenerate(&chip->slot[ii]); - } - - if ((chip->timer & 0x3f) == 0x3f) - { - chip->tremolopos = (chip->tremolopos + 1) % 210; - } - if (chip->tremolopos < 105) - { - chip->tremolo = chip->tremolopos >> chip->tremoloshift; - } - else - { - chip->tremolo = (210 - chip->tremolopos) >> chip->tremoloshift; - } - - if ((chip->timer & 0x3ff) == 0x3ff) - { - chip->vibpos = (chip->vibpos + 1) & 7; - } - - chip->timer++; - - chip->eg_add = 0; - if (chip->eg_timer) - { - while (shift < 36 && ((chip->eg_timer >> shift) & 1) == 0) - { - shift++; - } - if (shift > 12) - { - chip->eg_add = 0; - } - else - { - chip->eg_add = shift + 1; - } - } - - if (chip->eg_timerrem || chip->eg_state) - { - if (chip->eg_timer == 0xfffffffff) - { - chip->eg_timer = 0; - chip->eg_timerrem = 1; - } - else - { - chip->eg_timer++; - chip->eg_timerrem = 0; - } - } - - chip->eg_state ^= 1; - - while (chip->writebuf[chip->writebuf_cur].time <= chip->writebuf_samplecnt) - { - if (!(chip->writebuf[chip->writebuf_cur].reg & 0x200)) - { - break; - } - chip->writebuf[chip->writebuf_cur].reg &= 0x1ff; - OPL3_WriteReg(chip, chip->writebuf[chip->writebuf_cur].reg, - chip->writebuf[chip->writebuf_cur].data); - chip->writebuf_cur = (chip->writebuf_cur + 1) % OPL_WRITEBUF_SIZE; - } - chip->writebuf_samplecnt++; -} - -void OPL3_GenerateResampled(opl3_chip *chip, Bit16s *buf) -{ - while (chip->samplecnt >= chip->rateratio) - { - chip->oldsamples[0] = chip->samples[0]; - chip->oldsamples[1] = chip->samples[1]; - OPL3_Generate(chip, chip->samples); - chip->samplecnt -= chip->rateratio; - } - buf[0] = (Bit16s)((chip->oldsamples[0] * (chip->rateratio - chip->samplecnt) - + chip->samples[0] * chip->samplecnt) / chip->rateratio); - buf[1] = (Bit16s)((chip->oldsamples[1] * (chip->rateratio - chip->samplecnt) - + chip->samples[1] * chip->samplecnt) / chip->rateratio); - chip->samplecnt += 1 << RSM_FRAC; -} - -void OPL3_Reset(opl3_chip *chip, Bit32u samplerate) -{ - Bit8u slotnum; - Bit8u channum; - - memset(chip, 0, sizeof(opl3_chip)); - for (slotnum = 0; slotnum < 36; slotnum++) - { - chip->slot[slotnum].chip = chip; - chip->slot[slotnum].mod = &chip->zeromod; - chip->slot[slotnum].eg_rout = 0x1ff; - chip->slot[slotnum].eg_out = 0x1ff; - chip->slot[slotnum].eg_gen = envelope_gen_num_release; - chip->slot[slotnum].trem = (Bit8u*)&chip->zeromod; - chip->slot[slotnum].slot_num = slotnum; - } - for (channum = 0; channum < 18; channum++) - { - chip->channel[channum].slots[0] = &chip->slot[ch_slot[channum]]; - chip->channel[channum].slots[1] = &chip->slot[ch_slot[channum] + 3]; - chip->slot[ch_slot[channum]].channel = &chip->channel[channum]; - chip->slot[ch_slot[channum] + 3].channel = &chip->channel[channum]; - if ((channum % 9) < 3) - { - chip->channel[channum].pair = &chip->channel[channum + 3]; - } - else if ((channum % 9) < 6) - { - chip->channel[channum].pair = &chip->channel[channum - 3]; - } - chip->channel[channum].chip = chip; - chip->channel[channum].out[0] = &chip->zeromod; - chip->channel[channum].out[1] = &chip->zeromod; - chip->channel[channum].out[2] = &chip->zeromod; - chip->channel[channum].out[3] = &chip->zeromod; - chip->channel[channum].chtype = ch_2op; - chip->channel[channum].cha = 0xffff; - chip->channel[channum].chb = 0xffff; - chip->channel[channum].ch_num = channum; - OPL3_ChannelSetupAlg(&chip->channel[channum]); - } - chip->noise = 1; - chip->rateratio = (samplerate << RSM_FRAC) / 49716; - chip->tremoloshift = 4; - chip->vibshift = 1; -} - -void OPL3_WriteReg(opl3_chip *chip, Bit16u reg, Bit8u v) -{ - Bit8u high = (reg >> 8) & 0x01; - Bit8u regm = reg & 0xff; - switch (regm & 0xf0) - { - case 0x00: - if (high) - { - switch (regm & 0x0f) - { - case 0x04: - OPL3_ChannelSet4Op(chip, v); - break; - case 0x05: - chip->newm = v & 0x01; - break; - } - } - else - { - switch (regm & 0x0f) - { - case 0x08: - chip->nts = (v >> 6) & 0x01; - break; - } - } - break; - case 0x20: - case 0x30: - if (ad_slot[regm & 0x1f] >= 0) - { - OPL3_SlotWrite20(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); - } - break; - case 0x40: - case 0x50: - if (ad_slot[regm & 0x1f] >= 0) - { - OPL3_SlotWrite40(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); - } - break; - case 0x60: - case 0x70: - if (ad_slot[regm & 0x1f] >= 0) - { - OPL3_SlotWrite60(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); - } - break; - case 0x80: - case 0x90: - if (ad_slot[regm & 0x1f] >= 0) - { - OPL3_SlotWrite80(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); - } - break; - case 0xe0: - case 0xf0: - if (ad_slot[regm & 0x1f] >= 0) - { - OPL3_SlotWriteE0(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); - } - break; - case 0xa0: - if ((regm & 0x0f) < 9) - { - OPL3_ChannelWriteA0(&chip->channel[9 * high + (regm & 0x0f)], v); - } - break; - case 0xb0: - if (regm == 0xbd && !high) - { - chip->tremoloshift = (((v >> 7) ^ 1) << 1) + 2; - chip->vibshift = ((v >> 6) & 0x01) ^ 1; - OPL3_ChannelUpdateRhythm(chip, v); - } - else if ((regm & 0x0f) < 9) - { - OPL3_ChannelWriteB0(&chip->channel[9 * high + (regm & 0x0f)], v); - if (v & 0x20) - { - OPL3_ChannelKeyOn(&chip->channel[9 * high + (regm & 0x0f)]); - } - else - { - OPL3_ChannelKeyOff(&chip->channel[9 * high + (regm & 0x0f)]); - } - } - break; - case 0xc0: - if ((regm & 0x0f) < 9) - { - OPL3_ChannelWriteC0(&chip->channel[9 * high + (regm & 0x0f)], v); - } - break; - } -} - -void OPL3_WriteRegBuffered(opl3_chip *chip, Bit16u reg, Bit8u v) -{ - Bit64u time1, time2; - - if (chip->writebuf[chip->writebuf_last].reg & 0x200) - { - OPL3_WriteReg(chip, chip->writebuf[chip->writebuf_last].reg & 0x1ff, - chip->writebuf[chip->writebuf_last].data); - - chip->writebuf_cur = (chip->writebuf_last + 1) % OPL_WRITEBUF_SIZE; - chip->writebuf_samplecnt = chip->writebuf[chip->writebuf_last].time; - } - - chip->writebuf[chip->writebuf_last].reg = reg | 0x200; - chip->writebuf[chip->writebuf_last].data = v; - time1 = chip->writebuf_lasttime + OPL_WRITEBUF_DELAY; - time2 = chip->writebuf_samplecnt; - - if (time1 < time2) - { - time1 = time2; - } - - chip->writebuf[chip->writebuf_last].time = time1; - chip->writebuf_lasttime = time1; - chip->writebuf_last = (chip->writebuf_last + 1) % OPL_WRITEBUF_SIZE; -} - -void OPL3_GenerateStream(opl3_chip *chip, Bit16s *sndptr, Bit32u numsamples) -{ - Bit32u i; - - for(i = 0; i < numsamples; i++) - { - OPL3_GenerateResampled(chip, sndptr); - sndptr += 2; - } -} diff -Nru dosbox-staging-0.76.0/src/libs/nuked/nukedopl.h dosbox-staging-0.77.0/src/libs/nuked/nukedopl.h --- dosbox-staging-0.76.0/src/libs/nuked/nukedopl.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/nuked/nukedopl.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ -// -// Copyright (C) 2013-2020 Alexey Khokholov (Nuke.YKT) -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// -// Nuked OPL3 emulator. -// Thanks: -// MAME Development Team(Jarek Burczynski, Tatsuyuki Satoh): -// Feedback and Rhythm part calculation information. -// forums.submarine.org.uk(carbon14, opl3): -// Tremolo and phase generator calculation information. -// OPLx decapsulated(Matthew Gambrell, Olli Niemitalo): -// OPL2 ROMs. -// siliconpr0n.org(John McMaster, digshadow): -// YMF262 and VRC VII decaps and die shots. -// -// version: 1.8 -// - -#ifndef OPL_OPL3_H -#define OPL_OPL3_H -#define OPL_WRITEBUF_SIZE 1024 -#define OPL_WRITEBUF_DELAY 1 - -#include "types.h" - -typedef struct _opl3_slot opl3_slot; -typedef struct _opl3_channel opl3_channel; -typedef struct _opl3_chip opl3_chip; - -struct _opl3_slot { - opl3_channel *channel; - opl3_chip *chip; - Bit16s out; - Bit16s fbmod; - Bit16s *mod; - Bit16s prout; - Bit16s eg_rout; - Bit16s eg_out; - Bit8u eg_inc; - Bit8u eg_gen; - Bit8u eg_rate; - Bit8u eg_ksl; - Bit8u *trem; - Bit8u reg_vib; - Bit8u reg_type; - Bit8u reg_ksr; - Bit8u reg_mult; - Bit8u reg_ksl; - Bit8u reg_tl; - Bit8u reg_ar; - Bit8u reg_dr; - Bit8u reg_sl; - Bit8u reg_rr; - Bit8u reg_wf; - Bit8u key; - Bit32u pg_reset; - Bit32u pg_phase; - Bit16u pg_phase_out; - Bit8u slot_num; -}; - -struct _opl3_channel { - opl3_slot *slots[2]; - opl3_channel *pair; - opl3_chip *chip; - Bit16s *out[4]; - Bit8u chtype; - Bit16u f_num; - Bit8u block; - Bit8u fb; - Bit8u con; - Bit8u alg; - Bit8u ksv; - Bit16u cha, chb; - Bit8u ch_num; -}; - -typedef struct _opl3_writebuf { - Bit64u time; - Bit16u reg; - Bit8u data; -} opl3_writebuf; - -struct _opl3_chip { - opl3_channel channel[18]; - opl3_slot slot[36]; - Bit16u timer; - Bit64u eg_timer; - Bit8u eg_timerrem; - Bit8u eg_state; - Bit8u eg_add; - Bit8u newm; - Bit8u nts; - Bit8u rhy; - Bit8u vibpos; - Bit8u vibshift; - Bit8u tremolo; - Bit8u tremolopos; - Bit8u tremoloshift; - Bit32u noise; - Bit16s zeromod; - Bit32s mixbuff[2]; - Bit8u rm_hh_bit2; - Bit8u rm_hh_bit3; - Bit8u rm_hh_bit7; - Bit8u rm_hh_bit8; - Bit8u rm_tc_bit3; - Bit8u rm_tc_bit5; - //OPL3L - Bit32s rateratio; - Bit32s samplecnt; - Bit16s oldsamples[2]; - Bit16s samples[2]; - - Bit64u writebuf_samplecnt; - Bit32u writebuf_cur; - Bit32u writebuf_last; - Bit64u writebuf_lasttime; - opl3_writebuf writebuf[OPL_WRITEBUF_SIZE]; -}; - -void OPL3_Generate(opl3_chip *chip, Bit16s *buf); -void OPL3_GenerateResampled(opl3_chip *chip, Bit16s *buf); -void OPL3_Reset(opl3_chip *chip, Bit32u samplerate); -void OPL3_WriteReg(opl3_chip *chip, Bit16u reg, Bit8u v); -void OPL3_WriteRegBuffered(opl3_chip *chip, Bit16u reg, Bit8u v); -void OPL3_GenerateStream(opl3_chip *chip, Bit16s *sndptr, Bit32u numsamples); - -#endif diff -Nru dosbox-staging-0.76.0/src/libs/nuked/opl3.c dosbox-staging-0.77.0/src/libs/nuked/opl3.c --- dosbox-staging-0.76.0/src/libs/nuked/opl3.c 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/nuked/opl3.c 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,1381 @@ +/* Nuked OPL3 + * Copyright (C) 2013-2020 Nuke.YKT + * + * This file is part of Nuked OPL3. + * + * Nuked OPL3 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 2.1 + * of the License, or (at your option) any later version. + * + * Nuked OPL3 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Nuked OPL3. If not, see . + + * Nuked OPL3 emulator. + * Thanks: + * MAME Development Team(Jarek Burczynski, Tatsuyuki Satoh): + * Feedback and Rhythm part calculation information. + * forums.submarine.org.uk(carbon14, opl3): + * Tremolo and phase generator calculation information. + * OPLx decapsulated(Matthew Gambrell, Olli Niemitalo): + * OPL2 ROMs. + * siliconpr0n.org(John McMaster, digshadow): + * YMF262 and VRC VII decaps and die shots. + * + * version: 1.8 + */ + +#include +#include +#include +#include "opl3.h" + +#define RSM_FRAC 10 + +// Channel types + +enum { + ch_2op = 0, + ch_4op = 1, + ch_4op2 = 2, + ch_drum = 3 +}; + +// Envelope key types + +enum { + egk_norm = 0x01, + egk_drum = 0x02 +}; + + +// +// logsin table +// + +static const uint16_t logsinrom[256] = { + 0x859, 0x6c3, 0x607, 0x58b, 0x52e, 0x4e4, 0x4a6, 0x471, + 0x443, 0x41a, 0x3f5, 0x3d3, 0x3b5, 0x398, 0x37e, 0x365, + 0x34e, 0x339, 0x324, 0x311, 0x2ff, 0x2ed, 0x2dc, 0x2cd, + 0x2bd, 0x2af, 0x2a0, 0x293, 0x286, 0x279, 0x26d, 0x261, + 0x256, 0x24b, 0x240, 0x236, 0x22c, 0x222, 0x218, 0x20f, + 0x206, 0x1fd, 0x1f5, 0x1ec, 0x1e4, 0x1dc, 0x1d4, 0x1cd, + 0x1c5, 0x1be, 0x1b7, 0x1b0, 0x1a9, 0x1a2, 0x19b, 0x195, + 0x18f, 0x188, 0x182, 0x17c, 0x177, 0x171, 0x16b, 0x166, + 0x160, 0x15b, 0x155, 0x150, 0x14b, 0x146, 0x141, 0x13c, + 0x137, 0x133, 0x12e, 0x129, 0x125, 0x121, 0x11c, 0x118, + 0x114, 0x10f, 0x10b, 0x107, 0x103, 0x0ff, 0x0fb, 0x0f8, + 0x0f4, 0x0f0, 0x0ec, 0x0e9, 0x0e5, 0x0e2, 0x0de, 0x0db, + 0x0d7, 0x0d4, 0x0d1, 0x0cd, 0x0ca, 0x0c7, 0x0c4, 0x0c1, + 0x0be, 0x0bb, 0x0b8, 0x0b5, 0x0b2, 0x0af, 0x0ac, 0x0a9, + 0x0a7, 0x0a4, 0x0a1, 0x09f, 0x09c, 0x099, 0x097, 0x094, + 0x092, 0x08f, 0x08d, 0x08a, 0x088, 0x086, 0x083, 0x081, + 0x07f, 0x07d, 0x07a, 0x078, 0x076, 0x074, 0x072, 0x070, + 0x06e, 0x06c, 0x06a, 0x068, 0x066, 0x064, 0x062, 0x060, + 0x05e, 0x05c, 0x05b, 0x059, 0x057, 0x055, 0x053, 0x052, + 0x050, 0x04e, 0x04d, 0x04b, 0x04a, 0x048, 0x046, 0x045, + 0x043, 0x042, 0x040, 0x03f, 0x03e, 0x03c, 0x03b, 0x039, + 0x038, 0x037, 0x035, 0x034, 0x033, 0x031, 0x030, 0x02f, + 0x02e, 0x02d, 0x02b, 0x02a, 0x029, 0x028, 0x027, 0x026, + 0x025, 0x024, 0x023, 0x022, 0x021, 0x020, 0x01f, 0x01e, + 0x01d, 0x01c, 0x01b, 0x01a, 0x019, 0x018, 0x017, 0x017, + 0x016, 0x015, 0x014, 0x014, 0x013, 0x012, 0x011, 0x011, + 0x010, 0x00f, 0x00f, 0x00e, 0x00d, 0x00d, 0x00c, 0x00c, + 0x00b, 0x00a, 0x00a, 0x009, 0x009, 0x008, 0x008, 0x007, + 0x007, 0x007, 0x006, 0x006, 0x005, 0x005, 0x005, 0x004, + 0x004, 0x004, 0x003, 0x003, 0x003, 0x002, 0x002, 0x002, + 0x002, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000 +}; + +// +// exp table +// + +static const uint16_t exprom[256] = { + 0x7fa, 0x7f5, 0x7ef, 0x7ea, 0x7e4, 0x7df, 0x7da, 0x7d4, + 0x7cf, 0x7c9, 0x7c4, 0x7bf, 0x7b9, 0x7b4, 0x7ae, 0x7a9, + 0x7a4, 0x79f, 0x799, 0x794, 0x78f, 0x78a, 0x784, 0x77f, + 0x77a, 0x775, 0x770, 0x76a, 0x765, 0x760, 0x75b, 0x756, + 0x751, 0x74c, 0x747, 0x742, 0x73d, 0x738, 0x733, 0x72e, + 0x729, 0x724, 0x71f, 0x71a, 0x715, 0x710, 0x70b, 0x706, + 0x702, 0x6fd, 0x6f8, 0x6f3, 0x6ee, 0x6e9, 0x6e5, 0x6e0, + 0x6db, 0x6d6, 0x6d2, 0x6cd, 0x6c8, 0x6c4, 0x6bf, 0x6ba, + 0x6b5, 0x6b1, 0x6ac, 0x6a8, 0x6a3, 0x69e, 0x69a, 0x695, + 0x691, 0x68c, 0x688, 0x683, 0x67f, 0x67a, 0x676, 0x671, + 0x66d, 0x668, 0x664, 0x65f, 0x65b, 0x657, 0x652, 0x64e, + 0x649, 0x645, 0x641, 0x63c, 0x638, 0x634, 0x630, 0x62b, + 0x627, 0x623, 0x61e, 0x61a, 0x616, 0x612, 0x60e, 0x609, + 0x605, 0x601, 0x5fd, 0x5f9, 0x5f5, 0x5f0, 0x5ec, 0x5e8, + 0x5e4, 0x5e0, 0x5dc, 0x5d8, 0x5d4, 0x5d0, 0x5cc, 0x5c8, + 0x5c4, 0x5c0, 0x5bc, 0x5b8, 0x5b4, 0x5b0, 0x5ac, 0x5a8, + 0x5a4, 0x5a0, 0x59c, 0x599, 0x595, 0x591, 0x58d, 0x589, + 0x585, 0x581, 0x57e, 0x57a, 0x576, 0x572, 0x56f, 0x56b, + 0x567, 0x563, 0x560, 0x55c, 0x558, 0x554, 0x551, 0x54d, + 0x549, 0x546, 0x542, 0x53e, 0x53b, 0x537, 0x534, 0x530, + 0x52c, 0x529, 0x525, 0x522, 0x51e, 0x51b, 0x517, 0x514, + 0x510, 0x50c, 0x509, 0x506, 0x502, 0x4ff, 0x4fb, 0x4f8, + 0x4f4, 0x4f1, 0x4ed, 0x4ea, 0x4e7, 0x4e3, 0x4e0, 0x4dc, + 0x4d9, 0x4d6, 0x4d2, 0x4cf, 0x4cc, 0x4c8, 0x4c5, 0x4c2, + 0x4be, 0x4bb, 0x4b8, 0x4b5, 0x4b1, 0x4ae, 0x4ab, 0x4a8, + 0x4a4, 0x4a1, 0x49e, 0x49b, 0x498, 0x494, 0x491, 0x48e, + 0x48b, 0x488, 0x485, 0x482, 0x47e, 0x47b, 0x478, 0x475, + 0x472, 0x46f, 0x46c, 0x469, 0x466, 0x463, 0x460, 0x45d, + 0x45a, 0x457, 0x454, 0x451, 0x44e, 0x44b, 0x448, 0x445, + 0x442, 0x43f, 0x43c, 0x439, 0x436, 0x433, 0x430, 0x42d, + 0x42a, 0x428, 0x425, 0x422, 0x41f, 0x41c, 0x419, 0x416, + 0x414, 0x411, 0x40e, 0x40b, 0x408, 0x406, 0x403, 0x400 +}; + +// +// freq mult table multiplied by 2 +// +// 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 12, 12, 15, 15 +// + +static const uint8_t mt[16] = { + 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 20, 24, 24, 30, 30 +}; + +// +// ksl table +// + +static const uint8_t kslrom[16] = { + 0, 32, 40, 45, 48, 51, 53, 55, 56, 58, 59, 60, 61, 62, 63, 64 +}; + +static const uint8_t kslshift[4] = { + 8, 1, 2, 0 +}; + +// +// envelope generator constants +// + +static const uint8_t eg_incstep[4][4] = { + { 0, 0, 0, 0 }, + { 1, 0, 0, 0 }, + { 1, 0, 1, 0 }, + { 1, 1, 1, 0 } +}; + +// +// address decoding +// + +static const int8_t ad_slot[0x20] = { + 0, 1, 2, 3, 4, 5, -1, -1, 6, 7, 8, 9, 10, 11, -1, -1, + 12, 13, 14, 15, 16, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; + +static const uint8_t ch_slot[18] = { + 0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, 24, 25, 26, 30, 31, 32 +}; + +// +// Envelope generator +// + +typedef int16_t(*envelope_sinfunc)(uint16_t phase, uint16_t envelope); +typedef void(*envelope_genfunc)(opl3_slot *slott); + +static int16_t OPL3_EnvelopeCalcExp(uint32_t level) +{ + if (level > 0x1fff) + { + level = 0x1fff; + } + return (exprom[level & 0xff] << 1) >> (level >> 8); +} + +static int16_t OPL3_EnvelopeCalcSin0(uint16_t phase, uint16_t envelope) +{ + uint16_t out = 0; + uint16_t neg = 0; + phase &= 0x3ff; + if (phase & 0x200) + { + neg = 0xffff; + } + if (phase & 0x100) + { + out = logsinrom[(phase & 0xff) ^ 0xff]; + } + else + { + out = logsinrom[phase & 0xff]; + } + return OPL3_EnvelopeCalcExp(out + (envelope << 3)) ^ neg; +} + +static int16_t OPL3_EnvelopeCalcSin1(uint16_t phase, uint16_t envelope) +{ + uint16_t out = 0; + phase &= 0x3ff; + if (phase & 0x200) + { + out = 0x1000; + } + else if (phase & 0x100) + { + out = logsinrom[(phase & 0xff) ^ 0xff]; + } + else + { + out = logsinrom[phase & 0xff]; + } + return OPL3_EnvelopeCalcExp(out + (envelope << 3)); +} + +static int16_t OPL3_EnvelopeCalcSin2(uint16_t phase, uint16_t envelope) +{ + uint16_t out = 0; + phase &= 0x3ff; + if (phase & 0x100) + { + out = logsinrom[(phase & 0xff) ^ 0xff]; + } + else + { + out = logsinrom[phase & 0xff]; + } + return OPL3_EnvelopeCalcExp(out + (envelope << 3)); +} + +static int16_t OPL3_EnvelopeCalcSin3(uint16_t phase, uint16_t envelope) +{ + uint16_t out = 0; + phase &= 0x3ff; + if (phase & 0x100) + { + out = 0x1000; + } + else + { + out = logsinrom[phase & 0xff]; + } + return OPL3_EnvelopeCalcExp(out + (envelope << 3)); +} + +static int16_t OPL3_EnvelopeCalcSin4(uint16_t phase, uint16_t envelope) +{ + uint16_t out = 0; + uint16_t neg = 0; + phase &= 0x3ff; + if ((phase & 0x300) == 0x100) + { + neg = 0xffff; + } + if (phase & 0x200) + { + out = 0x1000; + } + else if (phase & 0x80) + { + out = logsinrom[((phase ^ 0xff) << 1) & 0xff]; + } + else + { + out = logsinrom[(phase << 1) & 0xff]; + } + return OPL3_EnvelopeCalcExp(out + (envelope << 3)) ^ neg; +} + +static int16_t OPL3_EnvelopeCalcSin5(uint16_t phase, uint16_t envelope) +{ + uint16_t out = 0; + phase &= 0x3ff; + if (phase & 0x200) + { + out = 0x1000; + } + else if (phase & 0x80) + { + out = logsinrom[((phase ^ 0xff) << 1) & 0xff]; + } + else + { + out = logsinrom[(phase << 1) & 0xff]; + } + return OPL3_EnvelopeCalcExp(out + (envelope << 3)); +} + +static int16_t OPL3_EnvelopeCalcSin6(uint16_t phase, uint16_t envelope) +{ + uint16_t neg = 0; + phase &= 0x3ff; + if (phase & 0x200) + { + neg = 0xffff; + } + return OPL3_EnvelopeCalcExp(envelope << 3) ^ neg; +} + +static int16_t OPL3_EnvelopeCalcSin7(uint16_t phase, uint16_t envelope) +{ + uint16_t out = 0; + uint16_t neg = 0; + phase &= 0x3ff; + if (phase & 0x200) + { + neg = 0xffff; + phase = (phase & 0x1ff) ^ 0x1ff; + } + out = phase << 3; + return OPL3_EnvelopeCalcExp(out + (envelope << 3)) ^ neg; +} + +static const envelope_sinfunc envelope_sin[8] = { + OPL3_EnvelopeCalcSin0, + OPL3_EnvelopeCalcSin1, + OPL3_EnvelopeCalcSin2, + OPL3_EnvelopeCalcSin3, + OPL3_EnvelopeCalcSin4, + OPL3_EnvelopeCalcSin5, + OPL3_EnvelopeCalcSin6, + OPL3_EnvelopeCalcSin7 +}; + +enum envelope_gen_num +{ + envelope_gen_num_attack = 0, + envelope_gen_num_decay = 1, + envelope_gen_num_sustain = 2, + envelope_gen_num_release = 3 +}; + +static void OPL3_EnvelopeUpdateKSL(opl3_slot *slot) +{ + int16_t ksl = (kslrom[slot->channel->f_num >> 6] << 2) + - ((0x08 - slot->channel->block) << 5); + if (ksl < 0) + { + ksl = 0; + } + slot->eg_ksl = (uint8_t)ksl; +} + +static void OPL3_EnvelopeCalc(opl3_slot *slot) +{ + uint8_t nonzero; + uint8_t rate; + uint8_t rate_hi; + uint8_t rate_lo; + uint8_t reg_rate = 0; + uint8_t ks; + uint8_t eg_shift, shift; + uint16_t eg_rout; + int16_t eg_inc; + uint8_t eg_off; + uint8_t reset = 0; + slot->eg_out = slot->eg_rout + (slot->reg_tl << 2) + + (slot->eg_ksl >> kslshift[slot->reg_ksl]) + *slot->trem; + if (slot->key && slot->eg_gen == envelope_gen_num_release) + { + reset = 1; + reg_rate = slot->reg_ar; + } + else + { + switch (slot->eg_gen) + { + case envelope_gen_num_attack: + reg_rate = slot->reg_ar; + break; + case envelope_gen_num_decay: + reg_rate = slot->reg_dr; + break; + case envelope_gen_num_sustain: + if (!slot->reg_type) + { + reg_rate = slot->reg_rr; + } + break; + case envelope_gen_num_release: + reg_rate = slot->reg_rr; + break; + } + } + slot->pg_reset = reset; + ks = slot->channel->ksv >> ((slot->reg_ksr ^ 1) << 1); + nonzero = (reg_rate != 0); + rate = ks + (reg_rate << 2); + rate_hi = rate >> 2; + rate_lo = rate & 0x03; + if (rate_hi & 0x10) + { + rate_hi = 0x0f; + } + eg_shift = rate_hi + slot->chip->eg_add; + shift = 0; + if (nonzero) + { + if (rate_hi < 12) + { + if (slot->chip->eg_state) + { + switch (eg_shift) + { + case 12: + shift = 1; + break; + case 13: + shift = (rate_lo >> 1) & 0x01; + break; + case 14: + shift = rate_lo & 0x01; + break; + default: + break; + } + } + } + else + { + shift = (rate_hi & 0x03) + eg_incstep[rate_lo][slot->chip->timer & 0x03]; + if (shift & 0x04) + { + shift = 0x03; + } + if (!shift) + { + shift = slot->chip->eg_state; + } + } + } + eg_rout = slot->eg_rout; + eg_inc = 0; + eg_off = 0; + // Instant attack + if (reset && rate_hi == 0x0f) + { + eg_rout = 0x00; + } + // Envelope off + if ((slot->eg_rout & 0x1f8) == 0x1f8) + { + eg_off = 1; + } + if (slot->eg_gen != envelope_gen_num_attack && !reset && eg_off) + { + eg_rout = 0x1ff; + } + switch (slot->eg_gen) + { + case envelope_gen_num_attack: + if (!slot->eg_rout) + { + slot->eg_gen = envelope_gen_num_decay; + } + else if (slot->key && shift > 0 && rate_hi != 0x0f) + { + eg_inc = ~slot->eg_rout >> (4 - shift); + } + break; + case envelope_gen_num_decay: + if ((slot->eg_rout >> 4) == slot->reg_sl) + { + slot->eg_gen = envelope_gen_num_sustain; + } + else if (!eg_off && !reset && shift > 0) + { + eg_inc = 1 << (shift - 1); + } + break; + case envelope_gen_num_sustain: + case envelope_gen_num_release: + if (!eg_off && !reset && shift > 0) + { + eg_inc = 1 << (shift - 1); + } + break; + } + slot->eg_rout = (eg_rout + eg_inc) & 0x1ff; + // Key off + if (reset) + { + slot->eg_gen = envelope_gen_num_attack; + } + if (!slot->key) + { + slot->eg_gen = envelope_gen_num_release; + } +} + +static void OPL3_EnvelopeKeyOn(opl3_slot *slot, uint8_t type) +{ + slot->key |= type; +} + +static void OPL3_EnvelopeKeyOff(opl3_slot *slot, uint8_t type) +{ + slot->key &= ~type; +} + +// +// Phase Generator +// + +static void OPL3_PhaseGenerate(opl3_slot *slot) +{ + opl3_chip *chip; + uint16_t f_num; + uint32_t basefreq; + uint8_t rm_xor, n_bit; + uint32_t noise; + uint16_t phase; + + chip = slot->chip; + f_num = slot->channel->f_num; + if (slot->reg_vib) + { + int8_t range; + uint8_t vibpos; + + range = (f_num >> 7) & 7; + vibpos = slot->chip->vibpos; + + if (!(vibpos & 3)) + { + range = 0; + } + else if (vibpos & 1) + { + range >>= 1; + } + range >>= slot->chip->vibshift; + + if (vibpos & 4) + { + range = -range; + } + f_num += range; + } + basefreq = (f_num << slot->channel->block) >> 1; + phase = (uint16_t)(slot->pg_phase >> 9); + if (slot->pg_reset) + { + slot->pg_phase = 0; + } + slot->pg_phase += (basefreq * mt[slot->reg_mult]) >> 1; + // Rhythm mode + noise = chip->noise; + slot->pg_phase_out = phase; + if (slot->slot_num == 13) // hh + { + chip->rm_hh_bit2 = (phase >> 2) & 1; + chip->rm_hh_bit3 = (phase >> 3) & 1; + chip->rm_hh_bit7 = (phase >> 7) & 1; + chip->rm_hh_bit8 = (phase >> 8) & 1; + } + if (slot->slot_num == 17 && (chip->rhy & 0x20)) // tc + { + chip->rm_tc_bit3 = (phase >> 3) & 1; + chip->rm_tc_bit5 = (phase >> 5) & 1; + } + if (chip->rhy & 0x20) + { + rm_xor = (chip->rm_hh_bit2 ^ chip->rm_hh_bit7) + | (chip->rm_hh_bit3 ^ chip->rm_tc_bit5) + | (chip->rm_tc_bit3 ^ chip->rm_tc_bit5); + switch (slot->slot_num) + { + case 13: // hh + slot->pg_phase_out = rm_xor << 9; + if (rm_xor ^ (noise & 1)) + { + slot->pg_phase_out |= 0xd0; + } + else + { + slot->pg_phase_out |= 0x34; + } + break; + case 16: // sd + slot->pg_phase_out = (chip->rm_hh_bit8 << 9) + | ((chip->rm_hh_bit8 ^ (noise & 1)) << 8); + break; + case 17: // tc + slot->pg_phase_out = (rm_xor << 9) | 0x80; + break; + default: + break; + } + } + n_bit = ((noise >> 14) ^ noise) & 0x01; + chip->noise = (noise >> 1) | (n_bit << 22); +} + +// +// Slot +// + +static void OPL3_SlotWrite20(opl3_slot *slot, uint8_t data) +{ + if ((data >> 7) & 0x01) + { + slot->trem = &slot->chip->tremolo; + } + else + { + slot->trem = (uint8_t*)&slot->chip->zeromod; + } + slot->reg_vib = (data >> 6) & 0x01; + slot->reg_type = (data >> 5) & 0x01; + slot->reg_ksr = (data >> 4) & 0x01; + slot->reg_mult = data & 0x0f; +} + +static void OPL3_SlotWrite40(opl3_slot *slot, uint8_t data) +{ + slot->reg_ksl = (data >> 6) & 0x03; + slot->reg_tl = data & 0x3f; + OPL3_EnvelopeUpdateKSL(slot); +} + +static void OPL3_SlotWrite60(opl3_slot *slot, uint8_t data) +{ + slot->reg_ar = (data >> 4) & 0x0f; + slot->reg_dr = data & 0x0f; +} + +static void OPL3_SlotWrite80(opl3_slot *slot, uint8_t data) +{ + slot->reg_sl = (data >> 4) & 0x0f; + if (slot->reg_sl == 0x0f) + { + slot->reg_sl = 0x1f; + } + slot->reg_rr = data & 0x0f; +} + +static void OPL3_SlotWriteE0(opl3_slot *slot, uint8_t data) +{ + slot->reg_wf = data & 0x07; + if (slot->chip->newm == 0x00) + { + slot->reg_wf &= 0x03; + } +} + +static void OPL3_SlotGenerate(opl3_slot *slot) +{ + slot->out = envelope_sin[slot->reg_wf](slot->pg_phase_out + *slot->mod, slot->eg_out); +} + +static void OPL3_SlotCalcFB(opl3_slot *slot) +{ + if (slot->channel->fb != 0x00) + { + slot->fbmod = (slot->prout + slot->out) >> (0x09 - slot->channel->fb); + } + else + { + slot->fbmod = 0; + } + slot->prout = slot->out; +} + +// +// Channel +// + +static void OPL3_ChannelSetupAlg(opl3_channel *channel); + +static void OPL3_ChannelUpdateRhythm(opl3_chip *chip, uint8_t data) +{ + opl3_channel *channel6; + opl3_channel *channel7; + opl3_channel *channel8; + uint8_t chnum; + + chip->rhy = data & 0x3f; + if (chip->rhy & 0x20) + { + channel6 = &chip->channel[6]; + channel7 = &chip->channel[7]; + channel8 = &chip->channel[8]; + channel6->out[0] = &channel6->slots[1]->out; + channel6->out[1] = &channel6->slots[1]->out; + channel6->out[2] = &chip->zeromod; + channel6->out[3] = &chip->zeromod; + channel7->out[0] = &channel7->slots[0]->out; + channel7->out[1] = &channel7->slots[0]->out; + channel7->out[2] = &channel7->slots[1]->out; + channel7->out[3] = &channel7->slots[1]->out; + channel8->out[0] = &channel8->slots[0]->out; + channel8->out[1] = &channel8->slots[0]->out; + channel8->out[2] = &channel8->slots[1]->out; + channel8->out[3] = &channel8->slots[1]->out; + for (chnum = 6; chnum < 9; chnum++) + { + chip->channel[chnum].chtype = ch_drum; + } + OPL3_ChannelSetupAlg(channel6); + OPL3_ChannelSetupAlg(channel7); + OPL3_ChannelSetupAlg(channel8); + //hh + if (chip->rhy & 0x01) + { + OPL3_EnvelopeKeyOn(channel7->slots[0], egk_drum); + } + else + { + OPL3_EnvelopeKeyOff(channel7->slots[0], egk_drum); + } + //tc + if (chip->rhy & 0x02) + { + OPL3_EnvelopeKeyOn(channel8->slots[1], egk_drum); + } + else + { + OPL3_EnvelopeKeyOff(channel8->slots[1], egk_drum); + } + //tom + if (chip->rhy & 0x04) + { + OPL3_EnvelopeKeyOn(channel8->slots[0], egk_drum); + } + else + { + OPL3_EnvelopeKeyOff(channel8->slots[0], egk_drum); + } + //sd + if (chip->rhy & 0x08) + { + OPL3_EnvelopeKeyOn(channel7->slots[1], egk_drum); + } + else + { + OPL3_EnvelopeKeyOff(channel7->slots[1], egk_drum); + } + //bd + if (chip->rhy & 0x10) + { + OPL3_EnvelopeKeyOn(channel6->slots[0], egk_drum); + OPL3_EnvelopeKeyOn(channel6->slots[1], egk_drum); + } + else + { + OPL3_EnvelopeKeyOff(channel6->slots[0], egk_drum); + OPL3_EnvelopeKeyOff(channel6->slots[1], egk_drum); + } + } + else + { + for (chnum = 6; chnum < 9; chnum++) + { + chip->channel[chnum].chtype = ch_2op; + OPL3_ChannelSetupAlg(&chip->channel[chnum]); + OPL3_EnvelopeKeyOff(chip->channel[chnum].slots[0], egk_drum); + OPL3_EnvelopeKeyOff(chip->channel[chnum].slots[1], egk_drum); + } + } +} + +static void OPL3_ChannelWriteA0(opl3_channel *channel, uint8_t data) +{ + if (channel->chip->newm && channel->chtype == ch_4op2) + { + return; + } + channel->f_num = (channel->f_num & 0x300) | data; + channel->ksv = (channel->block << 1) + | ((channel->f_num >> (0x09 - channel->chip->nts)) & 0x01); + OPL3_EnvelopeUpdateKSL(channel->slots[0]); + OPL3_EnvelopeUpdateKSL(channel->slots[1]); + if (channel->chip->newm && channel->chtype == ch_4op) + { + channel->pair->f_num = channel->f_num; + channel->pair->ksv = channel->ksv; + OPL3_EnvelopeUpdateKSL(channel->pair->slots[0]); + OPL3_EnvelopeUpdateKSL(channel->pair->slots[1]); + } +} + +static void OPL3_ChannelWriteB0(opl3_channel *channel, uint8_t data) +{ + if (channel->chip->newm && channel->chtype == ch_4op2) + { + return; + } + channel->f_num = (channel->f_num & 0xff) | ((data & 0x03) << 8); + channel->block = (data >> 2) & 0x07; + channel->ksv = (channel->block << 1) + | ((channel->f_num >> (0x09 - channel->chip->nts)) & 0x01); + OPL3_EnvelopeUpdateKSL(channel->slots[0]); + OPL3_EnvelopeUpdateKSL(channel->slots[1]); + if (channel->chip->newm && channel->chtype == ch_4op) + { + channel->pair->f_num = channel->f_num; + channel->pair->block = channel->block; + channel->pair->ksv = channel->ksv; + OPL3_EnvelopeUpdateKSL(channel->pair->slots[0]); + OPL3_EnvelopeUpdateKSL(channel->pair->slots[1]); + } +} + +static void OPL3_ChannelSetupAlg(opl3_channel *channel) +{ + if (channel->chtype == ch_drum) + { + if (channel->ch_num == 7 || channel->ch_num == 8) + { + channel->slots[0]->mod = &channel->chip->zeromod; + channel->slots[1]->mod = &channel->chip->zeromod; + return; + } + switch (channel->alg & 0x01) + { + case 0x00: + channel->slots[0]->mod = &channel->slots[0]->fbmod; + channel->slots[1]->mod = &channel->slots[0]->out; + break; + case 0x01: + channel->slots[0]->mod = &channel->slots[0]->fbmod; + channel->slots[1]->mod = &channel->chip->zeromod; + break; + } + return; + } + if (channel->alg & 0x08) + { + return; + } + if (channel->alg & 0x04) + { + channel->pair->out[0] = &channel->chip->zeromod; + channel->pair->out[1] = &channel->chip->zeromod; + channel->pair->out[2] = &channel->chip->zeromod; + channel->pair->out[3] = &channel->chip->zeromod; + switch (channel->alg & 0x03) + { + case 0x00: + channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; + channel->pair->slots[1]->mod = &channel->pair->slots[0]->out; + channel->slots[0]->mod = &channel->pair->slots[1]->out; + channel->slots[1]->mod = &channel->slots[0]->out; + channel->out[0] = &channel->slots[1]->out; + channel->out[1] = &channel->chip->zeromod; + channel->out[2] = &channel->chip->zeromod; + channel->out[3] = &channel->chip->zeromod; + break; + case 0x01: + channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; + channel->pair->slots[1]->mod = &channel->pair->slots[0]->out; + channel->slots[0]->mod = &channel->chip->zeromod; + channel->slots[1]->mod = &channel->slots[0]->out; + channel->out[0] = &channel->pair->slots[1]->out; + channel->out[1] = &channel->slots[1]->out; + channel->out[2] = &channel->chip->zeromod; + channel->out[3] = &channel->chip->zeromod; + break; + case 0x02: + channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; + channel->pair->slots[1]->mod = &channel->chip->zeromod; + channel->slots[0]->mod = &channel->pair->slots[1]->out; + channel->slots[1]->mod = &channel->slots[0]->out; + channel->out[0] = &channel->pair->slots[0]->out; + channel->out[1] = &channel->slots[1]->out; + channel->out[2] = &channel->chip->zeromod; + channel->out[3] = &channel->chip->zeromod; + break; + case 0x03: + channel->pair->slots[0]->mod = &channel->pair->slots[0]->fbmod; + channel->pair->slots[1]->mod = &channel->chip->zeromod; + channel->slots[0]->mod = &channel->pair->slots[1]->out; + channel->slots[1]->mod = &channel->chip->zeromod; + channel->out[0] = &channel->pair->slots[0]->out; + channel->out[1] = &channel->slots[0]->out; + channel->out[2] = &channel->slots[1]->out; + channel->out[3] = &channel->chip->zeromod; + break; + } + } + else + { + switch (channel->alg & 0x01) + { + case 0x00: + channel->slots[0]->mod = &channel->slots[0]->fbmod; + channel->slots[1]->mod = &channel->slots[0]->out; + channel->out[0] = &channel->slots[1]->out; + channel->out[1] = &channel->chip->zeromod; + channel->out[2] = &channel->chip->zeromod; + channel->out[3] = &channel->chip->zeromod; + break; + case 0x01: + channel->slots[0]->mod = &channel->slots[0]->fbmod; + channel->slots[1]->mod = &channel->chip->zeromod; + channel->out[0] = &channel->slots[0]->out; + channel->out[1] = &channel->slots[1]->out; + channel->out[2] = &channel->chip->zeromod; + channel->out[3] = &channel->chip->zeromod; + break; + } + } +} + +static void OPL3_ChannelWriteC0(opl3_channel *channel, uint8_t data) +{ + channel->fb = (data & 0x0e) >> 1; + channel->con = data & 0x01; + channel->alg = channel->con; + if (channel->chip->newm) + { + if (channel->chtype == ch_4op) + { + channel->pair->alg = 0x04 | (channel->con << 1) | (channel->pair->con); + channel->alg = 0x08; + OPL3_ChannelSetupAlg(channel->pair); + } + else if (channel->chtype == ch_4op2) + { + channel->alg = 0x04 | (channel->pair->con << 1) | (channel->con); + channel->pair->alg = 0x08; + OPL3_ChannelSetupAlg(channel); + } + else + { + OPL3_ChannelSetupAlg(channel); + } + } + else + { + OPL3_ChannelSetupAlg(channel); + } + if (channel->chip->newm) + { + channel->cha = ((data >> 4) & 0x01) ? ~0 : 0; + channel->chb = ((data >> 5) & 0x01) ? ~0 : 0; + } + else + { + channel->cha = channel->chb = (uint16_t)~0; + } +} + +static void OPL3_ChannelKeyOn(opl3_channel *channel) +{ + if (channel->chip->newm) + { + if (channel->chtype == ch_4op) + { + OPL3_EnvelopeKeyOn(channel->slots[0], egk_norm); + OPL3_EnvelopeKeyOn(channel->slots[1], egk_norm); + OPL3_EnvelopeKeyOn(channel->pair->slots[0], egk_norm); + OPL3_EnvelopeKeyOn(channel->pair->slots[1], egk_norm); + } + else if (channel->chtype == ch_2op || channel->chtype == ch_drum) + { + OPL3_EnvelopeKeyOn(channel->slots[0], egk_norm); + OPL3_EnvelopeKeyOn(channel->slots[1], egk_norm); + } + } + else + { + OPL3_EnvelopeKeyOn(channel->slots[0], egk_norm); + OPL3_EnvelopeKeyOn(channel->slots[1], egk_norm); + } +} + +static void OPL3_ChannelKeyOff(opl3_channel *channel) +{ + if (channel->chip->newm) + { + if (channel->chtype == ch_4op) + { + OPL3_EnvelopeKeyOff(channel->slots[0], egk_norm); + OPL3_EnvelopeKeyOff(channel->slots[1], egk_norm); + OPL3_EnvelopeKeyOff(channel->pair->slots[0], egk_norm); + OPL3_EnvelopeKeyOff(channel->pair->slots[1], egk_norm); + } + else if (channel->chtype == ch_2op || channel->chtype == ch_drum) + { + OPL3_EnvelopeKeyOff(channel->slots[0], egk_norm); + OPL3_EnvelopeKeyOff(channel->slots[1], egk_norm); + } + } + else + { + OPL3_EnvelopeKeyOff(channel->slots[0], egk_norm); + OPL3_EnvelopeKeyOff(channel->slots[1], egk_norm); + } +} + +static void OPL3_ChannelSet4Op(opl3_chip *chip, uint8_t data) +{ + uint8_t bit; + uint8_t chnum; + for (bit = 0; bit < 6; bit++) + { + chnum = bit; + if (bit >= 3) + { + chnum += 9 - 3; + } + if ((data >> bit) & 0x01) + { + chip->channel[chnum].chtype = ch_4op; + chip->channel[chnum + 3].chtype = ch_4op2; + } + else + { + chip->channel[chnum].chtype = ch_2op; + chip->channel[chnum + 3].chtype = ch_2op; + } + } +} + +static int16_t OPL3_ClipSample(int32_t sample) +{ + if (sample > 32767) + { + sample = 32767; + } + else if (sample < -32768) + { + sample = -32768; + } + return (int16_t)sample; +} + +void OPL3_Generate(opl3_chip *chip, int16_t *buf) +{ + uint8_t ii; + uint8_t jj; + int16_t accm; + uint8_t shift = 0; + + buf[1] = OPL3_ClipSample(chip->mixbuff[1]); + + for (ii = 0; ii < 15; ii++) + { + OPL3_SlotCalcFB(&chip->slot[ii]); + OPL3_EnvelopeCalc(&chip->slot[ii]); + OPL3_PhaseGenerate(&chip->slot[ii]); + OPL3_SlotGenerate(&chip->slot[ii]); + } + + chip->mixbuff[0] = 0; + for (ii = 0; ii < 18; ii++) + { + accm = 0; + for (jj = 0; jj < 4; jj++) + { + accm += *chip->channel[ii].out[jj]; + } + chip->mixbuff[0] += (int16_t)(accm & chip->channel[ii].cha); + } + + for (ii = 15; ii < 18; ii++) + { + OPL3_SlotCalcFB(&chip->slot[ii]); + OPL3_EnvelopeCalc(&chip->slot[ii]); + OPL3_PhaseGenerate(&chip->slot[ii]); + OPL3_SlotGenerate(&chip->slot[ii]); + } + + buf[0] = OPL3_ClipSample(chip->mixbuff[0]); + + for (ii = 18; ii < 33; ii++) + { + OPL3_SlotCalcFB(&chip->slot[ii]); + OPL3_EnvelopeCalc(&chip->slot[ii]); + OPL3_PhaseGenerate(&chip->slot[ii]); + OPL3_SlotGenerate(&chip->slot[ii]); + } + + chip->mixbuff[1] = 0; + for (ii = 0; ii < 18; ii++) + { + accm = 0; + for (jj = 0; jj < 4; jj++) + { + accm += *chip->channel[ii].out[jj]; + } + chip->mixbuff[1] += (int16_t)(accm & chip->channel[ii].chb); + } + + for (ii = 33; ii < 36; ii++) + { + OPL3_SlotCalcFB(&chip->slot[ii]); + OPL3_EnvelopeCalc(&chip->slot[ii]); + OPL3_PhaseGenerate(&chip->slot[ii]); + OPL3_SlotGenerate(&chip->slot[ii]); + } + + if ((chip->timer & 0x3f) == 0x3f) + { + chip->tremolopos = (chip->tremolopos + 1) % 210; + } + if (chip->tremolopos < 105) + { + chip->tremolo = chip->tremolopos >> chip->tremoloshift; + } + else + { + chip->tremolo = (210 - chip->tremolopos) >> chip->tremoloshift; + } + + if ((chip->timer & 0x3ff) == 0x3ff) + { + chip->vibpos = (chip->vibpos + 1) & 7; + } + + chip->timer++; + + chip->eg_add = 0; + if (chip->eg_timer) + { + while (shift < 36 && ((chip->eg_timer >> shift) & 1) == 0) + { + shift++; + } + if (shift > 12) + { + chip->eg_add = 0; + } + else + { + chip->eg_add = shift + 1; + } + } + + if (chip->eg_timerrem || chip->eg_state) + { + if (chip->eg_timer == 0xfffffffff) + { + chip->eg_timer = 0; + chip->eg_timerrem = 1; + } + else + { + chip->eg_timer++; + chip->eg_timerrem = 0; + } + } + + chip->eg_state ^= 1; + + while (chip->writebuf[chip->writebuf_cur].time <= chip->writebuf_samplecnt) + { + if (!(chip->writebuf[chip->writebuf_cur].reg & 0x200)) + { + break; + } + chip->writebuf[chip->writebuf_cur].reg &= 0x1ff; + OPL3_WriteReg(chip, chip->writebuf[chip->writebuf_cur].reg, + chip->writebuf[chip->writebuf_cur].data); + chip->writebuf_cur = (chip->writebuf_cur + 1) % OPL_WRITEBUF_SIZE; + } + chip->writebuf_samplecnt++; +} + +void OPL3_GenerateResampled(opl3_chip *chip, int16_t *buf) +{ + while (chip->samplecnt >= chip->rateratio) + { + chip->oldsamples[0] = chip->samples[0]; + chip->oldsamples[1] = chip->samples[1]; + OPL3_Generate(chip, chip->samples); + chip->samplecnt -= chip->rateratio; + } + buf[0] = (int16_t)((chip->oldsamples[0] * (chip->rateratio - chip->samplecnt) + + chip->samples[0] * chip->samplecnt) / chip->rateratio); + buf[1] = (int16_t)((chip->oldsamples[1] * (chip->rateratio - chip->samplecnt) + + chip->samples[1] * chip->samplecnt) / chip->rateratio); + chip->samplecnt += 1 << RSM_FRAC; +} + +void OPL3_Reset(opl3_chip *chip, uint32_t samplerate) +{ + uint8_t slotnum; + uint8_t channum; + + memset(chip, 0, sizeof(opl3_chip)); + for (slotnum = 0; slotnum < 36; slotnum++) + { + chip->slot[slotnum].chip = chip; + chip->slot[slotnum].mod = &chip->zeromod; + chip->slot[slotnum].eg_rout = 0x1ff; + chip->slot[slotnum].eg_out = 0x1ff; + chip->slot[slotnum].eg_gen = envelope_gen_num_release; + chip->slot[slotnum].trem = (uint8_t*)&chip->zeromod; + chip->slot[slotnum].slot_num = slotnum; + } + for (channum = 0; channum < 18; channum++) + { + chip->channel[channum].slots[0] = &chip->slot[ch_slot[channum]]; + chip->channel[channum].slots[1] = &chip->slot[ch_slot[channum] + 3]; + chip->slot[ch_slot[channum]].channel = &chip->channel[channum]; + chip->slot[ch_slot[channum] + 3].channel = &chip->channel[channum]; + if ((channum % 9) < 3) + { + chip->channel[channum].pair = &chip->channel[channum + 3]; + } + else if ((channum % 9) < 6) + { + chip->channel[channum].pair = &chip->channel[channum - 3]; + } + chip->channel[channum].chip = chip; + chip->channel[channum].out[0] = &chip->zeromod; + chip->channel[channum].out[1] = &chip->zeromod; + chip->channel[channum].out[2] = &chip->zeromod; + chip->channel[channum].out[3] = &chip->zeromod; + chip->channel[channum].chtype = ch_2op; + chip->channel[channum].cha = 0xffff; + chip->channel[channum].chb = 0xffff; + chip->channel[channum].ch_num = channum; + OPL3_ChannelSetupAlg(&chip->channel[channum]); + } + chip->noise = 1; + chip->rateratio = (samplerate << RSM_FRAC) / 49716; + chip->tremoloshift = 4; + chip->vibshift = 1; +} + +void OPL3_WriteReg(opl3_chip *chip, uint16_t reg, uint8_t v) +{ + uint8_t high = (reg >> 8) & 0x01; + uint8_t regm = reg & 0xff; + switch (regm & 0xf0) + { + case 0x00: + if (high) + { + switch (regm & 0x0f) + { + case 0x04: + OPL3_ChannelSet4Op(chip, v); + break; + case 0x05: + chip->newm = v & 0x01; + break; + } + } + else + { + switch (regm & 0x0f) + { + case 0x08: + chip->nts = (v >> 6) & 0x01; + break; + } + } + break; + case 0x20: + case 0x30: + if (ad_slot[regm & 0x1f] >= 0) + { + OPL3_SlotWrite20(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); + } + break; + case 0x40: + case 0x50: + if (ad_slot[regm & 0x1f] >= 0) + { + OPL3_SlotWrite40(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); + } + break; + case 0x60: + case 0x70: + if (ad_slot[regm & 0x1f] >= 0) + { + OPL3_SlotWrite60(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); + } + break; + case 0x80: + case 0x90: + if (ad_slot[regm & 0x1f] >= 0) + { + OPL3_SlotWrite80(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); + } + break; + case 0xe0: + case 0xf0: + if (ad_slot[regm & 0x1f] >= 0) + { + OPL3_SlotWriteE0(&chip->slot[18 * high + ad_slot[regm & 0x1f]], v); + } + break; + case 0xa0: + if ((regm & 0x0f) < 9) + { + OPL3_ChannelWriteA0(&chip->channel[9 * high + (regm & 0x0f)], v); + } + break; + case 0xb0: + if (regm == 0xbd && !high) + { + chip->tremoloshift = (((v >> 7) ^ 1) << 1) + 2; + chip->vibshift = ((v >> 6) & 0x01) ^ 1; + OPL3_ChannelUpdateRhythm(chip, v); + } + else if ((regm & 0x0f) < 9) + { + OPL3_ChannelWriteB0(&chip->channel[9 * high + (regm & 0x0f)], v); + if (v & 0x20) + { + OPL3_ChannelKeyOn(&chip->channel[9 * high + (regm & 0x0f)]); + } + else + { + OPL3_ChannelKeyOff(&chip->channel[9 * high + (regm & 0x0f)]); + } + } + break; + case 0xc0: + if ((regm & 0x0f) < 9) + { + OPL3_ChannelWriteC0(&chip->channel[9 * high + (regm & 0x0f)], v); + } + break; + } +} + +void OPL3_WriteRegBuffered(opl3_chip *chip, uint16_t reg, uint8_t v) +{ + uint64_t time1, time2; + + if (chip->writebuf[chip->writebuf_last].reg & 0x200) + { + OPL3_WriteReg(chip, chip->writebuf[chip->writebuf_last].reg & 0x1ff, + chip->writebuf[chip->writebuf_last].data); + + chip->writebuf_cur = (chip->writebuf_last + 1) % OPL_WRITEBUF_SIZE; + chip->writebuf_samplecnt = chip->writebuf[chip->writebuf_last].time; + } + + chip->writebuf[chip->writebuf_last].reg = reg | 0x200; + chip->writebuf[chip->writebuf_last].data = v; + time1 = chip->writebuf_lasttime + OPL_WRITEBUF_DELAY; + time2 = chip->writebuf_samplecnt; + + if (time1 < time2) + { + time1 = time2; + } + + chip->writebuf[chip->writebuf_last].time = time1; + chip->writebuf_lasttime = time1; + chip->writebuf_last = (chip->writebuf_last + 1) % OPL_WRITEBUF_SIZE; +} + +void OPL3_GenerateStream(opl3_chip *chip, int16_t *sndptr, uint32_t numsamples) +{ + uint32_t i; + + for(i = 0; i < numsamples; i++) + { + OPL3_GenerateResampled(chip, sndptr); + sndptr += 2; + } +} diff -Nru dosbox-staging-0.76.0/src/libs/nuked/opl3.h dosbox-staging-0.77.0/src/libs/nuked/opl3.h --- dosbox-staging-0.76.0/src/libs/nuked/opl3.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/nuked/opl3.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,152 @@ +/* Nuked OPL3 + * Copyright (C) 2013-2020 Nuke.YKT + * + * This file is part of Nuked OPL3. + * + * Nuked OPL3 is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 2.1 + * of the License, or (at your option) any later version. + * + * Nuked OPL3 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Nuked OPL3. If not, see . + + * Nuked OPL3 emulator. + * Thanks: + * MAME Development Team(Jarek Burczynski, Tatsuyuki Satoh): + * Feedback and Rhythm part calculation information. + * forums.submarine.org.uk(carbon14, opl3): + * Tremolo and phase generator calculation information. + * OPLx decapsulated(Matthew Gambrell, Olli Niemitalo): + * OPL2 ROMs. + * siliconpr0n.org(John McMaster, digshadow): + * YMF262 and VRC VII decaps and die shots. + * + * version: 1.8 + */ + +#ifndef OPL_OPL3_H +#define OPL_OPL3_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define OPL_WRITEBUF_SIZE 1024 +#define OPL_WRITEBUF_DELAY 2 + +typedef struct _opl3_slot opl3_slot; +typedef struct _opl3_channel opl3_channel; +typedef struct _opl3_chip opl3_chip; + +struct _opl3_slot { + opl3_channel *channel; + opl3_chip *chip; + int16_t out; + int16_t fbmod; + int16_t *mod; + int16_t prout; + int16_t eg_rout; + int16_t eg_out; + uint8_t eg_inc; + uint8_t eg_gen; + uint8_t eg_rate; + uint8_t eg_ksl; + uint8_t *trem; + uint8_t reg_vib; + uint8_t reg_type; + uint8_t reg_ksr; + uint8_t reg_mult; + uint8_t reg_ksl; + uint8_t reg_tl; + uint8_t reg_ar; + uint8_t reg_dr; + uint8_t reg_sl; + uint8_t reg_rr; + uint8_t reg_wf; + uint8_t key; + uint32_t pg_reset; + uint32_t pg_phase; + uint16_t pg_phase_out; + uint8_t slot_num; +}; + +struct _opl3_channel { + opl3_slot *slots[2]; + opl3_channel *pair; + opl3_chip *chip; + int16_t *out[4]; + uint8_t chtype; + uint16_t f_num; + uint8_t block; + uint8_t fb; + uint8_t con; + uint8_t alg; + uint8_t ksv; + uint16_t cha, chb; + uint8_t ch_num; +}; + +typedef struct _opl3_writebuf { + uint64_t time; + uint16_t reg; + uint8_t data; +} opl3_writebuf; + +struct _opl3_chip { + opl3_channel channel[18]; + opl3_slot slot[36]; + uint16_t timer; + uint64_t eg_timer; + uint8_t eg_timerrem; + uint8_t eg_state; + uint8_t eg_add; + uint8_t newm; + uint8_t nts; + uint8_t rhy; + uint8_t vibpos; + uint8_t vibshift; + uint8_t tremolo; + uint8_t tremolopos; + uint8_t tremoloshift; + uint32_t noise; + int16_t zeromod; + int32_t mixbuff[2]; + uint8_t rm_hh_bit2; + uint8_t rm_hh_bit3; + uint8_t rm_hh_bit7; + uint8_t rm_hh_bit8; + uint8_t rm_tc_bit3; + uint8_t rm_tc_bit5; + //OPL3L + int32_t rateratio; + int32_t samplecnt; + int16_t oldsamples[2]; + int16_t samples[2]; + + uint64_t writebuf_samplecnt; + uint32_t writebuf_cur; + uint32_t writebuf_last; + uint64_t writebuf_lasttime; + opl3_writebuf writebuf[OPL_WRITEBUF_SIZE]; +}; + +void OPL3_Generate(opl3_chip *chip, int16_t *buf); +void OPL3_GenerateResampled(opl3_chip *chip, int16_t *buf); +void OPL3_Reset(opl3_chip *chip, uint32_t samplerate); +void OPL3_WriteReg(opl3_chip *chip, uint16_t reg, uint8_t v); +void OPL3_WriteRegBuffered(opl3_chip *chip, uint16_t reg, uint8_t v); +void OPL3_GenerateStream(opl3_chip *chip, int16_t *sndptr, uint32_t numsamples); + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/ppscale/Makefile.am dosbox-staging-0.77.0/src/libs/ppscale/Makefile.am --- dosbox-staging-0.76.0/src/libs/ppscale/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/ppscale/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -EXTRA_DIST = ppscale.h - -noinst_LIBRARIES = libppscale.a - -libppscale_a_SOURCES = ppscale.c diff -Nru dosbox-staging-0.76.0/src/libs/ppscale/meson.build dosbox-staging-0.77.0/src/libs/ppscale/meson.build --- dosbox-staging-0.76.0/src/libs/ppscale/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/ppscale/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +libppscale = static_library('ppscale', ['ppscale.c']) diff -Nru dosbox-staging-0.76.0/src/libs/ppscale/ppscale.c dosbox-staging-0.77.0/src/libs/ppscale/ppscale.c --- dosbox-staging-0.76.0/src/libs/ppscale/ppscale.c 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/ppscale/ppscale.c 2021-07-02 15:47:39.000000000 +0000 @@ -6,6 +6,7 @@ /* ----------------------- Pixel-perfect scaling unit ----------------------- */ /* This unit uses the Horstmann indentation style. */ +#include #include #include @@ -23,18 +24,19 @@ double parweight, /* weight of PAR in scale estimation */ int *sx, int *sy /* horisontal and vertical scales */ ) /* returns -1 on error and 0 on success */ -{ int sxc, syc, sxm, sym; /* current and maximum x and y scales */ - int exactpar; /* whether to enforce exact aspect ratio */ - double parrat; /* ratio of current PAR and target PAR */ - double errpar, errsize, err; /* PAR error, size error, and total error */ - double errmin; /* minimal error so far */ - double parnorm; /* target PAR "normalised" to exceed 1.0 */ - double srat; /* ratio of maximum size to current */ +{ int sxc = 0, syc = 0, sxm = 0, sym = 0; /* current and maximum x and y scales */ + int exactpar = 0; /* whether to enforce exact aspect ratio */ + double parrat = 0; /* ratio of current PAR and target PAR */ + double errpar = 0, errsize = 0, err = 0; /* PAR error, size error, and total error */ + double errmin = 0; /* minimal error so far */ + double parnorm = 0; /* target PAR "normalised" to exceed 1.0 */ + double srat = 0; /* ratio of maximum size to current */ if /* sanity checks: */ ( win <= 0 || hin <= 0 || win > wout || hin > hout || - par <= 0.0 + par <= 0.0 || parweight <= 0 || + sx == NULL || sy == NULL ) return -1; @@ -49,13 +51,27 @@ errmin = -1; /* this value marks the first iteration */ while( 1 ) - { parrat = (double)syc / sxc / par; + { + // Handle unstable calculation: parrat = (double)syc / sxc / par + if (syc == 0) // numerator is zero, so result will be zero + parrat = 0; + else if (sxc == 0) // numerator is not zero but denominator is zero, so will result in 'inf' + parrat = (double)INFINITY; + else // otherwise attempt the calculation + parrat = (double)syc / sxc / par; /* calculate aspect-ratio error: */ - if( parrat > 1.0 ) errpar = parrat; - else errpar = 1.0 / parrat; - - srat = min( (double)sym/syc, (double)sxm/sxc ); + if( parrat > 1.0 ) + errpar = parrat; + else if (fabs(parrat) > DBL_EPSILON) // denominator is valid, so allow the division + errpar = 1.0 / parrat; + else // otherwise parrat is near zero so will result in 'inf' + errpar = (double)INFINITY; + + if(sym && sxm && syc == 0 && sxc == 0) // denominators are both zero so will result in 'inf' + srat = (double)INFINITY; + else // otherwise one will be valid, so attempt the comparison + srat = min( (double)sym/syc, (double)sxm/sxc ); /* calculate size error: */ /* if PAR is exact, exclude size error from the fitness function: */ @@ -64,9 +80,10 @@ err = errpar * errsize; /* total error */ - /* check for a new optimum: */ - if( err < errmin || errmin == -1 ) - { *sx = sxc; + /* check for a new optimum or if errmin is -1: */ + if(err < errmin || fabs(errmin + 1) < DBL_EPSILON) + { + *sx = sxc; *sy = syc; errmin = err; } @@ -133,7 +150,7 @@ while( 1 ) { drow = drow + dpitch; /* next destination row */ if( iy == sy ) break; /* terminate if source row scaled */ - memcpy( drow, drow0, drowsz ); /* duplicate base row below */ + memcpy( drow, drow0, (size_t)drowsz ); /* duplicate base row below */ iy += 1; } diff -Nru dosbox-staging-0.76.0/src/libs/residfp/array.h dosbox-staging-0.77.0/src/libs/residfp/array.h --- dosbox-staging-0.76.0/src/libs/residfp/array.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/array.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright (C) 2011-2014 Leandro Nini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef ARRAY_H +#define ARRAY_H + +/** + * Counter. + */ +class counter +{ +private: + unsigned int c; + +public: + counter() : c(1) {} + void increase() { ++c; } + unsigned int decrease() { return --c; } +}; + +/** + * Reference counted pointer to matrix wrapper, for use with standard containers. + */ +template +class matrix +{ +private: + T* data; + counter* count; + const unsigned int x, y; + +public: + matrix(unsigned int x, unsigned int y) : + data(new T[x * y]), + count(new counter()), + x(x), + y(y) {} + + matrix(const matrix& p) : + data(p.data), + count(p.count), + x(p.x), + y(p.y) { count->increase(); } + + ~matrix() { if (count->decrease() == 0) { delete count; delete [] data; } } + + matrix &operator=(const matrix&) = delete; // prevent assignment + + unsigned int length() const { return x * y; } + + T* operator[](unsigned int a) { return &data[a * y]; } + + T const* operator[](unsigned int a) const { return &data[a * y]; } +}; + +typedef matrix matrix_t; + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/AUTHORS dosbox-staging-0.77.0/src/libs/residfp/AUTHORS --- dosbox-staging-0.76.0/src/libs/residfp/AUTHORS 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/AUTHORS 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,6 @@ +Authors of reSIDfp. + +Dag Lem: Designed and programmed complete emulation engine. +Antti S. Lankila: Distortion simulation and calculation of combined waveforms +Ken Händel: source code conversion to Java +Leandro Nini: port to c++, merge with reSID 1.0 diff -Nru dosbox-staging-0.76.0/src/libs/residfp/COPYING dosbox-staging-0.77.0/src/libs/residfp/COPYING --- dosbox-staging-0.76.0/src/libs/residfp/COPYING 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/COPYING 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Dac.cpp dosbox-staging-0.77.0/src/libs/residfp/Dac.cpp --- dosbox-staging-0.76.0/src/libs/residfp/Dac.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Dac.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "Dac.h" + +namespace reSIDfp +{ + +Dac::Dac(unsigned int bits) : + dac(new double[bits]), + dacLength(bits) +{} + +Dac::~Dac() +{ + delete [] dac; +} + +double Dac::getOutput(unsigned int input) const +{ + double dacValue = 0.; + + for (unsigned int i = 0; i < dacLength; i++) + { + if ((input & (1 << i)) != 0) + { + dacValue += dac[i]; + } + } + + return dacValue; +} + +void Dac::kinkedDac(ChipModel chipModel) +{ + const double R_INFINITY = 1e6; + + // Non-linearity parameter, 8580 DACs are perfectly linear + const double _2R_div_R = chipModel == MOS6581 ? 2.20 : 2.00; + + // 6581 DACs are not terminated by a 2R resistor + const bool term = chipModel == MOS8580; + + // Calculate voltage contribution by each individual bit in the R-2R ladder. + for (unsigned int set_bit = 0; set_bit < dacLength; set_bit++) + { + double Vn = 1.; // Normalized bit voltage. + double R = 1.; // Normalized R + const double _2R = _2R_div_R * R; // 2R + double Rn = term ? // Rn = 2R for correct termination, + _2R : R_INFINITY; // INFINITY for missing termination. + + unsigned int bit; + + // Calculate DAC "tail" resistance by repeated parallel substitution. + for (bit = 0; bit < set_bit; bit++) + { + Rn = (Rn == R_INFINITY) ? + R + _2R : + R + (_2R * Rn) / (_2R + Rn); // R + 2R || Rn + } + + // Source transformation for bit voltage. + if (Rn == R_INFINITY) + { + Rn = _2R; + } + else + { + Rn = (_2R * Rn) / (_2R + Rn); // 2R || Rn + Vn = Vn * Rn / _2R; + } + + // Calculate DAC output voltage by repeated source transformation from + // the "tail". + + for (++bit; bit < dacLength; bit++) + { + Rn += R; + const double I = Vn / Rn; + Rn = (_2R * Rn) / (_2R + Rn); // 2R || Rn + Vn = Rn * I; + } + + dac[set_bit] = Vn; + } + + // Normalize to integerish behavior + double Vsum = 0.; + + for (unsigned int i = 0; i < dacLength; i++) + { + Vsum += dac[i]; + } + + Vsum /= 1 << dacLength; + + for (unsigned int i = 0; i < dacLength; i++) + { + dac[i] /= Vsum; + } +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Dac.h dosbox-staging-0.77.0/src/libs/residfp/Dac.h --- dosbox-staging-0.76.0/src/libs/residfp/Dac.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Dac.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DAC_H +#define DAC_H + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +/** + * Estimate DAC nonlinearity. + * The SID DACs are built up as R-2R ladder as follows: + * + * n n-1 2 1 0 VGND + * | | | | | | Termination + * 2R 2R 2R 2R 2R 2R only for + * | | | | | | MOS 8580 + * Vo -o-R-o-R-...-o-R-o-R-- --+ + * + * + * All MOS 6581 DACs are missing a termination resistor at bit 0. This causes + * pronounced errors for the lower 4 - 5 bits (e.g. the output for bit 0 is + * actually equal to the output for bit 1), resulting in DAC discontinuities + * for the lower bits. + * In addition to this, the 6581 DACs exhibit further severe discontinuities + * for higher bits, which may be explained by a less than perfect match between + * the R and 2R resistors, or by output impedance in the NMOS transistors + * providing the bit voltages. A good approximation of the actual DAC output is + * achieved for 2R/R ~ 2.20. + * + * The MOS 8580 DACs, on the other hand, do not exhibit any discontinuities. + * These DACs include the correct termination resistor, and also seem to have + * very accurately matched R and 2R resistors (2R/R = 2.00). + * + * On the 6581 the output of the waveform and envelope DACs go through + * a voltage follower built with two NMOS: + * + * Vdd + * + * | + * |-+ + * Vin -------| T1 (enhancement-mode) + * |-+ + * | + * o-------- Vout + * | + * |-+ + * +---| T2 (depletion-mode) + * | |-+ + * | | + * + * GND GND + */ +class Dac +{ +private: + /// analog values + double * const dac = nullptr; + + /// the dac array length + const unsigned int dacLength = 0; + +public: + /** + * Initialize DAC model. + * + * @param bits the number of input bits + */ + Dac(unsigned int bits); + ~Dac(); + Dac(const Dac&) = delete; // prevent copy + Dac &operator=(const Dac&) = delete; // prevent assignment + + /** + * Build DAC model for specific chip. + * + * @param chipModel 6581 or 8580 + */ + void kinkedDac(ChipModel chipModel); + + /** + * Get the Vo output for a given combination of input bits. + * + * @param input the digital input + * @return the analog output value + */ + double getOutput(unsigned int input) const; +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/EnvelopeGenerator.cpp dosbox-staging-0.77.0/src/libs/residfp/EnvelopeGenerator.cpp --- dosbox-staging-0.76.0/src/libs/residfp/EnvelopeGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/EnvelopeGenerator.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,170 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2018 VICE Project + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define ENVELOPEGENERATOR_CPP + +#include "EnvelopeGenerator.h" + +#include "Dac.h" + +namespace reSIDfp +{ + +const unsigned int DAC_BITS = 8; + +/** + * Lookup table to convert from attack, decay, or release value to rate + * counter period. + * + * The rate counter is a 15 bit register which is left shifted each cycle. + * When the counter reaches a specific comparison value, + * the envelope counter is incremented (attack) or decremented + * (decay/release) and the rate counter is resetted. + * + * see [kevtris.org](http://blog.kevtris.org/?p=13) + */ +const unsigned int EnvelopeGenerator::adsrtable[16] = +{ + 0x007f, + 0x3000, + 0x1e00, + 0x0660, + 0x0182, + 0x5573, + 0x000e, + 0x3805, + 0x2424, + 0x2220, + 0x090c, + 0x0ecd, + 0x010e, + 0x23f7, + 0x5237, + 0x64a8 +}; + +void EnvelopeGenerator::setChipModel(ChipModel chipModel) +{ + Dac dacBuilder(DAC_BITS); + dacBuilder.kinkedDac(chipModel); + + for (unsigned int i = 0; i < (1 << DAC_BITS); i++) + { + dac[i] = static_cast(dacBuilder.getOutput(i)); + } +} + +void EnvelopeGenerator::reset() +{ + // counter is not changed on reset + envelope_pipeline = 0; + + state_pipeline = 0; + + attack = 0; + decay = 0; + sustain = 0; + release = 0; + + gate = false; + + resetLfsr = true; + + exponential_counter = 0; + exponential_counter_period = 1; + new_exponential_counter_period = 0; + + state = RELEASE; + counter_enabled = true; + rate = adsrtable[release]; +} + +void EnvelopeGenerator::writeCONTROL_REG(unsigned char control) +{ + const bool gate_next = (control & 0x01) != 0; + + if (gate_next != gate) + { + gate = gate_next; + + // The rate counter is never reset, thus there will be a delay before the + // envelope counter starts counting up (attack) or down (release). + + if (gate_next) + { + // Gate bit on: Start attack, decay, sustain. + next_state = ATTACK; + state_pipeline = 2; + + if (resetLfsr || (exponential_pipeline == 2)) + { + envelope_pipeline = (exponential_counter_period == 1) || (exponential_pipeline == 2) ? 2 : 4; + } + else if (exponential_pipeline == 1) + { + state_pipeline = 3; + } + } + else + { + // Gate bit off: Start release. + next_state = RELEASE; + state_pipeline = envelope_pipeline > 0 ? 3 : 2; + } + } +} + +void EnvelopeGenerator::writeATTACK_DECAY(unsigned char attack_decay) +{ + attack = (attack_decay >> 4) & 0x0f; + decay = attack_decay & 0x0f; + + if (state == ATTACK) + { + rate = adsrtable[attack]; + } + else if (state == DECAY_SUSTAIN) + { + rate = adsrtable[decay]; + } +} + +void EnvelopeGenerator::writeSUSTAIN_RELEASE(unsigned char sustain_release) +{ + // From the sustain levels it follows that both the low and high 4 bits + // of the envelope counter are compared to the 4-bit sustain value. + // This has been verified by sampling ENV3. + // + // For a detailed description see: + // http://ploguechipsounds.blogspot.it/2010/11/new-research-on-sid-adsr.html + sustain = (sustain_release & 0xf0) | ((sustain_release >> 4) & 0x0f); + + release = sustain_release & 0x0f; + + if (state == RELEASE) + { + rate = adsrtable[release]; + } +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/EnvelopeGenerator.h dosbox-staging-0.77.0/src/libs/residfp/EnvelopeGenerator.h --- dosbox-staging-0.76.0/src/libs/residfp/EnvelopeGenerator.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/EnvelopeGenerator.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,437 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2018 VICE Project + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef ENVELOPEGENERATOR_H +#define ENVELOPEGENERATOR_H + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +/** + * A 15 bit [LFSR] is used to implement the envelope rates, in effect dividing + * the clock to the envelope counter by the currently selected rate period. + * + * In addition, another 5 bit counter is used to implement the exponential envelope decay, + * in effect further dividing the clock to the envelope counter. + * The period of this counter is set to 1, 2, 4, 8, 16, 30 at the envelope counter + * values 255, 93, 54, 26, 14, 6, respectively. + * + * [LFSR]: https://en.wikipedia.org/wiki/Linear_feedback_shift_register + */ +class EnvelopeGenerator +{ +private: + /** + * The envelope state machine's distinct states. In addition to this, + * envelope has a hold mode, which freezes envelope counter to zero. + */ + enum State + { + ATTACK, DECAY_SUSTAIN, RELEASE + }; + +private: + /// XOR shift register for ADSR prescaling. + unsigned int lfsr; + + /// Comparison value (period) of the rate counter before next event. + unsigned int rate; + + /** + * During release mode, the SID arpproximates envelope decay via piecewise + * linear decay rate. + */ + unsigned int exponential_counter; + + /** + * Comparison value (period) of the exponential decay counter before next + * decrement. + */ + unsigned int exponential_counter_period; + unsigned int new_exponential_counter_period; + + unsigned int state_pipeline; + + /// + unsigned int envelope_pipeline; + + unsigned int exponential_pipeline; + + /// Current envelope state + State state; + State next_state; + + /// Whether counter is enabled. Only switching to ATTACK can release envelope. + bool counter_enabled; + + /// Gate bit + bool gate; + + /// + bool resetLfsr; + + /// The current digital value of envelope output. + unsigned char envelope_counter; + + /// Attack register + unsigned char attack; + + /// Decay register + unsigned char decay; + + /// Sustain register + unsigned char sustain; + + /// Release register + unsigned char release; + + /// The ENV3 value, sampled at the first phase of the clock + unsigned char env3; + + /** + * Emulated nonlinearity of the envelope DAC. + * + * @See Dac + */ + float dac[256]; + +private: + static const unsigned int adsrtable[16]; + +private: + void set_exponential_counter(); + + void state_change(); + +public: + /** + * Set chip model. + * This determines the type of the analog DAC emulation: + * 8580 is perfectly linear while 6581 is nonlinear. + * + * @param chipModel + */ + void setChipModel(ChipModel chipModel); + + /** + * SID clocking. + */ + void clock(); + + /** + * Get the Envelope Generator output. + * DAC imperfections are emulated by using envelope_counter as an index + * into a DAC lookup table. readENV() uses envelope_counter directly. + */ + float output() const { return dac[envelope_counter]; } + + /** + * Constructor. + */ + EnvelopeGenerator() : + lfsr(0x7fff), + rate(0), + exponential_counter(0), + exponential_counter_period(1), + new_exponential_counter_period(0), + state_pipeline(0), + envelope_pipeline(0), + exponential_pipeline(0), + state(RELEASE), + next_state(RELEASE), + counter_enabled(true), + gate(false), + resetLfsr(false), + envelope_counter(0xaa), + attack(0), + decay(0), + sustain(0), + release(0), + env3(0) + {} + + /** + * SID reset. + */ + void reset(); + + /** + * Write control register. + * + * @param control + * control register + */ + void writeCONTROL_REG(unsigned char control); + + /** + * Write Attack/Decay register. + * + * @param attack_decay + * attack/decay value + */ + void writeATTACK_DECAY(unsigned char attack_decay); + + /** + * Write Sustain/Release register. + * + * @param sustain_release + * sustain/release value + */ + void writeSUSTAIN_RELEASE(unsigned char sustain_release); + + /** + * Return the envelope current value. + * + * @return envelope counter + */ + unsigned char readENV() const { return env3; } +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(ENVELOPEGENERATOR_CPP) + +namespace reSIDfp +{ + +RESID_INLINE +void EnvelopeGenerator::clock() +{ + env3 = envelope_counter; + + if (unlikely(new_exponential_counter_period > 0)) + { + exponential_counter_period = new_exponential_counter_period; + new_exponential_counter_period = 0; + } + + if (unlikely(state_pipeline)) + { + state_change(); + } + + if (unlikely(envelope_pipeline != 0) && (--envelope_pipeline == 0)) + { + if (likely(counter_enabled)) + { + if (state == ATTACK) + { + if (++envelope_counter==0xff) + { + next_state = DECAY_SUSTAIN; + state_pipeline = 3; + } + } + else if ((state == DECAY_SUSTAIN) || (state == RELEASE)) + { + if (--envelope_counter==0x00) + { + counter_enabled = false; + } + } + + set_exponential_counter(); + } + } + else if (unlikely(exponential_pipeline != 0) && (--exponential_pipeline == 0)) + { + exponential_counter = 0; + + if (((state == DECAY_SUSTAIN) && (envelope_counter != sustain)) + || (state == RELEASE)) + { + // The envelope counter can flip from 0x00 to 0xff by changing state to + // attack, then to release. The envelope counter will then continue + // counting down in the release state. + // This has been verified by sampling ENV3. + + envelope_pipeline = 1; + } + } + else if (unlikely(resetLfsr)) + { + lfsr = 0x7fff; + resetLfsr = false; + + if (state == ATTACK) + { + // The first envelope step in the attack state also resets the exponential + // counter. This has been verified by sampling ENV3. + exponential_counter = 0; // NOTE this is actually delayed one cycle, not modeled + + // The envelope counter can flip from 0xff to 0x00 by changing state to + // release, then to attack. The envelope counter is then frozen at + // zero; to unlock this situation the state must be changed to release, + // then to attack. This has been verified by sampling ENV3. + + envelope_pipeline = 2; + } + else + { + if (counter_enabled && (++exponential_counter == exponential_counter_period)) + exponential_pipeline = exponential_counter_period != 1 ? 2 : 1; + } + } + + // ADSR delay bug. + // If the rate counter comparison value is set below the current value of the + // rate counter, the counter will continue counting up until it wraps around + // to zero at 2^15 = 0x8000, and then count rate_period - 1 before the + // envelope can constly be stepped. + // This has been verified by sampling ENV3. + + // check to see if LFSR matches table value + if (likely(lfsr != rate)) + { + // it wasn't a match, clock the LFSR once + // by performing XOR on last 2 bits + const unsigned int feedback = ((lfsr << 14) ^ (lfsr << 13)) & 0x4000; + lfsr = (lfsr >> 1) | feedback; + } + else + { + resetLfsr = true; + } +} + +/** + * This is what happens on chip during state switching, + * based on die reverse engineering and transistor level + * emulation. + * + * Attack + * + * 0 - Gate on + * 1 - Counting direction changes + * During this cycle the decay rate is "accidentally" activated + * 2 - Counter is being inverted + * Now the attack rate is correctly activated + * Counter is enabled + * 3 - Counter will be counting upward from now on + * + * Decay + * + * 0 - Counter == $ff + * 1 - Counting direction changes + * The attack state is still active + * 2 - Counter is being inverted + * During this cycle the decay state is activated + * 3 - Counter will be counting downward from now on + * + * Release + * + * 0 - Gate off + * 1 - During this cycle the release state is activated if coming from sustain/decay + * *2 - Counter is being inverted, the release state is activated + * *3 - Counter will be counting downward from now on + * + * (* only if coming directly from Attack state) + * + * Freeze + * + * 0 - Counter == $00 + * 1 - Nothing + * 2 - Counter is disabled + */ +RESID_INLINE +void EnvelopeGenerator::state_change() +{ + state_pipeline--; + + switch (next_state) + { + case ATTACK: + if (state_pipeline == 1) + { + // The decay rate is "accidentally" enabled during first cycle of attack phase + rate = adsrtable[decay]; + } + else if (state_pipeline == 0) + { + state = ATTACK; + // The attack rate is correctly enabled during second cycle of attack phase + rate = adsrtable[attack]; + counter_enabled = true; + } + break; + case DECAY_SUSTAIN: + if (state_pipeline == 0) + { + state = DECAY_SUSTAIN; + rate = adsrtable[decay]; + } + break; + case RELEASE: + if (((state == ATTACK) && (state_pipeline == 0)) + || ((state == DECAY_SUSTAIN) && (state_pipeline == 1))) + { + state = RELEASE; + rate = adsrtable[release]; + } + break; + } +} + +RESID_INLINE +void EnvelopeGenerator::set_exponential_counter() +{ + // Check for change of exponential counter period. + // + // For a detailed description see: + // http://ploguechipsounds.blogspot.it/2010/03/sid-6581r3-adsr-tables-up-close.html + switch (envelope_counter) + { + case 0xff: + case 0x00: + new_exponential_counter_period = 1; + break; + + case 0x5d: + new_exponential_counter_period = 2; + break; + + case 0x36: + new_exponential_counter_period = 4; + break; + + case 0x1a: + new_exponential_counter_period = 8; + break; + + case 0x0e: + new_exponential_counter_period = 16; + break; + + case 0x06: + new_exponential_counter_period = 30; + break; + } +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/ExternalFilter.cpp dosbox-staging-0.77.0/src/libs/residfp/ExternalFilter.cpp --- dosbox-staging-0.76.0/src/libs/residfp/ExternalFilter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/ExternalFilter.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define EXTERNALFILTER_CPP + +#include "ExternalFilter.h" + +namespace reSIDfp +{ + +/** + * Get the 3 dB attenuation point. + * + * @param res the resistance value in Ohms + * @param cap the capacitance value in Farads + */ +inline double getRC(double res, double cap) +{ + return res * cap; +} + +ExternalFilter::ExternalFilter() : + w0lp_1_s7(0), + w0hp_1_s17(0) +{ + reset(); +} + +void ExternalFilter::setClockFrequency(double frequency) +{ + const double dt = 1. / frequency; + + // Low-pass: R = 10kOhm, C = 1000pF; w0l = dt/(dt+RC) = 1e-6/(1e-6+1e4*1e-9) = 0.091 + // Cutoff 1/2*PI*RC = 1/2*PI*1e4*1e-9 = 15915.5 Hz + w0lp_1_s7 = static_cast((dt / (dt + getRC(10e3, 1000e-12))) * (1 << 7) + 0.5); + + // High-pass: R = 10kOhm, C = 10uF; w0h = dt/(dt+RC) = 1e-6/(1e-6+1e4*1e-5) = 0.00000999 + // Cutoff 1/2*PI*RC = 1/2*PI*1e4*1e-5 = 1.59155 Hz + w0hp_1_s17 = static_cast((dt / (dt + getRC(10e3, 10e-6))) * (1 << 17) + 0.5); +} + +void ExternalFilter::reset() +{ + // State of filter. + Vlp = 0; //1 << (15 + 11); + Vhp = 0; +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/ExternalFilter.h dosbox-staging-0.77.0/src/libs/residfp/ExternalFilter.h --- dosbox-staging-0.76.0/src/libs/residfp/ExternalFilter.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/ExternalFilter.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef EXTERNALFILTER_H +#define EXTERNALFILTER_H + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +/** + * The audio output stage in a Commodore 64 consists of two STC networks, a + * low-pass filter with 3 dB frequency 16kHz followed by a DC-blocker which + * acts as a high-pass filter with a cutoff dependent on the attached audio + * equipment impedance. Here we suppose an impedance of 10kOhm resulting + * in a 3 dB attenuation at 1.6Hz. + * + * ~~~ + * 9/12V + * -----+ + * audio| 10k | + * +---o----R---o--------o-----(K) +----- + * out | | | | | |audio + * -----+ R 1k C 1000 | | 10 uF | + * | | pF +-C----o-----C-----+ 10k + * 470 | | + * GND GND pF R 1K | amp + * * | +----- + * + * GND + * ~~~ + * + * The STC networks are connected with a [BJT] based [common collector] + * used as a voltage follower (featuring a 2SC1815 NPN transistor). + * * The C64c board additionally includes a [bootstrap] condenser to increase + * the input impedance of the common collector. + * + * [BJT]: https://en.wikipedia.org/wiki/Bipolar_junction_transistor + * [common collector]: https://en.wikipedia.org/wiki/Common_collector + * [bootstrap]: https://en.wikipedia.org/wiki/Bootstrapping_(electronics) + */ +class ExternalFilter +{ +private: + /// Lowpass filter voltage + int Vlp = 0; + + /// Highpass filter voltage + int Vhp = 0; + + int w0lp_1_s7 = 0; + + int w0hp_1_s17 = 0; + +public: + /** + * SID clocking. + * + * @param input + */ + int clock(unsigned short input); + + /** + * Constructor. + */ + ExternalFilter(); + + /** + * Setup of the external filter sampling parameters. + * + * @param frequency + */ + void setClockFrequency(double frequency); + + /** + * SID reset. + */ + void reset(); +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(EXTERNALFILTER_CPP) + +namespace reSIDfp +{ + +RESID_INLINE +int ExternalFilter::clock(unsigned short input) +{ + const int Vi = (static_cast(input)<<11) - (1 << (11+15)); + const int dVlp = (w0lp_1_s7 * (Vi - Vlp) >> 7); + const int dVhp = (w0hp_1_s17 * (Vlp - Vhp) >> 17); + Vlp += dVlp; + Vhp += dVhp; + return (Vlp - Vhp) >> 11; +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Filter6581.cpp dosbox-staging-0.77.0/src/libs/residfp/Filter6581.cpp --- dosbox-staging-0.76.0/src/libs/residfp/Filter6581.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Filter6581.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define FILTER6581_CPP + +#include "Filter6581.h" + +#include "Integrator6581.h" + +namespace reSIDfp +{ + +Filter6581::~Filter6581() +{ + delete [] f0_dac; +} + +void Filter6581::updatedCenterFrequency() +{ + const unsigned short Vw = f0_dac[fc]; + hpIntegrator->setVw(Vw); + bpIntegrator->setVw(Vw); +} + +void Filter6581::updatedMixing() +{ + currentGain = gain[vol]; + + unsigned int ni = 0; + unsigned int no = 0; + + (filt1 ? ni : no)++; + (filt2 ? ni : no)++; + + if (filt3) ni++; + else if (!voice3off) no++; + + (filtE ? ni : no)++; + + currentSummer = summer[ni]; + + if (lp) no++; + if (bp) no++; + if (hp) no++; + + currentMixer = mixer[no]; +} + +void Filter6581::setFilterCurve(double curvePosition) +{ + delete [] f0_dac; + f0_dac = FilterModelConfig6581::getInstance()->getDAC(curvePosition); + updatedCenterFrequency(); +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Filter6581.h dosbox-staging-0.77.0/src/libs/residfp/Filter6581.h --- dosbox-staging-0.76.0/src/libs/residfp/Filter6581.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Filter6581.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,424 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef FILTER6581_H +#define FILTER6581_H + +#include "siddefs-fp.h" + +#include + +#include "Filter.h" +#include "FilterModelConfig6581.h" + +namespace reSIDfp +{ + +class Integrator6581; + +/** + * The SID filter is modeled with a two-integrator-loop biquadratic filter, + * which has been confirmed by Bob Yannes to be the actual circuit used in + * the SID chip. + * + * Measurements show that excellent emulation of the SID filter is achieved, + * except when high resonance is combined with high sustain levels. + * In this case the SID op-amps are performing less than ideally and are + * causing some peculiar behavior of the SID filter. This however seems to + * have more effect on the overall amplitude than on the color of the sound. + * + * The theory for the filter circuit can be found in "Microelectric Circuits" + * by Adel S. Sedra and Kenneth C. Smith. + * The circuit is modeled based on the explanation found there except that + * an additional inverter is used in the feedback from the bandpass output, + * allowing the summer op-amp to operate in single-ended mode. This yields + * filter outputs with levels independent of Q, which corresponds with the + * results obtained from a real SID. + * + * We have been able to model the summer and the two integrators of the circuit + * to form components of an IIR filter. + * Vhp is the output of the summer, Vbp is the output of the first integrator, + * and Vlp is the output of the second integrator in the filter circuit. + * + * According to Bob Yannes, the active stages of the SID filter are not really + * op-amps. Rather, simple NMOS inverters are used. By biasing an inverter + * into its region of quasi-linear operation using a feedback resistor from + * input to output, a MOS inverter can be made to act like an op-amp for + * small signals centered around the switching threshold. + * + * In 2008, Michael Huth facilitated closer investigation of the SID 6581 + * filter circuit by publishing high quality microscope photographs of the die. + * Tommi Lempinen has done an impressive work on re-vectorizing and annotating + * the die photographs, substantially simplifying further analysis of the + * filter circuit. + * + * The filter schematics below are reverse engineered from these re-vectorized + * and annotated die photographs. While the filter first depicted in reSID 0.9 + * is a correct model of the basic filter, the schematics are now completed + * with the audio mixer and output stage, including details on intended + * relative resistor values. Also included are schematics for the NMOS FET + * voltage controlled resistors (VCRs) used to control cutoff frequency, the + * DAC which controls the VCRs, the NMOS op-amps, and the output buffer. + * + * + * SID filter / mixer / output + * --------------------------- + * ~~~ + * +---------------------------------------------------+ + * | | + * | +--1R1-- \--+ D7 | + * | +---R1--+ | | | + * | | | o--2R1-- \--o D6 | + * | +---------o----o--Rw--o--[A>--o--Rw--o--[A>--o + * ve (EXT IN) | | | | + * D3 \ ---------------R8--o | | (CAP2A) | (CAP1A) + * | v3 | | vhp | vbp | vlp + * D2 | \ -----------R8--o +-----+ | | + * | | v2 | | | | + * D1 | | \ -------R8--o | +----------------+ | + * | | | v1 | | | | + * D0 | | | \ ---R8--+ | | +---------------------------+ + * | | | | | | | + * R6 R6 R6 R6 R6 R6 R6 + * | | | | $18 | | | $18 + * | \ | | D7: 1=open \ \ \ D6 - D4: 0=open + * | | | | | | | + * +---o---o---o-------------o---o---+ 12V + * | + * | D3 +--/ --1R2--+ | + * | +---R8--+ | | +---R2--+ | + * | | | D2 o--/ --2R2--o | | ||--+ + * +---o--[A>--o------o o--o--[A>--o--|| + * D1 o--/ --4R2--o (4.25R2) ||--+ + * $18 | | | + * 0=open D0 +--/ --8R2--+ (8.75R2) | + * + * vo (AUDIO + * OUT) + * + * + * v1 - voice 1 + * v2 - voice 2 + * v3 - voice 3 + * ve - ext in + * vhp - highpass output + * vbp - bandpass output + * vlp - lowpass output + * vo - audio out + * [A> - single ended inverting op-amp (self-biased NMOS inverter) + * Rn - "resistors", implemented with custom NMOS FETs + * Rw - cutoff frequency resistor (VCR) + * C - capacitor + * ~~~ + * Notes: + * + * R2 ~ 2.0*R1 + * R6 ~ 6.0*R1 + * R8 ~ 8.0*R1 + * R24 ~ 24.0*R1 + * + * The Rn "resistors" in the circuit are implemented with custom NMOS FETs, + * probably because of space constraints on the SID die. The silicon substrate + * is laid out in a narrow strip or "snake", with a strip length proportional + * to the intended resistance. The polysilicon gate electrode covers the entire + * silicon substrate and is fixed at 12V in order for the NMOS FET to operate + * in triode mode (a.k.a. linear mode or ohmic mode). + * + * Even in "linear mode", an NMOS FET is only an approximation of a resistor, + * as the apparant resistance increases with increasing drain-to-source + * voltage. If the drain-to-source voltage should approach the gate voltage + * of 12V, the NMOS FET will enter saturation mode (a.k.a. active mode), and + * the NMOS FET will not operate anywhere like a resistor. + * + * + * + * NMOS FET voltage controlled resistor (VCR) + * ------------------------------------------ + * ~~~ + * Vw + * + * | + * | + * R1 + * | + * +--R1--o + * | __|__ + * | ----- + * | | | + * vi -----o----+ +--o----- vo + * | | + * +----R24----+ + * + * + * vi - input + * vo - output + * Rn - "resistors", implemented with custom NMOS FETs + * Vw - voltage from 11-bit DAC (frequency cutoff control) + * ~~~ + * Notes: + * + * An approximate value for R24 can be found by using the formula for the + * filter cutoff frequency: + * + * FCmin = 1/(2*pi*Rmax*C) + * + * Assuming that a the setting for minimum cutoff frequency in combination with + * a low level input signal ensures that only negligible current will flow + * through the transistor in the schematics above, values for FCmin and C can + * be substituted in this formula to find Rmax. + * Using C = 470pF and FCmin = 220Hz (measured value), we get: + * + * FCmin = 1/(2*pi*Rmax*C) + * Rmax = 1/(2*pi*FCmin*C) = 1/(2*pi*220*470e-12) ~ 1.5MOhm + * + * From this it follows that: + * R24 = Rmax ~ 1.5MOhm + * R1 ~ R24/24 ~ 64kOhm + * R2 ~ 2.0*R1 ~ 128kOhm + * R6 ~ 6.0*R1 ~ 384kOhm + * R8 ~ 8.0*R1 ~ 512kOhm + * + * Note that these are only approximate values for one particular SID chip, + * due to process variations the values can be substantially different in + * other chips. + * + * + * + * Filter frequency cutoff DAC + * --------------------------- + * + * ~~~ + * 12V 10 9 8 7 6 5 4 3 2 1 0 VGND + * | | | | | | | | | | | | | Missing + * 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R termination + * | | | | | | | | | | | | | + * Vw --o-R-o-R-o-R-o-R-o-R-o-R-o-R-o-R-o-R-o-R-o-R-o- -+ + * + * + * Bit on: 12V + * Bit off: 5V (VGND) + * ~~~ + * As is the case with all MOS 6581 DACs, the termination to (virtual) ground + * at bit 0 is missing. + * + * Furthermore, the control of the two VCRs imposes a load on the DAC output + * which varies with the input signals to the VCRs. This can be seen from the + * VCR figure above. + * + * + * + * "Op-amp" (self-biased NMOS inverter) + * ------------------------------------ + * ~~~ + * + * 12V + * + * | + * +-----------o + * | | + * | +------o + * | | | + * | | ||--+ + * | +--|| + * | ||--+ + * ||--+ | + * vi -----|| o---o----- vo + * ||--+ | | + * | ||--+ | + * |-------|| | + * | ||--+ | + * ||--+ | | + * +--|| | | + * | ||--+ | | + * | | | | + * | +-----------o | + * | | | + * | | + * | GND | + * | | + * +----------------------+ + * + * + * vi - input + * vo - output + * ~~~ + * Notes: + * + * The schematics above are laid out to show that the "op-amp" logically + * consists of two building blocks; a saturated load NMOS inverter (on the + * right hand side of the schematics) with a buffer / bias input stage + * consisting of a variable saturated load NMOS inverter (on the left hand + * side of the schematics). + * + * Provided a reasonably high input impedance and a reasonably low output + * impedance, the "op-amp" can be modeled as a voltage transfer function + * mapping input voltage to output voltage. + * + * + * + * Output buffer (NMOS voltage follower) + * ------------------------------------- + * ~~~ + * + * 12V + * + * | + * | + * ||--+ + * vi -----|| + * ||--+ + * | + * o------ vo + * | (AUDIO + * Rext OUT) + * | + * | + * + * GND + * + * vi - input + * vo - output + * Rext - external resistor, 1kOhm + * ~~~ + * Notes: + * + * The external resistor Rext is needed to complete the NMOS voltage follower, + * this resistor has a recommended value of 1kOhm. + * + * Die photographs show that actually, two NMOS transistors are used in the + * voltage follower. However the two transistors are coupled in parallel (all + * terminals are pairwise common), which implies that we can model the two + * transistors as one. + */ +class Filter6581 final : public Filter +{ +private: + const unsigned short* f0_dac = nullptr; + + unsigned short** mixer = {}; + unsigned short** summer = {}; + unsigned short** gain = {}; + + const int voiceScaleS11 = 0; + const int voiceDC = 0; + + /// VCR + associated capacitor connected to highpass output. + std::unique_ptr const hpIntegrator = {}; + + /// VCR + associated capacitor connected to bandpass output. + std::unique_ptr const bpIntegrator = {}; + +protected: + /** + * Set filter cutoff frequency. + */ + void updatedCenterFrequency() override; + + /** + * Set filter resonance. + * + * In the MOS 6581, 1/Q is controlled linearly by res. + */ + void updateResonance(unsigned char res) override { currentResonance = gain[~res & 0xf]; } + + void updatedMixing() override; + +public: + Filter6581() : + f0_dac(FilterModelConfig6581::getInstance()->getDAC(0.5)), + mixer(FilterModelConfig6581::getInstance()->getMixer()), + summer(FilterModelConfig6581::getInstance()->getSummer()), + gain(FilterModelConfig6581::getInstance()->getGain()), + voiceScaleS11(FilterModelConfig6581::getInstance()->getVoiceScaleS11()), + voiceDC(FilterModelConfig6581::getInstance()->getVoiceDC()), + hpIntegrator(FilterModelConfig6581::getInstance()->buildIntegrator()), + bpIntegrator(FilterModelConfig6581::getInstance()->buildIntegrator()) + { + input(0); + } + + ~Filter6581(); + Filter6581(const Filter6581&) = delete; // prevent copy + Filter6581 &operator=(const Filter6581&) = delete; // prevent assignment + + + unsigned short clock(int voice1, int voice2, int voice3) override; + + void input(int sample) override { ve = (sample * voiceScaleS11 * 3 >> 11) + mixer[0][0]; } + + /** + * Set filter curve type based on single parameter. + * + * @param curvePosition 0 .. 1, where 0 sets center frequency high ("light") and 1 sets it low ("dark"), default is 0.5 + */ + void setFilterCurve(double curvePosition); +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(FILTER6581_CPP) + +#include "Integrator6581.h" + +namespace reSIDfp +{ + +RESID_INLINE +unsigned short Filter6581::clock(int voice1, int voice2, int voice3) +{ + voice1 = (voice1 * voiceScaleS11 >> 15) + voiceDC; + voice2 = (voice2 * voiceScaleS11 >> 15) + voiceDC; + // Voice 3 is silenced by voice3off if it is not routed through the filter. + voice3 = (filt3 || !voice3off) ? (voice3 * voiceScaleS11 >> 15) + voiceDC : 0; + + int Vi = 0; + int Vo = 0; + + (filt1 ? Vi : Vo) += voice1; + (filt2 ? Vi : Vo) += voice2; + (filt3 ? Vi : Vo) += voice3; + (filtE ? Vi : Vo) += ve; + + Vhp = currentSummer[currentResonance[Vbp] + Vlp + Vi]; + Vbp = hpIntegrator->solve(Vhp); + Vlp = bpIntegrator->solve(Vbp); + + if (lp) Vo += Vlp; + if (bp) Vo += Vbp; + if (hp) Vo += Vhp; + + return currentGain[currentMixer[Vo]]; +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Filter8580.cpp dosbox-staging-0.77.0/src/libs/residfp/Filter8580.cpp --- dosbox-staging-0.76.0/src/libs/residfp/Filter8580.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Filter8580.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,101 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2019 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define FILTER8580_CPP + +#include "Filter8580.h" + +#include "Integrator8580.h" + +namespace reSIDfp +{ + +/** + * W/L ratio of frequency DAC bit 0, + * other bit are proportional. + * When no bit are selected a resistance with half + * W/L ratio is selected. + */ +const double DAC_WL0 = 0.00615; + +Filter8580::~Filter8580() {} + +void Filter8580::updatedCenterFrequency() +{ + double wl; + double dacWL = DAC_WL0; + if (fc) + { + wl = 0.; + for (unsigned int i = 0; i < 11; i++) + { + if (fc & (1 << i)) + { + wl += dacWL; + } + dacWL *= 2; + } + } + else + { + wl = dacWL/2.; + } + + hpIntegrator->setFc(wl); + bpIntegrator->setFc(wl); +} + +void Filter8580::updatedMixing() +{ + currentGain = gain_vol[vol]; + + unsigned int ni = 0; + unsigned int no = 0; + + (filt1 ? ni : no)++; + (filt2 ? ni : no)++; + + if (filt3) ni++; + else if (!voice3off) no++; + + (filtE ? ni : no)++; + + currentSummer = summer[ni]; + + if (lp) no++; + if (bp) no++; + if (hp) no++; + + currentMixer = mixer[no]; +} + +void Filter8580::setFilterCurve(double curvePosition) +{ + // Adjust cp + // 1.2 <= cp <= 1.8 + cp = 1.8 - curvePosition * 3./5.; + + hpIntegrator->setV(cp); + bpIntegrator->setV(cp); +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Filter8580.h dosbox-staging-0.77.0/src/libs/residfp/Filter8580.h --- dosbox-staging-0.76.0/src/libs/residfp/Filter8580.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Filter8580.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,383 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef FILTER8580_H +#define FILTER8580_H + +#include "siddefs-fp.h" + +#include + +#include "Filter.h" +#include "FilterModelConfig8580.h" +#include "Integrator8580.h" + +namespace reSIDfp +{ + +class Integrator8580; + +/** + * Filter for 8580 chip + * -------------------- + * The 8580 filter stage had been redesigned to be more linear and robust + * against temperature change. It also features real op-amps and a + * revisited resonance model. + * The filter schematics below are reverse engineered from re-vectorized + * and annotated die photographs. Credits to Michael Huth for the microscope + * photographs of the die, Tommi Lempinen for re-vectorizating and annotating + * the images and ttlworks from forum.6502.org for the circuit analysis. + * + * ~~~ + * + * +---------------------------------------------------+ + * | $17 +----Rf-+ | + * | | | | + * | D4&!D5 o- \-R3-o | + * | | | $17 | + * | !D4&!D5 o- \-R2-o | + * | | | +---R8-- \--+ !D6&D7 | + * | D4&!D5 o- \-R1-o | | | + * | | | o---RC-- \--o D6&D7 | + * | +---------o----o--Rfc-o--[A>--o--Rfc-o--[A>--o + * ve (EXT IN) | | | | + * D3 \ --------------R12--o | | (CAP2A) | (CAP1A) + * | v3 | | vhp | vbp | vlp + * D2 | \ -----------R7--o +-----+ | | + * | | v2 | | | | + * D1 | | \ -------R7--o | +----------------+ | + * | | | v1 | | | | + * D0 | | | \ ---R7--+ | | +---------------------------+ + * | | | | | | | + * R9 R5 R5 R5 R5 R5 R5 + * | | | | $18 | | | $18 + * | \ | | D7: 1=open \ \ \ D6 - D4: 0=open + * | | | | | | | + * +---o---o---o-------------o---o---+ + * | + * | D3 +--/ --1R4--+ + * | +---R8--+ | | +---R2--+ + * | | | D2 o--/ --2R4--o | | + * +---o--[A>--o------o o--o--[A>--o-- vo (AUDIO OUT) + * D1 o--/ --4R4--o + * $18 | | + * 0=open D0 +--/ --8R4--+ + * + * + * + * Resonance + * --------- + * For resonance, we have two tiny DACs that controls both the input + * and feedback resistances. + * + * The "resistors" are switched in as follows by bits in register $17: + * + * feedback: + * R1: bit4&!bit5 + * R2: !bit4&bit5 + * R3: bit4&bit5 + * Rf: always on + * + * input: + * R4: bit6&!bit7 + * R8: !bit6&bit7 + * RC: bit6&bit7 + * Ri: !(R4|R8|RC) = !(bit6|bit7) = !bit6&!bit7 + * + * + * The relative "resistor" values are approximately (using channel length): + * + * R1 = 15.3*Ri + * R2 = 7.3*Ri + * R3 = 4.7*Ri + * Rf = 1.4*Ri + * R4 = 1.4*Ri + * R8 = 2.0*Ri + * RC = 2.8*Ri + * + * + * Approximate values for 1/Q can now be found as follows (assuming an + * ideal op-amp): + * + * res feedback input -gain (1/Q) + * --- -------- ----- ---------- + * 0 Rf Ri Rf/Ri = 1/(Ri*(1/Rf)) = 1/0.71 + * 1 Rf|R1 Ri (Rf|R1)/Ri = 1/(Ri*(1/Rf+1/R1)) = 1/0.78 + * 2 Rf|R2 Ri (Rf|R2)/Ri = 1/(Ri*(1/Rf+1/R2)) = 1/0.85 + * 3 Rf|R3 Ri (Rf|R3)/Ri = 1/(Ri*(1/Rf+1/R3)) = 1/0.92 + * 4 Rf R4 Rf/R4 = 1/(R4*(1/Rf)) = 1/1.00 + * 5 Rf|R1 R4 (Rf|R1)/R4 = 1/(R4*(1/Rf+1/R1)) = 1/1.10 + * 6 Rf|R2 R4 (Rf|R2)/R4 = 1/(R4*(1/Rf+1/R2)) = 1/1.20 + * 7 Rf|R3 R4 (Rf|R3)/R4 = 1/(R4*(1/Rf+1/R3)) = 1/1.30 + * 8 Rf R8 Rf/R8 = 1/(R8*(1/Rf)) = 1/1.43 + * 9 Rf|R1 R8 (Rf|R1)/R8 = 1/(R8*(1/Rf+1/R1)) = 1/1.56 + * A Rf|R2 R8 (Rf|R2)/R8 = 1/(R8*(1/Rf+1/R2)) = 1/1.70 + * B Rf|R3 R8 (Rf|R3)/R8 = 1/(R8*(1/Rf+1/R3)) = 1/1.86 + * C Rf RC Rf/RC = 1/(RC*(1/Rf)) = 1/2.00 + * D Rf|R1 RC (Rf|R1)/RC = 1/(RC*(1/Rf+1/R1)) = 1/2.18 + * E Rf|R2 RC (Rf|R2)/RC = 1/(RC*(1/Rf+1/R2)) = 1/2.38 + * F Rf|R3 RC (Rf|R3)/RC = 1/(RC*(1/Rf+1/R3)) = 1/2.60 + * + * + * These data indicate that the following function for 1/Q has been + * modeled in the MOS 8580: + * + * 1/Q = 2^(1/2)*2^(-x/8) = 2^(1/2 - x/8) = 2^((4 - x)/8) + * + * + * + * Op-amps + * ------- + * Unlike the 6581, the 8580 has real OpAmps. + * + * Temperature compensated differential amplifier: + * + * 9V + * + * | + * +-------o-o-o-------+ + * | | | | + * | R R | + * +--|| | | ||--+ + * ||---o o---|| + * +--|| | | ||--+ + * | | | | + * o-----+ | | o--- Va + * | | | | | + * +--|| | | | ||--+ + * ||-o-+---+---|| + * +--|| | | ||--+ + * | | | | + * | | + * GND | | GND + * ||--+ +--|| + * in- -----|| ||------ in+ + * ||----o----|| + * | + * 8 Current sink + * | + * + * GND + * + * Inverter + non-inverting output amplifier: + * + * Va ---o---||-------------------o--------------------+ + * | | 9V | + * | +----------+----------+ | | + * | 9V | | 9V | ||--+ | + * | | | 9V | | +-|| | + * | R | | | ||--+ ||--+ | + * | | | ||--+ +--|| o---o--- Vout + * | o---o---|| ||--+ ||--+ + * | | ||--+ o-----|| + * | ||--+ | ||--+ ||--+ + * +-----|| o-----|| | + * ||--+ | ||--+ + * | R | GND + * | + * GND GND + * GND + * + * + * + * Virtual ground + * -------------- + * A PolySi resitive voltage divider provides the voltage + * for the positive input of the filter op-amps. + * + * 5V + * +----------+ + * | | |\ | + * R1 +---|-\ | + * 5V | |A >---o--- Vref + * o-------|+/ + * | | |/ + * R10 R4 + * | | + * o---+ + * | + * R10 + * | + * + * GND + * + * Rn = n*R1 + * + * + * + * Rfc - freq control DAC resistance ladder + * ---------------------------------------- + * The 8580 has 11 bits for frequency control, but 12 bit DACs. + * If those 11 bits would be '0', the impedance of the DACs would be "infinitely high". + * To get around this, there is an 11 input NOR gate below the DACs sensing those 11 bits. + * If all are 0, the NOR gate gives the gate control voltage to the 12 bit DAC LSB. + * + * ----o---o--...--o---o---o--- + * | | | | | + * Rb10 Rb9 ... Rb1 Rb0 R0 + * | | | | | + * ----o---o--...--o---o---o--- + * + * + * + * Crystal stabilized precision switched capacitor voltage divider + * --------------------------------------------------------------- + * There is a FET working as a temperature sensor close to the DACs which changes the gate voltage + * of the frequency control DACs according to the temperature of the DACs, + * to reduce the effects of temperature on the filter curve. + * An asynchronous 3 bit binary counter, running at the speed of PHI2, drives two big capacitors + * whose AC resistance is then used as a voltage divider. + * This implicates that frequency difference between PAL and NTSC might shift the filter curve by 4% or such. + * + * |\ OpAmp has a smaller capacitor than the other OPs + * Vref ---|+\ + * |A >---o--- Vdac + * +-------|-/ | + * | |/ | + * | | + * C1 | C2 | + * +---||---o---+ +---o-----||-------o + * | | | | | | + * o----+ | ----- | | + * | | | ----- +----+ +-----o + * | ----- | | | | + * | ----- | ----- | + * | | | ----- | + * | +-----------+ | | + * | /Q Q | +-------+ + * GND +-----------+ FET close to DAC + * | clk/8 | working as temperature sensor + * +-----------+ + */ +class Filter8580 final : public Filter +{ +private: + unsigned short** mixer = {}; + unsigned short** summer = {}; + unsigned short** gain_res = {}; + unsigned short** gain_vol = {}; + + const int voiceScaleS11 = 0; + const int voiceDC = 0; + + double cp = 0.0; + + /// VCR + associated capacitor connected to highpass output. + std::unique_ptr const hpIntegrator = {}; + + /// VCR + associated capacitor connected to bandpass output. + std::unique_ptr const bpIntegrator = {}; + +protected: + /** + * Set filter cutoff frequency. + */ + void updatedCenterFrequency() override; + + /** + * Set filter resonance. + * + * @param res the new resonance value + */ + void updateResonance(unsigned char res) override { currentResonance = gain_res[res]; } + + void updatedMixing() override; + +public: + Filter8580() : + mixer(FilterModelConfig8580::getInstance()->getMixer()), + summer(FilterModelConfig8580::getInstance()->getSummer()), + gain_res(FilterModelConfig8580::getInstance()->getGainRes()), + gain_vol(FilterModelConfig8580::getInstance()->getGainVol()), + voiceScaleS11(FilterModelConfig8580::getInstance()->getVoiceScaleS11()), + voiceDC(FilterModelConfig8580::getInstance()->getVoiceDC()), + cp(0.5), + hpIntegrator(FilterModelConfig8580::getInstance()->buildIntegrator()), + bpIntegrator(FilterModelConfig8580::getInstance()->buildIntegrator()) + { + setFilterCurve(cp); + input(0); + } + + ~Filter8580(); + Filter8580(const Filter8580&) = delete; // prevent copy + Filter8580 &operator=(const Filter8580&) = delete; // prevent assignment + + unsigned short clock(int voice1, int voice2, int voice3) override; + + void input(int sample) override { ve = (sample * voiceScaleS11 * 3 >> 11) + mixer[0][0]; } + + /** + * Set filter curve type based on single parameter. + * + * @param curvePosition 0 .. 1, where 0 sets center frequency high ("light") and 1 sets it low ("dark"), default is 0.5 + */ + void setFilterCurve(double curvePosition); +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(FILTER8580_CPP) + +namespace reSIDfp +{ + +RESID_INLINE +unsigned short Filter8580::clock(int voice1, int voice2, int voice3) +{ + voice1 = (voice1 * voiceScaleS11 >> 15) + voiceDC; + voice2 = (voice2 * voiceScaleS11 >> 15) + voiceDC; + // Voice 3 is silenced by voice3off if it is not routed through the filter. + voice3 = (filt3 || !voice3off) ? (voice3 * voiceScaleS11 >> 15) + voiceDC : 0; + + int Vi = 0; + int Vo = 0; + + (filt1 ? Vi : Vo) += voice1; + (filt2 ? Vi : Vo) += voice2; + (filt3 ? Vi : Vo) += voice3; + (filtE ? Vi : Vo) += ve; + + Vhp = currentSummer[currentResonance[Vbp] + Vlp + Vi]; + Vbp = hpIntegrator->solve(Vhp); + Vlp = bpIntegrator->solve(Vbp); + + if (lp) Vo += Vlp; + if (bp) Vo += Vbp; + if (hp) Vo += Vhp; + + return currentGain[currentMixer[Vo]]; +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Filter.cpp dosbox-staging-0.77.0/src/libs/residfp/Filter.cpp --- dosbox-staging-0.76.0/src/libs/residfp/Filter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Filter.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,90 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "Filter.h" + +namespace reSIDfp +{ + +void Filter::enable(bool enable) +{ + enabled = enable; + + if (enabled) + { + writeRES_FILT(filt); + } + else + { + filt1 = filt2 = filt3 = filtE = false; + } +} + +void Filter::reset() +{ + writeFC_LO(0); + writeFC_HI(0); + writeMODE_VOL(0); + writeRES_FILT(0); +} + +void Filter::writeFC_LO(unsigned char fc_lo) +{ + fc = (fc & 0x7f8) | (fc_lo & 0x007); + updatedCenterFrequency(); +} + +void Filter::writeFC_HI(unsigned char fc_hi) +{ + fc = (fc_hi << 3 & 0x7f8) | (fc & 0x007); + updatedCenterFrequency(); +} + +void Filter::writeRES_FILT(unsigned char res_filt) +{ + filt = res_filt; + + updateResonance((res_filt >> 4) & 0x0f); + + if (enabled) + { + filt1 = (filt & 0x01) != 0; + filt2 = (filt & 0x02) != 0; + filt3 = (filt & 0x04) != 0; + filtE = (filt & 0x08) != 0; + } + + updatedMixing(); +} + +void Filter::writeMODE_VOL(unsigned char mode_vol) +{ + vol = mode_vol & 0x0f; + lp = (mode_vol & 0x10) != 0; + bp = (mode_vol & 0x20) != 0; + hp = (mode_vol & 0x40) != 0; + voice3off = (mode_vol & 0x80) != 0; + + updatedMixing(); +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Filter.h dosbox-staging-0.77.0/src/libs/residfp/Filter.h --- dosbox-staging-0.76.0/src/libs/residfp/Filter.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Filter.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,181 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2017 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef FILTER_H +#define FILTER_H + +namespace reSIDfp +{ + +/** + * SID filter base class + */ +class Filter +{ +protected: + /// Current volume amplifier setting. + unsigned short* currentGain; + + /// Current filter/voice mixer setting. + unsigned short* currentMixer; + + /// Filter input summer setting. + unsigned short* currentSummer; + + /// Filter resonance value. + unsigned short* currentResonance; + + /// Filter highpass state. + int Vhp; + + /// Filter bandpass state. + int Vbp; + + /// Filter lowpass state. + int Vlp; + + /// Filter external input. + int ve; + + /// Filter cutoff frequency. + unsigned int fc; + + /// Routing to filter or outside filter + bool filt1, filt2, filt3, filtE; + + /// Switch voice 3 off. + bool voice3off; + + /// Highpass, bandpass, and lowpass filter modes. + bool hp, bp, lp; + + /// Current volume. + unsigned char vol; + +private: + /// Filter enabled. + bool enabled; + + /// Selects which inputs to route through filter. + unsigned char filt; + +protected: + /** + * Set filter cutoff frequency. + */ + virtual void updatedCenterFrequency() = 0; + + /** + * Set filter resonance. + */ + virtual void updateResonance(unsigned char res) = 0; + + /** + * Mixing configuration modified (offsets change) + */ + virtual void updatedMixing() = 0; + +public: + Filter() : + currentGain(nullptr), + currentMixer(nullptr), + currentSummer(nullptr), + currentResonance(nullptr), + Vhp(0), + Vbp(0), + Vlp(0), + ve(0), + fc(0), + filt1(false), + filt2(false), + filt3(false), + filtE(false), + voice3off(false), + hp(false), + bp(false), + lp(false), + vol(0), + enabled(true), + filt(0) {} + + virtual ~Filter() {} + + Filter(const Filter&) = delete; // prevent copy + + Filter &operator=(const Filter&) = delete; // prevent assignment + + /** + * SID clocking - 1 cycle + * + * @param v1 voice 1 in + * @param v2 voice 2 in + * @param v3 voice 3 in + * @return filtered output + */ + virtual unsigned short clock(int v1, int v2, int v3) = 0; + + /** + * Enable filter. + * + * @param enable + */ + void enable(bool enable); + + /** + * SID reset. + */ + void reset(); + + /** + * Write Frequency Cutoff Low register. + * + * @param fc_lo Frequency Cutoff Low-Byte + */ + void writeFC_LO(unsigned char fc_lo); + + /** + * Write Frequency Cutoff High register. + * + * @param fc_hi Frequency Cutoff High-Byte + */ + void writeFC_HI(unsigned char fc_hi); + + /** + * Write Resonance/Filter register. + * + * @param res_filt Resonance/Filter + */ + void writeRES_FILT(unsigned char res_filt); + + /** + * Write filter Mode/Volume register. + * + * @param mode_vol Filter Mode/Volume + */ + void writeMODE_VOL(unsigned char mode_vol); + + virtual void input(int input) = 0; +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig6581.cpp dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig6581.cpp --- dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig6581.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig6581.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,317 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "FilterModelConfig6581.h" + +#include +#include + +#include "Integrator6581.h" +#include "OpAmp.h" + +namespace reSIDfp +{ + +/** + * Compute log(1+x) without losing precision for small values of x + * + * @note when compiling with -ffastm-math the compiler will + * optimize the expression away leaving a plain log(1. + x) + */ +inline double log1p(double x) +{ + return log(1. + x) - (((1. + x) - 1.) - x) / (1. + x); +} + +const unsigned int OPAMP_SIZE = 33; + +/** + * This is the SID 6581 op-amp voltage transfer function, measured on + * CAP1B/CAP1A on a chip marked MOS 6581R4AR 0687 14. + * All measured chips have op-amps with output voltages (and thus input + * voltages) within the range of 0.81V - 10.31V. + */ +const Spline::Point opamp_voltage[OPAMP_SIZE] = +{ + { 0.81, 10.31 }, // Approximate start of actual range + { 2.40, 10.31 }, + { 2.60, 10.30 }, + { 2.70, 10.29 }, + { 2.80, 10.26 }, + { 2.90, 10.17 }, + { 3.00, 10.04 }, + { 3.10, 9.83 }, + { 3.20, 9.58 }, + { 3.30, 9.32 }, + { 3.50, 8.69 }, + { 3.70, 8.00 }, + { 4.00, 6.89 }, + { 4.40, 5.21 }, + { 4.54, 4.54 }, // Working point (vi = vo) + { 4.60, 4.19 }, + { 4.80, 3.00 }, + { 4.90, 2.30 }, // Change of curvature + { 4.95, 2.03 }, + { 5.00, 1.88 }, + { 5.05, 1.77 }, + { 5.10, 1.69 }, + { 5.20, 1.58 }, + { 5.40, 1.44 }, + { 5.60, 1.33 }, + { 5.80, 1.26 }, + { 6.00, 1.21 }, + { 6.40, 1.12 }, + { 7.00, 1.02 }, + { 7.50, 0.97 }, + { 8.50, 0.89 }, + { 10.00, 0.81 }, + { 10.31, 0.81 }, // Approximate end of actual range +}; + +std::unique_ptr FilterModelConfig6581::instance(nullptr); + +FilterModelConfig6581* FilterModelConfig6581::getInstance() +{ + if (!instance.get()) + { + instance.reset(new FilterModelConfig6581()); + } + + return instance.get(); +} + +FilterModelConfig6581::FilterModelConfig6581() : + voice_voltage_range(1.5), + voice_DC_voltage(5.0), + C(470e-12), + Vdd(12.18), + Vth(1.31), + Ut(26.0e-3), + uCox(20e-6), + WL_vcr(9.0 / 1.0), + WL_snake(1.0 / 115.0), + Vddt(Vdd - Vth), + dac_zero(6.65), + dac_scale(2.63), + vmin(opamp_voltage[0].x), + vmax(Vddt < opamp_voltage[0].y ? opamp_voltage[0].y : Vddt), + denorm(vmax - vmin), + norm(1.0 / denorm), + N16(norm * ((1 << 16) - 1)), + dac(DAC_BITS) +{ + dac.kinkedDac(MOS6581); + + // Convert op-amp voltage transfer to 16 bit values. + + Spline::Point scaled_voltage[OPAMP_SIZE]; + + for (unsigned int i = 0; i < OPAMP_SIZE; i++) + { + scaled_voltage[i].x = N16 * (opamp_voltage[i].x - opamp_voltage[i].y + denorm) / 2.; + scaled_voltage[i].y = N16 * (opamp_voltage[i].x - vmin); + } + + // Create lookup table mapping capacitor voltage to op-amp input voltage: + + Spline s(scaled_voltage, OPAMP_SIZE); + + for (int x = 0; x < (1 << 16); x++) + { + const Spline::Point out = s.evaluate(x); + double tmp = out.x; + if (tmp < 0.) tmp = 0.; + assert(tmp < 65535.5); + opamp_rev[x] = static_cast(tmp + 0.5); + } + + // Create lookup tables for gains / summers. + + OpAmp opampModel(opamp_voltage, OPAMP_SIZE, Vddt); + + // The filter summer operates at n ~ 1, and has 5 fundamentally different + // input configurations (2 - 6 input "resistors"). + // + // Note that all "on" transistors are modeled as one. This is not + // entirely accurate, since the input for each transistor is different, + // and transistors are not linear components. However modeling all + // transistors separately would be extremely costly. + for (int i = 0; i < 5; i++) + { + const int idiv = 2 + i; // 2 - 6 input "resistors". + const int size = idiv << 16; + const double n = idiv; + opampModel.reset(); + summer[i] = new unsigned short[size]; + + for (int vi = 0; vi < size; vi++) + { + const double vin = vmin + vi / N16 / idiv; /* vmin .. vmax */ + const double tmp = (opampModel.solve(n, vin) - vmin) * N16; + assert(tmp > -0.5 && tmp < 65535.5); + summer[i][vi] = static_cast(tmp + 0.5); + } + } + + // The audio mixer operates at n ~ 8/6, and has 8 fundamentally different + // input configurations (0 - 7 input "resistors"). + // + // All "on", transistors are modeled as one - see comments above for + // the filter summer. + for (int i = 0; i < 8; i++) + { + const int idiv = (i == 0) ? 1 : i; + const int size = (i == 0) ? 1 : i << 16; + const double n = i * 8.0 / 6.0; + opampModel.reset(); + mixer[i] = new unsigned short[size]; + + for (int vi = 0; vi < size; vi++) + { + const double vin = vmin + vi / N16 / idiv; /* vmin .. vmax */ + const double tmp = (opampModel.solve(n, vin) - vmin) * N16; + assert(tmp > -0.5 && tmp < 65535.5); + mixer[i][vi] = static_cast(tmp + 0.5); + } + } + + // 4 bit "resistor" ladders in the bandpass resonance gain and the audio + // output gain necessitate 16 gain tables. + // From die photographs of the bandpass and volume "resistor" ladders + // it follows that gain ~ vol/8 and 1/Q ~ ~res/8 (assuming ideal + // op-amps and ideal "resistors"). + for (int n8 = 0; n8 < 16; n8++) + { + const int size = 1 << 16; + const double n = n8 / 8.0; + opampModel.reset(); + gain[n8] = new unsigned short[size]; + + for (int vi = 0; vi < size; vi++) + { + const double vin = vmin + vi / N16; /* vmin .. vmax */ + const double tmp = (opampModel.solve(n, vin) - vmin) * N16; + assert(tmp > -0.5 && tmp < 65535.5); + gain[n8][vi] = static_cast(tmp + 0.5); + } + } + + const double nVddt = N16 * Vddt; + const double nVmin = N16 * vmin; + + for (unsigned int i = 0; i < (1 << 16); i++) + { + // The table index is right-shifted 16 times in order to fit in + // 16 bits; the argument to sqrt is thus multiplied by (1 << 16). + const double Vg = nVddt - sqrt((double)(i << 16)); + const double tmp = Vg - nVmin; + assert(tmp > -0.5 && tmp < 65535.5); + vcr_Vg[i] = static_cast(tmp + 0.5); + } + + // EKV model: + // + // Ids = Is * (if - ir) + // Is = (2 * u*Cox * Ut^2)/k * W/L + // if = ln^2(1 + e^((k*(Vg - Vt) - Vs)/(2*Ut)) + // ir = ln^2(1 + e^((k*(Vg - Vt) - Vd)/(2*Ut)) + + // moderate inversion characteristic current + const double Is = (2. * uCox * Ut * Ut) * WL_vcr; + + // Normalized current factor for 1 cycle at 1MHz. + const double N15 = norm * ((1 << 15) - 1); + const double n_Is = N15 * 1.0e-6 / C * Is; + + // kVgt_Vx = k*(Vg - Vt) - Vx + // I.e. if k != 1.0, Vg must be scaled accordingly. + for (int kVgt_Vx = 0; kVgt_Vx < (1 << 16); kVgt_Vx++) + { + const double log_term = log1p(exp((kVgt_Vx / N16) / (2. * Ut))); + // Scaled by m*2^15 + const double tmp = n_Is * log_term * log_term; + assert(tmp > -0.5 && tmp < 65535.5); + vcr_n_Ids_term[kVgt_Vx] = static_cast(tmp + 0.5); + } +} + +FilterModelConfig6581::~FilterModelConfig6581() +{ + for (int i = 0; i < 5; i++) + { + delete [] summer[i]; + } + + for (int i = 0; i < 8; i++) + { + delete [] mixer[i]; + } + + for (int i = 0; i < 16; i++) + { + delete [] gain[i]; + } +} + +unsigned short* FilterModelConfig6581::getDAC(double adjustment) const +{ + const double dac_zero = getDacZero(adjustment); + + unsigned short* f0_dac = new unsigned short[1 << DAC_BITS]; + + for (unsigned int i = 0; i < (1 << DAC_BITS); i++) + { + const double fcd = dac.getOutput(i); + const double tmp = N16 * (dac_zero + fcd * dac_scale / (1 << DAC_BITS) - vmin); + assert(tmp > -0.5 && tmp < 65535.5); + f0_dac[i] = static_cast(tmp + 0.5); + } + + return f0_dac; +} + +std::unique_ptr FilterModelConfig6581::buildIntegrator() +{ + // Vdd - Vth, normalized so that translated values can be subtracted: + // Vddt - x = (Vddt - t) - (x - t) + double tmp = N16 * (Vddt - vmin); + assert(tmp > -0.5 && tmp < 65535.5); + const unsigned short nVddt = static_cast(tmp + 0.5); + + tmp = N16 * (Vth - vmin); + assert(tmp > -0.5 && tmp < 65535.5); + const unsigned short nVt = static_cast(tmp + 0.5); + + tmp = N16 * vmin; + assert(tmp > -0.5 && tmp < 65535.5); + const unsigned short nVmin = static_cast(tmp + 0.5); + + // Normalized snake current factor, 1 cycle at 1MHz. + // Fit in 5 bits. + tmp = denorm * (1 << 13) * (uCox / 2. * WL_snake * 1.0e-6 / C); + assert(tmp > -0.5 && tmp < 65535.5); + const unsigned short n_snake = static_cast(tmp + 0.5); + + return std::unique_ptr(new Integrator6581(vcr_Vg, vcr_n_Ids_term, opamp_rev, nVddt, nVt, nVmin, n_snake, N16)); +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig6581.h dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig6581.h --- dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig6581.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig6581.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,146 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef FILTERMODELCONFIG6581_H +#define FILTERMODELCONFIG6581_H + +#include + +#include "Dac.h" +#include "Spline.h" + +namespace reSIDfp +{ + +class Integrator6581; + +/** + * Calculate parameters for 6581 filter emulation. + */ +class FilterModelConfig6581 +{ +private: + static const unsigned int DAC_BITS = 11; + +private: + static std::unique_ptr instance; + // This allows access to the private constructor + friend std::unique_ptr::deleter_type; + + const double voice_voltage_range = 0; + const double voice_DC_voltage = 0; + + /// Capacitor value. + const double C = 0; + + /// Transistor parameters. + //@{ + const double Vdd = 0; + const double Vth = 0; ///< Threshold voltage + const double Ut = 0; ///< Thermal voltage: Ut = kT/q = 8.61734315e-5*T ~ 26mV + const double uCox = 0; ///< Transconductance coefficient: u*Cox + const double WL_vcr = 0; ///< W/L for VCR + const double WL_snake = 0; ///< W/L for "snake" + const double Vddt = 0; ///< Vdd - Vth + //@} + + /// DAC parameters. + //@{ + const double dac_zero = 0; + const double dac_scale = 0; + //@} + + // Derived stuff + const double vmin = 0, vmax = 0; + const double denorm = 0, norm = 0; + + /// Fixed point scaling for 16 bit op-amp output. + const double N16 = 0; + + /// Lookup tables for gain and summer op-amps in output stage / filter. + //@{ + unsigned short* mixer[8] = {}; + unsigned short* summer[5] = {}; + unsigned short* gain[16] = {}; + //@} + + /// DAC lookup table + Dac dac; + + /// VCR - 6581 only. + //@{ + unsigned short vcr_Vg[1 << 16] = {}; + unsigned short vcr_n_Ids_term[1 << 16] = {}; + //@} + + /// Reverse op-amp transfer function. + unsigned short opamp_rev[1 << 16] = {}; + +private: + double getDacZero(double adjustment) const { return dac_zero + (1. - adjustment); } + + FilterModelConfig6581(); + ~FilterModelConfig6581(); + FilterModelConfig6581(const FilterModelConfig6581&) = delete; // prevent copy + FilterModelConfig6581 &operator=(const FilterModelConfig6581&) = delete; // prevent assignment + +public: + static FilterModelConfig6581* getInstance(); + + /** + * The digital range of one voice is 20 bits; create a scaling term + * for multiplication which fits in 11 bits. + */ + int getVoiceScaleS11() const { return static_cast((norm * ((1 << 11) - 1)) * voice_voltage_range); } + + /** + * The "zero" output level of the voices. + */ + int getVoiceDC() const { return static_cast(N16 * (voice_DC_voltage - vmin)); } + + unsigned short** getGain() { return gain; } + + unsigned short** getSummer() { return summer; } + + unsigned short** getMixer() { return mixer; } + + /** + * Construct an 11 bit cutoff frequency DAC output voltage table. + * Ownership is transferred to the requester which becomes responsible + * of freeing the object when done. + * + * @param adjustment + * @return the DAC table + */ + unsigned short* getDAC(double adjustment) const; + + /** + * Construct an integrator solver. + * + * @return the integrator + */ + std::unique_ptr buildIntegrator(); +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig8580.cpp dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig8580.cpp --- dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig8580.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig8580.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,277 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "FilterModelConfig8580.h" + +#include + +#include "Integrator8580.h" +#include "OpAmp.h" + +namespace reSIDfp +{ + +/* + * R1 = 15.3*Ri + * R2 = 7.3*Ri + * R3 = 4.7*Ri + * Rf = 1.4*Ri + * R4 = 1.4*Ri + * R8 = 2.0*Ri + * RC = 2.8*Ri + * + * res feedback input + * --- -------- ----- + * 0 Rf Ri + * 1 Rf|R1 Ri + * 2 Rf|R2 Ri + * 3 Rf|R3 Ri + * 4 Rf R4 + * 5 Rf|R1 R4 + * 6 Rf|R2 R4 + * 7 Rf|R3 R4 + * 8 Rf R8 + * 9 Rf|R1 R8 + * A Rf|R2 R8 + * B Rf|R3 R8 + * C Rf RC + * D Rf|R1 RC + * E Rf|R2 RC + * F Rf|R3 RC + */ +const double resGain[16] = +{ + 1.4/1.0, // Rf/Ri 1.4 + ((1.4*15.3)/(1.4+15.3))/1.0, // (Rf|R1)/Ri 1.28263 + ((1.4*7.3)/(1.4+7.3))/1.0, // (Rf|R2)/Ri 1.17471 + ((1.4*4.7)/(1.4+4.7))/1.0, // (Rf|R3)/Ri 1.07869 + 1.4/1.4, // Rf/R4 1 + ((1.4*15.3)/(1.4+15.3))/1.4, // (Rf|R1)/R4 0.916168 + ((1.4*7.3)/(1.4+7.3))/1.4, // (Rf|R2)/R4 0.83908 + ((1.4*4.7)/(1.4+4.7))/1.4, // (Rf|R3)/R4 0.770492 + 1.4/2.0, // Rf/R8 0.7 + ((1.4*15.3)/(1.4+15.3))/2.0, // (Rf|R1)/R8 0.641317 + ((1.4*7.3)/(1.4+7.3))/2.0, // (Rf|R2)/R8 0.587356 + ((1.4*4.7)/(1.4+4.7))/2.0, // (Rf|R3)/R8 0.539344 + 1.4/2.8, // Rf/RC 0.5 + ((1.4*15.3)/(1.4+15.3))/2.8, // (Rf|R1)/RC 0.458084 + ((1.4*7.3)/(1.4+7.3))/2.8, // (Rf|R2)/RC 0.41954 + ((1.4*4.7)/(1.4+4.7))/2.8, // (Rf|R3)/RC 0.385246 +}; + +const unsigned int OPAMP_SIZE = 21; + +/** + * This is the SID 8580 op-amp voltage transfer function, measured on + * CAP1B/CAP1A on a chip marked CSG 8580R5 1690 25. + */ +const Spline::Point opamp_voltage[OPAMP_SIZE] = +{ + { 1.30, 8.91 }, // Approximate start of actual range + { 4.76, 8.91 }, + { 4.77, 8.90 }, + { 4.78, 8.88 }, + { 4.785, 8.86 }, + { 4.79, 8.80 }, + { 4.795, 8.60 }, + { 4.80, 8.25 }, + { 4.805, 7.50 }, + { 4.81, 6.10 }, + { 4.815, 4.05 }, // Change of curvature + { 4.82, 2.27 }, + { 4.825, 1.65 }, + { 4.83, 1.55 }, + { 4.84, 1.47 }, + { 4.85, 1.43 }, + { 4.87, 1.37 }, + { 4.90, 1.34 }, + { 5.00, 1.30 }, + { 5.10, 1.30 }, + { 8.91, 1.30 }, // Approximate end of actual range +}; + +std::unique_ptr FilterModelConfig8580::instance(nullptr); + +FilterModelConfig8580* FilterModelConfig8580::getInstance() +{ + if (!instance.get()) + { + instance.reset(new FilterModelConfig8580()); + } + + return instance.get(); +} + +FilterModelConfig8580::FilterModelConfig8580() : + voice_voltage_range(0.25), // FIXME measure + voice_DC_voltage(4.80), // FIXME was 4.76 + C(22e-9), + Vdd(9.09), + Vth(0.80), + Ut(26.0e-3), + uCox(100e-6), + Vddt(Vdd - Vth), + vmin(opamp_voltage[0].x), + vmax(Vddt < opamp_voltage[0].y ? opamp_voltage[0].y : Vddt), + denorm(vmax - vmin), + norm(1.0 / denorm), + N16(norm * ((1 << 16) - 1)) +{ + // Convert op-amp voltage transfer to 16 bit values. + + Spline::Point scaled_voltage[OPAMP_SIZE]; + + for (unsigned int i = 0; i < OPAMP_SIZE; i++) + { + scaled_voltage[i].x = N16 * (opamp_voltage[i].x - opamp_voltage[i].y + denorm) / 2.; + scaled_voltage[i].y = N16 * (opamp_voltage[i].x - vmin); + } + + // Create lookup table mapping capacitor voltage to op-amp input voltage: + + Spline s(scaled_voltage, OPAMP_SIZE); + + for (int x = 0; x < (1 << 16); x++) + { + const Spline::Point out = s.evaluate(x); + double tmp = out.x; + assert(tmp > -0.5 && tmp < 65535.5); + opamp_rev[x] = static_cast(tmp + 0.5); + } + + // Create lookup tables for gains / summers. + + OpAmp opampModel(opamp_voltage, OPAMP_SIZE, Vddt); + + // The filter summer operates at n ~ 1, and has 5 fundamentally different + // input configurations (2 - 6 input "resistors"). + // + // Note that all "on" transistors are modeled as one. This is not + // entirely accurate, since the input for each transistor is different, + // and transistors are not linear components. However modeling all + // transistors separately would be extremely costly. + for (int i = 0; i < 5; i++) + { + const int idiv = 2 + i; // 2 - 6 input "resistors". + const int size = idiv << 16; + const double n = idiv; + opampModel.reset(); + summer[i] = new unsigned short[size]; + + for (int vi = 0; vi < size; vi++) + { + const double vin = vmin + vi / N16 / idiv; /* vmin .. vmax */ + const double tmp = (opampModel.solve(n, vin) - vmin) * N16; + assert(tmp > -0.5 && tmp < 65535.5); + summer[i][vi] = static_cast(tmp + 0.5); + } + } + + // The audio mixer operates at n ~ 8/5, and has 8 fundamentally different + // input configurations (0 - 7 input "resistors"). + // + // All "on", transistors are modeled as one - see comments above for + // the filter summer. + for (int i = 0; i < 8; i++) + { + const int idiv = (i == 0) ? 1 : i; + const int size = (i == 0) ? 1 : i << 16; + const double n = i * 8.0 / 5.0; + opampModel.reset(); + mixer[i] = new unsigned short[size]; + + for (int vi = 0; vi < size; vi++) + { + const double vin = vmin + vi / N16 / idiv; /* vmin .. vmax */ + const double tmp = (opampModel.solve(n, vin) - vmin) * N16; + assert(tmp > -0.5 && tmp < 65535.5); + mixer[i][vi] = static_cast(tmp + 0.5); + } + } + + // 4 bit "resistor" ladders in the audio output gain + // necessitate 16 gain tables. + // From die photographs of the volume "resistor" ladders + // it follows that gain ~ vol/8 (assuming ideal op-amps + for (int n8 = 0; n8 < 16; n8++) + { + const int size = 1 << 16; + const double n = n8 / 16.0; + opampModel.reset(); + gain_vol[n8] = new unsigned short[size]; + + for (int vi = 0; vi < size; vi++) + { + const double vin = vmin + vi / N16; /* vmin .. vmax */ + const double tmp = (opampModel.solve(n, vin) - vmin) * N16; + assert(tmp > -0.5 && tmp < 65535.5); + gain_vol[n8][vi] = static_cast(tmp + 0.5); + } + } + + // 4 bit "resistor" ladders in the bandpass resonance gain + // necessitate 16 gain tables. + // From die photographs of the bandpass and volume "resistor" ladders + // it follows that 1/Q ~ 2^((4 - res)/8) (assuming ideal + // op-amps and ideal "resistors"). + for (int n8 = 0; n8 < 16; n8++) + { + const int size = 1 << 16; + opampModel.reset(); + gain_res[n8] = new unsigned short[size]; + + for (int vi = 0; vi < size; vi++) + { + const double vin = vmin + vi / N16; /* vmin .. vmax */ + const double tmp = (opampModel.solve(resGain[n8], vin) - vmin) * N16; + assert(tmp > -0.5 && tmp < 65535.5); + gain_res[n8][vi] = static_cast(tmp + 0.5); + } + } +} + +FilterModelConfig8580::~FilterModelConfig8580() +{ + for (int i = 0; i < 5; i++) + { + delete [] summer[i]; + } + + for (int i = 0; i < 8; i++) + { + delete [] mixer[i]; + } + + for (int i = 0; i < 16; i++) + { + delete [] gain_vol[i]; + delete [] gain_res[i]; + } +} + +std::unique_ptr FilterModelConfig8580::buildIntegrator() +{ + const double nKp = denorm* (uCox / 2. * 1.0e-6 / C); + return std::unique_ptr(new Integrator8580(opamp_rev, Vth, nKp, vmin, N16)); +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig8580.h dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig8580.h --- dosbox-staging-0.76.0/src/libs/residfp/FilterModelConfig8580.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/FilterModelConfig8580.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,115 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef FILTERMODELCONFIG8580_H +#define FILTERMODELCONFIG8580_H + +#include + +#include "Spline.h" + +namespace reSIDfp +{ + +class Integrator8580; + +/** + * Calculate parameters for 8580 filter emulation. + */ +class FilterModelConfig8580 +{ +private: + static std::unique_ptr instance; + // This allows access to the private constructor + friend std::unique_ptr::deleter_type; + + const double voice_voltage_range; + const double voice_DC_voltage; + + /// Capacitor value. + const double C; + + /// Transistor parameters. + //@{ + const double Vdd; + const double Vth; ///< Threshold voltage + const double Ut; ///< Thermal voltage: Ut = kT/q = 8.61734315e-5*T ~ 26mV + const double uCox; ///< Transconductance coefficient: u*Cox + const double Vddt; ///< Vdd - Vth + //@} + + // Derived stuff + const double vmin, vmax; + const double denorm, norm; + + /// Fixed point scaling for 16 bit op-amp output. + const double N16; + + /// Lookup tables for gain and summer op-amps in output stage / filter. + //@{ + unsigned short* mixer[8]; + unsigned short* summer[5]; + unsigned short* gain_vol[16]; + unsigned short* gain_res[16]; + //@} + + /// Reverse op-amp transfer function. + unsigned short opamp_rev[1 << 16]; + +private: + FilterModelConfig8580(); + ~FilterModelConfig8580(); + FilterModelConfig8580(const FilterModelConfig8580&) = delete; // prevent copy + FilterModelConfig8580 &operator=(const FilterModelConfig8580&) = delete; // prevent assignment + +public: + static FilterModelConfig8580* getInstance(); + + /** + * The digital range of one voice is 20 bits; create a scaling term + * for multiplication which fits in 11 bits. + */ + int getVoiceScaleS11() const { return static_cast((norm * ((1 << 11) - 1)) * voice_voltage_range); } + + /** + * The "zero" output level of the voices. + */ + int getVoiceDC() const { return static_cast(N16 * (voice_DC_voltage - vmin)); } + + unsigned short** getGainVol() { return gain_vol; } + unsigned short** getGainRes() { return gain_res; } + + unsigned short** getSummer() { return summer; } + + unsigned short** getMixer() { return mixer; } + + /** + * Construct an integrator solver. + * + * @return the integrator + */ + std::unique_ptr buildIntegrator(); +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Integrator6581.cpp dosbox-staging-0.77.0/src/libs/residfp/Integrator6581.cpp --- dosbox-staging-0.76.0/src/libs/residfp/Integrator6581.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Integrator6581.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2014 Leandro Nini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define INTEGRATOR_CPP + +#include "Integrator6581.h" + +// This is needed when compiling with --disable-inline diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Integrator6581.h dosbox-staging-0.77.0/src/libs/residfp/Integrator6581.h --- dosbox-staging-0.76.0/src/libs/residfp/Integrator6581.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Integrator6581.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,279 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2021 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004, 2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef INTEGRATOR6581_H +#define INTEGRATOR6581_H + +#include +#include +#ifdef SLOPE_FACTOR +# include +#endif + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +/** + * Find output voltage in inverting integrator SID op-amp circuits, using a + * single fixpoint iteration step. + * + * A circuit diagram of a MOS 6581 integrator is shown below. + * + * +---C---+ + * | | + * vi --o--Rw--o-o--[A>--o-- vo + * | | vx + * +--Rs--+ + * + * From Kirchoff's current law it follows that + * + * IRw + IRs + ICr = 0 + * + * Using the formula for current through a capacitor, i = C*dv/dt, we get + * + * IRw + IRs + C*(vc - vc0)/dt = 0 + * dt/C*(IRw + IRs) + vc - vc0 = 0 + * vc = vc0 - n*(IRw(vi,vx) + IRs(vi,vx)) + * + * which may be rewritten as the following iterative fixpoint function: + * + * vc = vc0 - n*(IRw(vi,g(vc)) + IRs(vi,g(vc))) + * + * To accurately calculate the currents through Rs and Rw, we need to use + * transistor models. Rs has a gate voltage of Vdd = 12V, and can be + * assumed to always be in triode mode. For Rw, the situation is rather + * more complex, as it turns out that this transistor will operate in + * both subthreshold, triode, and saturation modes. + * + * The Shichman-Hodges transistor model routinely used in textbooks may + * be written as follows: + * + * Ids = 0 , Vgst < 0 (subthreshold mode) + * Ids = K*W/L*(2*Vgst - Vds)*Vds , Vgst >= 0, Vds < Vgst (triode mode) + * Ids = K*W/L*Vgst^2 , Vgst >= 0, Vds >= Vgst (saturation mode) + * + * where + * K = u*Cox/2 (transconductance coefficient) + * W/L = ratio between substrate width and length + * Vgst = Vg - Vs - Vt (overdrive voltage) + * + * This transistor model is also called the quadratic model. + * + * Note that the equation for the triode mode can be reformulated as + * independent terms depending on Vgs and Vgd, respectively, by the + * following substitution: + * + * Vds = Vgst - (Vgst - Vds) = Vgst - Vgdt + * + * Ids = K*W/L*(2*Vgst - Vds)*Vds + * = K*W/L*(2*Vgst - (Vgst - Vgdt)*(Vgst - Vgdt) + * = K*W/L*(Vgst + Vgdt)*(Vgst - Vgdt) + * = K*W/L*(Vgst^2 - Vgdt^2) + * + * This turns out to be a general equation which covers both the triode + * and saturation modes (where the second term is 0 in saturation mode). + * The equation is also symmetrical, i.e. it can calculate negative + * currents without any change of parameters (since the terms for drain + * and source are identical except for the sign). + * + * FIXME: Subthreshold as function of Vgs, Vgd. + * + * Ids = I0*W/L*e^(Vgst/(Ut/k)) , Vgst < 0 (subthreshold mode) + * + * where + * I0 = (2 * uCox * Ut^2) / k + * + * The remaining problem with the textbook model is that the transition + * from subthreshold the triode/saturation is not continuous. + * + * Realizing that the subthreshold and triode/saturation modes may both + * be defined by independent (and equal) terms of Vgs and Vds, + * respectively, the corresponding terms can be blended into (equal) + * continuous functions suitable for table lookup. + * + * The EKV model (Enz, Krummenacher and Vittoz) essentially performs this + * blending using an elegant mathematical formulation: + * + * Ids = Is * (if - ir) + * Is = ((2 * u*Cox * Ut^2)/k) * W/L + * if = ln^2(1 + e^((k*(Vg - Vt) - Vs)/(2*Ut)) + * ir = ln^2(1 + e^((k*(Vg - Vt) - Vd)/(2*Ut)) + * + * For our purposes, the EKV model preserves two important properties + * discussed above: + * + * - It consists of two independent terms, which can be represented by + * the same lookup table. + * - It is symmetrical, i.e. it calculates current in both directions, + * facilitating a branch-free implementation. + * + * Rw in the circuit diagram above is a VCR (voltage controlled resistor), + * as shown in the circuit diagram below. + * + * + * Vdd + * | + * Vdd _|_ + * | +---+ +---- Vw + * _|_ | + * +--+ +---o Vg + * | __|__ + * | ----- Rw + * | | | + * vi -----o------+ +-------- vo + * + * + * In order to calculalate the current through the VCR, its gate voltage + * must be determined. + * + * Assuming triode mode and applying Kirchoff's current law, we get the + * following equation for Vg: + * + * u*Cox/2*W/L*((Vddt - Vg)^2 - (Vddt - vi)^2 + (Vddt - Vg)^2 - (Vddt - Vw)^2) = 0 + * 2*(Vddt - Vg)^2 - (Vddt - vi)^2 - (Vddt - Vw)^2 = 0 + * (Vddt - Vg) = sqrt(((Vddt - vi)^2 + (Vddt - Vw)^2)/2) + * + * Vg = Vddt - sqrt(((Vddt - vi)^2 + (Vddt - Vw)^2)/2) + */ +class Integrator6581 +{ +private: + const unsigned short* vcr_Vg = nullptr; + const unsigned short* vcr_n_Ids_term = nullptr; + const unsigned short* opamp_rev = nullptr; + + unsigned int Vddt_Vw_2 = 0; + mutable int vx = 0; + mutable int vc = 0; +#ifdef SLOPE_FACTOR + // Slope factor n = 1/k + // where k is the gate coupling coefficient + // k = Cox/(Cox+Cdep) ~ 0.7 + mutable double n = 0.0; +#else + const int n = 0; +#endif + // const double N16; // unused + const unsigned short Vddt = 0; + const unsigned short nVt = 0; + const unsigned short nVmin = 0; + const unsigned short n_snake = 0; + +public: + Integrator6581(const unsigned short* vcr_Vg, const unsigned short* vcr_n_Ids_term, + const unsigned short* opamp_rev, unsigned short Vddt, unsigned short nVt, + unsigned short nVmin, unsigned short n_snake, double /* N16 */) : + vcr_Vg(vcr_Vg), + vcr_n_Ids_term(vcr_n_Ids_term), + opamp_rev(opamp_rev), + Vddt_Vw_2(0), + vx(0), + vc(0), +#ifdef SLOPE_FACTOR + n(1.4), +#else + n(1), +#endif + // N16(N16), + Vddt(Vddt), + nVt(nVt), + nVmin(nVmin), + n_snake(n_snake) {} + + void setVw(unsigned short Vw) { Vddt_Vw_2 = ((Vddt - Vw) * (Vddt - Vw)) >> 1; } + + int solve(int vi) const; +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(INTEGRATOR_CPP) + +namespace reSIDfp +{ + +RESID_INLINE +int Integrator6581::solve(int vi) const +{ + // Make sure Vgst>0 so we're not in subthreshold mode + assert(vx < Vddt); + + // Check that transistor is actually in triode mode + // Vds < Vgs - Vth + assert(vi < Vddt); + + // "Snake" voltages for triode mode calculation. + const unsigned int Vgst = Vddt - vx; + const unsigned int Vgdt = Vddt - vi; + + const unsigned int Vgst_2 = Vgst * Vgst; + const unsigned int Vgdt_2 = Vgdt * Vgdt; + + // "Snake" current, scaled by (1/m)*2^13*m*2^16*m*2^16*2^-15 = m*2^30 + const int n_I_snake = n_snake * (static_cast(Vgst_2 - Vgdt_2) >> 15); + + // VCR gate voltage. // Scaled by m*2^16 + // Vg = Vddt - sqrt(((Vddt - Vw)^2 + Vgdt^2)/2) + const int Vg = static_cast(vcr_Vg[(Vddt_Vw_2 + (Vgdt_2 >> 1)) >> 16]); + const int Vp = (Vg - nVt) / n; // Pinch-off voltage + const int kVg = static_cast(Vp) - nVmin; + + // VCR voltages for EKV model table lookup. + const int Vgs = (vx < kVg) ? kVg - vx : 0; + assert(Vgs < (1 << 16)); + const int Vgd = (vi < kVg) ? kVg - vi : 0; + assert(Vgd < (1 << 16)); + + // VCR current, scaled by m*2^15*2^15 = m*2^30 + const unsigned int If = static_cast(vcr_n_Ids_term[Vgs]) << 15; + const unsigned int Ir = static_cast(vcr_n_Ids_term[Vgd]) << 15; + const int n_I_vcr = (If - Ir) * n; + +#ifdef SLOPE_FACTOR + // estimate new slope factor based on gate voltage + const double gamma = 1.0; // body effect factor + const double phi = 0.8; // bulk Fermi potential + const double Ut = 26.0e-3; // Thermal voltage + const double nVp = Vp / N16; + n = 1. + (gamma / (2 * sqrt(nVp + phi + 4*Ut))); + assert((n > 1.2) && (n < 1.8)); +#endif + + // Change in capacitor charge. + vc += n_I_snake + n_I_vcr; + + // vx = g(vc) + const int tmp = (vc >> 15) + (1 << 15); + assert(tmp < (1 << 16)); + vx = opamp_rev[tmp]; + + // Return vo. + return vx - (vc >> 14); +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Integrator8580.cpp dosbox-staging-0.77.0/src/libs/residfp/Integrator8580.cpp --- dosbox-staging-0.76.0/src/libs/residfp/Integrator8580.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Integrator8580.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2014-2016 Leandro Nini + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define INTEGRATOR8580_CPP + +#include "Integrator8580.h" + +// This is needed when compiling with --disable-inline diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Integrator8580.h dosbox-staging-0.77.0/src/libs/residfp/Integrator8580.h --- dosbox-staging-0.76.0/src/libs/residfp/Integrator8580.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Integrator8580.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,153 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004, 2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef INTEGRATOR8580_H +#define INTEGRATOR8580_H + +#include +#include + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +/** + * 8580 integrator + * + * +---C---+ + * | | + * vi -----Rfc---o--[A>--o-- vo + * vx + * + * IRfc + ICr = 0 + * IRfc + C*(vc - vc0)/dt = 0 + * dt/C*(IRfc) + vc - vc0 = 0 + * vc = vc0 - n*(IRfc(vi,vx)) + * vc = vc0 - n*(IRfc(vi,g(vc))) + * + * IRfc = K*W/L*(Vgst^2 - Vgdt^2) = n*((Vddt - vx)^2 - (Vddt - vi)^2) + * + * Rfc gate voltage is generated by an OP Amp and depends on chip temperature. + */ +class Integrator8580 +{ +private: + const unsigned short* opamp_rev = nullptr; + + mutable int vx = 0; + mutable int vc = 0; + + unsigned short nVgt = 0; + unsigned short n_dac = 0; + + const double Vth = 0.0; + const double nKp = 0.0; + const double vmin = 0.0; + const double N16 = 0.0; + +public: + Integrator8580(const unsigned short* opamp_rev, double Vth, double nKp, double vmin, double N16) : + opamp_rev(opamp_rev), + vx(0), + vc(0), + Vth(Vth), + nKp(nKp), + vmin(vmin), + N16(N16) + { + setV(1.5); + } + + Integrator8580(const Integrator8580&) = delete; // prevent copy + + Integrator8580 &operator=(const Integrator8580&) = delete; // prevent assignment + + void setFc(double wl) + { + // Normalized current factor, 1 cycle at 1MHz. + // Fit in 5 bits. + const double tmp = (1 << 13) * nKp * wl; + assert(tmp > -0.5 && tmp < 65535.5); + n_dac = static_cast(tmp + 0.5); + } + + /** + * Set FC gate voltage multiplier. + */ + void setV(double v) + { + // Gate voltage is controlled by the switched capacitor voltage divider + // Ua = Ue * v = 4.76v 1 -0.5 && tmp < 65535.5); + nVgt = static_cast(tmp + 0.5); + } + + int solve(int vi) const; +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(INTEGRATOR8580_CPP) + +namespace reSIDfp +{ + +RESID_INLINE +int Integrator8580::solve(int vi) const +{ + // Make sure we're not in subthreshold mode + assert(vx < nVgt); + + // DAC voltages + const unsigned int Vgst = nVgt - vx; + const unsigned int Vgdt = (vi < nVgt) ? nVgt - vi : 0; // triode/saturation mode + + const unsigned int Vgst_2 = Vgst * Vgst; + const unsigned int Vgdt_2 = Vgdt * Vgdt; + + // DAC current, scaled by (1/m)*2^13*m*2^16*m*2^16*2^-15 = m*2^30 + const int n_I_dac = n_dac * (static_cast(Vgst_2 - Vgdt_2) >> 15); + + // Change in capacitor charge. + vc += n_I_dac; + + // vx = g(vc) + const int tmp = (vc >> 15) + (1 << 15); + assert(tmp < (1 << 16)); + vx = opamp_rev[tmp]; + + // Return vo. + return vx - (vc >> 14); +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/meson.build dosbox-staging-0.77.0/src/libs/residfp/meson.build --- dosbox-staging-0.76.0/src/libs/residfp/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,21 @@ +libresidfp_sources = files([ + 'Dac.cpp', + 'EnvelopeGenerator.cpp', + 'ExternalFilter.cpp', + 'Filter6581.cpp', + 'Filter8580.cpp', + 'Filter.cpp', + 'FilterModelConfig6581.cpp', + 'FilterModelConfig8580.cpp', + 'Integrator6581.cpp', + 'Integrator8580.cpp', + 'OpAmp.cpp', + 'resample/SincResampler.cpp', + 'SID.cpp', + 'Spline.cpp', + 'WaveformCalculator.cpp', + 'WaveformGenerator.cpp', +]) + +libresidfp = static_library('residfp', libresidfp_sources) + diff -Nru dosbox-staging-0.76.0/src/libs/residfp/OpAmp.cpp dosbox-staging-0.77.0/src/libs/residfp/OpAmp.cpp --- dosbox-staging-0.76.0/src/libs/residfp/OpAmp.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/OpAmp.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "OpAmp.h" + +#include + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +const double EPSILON = 1e-8; + +double OpAmp::solve(double n, double vi) const +{ + // Start off with an estimate of x and a root bracket [ak, bk]. + // f is decreasing, so that f(ak) > 0 and f(bk) < 0. + double ak = vmin; + double bk = vmax; + + const double a = n + 1.; + const double b = Vddt; + const double b_vi = (b > vi) ? (b - vi) : 0.; + const double c = n * (b_vi * b_vi); + + for (;;) + { + const double xk = x; + + // Calculate f and df. + + Spline::Point out = opamp->evaluate(x); + const double vo = out.x; + const double dvo = out.y; + + const double b_vx = (b > x) ? b - x : 0.; + const double b_vo = (b > vo) ? b - vo : 0.; + + // f = a*(b - vx)^2 - c - (b - vo)^2 + const double f = a * (b_vx * b_vx) - c - (b_vo * b_vo); + + // df = 2*((b - vo)*dvo - a*(b - vx)) + const double df = 2. * (b_vo * dvo - a * b_vx); + + // Newton-Raphson step: xk1 = xk - f(xk)/f'(xk) + x -= f / df; + + if (unlikely(fabs(x - xk) < EPSILON)) + { + out = opamp->evaluate(x); + return out.x; + } + + // Narrow down root bracket. + (f < 0. ? bk : ak) = xk; + + if (unlikely(x <= ak) || unlikely(x >= bk)) + { + // Bisection step (ala Dekker's method). + x = (ak + bk) * 0.5; + } + } +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/OpAmp.h dosbox-staging-0.77.0/src/libs/residfp/OpAmp.h --- dosbox-staging-0.76.0/src/libs/residfp/OpAmp.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/OpAmp.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef OPAMP_H +#define OPAMP_H + +#include + +#include "Spline.h" + +namespace reSIDfp +{ + +/** + * Find output voltage in inverting gain and inverting summer SID op-amp + * circuits, using a combination of Newton-Raphson and bisection. + * + * +---R2--+ + * | | + * vi ---R1--o--[A>--o-- vo + * vx + * + * From Kirchoff's current law it follows that + * + * IR1f + IR2r = 0 + * + * Substituting the triode mode transistor model K*W/L*(Vgst^2 - Vgdt^2) + * for the currents, we get: + * + * n*((Vddt - vx)^2 - (Vddt - vi)^2) + (Vddt - vx)^2 - (Vddt - vo)^2 = 0 + * + * Our root function f can thus be written as: + * + * f = (n + 1)*(Vddt - vx)^2 - n*(Vddt - vi)^2 - (Vddt - vo)^2 = 0 + * + * Using substitution constants + * + * a = n + 1 + * b = Vddt + * c = n*(Vddt - vi)^2 + * + * the equations for the root function and its derivative can be written as: + * + * f = a*(b - vx)^2 - c - (b - vo)^2 + * df = 2*((b - vo)*dvo - a*(b - vx)) + */ +class OpAmp +{ +private: + /// Current root position (cached as guess to speed up next iteration) + mutable double x; + + const double Vddt; + const double vmin; + const double vmax; + + std::unique_ptr const opamp; + +public: + /** + * Opamp input -> output voltage conversion + * + * @param opamp opamp mapping table as pairs of points (in -> out) + * @param opamplength length of the opamp array + * @param kVddt transistor dt parameter (in volts) + */ + OpAmp(const Spline::Point opamp[], int opamplength, double Vddt) : + x(0.), + Vddt(Vddt), + vmin(opamp[0].x), + vmax(opamp[opamplength - 1].x), + opamp(new Spline(opamp, opamplength)) {} + + void reset() const + { + x = vmin; + } + + /** + * Solve the opamp equation for input vi in loading context n + * + * @param n the ratio of input/output loading + * @param vi input + * @return vo + */ + double solve(double n, double vi) const; +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Potentiometer.h dosbox-staging-0.77.0/src/libs/residfp/Potentiometer.h --- dosbox-staging-0.76.0/src/libs/residfp/Potentiometer.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Potentiometer.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright (C) 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef POTENTIOMETER_H +#define POTENTIOMETER_H + +namespace reSIDfp +{ + +/** + * Potentiometer representation. + * + * This class will probably never be implemented in any real way. + * + * @author Ken Händel + * @author Dag Lem + */ +class Potentiometer +{ +public: + /** + * Read paddle value. Not modeled. + * + * @return paddle value (always 0xff) + */ + unsigned char readPOT() const { return 0xff; } +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/README dosbox-staging-0.77.0/src/libs/residfp/README --- dosbox-staging-0.76.0/src/libs/residfp/README 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/README 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,20 @@ +reSIDfp is a fork of Dag Lem's reSID 0.16, a reverse engineered software emulation +of the MOS6581/8580 SID (Sound Interface Device). + +The project was started by Antti S. Lankila in order to improve SID emulation +with special focus on the 6581 filter. +The codebase has been later on ported to java by Ken Händel within the jsidplay2 project +and has seen further work by Antti Lankila. +It was then ported back to c++ and integrated with improvements from reSID 1.0 by Leandro Nini. + + +Main differences from reSID: + +* combined waveforms are emulated by a parametrized model based on samplings from Kevtris; +* envelope generator is implemented like in the real machine with a shift register; +* high quality resampling is done in two steps to allow computational savings using lower order filters; +* part of the calculations are done with floats instead of fixed point; +* interpolation is accomplished with Fritsch-Carlson method to preserve monotonicity. + + +reSIDfp is free software. See the file COPYING for copying permission. diff -Nru dosbox-staging-0.76.0/src/libs/residfp/resample/Resampler.h dosbox-staging-0.77.0/src/libs/residfp/resample/Resampler.h --- dosbox-staging-0.76.0/src/libs/residfp/resample/Resampler.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/resample/Resampler.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef RESAMPLER_H +#define RESAMPLER_H + +#include + +#include "../siddefs-fp.h" + +namespace reSIDfp +{ + +/** + * Abstraction of a resampling process. Given enough input, produces output. + * Constructors take additional arguments that configure these objects. + */ +class Resampler +{ +protected: + inline short softClip(int x) const + { + constexpr int threshold = 28000; + if (likely(x < threshold)) + return x; + + constexpr double t = threshold / 32768.; + constexpr double a = 1. - t; + constexpr double b = 1. / a; + + double value = static_cast(x - threshold) / 32768.; + value = t + a * tanh(b * value); + return static_cast(value * 32768.); + } + + virtual int output() const = 0; + + Resampler() {} + +public: + virtual ~Resampler() {} + + /** + * Input a sample into resampler. Output "true" when resampler is ready with new sample. + * + * @param sample input sample + * @return true when a sample is ready + */ + virtual bool input(int sample) = 0; + + /** + * Output a sample from resampler. + * + * @return resampled sample + */ + short getOutput() const + { + return softClip(output()); + } + + virtual void reset() = 0; +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/resample/SincResampler.cpp dosbox-staging-0.77.0/src/libs/residfp/resample/SincResampler.cpp --- dosbox-staging-0.76.0/src/libs/residfp/resample/SincResampler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/resample/SincResampler.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,389 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2020 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "SincResampler.h" + +#include +#include +#include +#include +#include + +#include "../siddefs-fp.h" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef HAVE_EMMINTRIN_H +# include +#elif defined HAVE_MMINTRIN_H +# include +#elif defined(HAVE_ARM_NEON_H) +# include +#endif + +namespace reSIDfp +{ + +typedef std::map fir_cache_t; + +/// Cache for the expensive FIR table computation results. +fir_cache_t FIR_CACHE; + +/// Maximum error acceptable in I0 is 1e-6, or ~96 dB. +const double I0E = 1e-6; + +const int BITS = 16; + +/** + * Compute the 0th order modified Bessel function of the first kind. + * This function is originally from resample-1.5/filterkit.c by J. O. Smith. + * It is used to build the Kaiser window for resampling. + * + * @param x evaluate I0 at x + * @return value of I0 at x. + */ +double I0(double x) +{ + double sum = 1.; + double u = 1.; + double n = 1.; + const double halfx = x / 2.; + + do + { + const double temp = halfx / n; + u *= temp * temp; + sum += u; + n += 1.; + } + while (u >= I0E * sum); + + return sum; +} + +/** + * Calculate convolution with sample and sinc. + * + * @param a sample buffer input + * @param b sinc buffer + * @param bLength length of the sinc buffer + * @return convolved result + */ +int convolve(const short* a, const short* b, int bLength) +{ +#ifdef HAVE_EMMINTRIN_H + int out = 0; + + const uintptr_t offset = (uintptr_t)(a) & 0x0f; + + if (offset == ((uintptr_t)(b) & 0x0f)) + { + if (offset) + { + const int l = (0x10 - offset)/2; + + for (int i = 0; i < l; i++) + { + out += *a++ * *b++; + } + + bLength -= offset; + } + + __m128i acc = _mm_setzero_si128(); + + const int n = bLength / 8; + + for (int i = 0; i < n; i++) + { + const __m128i tmp = _mm_madd_epi16(*(__m128i*)a, *(__m128i*)b); + acc = _mm_add_epi16(acc, tmp); + a += 8; + b += 8; + } + + __m128i vsum = _mm_add_epi32(acc, _mm_srli_si128(acc, 8)); + vsum = _mm_add_epi32(vsum, _mm_srli_si128(vsum, 4)); + out += _mm_cvtsi128_si32(vsum); + + bLength &= 7; + } +#elif defined HAVE_MMINTRIN_H + __m64 acc = _mm_setzero_si64(); + + const int n = bLength / 4; + + for (int i = 0; i < n; i++) + { + const __m64 tmp = _mm_madd_pi16(*(__m64*)a, *(__m64*)b); + acc = _mm_add_pi16(acc, tmp); + a += 4; + b += 4; + } + + int out = _mm_cvtsi64_si32(acc) + _mm_cvtsi64_si32(_mm_srli_si64(acc, 32)); + _mm_empty(); + + bLength &= 3; +#elif defined(HAVE_ARM_NEON_H) +#if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__) + int32x4_t acc1Low = vdupq_n_s32(0); + int32x4_t acc1High = vdupq_n_s32(0); + int32x4_t acc2Low = vdupq_n_s32(0); + int32x4_t acc2High = vdupq_n_s32(0); + + const int n = bLength / 16; + + for (int i = 0; i < n; i++) + { + int16x8_t v11 = vld1q_s16(a); + int16x8_t v12 = vld1q_s16(a + 8); + int16x8_t v21 = vld1q_s16(b); + int16x8_t v22 = vld1q_s16(b + 8); + + acc1Low = vmlal_s16(acc1Low, vget_low_s16(v11), vget_low_s16(v21)); + acc1High = vmlal_high_s16(acc1High, v11, v21); + acc2Low = vmlal_s16(acc2Low, vget_low_s16(v12), vget_low_s16(v22)); + acc2High = vmlal_high_s16(acc2High, v12, v22); + + a += 16; + b += 16; + } + + bLength &= 15; + + if (bLength >= 8) + { + int16x8_t v1 = vld1q_s16(a); + int16x8_t v2 = vld1q_s16(b); + + acc1Low = vmlal_s16(acc1Low, vget_low_s16(v1), vget_low_s16(v2)); + acc1High = vmlal_high_s16(acc1High, v1, v2); + + a += 8; + b += 8; + } + + bLength &= 7; + + if (bLength >= 4) + { + int16x4_t v1 = vld1_s16(a); + int16x4_t v2 = vld1_s16(b); + + acc1Low = vmlal_s16(acc1Low, v1, v2); + + a += 4; + b += 4; + } + + int32x4_t accSumsNeon = vaddq_s32(acc1Low, acc1High); + accSumsNeon = vaddq_s32(accSumsNeon, acc2Low); + accSumsNeon = vaddq_s32(accSumsNeon, acc2High); + + int out = vaddvq_s32(accSumsNeon); + + bLength &= 3; +#else + int32x4_t acc = vdupq_n_s32(0); + + const int n = bLength / 4; + + for (int i = 0; i < n; i++) + { + const int16x4_t h_vec = vld1_s16(a); + const int16x4_t x_vec = vld1_s16(b); + acc = vmlal_s16(acc, h_vec, x_vec); + a += 4; + b += 4; + } + + int out = vgetq_lane_s32(acc, 0) + + vgetq_lane_s32(acc, 1) + + vgetq_lane_s32(acc, 2) + + vgetq_lane_s32(acc, 3); + + bLength &= 3; +#endif +#else + int out = 0; +#endif + + for (int i = 0; i < bLength; i++) + { + out += *a++ * *b++; + } + + return (out + (1 << 14)) >> 15; +} + +int SincResampler::fir(int subcycle) +{ + // Find the first of the nearest fir tables close to the phase + int firTableFirst = (subcycle * firRES >> 10); + const int firTableOffset = (subcycle * firRES) & 0x3ff; + + // Find firN most recent samples, plus one extra in case the FIR wraps. + int sampleStart = sampleIndex - firN + RINGSIZE - 1; + + const int v1 = convolve(sample + sampleStart, (*firTable)[firTableFirst], firN); + + // Use next FIR table, wrap around to first FIR table using + // previous sample. + if (unlikely(++firTableFirst == firRES)) + { + firTableFirst = 0; + ++sampleStart; + } + + const int v2 = convolve(sample + sampleStart, (*firTable)[firTableFirst], firN); + + // Linear interpolation between the sinc tables yields good + // approximation for the exact value. + return v1 + (firTableOffset * (v2 - v1) >> 10); +} + +SincResampler::SincResampler(double clockFrequency, double samplingFrequency, double highestAccurateFrequency) : + sampleIndex(0), + cyclesPerSample(static_cast(clockFrequency / samplingFrequency * 1024.)), + sampleOffset(0), + outputValue(0) +{ + // 16 bits -> -96dB stopband attenuation. + const double A = -20. * log10(1.0 / (1 << BITS)); + // A fraction of the bandwidth is allocated to the transition band, which we double + // because we design the filter to transition halfway at nyquist. + const double dw = (1. - 2.*highestAccurateFrequency / samplingFrequency) * M_PI * 2.; + + // For calculation of beta and N see the reference for the kaiserord + // function in the MATLAB Signal Processing Toolbox: + // http://www.mathworks.com/help/signal/ref/kaiserord.html + const double beta = 0.1102 * (A - 8.7); + const double I0beta = I0(beta); + const double cyclesPerSampleD = clockFrequency / samplingFrequency; + + { + // The filter order will maximally be 124 with the current constraints. + // N >= (96.33 - 7.95)/(2 * pi * 2.285 * (maxfreq - passbandfreq) >= 123 + // The filter order is equal to the number of zero crossings, i.e. + // it should be an even number (sinc is symmetric with respect to x = 0). + int N = static_cast((A - 7.95) / (2.285 * dw) + 0.5); + N += N & 1; + + // The filter length is equal to the filter order + 1. + // The filter length must be an odd number (sinc is symmetric with respect to + // x = 0). + firN = static_cast(N * cyclesPerSampleD) + 1; + firN |= 1; + + // Check whether the sample ring buffer would overflow. + assert(firN < RINGSIZE); + + // Error is bounded by err < 1.234 / L^2, so L = sqrt(1.234 / (2^-16)) = sqrt(1.234 * 2^16). + firRES = static_cast(ceil(sqrt(1.234 * (1 << BITS)) / cyclesPerSampleD)); + + // firN*firRES represent the total resolution of the sinc sampling. JOS + // recommends a length of 2^BITS, but we don't quite use that good a filter. + // The filter test program indicates that the filter performs well, though. + } + + // Create the map key + std::ostringstream o; + o << firN << "," << firRES << "," << cyclesPerSampleD; + const std::string firKey = o.str(); + fir_cache_t::iterator lb = FIR_CACHE.lower_bound(firKey); + + // The FIR computation is expensive and we set sampling parameters often, but + // from a very small set of choices. Thus, caching is used to speed initialization. + if (lb != FIR_CACHE.end() && !(FIR_CACHE.key_comp()(firKey, lb->first))) + { + firTable = &(lb->second); + } + else + { + // Allocate memory for FIR tables. + matrix_t tempTable(firRES, firN); + firTable = &(FIR_CACHE.insert(lb, fir_cache_t::value_type(firKey, tempTable))->second); + + // The cutoff frequency is midway through the transition band, in effect the same as nyquist. + const double wc = M_PI; + + // Calculate the sinc tables. + const double scale = 32768.0 * wc / cyclesPerSampleD / M_PI; + + const int firN_2 = firN / 2; + + for (int i = 0; i < firRES; i++) + { + const double jPhase = (double) i / firRES + firN_2; + + for (int j = 0; j < firN; j++) + { + const double x = j - jPhase; + + const double xt = x / firN_2; + const double kaiserXt = fabs(xt) < 1. ? I0(beta * sqrt(1. - xt * xt)) / I0beta : 0.; + + const double wt = wc * x / cyclesPerSampleD; + const double sincWt = fabs(wt) >= 1e-8 ? sin(wt) / wt : 1.; + + (*firTable)[i][j] = static_cast(scale * sincWt * kaiserXt); + } + } + } +} + +bool SincResampler::input(int input) +{ + bool ready = false; + + /* + * Clip the input as it may overflow the 16 bit range. + * + * Approximate measured input ranges: + * 6581: [-24262,+25080] (Kawasaki_Synthesizer_Demo) + * 8580: [-21514,+35232] (64_Forever, Drum_Fool) + */ + sample[sampleIndex] = sample[sampleIndex + RINGSIZE] = softClip(input); + sampleIndex = (sampleIndex + 1) & (RINGSIZE - 1); + + if (sampleOffset < 1024) + { + outputValue = fir(sampleOffset); + ready = true; + sampleOffset += cyclesPerSample; + } + + sampleOffset -= 1024; + + return ready; +} + +void SincResampler::reset() +{ + memset(sample, 0, sizeof(sample)); + sampleOffset = 0; +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/resample/SincResampler.h dosbox-staging-0.77.0/src/libs/residfp/resample/SincResampler.h --- dosbox-staging-0.76.0/src/libs/residfp/resample/SincResampler.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/resample/SincResampler.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,116 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SINCRESAMPLER_H +#define SINCRESAMPLER_H + +#include "Resampler.h" + +#include +#include + +#include "../array.h" + +namespace reSIDfp +{ + +/** + * This is the theoretically correct (and computationally intensive) audio sample generation. + * The samples are generated by resampling to the specified sampling frequency. + * The work rate is inversely proportional to the percentage of the bandwidth + * allocated to the filter transition band. + * + * This implementation is based on the paper "A Flexible Sampling-Rate Conversion Method", + * by J. O. Smith and P. Gosset, or rather on the expanded tutorial on the + * [Digital Audio Resampling Home Page](http://www-ccrma.stanford.edu/~jos/resample/). + * + * By building shifted FIR tables with samples according to the sampling frequency, + * this implementation dramatically reduces the computational effort in the + * filter convolutions, without any loss of accuracy. + * The filter convolutions are also vectorizable on current hardware. + */ +class SincResampler final : public Resampler +{ +private: + /// Size of the ring buffer, must be a power of 2 + static const int RINGSIZE = 2048; + +private: + /// Table of the fir filter coefficients + matrix_t* firTable = nullptr; + + int sampleIndex = 0; + + /// Filter resolution + int firRES = 0; + + /// Filter length + int firN = 0; + + const int cyclesPerSample = 0; + + int sampleOffset = 0; + + int outputValue = 0; + + short sample[RINGSIZE * 2] = {}; + +private: + int fir(int subcycle); + +public: + /** + * Use a clock freqency of 985248Hz for PAL C64, 1022730Hz for NTSC C64. + * The default end of passband frequency is pass_freq = 0.9*sample_freq/2 + * for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample frequencies. + * + * For resampling, the ratio between the clock frequency and the sample frequency + * is limited as follows: 125*clock_freq/sample_freq < 16384 + * E.g. provided a clock frequency of ~ 1MHz, the sample frequency + * can not be set lower than ~ 8kHz. + * A lower sample frequency would make the resampling code overfill its 16k sample ring buffer. + * + * The end of passband frequency is also limited: pass_freq <= 0.9*sample_freq/2 + * + * E.g. for a 44.1kHz sampling rate the end of passband frequency is limited + * to slightly below 20kHz. This constraint ensures that the FIR table is not overfilled. + * + * @param clockFrequency System clock frequency at Hz + * @param samplingFrequency Desired output sampling rate + * @param highestAccurateFrequency + */ + SincResampler(double clockFrequency, double samplingFrequency, double highestAccurateFrequency); + + SincResampler(const SincResampler&) = delete; // prevent copy + + SincResampler &operator=(const SincResampler&) = delete; // prevent assignment + + bool input(int input) override; + + int output() const override { return outputValue; } + + void reset() override; +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/resample/test.cpp dosbox-staging-0.77.0/src/libs/residfp/resample/test.cpp --- dosbox-staging-0.76.0/src/libs/residfp/resample/test.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/resample/test.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2012-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "../siddefs-fp.h" + +#include "Resampler.h" +#include "TwoPassSincResampler.h" + +/** + * Simple sin waveform in, power output measurement function. + * It would be far better to use FFT. + */ +int main(int argc, const char* argv[]) +{ + const double RATE = 985248.4; + const int RINGSIZE = 2048; + + std::auto_ptr r(reSIDfp::TwoPassSincResampler::create(RATE, 48000.0, 20000.0)); + + std::map results; + clock_t start = clock(); + + for (double freq = 1000.; freq < RATE / 2.; freq *= 1.01) + { + /* prefill resampler buffer */ + int k = 0; + double omega = 2 * M_PI * freq / RATE; + + for (int j = 0; j < RINGSIZE; j ++) + { + int signal = static_cast(32768.0 * sin(k++ * omega) * sqrt(2)); + r->input(signal); + } + + int n = 0; + float pwr = 0; + + /* Now, during measurement stage, put 100 cycles of waveform through filter. */ + for (int j = 0; j < 100000; j ++) + { + int signal = static_cast(32768.0 * sin(k++ * omega) * sqrt(2)); + + if (r->input(signal)) + { + float out = r->output(); + pwr += out * out; + n += 1; + } + } + + results.insert(std::make_pair(freq, 10 * log10(pwr / n))); + } + + clock_t end = clock(); + + for (std::map::iterator it = results.begin(); it != results.end(); ++it) + { + std::cout << std::fixed << std::setprecision(0) << std::setw(6) << (*it).first << " Hz " << (*it).second << " dB" << std::endl; + } + + std::cout << "Filtering time " << (end - start) * 1000. / CLOCKS_PER_SEC << " ms" << std::endl; +} diff -Nru dosbox-staging-0.76.0/src/libs/residfp/resample/TwoPassSincResampler.h dosbox-staging-0.77.0/src/libs/residfp/resample/TwoPassSincResampler.h --- dosbox-staging-0.76.0/src/libs/residfp/resample/TwoPassSincResampler.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/resample/TwoPassSincResampler.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef TWOPASSSINCRESAMPLER_H +#define TWOPASSSINCRESAMPLER_H + +#include + +#include + +#include "Resampler.h" +#include "SincResampler.h" + +namespace reSIDfp +{ + +/** + * Compose a more efficient SINC from chaining two other SINCs. + */ +class TwoPassSincResampler final : public Resampler +{ +private: + std::unique_ptr const s1; + std::unique_ptr const s2; + +private: + TwoPassSincResampler(double clockFrequency, double samplingFrequency, double highestAccurateFrequency, double intermediateFrequency) : + s1(new SincResampler(clockFrequency, intermediateFrequency, highestAccurateFrequency)), + s2(new SincResampler(intermediateFrequency, samplingFrequency, highestAccurateFrequency)) + {} + +public: + // Named constructor + static TwoPassSincResampler* create(double clockFrequency, double samplingFrequency, double highestAccurateFrequency) + { + // Calculation according to Laurent Ganier. It evaluates to about 120 kHz at typical settings. + // Some testing around the chosen value seems to confirm that this does work. + double const intermediateFrequency = 2. * highestAccurateFrequency + + sqrt(2. * highestAccurateFrequency * clockFrequency + * (samplingFrequency - 2. * highestAccurateFrequency) / samplingFrequency); + return new TwoPassSincResampler(clockFrequency, samplingFrequency, highestAccurateFrequency, intermediateFrequency); + } + + bool input(int sample) override + { + return s1->input(sample) && s2->input(s1->output()); + } + + int output() const override + { + return s2->output(); + } + + void reset() override + { + s1->reset(); + s2->reset(); + } +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/resample/ZeroOrderResampler.h dosbox-staging-0.77.0/src/libs/residfp/resample/ZeroOrderResampler.h --- dosbox-staging-0.76.0/src/libs/residfp/resample/ZeroOrderResampler.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/resample/ZeroOrderResampler.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,86 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef ZEROORDER_RESAMPLER_H +#define ZEROORDER_RESAMPLER_H + +#include "Resampler.h" + +namespace reSIDfp +{ + +/** + * Return sample with linear interpolation. + * + * @author Antti Lankila + */ +class ZeroOrderResampler final : public Resampler +{ + +private: + /// Last sample + int cachedSample; + + /// Number of cycles per sample + const int cyclesPerSample; + + int sampleOffset; + + /// Calculated sample + int outputValue; + +public: + ZeroOrderResampler(double clockFrequency, double samplingFrequency) : + cachedSample(0), + cyclesPerSample(static_cast(clockFrequency / samplingFrequency * 1024.)), + sampleOffset(0), + outputValue(0) {} + + bool input(int sample) override + { + bool ready = false; + + if (sampleOffset < 1024) + { + outputValue = cachedSample + (sampleOffset * (sample - cachedSample) >> 10); + ready = true; + sampleOffset += cyclesPerSample; + } + + sampleOffset -= 1024; + + cachedSample = sample; + + return ready; + } + + int output() const override { return outputValue; } + + void reset() override + { + sampleOffset = 0; + cachedSample = 0; + } +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/SID.cpp dosbox-staging-0.77.0/src/libs/residfp/SID.cpp --- dosbox-staging-0.76.0/src/libs/residfp/SID.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/SID.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,403 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define SID_CPP + +#include "SID.h" + +#include + +#include "array.h" +#include "Filter6581.h" +#include "Filter8580.h" +#include "Potentiometer.h" +#include "WaveformCalculator.h" +#include "resample/TwoPassSincResampler.h" +#include "resample/ZeroOrderResampler.h" + +namespace reSIDfp +{ + +/** + * Bus value stays alive for some time after each operation. + * Values differs between chip models, the timings used here + * are taken from VICE [1]. + * See also the discussion "How do I reliably detect 6581/8580 sid?" on CSDb [2]. + * + * Results from real C64 (testprogs/SID/bitfade/delayfrq0.prg): + * + * (new SID) (250469/8580R5) (250469/8580R5) + * delayfrq0 ~7a000 ~108000 + * + * (old SID) (250407/6581) + * delayfrq0 ~01d00 + * + * [1]: http://sourceforge.net/p/vice-emu/patches/99/ + * [2]: http://noname.c64.org/csdb/forums/?roomid=11&topicid=29025&showallposts=1 + */ + //@{ +int constexpr BUS_TTL_6581 = 0x01d00; +int constexpr BUS_TTL_8580 = 0xa2000; +//@} + +SID::SID() : + filter6581(new Filter6581()), + filter8580(new Filter8580()), + externalFilter(new ExternalFilter()), + resampler(nullptr), + potX(new Potentiometer()), + potY(new Potentiometer()) +{ + voice[0].reset(new Voice()); + voice[1].reset(new Voice()); + voice[2].reset(new Voice()); + + muted[0] = muted[1] = muted[2] = false; + + reset(); + setChipModel(MOS8580); +} + +SID::~SID() +{ + // Needed to delete auto_ptr with complete type +} + +void SID::setFilter6581Curve(double filterCurve) +{ + filter6581->setFilterCurve(filterCurve); +} + +void SID::setFilter8580Curve(double filterCurve) +{ + filter8580->setFilterCurve(filterCurve); +} + +void SID::enableFilter(bool enable) +{ + filter6581->enable(enable); + filter8580->enable(enable); +} + +void SID::voiceSync(bool sync) +{ + if (sync) + { + // Synchronize the 3 waveform generators. + for (int i = 0; i < 3; i++) + { + voice[i]->wave()->synchronize(voice[(i + 1) % 3]->wave(), voice[(i + 2) % 3]->wave()); + } + } + + // Calculate the time to next voice sync + nextVoiceSync = std::numeric_limits::max(); + + for (int i = 0; i < 3; i++) + { + WaveformGenerator* const wave = voice[i]->wave(); + const unsigned int freq = wave->readFreq(); + + if (wave->readTest() || freq == 0 || !voice[(i + 1) % 3]->wave()->readSync()) + { + continue; + } + + const unsigned int accumulator = wave->readAccumulator(); + const unsigned int thisVoiceSync = ((0x7fffff - accumulator) & 0xffffff) / freq + 1; + + if (thisVoiceSync < nextVoiceSync) + { + nextVoiceSync = thisVoiceSync; + } + } +} + +void SID::setChipModel(ChipModel model) +{ + switch (model) + { + case MOS6581: + filter = filter6581.get(); + modelTTL = BUS_TTL_6581; + break; + + case MOS8580: + filter = filter8580.get(); + modelTTL = BUS_TTL_8580; + break; + + default: + throw SIDError("Unknown chip type"); + } + + this->model = model; + + // calculate waveform-related tables, feed them to the generator + matrix_t* tables = WaveformCalculator::getInstance()->buildTable(model); + + // update voice offsets + for (int i = 0; i < 3; i++) + { + voice[i]->envelope()->setChipModel(model); + voice[i]->wave()->setChipModel(model); + voice[i]->wave()->setWaveformModels(tables); + } +} + +void SID::reset() +{ + for (int i = 0; i < 3; i++) + { + voice[i]->reset(); + } + + filter6581->reset(); + filter8580->reset(); + externalFilter->reset(); + + if (resampler.get()) + { + resampler->reset(); + } + + busValue = 0; + busValueTtl = 0; + voiceSync(false); +} + +void SID::input(int value) +{ + filter6581->input(value); + filter8580->input(value); +} + +unsigned char SID::read(int offset) +{ + switch (offset) + { + case 0x19: // X value of paddle + busValue = potX->readPOT(); + busValueTtl = modelTTL; + break; + + case 0x1a: // Y value of paddle + busValue = potY->readPOT(); + busValueTtl = modelTTL; + break; + + case 0x1b: // Voice #3 waveform output + busValue = voice[2]->wave()->readOSC(); + busValueTtl = modelTTL; + break; + + case 0x1c: // Voice #3 ADSR output + busValue = voice[2]->envelope()->readENV(); + busValueTtl = modelTTL; + break; + + default: + // Reading from a write-only or non-existing register + // makes the bus discharge faster. + // Emulate this by halving the residual TTL. + busValueTtl /= 2; + break; + } + + return busValue; +} + +void SID::write(int offset, unsigned char value) +{ + busValue = value; + busValueTtl = modelTTL; + + switch (offset) + { + case 0x00: // Voice #1 frequency (Low-byte) + voice[0]->wave()->writeFREQ_LO(value); + break; + + case 0x01: // Voice #1 frequency (High-byte) + voice[0]->wave()->writeFREQ_HI(value); + break; + + case 0x02: // Voice #1 pulse width (Low-byte) + voice[0]->wave()->writePW_LO(value); + break; + + case 0x03: // Voice #1 pulse width (bits #8-#15) + voice[0]->wave()->writePW_HI(value); + break; + + case 0x04: // Voice #1 control register + voice[0]->writeCONTROL_REG(muted[0] ? 0 : value); + break; + + case 0x05: // Voice #1 Attack and Decay length + voice[0]->envelope()->writeATTACK_DECAY(value); + break; + + case 0x06: // Voice #1 Sustain volume and Release length + voice[0]->envelope()->writeSUSTAIN_RELEASE(value); + break; + + case 0x07: // Voice #2 frequency (Low-byte) + voice[1]->wave()->writeFREQ_LO(value); + break; + + case 0x08: // Voice #2 frequency (High-byte) + voice[1]->wave()->writeFREQ_HI(value); + break; + + case 0x09: // Voice #2 pulse width (Low-byte) + voice[1]->wave()->writePW_LO(value); + break; + + case 0x0a: // Voice #2 pulse width (bits #8-#15) + voice[1]->wave()->writePW_HI(value); + break; + + case 0x0b: // Voice #2 control register + voice[1]->writeCONTROL_REG(muted[1] ? 0 : value); + break; + + case 0x0c: // Voice #2 Attack and Decay length + voice[1]->envelope()->writeATTACK_DECAY(value); + break; + + case 0x0d: // Voice #2 Sustain volume and Release length + voice[1]->envelope()->writeSUSTAIN_RELEASE(value); + break; + + case 0x0e: // Voice #3 frequency (Low-byte) + voice[2]->wave()->writeFREQ_LO(value); + break; + + case 0x0f: // Voice #3 frequency (High-byte) + voice[2]->wave()->writeFREQ_HI(value); + break; + + case 0x10: // Voice #3 pulse width (Low-byte) + voice[2]->wave()->writePW_LO(value); + break; + + case 0x11: // Voice #3 pulse width (bits #8-#15) + voice[2]->wave()->writePW_HI(value); + break; + + case 0x12: // Voice #3 control register + voice[2]->writeCONTROL_REG(muted[2] ? 0 : value); + break; + + case 0x13: // Voice #3 Attack and Decay length + voice[2]->envelope()->writeATTACK_DECAY(value); + break; + + case 0x14: // Voice #3 Sustain volume and Release length + voice[2]->envelope()->writeSUSTAIN_RELEASE(value); + break; + + case 0x15: // Filter cut off frequency (bits #0-#2) + filter6581->writeFC_LO(value); + filter8580->writeFC_LO(value); + break; + + case 0x16: // Filter cut off frequency (bits #3-#10) + filter6581->writeFC_HI(value); + filter8580->writeFC_HI(value); + break; + + case 0x17: // Filter control + filter6581->writeRES_FILT(value); + filter8580->writeRES_FILT(value); + break; + + case 0x18: // Volume and filter modes + filter6581->writeMODE_VOL(value); + filter8580->writeMODE_VOL(value); + break; + + default: + break; + } + + // Update voicesync just in case. + voiceSync(false); +} + +void SID::setSamplingParameters(double clockFrequency, SamplingMethod method, double samplingFrequency, double highestAccurateFrequency) +{ + externalFilter->setClockFrequency(clockFrequency); + + switch (method) + { + case DECIMATE: + resampler.reset(new ZeroOrderResampler(clockFrequency, samplingFrequency)); + break; + + case RESAMPLE: + resampler.reset(TwoPassSincResampler::create(clockFrequency, samplingFrequency, highestAccurateFrequency)); + break; + + default: + throw SIDError("Unknown sampling method"); + } +} + +void SID::clockSilent(unsigned int cycles) +{ + ageBusValue(cycles); + + while (cycles != 0) + { + int delta_t = std::min(nextVoiceSync, cycles); + + if (delta_t > 0) + { + for (int i = 0; i < delta_t; i++) + { + // clock waveform generators (can affect OSC3) + voice[0]->wave()->clock(); + voice[1]->wave()->clock(); + voice[2]->wave()->clock(); + + voice[0]->wave()->output(voice[2]->wave()); + voice[1]->wave()->output(voice[0]->wave()); + voice[2]->wave()->output(voice[1]->wave()); + + // clock ENV3 only + voice[2]->envelope()->clock(); + } + + cycles -= delta_t; + nextVoiceSync -= delta_t; + } + + if (nextVoiceSync == 0) + { + voiceSync(true); + } + } +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/siddefs-fp.h dosbox-staging-0.77.0/src/libs/residfp/siddefs-fp.h --- dosbox-staging-0.76.0/src/libs/residfp/siddefs-fp.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/siddefs-fp.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,64 @@ +// --------------------------------------------------------------------------- +// This file is part of reSID, a MOS6581 SID emulator engine. +// Copyright (C) 1999 Dag Lem +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// --------------------------------------------------------------------------- + +#ifndef SIDDEFS_FP_H +#define SIDDEFS_FP_H + +// Compilation configuration. +#define RESID_BRANCH_HINTS 1 + +// Compiler specifics. +#if !defined(_MSC_VER) +# define HAVE_BUILTIN_EXPECT 1 +#endif + +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif + +// Branch prediction macros, lifted off the Linux kernel. +#if RESID_BRANCH_HINTS && HAVE_BUILTIN_EXPECT +# define likely(x) __builtin_expect(!!(x), 1) +# define unlikely(x) __builtin_expect(!!(x), 0) +#else +# define likely(x) (x) +# define unlikely(x) (x) +#endif + +namespace reSIDfp { + +typedef enum { MOS6581=1, MOS8580 } ChipModel; + +typedef enum { DECIMATE=1, RESAMPLE } SamplingMethod; +} + +extern "C" +{ +#ifndef __VERSION_CC__ +extern const char* residfp_version_string; +#else +const char* residfp_version_string = "2020-10-26"; +#endif +} + +// Inlining on/off. +#define RESID_INLINING 1 +#define RESID_INLINE inline + +#endif // SIDDEFS_FP_H diff -Nru dosbox-staging-0.76.0/src/libs/residfp/siddefs-fp.h.in dosbox-staging-0.77.0/src/libs/residfp/siddefs-fp.h.in --- dosbox-staging-0.76.0/src/libs/residfp/siddefs-fp.h.in 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/siddefs-fp.h.in 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,62 @@ +// --------------------------------------------------------------------------- +// This file is part of reSID, a MOS6581 SID emulator engine. +// Copyright (C) 1999 Dag Lem +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// --------------------------------------------------------------------------- + +#ifndef SIDDEFS_FP_H +#define SIDDEFS_FP_H + +// Compilation configuration. +#define RESID_BRANCH_HINTS @RESID_BRANCH_HINTS@ + +// Compiler specifics. +#define HAVE_BUILTIN_EXPECT @HAVE_BUILTIN_EXPECT@ + +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif + +// Branch prediction macros, lifted off the Linux kernel. +#if RESID_BRANCH_HINTS && HAVE_BUILTIN_EXPECT +# define likely(x) __builtin_expect(!!(x), 1) +# define unlikely(x) __builtin_expect(!!(x), 0) +#else +# define likely(x) (x) +# define unlikely(x) (x) +#endif + +namespace reSIDfp { + +typedef enum { MOS6581=1, MOS8580 } ChipModel; + +typedef enum { DECIMATE=1, RESAMPLE } SamplingMethod; +} + +extern "C" +{ +#ifndef __VERSION_CC__ +extern const char* residfp_version_string; +#else +const char* residfp_version_string = "@PACKAGE_VERSION@"; +#endif +} + +// Inlining on/off. +#define RESID_INLINING @RESID_INLINING@ +#define RESID_INLINE @RESID_INLINE@ + +#endif // SIDDEFS_FP_H diff -Nru dosbox-staging-0.76.0/src/libs/residfp/SID.h dosbox-staging-0.77.0/src/libs/residfp/SID.h --- dosbox-staging-0.76.0/src/libs/residfp/SID.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/SID.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,358 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDFP_H +#define SIDFP_H + +#include + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +class Filter; +class Filter6581; +class Filter8580; +class ExternalFilter; +class Potentiometer; +class Voice; +class Resampler; + +/** + * SID error exception. + */ +class SIDError +{ +private: + const char* message; + +public: + SIDError(const char* msg) : + message(msg) {} + const char* getMessage() const { return message; } +}; + +/** + * MOS6581/MOS8580 emulation. + */ +class SID +{ +private: + /// Currently active filter + Filter* filter = nullptr; + + /// Filter used, if model is set to 6581 + std::unique_ptr const filter6581; + + /// Filter used, if model is set to 8580 + std::unique_ptr const filter8580; + + /** + * External filter that provides high-pass and low-pass filtering + * to adjust sound tone slightly. + */ + std::unique_ptr const externalFilter = {}; + + /// Resampler used by audio generation code. + std::unique_ptr resampler = {}; + + /// Paddle X register support + std::unique_ptr const potX; + + /// Paddle Y register support + std::unique_ptr const potY; + + /// SID voices + std::unique_ptr voice[3] = {}; + + /// Time to live for the last written value + int busValueTtl = 0; + + /// Current chip model's bus value TTL + int modelTTL = 0; + + /// Time until #voiceSync must be run. + unsigned int nextVoiceSync = 0; + + /// Currently active chip model. + ChipModel model = MOS6581; + + /// Last written value + unsigned char busValue = 0; + + /// Flags for muted channels + bool muted[3] = {}; + +private: + /** + * Age the bus value and zero it if it's TTL has expired. + * + * @param n the number of cycles + */ + void ageBusValue(unsigned int n); + + /** + * Get output sample. + * + * @return the output sample + */ + int output() const; + + /** + * Calculate the numebr of cycles according to current parameters + * that it takes to reach sync. + * + * @param sync whether to do the actual voice synchronization + */ + void voiceSync(bool sync); + +public: + SID(); + ~SID(); + SID(const SID&) = delete; // prevent copy + SID &operator=(const SID&) = delete; // prevent assignment + + /** + * Set chip model. + * + * @param model chip model to use + * @throw SIDError + */ + void setChipModel(ChipModel model); + + /** + * Get currently emulated chip model. + */ + ChipModel getChipModel() const { return model; } + + /** + * SID reset. + */ + void reset(); + + /** + * 16-bit input (EXT IN). Write 16-bit sample to audio input. NB! The caller + * is responsible for keeping the value within 16 bits. Note that to mix in + * an external audio signal, the signal should be resampled to 1MHz first to + * avoid sampling noise. + * + * @param value input level to set + */ + void input(int value); + + /** + * Read registers. + * + * Reading a write only register returns the last char written to any SID register. + * The individual bits in this value start to fade down towards zero after a few cycles. + * All bits reach zero within approximately $2000 - $4000 cycles. + * It has been claimed that this fading happens in an orderly fashion, + * however sampling of write only registers reveals that this is not the case. + * NOTE: This is not correctly modeled. + * The actual use of write only registers has largely been made + * in the belief that all SID registers are readable. + * To support this belief the read would have to be done immediately + * after a write to the same register (remember that an intermediate write + * to another register would yield that value instead). + * With this in mind we return the last value written to any SID register + * for $2000 cycles without modeling the bit fading. + * + * @param offset SID register to read + * @return value read from chip + */ + unsigned char read(int offset); + + /** + * Write registers. + * + * @param offset chip register to write + * @param value value to write + */ + void write(int offset, unsigned char value); + + /** + * SID voice muting. + * + * @param channel channel to modify + * @param enable is muted? + */ + void mute(int channel, bool enable) { muted[channel] = enable; } + + /** + * Setting of SID sampling parameters. + * + * Use a clock freqency of 985248Hz for PAL C64, 1022730Hz for NTSC C64. + * The default end of passband frequency is pass_freq = 0.9*sample_freq/2 + * for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample frequencies. + * + * For resampling, the ratio between the clock frequency and the sample frequency + * is limited as follows: 125*clock_freq/sample_freq < 16384 + * E.g. provided a clock frequency of ~ 1MHz, the sample frequency can not be set + * lower than ~ 8kHz. A lower sample frequency would make the resampling code + * overfill its 16k sample ring buffer. + * + * The end of passband frequency is also limited: pass_freq <= 0.9*sample_freq/2 + * + * E.g. for a 44.1kHz sampling rate the end of passband frequency + * is limited to slightly below 20kHz. + * This constraint ensures that the FIR table is not overfilled. + * + * @param clockFrequency System clock frequency at Hz + * @param method sampling method to use + * @param samplingFrequency Desired output sampling rate + * @param highestAccurateFrequency + * @throw SIDError + */ + void setSamplingParameters(double clockFrequency, SamplingMethod method, double samplingFrequency, double highestAccurateFrequency); + + /** + * Clock SID forward using chosen output sampling algorithm. + * + * @param cycles c64 clocks to clock + * @param buf audio output buffer + * @return number of samples produced + */ + int clock(unsigned int cycles, short* buf); + + /** + * Clock SID forward with no audio production. + * + * _Warning_: + * You can't mix this method of clocking with the audio-producing + * clock() because components that don't affect OSC3/ENV3 are not + * emulated. + * + * @param cycles c64 clocks to clock. + */ + void clockSilent(unsigned int cycles); + + /** + * Set filter curve parameter for 6581 model. + * + * @see Filter6581::setFilterCurve(double) + */ + void setFilter6581Curve(double filterCurve); + + /** + * Set filter curve parameter for 8580 model. + * + * @see Filter8580::setFilterCurve(double) + */ + void setFilter8580Curve(double filterCurve); + + /** + * Enable filter emulation. + * + * @param enable false to turn off filter emulation + */ + void enableFilter(bool enable); +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(SID_CPP) + +#include + +#include "Filter.h" +#include "ExternalFilter.h" +#include "Voice.h" +#include "resample/Resampler.h" + +namespace reSIDfp +{ + +RESID_INLINE +void SID::ageBusValue(unsigned int n) +{ + if (likely(busValueTtl != 0)) + { + busValueTtl -= n; + + if (unlikely(busValueTtl <= 0)) + { + busValue = 0; + busValueTtl = 0; + } + } +} + +RESID_INLINE +int SID::output() const +{ + const int v1 = voice[0]->output(voice[2]->wave()); + const int v2 = voice[1]->output(voice[0]->wave()); + const int v3 = voice[2]->output(voice[1]->wave()); + + return externalFilter->clock(filter->clock(v1, v2, v3)); +} + + +RESID_INLINE +int SID::clock(unsigned int cycles, short* buf) +{ + ageBusValue(cycles); + int s = 0; + + while (cycles != 0) + { + unsigned int delta_t = std::min(nextVoiceSync, cycles); + + if (likely(delta_t > 0)) + { + for (unsigned int i = 0; i < delta_t; i++) + { + // clock waveform generators + voice[0]->wave()->clock(); + voice[1]->wave()->clock(); + voice[2]->wave()->clock(); + + // clock envelope generators + voice[0]->envelope()->clock(); + voice[1]->envelope()->clock(); + voice[2]->envelope()->clock(); + + if (unlikely(resampler->input(output()))) + { + buf[s++] = resampler->getOutput(); + } + } + + cycles -= delta_t; + nextVoiceSync -= delta_t; + } + + if (unlikely(nextVoiceSync == 0)) + { + voiceSync(true); + } + } + + return s; +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Spline.cpp dosbox-staging-0.77.0/src/libs/residfp/Spline.cpp --- dosbox-staging-0.76.0/src/libs/residfp/Spline.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Spline.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "Spline.h" + +#include +#include + +namespace reSIDfp +{ + +Spline::Spline(const Point input[], size_t inputLength) : + params(inputLength), + c(¶ms[0]) +{ + assert(inputLength > 2); + + const size_t coeffLength = inputLength - 1; + + std::vector dxs(coeffLength); + std::vector ms(coeffLength); + + // Get consecutive differences and slopes + for (size_t i = 0; i < coeffLength; i++) + { + assert(input[i].x < input[i + 1].x); + + const double dx = input[i + 1].x - input[i].x; + const double dy = input[i + 1].y - input[i].y; + dxs[i] = dx; + ms[i] = dy/dx; + } + + // Get degree-1 coefficients + params[0].c = ms[0]; + for (size_t i = 1; i < coeffLength; i++) + { + const double m = ms[i - 1]; + const double mNext = ms[i]; + if (m * mNext <= 0) + { + params[i].c = 0.0; + } + else + { + const double dx = dxs[i - 1]; + const double dxNext = dxs[i]; + const double common = dx + dxNext; + params[i].c = 3.0 * common / ((common + dxNext) / m + (common + dx) / mNext); + } + } + params[coeffLength].c = ms[coeffLength - 1]; + + // Get degree-2 and degree-3 coefficients + for (size_t i = 0; i < coeffLength; i++) + { + params[i].x1 = input[i].x; + params[i].x2 = input[i + 1].x; + params[i].d = input[i].y; + + const double c1 = params[i].c; + const double m = ms[i]; + const double invDx = 1.0 / dxs[i]; + const double common = c1 + params[i + 1].c - m - m; + params[i].b = (m - c1 - common) * invDx; + params[i].a = common * invDx * invDx; + } + + // Fix the upper range, because we interpolate outside original bounds if necessary. + params[coeffLength - 1].x2 = std::numeric_limits::max(); +} + +Spline::Point Spline::evaluate(double x) const +{ + if ((x < c->x1) || (x > c->x2)) + { + for (size_t i = 0; i < params.size(); i++) + { + if (x <= params[i].x2) + { + c = ¶ms[i]; + break; + } + } + } + + // Interpolate + const double diff = x - c->x1; + + Point out; + + // y = a*x^3 + b*x^2 + c*x + d + out.x = ((c->a * diff + c->b) * diff + c->c) * diff + c->d; + + // dy = 3*a*x^2 + 2*b*x + c + out.y = (3.0 * c->a * diff + 2.0 * c->b) * diff + c->c; + + return out; +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Spline.h dosbox-staging-0.77.0/src/libs/residfp/Spline.h --- dosbox-staging-0.76.0/src/libs/residfp/Spline.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Spline.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,82 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SPLINE_H +#define SPLINE_H + +#include +#include + +namespace reSIDfp +{ + +/** + * Fritsch-Carlson monotone cubic spline interpolation. + * + * Based on the implementation from the [Monotone cubic interpolation] wikipedia page. + * + * [Monotone cubic interpolation]: https://en.wikipedia.org/wiki/Monotone_cubic_interpolation + */ +class Spline +{ +public: + typedef struct + { + double x; + double y; + } Point; + +private: + typedef struct + { + double x1; + double x2; + double a; + double b; + double c; + double d; + } Param; + + typedef std::vector ParamVector; + +private: + /// Interpolation parameters + ParamVector params; + + /// Last used parameters, cached for speed up + mutable ParamVector::const_pointer c; + +public: + Spline(const Point input[], size_t inputLength); + + Spline(const Spline&) = delete; // prevent copy + + Spline &operator=(const Spline&) = delete; // prevent assignment + + /** + * Evaluate y and its derivative at given point x. + */ + Point evaluate(double x) const; +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/version.cc dosbox-staging-0.77.0/src/libs/residfp/version.cc --- dosbox-staging-0.76.0/src/libs/residfp/version.cc 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/version.cc 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,21 @@ +// --------------------------------------------------------------------------- +// This file is part of reSID, a MOS6581 SID emulator engine. +// Copyright (C) 2004 Dag Lem +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// --------------------------------------------------------------------------- + +#define __VERSION_CC__ +#include "siddefs-fp.h" diff -Nru dosbox-staging-0.76.0/src/libs/residfp/Voice.h dosbox-staging-0.77.0/src/libs/residfp/Voice.h --- dosbox-staging-0.76.0/src/libs/residfp/Voice.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/Voice.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,100 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef VOICE_H +#define VOICE_H + +#include + +#include "siddefs-fp.h" +#include "WaveformGenerator.h" +#include "EnvelopeGenerator.h" + +namespace reSIDfp +{ + +/** + * Representation of SID voice block. + */ +class Voice +{ +private: + std::unique_ptr const waveformGenerator; + + std::unique_ptr const envelopeGenerator; + +public: + /** + * Amplitude modulated waveform output. + * + * The waveform DAC generates a voltage between 5 and 12 V corresponding + * to oscillator state 0 .. 4095. + * + * The envelope DAC generates a voltage between waveform gen output and + * the 5V level, corresponding to envelope state 0 .. 255. + * + * Ideal range [-2048*255, 2047*255]. + * + * @param ringModulator Ring-modulator for waveform + * @return waveformgenerator output + */ + RESID_INLINE + int output(const WaveformGenerator* ringModulator) const + { + return static_cast(waveformGenerator->output(ringModulator) * envelopeGenerator->output()); + } + + /** + * Constructor. + */ + Voice() : + waveformGenerator(new WaveformGenerator()), + envelopeGenerator(new EnvelopeGenerator()) {} + + WaveformGenerator* wave() const { return waveformGenerator.get(); } + + EnvelopeGenerator* envelope() const { return envelopeGenerator.get(); } + + /** + * Write control register. + * + * @param control Control register value. + */ + void writeCONTROL_REG(unsigned char control) + { + waveformGenerator->writeCONTROL_REG(control); + envelopeGenerator->writeCONTROL_REG(control); + } + + /** + * SID reset. + */ + void reset() + { + waveformGenerator->reset(); + envelopeGenerator->reset(); + } +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/WaveformCalculator.cpp dosbox-staging-0.77.0/src/libs/residfp/WaveformCalculator.cpp --- dosbox-staging-0.76.0/src/libs/residfp/WaveformCalculator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/WaveformCalculator.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,201 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "WaveformCalculator.h" + +#include + +namespace reSIDfp +{ + +WaveformCalculator* WaveformCalculator::getInstance() +{ + static WaveformCalculator instance; + return &instance; +} + +/** + * Parameters derived with the Monte Carlo method based on + * samplings by kevtris. Code and data available in the project repository [1]. + * + * The score here reported is the acoustic error + * calculated XORing the estimated and the sampled values. + * In parentheses the number of mispredicted bits + * on a total of 32768. + * + * [1] http://svn.code.sf.net/p/sidplay-residfp/code/trunk/combined-waveforms/ + */ +const CombinedWaveformConfig config[2][4] = +{ + { /* kevtris chip G (6581 R2) */ + {0.90251f, 0.f, 0.f, 1.9147f, 1.6747f, 0.62376f }, // error 1689 (280) + {0.93088f, 2.4843f, 0.f, 1.0353f, 1.1484f, 0.f }, // error 6128 (130) + {0.90988f, 2.26303f, 1.13126f, 1.0035f, 1.13801f, 0.f }, // error 14243 (632) + {0.91f, 1.192f, 0.f, 1.0169f, 1.2f, 0.637f }, // error 64 (2) + }, + { /* kevtris chip V (8580 R5) */ + {0.9632f, 0.f, 0.975f, 1.7467f, 2.36132f, 0.975395f}, // error 1380 (169) + {0.92886f, 1.67696f, 0.f, 1.1014f, 1.4352f, 0.f }, // error 8007 (218) + {0.94043f, 1.7937f, 0.981f, 1.1213f, 1.4259f, 0.f }, // error 11957 (362) + {0.96211f, 0.98695f, 1.00387f, 1.46499f, 1.98375f, 0.77777f }, // error 2369 (89) + }, +}; + +/** + * Generate bitstate based on emulation of combined waves. + * + * @param config model parameters matrix + * @param waveform the waveform to emulate, 1 .. 7 + * @param accumulator the high bits of the accumulator value + */ +short calculateCombinedWaveform(const CombinedWaveformConfig& config, int waveform, int accumulator) +{ + float o[12]; + + // Saw + for (unsigned int i = 0; i < 12; i++) + { + o[i] = (accumulator & (1 << i)) != 0 ? 1.f : 0.f; + } + + // convert to Triangle + if ((waveform & 3) == 1) + { + const bool top = (accumulator & 0x800) != 0; + + for (int i = 11; i > 0; i--) + { + o[i] = top ? 1.0f - o[i - 1] : o[i - 1]; + } + + o[0] = 0.f; + } + + // or to Saw+Triangle + else if ((waveform & 3) == 3) + { + // bottom bit is grounded via T waveform selector + o[0] *= config.stmix; + + for (int i = 1; i < 12; i++) + { + /* + * Enabling the S waveform pulls the XOR circuit selector transistor down + * (which would normally make the descending ramp of the triangle waveform), + * so ST does not actually have a sawtooth and triangle waveform combined, + * but merely combines two sawtooths, one rising double the speed the other. + * + * http://www.lemon64.com/forum/viewtopic.php?t=25442&postdays=0&postorder=asc&start=165 + */ + o[i] = o[i - 1] * (1.f - config.stmix) + o[i] * config.stmix; + } + } + + // topbit for Saw + if ((waveform & 2) == 2) + { + o[11] *= config.topbit; + } + + // ST, P* waveforms + if (waveform == 3 || waveform > 4) + { + float distancetable[12 * 2 + 1]; + distancetable[12] = 1.f; + for (int i = 12; i > 0; i--) + { + distancetable[12-i] = 1.0f / powf(config.distance1, static_cast(i)); + distancetable[12+i] = 1.0f / powf(config.distance2, static_cast(i)); + } + + float tmp[12]; + + for (int i = 0; i < 12; i++) + { + float avg = 0.f; + float n = 0.f; + + for (int j = 0; j < 12; j++) + { + const float weight = distancetable[i - j + 12]; + avg += o[j] * weight; + n += weight; + } + + // pulse control bit + if (waveform > 4) + { + const float weight = distancetable[i - 12 + 12]; + avg += config.pulsestrength * weight; + n += weight; + } + + tmp[i] = (o[i] + avg / n) * 0.5f; + } + + for (int i = 0; i < 12; i++) + { + o[i] = tmp[i]; + } + } + + short value = 0; + + for (unsigned int i = 0; i < 12; i++) + { + if (o[i] > config.bias) + { + value |= 1 << i; + } + } + + return value; +} + +matrix_t* WaveformCalculator::buildTable(ChipModel model) +{ + const CombinedWaveformConfig* cfgArray = config[model == MOS6581 ? 0 : 1]; + + cw_cache_t::iterator lb = CACHE.lower_bound(cfgArray); + + if (lb != CACHE.end() && !(CACHE.key_comp()(cfgArray, lb->first))) + { + return &(lb->second); + } + + matrix_t wftable(8, 4096); + + for (unsigned int idx = 0; idx < 1 << 12; idx++) + { + wftable[0][idx] = 0xfff; + wftable[1][idx] = static_cast((idx & 0x800) == 0 ? idx << 1 : (idx ^ 0xfff) << 1); + wftable[2][idx] = static_cast(idx); + wftable[3][idx] = calculateCombinedWaveform(cfgArray[0], 3, idx); + wftable[4][idx] = 0xfff; + wftable[5][idx] = calculateCombinedWaveform(cfgArray[1], 5, idx); + wftable[6][idx] = calculateCombinedWaveform(cfgArray[2], 6, idx); + wftable[7][idx] = calculateCombinedWaveform(cfgArray[3], 7, idx); + } + + return &(CACHE.insert(lb, cw_cache_t::value_type(cfgArray, wftable))->second); +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/WaveformCalculator.h dosbox-staging-0.77.0/src/libs/residfp/WaveformCalculator.h --- dosbox-staging-0.76.0/src/libs/residfp/WaveformCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/WaveformCalculator.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef WAVEFORMCALCULATOR_h +#define WAVEFORMCALCULATOR_h + +#include + +#include "siddefs-fp.h" +#include "array.h" + + +namespace reSIDfp +{ + +/** + * Combined waveform model parameters. + */ +typedef struct +{ + float bias; + float pulsestrength; + float topbit; + float distance1; + float distance2; + float stmix; +} CombinedWaveformConfig; + +/** + * Combined waveform calculator for WaveformGenerator. + * By combining waveforms, the bits of each waveform are effectively short + * circuited. A zero bit in one waveform will result in a zero output bit + * (thus the infamous claim that the waveforms are AND'ed). + * However, a zero bit in one waveform may also affect the neighboring bits + * in the output. + * + * Example: + * + * 1 1 + * Bit # 1 0 9 8 7 6 5 4 3 2 1 0 + * ----------------------- + * Sawtooth 0 0 0 1 1 1 1 1 1 0 0 0 + * + * Triangle 0 0 1 1 1 1 1 1 0 0 0 0 + * + * AND 0 0 0 1 1 1 1 1 0 0 0 0 + * + * Output 0 0 0 0 1 1 1 0 0 0 0 0 + * + * + * Re-vectorized die photographs reveal the mechanism behind this behavior. + * Each waveform selector bit acts as a switch, which directly connects + * internal outputs into the waveform DAC inputs as follows: + * + * - Noise outputs the shift register bits to DAC inputs as described above. + * Each output is also used as input to the next bit when the shift register + * is shifted. + * - Pulse connects a single line to all DAC inputs. The line is connected to + * either 5V (pulse on) or 0V (pulse off) at bit 11, and ends at bit 0. + * - Triangle connects the upper 11 bits of the (MSB EOR'ed) accumulator to the + * DAC inputs, so that DAC bit 0 = 0, DAC bit n = accumulator bit n - 1. + * - Sawtooth connects the upper 12 bits of the accumulator to the DAC inputs, + * so that DAC bit n = accumulator bit n. Sawtooth blocks out the MSB from + * the EOR used to generate the triangle waveform. + * + * We can thus draw the following conclusions: + * + * - The shift register may be written to by combined waveforms. + * - The pulse waveform interconnects all bits in combined waveforms via the + * pulse line. + * - The combination of triangle and sawtooth interconnects neighboring bits + * of the sawtooth waveform. + */ +class WaveformCalculator +{ +private: + typedef std::map cw_cache_t; + +private: + cw_cache_t CACHE = {}; + + WaveformCalculator() {} + +public: + /** + * Get the singleton instance. + */ + static WaveformCalculator* getInstance(); + + /** + * Build waveform tables for use by WaveformGenerator. + * + * @param model Chip model to use + * @return Waveform table + */ + matrix_t* buildTable(ChipModel model); +}; + +} // namespace reSIDfp + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/residfp/WaveformGenerator.cpp dosbox-staging-0.77.0/src/libs/residfp/WaveformGenerator.cpp --- dosbox-staging-0.76.0/src/libs/residfp/WaveformGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/WaveformGenerator.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,380 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2021 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#define WAVEFORMGENERATOR_CPP + +#include "WaveformGenerator.h" + +#include "Dac.h" + +/* + * This fixes tests + * SID/wb_testsuite/noise_writeback_check_8_to_C_old + * SID/wb_testsuite/noise_writeback_check_9_to_C_old + * SID/wb_testsuite/noise_writeback_check_A_to_C_old + * SID/wb_testsuite/noise_writeback_check_C_to_C_old + * + * but breaks SID/wf12nsr/wf12nsr + * + * needs more digging... + */ +//#define NO_WB_NOI_PUL + +namespace reSIDfp +{ + +/** + * Number of cycles after which the waveform output fades to 0 when setting + * the waveform register to 0. + * Values measured on warm chips (6581R3/R4 and 8580R5) + * checking OSC3. + * Times vary wildly with temperature and may differ + * from chip to chip so the numbers here represent + * only the big difference between the old and new models. + * + * See [VICE Bug #290](http://sourceforge.net/p/vice-emu/bugs/290/) + * and [VICE Bug #1128](http://sourceforge.net/p/vice-emu/bugs/1128/) + */ +// ~95ms +const unsigned int FLOATING_OUTPUT_TTL_6581R3 = 54000; +const unsigned int FLOATING_OUTPUT_FADE_6581R3 = 1400; +// ~1s +// const unsigned int FLOATING_OUTPUT_TTL_6581R4 = 1000000; // unused +// ~1s +const unsigned int FLOATING_OUTPUT_TTL_8580R5 = 800000; +const unsigned int FLOATING_OUTPUT_FADE_8580R5 = 50000; + +/** + * Number of cycles after which the shift register is reset + * when the test bit is set. + * Values measured on warm chips (6581R3/R4 and 8580R5) + * checking OSC3. + * Times vary wildly with temperature and may differ + * from chip to chip so the numbers here represent + * only the big difference between the old and new models. + */ +// ~210ms +const unsigned int SHIFT_REGISTER_RESET_6581R3 = 50000; +const unsigned int SHIFT_REGISTER_FADE_6581R3 = 15000; +// ~2.15s +// const unsigned int SHIFT_REGISTER_RESET_6581R4 = 2150000; // unused +// ~2.8s +const unsigned int SHIFT_REGISTER_RESET_8580R5 = 986000; +const unsigned int SHIFT_REGISTER_FADE_8580R5 = 314300; + +const int DAC_BITS = 12; + +/* + * This is what happens when the lfsr is clocked: + * + * cycle 0: bit 19 of the accumulator goes from low to high, the noise register acts normally, + * the output may overwrite a bit; + * + * cycle 1: first phase of the shift, the bits are interconnected and the output of each bit + * is latched into the following. The output may overwrite the latched value. + * + * cycle 2: second phase of the shift, the latched value becomes active in the first + * half of the clock and from the second half the register returns to normal operation. + * + * When the test or reset lines are active the first phase is executed at every cyle + * until the signal is released triggering the second phase. + */ +void WaveformGenerator::clock_shift_register(unsigned int bit0) +{ + shift_register = (shift_register >> 1) | bit0; + + // New noise waveform output. + set_noise_output(); +} + +unsigned int WaveformGenerator::get_noise_writeback() +{ + return + ~( + (1 << 2) | // Bit 20 + (1 << 4) | // Bit 18 + (1 << 8) | // Bit 14 + (1 << 11) | // Bit 11 + (1 << 13) | // Bit 9 + (1 << 17) | // Bit 5 + (1 << 20) | // Bit 2 + (1 << 22) // Bit 0 + ) | + ((waveform_output & (1 << 11)) >> 9) | // Bit 11 -> bit 20 + ((waveform_output & (1 << 10)) >> 6) | // Bit 10 -> bit 18 + ((waveform_output & (1 << 9)) >> 1) | // Bit 9 -> bit 14 + ((waveform_output & (1 << 8)) << 3) | // Bit 8 -> bit 11 + ((waveform_output & (1 << 7)) << 6) | // Bit 7 -> bit 9 + ((waveform_output & (1 << 6)) << 11) | // Bit 6 -> bit 5 + ((waveform_output & (1 << 5)) << 15) | // Bit 5 -> bit 2 + ((waveform_output & (1 << 4)) << 18); // Bit 4 -> bit 0 +} + +void WaveformGenerator::write_shift_register() +{ + if (unlikely(waveform > 0x8) && likely(!test) && likely(shift_pipeline != 1)) + { + // Write changes to the shift register output caused by combined waveforms + // back into the shift register. This happens only when the register is clocked + // (see $D1+$81_wave_test [1]) or when the test bit is set. + // A bit once set to zero cannot be changed, hence the and'ing. + // + // [1] ftp://ftp.untergrund.net/users/nata/sid_test/$D1+$81_wave_test.7z + // + // FIXME: Write test program to check the effect of 1 bits and whether + // neighboring bits are affected. + +#ifdef NO_WB_NOI_PUL + if (waveform == 0xc) + return; +#endif + shift_register &= get_noise_writeback(); + + noise_output &= waveform_output; + set_no_noise_or_noise_output(); + } +} + +void WaveformGenerator::set_noise_output() +{ + noise_output = + ((shift_register & (1 << 2)) << 9) | // Bit 20 -> bit 11 + ((shift_register & (1 << 4)) << 6) | // Bit 18 -> bit 10 + ((shift_register & (1 << 8)) << 1) | // Bit 14 -> bit 9 + ((shift_register & (1 << 11)) >> 3) | // Bit 11 -> bit 8 + ((shift_register & (1 << 13)) >> 6) | // Bit 9 -> bit 7 + ((shift_register & (1 << 17)) >> 11) | // Bit 5 -> bit 6 + ((shift_register & (1 << 20)) >> 15) | // Bit 2 -> bit 5 + ((shift_register & (1 << 22)) >> 18); // Bit 0 -> bit 4 + + set_no_noise_or_noise_output(); +} + +void WaveformGenerator::setWaveformModels(matrix_t* models) +{ + model_wave = models; +} + +void WaveformGenerator::setChipModel(ChipModel chipModel) +{ + is6581 = chipModel == MOS6581; + + Dac dacBuilder(DAC_BITS); + dacBuilder.kinkedDac(chipModel); + + const double offset = dacBuilder.getOutput(is6581 ? 0x380 : 0x9c0); + + for (unsigned int i = 0; i < (1 << DAC_BITS); i++) + { + const double dacValue = dacBuilder.getOutput(i); + dac[i] = static_cast(dacValue - offset); + } +} + +void WaveformGenerator::synchronize(WaveformGenerator* syncDest, const WaveformGenerator* syncSource) const +{ + // A special case occurs when a sync source is synced itself on the same + // cycle as when its MSB is set high. In this case the destination will + // not be synced. This has been verified by sampling OSC3. + if (unlikely(msb_rising) && syncDest->sync && !(sync && syncSource->msb_rising)) + { + syncDest->accumulator = 0; + } +} + +bool do_pre_writeback(unsigned int waveform_prev, unsigned int waveform, bool is6581) +{ + // no writeback without combined waveforms + if (likely(waveform_prev <= 0x8)) + return false; + // no writeback when changing to noise + if (waveform == 8) + return false; + // What's happening here? + if (is6581 && + ((((waveform_prev & 0x3) == 0x1) && ((waveform & 0x3) == 0x2)) + || (((waveform_prev & 0x3) == 0x2) && ((waveform & 0x3) == 0x1)))) + return false; + if (waveform_prev == 0xc) + { + if (is6581) + return false; + else if ((waveform != 0x9) && (waveform != 0xe)) + return false; + } +#ifdef NO_WB_NOI_PUL + if (waveform == 0xc) + return false; +#endif + // ok do the writeback + return true; +} + +/* + * When noise and pulse are combined all the bits are + * connected and the four lower ones are grounded. + * This causes the adjacent bits to be pulled down, + * with different strength depending on model. + * + * This is just a rough attempt at modelling the effect. + */ + +static unsigned int noise_pulse6581(unsigned int noise) +{ + return (noise < 0xf00) ? 0x000 : noise & (noise << 1) & (noise << 2); +} + +static unsigned int noise_pulse8580(unsigned int noise) +{ + return (noise < 0xfc0) ? noise & (noise << 1) : 0xfc0; +} + +void WaveformGenerator::set_no_noise_or_noise_output() +{ + no_noise_or_noise_output = no_noise | noise_output; + + // pulse+noise + if (unlikely((waveform & 0xc) == 0xc)) + no_noise_or_noise_output = is6581 + ? noise_pulse6581(no_noise_or_noise_output) + : noise_pulse8580(no_noise_or_noise_output); + +} + +void WaveformGenerator::writeCONTROL_REG(unsigned char control) +{ + const unsigned int waveform_prev = waveform; + const bool test_prev = test; + + waveform = (control >> 4) & 0x0f; + test = (control & 0x08) != 0; + sync = (control & 0x02) != 0; + + // Substitution of accumulator MSB when sawtooth = 0, ring_mod = 1. + ring_msb_mask = ((~control >> 5) & (control >> 2) & 0x1) << 23; + + if (waveform != waveform_prev) + { + // Set up waveform table. + wave = (*model_wave)[waveform & 0x7]; + + // no_noise and no_pulse are used in set_waveform_output() as bitmasks to + // only let the noise or pulse influence the output when the noise or pulse + // waveforms are selected. + no_noise = (waveform & 0x8) != 0 ? 0x000 : 0xfff; + set_no_noise_or_noise_output(); + no_pulse = (waveform & 0x4) != 0 ? 0x000 : 0xfff; + + if (waveform == 0) + { + // Change to floating DAC input. + // Reset fading time for floating DAC input. + floating_output_ttl = is6581 ? FLOATING_OUTPUT_TTL_6581R3 : FLOATING_OUTPUT_TTL_8580R5; + } + } + + if (test != test_prev) + { + if (test) + { + // Reset accumulator. + accumulator = 0; + + // Flush shift pipeline. + shift_pipeline = 0; + + // Set reset time for shift register. + shift_register_reset = is6581 ? SHIFT_REGISTER_RESET_6581R3 : SHIFT_REGISTER_RESET_8580R5; + } + else + { + // When the test bit is falling, the second phase of the shift is + // completed by enabling SRAM write. + + // During first phase of the shift the bits are interconnected + // and the output of each bit is latched into the following. + // The output may overwrite the latched value. + if (do_pre_writeback(waveform_prev, waveform, is6581)) + { + shift_register &= get_noise_writeback(); + } + + // bit0 = (bit22 | test) ^ bit17 = 1 ^ bit17 = ~bit17 + clock_shift_register((~shift_register << 17) & (1 << 22)); + + // New noise waveform output. + set_noise_output(); + } + } +} + +void WaveformGenerator::waveBitfade() +{ + waveform_output &= waveform_output >> 1; + osc3 = waveform_output; + if (waveform_output != 0) + floating_output_ttl = is6581 ? FLOATING_OUTPUT_FADE_6581R3 : FLOATING_OUTPUT_FADE_8580R5; +} + +void WaveformGenerator::shiftregBitfade() +{ + shift_register |= shift_register >> 1; + shift_register |= 0x400000; + if (shift_register != 0x7fffff) + shift_register_reset = is6581 ? SHIFT_REGISTER_FADE_6581R3 : SHIFT_REGISTER_FADE_8580R5; +} + +void WaveformGenerator::reset() +{ + // accumulator is not changed on reset + freq = 0; + pw = 0; + + msb_rising = false; + + waveform = 0; + osc3 = 0; + + test = false; + sync = false; + + wave = model_wave ? (*model_wave)[0] : nullptr; + + ring_msb_mask = 0; + no_noise = 0xfff; + no_pulse = 0xfff; + pulse_output = 0xfff; + + shift_register_reset = 0; + shift_register = 0x7fffff; + // when reset is released the shift register is clocked once + // so the lower bit is zeroed out + // bit0 = (bit22 | test) ^ bit17 = 1 ^ 1 = 0 + clock_shift_register(0); + + shift_pipeline = 0; + + waveform_output = 0; + floating_output_ttl = 0; +} + +} // namespace reSIDfp diff -Nru dosbox-staging-0.76.0/src/libs/residfp/WaveformGenerator.h dosbox-staging-0.77.0/src/libs/residfp/WaveformGenerator.h --- dosbox-staging-0.76.0/src/libs/residfp/WaveformGenerator.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/residfp/WaveformGenerator.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,397 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef WAVEFORMGENERATOR_H +#define WAVEFORMGENERATOR_H + +#include "siddefs-fp.h" +#include "array.h" + +namespace reSIDfp +{ + +/** + * A 24 bit accumulator is the basis for waveform generation. + * FREQ is added to the lower 16 bits of the accumulator each cycle. + * The accumulator is set to zero when TEST is set, and starts counting + * when TEST is cleared. + * + * Waveforms are generated as follows: + * + * - No waveform: + * When no waveform is selected, the DAC input is floating. + * + * + * - Triangle: + * The upper 12 bits of the accumulator are used. + * The MSB is used to create the falling edge of the triangle by inverting + * the lower 11 bits. The MSB is thrown away and the lower 11 bits are + * left-shifted (half the resolution, full amplitude). + * Ring modulation substitutes the MSB with MSB EOR NOT sync_source MSB. + * + * + * - Sawtooth: + * The output is identical to the upper 12 bits of the accumulator. + * + * + * - Pulse: + * The upper 12 bits of the accumulator are used. + * These bits are compared to the pulse width register by a 12 bit digital + * comparator; output is either all one or all zero bits. + * The pulse setting is delayed one cycle after the compare. + * The test bit, when set to one, holds the pulse waveform output at 0xfff + * regardless of the pulse width setting. + * + * + * - Noise: + * The noise output is taken from intermediate bits of a 23-bit shift register + * which is clocked by bit 19 of the accumulator. + * The shift is delayed 2 cycles after bit 19 is set high. + * + * Operation: Calculate EOR result, shift register, set bit 0 = result. + * + * reset +-------------------------------------------+ + * | | | + * test--OR-->EOR<--+ | + * | | | + * 2 2 2 1 1 1 1 1 1 1 1 1 1 | + * Register bits: 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 <---+ + * | | | | | | | | + * Waveform bits: 1 1 9 8 7 6 5 4 + * 1 0 + * + * The low 4 waveform bits are zero (grounded). + */ +class WaveformGenerator +{ +private: + matrix_t* model_wave = nullptr; + + short* wave = nullptr; + + // PWout = (PWn/40.95)% + unsigned int pw = 0; + + unsigned int shift_register = 0; + + /// Emulation of pipeline causing bit 19 to clock the shift register. + int shift_pipeline = 0; + + unsigned int ring_msb_mask = 0; + unsigned int no_noise = 0; + unsigned int noise_output = 0; + unsigned int no_noise_or_noise_output = 0; + unsigned int no_pulse = 0; + unsigned int pulse_output = 0; + + /// The control register right-shifted 4 bits; used for output function table lookup. + unsigned int waveform = 0; + + unsigned int waveform_output = 0; + + /// Current and previous accumulator value. + unsigned int accumulator = 0; + + // Fout = (Fn*Fclk/16777216)Hz + unsigned int freq = 0; + + // 8580 tri/saw pipeline + unsigned int tri_saw_pipeline = 0; + unsigned int osc3 = 0; + + /// Remaining time to fully reset shift register. + unsigned int shift_register_reset = 0; + + unsigned int floating_output_ttl = 0; + + /// The control register bits. Gate is handled by EnvelopeGenerator. + //@{ + bool test = false; + bool sync = false; + //@} + + /// Tell whether the accumulator MSB was set high on this cycle. + bool msb_rising = false; + + bool is6581 = false; + + float dac[4096] = {}; + +private: + void clock_shift_register(unsigned int bit0); + + unsigned int get_noise_writeback(); + + void write_shift_register(); + + void set_noise_output(); + + void set_no_noise_or_noise_output(); + + void waveBitfade(); + + void shiftregBitfade(); + +public: + void setWaveformModels(matrix_t* models); + + /** + * Set the chip model. + * This determines the type of the analog DAC emulation: + * 8580 is perfectly linear while 6581 is nonlinear. + * + * @param chipModel + */ + void setChipModel(ChipModel chipModel); + + /** + * SID clocking - 1 cycle. + */ + void clock(); + + /** + * Synchronize oscillators. + * This must be done after all the oscillators have been clock()'ed, + * so that they are in the same state. + * + * @param syncDest The oscillator I am syncing + * @param syncSource The oscillator syncing me. + */ + void synchronize(WaveformGenerator* syncDest, const WaveformGenerator* syncSource) const; + + /** + * Constructor. + */ + WaveformGenerator() : + model_wave(nullptr), + wave(nullptr), + pw(0), + shift_register(0), + shift_pipeline(0), + ring_msb_mask(0), + no_noise(0), + noise_output(0), + no_noise_or_noise_output(0), + no_pulse(0), + pulse_output(0), + waveform(0), + waveform_output(0), + accumulator(0x555555), // Accumulator's even bits are high on powerup + freq(0), + tri_saw_pipeline(0x555), + osc3(0), + shift_register_reset(0), + floating_output_ttl(0), + test(false), + sync(false), + msb_rising(false), + is6581(true) {} + + /** + * Write FREQ LO register. + * + * @param freq_lo low 8 bits of frequency + */ + void writeFREQ_LO(unsigned char freq_lo) { freq = (freq & 0xff00) | (freq_lo & 0xff); } + + /** + * Write FREQ HI register. + * + * @param freq_hi high 8 bits of frequency + */ + void writeFREQ_HI(unsigned char freq_hi) { freq = (freq_hi << 8 & 0xff00) | (freq & 0xff); } + + /** + * Write PW LO register. + * + * @param pw_lo low 8 bits of pulse width + */ + void writePW_LO(unsigned char pw_lo) { pw = (pw & 0xf00) | (pw_lo & 0x0ff); } + + /** + * Write PW HI register. + * + * @param pw_hi high 8 bits of pulse width + */ + void writePW_HI(unsigned char pw_hi) { pw = (pw_hi << 8 & 0xf00) | (pw & 0x0ff); } + + /** + * Write CONTROL REGISTER register. + * + * @param control control register value + */ + void writeCONTROL_REG(unsigned char control); + + /** + * SID reset. + */ + void reset(); + + /** + * 12-bit waveform output as an analogue float value. + * + * @param ringModulator The oscillator ring-modulating current one. + * @return output the waveform generator output + */ + float output(const WaveformGenerator* ringModulator); + + /** + * Read OSC3 value. + */ + unsigned char readOSC() const { return static_cast(osc3 >> 4); } + + /** + * Read accumulator value. + */ + unsigned int readAccumulator() const { return accumulator; } + + /** + * Read freq value. + */ + unsigned int readFreq() const { return freq; } + + /** + * Read test value. + */ + bool readTest() const { return test; } + + /** + * Read sync value. + */ + bool readSync() const { return sync; } +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(WAVEFORMGENERATOR_CPP) + +namespace reSIDfp +{ + +RESID_INLINE +void WaveformGenerator::clock() +{ + if (unlikely(test)) + { + if (unlikely(shift_register_reset != 0) && unlikely(--shift_register_reset == 0)) + { + shiftregBitfade(); + + // New noise waveform output. + set_noise_output(); + } + + // The test bit sets pulse high. + pulse_output = 0xfff; + } + else + { + // Calculate new accumulator value; + const unsigned int accumulator_old = accumulator; + accumulator = (accumulator + freq) & 0xffffff; + + // Check which bit have changed + const unsigned int accumulator_bits_set = ~accumulator_old & accumulator; + + // Check whether the MSB is set high. This is used for synchronization. + msb_rising = (accumulator_bits_set & 0x800000) != 0; + + // Shift noise register once for each time accumulator bit 19 is set high. + // The shift is delayed 2 cycles. + if (unlikely((accumulator_bits_set & 0x080000) != 0)) + { + // Pipeline: Detect rising bit, shift phase 1, shift phase 2. + shift_pipeline = 2; + } + else if (unlikely(shift_pipeline != 0) && --shift_pipeline == 0) + { + // bit0 = (bit22 | test) ^ bit17 + clock_shift_register(((shift_register << 22) ^ (shift_register << 17)) & (1 << 22)); + } + } +} + +RESID_INLINE +float WaveformGenerator::output(const WaveformGenerator* ringModulator) +{ + // Set output value. + if (likely(waveform != 0)) + { + const unsigned int ix = (accumulator ^ (~ringModulator->accumulator & ring_msb_mask)) >> 12; + + // The bit masks no_pulse and no_noise are used to achieve branch-free + // calculation of the output value. + waveform_output = wave[ix] & (no_pulse | pulse_output) & no_noise_or_noise_output; + + // Triangle/Sawtooth output is delayed half cycle on 8580. + // This will appear as a one cycle delay on OSC3 as it is latched first phase of the clock. + if ((waveform & 3) && !is6581) + { + osc3 = tri_saw_pipeline & (no_pulse | pulse_output) & no_noise_or_noise_output; + tri_saw_pipeline = wave[ix]; + } + else + { + osc3 = waveform_output; + } + + // In the 6581 the top bit of the accumulator may be driven low by combined waveforms + // when the sawtooth is selected + // FIXME doesn't seem to always happen + if ((waveform & 2) && unlikely(waveform & 0xd) && is6581) + accumulator &= (waveform_output << 12) | 0x7fffff; + + write_shift_register(); + } + else + { + // Age floating DAC input. + if (likely(floating_output_ttl != 0) && unlikely(--floating_output_ttl == 0)) + { + waveBitfade(); + } + } + + // The pulse level is defined as (accumulator >> 12) >= pw ? 0xfff : 0x000. + // The expression -((accumulator >> 12) >= pw) & 0xfff yields the same + // results without any branching (and thus without any pipeline stalls). + // NB! This expression relies on that the result of a boolean expression + // is either 0 or 1, and furthermore requires two's complement integer. + // A few more cycles may be saved by storing the pulse width left shifted + // 12 bits, and dropping the and with 0xfff (this is valid since pulse is + // used as a bit mask on 12 bit values), yielding the expression + // -(accumulator >= pw24). However this only results in negligible savings. + + // The result of the pulse width compare is delayed one cycle. + // Push next pulse level into pulse level pipeline. + pulse_output = ((accumulator >> 12) >= pw) ? 0xfff : 0x000; + + // DAC imperfections are emulated by using waveform_output as an index + // into a DAC lookup table. readOSC() uses waveform_output directly. + return dac[waveform_output]; +} + +} // namespace reSIDfp + +#endif + +#endif diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/drvproc.cpp dosbox-staging-0.77.0/src/libs/zmbv/drvproc.cpp --- dosbox-staging-0.76.0/src/libs/zmbv/drvproc.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/drvproc.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,7 +68,7 @@ * Defined separately for each message. * ***************************************************************************/ -extern "C" LRESULT __declspec(dllexport) PASCAL DriverProc(DWORD dwDriverID, HDRVR hDriver, UINT uiMessage, LPARAM lParam1, LPARAM lParam2) { +extern "C" LRESULT __declspec(dllexport) PASCAL DriverProc(DWORD_PTR dwDriverID, HDRVR hDriver, UINT uiMessage, LPARAM lParam1, LPARAM lParam2) { CodecInst* pi = (CodecInst*)dwDriverID; switch (uiMessage) { @@ -80,7 +80,7 @@ case DRV_OPEN: // GAAH! This used to return a pointer to 0xFFFF0000 when lParam==0! - return (LRESULT)(DWORD)(UINT) Open((ICOPEN*) lParam2); + return (LRESULT) Open((ICOPEN*) lParam2); case DRV_CLOSE: if (pi) Close(pi); diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/.gitignore dosbox-staging-0.77.0/src/libs/zmbv/.gitignore --- dosbox-staging-0.76.0/src/libs/zmbv/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/.gitignore 2021-07-02 15:47:39.000000000 +0000 @@ -4,8 +4,3 @@ Release *.vcxproj.filters *.vcxproj.user - -# svn:ignore -.deps -Makefile -Makefile.in \ No newline at end of file diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/Makefile.am dosbox-staging-0.77.0/src/libs/zmbv/Makefile.am --- dosbox-staging-0.76.0/src/libs/zmbv/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -EXTRA_DIST = zmbv.cpp zmbv.h diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/resource.rc dosbox-staging-0.77.0/src/libs/zmbv/resource.rc --- dosbox-staging-0.76.0/src/libs/zmbv/resource.rc 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/resource.rc 2021-07-02 15:47:39.000000000 +0000 @@ -17,7 +17,7 @@ FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,131,34,29,14 - CTEXT "Zipped Motion Block Video v 0.1\nCopyright 2009-2020 DOSBox Team", + CTEXT "Zipped Motion Block Video v 0.1\nCopyright 2009-2021 DOSBox Team", IDC_STATIC,7,7,153,25,SS_NOPREFIX PUSHBUTTON "Email author",IDC_EMAIL,7,34,50,14 PUSHBUTTON "Visit home page",IDC_HOMEPAGE,59,34,58,14 diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/zmbv.cpp dosbox-staging-0.77.0/src/libs/zmbv/zmbv.cpp --- dosbox-staging-0.76.0/src/libs/zmbv/zmbv.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/zmbv.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,14 +16,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include - #include "zmbv.h" +#include +#include +#include +#include +#include + #define DBZV_VERSION_HIGH 0 #define DBZV_VERSION_LOW 1 @@ -324,10 +324,12 @@ int i; /* Add the full frame data */ unsigned char * readFrame = newframe + pixelsize*(MAX_VECTOR+MAX_VECTOR*pitch); - for (i=0;i 0); + for (i = 0; i < height; ++i) { + memcpy(&work[workUsed], readFrame, line_width); + readFrame += pitch * pixelsize; + workUsed += line_width; } } else { /* Add the delta frame data */ @@ -437,11 +439,14 @@ } newframe = buf1; oldframe = buf2; + unsigned char * writeframe = newframe + pixelsize*(MAX_VECTOR+MAX_VECTOR*pitch); - for (i=0;i 0); + for (i = 0; i < height; ++i) { + memcpy(writeframe, &work[workPos], line_width); + writeframe += pitch * pixelsize; + workPos += line_width; } } else { data = oldframe; diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/zmbv.h dosbox-staging-0.77.0/src/libs/zmbv/zmbv.h --- dosbox-staging-0.76.0/src/libs/zmbv/zmbv.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/zmbv.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +16,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef DOSBOX_ZMBV_H +#define DOSBOX_ZMBV_H + #ifndef DOSBOX_DOSBOX_H #ifdef _MSC_VER #define INLINE __forceinline @@ -24,6 +27,8 @@ #endif #endif +#include + #define CODEC_4CC "ZMBV" typedef enum { @@ -116,3 +121,6 @@ bool DecompressFrame(void * framedata, int size); void Output_UpsideDown_24(void * output); }; + +#endif + diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/zmbv.vcxproj dosbox-staging-0.77.0/src/libs/zmbv/zmbv.vcxproj --- dosbox-staging-0.76.0/src/libs/zmbv/zmbv.vcxproj 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/zmbv.vcxproj 2021-07-02 15:47:39.000000000 +0000 @@ -66,32 +66,32 @@ $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ - true MinimumRecommendedRules.ruleset + false - true MinimumRecommendedRules.ruleset $(Platform)\$(Configuration)\ + false $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ - false MinimumRecommendedRules.ruleset + false - false MinimumRecommendedRules.ruleset $(Platform)\$(Configuration)\ + false @@ -102,14 +102,20 @@ true Level3 - EditAndContinue + ProgramDatabase true + true + Speed + true + true + true + true + CompileAsCpp winmm.lib;odbc32.lib;odbccp32.lib;zlibd.lib;%(AdditionalDependencies) $(OutDir)zmbv.dll zmbv.def - true $(OutDir)zmbv.pdb Windows MachineX86 @@ -128,12 +134,18 @@ Level3 ProgramDatabase true + true + Speed + true + true + true + true + CompileAsCpp winmm.lib;odbc32.lib;odbccp32.lib;zlibd.lib;%(AdditionalDependencies) $(OutDir)zmbv.dll zmbv.def - true $(OutDir)zmbv.pdb Windows false @@ -144,15 +156,26 @@ WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreaded - Level3 - ProgramDatabase + Level2 + None true + false + true + Speed + true + true + false + true + false + true + AssemblyAndSourceCode + CompileAsCpp + Fast winmm.lib;odbc32.lib;odbccp32.lib;zlib.lib;%(AdditionalDependencies) $(OutDir)zmbv.dll zmbv.def - true true Windows true @@ -166,15 +189,27 @@ MultiThreaded - Level3 - ProgramDatabase + Level2 + None true + false + true + Speed + false + true + true + false + true + false + true + AssemblyAndSourceCode + CompileAsCpp + Fast winmm.lib;odbc32.lib;odbccp32.lib;zlib.lib;%(AdditionalDependencies) $(OutDir)zmbv.dll zmbv.def - true true Windows true diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/zmbv_vfw.cpp dosbox-staging-0.77.0/src/libs/zmbv/zmbv_vfw.cpp --- dosbox-staging-0.76.0/src/libs/zmbv/zmbv_vfw.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/zmbv_vfw.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru dosbox-staging-0.76.0/src/libs/zmbv/zmbv_vfw.rc dosbox-staging-0.77.0/src/libs/zmbv/zmbv_vfw.rc --- dosbox-staging-0.76.0/src/libs/zmbv/zmbv_vfw.rc 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/libs/zmbv/zmbv_vfw.rc 2021-07-02 15:47:39.000000000 +0000 @@ -59,7 +59,7 @@ FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,131,34,29,14 - CTEXT "Zipped Motion Block Video v 0.1\nCopyright 2009-2020 DOSBox Team", + CTEXT "Zipped Motion Block Video v 0.1\nCopyright 2009-2021 DOSBox Team", IDC_STATIC,7,7,153,25,SS_NOPREFIX PUSHBUTTON "Email author",IDC_EMAIL,7,34,50,14 PUSHBUTTON "Visit home page",IDC_HOMEPAGE,59,34,58,14 diff -Nru dosbox-staging-0.76.0/src/main.cpp dosbox-staging-0.77.0/src/main.cpp --- dosbox-staging-0.76.0/src/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/main.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2020 The dosbox-staging team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "dosbox.h" + +// When compiling for Windows, SDL converts function 'main' to 'WinMain' and +// performs some additional initialization. +// +#include + +int main(int argc, char *argv[]) +{ + return sdl_main(argc, argv); +} diff -Nru dosbox-staging-0.76.0/src/Makefile.am dosbox-staging-0.77.0/src/Makefile.am --- dosbox-staging-0.76.0/src/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/Makefile.am 2021-07-02 15:47:39.000000000 +0000 @@ -11,7 +11,7 @@ .rc.o: $(WINDRES) -o $@ $< -dosbox_SOURCES = dosbox.cpp $(ico_stuff) +dosbox_SOURCES = dosbox.cpp $(ico_stuff) main.cpp dosbox_LDADD = cpu/libcpu.a \ debug/libdebug.a \ dos/libdos.a \ diff -Nru dosbox-staging-0.76.0/src/midi/.gitignore dosbox-staging-0.77.0/src/midi/.gitignore --- dosbox-staging-0.76.0/src/midi/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -.deps -Makefile -Makefile.in diff -Nru dosbox-staging-0.76.0/src/midi/Makefile.am dosbox-staging-0.77.0/src/midi/Makefile.am --- dosbox-staging-0.76.0/src/midi/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libmidi.a - -libmidi_a_SOURCES = \ - midi.cpp \ - midi_alsa.h \ - midi_coreaudio.h \ - midi_coremidi.h \ - midi_fluidsynth.cpp \ - midi_fluidsynth.h \ - midi_handler.h \ - midi_oss.h \ - midi_win32.h diff -Nru dosbox-staging-0.76.0/src/midi/meson.build dosbox-staging-0.77.0/src/midi/meson.build --- dosbox-staging-0.76.0/src/midi/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,24 @@ +libmidi_sources = [ + 'midi.cpp', + 'midi_alsa.cpp', + 'midi_fluidsynth.cpp', + 'midi_mt32.cpp', + 'midi_lasynth_model.cpp', + 'midi_oss.cpp', +] + +libmidi = static_library('midi', libmidi_sources, + include_directories : incdir, + dependencies : [ + sdl2_dep, + fluid_dep, + mt32emu_dep, + alsa_dep, + coreaudio_dep, + coremidi_dep, + winmm_dep + ]) + +libmidi_dep = declare_dependency(link_with : libmidi) + +internal_deps += libmidi_dep diff -Nru dosbox-staging-0.76.0/src/midi/midi_alsa.cpp dosbox-staging-0.77.0/src/midi/midi_alsa.cpp --- dosbox-staging-0.76.0/src/midi/midi_alsa.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_alsa.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,348 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "midi_alsa.h" + +#if C_ALSA + +#include +#include +#include +#include +#include +#include + +#include "logging.h" +#include "programs.h" +#include "string_utils.h" + +#define ADDR_DELIM ".:" + +using port_action_t = std::function; + +static void for_each_alsa_seq_port(port_action_t action) +{ + // We can't reuse the sequencer from midi handler, as the function might + // be called before that sequencer is created. + snd_seq_t *seq = nullptr; + if (snd_seq_open(&seq, "default", SND_SEQ_OPEN_OUTPUT, 0) != 0) { + LOG_MSG("ALSA: Error: Can't open MIDI sequencer"); + return; + } + assert(seq); + + snd_seq_client_info_t *client_info = nullptr; + snd_seq_client_info_malloc(&client_info); + assert(client_info); + + snd_seq_port_info_t *port_info = nullptr; + snd_seq_port_info_malloc(&port_info); + assert(port_info); + + snd_seq_client_info_set_client(client_info, -1); + while (snd_seq_query_next_client(seq, client_info) >= 0) { + const int client_id = snd_seq_client_info_get_client(client_info); + snd_seq_port_info_set_client(port_info, client_id); + snd_seq_port_info_set_port(port_info, -1); + while (snd_seq_query_next_port(seq, port_info) >= 0) + action(client_info, port_info); + } + + snd_seq_port_info_free(port_info); + snd_seq_client_info_free(client_info); + snd_seq_close(seq); +} + +static bool port_is_writable(const unsigned int port_caps) +{ + constexpr unsigned int mask = SND_SEQ_PORT_CAP_WRITE | + SND_SEQ_PORT_CAP_SUBS_WRITE; + return (port_caps & mask) == mask; +} + +void MidiHandler_alsa::send_event(int do_flush) +{ + snd_seq_ev_set_direct(&ev); + snd_seq_ev_set_source(&ev, output_port); + snd_seq_ev_set_dest(&ev, seq.client, seq.port); + + snd_seq_event_output(seq_handle, &ev); + if (do_flush) + snd_seq_drain_output(seq_handle); +} + +static bool parse_addr(const std::string &in, int *client, int *port) +{ + if (in.empty()) + return false; + + if (in[0] == 's' || in[0] == 'S') { + *client = SND_SEQ_ADDRESS_SUBSCRIBERS; + *port = 0; + return true; + } + + if (in.find_first_of(ADDR_DELIM) == std::string::npos) + return false; + + std::istringstream inp(in); + int val1; + int val2; + char c; + if (!(inp >> val1)) + return false; + if (!(inp >> c)) + return false; + if (!(inp >> val2)) + return false; + *client = val1; + *port = val2; + return true; +} + +void MidiHandler_alsa::PlaySysex(uint8_t *sysex, size_t len) +{ + snd_seq_ev_set_sysex(&ev, len, sysex); + send_event(1); +} + +void MidiHandler_alsa::PlayMsg(const uint8_t *msg) +{ + ev.type = SND_SEQ_EVENT_OSS; + ev.data.raw32.d[0] = msg[0]; + ev.data.raw32.d[1] = msg[1]; + ev.data.raw32.d[2] = msg[2]; + + unsigned char chanID = msg[0] & 0x0F; + switch (msg[0] & 0xF0) { + case 0x80: + snd_seq_ev_set_noteoff(&ev, chanID, msg[1], msg[2]); + send_event(1); + break; + case 0x90: + snd_seq_ev_set_noteon(&ev, chanID, msg[1], msg[2]); + send_event(1); + break; + case 0xA0: + snd_seq_ev_set_keypress(&ev, chanID, msg[1], msg[2]); + send_event(1); + break; + case 0xB0: + snd_seq_ev_set_controller(&ev, chanID, msg[1], msg[2]); + send_event(1); + break; + case 0xC0: + snd_seq_ev_set_pgmchange(&ev, chanID, msg[1]); + send_event(0); + break; + case 0xD0: + snd_seq_ev_set_chanpress(&ev, chanID, msg[1]); + send_event(0); + break; + case 0xE0: { + long theBend = ((long)msg[1] + (long)(msg[2] << 7)) - 0x2000; + snd_seq_ev_set_pitchbend(&ev, chanID, theBend); + send_event(1); + break; + } + default: + // Maybe filter out FC as it leads for at least one user to + // crash, but the entire midi stream has not yet been checked. + LOG(LOG_MISC, LOG_WARN)("ALSA: Unknown Command: %02X %02X %02X", + msg[0], msg[1], msg[2]); + send_event(1); + break; + } +} + +void MidiHandler_alsa::Close() +{ + seq = {-1, -1}; + if (seq_handle) { + HaltSequence(); + snd_seq_close(seq_handle); + } +} + +static bool port_name_matches(const std::string &pattern, + snd_seq_client_info_t *client_info, + snd_seq_port_info_t *port_info) +{ + if (pattern.empty()) + return true; + + char port_name[80]; + safe_sprintf(port_name, "%s - %s", snd_seq_client_info_get_name(client_info), + snd_seq_port_info_get_name(port_info)); + + return (strcasestr(port_name, pattern.c_str()) != nullptr); +} + +static alsa_address find_seq_input_port(const std::string &pattern) +{ + alsa_address seq_addr = {-1, -1}; + + // Modern sequencers like FluidSynth indicate that they + // are capable of generating sound. + // + auto find_synth_port = [&pattern, &seq_addr](auto *client_info, + auto *port_info) { + const auto *addr = snd_seq_port_info_get_addr(port_info); + const auto port_type = snd_seq_port_info_get_type(port_info); + const bool match = port_name_matches(pattern, client_info, port_info); + if (match && (port_type & SND_SEQ_PORT_TYPE_SYNTHESIZER)) { + seq_addr.client = addr->client; + seq_addr.port = addr->port; + } + }; + + for_each_alsa_seq_port(find_synth_port); + if (seq_addr.client != -1) + return seq_addr; + + // Older sequencers like TiMidity++ only indicate that + // subscribers can write to them, but so does MIDI-Through port + // (which is a kernel client sequencer, not a user client one). + // + // When a sequencer does not set port type properly, we can't be + // sure which one is intended for input. Therefore we consider + // only the first port for such sequencers. + // + // Prevents the problem with TiMidity++, which creates 4 ports + // but only first two ones generate sound (even though all 4 + // ones are marked as writable). + // + auto find_input_port = [&pattern, &seq_addr](auto *client_info, + auto *port_info) { + const auto *addr = snd_seq_port_info_get_addr(port_info); + const auto caps = snd_seq_port_info_get_capability(port_info); + const bool is_new_client = (addr->client != seq_addr.client); + + bool is_candidate = false; + if (pattern.empty()) + is_candidate = (snd_seq_client_info_get_type(client_info) == + SND_SEQ_USER_CLIENT); + else + is_candidate = port_name_matches(pattern, client_info, + port_info); + + if (is_new_client && is_candidate && port_is_writable(caps)) { + seq_addr.client = addr->client; + seq_addr.port = addr->port; + } + }; + + for_each_alsa_seq_port(find_input_port); + return seq_addr; +} + +bool MidiHandler_alsa::Open(const char *conf) +{ + assert(conf != nullptr); + seq = {-1, -1}; + + DEBUG_LOG_MSG("ALSA: Attempting connection to: '%s'", conf); + + // Try to use port specified in config; if port is not configured, + // then attempt to connect to the newest capable port. + // + const std::string conf_str = conf; + const bool use_specific_addr = parse_addr(conf_str, &seq.client, &seq.port); + + if (!use_specific_addr) { + const auto found_addr = find_seq_input_port(conf_str); + if (found_addr.client > 0) { + seq = found_addr; + } + } + + if (seq.client == -1) { + LOG_MSG("ALSA: No available MIDI devices found"); + return false; + } + + if (snd_seq_open(&seq_handle, "default", SND_SEQ_OPEN_OUTPUT, 0) != 0) { + LOG_MSG("ALSA: Can't open sequencer"); + return false; + } + + snd_seq_set_client_name(seq_handle, "DOSBox Staging"); + + unsigned int caps = SND_SEQ_PORT_CAP_READ; + if (seq.client == SND_SEQ_ADDRESS_SUBSCRIBERS) + caps = ~SND_SEQ_PORT_CAP_SUBS_READ; + + output_port = snd_seq_create_simple_port( + seq_handle, "Virtual MPU-401 output", caps, + SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_APPLICATION); + + if (output_port < 0) { + snd_seq_close(seq_handle); + LOG_MSG("ALSA: Can't create ALSA port"); + return false; + } + + if (seq.client != SND_SEQ_ADDRESS_SUBSCRIBERS) { + if (snd_seq_connect_to(seq_handle, output_port, seq.client, + seq.port) == 0) { + snd_seq_client_info_t *info = nullptr; + snd_seq_client_info_malloc(&info); + assert(info); + snd_seq_get_any_client_info(seq_handle, seq.client, info); + LOG_MSG("ALSA: Connected to MIDI port %d:%d - %s", seq.client, + seq.port, snd_seq_client_info_get_name(info)); + snd_seq_client_info_free(info); + return true; + } + } + + snd_seq_close(seq_handle); + LOG_MSG("ALSA: Can't connect to MIDI port %d:%d", seq.client, seq.port); + return false; +} + +MIDI_RC MidiHandler_alsa::ListAll(Program *caller) +{ + auto print_port = [caller, this](auto *client_info, auto *port_info) { + const auto *addr = snd_seq_port_info_get_addr(port_info); + const unsigned int type = snd_seq_port_info_get_type(port_info); + const unsigned int caps = snd_seq_port_info_get_capability(port_info); + + if ((type & SND_SEQ_PORT_TYPE_SYNTHESIZER) || port_is_writable(caps)) { + const bool selected = (addr->client == this->seq.client && + addr->port == this->seq.port); + const char esc_color[] = "\033[32;1m"; + const char esc_nocolor[] = "\033[0m"; + caller->WriteOut("%c %s%3d:%d - %s - %s%s\n", + (selected ? '*' : ' '), + (selected ? esc_color : ""), + addr->client, addr->port, + snd_seq_client_info_get_name(client_info), + snd_seq_port_info_get_name(port_info), + (selected ? esc_nocolor : "")); + } + }; + for_each_alsa_seq_port(print_port); + return MIDI_RC::OK; +} + +#endif // C_ALSA diff -Nru dosbox-staging-0.76.0/src/midi/midi_alsa.h dosbox-staging-0.77.0/src/midi/midi_alsa.h --- dosbox-staging-0.76.0/src/midi/midi_alsa.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_alsa.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,202 +24,38 @@ #include "midi_handler.h" -#define ALSA_PCM_OLD_HW_PARAMS_API -#define ALSA_PCM_OLD_SW_PARAMS_API +#if C_ALSA + #include -#include -#include -#include -#define ADDR_DELIM ".:" - -#if ((SND_LIB_MINOR >= 6) && (SND_LIB_MAJOR == 0)) || (SND_LIB_MAJOR >= 1) -#define snd_seq_flush_output(x) snd_seq_drain_output(x) -#define snd_seq_set_client_group(x,name) /*nop */ -#define my_snd_seq_open(seqp) snd_seq_open(seqp, "hw", SND_SEQ_OPEN_OUTPUT, 0) -#else -/* SND_SEQ_OPEN_OUT causes oops on early version of ALSA */ -#define my_snd_seq_open(seqp) snd_seq_open(seqp, SND_SEQ_OPEN) -#endif -class MidiHandler_alsa : public MidiHandler { +struct alsa_address { + int client; + int port; +}; + +class MidiHandler_alsa final : public MidiHandler { private: - snd_seq_event_t ev; - snd_seq_t *seq_handle; - int seq_client, seq_port; - int my_client, my_port; - void send_event(int do_flush) { - snd_seq_ev_set_direct(&ev); - snd_seq_ev_set_source(&ev, my_port); - snd_seq_ev_set_dest(&ev, seq_client, seq_port); - - snd_seq_event_output(seq_handle, &ev); - if (do_flush) - snd_seq_flush_output(seq_handle); - } - - bool parse_addr(const char *arg, int *client, int *port) { - std::string in(arg); - if(in.empty()) return false; - - if(in[0] == 's' || in[0] == 'S') { - *client = SND_SEQ_ADDRESS_SUBSCRIBERS; - *port = 0; - return true; - } - - if(in.find_first_of(ADDR_DELIM) == std::string::npos) return false; - std::istringstream inp(in); - int val1, val2; char c; - if(!(inp >> val1)) return false; - if(!(inp >> c )) return false; - if(!(inp >> val2)) return false; - *client = val1; *port = val2; - return true; - } + snd_seq_event_t ev = {}; + snd_seq_t *seq_handle = nullptr; + alsa_address seq = {-1, -1}; // address of input port we're connected to + int output_port = 0; + + void send_event(int do_flush); + public: - MidiHandler_alsa() - : MidiHandler(), - ev{}, - seq_handle(nullptr), - seq_client(0), - seq_port(0), - my_client(0), - my_port(0) - {} + MidiHandler_alsa() : MidiHandler() {} MidiHandler_alsa(const MidiHandler_alsa &) = delete; // prevent copying MidiHandler_alsa &operator=(const MidiHandler_alsa &) = delete; // prevent assignment const char *GetName() const override { return "alsa"; } - - void PlaySysex(uint8_t *sysex, size_t len) override - { - snd_seq_ev_set_sysex(&ev, len, sysex); - send_event(1); - } - - void PlayMsg(const uint8_t *msg) override - { - ev.type = SND_SEQ_EVENT_OSS; - - ev.data.raw32.d[0] = msg[0]; - ev.data.raw32.d[1] = msg[1]; - ev.data.raw32.d[2] = msg[2]; - - unsigned char chanID = msg[0] & 0x0F; - switch (msg[0] & 0xF0) { - case 0x80: - snd_seq_ev_set_noteoff(&ev, chanID, msg[1], msg[2]); - send_event(1); - break; - case 0x90: - snd_seq_ev_set_noteon(&ev, chanID, msg[1], msg[2]); - send_event(1); - break; - case 0xA0: - snd_seq_ev_set_keypress(&ev, chanID, msg[1], msg[2]); - send_event(1); - break; - case 0xB0: - snd_seq_ev_set_controller(&ev, chanID, msg[1], msg[2]); - send_event(1); - break; - case 0xC0: - snd_seq_ev_set_pgmchange(&ev, chanID, msg[1]); - send_event(0); - break; - case 0xD0: - snd_seq_ev_set_chanpress(&ev, chanID, msg[1]); - send_event(0); - break; - case 0xE0:{ - long theBend = ((long)msg[1] + (long)(msg[2] << 7)) - 0x2000; - snd_seq_ev_set_pitchbend(&ev, chanID, theBend); - send_event(1); - } - break; - default: - //Maybe filter out FC as it leads for at least one user to crash, but the entire midi stream has not yet been checked. - LOG(LOG_MISC,LOG_WARN)("ALSA: Unknown Command: %02X %02X %02X", msg[0],msg[1],msg[2]); - send_event(1); - break; - } - } - - void Close() override - { - if (seq_handle) - snd_seq_close(seq_handle); - } - - bool Open(const char *conf) override - { - char var[10]; - unsigned int caps; - bool defaultport = true; //try 17:0. Seems to be default nowadays - - // try to use port specified in config file - if (conf && conf[0]) { - safe_strcpy(var, conf); - if (!parse_addr(var, &seq_client, &seq_port)) { - LOG_MSG("ALSA: Invalid alsa port %s", var); - return false; - } - defaultport = false; - } - // default port if none specified - else if (!parse_addr("65:0", &seq_client, &seq_port)) { - LOG_MSG("ALSA: Invalid alsa port 65:0"); - return false; - } - - if (my_snd_seq_open(&seq_handle)) { - LOG_MSG("ALSA: Can't open sequencer"); - return false; - } - - my_client = snd_seq_client_id(seq_handle); - snd_seq_set_client_name(seq_handle, "DOSBOX"); - snd_seq_set_client_group(seq_handle, "input"); - - caps = SND_SEQ_PORT_CAP_READ; - if (seq_client == SND_SEQ_ADDRESS_SUBSCRIBERS) - caps = ~SND_SEQ_PORT_CAP_SUBS_READ; - my_port = - snd_seq_create_simple_port(seq_handle, "DOSBOX", caps, - SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_APPLICATION); - if (my_port < 0) { - snd_seq_close(seq_handle); - LOG_MSG("ALSA: Can't create ALSA port"); - return false; - } - - if (seq_client != SND_SEQ_ADDRESS_SUBSCRIBERS) { - /* subscribe to MIDI port */ - if (snd_seq_connect_to(seq_handle, my_port, seq_client, seq_port) < 0) { - if (defaultport) { //if port "65:0" (default) try "17:0" as well - seq_client = 17; seq_port = 0; //Update reported values - if(snd_seq_connect_to(seq_handle,my_port,seq_client,seq_port) < 0) { //Try 128:0 Timidity port as well -// seq_client = 128; seq_port = 0; //Update reported values -// if(snd_seq_connect_to(seq_handle,my_port,seq_client,seq_port) < 0) { - snd_seq_close(seq_handle); - LOG_MSG("ALSA: Can't subscribe to MIDI port (65:0) nor (17:0)"); - return false; -// } - } - } else { - snd_seq_close(seq_handle); - LOG_MSG("ALSA: Can't subscribe to MIDI port (%d:%d)", seq_client, seq_port); - return false; - } - } - } - - LOG_MSG("ALSA: Client initialised [%d:%d]", seq_client, seq_port); - return true; - } + bool Open(const char *conf) override; + void Close() override; + void PlayMsg(const uint8_t *msg) override; + void PlaySysex(uint8_t *sysex, size_t len) override; + MIDI_RC ListAll(Program *caller) override; }; -MidiHandler_alsa Midi_alsa; +#endif // C_ALSA #endif diff -Nru dosbox-staging-0.76.0/src/midi/midi_coreaudio.h dosbox-staging-0.77.0/src/midi/midi_coreaudio.h --- dosbox-staging-0.76.0/src/midi/midi_coreaudio.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_coreaudio.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +24,8 @@ #include "midi_handler.h" +#if C_COREAUDIO + #include #include @@ -59,7 +62,7 @@ # endif #endif -class MidiHandler_coreaudio : public MidiHandler { +class MidiHandler_coreaudio final : public MidiHandler { private: AUGraph m_auGraph; AudioUnit m_synth; @@ -191,6 +194,7 @@ void Close() override { if (m_auGraph) { + HaltSequence(); AUGraphStop(m_auGraph); DisposeAUGraph(m_auGraph); m_auGraph = 0; @@ -212,4 +216,6 @@ MidiHandler_coreaudio Midi_coreaudio; +#endif // C_COREAUDIO + #endif diff -Nru dosbox-staging-0.76.0/src/midi/midi_coremidi.h dosbox-staging-0.77.0/src/midi/midi_coremidi.h --- dosbox-staging-0.76.0/src/midi/midi_coremidi.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_coremidi.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * + * Copyright (C) 2020-2021 The DOSBox Staging Team * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2020-2020 The dosbox-staging team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,13 +24,15 @@ #include "midi_handler.h" +#if C_COREMIDI + #include #include #include #include "programs.h" -class MidiHandler_coremidi : public MidiHandler { +class MidiHandler_coremidi final : public MidiHandler { private: MIDIPortRef m_port; MIDIClientRef m_client; @@ -107,6 +109,9 @@ void Close() override { + if (m_port && m_client) + HaltSequence(); + // Dispose the port MIDIPortDispose(m_port); @@ -138,7 +143,7 @@ void PlaySysex(uint8_t *sysex, size_t len) override { // Acquire a MIDIPacketList - Byte packetBuf[SYSEX_SIZE*4]; + Byte packetBuf[MIDI_SYSEX_SIZE * 4]; MIDIPacketList *packetList = (MIDIPacketList *)packetBuf; m_pCurPacket = MIDIPacketListInit(packetList); @@ -149,7 +154,7 @@ MIDISend(m_port,m_endpoint,packetList); } - void ListAll(Program *base) override + MIDI_RC ListAll(Program *caller) override { Bitu numDests = MIDIGetNumberOfDestinations(); for(Bitu i = 0; i < numDests; i++){ @@ -158,14 +163,19 @@ CFStringRef midiname = 0; if(MIDIObjectGetStringProperty(dest, kMIDIPropertyDisplayName, &midiname) == noErr) { const char * s = CFStringGetCStringPtr(midiname, kCFStringEncodingMacRoman); - if (s) base->WriteOut("%02d\t%s\n",i,s); + if (s) { + caller->WriteOut(" %02d - %s\n", i, s); + } } //This is for EndPoints created by us. //MIDIEndpointDispose(dest); } + return MIDI_RC::OK; } }; MidiHandler_coremidi Midi_coremidi; +#endif // C_COREMIDI + #endif diff -Nru dosbox-staging-0.76.0/src/midi/midi.cpp dosbox-staging-0.77.0/src/midi/midi.cpp --- dosbox-staging-0.76.0/src/midi/midi.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,13 +34,14 @@ #include "mapper.h" #include "midi_handler.h" #include "pic.h" +#include "programs.h" #include "setup.h" #include "support.h" #include "timer.h" #define RAWBUF 1024 -Bit8u MIDI_evt_len[256] = { +uint8_t MIDI_evt_len[256] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 0x00 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 0x10 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 0x20 @@ -75,18 +77,14 @@ Each header provides an independent midi interface. */ #include "midi_fluidsynth.h" +#include "midi_mt32.h" #if defined(MACOSX) -#if defined(C_SUPPORTS_COREMIDI) #include "midi_coremidi.h" -#endif - -#if defined(C_SUPPORTS_COREAUDIO) #include "midi_coreaudio.h" -#endif -#elif defined (WIN32) +#elif defined(WIN32) #include "midi_win32.h" @@ -94,12 +92,14 @@ #include "midi_oss.h" -#endif +MidiHandler_oss Midi_oss; -#if defined (HAVE_ALSA) +#endif #include "midi_alsa.h" +#if C_ALSA +MidiHandler_alsa Midi_alsa; #endif struct DB_Midi { @@ -109,10 +109,10 @@ uint8_t cmd_buf[8]; uint8_t rt_buf[8]; struct { - uint8_t buf[SYSEX_SIZE]; + uint8_t buf[MIDI_SYSEX_SIZE]; size_t used; - uint32_t delay; // ms - uint32_t start; // ms + int delay; // ms + int64_t start; // ms } sysex; bool available; MidiHandler * handler; @@ -127,19 +127,19 @@ * Explanation for this formula can be found in discussion under patch * that introduced it: https://sourceforge.net/p/dosbox/patches/241/ */ -uint32_t delay_in_ms(size_t sysex_bytes_num) +int delay_in_ms(size_t sysex_bytes_num) { constexpr double midi_baud_rate = 3.125; // bytes per ms const auto delay = (sysex_bytes_num * 1.25) / midi_baud_rate; - return static_cast(delay) + 2; + return static_cast(delay) + 2; } void MIDI_RawOutByte(uint8_t data) { if (midi.sysex.start) { - const uint32_t passed_ticks = GetTicks() - midi.sysex.start; + const auto passed_ticks = GetTicksSince(midi.sysex.start); if (passed_ticks < midi.sysex.delay) - SDL_Delay(midi.sysex.delay - passed_ticks); + Delay(midi.sysex.delay - passed_ticks); } /* Test for a realtime MIDI message */ @@ -151,7 +151,8 @@ /* Test for a active sysex tranfer */ if (midi.status==0xf0) { if (!(data&0x80)) { - if (midi.sysex.used<(SYSEX_SIZE-1)) midi.sysex.buf[midi.sysex.used++] = data; + if (midi.sysex.used < (MIDI_SYSEX_SIZE - 1)) + midi.sysex.buf[midi.sysex.used++] = data; return; } else { midi.sysex.buf[midi.sysex.used++] = 0xf7; @@ -207,7 +208,7 @@ return midi.available; } -class MIDI : public Module_base { +class MIDI final : public Module_base { public: MIDI(Section *configuration) : Module_base(configuration) { @@ -263,6 +264,11 @@ // startup for all games. continue; } + if (name == "mt32") { + // Never select mt32 automatically. + // Users needs to opt-in. + continue; + } if (handler->Open(conf)) { midi.available=true; midi.handler=handler; @@ -280,10 +286,23 @@ } }; -void MIDI_ListAll(Program *output_handler) +void MIDI_ListAll(Program *caller) { - if (midi.handler) - midi.handler->ListAll(output_handler); + for (auto *handler = handler_list; handler; handler = handler->next) { + const std::string name = handler->GetName(); + if (name == "none") + continue; + + caller->WriteOut("%s:\n", name.c_str()); + + const auto err = handler->ListAll(caller); + if (err == MIDI_RC::ERR_DEVICE_NOT_CONFIGURED) + caller->WriteOut(" device not configured\n"); + if (err == MIDI_RC::ERR_DEVICE_LIST_NOT_SUPPORTED) + caller->WriteOut(" listing not supported\n"); + + caller->WriteOut("\n"); // additional newline to separate devices + } } static MIDI* test; diff -Nru dosbox-staging-0.76.0/src/midi/midi_fluidsynth.cpp dosbox-staging-0.77.0/src/midi/midi_fluidsynth.cpp --- dosbox-staging-0.76.0/src/midi/midi_fluidsynth.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_fluidsynth.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,9 +1,9 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2020-2020 Nikos Chantziaras * Copyright (C) 2002-2011 The DOSBox Team - * Copyright (C) 2020 Nikos Chantziaras - * Copyright (C) 2020 The dosbox-staging team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,12 +25,20 @@ #if C_FLUIDSYNTH #include +#include #include #include #include "control.h" #include "cross.h" #include "fs_utils.h" +#include "mixer.h" +#include "programs.h" +#include "support.h" +#include "../ints/int10.h" + + +static constexpr int FRAMES_PER_BUFFER = 512; // synth granularity MidiHandlerFluidsynth instance; @@ -39,7 +47,7 @@ constexpr auto when_idle = Property::Changeable::WhenIdle; // Name 'default.sf2' picks the default soundfont if it's installed - // it the OS. Usually it's Fluid_R3. + // in the OS. Usually it's Fluid_R3. auto *str_prop = secprop.Add_string("soundfont", when_idle, "default.sf2"); str_prop->Set_help( "Path to a SoundFont file in .sf2 format. You can use an\n" @@ -49,23 +57,17 @@ "An optional percentage will scale the SoundFont's volume.\n" "For example: 'soundfont.sf2 50' will attenuate it by 50 percent.\n" "The scaling percentage can range from 1 to 500."); - - auto *int_prop = secprop.Add_int("synth_threads", when_idle, 1); - int_prop->SetMinMax(1, 256); - int_prop->Set_help( - "If set to a value greater than 1, then additional synthesis\n" - "threads will be created to take advantage of many CPU cores.\n" - "(min 1, max 256)"); } // SetMixerLevel is a callback that's given the user-desired mixer level, // which is a floating point multiplier that we apply internally as // FluidSynth's gain value. We then read-back the gain, and use that to // derive a pre-scale level. -void MidiHandlerFluidsynth::SetMixerLevel(const AudioFrame &desired_level) noexcept +void MidiHandlerFluidsynth::SetMixerLevel(const AudioFrame &levels) noexcept { - prescale_level.left = INT16_MAX * desired_level.left; - prescale_level.right = INT16_MAX * desired_level.right; + // FluidSynth generates floats between -1 and 1, so we ask the + // limiter to scale these up to the INT16 range + soft_limiter.UpdateLevels(levels, INT16_MAX); } // Takes in the user's soundfont = configuration value consisting @@ -76,14 +78,14 @@ const int default_percent) { if (line.empty()) - return {line, default_percent}; + return std::make_tuple(line, default_percent); // Look for a space in the last 4 characters of the string const auto len = line.length(); const auto from_pos = len < 4 ? 0 : len - 4; auto last_space_pos = line.substr(from_pos).find_last_of(' '); if (last_space_pos == std::string::npos) - return {line, default_percent}; + return std::make_tuple(line, default_percent); // Ensure the position is relative to the start of the entire string last_space_pos += from_pos; @@ -93,18 +95,18 @@ try { percent = stoi(line.substr(last_space_pos + 1)); } catch (...) { - return {line, default_percent}; + return std::make_tuple(line, default_percent); } // A number was provided, so split it from the line std::string filename = line.substr(0, last_space_pos); trim(filename); // drop any extra whitespace prior to the number - return {filename, percent}; + return std::make_tuple(filename, percent); } #if defined(WIN32) -static std::vector get_data_dirs() +static std::deque get_data_dirs() { return { CROSS_GetPlatformConfigDir() + "soundfonts\\", @@ -114,7 +116,7 @@ #elif defined(MACOSX) -static std::vector get_data_dirs() +static std::deque get_data_dirs() { return { CROSS_GetPlatformConfigDir() + "soundfonts/", @@ -126,21 +128,38 @@ #else -static std::vector get_data_dirs() +static std::deque get_data_dirs() { + // First priority is $XDG_DATA_HOME const char *xdg_data_home_env = getenv("XDG_DATA_HOME"); const auto xdg_data_home = CROSS_ResolveHome( xdg_data_home_env ? xdg_data_home_env : "~/.local/share"); - return { - CROSS_GetPlatformConfigDir() + "soundfonts/", + std::deque dirs = { + xdg_data_home + "/dosbox/soundfonts/", xdg_data_home + "/soundfonts/", xdg_data_home + "/sounds/sf2/", - "/usr/local/share/soundfonts/", - "/usr/local/share/sounds/sf2/", - "/usr/share/soundfonts/", - "/usr/share/sounds/sf2/", }; + + // Second priority are the $XDG_DATA_DIRS + const char *xdg_data_dirs_env = getenv("XDG_DATA_DIRS"); + if (!xdg_data_dirs_env) + xdg_data_dirs_env = "/usr/local/share:/usr/share"; + + for (auto xdg_data_dir : split(xdg_data_dirs_env, ':')) { + trim(xdg_data_dir); + if (xdg_data_dir.empty()) { + continue; + } + const auto resolved_dir = CROSS_ResolveHome(xdg_data_dir); + dirs.emplace_back(resolved_dir + "/soundfonts/"); + dirs.emplace_back(resolved_dir + "/sounds/sf2/"); + } + + // Third priority is $XDG_CONF_HOME, for convenience + dirs.emplace_back(CROSS_GetPlatformConfigDir() + "soundfonts/"); + + return dirs; } #endif @@ -152,6 +171,7 @@ return sf_path; for (const auto &dir : get_data_dirs()) { for (const auto &sf : {dir + name, dir + name + ".sf2"}) { + // DEBUG_LOG_MSG("MIDI: FluidSynth checking if '%s' exists", sf.c_str()); if (path_exists(sf)) return sf; } @@ -159,6 +179,11 @@ return ""; } +MidiHandlerFluidsynth::MidiHandlerFluidsynth() + : soft_limiter("FSYNTH"), + keep_rendering(false) +{} + bool MidiHandlerFluidsynth::Open(MAYBE_UNUSED const char *conf) { Close(); @@ -169,22 +194,23 @@ LOG_MSG("MIDI: new_fluid_settings failed"); return false; } - auto *section = static_cast(control->GetSection("fluidsynth")); - - // Detailed explanation of all available FluidSynth settings: - // http://www.fluidsynth.org/api/fluidsettings.xml - - const int cpu_cores = section->Get_int("synth_threads"); - fluid_settings_setint(fluid_settings.get(), "synth.cpu-cores", cpu_cores); + // Setup the mixer channel and level callback const auto mixer_callback = std::bind(&MidiHandlerFluidsynth::MixerCallBack, this, std::placeholders::_1); - mixer_channel_ptr_t mixer_channel(MIXER_AddChannel(mixer_callback, 0, "FSYNTH"), - MIXER_DelChannel); + channel_t mixer_channel(MIXER_AddChannel(mixer_callback, 0, "FSYNTH"), + MIXER_DelChannel); + + const auto set_mixer_level = std::bind(&MidiHandlerFluidsynth::SetMixerLevel, + this, std::placeholders::_1); + mixer_channel->RegisterLevelCallBack(set_mixer_level); - // Per the FluidSynth API, the sample-rate should be part of the settings used to - // instantiate the synth, so we create the mixer channel first and use its native - // rate to configure FluidSynth. + // Detailed explanation of all available FluidSynth settings: + // http://www.fluidsynth.org/api/fluidsettings.xml + + // Per the FluidSynth API, the sample-rate should be part of the + // settings used to instantiate the synth, so we create the mixer + // channel first and use its native rate to configure FluidSynth. fluid_settings_setnum(fluid_settings.get(), "synth.sample-rate", mixer_channel->GetSampleRate()); @@ -196,6 +222,7 @@ } // Load the requested SoundFont or quit if none provided + auto *section = static_cast(control->GetSection("fluidsynth")); const auto sf_spec = parse_sf_pref(section->Get_string("soundfont"), 100); const auto soundfont = find_sf_file(std::get(sf_spec)); auto scale_by_percent = std::get(sf_spec); @@ -220,57 +247,106 @@ // Let the user know that the SoundFont was loaded if (scale_by_percent == 100) LOG_MSG("MIDI: Using SoundFont '%s'", soundfont.c_str()); - else if (scale_by_percent > 100) - LOG_MSG("MIDI: Using SoundFont '%s' with levels amplified by %d%%", - soundfont.c_str(), scale_by_percent); else - LOG_MSG("MIDI: Using SoundFont '%s' with levels attenuated by %d%%", + LOG_MSG("MIDI: Using SoundFont '%s' with voices scaled by %d%%", soundfont.c_str(), scale_by_percent); + constexpr int fx_group = -1; // applies setting to all groups + // Use a 7th-order (highest) polynomial to generate MIDI channel waveforms - constexpr int all_channels = -1; - fluid_synth_set_interp_method(fluid_synth.get(), all_channels, + fluid_synth_set_interp_method(fluid_synth.get(), fx_group, FLUID_INTERP_HIGHEST); - // Apply reasonable chorus and reverb settings matching ScummVM's defaults + // Use reasonable chorus and reverb settings matching ScummVM's defaults constexpr int chorus_number = 3; constexpr double chorus_level = 1.2; constexpr double chorus_speed = 0.3; constexpr double chorus_depth = 8.0; - fluid_synth_set_chorus_on(fluid_synth.get(), 1); - fluid_synth_set_chorus(fluid_synth.get(), chorus_number, chorus_level, - chorus_speed, chorus_depth, FLUID_CHORUS_MOD_SINE); - + constexpr auto sine = fluid_chorus_mod::FLUID_CHORUS_MOD_SINE; constexpr double reverb_room_size = 0.61; constexpr double reverb_damping = 0.23; constexpr double reverb_width = 0.76; constexpr double reverb_level = 0.56; + +// current API calls as of 2.2 +#if FLUIDSYNTH_VERSION_MINOR >= 2 + fluid_synth_chorus_on(fluid_synth.get(), fx_group, 1); + fluid_synth_set_chorus_group_type(fluid_synth.get(), fx_group, sine); + fluid_synth_set_chorus_group_nr(fluid_synth.get(), fx_group, chorus_number); + fluid_synth_set_chorus_group_level(fluid_synth.get(), fx_group, chorus_level); + fluid_synth_set_chorus_group_speed(fluid_synth.get(), fx_group, chorus_speed); + fluid_synth_set_chorus_group_depth(fluid_synth.get(), fx_group, chorus_depth); + + fluid_synth_reverb_on(fluid_synth.get(), fx_group, 1); + fluid_synth_set_reverb_group_roomsize(fluid_synth.get(), fx_group, reverb_room_size); + fluid_synth_set_reverb_group_damp(fluid_synth.get(), fx_group, reverb_damping); + fluid_synth_set_reverb_group_width(fluid_synth.get(), fx_group, reverb_width); + fluid_synth_set_reverb_group_level(fluid_synth.get(), fx_group, reverb_level); + +// deprecated API calls prior to 2.2 +#else + fluid_synth_set_chorus_on(fluid_synth.get(), 1); + fluid_synth_set_chorus(fluid_synth.get(), chorus_number, chorus_level, + chorus_speed, chorus_depth, sine); + fluid_synth_set_reverb_on(fluid_synth.get(), 1); fluid_synth_set_reverb(fluid_synth.get(), reverb_room_size, reverb_damping, reverb_width, reverb_level); - - // Let the mixer command adjust our internal level - const auto set_mixer_level = std::bind(&MidiHandlerFluidsynth::SetMixerLevel, - this, std::placeholders::_1); - mixer_channel->RegisterLevelCallBack(set_mixer_level); - mixer_channel->Enable(true); +#endif settings = std::move(fluid_settings); synth = std::move(fluid_synth); channel = std::move(mixer_channel); + selected_font = soundfont; + + // Start rendering audio + keep_rendering = true; + const auto render = std::bind(&MidiHandlerFluidsynth::Render, this); + renderer = std::thread(render); + set_thread_name(renderer, "dosbox:fsynth"); + play_buffer = playable.Dequeue(); // populate the first play buffer + + // Start playback + channel->Enable(true); is_open = true; return true; } +MidiHandlerFluidsynth::~MidiHandlerFluidsynth() +{ + Close(); +} + void MidiHandlerFluidsynth::Close() { if (!is_open) return; - channel->Enable(false); - channel = nullptr; - synth = nullptr; - settings = nullptr; + // Stop playback + if (channel) + channel->Enable(false); + + // Stop rendering and drain the rings + keep_rendering = false; + if (!backstock.Size()) + backstock.Enqueue(std::move(play_buffer)); + while (playable.Size()) + play_buffer = playable.Dequeue(); + + // Wait for the rendering thread to finish + if (renderer.joinable()) + renderer.join(); + + soft_limiter.PrintStats(); + + // Reset the members + channel.reset(); + synth.reset(); + settings.reset(); + soft_limiter.Reset(); + last_played_frame = 0; + selected_font = ""; + is_open = false; } @@ -316,44 +392,147 @@ fluid_synth_sysex(synth.get(), data, n, nullptr, nullptr, nullptr, false); } -void MidiHandlerFluidsynth::PrintStats() +void MidiHandlerFluidsynth::MixerCallBack(uint16_t requested_frames) { - // Normally prescale is simply a float-multiplier such as 0.5, 1.0, etc. - // However in the case of FluidSynth, it produces 32-bit floats between - // -1.0 and +1.0, therefore we scale those up to the 16-bit integer range - // in addition to the mixer's FSYNTH levels. Before printing statistics, - // we need to back-out this integer multiplier. - prescale_level.left /= INT16_MAX; - prescale_level.right /= INT16_MAX; - soft_limiter.PrintStats(); + while (requested_frames) { + const auto frames_to_be_played = std::min(GetRemainingFrames(), + requested_frames); + const auto sample_offset_in_buffer = play_buffer.data() + + last_played_frame * 2; + + assert(frames_to_be_played <= play_buffer.size()); + channel->AddSamples_s16(frames_to_be_played, sample_offset_in_buffer); + + requested_frames -= frames_to_be_played; + last_played_frame += frames_to_be_played; + } } -void MidiHandlerFluidsynth::MixerCallBack(uint16_t frames) +// Returns the number of frames left to play in the buffer. +uint16_t MidiHandlerFluidsynth::GetRemainingFrames() { - constexpr uint16_t max_samples = expected_max_frames * 2; // two channels per frame - std::array stream; - - while (frames > 0) { - constexpr uint16_t max_frames = expected_max_frames; // local copy fixes link error - const uint16_t len = std::min(frames, max_frames); - fluid_synth_write_float(synth.get(), len, stream.data(), 0, 2, - stream.data(), 1, 2); - const auto &out_stream = soft_limiter.Apply(stream, len); - channel->AddSamples_s16(len, out_stream.data()); - frames -= len; + // If the current buffer has some frames left, then return those ... + if (last_played_frame < FRAMES_PER_BUFFER) + return FRAMES_PER_BUFFER - last_played_frame; + + // Otherwise put the spent buffer in backstock and get the next buffer + backstock.Enqueue(std::move(play_buffer)); + play_buffer = playable.Dequeue(); + last_played_frame = 0; // reset the frame counter to the beginning + + return FRAMES_PER_BUFFER; +} + +// Populates the playable queue with freshly rendered buffers +void MidiHandlerFluidsynth::Render() +{ + // Allocate our buffers once and reuse for the duration. + constexpr auto SAMPLES_PER_BUFFER = FRAMES_PER_BUFFER * 2; // L & R + std::vector render_buffer(SAMPLES_PER_BUFFER); + std::vector playable_buffer(SAMPLES_PER_BUFFER); + + // Populate the backstock using copies of the current buffer. + while (backstock.Size() < backstock.MaxCapacity() - 1) + backstock.Enqueue(playable_buffer); + backstock.Enqueue(std::move(playable_buffer)); + assert(backstock.Size() == backstock.MaxCapacity()); + + while (keep_rendering.load()) { + fluid_synth_write_float(synth.get(), FRAMES_PER_BUFFER, + render_buffer.data(), 0, 2, + render_buffer.data(), 1, 2); + + // Grab the next buffer from backstock and populate it ... + playable_buffer = backstock.Dequeue(); + soft_limiter.Process(render_buffer, FRAMES_PER_BUFFER, + playable_buffer); + // and then move it into the playable queue + playable.Enqueue(std::move(playable_buffer)); } } -static void fluid_destroy(MAYBE_UNUSED Section *sec) +std::string format_sf2_line(size_t width, const std::string &name, const std::string &path) { - instance.PrintStats(); + assert(width > 0); + std::vector line_buf(width); + snprintf(line_buf.data(), width, "%-16s - %s", name.c_str(), path.c_str()); + std::string line = line_buf.data(); + + // Formatted line did not fill the whole buffer - no further formatting + // is necessary. + if (line.size() + 1 < width) + return line; + + // The description was too long and got trimmed; place three dots in + // the end to make it clear to the user. + const std::string cutoff = "..."; + assert(line.size() > cutoff.size()); + line.replace(line.end() - cutoff.size(), line.end(), cutoff); + return line; } -static void fluid_init(Section *sec) +MIDI_RC MidiHandlerFluidsynth::ListAll(Program *caller) { - sec->AddDestroyFunction(&fluid_destroy, true); + auto *section = static_cast(control->GetSection("fluidsynth")); + const auto sf_spec = parse_sf_pref(section->Get_string("soundfont"), 100); + const auto sf_name = std::get(sf_spec); + const size_t term_width = INT10_GetTextColumns(); + + auto write_line = [caller](bool highlight, const std::string &line) { + const char color[] = "\033[32;1m"; + const char nocolor[] = "\033[0m"; + if (highlight) + caller->WriteOut("* %s%s%s\n", color, line.c_str(), nocolor); + else + caller->WriteOut(" %s\n", line.c_str()); + }; + + // If selected soundfont exists in the current working directory, + // then print it. + const std::string sf_path = CROSS_ResolveHome(sf_name); + if (path_exists(sf_path)) { + write_line((sf_path == selected_font), sf_name); + } + + // Go through all soundfont directories and list all .sf2 files. + char dir_entry_name[CROSS_LEN]; + for (const auto &dir_path : get_data_dirs()) { + dir_information *dir = open_directory(dir_path.c_str()); + bool is_directory = false; + if (!dir) + continue; + if (!read_directory_first(dir, dir_entry_name, is_directory)) + continue; + do { + if (is_directory) + continue; + + const size_t name_len = strlen(dir_entry_name); + if (name_len < 4) + continue; + const char *ext = dir_entry_name + name_len - 4; + const bool is_sf2 = (strcasecmp(ext, ".sf2") == 0); + if (!is_sf2) + continue; + + const std::string font_path = dir_path + dir_entry_name; + + const auto line = format_sf2_line(term_width - 2, + dir_entry_name, font_path); + const bool highlight = is_open && + (selected_font == font_path); + + write_line(highlight, line); + + } while (read_directory_next(dir, dir_entry_name, is_directory)); + } + + return MIDI_RC::OK; } +static void fluid_init(MAYBE_UNUSED Section *sec) +{} + void FLUID_AddConfigSection(Config *conf) { assert(conf); diff -Nru dosbox-staging-0.76.0/src/midi/midi_fluidsynth.h dosbox-staging-0.77.0/src/midi/midi_fluidsynth.h --- dosbox-staging-0.76.0/src/midi/midi_fluidsynth.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_fluidsynth.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,9 +1,9 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2020-2020 Nikos Chantziaras * Copyright (C) 2002-2011 The DOSBox Team - * Copyright (C) 2020 Nikos Chantziaras - * Copyright (C) 2020 The dosbox-staging team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,42 +27,54 @@ #if C_FLUIDSYNTH +#include #include +#include #include +#include #include "mixer.h" +#include "rwqueue.h" #include "soft_limiter.h" class MidiHandlerFluidsynth final : public MidiHandler { -private: - using fsynth_ptr_t = std::unique_ptr; - - using fluid_settings_ptr_t = - std::unique_ptr; - - using mixer_channel_ptr_t = - std::unique_ptr; - public: - MidiHandlerFluidsynth() : soft_limiter("FSYNTH", prescale_level) {} + MidiHandlerFluidsynth(); + ~MidiHandlerFluidsynth() override; void PrintStats(); const char *GetName() const override { return "fluidsynth"; } bool Open(const char *conf) override; void Close() override; void PlayMsg(const uint8_t *msg) override; void PlaySysex(uint8_t *sysex, size_t len) override; + MIDI_RC ListAll(Program *caller) override; private: - static constexpr uint16_t expected_max_frames = (96000 / 1000) + 4; - void MixerCallBack(uint16_t len); // see: MIXER_Handler - void SetMixerLevel(const AudioFrame &prescale_level) noexcept; + void MixerCallBack(uint16_t requested_frames); + void SetMixerLevel(const AudioFrame &levels) noexcept; + uint16_t GetRemainingFrames(); + void Render(); + + using fluid_settings_ptr_t = + std::unique_ptr; + using fsynth_ptr_t = std::unique_ptr; + using channel_t = std::unique_ptr; fluid_settings_ptr_t settings{nullptr, &delete_fluid_settings}; fsynth_ptr_t synth{nullptr, &delete_fluid_synth}; - mixer_channel_ptr_t channel{nullptr, MIXER_DelChannel}; - AudioFrame prescale_level = {1.0f, 1.0f}; - SoftLimiter soft_limiter; + channel_t channel{nullptr, MIXER_DelChannel}; + std::string selected_font = ""; + + std::vector play_buffer = {}; + static constexpr auto num_buffers = 8; + RWQueue> playable{num_buffers}; + RWQueue> backstock{num_buffers}; + + std::thread renderer = {}; + SoftLimiter soft_limiter; + uint16_t last_played_frame = 0; // relative frame-offset in the play buffer + std::atomic_bool keep_rendering = {}; bool is_open = false; }; diff -Nru dosbox-staging-0.76.0/src/midi/midi_handler.h dosbox-staging-0.77.0/src/midi/midi_handler.h --- dosbox-staging-0.76.0/src/midi/midi_handler.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_handler.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * + * Copyright (C) 2020-2021 The DOSBox Staging Team * Copyright (C) 2002-2020 The DOSBox Team - * Copyright (C) 2020-2020 The dosbox-staging team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +26,11 @@ #include -#define SYSEX_SIZE 8192 +enum class MIDI_RC : int { + OK = 0, + ERR_DEVICE_NOT_CONFIGURED = -1, + ERR_DEVICE_LIST_NOT_SUPPORTED = -2, +}; class MidiHandler { public: @@ -47,11 +51,32 @@ virtual void Close() {} + void HaltSequence() + { + uint8_t message[3] = {}; // see MIDI_evt_len for length lookup-table + constexpr uint8_t all_notes_off = 0x7b; + constexpr uint8_t all_controllers_off = 0x79; + + // from the first to last channel + for (uint8_t channel = 0xb0; channel <= 0xbf; ++channel) { + message[0] = channel; + + message[1] = all_notes_off; + PlayMsg(message); + + message[1] = all_controllers_off; + PlayMsg(message); + } + } + virtual void PlayMsg(MAYBE_UNUSED const uint8_t *msg) {} virtual void PlaySysex(MAYBE_UNUSED uint8_t *sysex, MAYBE_UNUSED size_t len) {} - virtual void ListAll(MAYBE_UNUSED Program *base) {} + virtual MIDI_RC ListAll(Program *) + { + return MIDI_RC::ERR_DEVICE_LIST_NOT_SUPPORTED; + } MidiHandler *next; }; diff -Nru dosbox-staging-0.76.0/src/midi/midi_lasynth_model.cpp dosbox-staging-0.77.0/src/midi/midi_lasynth_model.cpp --- dosbox-staging-0.76.0/src/midi/midi_lasynth_model.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_lasynth_model.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,142 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "midi_lasynth_model.h" + +#if C_MT32EMU + +#include + +#include "fs_utils.h" + +// Construct a new model and ensure both PCM and control ROM(s) are provided +LASynthModel::LASynthModel(const std::string &rom_name, + const Rom *pcm_rom_full, + const Rom *pcm_rom_l, + const Rom *pcm_rom_h, + const Rom *ctrl_rom_full, + const Rom *ctrl_rom_1, + const Rom *ctrl_rom_2) + : name(rom_name), + version_pos(SetVersion()), + pcm_full(pcm_rom_full), + pcm_l(pcm_rom_l), + pcm_h(pcm_rom_h), + ctrl_full(ctrl_rom_full), + ctrl_a(ctrl_rom_1), + ctrl_b(ctrl_rom_2) +{ + assert(!name.empty()); + assert(version_pos != std::string::npos); + assert(pcm_full || (pcm_l && pcm_h)); + assert(ctrl_full || (ctrl_a && ctrl_b)); +} + +// Checks if its ROMs can be positively found in the provided directory +bool LASynthModel::InDir(const service_t &service, const std::string &dir) const +{ + assert(service); + + auto find_rom = [&service, &dir](const Rom *rom) -> bool { + if (!rom) + return false; + + const std::string rom_path = dir + rom->filename; + if (!path_exists(rom_path)) + return false; + + mt32emu_rom_info info; + if (service->identifyROMFile(&info, rom_path.c_str(), nullptr) != MT32EMU_RC_OK) + return false; + + if (rom->type == ROM_TYPE::UNVERSIONED) + return true; + + const bool found_pcm = info.pcm_rom_id && + (rom->id == info.pcm_rom_id); + const bool found_ctrl = info.control_rom_id && + (rom->id == info.control_rom_id); + return found_pcm || found_ctrl; + }; + + const bool have_pcm = find_rom(pcm_full) || + (find_rom(pcm_l) && find_rom(pcm_h)); + const bool have_ctrl = find_rom(ctrl_full) || + (find_rom(ctrl_a) && find_rom(ctrl_b)); + return have_pcm && have_ctrl; +} + +// If present, loads either the full or partial ROMs from the provided directory +bool LASynthModel::Load(const service_t &service, const std::string &dir) const +{ + if (!service || !InDir(service, dir)) + return false; + + auto load_rom = [&service, &dir](const Rom *rom_full, + mt32emu_return_code expected_code) -> bool { + if (!rom_full) + return false; + const std::string rom_path = dir + rom_full->filename; + const auto rcode = service->addROMFile(rom_path.c_str()); + return rcode == expected_code; + }; + + auto load_both = [&service, &dir](const Rom *rom_1, const Rom *rom_2, + mt32emu_return_code expected_code) -> bool { + if (!rom_1 || !rom_2) + return false; + const std::string rom_1_path = dir + rom_1->filename; + const std::string rom_2_path = dir + rom_2->filename; + const auto rcode = service->mergeAndAddROMFiles(rom_1_path.c_str(), + rom_2_path.c_str()); + return rcode == expected_code; + }; + + const bool loaded_pcm = load_rom(pcm_full, MT32EMU_RC_ADDED_PCM_ROM) || + load_both(pcm_l, pcm_h, MT32EMU_RC_ADDED_PCM_ROM); + const bool loaded_ctrl = load_rom(ctrl_full, MT32EMU_RC_ADDED_CONTROL_ROM) || + load_both(ctrl_a, ctrl_b, + MT32EMU_RC_ADDED_CONTROL_ROM); + return loaded_pcm && loaded_ctrl; +} + +const char *LASynthModel::GetVersion() const +{ + assert(version_pos != std::string::npos); + return name.data() + version_pos; +} + +bool LASynthModel::Matches(const std::string &model_name) const +{ + assert(!model_name.empty()); + return (name.rfind(model_name, 0) == 0); +} + +size_t LASynthModel::SetVersion() +{ + // Given the versioned name "mt32_106", version_pos would be 5 + // Given the unversioned name "cm32l", version_pos would be 0 + // (if the underscore isn't found, find_first_of returns -1) + const auto pos = name.find_first_of('_') + 1; + assert(pos < name.size()); + return pos; +} + +#endif // C_MT32EMU diff -Nru dosbox-staging-0.76.0/src/midi/midi_lasynth_model.h dosbox-staging-0.77.0/src/midi/midi_lasynth_model.h --- dosbox-staging-0.76.0/src/midi/midi_lasynth_model.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_lasynth_model.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DOSBOX_MIDI_LA_SYNTH_MODEL_H +#define DOSBOX_MIDI_LA_SYNTH_MODEL_H + +#include "dosbox.h" + +#if C_MT32EMU + +#include +#include + +#define MT32EMU_API_TYPE 3 +#include + +// An LA Synth Model consists of PCM and Control ROMs either in full or partial +// form. +class LASynthModel { +public: + enum class ROM_TYPE { UNVERSIONED, VERSIONED }; + + struct Rom { + const std::string id; + const std::string filename; + const ROM_TYPE type; + }; + + LASynthModel(const std::string &rom_name, + const Rom *pcm_rom_full, + const Rom *pcm_rom_l, + const Rom *pcm_rom_h, + const Rom *ctrl_rom_full, + const Rom *ctrl_rom_a, + const Rom *ctrl_rom_b); + + LASynthModel() = delete; + LASynthModel(LASynthModel &) = delete; + LASynthModel &operator=(LASynthModel &) = delete; + + const char *GetName() const { return name.c_str(); } + + // The version may be postfixed onto the model's name using an + // underscore. If the model is unversioned, then the name is returned. + // The name "mt32_107" returns version "107". + // The name "mt32_bluer" returns version "bluer". + // The name "mt32" doesn't have a version, so "mt32" is returned. + const char *GetVersion() const; + + // Returns true if the model has a matches that provided "mt32" or "cm32l". + bool Matches(const std::string &model_name) const; + + using service_t = std::unique_ptr; + bool InDir(const service_t &service, const std::string &dir) const; + bool Load(const service_t &service, const std::string &dir) const; + +private: + size_t SetVersion(); + + const std::string name = {}; + const size_t version_pos = std::string::npos; + + // PCM ROMs. Partials are in low-high form + const Rom *pcm_full = nullptr; + const Rom *pcm_l = nullptr; + const Rom *pcm_h = nullptr; + + // Control ROMs. Partials are in a-b form + const Rom *ctrl_full = nullptr; + const Rom *ctrl_a = nullptr; + const Rom *ctrl_b = nullptr; +}; + +#endif // C_MT32EMU + +#endif diff -Nru dosbox-staging-0.76.0/src/midi/midi_mt32.cpp dosbox-staging-0.77.0/src/midi/midi_mt32.cpp --- dosbox-staging-0.76.0/src/midi/midi_mt32.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_mt32.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,735 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2012-2021 sergm + * Copyright (C) 2020-2021 Nikos Chantziaras (settings) + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "midi_mt32.h" + +#if C_MT32EMU + +#include +#include +#include +#include +#include +#include + +#include + +#include "control.h" +#include "cross.h" +#include "fs_utils.h" +#include "midi.h" +#include "midi_lasynth_model.h" +#include "mixer.h" +#include "string_utils.h" +#include "support.h" +#include "../ints/int10.h" + +// mt32emu Settings +// ---------------- + +// Synth granularity in frames. We keep four buffers in-flight at any given +// time: when playback exhausts the "head" buffer, we ask MT-32 to render the +// next buffer, asynchronously, which is then placed at the back of the queue. +// These four buffers mean we typically have 2048 frames or ~48 ms in backlog. +static constexpr int FRAMES_PER_BUFFER = 512; + +// Analogue circuit modes: DIGITAL_ONLY, COARSE, ACCURATE, OVERSAMPLED +constexpr auto ANALOG_MODE = MT32Emu::AnalogOutputMode_ACCURATE; + +// DAC Emulation modes: NICE, PURE, GENERATION1, and GENERATION2 +constexpr auto DAC_MODE = MT32Emu::DACInputMode_NICE; + +// Analog rendering types: BIT16S, FLOAT +constexpr auto RENDERING_TYPE = MT32Emu::RendererType_FLOAT; + +// Sample rate conversion quality: FASTEST, FAST, GOOD, BEST +constexpr auto RATE_CONVERSION_QUALITY = MT32Emu::SamplerateConversionQuality_BEST; + +// Prefer higher ramp resolution over the coarser volume steps used by the hardware +constexpr bool USE_NICE_RAMP = true; + +// Prefer higher panning resolution over the coarser positions used by the hardware +constexpr bool USE_NICE_PANNING = true; + +// Prefer the rich sound offered by the hardware's existing partial mixer +constexpr bool USE_NICE_PARTIAL_MIXING = false; + +using Rom = LASynthModel::Rom; +constexpr auto versioned = LASynthModel::ROM_TYPE::VERSIONED; +constexpr auto unversioned = LASynthModel::ROM_TYPE::UNVERSIONED; + +// Traditional ROMs +const Rom mt32_pcm_any_f = {"pcm_mt32", "MT32_PCM.ROM", unversioned}; +const Rom mt32_ctrl_any_f = {"ctrl_mt32", "MT32_CONTROL.ROM", unversioned}; +const Rom cm32l_pcm_any_f = {"pcm_cm32l", "CM32L_PCM.ROM", unversioned}; +const Rom cm32l_ctrl_any_f = {"ctrl_cm32l", "CM32L_CONTROL.ROM", unversioned}; + +// MAME ROMs (versioned) +const Rom mt32_pcm_100_f = {"pcm_mt32", "r15449121.ic37.bin", versioned}; +const Rom mt32_pcm_100_l = {"pcm_mt32_l", "r15179844.ic21.bin", versioned}; +const Rom mt32_pcm_100_h = {"pcm_mt32_h", "r15179845.ic22.bin", versioned}; +const Rom mt32_ctrl_104_a = {"ctrl_mt32_1_04_a", "mt32_1.0.4.ic27.bin", versioned}; +const Rom mt32_ctrl_104_b = {"ctrl_mt32_1_04_b", "mt32_1.0.4.ic26.bin", versioned}; +const Rom mt32_ctrl_105_a = {"ctrl_mt32_1_05_a", "mt32_1.0.5.ic27.bin", versioned}; +const Rom mt32_ctrl_105_b = {"ctrl_mt32_1_05_b", "mt32_1.0.5.ic26.bin", versioned}; +const Rom mt32_ctrl_106_a = {"ctrl_mt32_1_06_a", "mt32_1.0.6.ic27.bin", versioned}; +const Rom mt32_ctrl_106_b = {"ctrl_mt32_1_06_b", "mt32_1.0.6.ic26.bin", versioned}; +const Rom mt32_ctrl_107_a = {"ctrl_mt32_1_07_a", "mt32_1.0.7.ic27.bin", versioned}; +const Rom mt32_ctrl_107_b = {"ctrl_mt32_1_07_b", "mt32_1.0.7.ic26.bin", versioned}; +const Rom mt32_ctrl_bluer_a = {"ctrl_mt32_bluer_a", "blue_ridge__mt32a.bin", versioned}; +const Rom mt32_ctrl_bluer_b = {"ctrl_mt32_bluer_b", "blue_ridge__mt32b.bin", versioned}; +const Rom mt32_ctrl_204_f = {"ctrl_mt32_2_04", "mt32_2.0.4.ic28.bin", versioned}; +const Rom cm32l_ctrl_100_f = {"ctrl_cm32l_1_00", "lapc-i.v1.0.0.ic3.bin", versioned}; +const Rom cm32l_ctrl_102_f = {"ctrl_cm32l_1_02", "cm32l_control.rom", versioned}; +const Rom cm32l_pcm_100_h = {"pcm_cm32l_h", "r15179945.ic8.bin", versioned}; +const Rom &cm32l_pcm_100_l = mt32_pcm_100_f; // Lower half of samples comes from MT-32 + +// Roland LA Models (composed of ROMs) +const LASynthModel mt32_any_model = {"mt32", &mt32_pcm_any_f, nullptr, + nullptr, &mt32_ctrl_any_f, nullptr, + nullptr}; +const LASynthModel mt32_104_model = {"mt32_104", &mt32_pcm_100_f, + &mt32_pcm_100_l, &mt32_pcm_100_h, + nullptr, &mt32_ctrl_104_a, + &mt32_ctrl_104_b}; +const LASynthModel mt32_105_model = {"mt32_105", &mt32_pcm_100_f, + &mt32_pcm_100_l, &mt32_pcm_100_h, + nullptr, &mt32_ctrl_105_a, + &mt32_ctrl_105_b}; +const LASynthModel mt32_106_model = {"mt32_106", &mt32_pcm_100_f, + &mt32_pcm_100_l, &mt32_pcm_100_h, + nullptr, &mt32_ctrl_106_a, + &mt32_ctrl_106_b}; +const LASynthModel mt32_107_model = {"mt32_107", &mt32_pcm_100_f, + &mt32_pcm_100_l, &mt32_pcm_100_h, + nullptr, &mt32_ctrl_107_a, + &mt32_ctrl_107_b}; +const LASynthModel mt32_bluer_model = {"mt32_bluer", &mt32_pcm_100_f, + &mt32_pcm_100_l, &mt32_pcm_100_h, + nullptr, &mt32_ctrl_bluer_a, + &mt32_ctrl_bluer_b}; +const LASynthModel mt32_204_model = {"mt32_204", &mt32_pcm_100_f, + &mt32_pcm_100_l, &mt32_pcm_100_h, + &mt32_ctrl_204_f, nullptr, + nullptr}; +const LASynthModel cm32l_any_model = {"cm32l", &cm32l_pcm_any_f, nullptr, + nullptr, &cm32l_ctrl_any_f, nullptr, + nullptr}; +const LASynthModel cm32l_100_model = { + "cm32l_100", nullptr, &cm32l_pcm_100_l, &cm32l_pcm_100_h, + &cm32l_ctrl_100_f, nullptr, nullptr}; +const LASynthModel cm32l_102_model = { + "cm32l_102", nullptr, &cm32l_pcm_100_l, &cm32l_pcm_100_h, + &cm32l_ctrl_102_f, nullptr, nullptr}; + +// Aliased models +const LASynthModel mt32_new_model = {"mt32_new", // new is 2.04 + &mt32_pcm_100_f, &mt32_pcm_100_l, + &mt32_pcm_100_h, &mt32_ctrl_204_f, + nullptr, nullptr}; +const LASynthModel mt32_old_model = {"mt32_old", // old is 1.07 + &mt32_pcm_100_f, &mt32_pcm_100_l, + &mt32_pcm_100_h, nullptr, + &mt32_ctrl_107_a, &mt32_ctrl_107_b}; + +// In order that "model = auto" will load +const LASynthModel *all_models[] = { + &cm32l_any_model, &cm32l_102_model, &cm32l_100_model, &mt32_any_model, + &mt32_old_model, &mt32_107_model, &mt32_106_model, &mt32_105_model, + &mt32_104_model, &mt32_bluer_model, &mt32_new_model, &mt32_204_model, +}; + +MidiHandler_mt32 mt32_instance; + +static void init_mt32_dosbox_settings(Section_prop &sec_prop) +{ + constexpr auto when_idle = Property::Changeable::WhenIdle; + + const char *models[] = {"auto", + cm32l_any_model.GetName(), + cm32l_102_model.GetName(), + cm32l_100_model.GetName(), + mt32_any_model.GetName(), + mt32_old_model.GetName(), + mt32_107_model.GetName(), + mt32_106_model.GetName(), + mt32_105_model.GetName(), + mt32_104_model.GetName(), + mt32_bluer_model.GetName(), + mt32_new_model.GetName(), + mt32_204_model.GetName(), + 0}; + auto *str_prop = sec_prop.Add_string("model", when_idle, "auto"); + str_prop->Set_values(models); + str_prop->Set_help( + "Model of synthesizer to use.\n" + "'auto' picks the first model with available ROMs, in order as listed.\n" + "'cm32l' and 'mt32' pick the first model of their type, in the order listed.\n" + "'mt32_old' and 'mt32_new' are aliases for 1.07 and 2.04, respectively."); + + str_prop = sec_prop.Add_string("romdir", when_idle, ""); + str_prop->Set_help( + "The directory containing ROMs for one or more models.\n" + "The directory can be absolute or relative, or leave it blank to\n" + "use the 'mt32-roms' directory in your DOSBox configuration\n" + "directory. Other common system locations will be checked as well.\n" + "ROM files inside this directory may include any of the following:\n" + " - MT32_CONTROL.ROM and MT32_PCM.ROM, for the 'mt32' model.\n" + " - CM32L_CONTROL.ROM and CM32L_PCM.ROM, for the 'cm32l' model.\n" + " - Unzipped MAME MT-32 and CM-32L ROMs, for the versioned models.\n"); +} + +#if defined(WIN32) + +static std::deque get_rom_dirs() +{ + return { + CROSS_GetPlatformConfigDir() + "mt32-roms\\", + "C:\\mt32-rom-data\\", + }; +} + +#elif defined(MACOSX) + +static std::deque get_rom_dirs() +{ + return { + CROSS_GetPlatformConfigDir() + "mt32-roms/", + CROSS_ResolveHome("~/Library/Audio/Sounds/MT32-Roms/"), + "/usr/local/share/mt32-rom-data/", + "/usr/share/mt32-rom-data/", + }; +} + +#else + +static std::deque get_rom_dirs() +{ + // First priority is $XDG_DATA_HOME + const char *xdg_data_home_env = getenv("XDG_DATA_HOME"); + const auto xdg_data_home = CROSS_ResolveHome( + xdg_data_home_env ? xdg_data_home_env : "~/.local/share"); + + std::deque dirs = { + xdg_data_home + "/dosbox/mt32-roms/", + xdg_data_home + "/mt32-rom-data/", + }; + + // Second priority are the $XDG_DATA_DIRS + const char *xdg_data_dirs_env = getenv("XDG_DATA_DIRS"); + if (!xdg_data_dirs_env) + xdg_data_dirs_env = "/usr/local/share:/usr/share"; + + for (auto xdg_data_dir : split(xdg_data_dirs_env, ':')) { + trim(xdg_data_dir); + if (xdg_data_dir.empty()) { + continue; + } + const auto resolved_dir = CROSS_ResolveHome(xdg_data_dir); + dirs.emplace_back(resolved_dir + "/mt32-rom-data/"); + } + + // Third priority is $XDG_CONF_HOME, for convenience + dirs.emplace_back(CROSS_GetPlatformConfigDir() + "mt32-roms/"); + + return dirs; +} + +#endif + +static std::deque get_selected_dirs() +{ + const auto section = static_cast( + control->GetSection("mt32")); + assert(section); + + // Get potential ROM directories from the environment and/or system + auto rom_dirs = get_rom_dirs(); + + // Get the user's configured ROM directory; otherwise use 'mt32-roms' + std::string selected_romdir = section->Get_string("romdir"); + if (selected_romdir.empty()) // already trimmed + selected_romdir = "mt32-roms"; + if (selected_romdir.back() != '/' && selected_romdir.back() != '\\') + selected_romdir += CROSS_FILESPLIT; + + // Make sure we search the user's configured directory first + rom_dirs.emplace_front(CROSS_ResolveHome((selected_romdir))); + return rom_dirs; +} + +static const char *get_selected_model() +{ + const auto section = static_cast(control->GetSection("mt32")); + assert(section); + return section->Get_string("model"); +} + +static std::set has_models(const MidiHandler_mt32::service_t &service, + const std::string &dir) +{ + std::set models = {}; + for (const auto &model : all_models) + if (model->InDir(service, dir)) + models.insert(model); + return models; +} + +static std::string load_model(const MidiHandler_mt32::service_t &service, + const std::string &selected_model, + const std::deque &rom_dirs) +{ + const bool is_auto = (selected_model == "auto"); + for (const auto &model : all_models) + if (is_auto || model->Matches(selected_model)) + for (const auto &dir : rom_dirs) + if (model->Load(service, dir)) + return dir; + return ""; +} + +static mt32emu_report_handler_i get_report_handler_interface() +{ + class ReportHandler { + public: + static mt32emu_report_handler_version getReportHandlerVersionID(mt32emu_report_handler_i) + { + return MT32EMU_REPORT_HANDLER_VERSION_0; + } + + static void printDebug(MAYBE_UNUSED void *instance_data, + const char *fmt, + va_list list) + { + char msg[1024]; + safe_sprintf(msg, fmt, list); + DEBUG_LOG_MSG("MT32: %s", msg); + } + + static void onErrorControlROM(void *) + { + LOG_MSG("MT32: Couldn't open Control ROM file"); + } + + static void onErrorPCMROM(void *) + { + LOG_MSG("MT32: Couldn't open PCM ROM file"); + } + + static void showLCDMessage(void *, const char *message) + { + LOG_MSG("MT32: LCD-Message: %s", message); + } + }; + + static const mt32emu_report_handler_i_v0 REPORT_HANDLER_V0_IMPL = { + ReportHandler::getReportHandlerVersionID, + ReportHandler::printDebug, + ReportHandler::onErrorControlROM, + ReportHandler::onErrorPCMROM, + ReportHandler::showLCDMessage, + nullptr, // explicit empty function pointers + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr}; + + static const mt32emu_report_handler_i REPORT_HANDLER_I = { + &REPORT_HANDLER_V0_IMPL}; + + return REPORT_HANDLER_I; +} + +MidiHandler_mt32::MidiHandler_mt32() + : soft_limiter("MT32"), + keep_rendering(false) +{} + +MidiHandler_mt32::service_t MidiHandler_mt32::GetService() +{ + service_t mt32_service = std::make_unique(); + // Has libmt32emu already created a context? + if (!mt32_service->getContext()) + mt32_service->createContext(get_report_handler_interface(), this); + return mt32_service; +} + +// Calculates the maximum width available to print the rom directory, given +// the terminal's width, indent size, and space needed for the model names: +// [indent][max_dir_width][N columns + N delimeters] +static size_t get_max_dir_width(const LASynthModel *(&models_without_aliases)[10], + const char *indent, + const char *column_delim) +{ + const size_t column_delim_width = strlen(column_delim); + size_t header_width = strlen(indent); + for (const auto &model : models_without_aliases) + header_width += strlen(model->GetVersion()) + column_delim_width; + + const size_t term_width = INT10_GetTextColumns() - column_delim_width; + assert(term_width > header_width); + const auto max_dir_width = term_width - header_width; + return max_dir_width; +} + +// Returns the set of models supported by all of the directories, and also +// populates the provide map of the modules supported by each directory. +static std::set populate_available_models( + const MidiHandler_mt32::service_t &service, + std::map> &dirs_with_models) +{ + std::set available_models; + for (const std::string &dir : get_selected_dirs()) { + const auto models = has_models(service, dir); + if (!models.empty()) { + dirs_with_models[dir] = models; + available_models.insert(models.begin(), models.end()); + } + } + return available_models; +} + +// Prints a table of directories and supported models. Models are printed +// across the first row and directories are printed down the left column. +// Long directories are truncated and model versions are used to avoid text +// wrapping. +MIDI_RC MidiHandler_mt32::ListAll(Program *caller) +{ + // Table layout constants + constexpr char column_delim[] = " "; + constexpr char indent[] = " "; + constexpr char trailing_dots[] = ".."; + const auto delim_width = strlen(column_delim); + + const LASynthModel *models_without_aliases[] = { + &cm32l_any_model, &cm32l_102_model, &cm32l_100_model, + &mt32_any_model, &mt32_107_model, &mt32_106_model, + &mt32_105_model, &mt32_104_model, &mt32_bluer_model, + &mt32_204_model}; + + const size_t max_dir_width = get_max_dir_width(models_without_aliases, + indent, column_delim); + const size_t truncated_dir_width = max_dir_width - strlen(trailing_dots); + assert(truncated_dir_width < max_dir_width); + + // Get the set of directories and the models they support + std::map> dirs_with_models; + const auto available_models = populate_available_models(GetService(), + dirs_with_models); + if (available_models.empty()) { + caller->WriteOut(" No supported models present.\n"); + return MIDI_RC::OK; + } + + // Text colors and highlight selector + constexpr char gray[] = "\033[30;1m"; + constexpr char green[] = "\033[32;1m"; + constexpr char nocolor[] = "\033[0m"; + auto get_highlight = [&](bool is_missing, bool is_matching) { + return is_missing ? gray : is_matching ? green : nocolor; + }; + + int num_matches = 0; + const std::string selected_model = get_selected_model(); + auto first_match = [&](const LASynthModel *model) { + return model->Matches(selected_model) && !num_matches++; + }; + + // Print the header row of all models + const std::string dirs_padding(max_dir_width, ' '); + caller->WriteOut("%s%s", indent, dirs_padding.c_str()); + for (const auto &model : models_without_aliases) { + const bool is_missing = (available_models.find(model) == available_models.end()); + const bool is_first_match = !is_missing && first_match(model); + const auto color = get_highlight(is_missing, is_first_match); + caller->WriteOut("%s%s%s%s", color, model->GetVersion(), + nocolor, column_delim); + } + caller->WriteOut("\n"); + + // Iterate over the found directories and models + num_matches = 0; + for (const auto &dir_and_models : dirs_with_models) { + const std::string &dir = dir_and_models.first; + const auto &dir_models = dir_and_models.second; + + // Print the directory, and truncate it if it's too long + if (dir.size() > max_dir_width) { + const auto truncated_dir = dir.substr(0, truncated_dir_width); + caller->WriteOut("%s%s%s", indent, truncated_dir.c_str(), trailing_dots); + } + // Otherwise print the directory with padding + else { + const auto pad_width = max_dir_width - dir.size(); + const auto dir_padding = std::string(pad_width, ' '); + caller->WriteOut("%s%s%s", indent, dir.c_str(), dir_padding.c_str()); + } + // Print an indicator if the directory has the model + for (const auto &model : models_without_aliases) { + const auto column_width = strlen(model->GetVersion()); + std::string textbox(column_width + delim_width, ' '); + assert(textbox.size() > 2); + const size_t text_center = (textbox.size() / 2) - 1; + + const bool is_missing = (dir_models.find(model) == dir_models.end()); + const bool is_first_match = !is_missing && first_match(model); + textbox[text_center] = is_missing ? '-' : 'y'; + const auto color = get_highlight(is_missing, is_first_match); + caller->WriteOut("%s%s%s", color, textbox.c_str(), nocolor); + } + caller->WriteOut("\n"); + } + return MIDI_RC::OK; +} + +bool MidiHandler_mt32::Open(MAYBE_UNUSED const char *conf) +{ + Close(); + + service_t mt32_service = GetService(); + const std::string selected_model = get_selected_model(); + const auto rom_dirs = get_selected_dirs(); + + // Load the selected model and print info about it + const auto found_in = load_model(mt32_service, selected_model, rom_dirs); + if (found_in.empty()) { + LOG_MSG("MT32: Failed to find ROMs for model %s in:", + selected_model.c_str()); + for (const auto &dir : rom_dirs) { + const char div = (dir != rom_dirs.back() ? '|' : '`'); + LOG_MSG("MT32: %c- %s", div, dir.c_str()); + } + return false; + } + mt32emu_rom_info rom_info; + mt32_service->getROMInfo(&rom_info); + LOG_MSG("MT32: Initialized %s from %s", + rom_info.control_rom_description, found_in.c_str()); + + const auto mixer_callback = std::bind(&MidiHandler_mt32::MixerCallBack, + this, std::placeholders::_1); + channel_t mixer_channel(MIXER_AddChannel(mixer_callback, 0, "MT32"), + MIXER_DelChannel); + + // Let the mixer command adjust the MT32's services gain-level + const auto set_mixer_level = std::bind(&MidiHandler_mt32::SetMixerLevel, + this, std::placeholders::_1); + mixer_channel->RegisterLevelCallBack(set_mixer_level); + + const auto sample_rate = mixer_channel->GetSampleRate(); + + mt32_service->setAnalogOutputMode(ANALOG_MODE); + mt32_service->selectRendererType(RENDERING_TYPE); + mt32_service->setStereoOutputSampleRate(sample_rate); + mt32_service->setSamplerateConversionQuality(RATE_CONVERSION_QUALITY); + mt32_service->setDACInputMode(DAC_MODE); + mt32_service->setNiceAmpRampEnabled(USE_NICE_RAMP); + mt32_service->setNicePanningEnabled(USE_NICE_PANNING); + mt32_service->setNicePartialMixingEnabled(USE_NICE_PARTIAL_MIXING); + + const auto rc = mt32_service->openSynth(); + if (rc != MT32EMU_RC_OK) { + LOG_MSG("MT32: Error initialising emulation: %i", rc); + return false; + } + service = std::move(mt32_service); + channel = std::move(mixer_channel); + + // Start rendering audio + keep_rendering = true; + const auto render = std::bind(&MidiHandler_mt32::Render, this); + renderer = std::thread(render); + set_thread_name(renderer, "dosbox:mt32"); + play_buffer = playable.Dequeue(); // populate the first play buffer + + // Start playback + channel->Enable(true); + is_open = true; + return true; +} + +MidiHandler_mt32::~MidiHandler_mt32() +{ + Close(); +} + +// When the user runs "mixer MT32 :", this function +// get those percents as floating point ratios (100% being 1.0f). Instead of +// post-scaling the rendered integer stream in the mixer, we instead provide the +// desired floating point scalar to the MT32 service via its gain() interface +// where it can more elegantly adjust the level of the synthesis. + +// Another nuance is that MT32's gain interface takes in a single float, but +// DOSBox's mixer accept left-and-right, so we apply gain using the larger of +// the two and then use the limiter's left-right ratios to scale down by lesser +// ratio. +void MidiHandler_mt32::SetMixerLevel(const AudioFrame &levels) noexcept +{ + const float gain = std::max(levels.left, levels.right); + { + const std::lock_guard lock(service_mutex); + if (service) + service->setOutputGain(gain); + } + + const AudioFrame desired = {levels.left / gain, levels.right / gain}; + // mt32emu generates floats between -1 and 1, so we ask the + // soft limiter to scale these up to the INT16 range + soft_limiter.UpdateLevels(desired, INT16_MAX); +} + +void MidiHandler_mt32::Close() +{ + if (!is_open) + return; + + // Stop playback + if (channel) + channel->Enable(false); + + // Stop rendering and drain the rings + keep_rendering = false; + if (!backstock.Size()) + backstock.Enqueue(std::move(play_buffer)); + while (playable.Size()) + play_buffer = playable.Dequeue(); + + // Wait for the rendering thread to finish + if (renderer.joinable()) + renderer.join(); + + // Stop the synthesizer + if (service) { + service->closeSynth(); + service->freeContext(); + } + + soft_limiter.PrintStats(); + + // Reset the members + channel.reset(); + service.reset(); + soft_limiter.Reset(); + total_buffers_played = 0; + last_played_frame = 0; + + is_open = false; +} + +uint32_t MidiHandler_mt32::GetMidiEventTimestamp() const +{ + const uint32_t played_frames = total_buffers_played * FRAMES_PER_BUFFER; + return service->convertOutputToSynthTimestamp(played_frames + + last_played_frame); +} + +void MidiHandler_mt32::PlayMsg(const uint8_t *msg) +{ + const auto msg_words = reinterpret_cast(msg); + const std::lock_guard lock(service_mutex); + service->playMsgAt(SDL_SwapLE32(*msg_words), GetMidiEventTimestamp()); +} + +void MidiHandler_mt32::PlaySysex(uint8_t *sysex, size_t len) +{ + assert(len <= UINT32_MAX); + const auto msg_len = static_cast(len); + const std::lock_guard lock(service_mutex); + service->playSysexAt(sysex, msg_len, GetMidiEventTimestamp()); +} + +// The callback operates at the frame-level, steadily adding samples to the +// mixer until the requested numbers of frames is met. +void MidiHandler_mt32::MixerCallBack(uint16_t requested_frames) +{ + while (requested_frames) { + const auto frames_to_be_played = std::min(GetRemainingFrames(), + requested_frames); + const auto sample_offset_in_buffer = play_buffer.data() + + last_played_frame * 2; + channel->AddSamples_s16(frames_to_be_played, sample_offset_in_buffer); + requested_frames -= frames_to_be_played; + last_played_frame += frames_to_be_played; + } +} + +// Returns the number of frames left to play in the buffer. +uint16_t MidiHandler_mt32::GetRemainingFrames() +{ + // If the current buffer has some frames left, then return those ... + if (last_played_frame < FRAMES_PER_BUFFER) + return FRAMES_PER_BUFFER - last_played_frame; + + // Otherwise put the spent buffer in backstock and get the next buffer + backstock.Enqueue(std::move(play_buffer)); + play_buffer = playable.Dequeue(); + total_buffers_played++; + last_played_frame = 0; // reset the frame counter to the beginning + + return FRAMES_PER_BUFFER; +} + +// Keep the playable queue populated with freshly rendered buffers +void MidiHandler_mt32::Render() +{ + // Allocate our buffers once and reuse for the duration. + constexpr auto SAMPLES_PER_BUFFER = FRAMES_PER_BUFFER * 2; // L & R + std::vector render_buffer(SAMPLES_PER_BUFFER); + std::vector playable_buffer(SAMPLES_PER_BUFFER); + + // Populate the backstock using copies of the current buffer. + while (backstock.Size() < backstock.MaxCapacity() - 1) + backstock.Enqueue(playable_buffer); + backstock.Enqueue(std::move(playable_buffer)); + assert(backstock.Size() == backstock.MaxCapacity()); + + while (keep_rendering.load()) { + { + const std::lock_guard lock(service_mutex); + service->renderFloat(render_buffer.data(), FRAMES_PER_BUFFER); + } + // Grab the next buffer from backstock and populate it ... + playable_buffer = backstock.Dequeue(); + soft_limiter.Process(render_buffer, FRAMES_PER_BUFFER, playable_buffer); + + // and then move it into the playable queue + playable.Enqueue(std::move(playable_buffer)); + } +} + +static void mt32_init(MAYBE_UNUSED Section *sec) +{} + +void MT32_AddConfigSection(Config *conf) +{ + assert(conf); + Section_prop *sec_prop = conf->AddSection_prop("mt32", &mt32_init); + assert(sec_prop); + init_mt32_dosbox_settings(*sec_prop); +} + +#endif // C_MT32EMU diff -Nru dosbox-staging-0.76.0/src/midi/midi_mt32.h dosbox-staging-0.77.0/src/midi/midi_mt32.h --- dosbox-staging-0.76.0/src/midi/midi_mt32.h 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_mt32.h 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,96 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2012-2021 sergm + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef DOSBOX_MIDI_MT32_H +#define DOSBOX_MIDI_MT32_H + +#include "midi_handler.h" + +#if C_MT32EMU + +#include +#include +#include +#include +#include + +#define MT32EMU_API_TYPE 3 +#include + +#include "mixer.h" +#include "rwqueue.h" +#include "soft_limiter.h" + +static_assert(MT32EMU_VERSION_MAJOR > 2 || + (MT32EMU_VERSION_MAJOR == 2 && MT32EMU_VERSION_MINOR >= 5), + "libmt32emu >= 2.5.0 required (using " MT32EMU_VERSION ")"); + +class MidiHandler_mt32 final : public MidiHandler { +private: + using channel_t = std::unique_ptr; + +public: + using service_t = std::unique_ptr; + + MidiHandler_mt32(); + ~MidiHandler_mt32() override; + void Close() override; + const char *GetName() const override { return "mt32"; } + MIDI_RC ListAll(Program *caller) override; + bool Open(const char *conf) override; + void PlayMsg(const uint8_t *msg) override; + void PlaySysex(uint8_t *sysex, size_t len) override; + void PrintStats(); + +private: + uint32_t GetMidiEventTimestamp() const; + service_t GetService(); + void MixerCallBack(uint16_t len); + void SetMixerLevel(const AudioFrame &desired) noexcept; + uint16_t GetRemainingFrames(); + void Render(); + + // Managed objects + channel_t channel{nullptr, MIXER_DelChannel}; + + std::vector play_buffer = {}; + static constexpr auto num_buffers = 4; + RWQueue> playable{num_buffers}; + RWQueue> backstock{num_buffers}; + + std::mutex service_mutex = {}; + service_t service = {}; + std::thread renderer = {}; + SoftLimiter soft_limiter; + + // The following two members let us determine the total number of played + // frames, which is used by GetMidiEventTimestamp() to calculate a total + // time offset. + uint32_t total_buffers_played = 0; + uint16_t last_played_frame = 0; // relative frame-offset in the play buffer + + std::atomic_bool keep_rendering = {}; + bool is_open = false; +}; + +#endif // C_MT32EMU + +#endif diff -Nru dosbox-staging-0.76.0/src/midi/midi_oss.cpp dosbox-staging-0.77.0/src/midi/midi_oss.cpp --- dosbox-staging-0.76.0/src/midi/midi_oss.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_oss.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "midi_oss.h" + +#include +#include +#include + +#include +#include + +#include "midi.h" +#include "string_utils.h" +#include "support.h" + +#define SEQ_MIDIPUTC 5 + +MidiHandler_oss::~MidiHandler_oss() +{ + if (is_open) + close(device); +} + +bool MidiHandler_oss::Open(const char *conf) +{ + Close(); + char devname[512]; + safe_strcpy(devname, (is_empty(conf) ? "/dev/sequencer" : conf)); + char *devfind = strrchr(devname, ','); + if (devfind) { + *devfind++ = '\0'; + device_num = atoi(devfind); + } else { + device_num = 0; + } + device = open(devname, O_WRONLY, 0); + is_open = (device >= 0); + return is_open; +} + +void MidiHandler_oss::Close() +{ + if (!is_open) + return; + + HaltSequence(); + + close(device); + is_open = false; +} + +void MidiHandler_oss::PlayMsg(const uint8_t *msg) +{ + const uint8_t len = MIDI_evt_len[*msg]; + uint8_t buf[128]; + assert(len * 4 <= sizeof(buf)); + size_t pos = 0; + for (uint8_t i = 0; i < len; i++) { + buf[pos++] = SEQ_MIDIPUTC; + buf[pos++] = *msg; + buf[pos++] = device_num; + buf[pos++] = 0; + msg++; + } + write(device, buf, pos); +} + +void MidiHandler_oss::PlaySysex(uint8_t *sysex, size_t len) +{ + uint8_t buf[MIDI_SYSEX_SIZE * 4]; + assert(len <= MIDI_SYSEX_SIZE); + size_t pos = 0; + for (size_t i = 0; i < len; i++) { + buf[pos++] = SEQ_MIDIPUTC; + buf[pos++] = *sysex++; + buf[pos++] = device_num; + buf[pos++] = 0; + } + write(device, buf, pos); +} diff -Nru dosbox-staging-0.76.0/src/midi/midi_oss.h dosbox-staging-0.77.0/src/midi/midi_oss.h --- dosbox-staging-0.76.0/src/midi/midi_oss.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_oss.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,6 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * + * Copyright (C) 2020-2021 The DOSBox Staging Team * Copyright (C) 2002-2020 The DOSBox Team * * This program is free software; you can redistribute it and/or modify @@ -23,79 +24,29 @@ #include "midi_handler.h" -#include - -#define SEQ_MIDIPUTC 5 - -class MidiHandler_oss : public MidiHandler { +class MidiHandler_oss final : public MidiHandler { private: - int device; - uint8_t device_num; - bool isOpen; + int device = 0; + uint8_t device_num = 0; + bool is_open = false; public: - MidiHandler_oss() - : MidiHandler(), - device(0), - device_num(0), - isOpen(false) - {} + MidiHandler_oss() : MidiHandler() {} MidiHandler_oss(const MidiHandler_oss &) = delete; // prevent copying MidiHandler_oss &operator=(const MidiHandler_oss &) = delete; // prevent assignment + ~MidiHandler_oss() override; + const char *GetName() const override { return "oss"; } - bool Open(const char *conf) override - { - char devname[512]; - if (conf && conf[0]) - safe_strcpy(devname, conf); - else strcpy(devname,"/dev/sequencer"); - char * devfind=(strrchr(devname,',')); - if (devfind) { - *devfind++=0; - device_num=atoi(devfind); - } else device_num=0; - if (isOpen) return false; - device=open(devname, O_WRONLY, 0); - if (device<0) return false; - return true; - } - - void Close() override - { - if (!isOpen) return; - if (device>0) close(device); - } - - void PlayMsg(const uint8_t *msg) override - { - Bit8u buf[128];Bitu pos=0; - Bitu len=MIDI_evt_len[*msg]; - for (;len>0;len--) { - buf[pos++] = SEQ_MIDIPUTC; - buf[pos++] = *msg; - buf[pos++] = device_num; - buf[pos++] = 0; - msg++; - } - write(device,buf,pos); - } - - void PlaySysex(uint8_t *sysex, size_t len) override - { - Bit8u buf[SYSEX_SIZE*4];Bitu pos=0; - for (;len>0;len--) { - buf[pos++] = SEQ_MIDIPUTC; - buf[pos++] = *sysex++; - buf[pos++] = device_num; - buf[pos++] = 0; - } - write(device, buf, pos); - } -}; + bool Open(const char *conf) override; -MidiHandler_oss Midi_oss; + void Close() override; + + void PlayMsg(const uint8_t *msg) override; + + void PlaySysex(uint8_t *sysex, size_t len) override; +}; #endif diff -Nru dosbox-staging-0.76.0/src/midi/midi_win32.h dosbox-staging-0.77.0/src/midi/midi_win32.h --- dosbox-staging-0.76.0/src/midi/midi_win32.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/midi/midi_win32.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,8 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +34,7 @@ #include "programs.h" -class MidiHandler_win32: public MidiHandler { +class MidiHandler_win32 final : public MidiHandler { private: HMIDIOUT m_out; MIDIHDR m_hdr; @@ -86,7 +87,10 @@ void Close() override { if (!isOpen) return; - isOpen=false; + + HaltSequence(); + + isOpen = false; midiOutClose(m_out); CloseHandle (m_event); } @@ -119,14 +123,15 @@ } } - void ListAll(Program *base) override + MIDI_RC ListAll(Program *caller) override { unsigned int total = midiOutGetNumDevs(); for(unsigned int i = 0;i < total;i++) { MIDIOUTCAPS mididev; midiOutGetDevCaps(i, &mididev, sizeof(MIDIOUTCAPS)); - base->WriteOut("%2d\t \"%s\"\n",i,mididev.szPname); + caller->WriteOut(" %2d - \"%s\"\n", i, mididev.szPname); } + return MIDI_RC::OK; } }; diff -Nru dosbox-staging-0.76.0/src/misc/cross.cpp dosbox-staging-0.77.0/src/misc/cross.cpp --- dosbox-staging-0.76.0/src/misc/cross.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/cross.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,11 +41,12 @@ #endif #include "fs_utils.h" +#include "string_utils.h" #include "support.h" static std::string GetConfigName() { - return "dosbox-" CONF_BRAND ".conf"; + return "dosbox" CONF_SUFFIX ".conf"; } #ifndef WIN32 @@ -136,7 +137,7 @@ if (len + strlen(appdata) < MAX_PATH) safe_strcat(result, appdata); if (create) - _mkdir(result); + mkdir(result); } in = result; } @@ -305,17 +306,22 @@ // safe_strncpy(entry_name,dentry->d_name,(FILENAME_MAXd_name,CROSS_LEN); -#ifdef DIRENT_HAS_D_TYPE - if(dentry->d_type == DT_DIR) { + // TODO check if this check can be replaced with glibc-defined + // _DIRENT_HAVE_D_TYPE. Non-GNU systems (BSD) provide d_type field as + // well, but do they provide define? + // Alternatively, maybe we can replace whole directory listing with + // C++17 std::filesystem::directory_iterator. +#ifdef HAVE_STRUCT_DIRENT_D_TYPE + if (dentry->d_type == DT_DIR) { is_directory = true; return true; - } else if(dentry->d_type == DT_REG) { + } else if (dentry->d_type == DT_REG) { is_directory = false; return true; } #endif - //Maybe only for DT_UNKNOWN if DIRENT_HAD_D_TYPE.. + // Maybe only for DT_UNKNOWN if HAVE_STRUCT_DIRENT_D_TYPE static char buffer[2 * CROSS_LEN + 1] = { 0 }; static char split[2] = { CROSS_FILESPLIT , 0 }; buffer[0] = 0; @@ -392,3 +398,15 @@ return fopen(path,mode); } + +namespace cross { + +#if defined(WIN32) +struct tm *localtime_r(const time_t *timep, struct tm *result) +{ + const errno_t err = localtime_s(result, timep); + return (err == 0 ? result : nullptr); +} +#endif + +} // namespace cross diff -Nru dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp dosbox-staging-0.77.0/src/misc/fs_utils_posix.cpp --- dosbox-staging-0.76.0/src/misc/fs_utils_posix.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/fs_utils_posix.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2019-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,10 +18,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if !defined(WIN32) - #include "fs_utils.h" +#if !defined(WIN32) + #include #include #include diff -Nru dosbox-staging-0.76.0/src/misc/fs_utils_win32.cpp dosbox-staging-0.77.0/src/misc/fs_utils_win32.cpp --- dosbox-staging-0.76.0/src/misc/fs_utils_win32.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/fs_utils_win32.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-or-later * - * Copyright (C) 2019-2020 The dosbox-staging team + * Copyright (C) 2020-2021 The DOSBox Staging Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,12 +18,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if defined(WIN32) - #include "fs_utils.h" +#if defined(WIN32) + #include #include +#include #include "compiler.h" @@ -41,11 +42,11 @@ int create_dir(const char *path, MAYBE_UNUSED uint32_t mode, uint32_t flags) noexcept { - const int err = _mkdir(path); + const int err = mkdir(path); if ((errno == EEXIST) && (flags & OK_IF_EXISTS)) { struct _stat pstat; if ((_stat(path, &pstat) == 0) && - ((pstat.st_mode & S_IFMT) == S_IFDIR)) + ((pstat.st_mode & _S_IFMT) == _S_IFDIR)) return 0; } return err; diff -Nru dosbox-staging-0.76.0/src/misc/.gitignore dosbox-staging-0.77.0/src/misc/.gitignore --- dosbox-staging-0.76.0/src/misc/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/misc/Makefile.am dosbox-staging-0.77.0/src/misc/Makefile.am --- dosbox-staging-0.76.0/src/misc/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libmisc.a - -libmisc_a_SOURCES = \ - cross.cpp \ - fs_utils_posix.cpp \ - fs_utils_win32.cpp \ - messages.cpp \ - programs.cpp \ - setup.cpp \ - support.cpp diff -Nru dosbox-staging-0.76.0/src/misc/meson.build dosbox-staging-0.77.0/src/misc/meson.build --- dosbox-staging-0.76.0/src/misc/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,19 @@ +libmisc_sources = [ + 'cross.cpp', + 'fs_utils_posix.cpp', + 'fs_utils_win32.cpp', + 'messages.cpp', + 'programs.cpp', + 'rwqueue.cpp', + 'setup.cpp', + 'soft_limiter.cpp', + 'support.cpp', +] + +libmisc = static_library('misc', libmisc_sources, + include_directories : incdir, + dependencies : sdl2_dep) + +libmisc_dep = declare_dependency(link_with : libmisc) + +internal_deps += libmisc_dep diff -Nru dosbox-staging-0.76.0/src/misc/messages.cpp dosbox-staging-0.77.0/src/misc/messages.cpp --- dosbox-staging-0.76.0/src/misc/messages.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/messages.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ #include #include "dosbox.h" #include "cross.h" -#include "support.h" +#include "string_utils.h" #include "setup.h" #include "control.h" #include diff -Nru dosbox-staging-0.76.0/src/misc/programs.cpp dosbox-staging-0.77.0/src/misc/programs.cpp --- dosbox-staging-0.76.0/src/misc/programs.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/programs.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "programs.h" #include #include @@ -24,13 +25,15 @@ #include #include #include -#include "programs.h" + #include "callback.h" #include "regs.h" #include "support.h" #include "cross.h" #include "control.h" #include "shell.h" +#include "hardware.h" +#include "mapper.h" Bitu call_program; @@ -139,7 +142,7 @@ static bool encountered_executable = false; if (encountered_executable) return false; - if (control->GetStartupVerbosity() > Verbosity::Quiet) + if (control->GetStartupVerbosity() <= Verbosity::SplashOnly) return false; if (!control->cmdline->HasExecutableName()) return false; @@ -311,7 +314,7 @@ bool MSG_Write(const char *); void restart_program(std::vector & parameters); -class CONFIG : public Program { +class CONFIG final : public Program { public: void Run(void); private: @@ -343,7 +346,10 @@ void CONFIG::Run(void) { static const char* const params[] = { "-r", "-wcp", "-wcd", "-wc", "-writeconf", "-l", "-rmconf", - "-h", "-help", "-?", "-axclear", "-axadd", "-axtype", "-get", "-set", + "-h", "-help", "-?", "-axclear", "-axadd", "-axtype", + "-avistart","-avistop", + "-startmapper", + "-get", "-set", "-writelang", "-wl", "-securemode", "" }; enum prs { P_NOMATCH, P_NOPARAMS, // fixed return values for GetParameterFromList @@ -352,6 +358,8 @@ P_LISTCONF, P_KILLCONF, P_HELP, P_HELP2, P_HELP3, P_AUTOEXEC_CLEAR, P_AUTOEXEC_ADD, P_AUTOEXEC_TYPE, + P_REC_AVI_START, P_REC_AVI_STOP, + P_START_MAPPER, P_GETPROP, P_SETPROP, P_WRITELANG, P_WRITELANG2, P_SECURE @@ -383,7 +391,8 @@ Bitu size = control->configfiles.size(); std::string config_path; Cross::GetPlatformConfigDir(config_path); - WriteOut(MSG_Get("PROGRAM_CONFIG_CONFDIR"), VERSION,config_path.c_str()); + WriteOut(MSG_Get("PROGRAM_CONFIG_CONFDIR"), VERSION, + config_path.c_str()); if (size==0) WriteOut(MSG_Get("PROGRAM_CONFIG_NOCONFIGFILE")); else { WriteOut(MSG_Get("PROGRAM_CONFIG_PRIMARY_CONF"),control->configfiles.front().c_str()); @@ -453,10 +462,7 @@ if (!strcasecmp("sections",pvars[0].c_str())) { // list the sections WriteOut(MSG_Get("PROGRAM_CONFIG_HLP_SECTLIST")); - Bitu i = 0; - while (true) { - Section* sec = control->GetSection(i++); - if (!sec) break; + for (const Section *sec : *control) { WriteOut("%s\n",sec->GetName()); } return; @@ -602,6 +608,16 @@ WriteOut("\n%s",sec->data.c_str()); break; } + case P_REC_AVI_START: + CAPTURE_VideoStart(); + break; + case P_REC_AVI_STOP: + CAPTURE_VideoStop(); + break; + case P_START_MAPPER: + if (securemode_check()) return; + MAPPER_Run(false); + break; case P_GETPROP: { // "section property" // "property" @@ -846,28 +862,38 @@ MSG_Add("PROGRAM_CONFIG_NOCONFIGFILE","No config file loaded!\n"); MSG_Add("PROGRAM_CONFIG_PRIMARY_CONF","Primary config file: \n%s\n"); MSG_Add("PROGRAM_CONFIG_ADDITIONAL_CONF","Additional config files:\n"); - MSG_Add("PROGRAM_CONFIG_CONFDIR","DOSBox %s configuration directory: \n%s\n\n"); - + MSG_Add("PROGRAM_CONFIG_CONFDIR", + "DOSBox Staging %s configuration directory: \n%s\n\n"); + // writeconf MSG_Add("PROGRAM_CONFIG_FILE_ERROR","\nCan't open file %s\n"); MSG_Add("PROGRAM_CONFIG_FILE_WHICH", "Writing config file %s\n"); // help - MSG_Add("PROGRAM_CONFIG_USAGE", "Config tool:\n" + MSG_Add("PROGRAM_CONFIG_USAGE", + "Config tool:\n" "-writeconf or -wc without parameter: write to primary loaded config file.\n" "-writeconf or -wc with filename: write file to config directory.\n" "Use -writelang or -wl filename to write the current language strings.\n" - "-r [parameters]\n Restart DOSBox, either using the previous parameters or any that are appended.\n" - "-wcp [filename]\n Write config file to the program directory, dosbox.conf or the specified \n filename.\n" - "-wcd\n Write to the default config file in the config directory.\n" + "-r [parameters]\n" + " Restart DOSBox, either using the previous parameters or any that are appended.\n" + "-wcp [filename]\n" + " Write config file to the program directory, dosbox.conf or the specified\n" + " filename.\n" + "-wcd\n" + " Write to the default config file in the config directory.\n" "-l lists configuration parameters.\n" "-h, -help, -? sections / sectionname / propertyname\n" - " Without parameters, displays this help screen. Add \"sections\" for a list of\n sections." + " Without parameters, displays this help screen. Add \"sections\" for a list of\n" + " sections." " For info about a specific section or property add its name behind.\n" "-axclear clears the autoexec section.\n" "-axadd [line] adds a line to the autoexec section.\n" "-axtype prints the content of the autoexec section.\n" "-securemode switches to secure mode.\n" + "-avistart starts AVI recording.\n" + "-avistop stops AVI recording.\n" + "-startmapper starts the keymapper.\n" "-get \"section property\" returns the value of the property.\n" "-set \"section property=value\" sets the value.\n"); MSG_Add("PROGRAM_CONFIG_HLP_PROPHLP","Purpose of property \"%s\" (contained in section \"%s\"):\n%s\n\nPossible Values: %s\nDefault value: %s\nCurrent value: %s\n"); diff -Nru dosbox-staging-0.76.0/src/misc/rwqueue.cpp dosbox-staging-0.77.0/src/misc/rwqueue.cpp --- dosbox-staging-0.76.0/src/misc/rwqueue.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/rwqueue.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,99 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "rwqueue.h" + +#include + +template +RWQueue::RWQueue(size_t queue_capacity) : capacity(queue_capacity) +{ + assert(capacity > 0); +} + +template +size_t RWQueue::Size() +{ + std::lock_guard lock(mutex); + return queue.size(); +} + +template +size_t RWQueue::MaxCapacity() const +{ + return capacity; +} + +template +bool RWQueue::IsEmpty() +{ + std::lock_guard lock(mutex); + return !queue.size(); +} + +template +void RWQueue::Enqueue(const T &item) +{ + // wait until the queue has room to accept the item + std::unique_lock lock(mutex); + while (queue.size() >= capacity) + has_room.wait(lock); + + // add it, and notify the next waiting thread that we've got an item + queue.emplace(queue.end(), item); + lock.unlock(); + has_items.notify_one(); +} + +template +void RWQueue::Enqueue(T &&item) +{ + // wait until the queue has room to accept the item + std::unique_lock lock(mutex); + while (queue.size() >= capacity) + has_room.wait(lock); + + // add it, and notify the next waiting thread that we've got an item + queue.emplace(queue.end(), std::move(item)); + lock.unlock(); + has_items.notify_one(); +} + +template +T RWQueue::Dequeue() +{ + // wait until the queue has an item that we can get + std::unique_lock lock(mutex); + while (!queue.size()) + has_items.wait(lock); + + // get it, and notify the first waiting thread that the queue has room + T item = std::move(queue.front()); + queue.pop_front(); + lock.unlock(); + has_room.notify_one(); + return item; +} + +// Explicit template instantiations +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +#include +template class RWQueue; // Unit tests +template class RWQueue>; // MT-32 and FluidSynth diff -Nru dosbox-staging-0.76.0/src/misc/setup.cpp dosbox-staging-0.77.0/src/misc/setup.cpp --- dosbox-staging-0.76.0/src/misc/setup.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/setup.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,19 +19,23 @@ #include "setup.h" #include +#include +#include +#include +#include +#include +#include -#include "dosbox.h" -#include "cross.h" #include "control.h" +#include "string_utils.h" #include "support.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include "cross.h" + +#ifdef _MSC_VER +_CRTIMP extern char **_environ; +#else +extern char **environ; +#endif using namespace std; static std::string current_config_dir; // Set by parseconfigfile so Prop_path can use it to construct the realpath @@ -222,6 +226,17 @@ return oss.str(); } +Property::Property(const std::string &name, Changeable::Value when) + : propname(name), + value(), + suggested_values{}, + default_value(), + change(when) +{ + assertm(std::regex_match(name, std::regex{"[a-zA-Z0-9_]+"}), + "Only letters, digits, and underscores are allowed in property name"); +} + bool Property::CheckValue(Value const& in, bool warn){ if (suggested_values.empty()) return true; for(const_iter it = suggested_values.begin();it != suggested_values.end();++it) { @@ -749,7 +764,7 @@ fprintf(outfile, MSG_Get("CONFIGFILE_INTRO"), VERSION); fprintf(outfile, "\n"); - for (const_it tel = sectionlist.begin(); tel != sectionlist.end(); ++tel){ + for (auto tel = sectionlist.cbegin(); tel != sectionlist.cend(); ++tel) { /* Print out the Section header */ safe_strcpy(temp, (*tel)->GetName()); lowcase(temp); @@ -822,11 +837,26 @@ return true; } -Section_prop* Config::AddSection_prop(char const * const _name,void (*_initfunction)(Section*),bool canchange) { - Section_prop* blah = new Section_prop(_name); - blah->AddInitFunction(_initfunction,canchange); - sectionlist.push_back(blah); - return blah; +Section_prop *Config::AddEarlySectionProp(const char *name, + SectionFunction func, + bool changeable_at_runtime) +{ + Section_prop *s = new Section_prop(name); + s->AddEarlyInitFunction(func, changeable_at_runtime); + sectionlist.push_back(s); + return s; +} + +Section_prop *Config::AddSection_prop(const char *section_name, + SectionFunction func, + bool changeable_at_runtime) +{ + assertm(std::regex_match(section_name, std::regex{"[a-zA-Z0-9]+"}), + "Only letters and digits are allowed in section name"); + Section_prop *s = new Section_prop(section_name); + s->AddInitFunction(func, changeable_at_runtime); + sectionlist.push_back(s); + return s; } Section_prop::~Section_prop() @@ -838,74 +868,87 @@ delete (*prop); } -Section_line* Config::AddSection_line(char const * const _name,void (*_initfunction)(Section*)) { - Section_line* blah = new Section_line(_name); - blah->AddInitFunction(_initfunction); +Section_line *Config::AddSection_line(const char *section_name, SectionFunction func) +{ + assertm(std::regex_match(section_name, std::regex{"[a-zA-Z0-9]+"}), + "Only letters and digits are allowed in section name"); + Section_line *blah = new Section_line(section_name); + blah->AddInitFunction(func); sectionlist.push_back(blah); return blah; } +void Config::Init() const +{ + for (const auto &sec : sectionlist) + sec->ExecuteEarlyInit(); -void Config::Init() { - for (const_it tel=sectionlist.begin(); tel!=sectionlist.end(); ++tel) { - (*tel)->ExecuteInit(); - } + for (const auto &sec : sectionlist) + sec->ExecuteInit(); } -void Section::AddInitFunction(SectionFunction func, bool canchange) +void Section::AddEarlyInitFunction(SectionFunction func, bool changeable_at_runtime) { - initfunctions.emplace_back(func, canchange); + early_init_functions.emplace_back(func, changeable_at_runtime); } -void Section::AddDestroyFunction(SectionFunction func, bool canchange) +void Section::AddInitFunction(SectionFunction func, bool changeable_at_runtime) { - destroyfunctions.emplace_front(func, canchange); + initfunctions.emplace_back(func, changeable_at_runtime); } -void Section::ExecuteInit(bool initall) { - typedef std::list::iterator func_it; - for (func_it tel = initfunctions.begin(); tel != initfunctions.end(); ++tel) { - if (initall || (*tel).canchange) (*tel).function(this); - } +void Section::AddDestroyFunction(SectionFunction func, bool changeable_at_runtime) +{ + destroyfunctions.emplace_front(func, changeable_at_runtime); +} + +void Section::ExecuteEarlyInit(bool init_all) +{ + for (const auto &fn : early_init_functions) + if (init_all || fn.changeable_at_runtime) + fn.function(this); +} + +void Section::ExecuteInit(bool initall) +{ + for (const auto &fn : initfunctions) + if (initall || fn.changeable_at_runtime) + fn.function(this); } void Section::ExecuteDestroy(bool destroyall) { - typedef std::list::iterator func_it; + typedef std::deque::iterator func_it; for (func_it tel = destroyfunctions.begin(); tel != destroyfunctions.end(); ) { - if (destroyall || (*tel).canchange) { + if (destroyall || (*tel).changeable_at_runtime) { (*tel).function(this); tel = destroyfunctions.erase(tel); //Remove destroyfunction once used - } else ++tel; + } else + ++tel; } } -Config::~Config() { - reverse_it cnt = sectionlist.rbegin(); - while (cnt != sectionlist.rend()) { +Config::~Config() +{ + for (auto cnt = sectionlist.rbegin(); cnt != sectionlist.rend(); ++cnt) delete (*cnt); - cnt++; - } -} - -Section* Config::GetSection(int index) { - for (it tel = sectionlist.begin(); tel != sectionlist.end(); ++tel){ - if (!index--) return (*tel); - } - return NULL; } -Section* Config::GetSection(string const& _sectionname) const { - for (const_it tel = sectionlist.begin(); tel != sectionlist.end(); ++tel){ - if (!strcasecmp((*tel)->GetName(),_sectionname.c_str())) return (*tel); +Section *Config::GetSection(const std::string §ion_name) const +{ + for (auto *el : sectionlist) { + if (!strcasecmp(el->GetName(), section_name.c_str())) + return el; } - return NULL; + return nullptr; } -Section* Config::GetSectionFromProperty(char const * const prop) const { - for (const_it tel = sectionlist.begin(); tel != sectionlist.end(); ++tel){ - if ((*tel)->GetPropValue(prop) != NO_SUCH_PROPERTY) return (*tel); +Section *Config::GetSectionFromProperty(const char *prop) const +{ + for (auto *el : sectionlist) { + if (el->GetPropValue(prop) != NO_SUCH_PROPERTY) + return el; } - return NULL; + return nullptr; } bool Config::ParseConfigFile(char const * const configfilename) { @@ -965,27 +1008,52 @@ return true; } -/*const char* Config::GetPrimaryConfigFile() { - return configfile.c_str(); -}*/ +parse_environ_result_t parse_environ(const char * const * envp) noexcept +{ + assert(envp); -void Config::ParseEnv(char ** envp) { - for(char** env=envp; *env;env++) { - char copy[1024]; - safe_strcpy(copy, *env); - if(strncasecmp(copy,"DOSBOX_",7)) + // Filter envirnment variables in following format: + // DOSBOX_SECTIONNAME_PROPNAME=VALUE (prefix, section, and property + // names are case-insensitive). + std::list> props_to_set; + for (const char * const *str = envp; *str; str++) { + const char *env_var = *str; + if (strncasecmp(env_var, "DOSBOX_", 7) != 0) continue; - char* sec_name = ©[7]; - if(!(*sec_name)) + const std::string rest = (env_var + 7); + const auto section_delimiter = rest.find('_'); + if (section_delimiter == string::npos) continue; - char* prop_name = strrchr(sec_name,'_'); - if(!prop_name || !(*prop_name)) + const auto section_name = rest.substr(0, section_delimiter); + if (section_name.empty()) continue; - *prop_name++=0; - Section* sect = GetSection(sec_name); - if(!sect) + const auto prop_name_and_value = rest.substr(section_delimiter + 1); + if (prop_name_and_value.empty() || !isalpha(prop_name_and_value[0])) + continue; + props_to_set.emplace_back(std::make_tuple(section_name, + prop_name_and_value)); + } + + return props_to_set; +} + +void Config::ParseEnv() +{ +#ifdef _MSC_VER + const char *const *envp = _environ; +#else + const char *const *envp = environ; +#endif + if (envp == nullptr) + return; + + for (const auto &set_prop_desc : parse_environ(envp)) { + const auto section_name = std::get<0>(set_prop_desc); + Section *sec = GetSection(section_name); + if (!sec) continue; - sect->HandleInputline(prop_name); + const auto prop_name_and_value = std::get<1>(set_prop_desc); + sec->HandleInputline(prop_name_and_value); } } @@ -1010,6 +1078,8 @@ return Verbosity::Medium; if (user_choice == "low") return Verbosity::Low; + if (user_choice == "splash_only") + return Verbosity::SplashOnly; if (user_choice == "quiet") return Verbosity::Quiet; // auto-mode diff -Nru dosbox-staging-0.76.0/src/misc/soft_limiter.cpp dosbox-staging-0.77.0/src/misc/soft_limiter.cpp --- dosbox-staging-0.76.0/src/misc/soft_limiter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/soft_limiter.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,311 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2020-2021 Kevin R. Croft + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "soft_limiter.h" + +#include +#include +#include + +#include "support.h" + +constexpr static auto relaxed = std::memory_order_relaxed; + +constexpr static float bounds = static_cast(INT16_MAX - 1); + +SoftLimiter::SoftLimiter(const std::string &name) + : channel_name(name) +{ + UpdateLevels({1, 1}, 1); // default to unity (ie: no) scaling + limited_tally = 0; + non_limited_tally = 0; +} + +void SoftLimiter::UpdateLevels(const AudioFrame &desired_levels, + const float desired_multiplier) +{ + range_multiplier = desired_multiplier; + prescale = {desired_levels.left * desired_multiplier, + desired_levels.right * desired_multiplier}; +} + +// Limit the input array and returned as integer array +void SoftLimiter::Process(const std::vector &in, + const uint16_t frames, + std::vector &out) noexcept +{ + // Make sure chunk sizes aren't too big or latent + assertm(frames > 0, "need some quantity of frames"); + assertm(frames <= 16384, "consider using smaller sequence chunks"); + + // Make sure the incoming vector has at least the requested frames + const uint16_t samples = frames * 2; // left and right channels + assert(in.size() >= samples); + assert(out.size() >= samples); + + auto precross_peak_pos_left = in.end(); + auto precross_peak_pos_right = in.end(); + auto zero_cross_left = in.end(); + auto zero_cross_right = in.end(); + + FindPeaksAndZeroCrosses(in, precross_peak_pos_left, precross_peak_pos_right, + zero_cross_left, zero_cross_right, samples); + + // Given the local peaks found in each side channel, scale or copy the + // input array into the output array + constexpr int8_t left = 0; + ScaleOrCopy(in, samples, prescale.load(relaxed).left, + precross_peak_pos_left, zero_cross_left, + global_peaks.left, tail_frame.left, out); + + constexpr int8_t right = 1; + ScaleOrCopy(in, samples, prescale.load(relaxed).right, + precross_peak_pos_right, zero_cross_right, + global_peaks.right, tail_frame.right, out); + + SaveTailFrame(frames, out); + Release(); +} + +// Helper function to evaluate the existing peaks and prior values. +// Saves new local and global peaks, and the input-array iterator of any new +// peaks before the first zero-crossing, along with the first zero-crossing +// position. +void FindPeakAndCross(const SoftLimiter::in_iterator_t in_end, + const SoftLimiter::in_iterator_t pos, + SoftLimiter::in_iterator_t &prev_pos, + const float prescalar, + float &local_peak, + SoftLimiter::in_iterator_t &precross_peak_pos, + SoftLimiter::in_iterator_t &zero_cross_pos, + float &global_peak) noexcept +{ + const auto val = fabsf(*pos) * prescalar; + if (val > bounds && val > local_peak) { + local_peak = val; + if (zero_cross_pos == in_end) { + precross_peak_pos = pos; + } + } + if (val > global_peak) { + global_peak = val; + } + // Detect and save the first zero-crossing position (if any) + if (zero_cross_pos == in_end && prev_pos != in_end && + std::signbit(*prev_pos) != std::signbit(*pos)) { + zero_cross_pos = pos; + } + prev_pos = pos; +} + +// Sequentially scans the input channels to find new peaks, their positions, and +// the first zero crossings (saved in member variables). +void SoftLimiter::FindPeaksAndZeroCrosses(const std::vector &in, + in_iterator_t &precross_peak_pos_left, + in_iterator_t &precross_peak_pos_right, + in_iterator_t &zero_cross_left, + in_iterator_t &zero_cross_right, + const uint16_t samples) noexcept +{ + auto pos = in.begin(); + const auto pos_end = in.begin() + samples; + + auto prev_pos_left = in.end(); + auto prev_pos_right = in.end(); + AudioFrame local_peaks = global_peaks; + + while (pos != pos_end) { + FindPeakAndCross(in.end(), pos++, prev_pos_left, + prescale.load(relaxed).left, local_peaks.left, + precross_peak_pos_left, zero_cross_left, + global_peaks.left); + + FindPeakAndCross(in.end(), pos++, prev_pos_right, + prescale.load(relaxed).right, + local_peaks.right, precross_peak_pos_right, + zero_cross_right, global_peaks.right); + } +} + +// Scale or copy the given channel's samples into the output array +template +void SoftLimiter::ScaleOrCopy(const std::vector &in, + const uint16_t samples, + const float prescalar, + const in_iterator_t precross_peak_pos, + const in_iterator_t zero_cross_pos, + const float global_peak, + const float tail, + std::vector &out) +{ + assert(samples >= 2); // need at least one frame + auto in_start = in.begin() + channel; + const auto in_end = in.begin() + channel + samples; + auto out_start = out.begin() + channel; + + // We have a new peak, so ... + if (precross_peak_pos != in.end()) { + const auto tail_abs = fabsf(tail); + const auto prepeak_scalar = (bounds - tail_abs) / + (prescalar * fabsf(*precross_peak_pos) - + tail_abs); + // fit the frontside of the waveform to the tail up to the peak. + PolyFit(in_start, precross_peak_pos, out_start, prescalar, + prepeak_scalar, tail); + + // Then scale the backend of the waveform from its peak ... + out_start = out.begin() + (precross_peak_pos - in.begin()); + const auto postpeak_scalar = bounds / fabsf(*precross_peak_pos); + // down to the zero-crossing ... + if (zero_cross_pos != in.end()) { + LinearScale(precross_peak_pos, zero_cross_pos, + out_start, postpeak_scalar); + + // and from the zero-crossing to the end of the sequence. + out_start = out.begin() + (zero_cross_pos - in.begin()); + const auto postcross_scalar = prescalar * bounds / global_peak; + LinearScale(zero_cross_pos, in_end, out_start, + postcross_scalar); + } + // down to the end of the sequence. + else { + LinearScale(precross_peak_pos, in_end, out_start, + postpeak_scalar); + } + limited_tally++; + + // We have an existing peak ... + } else if (global_peak > bounds) { + // so scale the entire sequence a a ratio of the peak. + const auto current_scalar = prescalar * bounds / global_peak; + LinearScale(in_start, in_end, out_start, current_scalar); + limited_tally++; + + // The current sequence is fully inbounds ... + } else { + // so simply prescale the entire sequence. + LinearScale(in_start, in_end, out_start, prescalar); + ++non_limited_tally; + } +} + +// Apply the polynomial coefficients to the sequence +void SoftLimiter::PolyFit(in_iterator_t in_pos, + const in_iterator_t in_end, + out_iterator_t out_pos, + const float prescalar, + const float poly_a, + const float poly_b) const noexcept +{ + while (in_pos != in_end) { + const auto fitted = poly_a * (*in_pos * prescalar - poly_b) + poly_b; + assert(fabsf(fitted) < INT16_MAX); + *out_pos = static_cast(fitted); + out_pos += 2; + in_pos += 2; + } +} + +// Apply the scalar to the sequence +void SoftLimiter::LinearScale(in_iterator_t in_pos, + const in_iterator_t in_end, + out_iterator_t out_pos, + const float scalar) const noexcept +{ + while (in_pos != in_end) { + const auto scaled = (*in_pos) * scalar; + assert(fabsf(scaled) < INT16_MAX); + *out_pos = static_cast(scaled); + out_pos += 2; + in_pos += 2; + } +} + +void SoftLimiter::SaveTailFrame(const uint16_t frames, + const std::vector &out) noexcept +{ + const size_t i = (frames - 1) * 2; + tail_frame.left = static_cast(out[i]); + tail_frame.right = static_cast(out[i + 1]); +} + +// If either channel was out of bounds, then decrement their peak +void SoftLimiter::Release() noexcept +{ + // Decrement the peak(s) one step + constexpr float delta_db = 0.002709201f; // 0.0235 dB increments + constexpr float release_amplitude = bounds * delta_db; + if (global_peaks.left > bounds) + global_peaks.left -= release_amplitude; + if (global_peaks.right > bounds) + global_peaks.right -= release_amplitude; +} + +// Print helpful statistics about the signal thus-far +void SoftLimiter::PrintStats() const +{ + const auto peak_sample = std::max(global_peaks.left, global_peaks.right); + const auto peak_ratio = std::min(peak_sample / bounds, 1.0f); + + // Only print information if the channel reached 2% of full amplitude + if (peak_ratio < 0.02f) + return; + + // Inform the user what percent of the dynamic-range was reached + LOG_MSG("%s: Peak amplitude reached %.0f%% of max", + channel_name.c_str(), 100 * static_cast(peak_ratio)); + + // Inform when the stream fell short of using the full dynamic-range + const auto scale = std::max(prescale.load().left, prescale.load().right) / + range_multiplier; + constexpr auto well_below_3db = 0.6f; + if (peak_ratio < well_below_3db) { + const auto suggested_mix_val = 100 * scale / peak_ratio; + LOG_MSG("%s: If it should be louder, use: mixer %s %.0f", + channel_name.c_str(), channel_name.c_str(), + static_cast(suggested_mix_val)); + } + + // Inform if more than 20% of the stream required limiting + const auto total_tally = limited_tally + non_limited_tally; + const auto limited_ratio = limited_tally / (total_tally + 1.0); // +1 avoid div-by-0 + if (limited_ratio > 0.2) { + const auto suggested_mix_pct = 100 * (1 - limited_ratio) * + static_cast(scale); + LOG_MSG("%s: %.1f%% of the audio needed limiting, consider: mixer %s %.0f", + channel_name.c_str(), 100 * limited_ratio, + channel_name.c_str(), suggested_mix_pct); + } +} + +// A paused audio source should Reset() the limiter so it starts with +// fresh peaks and a zero-tail if/when the stream is restarted. +void SoftLimiter::Reset() noexcept +{ + // if the current peaks are over the upper bounds, then we simply save + // the upper bound because we want retain information about the peak + // amplitude when printing statistics. + + constexpr auto upper = bounds; // (workaround to prevent link-errors) + global_peaks.left = std::min(global_peaks.left, upper); + global_peaks.right = std::min(global_peaks.right, upper); + tail_frame = {0, 0}; +} diff -Nru dosbox-staging-0.76.0/src/misc/support.cpp dosbox-staging-0.77.0/src/misc/support.cpp --- dosbox-staging-0.76.0/src/misc/support.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/misc/support.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,20 +22,18 @@ #include "support.h" #include -#include +#include #include #include #include +#include +#include +#include #include -#include #include -#include -#include -#include -#include #include +#include -#include "dosbox.h" #include "cross.h" #include "debug.h" #include "video.h" @@ -124,6 +125,65 @@ str.erase(0, empty_pfx); } +std::vector split(const std::string &seq, const char delim) +{ + std::vector words; + if (seq.empty()) + return words; + + // count delimeters to reserve space in our vector of words + const size_t n = 1u + std::count(seq.begin(), seq.end(), delim); + words.reserve(n); + + std::string::size_type head = 0; + while (head != std::string::npos) { + const auto tail = seq.find_first_of(delim, head); + const auto word_len = tail - head; + words.emplace_back(seq.substr(head, word_len)); + if (tail == std::string::npos) { + break; + } + head += word_len + 1; + } + + // did we reserve the exact space needed? + assert(n == words.size()); + + return words; +} + +std::vector split(const std::string &seq) +{ + std::vector words; + if (seq.empty()) + return words; + + constexpr auto whitespace = " \f\n\r\t\v"; + + // count words to reserve space in our vector + size_t n = 0; + auto head = seq.find_first_not_of(whitespace, 0); + while (head != std::string::npos) { + const auto tail = seq.find_first_of(whitespace, head); + head = seq.find_first_not_of(whitespace, tail); + ++n; + } + words.reserve(n); + + // populate the vector with the words + head = seq.find_first_not_of(whitespace, 0); + while (head != std::string::npos) { + const auto tail = seq.find_first_of(whitespace, head); + words.emplace_back(seq.substr(head, tail - head)); + head = seq.find_first_not_of(whitespace, tail); + } + + // did we reserve the exact space needed? + assert(n == words.size()); + + return words; +} + void strip_punctuation(std::string &str) { str.erase( std::remove_if( @@ -133,7 +193,7 @@ str.end()); } -/* +/* Ripped some source from freedos for this one. */ @@ -150,7 +210,7 @@ str++; } } -char *ltrim(char *str) { +char *ltrim(char *str) { while (*str && isspace(*reinterpret_cast(str))) str++; return str; } @@ -203,7 +263,7 @@ while ( *scan && !isspace(*reinterpret_cast(scan)) ) scan++; *scan=0; return found; - } else return 0; + } else return 0; } char * StripWord(char *&line) { @@ -253,21 +313,34 @@ throw(e_exit_buf); } +/* Overloaded function to handle different return types of POSIX and GNU + * strerror_r variants */ +MAYBE_UNUSED static const char *strerror_result(int retval, const char *err_str) +{ + return retval == 0 ? err_str : nullptr; +} +MAYBE_UNUSED static const char *strerror_result(const char *err_str, MAYBE_UNUSED const char *buf) +{ + return err_str; +} + std::string safe_strerror(int err) noexcept { char buf[128]; -#if defined(_MSC_VER) +#if defined(WIN32) // C11 version; unavailable in C++14 in general. strerror_s(buf, ARRAY_LEN(buf), err); return buf; -#elif defined(_GNU_SOURCE) - // GNU has POSIX-incompatible version, which fills the buffer - // only when unknown error is passed, otherwise it returns - // the internal glibc buffer. - return strerror_r(err, buf, ARRAY_LEN(buf)); #else - // POSIX version - strerror_r(err, buf, ARRAY_LEN(buf)); - return buf; + return strerror_result(strerror_r(err, buf, ARRAY_LEN(buf)), buf); +#endif +} + +void set_thread_name(MAYBE_UNUSED std::thread& thread, MAYBE_UNUSED const char *name) +{ +#if defined(HAVE_PTHREAD_SETNAME_NP) && defined(_GNU_SOURCE) + assert(strlen(name) < 16); + pthread_t handle = thread.native_handle(); + pthread_setname_np(handle, name); #endif } diff -Nru dosbox-staging-0.76.0/src/platform/.gitignore dosbox-staging-0.77.0/src/platform/.gitignore --- dosbox-staging-0.76.0/src/platform/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - Binary files /tmp/tmpq27fgckz/LsxsZALKv3/dosbox-staging-0.76.0/src/platform/macosx/dosbox.icns and /tmp/tmpq27fgckz/uCz9bPgd_X/dosbox-staging-0.77.0/src/platform/macosx/dosbox.icns differ diff -Nru dosbox-staging-0.76.0/src/platform/macosx/Makefile.am dosbox-staging-0.77.0/src/platform/macosx/Makefile.am --- dosbox-staging-0.76.0/src/platform/macosx/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/macosx/Makefile.am 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1 @@ +EXTRA_DIST = dosbox.icns diff -Nru dosbox-staging-0.76.0/src/platform/Makefile.am dosbox-staging-0.77.0/src/platform/Makefile.am --- dosbox-staging-0.76.0/src/platform/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -SUBDIRS = visualc diff -Nru dosbox-staging-0.76.0/src/platform/visualc/config.h dosbox-staging-0.77.0/src/platform/visualc/config.h --- dosbox-staging-0.76.0/src/platform/visualc/config.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/visualc/config.h 2021-07-02 15:47:39.000000000 +0000 @@ -1,8 +1,11 @@ /* String appended to the .conf file. */ -#define CONF_BRAND "staging" +#define CONF_SUFFIX "-staging-git" /* Version number of package */ -#define VERSION "0.76.0" +#define VERSION "0.77.0" + +/* This macro is going to be overriden via CI */ +#define DOSBOX_DETAILED_VERSION "git" /* Define to 1 to enable internal debugger, requires libcurses */ #define C_DEBUG 0 @@ -16,6 +19,9 @@ /* Define to 1 to enable internal modem support, requires SDL_net */ #define C_MODEM 1 +/* Define to 1 to enable NE2000 ethernet passthrough, requires libpcap */ +#define C_NE2000 0 + /* Define to 1 to enable IPX networking support, requires SDL_net */ #define C_IPX 1 @@ -39,9 +45,12 @@ /* Enable memory function inlining in */ #define C_CORE_INLINE 1 -/* Define to 1 to enable FluidSynth MIDI synthesiser */ +/* Define to 1 to enable FluidSynth MIDI synthesizer */ #define C_FLUIDSYNTH 1 +// Define to 1 to enable MT-32 emulator +#define C_MT32EMU 1 + /* Enable the FPU module, still only for beta testing */ #define C_FPU 1 @@ -57,20 +66,12 @@ /* Define to 1 to use a unaligned memory access */ #define C_UNALIGNED_MEMORY 1 -/* environ is defined */ -#define ENVIRON_INCLUDED 1 - -/* environ can be linked */ -#define ENVIRON_LINKED 1 - /* Prevent from clobbering std::min and std::max */ #define NOMINMAX 1 /* Define to 1 if you want serial passthrough support. */ #define C_DIRECTSERIAL 1 -#define INLINE __forceinline - // Enables mathematical constants under Visual Studio, such as M_PI // https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants #define _USE_MATH_DEFINES diff -Nru dosbox-staging-0.76.0/src/platform/visualc/.gitignore dosbox-staging-0.77.0/src/platform/visualc/.gitignore --- dosbox-staging-0.76.0/src/platform/visualc/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/visualc/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/platform/visualc/Makefile.am dosbox-staging-0.77.0/src/platform/visualc/Makefile.am --- dosbox-staging-0.76.0/src/platform/visualc/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/visualc/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -EXTRA_DIST = unistd.h config.h diff -Nru dosbox-staging-0.76.0/src/platform/visualc/sdl.h dosbox-staging-0.77.0/src/platform/visualc/sdl.h --- dosbox-staging-0.76.0/src/platform/visualc/sdl.h 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/visualc/sdl.h 2021-07-02 15:47:39.000000000 +0000 @@ -10,5 +10,5 @@ XSTR(SDL_MAJOR_VERSION) "." XSTR(SDL_MINOR_VERSION) "." XSTR(SDL_PATCHLEVEL) #endif -static_assert(SDL_VERSION_ATLEAST(2, 0, 2), - "SDL >= 2.0.2 required (using " SDL_CONSTEXPR_VERSION ")"); +static_assert(SDL_VERSION_ATLEAST(2, 0, 5), + "SDL >= 2.0.5 required (using " SDL_CONSTEXPR_VERSION ")"); diff -Nru dosbox-staging-0.76.0/src/platform/visualc/version.cpp dosbox-staging-0.77.0/src/platform/visualc/version.cpp --- dosbox-staging-0.76.0/src/platform/visualc/version.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/platform/visualc/version.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "dosbox.h" + +const char *DOSBOX_GetDetailedVersion() noexcept +{ + static const char version[] = DOSBOX_DETAILED_VERSION; + // Git tag names start with a letter v (by convention). + if (version[0] == 'v') + return version + 1; + else + return version; +} diff -Nru dosbox-staging-0.76.0/src/shell/.gitignore dosbox-staging-0.77.0/src/shell/.gitignore --- dosbox-staging-0.76.0/src/shell/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/shell/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# svn:ignore -.deps -Makefile -Makefile.in - diff -Nru dosbox-staging-0.76.0/src/shell/Makefile.am dosbox-staging-0.77.0/src/shell/Makefile.am --- dosbox-staging-0.76.0/src/shell/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/shell/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libshell.a -libshell_a_SOURCES = shell.cpp shell_batch.cpp shell_cmds.cpp shell_misc.cpp diff -Nru dosbox-staging-0.76.0/src/shell/meson.build dosbox-staging-0.77.0/src/shell/meson.build --- dosbox-staging-0.76.0/src/shell/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/shell/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,14 @@ +libshell_sources = files([ + 'shell.cpp', + 'shell_batch.cpp', + 'shell_cmds.cpp', + 'shell_misc.cpp', +]) + +libshell = static_library('shell', libshell_sources, + include_directories : incdir, + dependencies : [sdl2_dep]) + +libshell_dep = declare_dependency(link_with : libshell) + +internal_deps += libshell_dep diff -Nru dosbox-staging-0.76.0/src/shell/shell_batch.cpp dosbox-staging-0.77.0/src/shell/shell_batch.cpp --- dosbox-staging-0.76.0/src/shell/shell_batch.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/shell/shell_batch.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,11 +16,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "shell.h" + #include #include #include -#include "shell.h" +#include "logging.h" #include "support.h" // Permitted ASCII control characters in batch files @@ -104,8 +106,8 @@ *cmd_write++ = val; } } else if (val != LINE_FEED && val != CARRIAGE_RETURN) { - shell->WriteOut(MSG_Get("SHELL_ILLEGAL_CONTROL_CHARACTER"), - val, val); + DEBUG_LOG_MSG("Encountered non-standard character: Dec %03u and Hex %#04x", + val, val); } } } while (val != LINE_FEED && bytes_read); @@ -241,8 +243,8 @@ } } else if (val != BACKSPACE && val != CARRIAGE_RETURN && val != ESC && val != LINE_FEED && val != TAB) { - shell->WriteOut(MSG_Get("SHELL_ILLEGAL_CONTROL_CHARACTER"), - val, val); + DEBUG_LOG_MSG("Encountered non-standard character: Dec %03u and Hex %#04x", + val, val); } } } while (val != LINE_FEED && bytes_read); @@ -278,6 +280,7 @@ return false; } -void BatchFile::Shift(void) { +void BatchFile::Shift() +{ cmd->Shift(1); } diff -Nru dosbox-staging-0.76.0/src/shell/shell_cmds.cpp dosbox-staging-0.77.0/src/shell/shell_cmds.cpp --- dosbox-staging-0.76.0/src/shell/shell_cmds.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/shell/shell_cmds.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,8 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,13 +31,15 @@ #include #include -#include "callback.h" -#include "regs.h" #include "bios.h" -#include "drives.h" -#include "support.h" +#include "callback.h" #include "control.h" +#include "cross.h" +#include "drives.h" #include "paging.h" +#include "regs.h" +#include "string_utils.h" +#include "support.h" #include "../ints/int10.h" // clang-format off @@ -184,8 +189,9 @@ void DOS_Shell::CMD_CLS(char *args) { HELP("CLS"); - const auto rows = real_readb(BIOSMEM_SEG, BIOSMEM_NB_ROWS); - const auto cols = real_readw(BIOSMEM_SEG, BIOSMEM_NB_COLS); + const auto rows = INT10_GetTextRows() - 1; + const auto cols = INT10_GetTextColumns(); + INT10_ScrollWindow(0, 0, rows, static_cast(cols), -rows, 0x7, 0xff); INT10_SetCursorPos(0, 0, 0); } @@ -317,7 +323,7 @@ void DOS_Shell::CMD_EXIT(char *args) { HELP("EXIT"); - exit_flag = true; + exit_requested = true; } void DOS_Shell::CMD_CHDIR(char * args) { @@ -401,28 +407,38 @@ } } -static void FormatNumber(Bit32u num,char * buf) { - Bit32u numm,numk,numb,numg; - numb=num % 1000; - num/=1000; - numk=num % 1000; - num/=1000; - numm=num % 1000; - num/=1000; - numg=num; - if (numg) { - sprintf(buf,"%d,%03d,%03d,%03d",numg,numm,numk,numb); - return; - }; - if (numm) { - sprintf(buf,"%d,%03d,%03d",numm,numk,numb); - return; - }; - if (numk) { - sprintf(buf,"%d,%03d",numk,numb); - return; - }; - sprintf(buf,"%d",numb); +static std::string format_number(size_t num) +{ + MAYBE_UNUSED constexpr uint64_t petabyte_si = 1'000'000'000'000'000; + assert(num <= petabyte_si); + const auto b = static_cast(num % 1000); + num /= 1000; + const auto kb = static_cast(num % 1000); + num /= 1000; + const auto mb = static_cast(num % 1000); + num /= 1000; + const auto gb = static_cast(num % 1000); + num /= 1000; + const auto tb = static_cast(num); + char buf[22]; + if (tb) { + safe_sprintf(buf, "%u,%03u,%03u,%03u,%03u", tb, gb, mb, kb, b); + return buf; + } + if (gb) { + safe_sprintf(buf, "%u,%03u,%03u,%03u", gb, mb, kb, b); + return buf; + } + if (mb) { + safe_sprintf(buf, "%u,%03u,%03u", mb, kb, b); + return buf; + } + if (kb) { + safe_sprintf(buf, "%u,%03u", kb, b); + return buf; + } + sprintf(buf, "%u", b); + return buf; } struct DtaResult { @@ -506,7 +522,7 @@ // Actual terminal width (number of text columns) using current text // mode; in practice it's either 40, 80, or 132. - const int term_width = real_readw(BIOSMEM_SEG, BIOSMEM_NB_COLS); + const int term_width = INT10_GetTextColumns(); // Use term_width-1 because we never want to print line up to the actual // limit; this would cause unnecessary line wrapping @@ -544,7 +560,6 @@ void DOS_Shell::CMD_DIR(char * args) { HELP("DIR"); - char numformat[16]; std::string line; if (GetEnvStr("DIRCMD",line)){ @@ -618,8 +633,9 @@ if (!optB) { if (print_label) { - const char *label = Drives[drive_idx]->GetLabel(); - WriteOut(MSG_Get("SHELL_CMD_DIR_VOLUME"), drive_letter, label); + const auto label = To_Label(Drives[drive_idx]->GetLabel()); + WriteOut(MSG_Get("SHELL_CMD_DIR_VOLUME"), drive_letter, + label.c_str()); p_count += 1; } WriteOut(MSG_Get("SHELL_CMD_DIR_INTRO"), path); @@ -633,13 +649,7 @@ // Call it whenever a newline gets printed to potentially display // this one-line message. // - // For some strange reason number of columns stored in BIOS segment - // is exact, while number of rows is 0-based (so 80x25 mode is - // represented as 80x24). It's convenient for us, as it means we can - // get away with (p_count % term_rows) instead of - // (p_count % (term_rows - 1)). - // - const int term_rows = real_readb(BIOSMEM_SEG, BIOSMEM_NB_ROWS); + const int term_rows = INT10_GetTextRows() - 1; auto show_press_any_key = [&]() { p_count += 1; if (optP && (p_count % term_rows) == 0) @@ -767,12 +777,13 @@ } if (is_dir) { - WriteOut("%-8s %-3s %-16s %02d-%02d-%04d %2d:%02d\n", + WriteOut("%-8s %-3s %-21s %02d-%02d-%04d %2d:%02d\n", name, ext, "", day, month, year, hour, minute); } else { - FormatNumber(size, numformat); - WriteOut("%-8s %-3s %16s %02d-%02d-%04d %2d:%02d\n", - name, ext, numformat, day, month, year, hour, minute); + const auto file_size = format_number(size); + WriteOut("%-8s %-3s %21s %02d-%02d-%04d %2d:%02d\n", + name, ext, file_size.c_str(), day, month, year, + hour, minute); } show_press_any_key(); } @@ -786,25 +797,29 @@ // Show the summary of results if (!optB) { - FormatNumber(byte_count, numformat); - WriteOut(MSG_Get("SHELL_CMD_DIR_BYTES_USED"), file_count, numformat); + const auto bytes_used = format_number(byte_count); + WriteOut(MSG_Get("SHELL_CMD_DIR_BYTES_USED"), file_count, + bytes_used.c_str()); show_press_any_key(); - Bit8u drive = dta.GetSearchDrive(); - Bitu free_space = 1024 * 1024 * 100; + uint8_t drive = dta.GetSearchDrive(); + size_t free_space = 1024 * 1024 * 100; if (Drives[drive]) { - Bit16u bytes_sector; - Bit8u sectors_cluster; - Bit16u total_clusters; - Bit16u free_clusters; + uint16_t bytes_sector; + uint8_t sectors_cluster; + uint16_t total_clusters; + uint16_t free_clusters; Drives[drive]->AllocationInfo(&bytes_sector, §ors_cluster, &total_clusters, &free_clusters); - free_space = bytes_sector * sectors_cluster * free_clusters; - } - FormatNumber(free_space, numformat); - WriteOut(MSG_Get("SHELL_CMD_DIR_BYTES_FREE"), dir_count, numformat); + free_space = bytes_sector; + free_space *= sectors_cluster; + free_space *= free_clusters; + } + const auto bytes = format_number(free_space); + WriteOut(MSG_Get("SHELL_CMD_DIR_BYTES_FREE"), dir_count, + bytes.c_str()); } dos.dta(save_dta); } @@ -1311,18 +1326,15 @@ void DOS_Shell::CMD_DATE(char * args) { HELP("DATE"); - if (ScanCMDBool(args,"H")) { - // synchronize date with host parameter - time_t curtime; - struct tm *loctime; - curtime = time (NULL); - loctime = localtime (&curtime); - - reg_cx = loctime->tm_year+1900; - reg_dh = loctime->tm_mon+1; - reg_dl = loctime->tm_mday; - - reg_ah=0x2b; // set system date + if (ScanCMDBool(args, "H")) { + // synchronize date with host + const time_t curtime = time(nullptr); + struct tm datetime; + cross::localtime_r(&curtime, &datetime); + reg_ah = 0x2b; // set system date + reg_cx = static_cast(datetime.tm_year + 1900); + reg_dh = static_cast(datetime.tm_mon + 1); + reg_dl = static_cast(datetime.tm_mday); CALLBACK_RunRealInt(0x21); return; } @@ -1372,24 +1384,27 @@ void DOS_Shell::CMD_TIME(char * args) { HELP("TIME"); - if (ScanCMDBool(args,"H")) { - // synchronize time with host parameter - time_t curtime; - struct tm *loctime; - curtime = time (NULL); - loctime = localtime (&curtime); - - //reg_cx = loctime->; - //reg_dh = loctime->; - //reg_dl = loctime->; - - // reg_ah=0x2d; // set system time TODO - // CALLBACK_RunRealInt(0x21); - - Bit32u ticks=(Bit32u)(((double)(loctime->tm_hour*3600+ - loctime->tm_min*60+ - loctime->tm_sec))*18.206481481); - mem_writed(BIOS_TIMER,ticks); + if (ScanCMDBool(args, "H")) { + // synchronize time with host + const time_t curtime = time(NULL); + struct tm datetime; + cross::localtime_r(&curtime, &datetime); + + // Original IBM PC used ~1.19MHz crystal for timer, because at + // 1.19MHz, 2^16 ticks is ~1 hour, making it easy to count + // hours and days. More precisely: + // + // clock updates at 1193180/65536 ticks per second. + // ticks per second ≈ 18.2 + // ticks per hour ≈ 65543 + // ticks per day ≈ 1573040 + // + constexpr uint64_t ticks_per_day = 1573040; + const auto seconds_now = (datetime.tm_hour * 3600 + + datetime.tm_min * 60 + + datetime.tm_sec); + const auto ticks_now = ticks_per_day * seconds_now / (24 * 3600); + mem_writed(BIOS_TIMER, static_cast(ticks_now)); return; } bool timeonly = ScanCMDBool(args,"T"); @@ -1543,9 +1558,11 @@ Bit16u n=1; do { - DOS_ReadFile (STDIN,&c,&n); - } while (!c || !(ptr = strchr(rem,(optS?c:toupper(c))))); - c = optS?c:(Bit8u)toupper(c); + DOS_ReadFile(STDIN, &c, &n); + if (exit_requested) + break; + } while (!c || !(ptr = strchr(rem, (optS ? c : toupper(c))))); + c = optS ? c : (Bit8u)toupper(c); DOS_WriteFile(STDOUT, &c, &n); WriteOut_NoParsing("\n"); dos.return_code = (Bit8u)(ptr-rem+1); @@ -1588,7 +1605,8 @@ dos.version.minor = new_version.minor; } else WriteOut(MSG_Get("SHELL_CMD_VER_INVALID")); - } else - WriteOut(MSG_Get("SHELL_CMD_VER_VER"), VERSION, + } else { + WriteOut(MSG_Get("SHELL_CMD_VER_VER"), DOSBOX_GetDetailedVersion(), dos.version.major, dos.version.minor); + } } diff -Nru dosbox-staging-0.76.0/src/shell/shell.cpp dosbox-staging-0.77.0/src/shell/shell.cpp --- dosbox-staging-0.76.0/src/shell/shell.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/shell/shell.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,20 +21,23 @@ #include #include #include +#include #include "callback.h" #include "control.h" #include "dosbox.h" #include "fs_utils.h" +#include "mapper.h" #include "regs.h" -#include "support.h" +#include "string_utils.h" Bitu call_shellstop; /* Larger scope so shell_del autoexec can use it to * remove things from the environment */ -DOS_Shell * first_shell = 0; +DOS_Shell *first_shell = nullptr; -static Bitu shellstop_handler(void) { +static Bitu shellstop_handler() +{ return CBRET_STOP; } @@ -90,7 +93,8 @@ this->CreateAutoexec(); } -void AutoexecObject::CreateAutoexec(void) { +void AutoexecObject::CreateAutoexec() +{ /* Remove old autoexec.bat if the shell exists */ if(first_shell) VFILE_Remove("AUTOEXEC.BAT"); @@ -166,7 +170,6 @@ input_handle(STDIN), bf(nullptr), echo(true), - exit_flag(false), call(false) {} @@ -210,23 +213,29 @@ safe_strncpy(temp, *ofn, temp_len); *ofn = temp; continue; + case '<': if (*ifn) { delete[] * ifn; *ifn = nullptr; } lr = ltrim(lr); - *ifn=lr; - while (*lr && *lr!=' ' && *lr!='>' && *lr != '|') lr++; - if((*ifn != lr) && (lr[-1] == ':')) lr[-1] = 0; - temp_len = static_cast(lr - *ofn + 1u); + *ifn = lr; + + while (*lr && *lr != ' ' && *lr != '>' && *lr != '|') + lr++; + + if ((*ifn != lr) && (lr[-1] == ':')) + lr[-1] = 0; + + assert(lr >= *ifn); + temp_len = static_cast(lr - *ifn + 1u); temp = new char[temp_len]; safe_strncpy(temp, *ifn, temp_len); *ifn = temp; continue; - case '|': - ch=0; - num++; + + case '|': ch = 0; num++; } *lw++=ch; } @@ -302,9 +311,8 @@ } } - - -void DOS_Shell::RunInternal(void) { +void DOS_Shell::RunInternal() +{ char input_line[CMD_MAXLINE] = {0}; while (bf) { if (bf->ReadLine(input_line)) { @@ -321,7 +329,8 @@ } } -void DOS_Shell::Run(void) { +void DOS_Shell::Run() +{ char input_line[CMD_MAXLINE] = {0}; std::string line; if (cmd->FindStringRemainBegin("/C",line)) { @@ -339,7 +348,8 @@ const bool wants_welcome_banner = control->GetStartupVerbosity() >= Verbosity::Medium; if (wants_welcome_banner) { - WriteOut(MSG_Get("SHELL_STARTUP_BEGIN"), VERSION); + WriteOut(MSG_Get("SHELL_STARTUP_BEGIN"), + DOSBOX_GetDetailedVersion()); #if C_DEBUG WriteOut(MSG_Get("SHELL_STARTUP_DEBUG")); #endif @@ -357,7 +367,7 @@ line.erase(); ParseLine(input_line); } else { - WriteOut(MSG_Get("SHELL_STARTUP_SUB"),VERSION); + WriteOut(MSG_Get("SHELL_STARTUP_SUB"), DOSBOX_GetDetailedVersion()); } do { if (bf){ @@ -376,14 +386,15 @@ InputCommand(input_line); ParseLine(input_line); } - } while (!exit_flag); + } while (!exit_requested); } -void DOS_Shell::SyntaxError(void) { +void DOS_Shell::SyntaxError() +{ WriteOut(MSG_Get("SHELL_SYNTAXERROR")); } -class AUTOEXEC:public Module_base { +class AUTOEXEC final : public Module_base { private: AutoexecObject autoexec[17]; AutoexecObject autoexec_echo; @@ -515,13 +526,15 @@ } }; -static AUTOEXEC* test; +static std::unique_ptr autoexec_module{}; -void AUTOEXEC_Init(Section * sec) { - test = new AUTOEXEC(sec); +void AUTOEXEC_Init(Section *sec) +{ + autoexec_module = std::make_unique(sec); } -static Bitu INT2E_Handler(void) { +static Bitu INT2E_Handler() +{ /* Save return address and current process */ RealPt save_ret=real_readd(SegValue(ss),reg_sp); Bit16u save_psp=dos.psp(); @@ -566,9 +579,7 @@ MSG_Add("SHELL_ILLEGAL_PATH","Illegal Path.\n"); MSG_Add("SHELL_CMD_HELP","If you want a list of all supported commands type \033[33;1mhelp /all\033[0m .\nA short list of the most often used commands:\n"); MSG_Add("SHELL_CMD_ECHO_ON","ECHO is on.\n"); - MSG_Add("SHELL_CMD_ECHO_OFF","ECHO is off.\n"); - MSG_Add("SHELL_ILLEGAL_CONTROL_CHARACTER", - "Unexpected control character: Dec %03u and Hex %#04x.\n"); + MSG_Add("SHELL_CMD_ECHO_OFF", "ECHO is off.\n"); MSG_Add("SHELL_ILLEGAL_SWITCH","Illegal switch: %s.\n"); MSG_Add("SHELL_MISSING_PARAMETER","Required parameter missing.\n"); MSG_Add("SHELL_CMD_CHDIR_ERROR","Unable to change to: %s.\n"); @@ -607,8 +618,8 @@ MSG_Add("SHELL_CMD_FILE_EXISTS","File %s already exists.\n"); MSG_Add("SHELL_CMD_DIR_VOLUME"," Volume in drive %c is %s\n"); MSG_Add("SHELL_CMD_DIR_INTRO"," Directory of %s\n"); - MSG_Add("SHELL_CMD_DIR_BYTES_USED","%16d file(s) %17s bytes\n"); - MSG_Add("SHELL_CMD_DIR_BYTES_FREE","%16d dir(s) %17s bytes free\n"); + MSG_Add("SHELL_CMD_DIR_BYTES_USED","%17d file(s) %21s bytes\n"); + MSG_Add("SHELL_CMD_DIR_BYTES_FREE","%17d dir(s) %21s bytes free\n"); MSG_Add("SHELL_EXECUTE_DRIVE_NOT_FOUND","Drive %c does not exist!\nYou must \033[31mmount\033[0m it first. Type \033[1;33mintro\033[0m or \033[1;33mintro mount\033[0m for more information.\n"); MSG_Add("SHELL_EXECUTE_ILLEGAL_COMMAND","Illegal command: %s.\n"); MSG_Add("SHELL_CMD_PAUSE","Press any key to continue..."); @@ -619,41 +630,39 @@ MSG_Add("SHELL_CMD_SUBST_FAILURE","SUBST failed. You either made an error in your commandline or the target drive is already used.\nIt's only possible to use SUBST on Local drives"); MSG_Add("SHELL_STARTUP_BEGIN", - "\033[44;1m\xC9\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD" - "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD" - "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBB\n" - "\xBA \033[32mWelcome to DOSBox Staging %-40s\033[37m \xBA\n" - "\xBA \xBA\n" -// "\xBA DOSBox runs real and protected mode games. \xBA\n" - "\xBA For a short introduction for new users type: \033[33mINTRO\033[37m \xBA\n" - "\xBA For supported shell commands type: \033[33mHELP\033[37m \xBA\n" - "\xBA \xBA\n" - "\xBA To adjust the emulated CPU speed, use \033[31mctrl-F11\033[37m and \033[31mctrl-F12\033[37m. \xBA\n" - "\xBA To activate the keymapper \033[31mctrl-F1\033[37m. \xBA\n" - "\xBA For more information read the \033[36mREADME\033[37m file in the DOSBox directory. \xBA\n" - "\xBA \xBA\n" - ); - MSG_Add("SHELL_STARTUP_CGA","\xBA DOSBox supports Composite CGA mode. \xBA\n" - "\xBA Use \033[31mF12\033[37m to set composite output ON, OFF, or AUTO (default). \xBA\n" - "\xBA \033[31m(Alt-)F11\033[37m changes hue; \033[31mctrl-alt-F11\033[37m selects early/late CGA model. \xBA\n" + "\033[44;1m\xC9\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD" + "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD" + "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBB\n" + "\xBA \033[32mWelcome to DOSBox Staging %-40s\033[37m \xBA\n" "\xBA \xBA\n" - ); - MSG_Add("SHELL_STARTUP_CGA_MONO","\xBA Use \033[31mF11\033[37m to cycle through green, amber, white and paper-white mode, \xBA\n" - "\xBA and \033[31mAlt-F11\033[37m to change contrast/brightness settings. \xBA\n" - ); - MSG_Add("SHELL_STARTUP_HERC","\xBA Use \033[31mF11\033[37m to cycle through white, amber, and green monochrome color. \xBA\n" + "\xBA For a short introduction for new users type: \033[33mINTRO\033[37m \xBA\n" + "\xBA For supported shell commands type: \033[33mHELP\033[37m \xBA\n" "\xBA \xBA\n" - ); + "\xBA To adjust the emulated CPU speed, use \033[31m" PRIMARY_MOD_NAME "+F11\033[37m and \033[31m" PRIMARY_MOD_NAME "+F12\033[37m." PRIMARY_MOD_PAD PRIMARY_MOD_PAD " \xBA\n" + "\xBA To activate the keymapper \033[31m" PRIMARY_MOD_NAME "+F1\033[37m." PRIMARY_MOD_PAD " \xBA\n" + "\xBA For more information read the \033[36mREADME\033[37m file in the DOSBox directory. \xBA\n" + "\xBA \xBA\n"); + MSG_Add("SHELL_STARTUP_CGA", + "\xBA DOSBox supports Composite CGA mode. \xBA\n" + "\xBA Use \033[31mF12\033[37m to set composite output ON, OFF, or AUTO (default). \xBA\n" + "\xBA \033[31m(" MMOD2_NAME "+)F11\033[37m changes hue; \033[31m" MMOD1_NAME "+" MMOD2_NAME "+F11\033[37m selects early/late CGA model." PRIMARY_MOD_PAD " \xBA\n" + "\xBA \xBA\n"); + MSG_Add("SHELL_STARTUP_CGA_MONO", + "\xBA Use \033[31mF11\033[37m to cycle through green, amber, white and paper-white mode, \xBA\n" + "\xBA and \033[31m" MMOD2_NAME "+F11\033[37m to change contrast/brightness settings. \xBA\n"); + MSG_Add("SHELL_STARTUP_HERC", + "\xBA Use \033[31mF11\033[37m to cycle through white, amber, and green monochrome color. \xBA\n" + "\xBA \xBA\n"); MSG_Add("SHELL_STARTUP_DEBUG", - "\xBA Press \033[31malt-Pause\033[37m to enter the debugger or start the exe with \033[33mDEBUG\033[37m. \xBA\n" - "\xBA \xBA\n" - ); + "\xBA Press \033[31m" MMOD2_NAME "+Pause\033[37m to enter the debugger or start the exe with \033[33mDEBUG\033[37m. \xBA\n" + "\xBA \xBA\n"); MSG_Add("SHELL_STARTUP_END", "\xBA \033[33mhttps://dosbox-staging.github.io\033[37m \xBA\n" "\xC8\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD" "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD" "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBC\033[0m\n" "\n"); + MSG_Add("SHELL_STARTUP_SUB","\033[32;1mdosbox-staging %s\033[0m\n"); MSG_Add("SHELL_CMD_CHDIR_HELP","Displays/changes the current directory.\n"); MSG_Add("SHELL_CMD_CHDIR_HELP_LONG","CHDIR [drive:][path]\n" @@ -725,11 +734,24 @@ MSG_Add("SHELL_CMD_PATH_HELP","Provided for compatibility.\n"); MSG_Add("SHELL_CMD_VER_HELP", "View or set the reported DOS version.\n"); - MSG_Add("SHELL_CMD_VER_HELP_LONG", "VER\n" - "VER SET version_number\n" - "VER SET major_version [minor_version]\n"); - MSG_Add("SHELL_CMD_VER_VER", - "DOSBox Staging version %s. Reported DOS version %d.%02d.\n"); + MSG_Add("SHELL_CMD_VER_HELP_LONG", "Usage:\n" + " \033[32;1mver\033[0m\n" + " \033[32;1mver\033[0m \033[37;1mset\033[0m \033[36;1mVERSION\033[0m\n" + "\n" + "Where:\n" + " \033[36;1mVERSION\033[0m can be a whole number, such as \033[36;1m5\033[0m, or include a two-digit decimal\n" + " value, such as: \033[36;1m6.22\033[0m, \033[36;1m7.01\033[0m, or \033[36;1m7.10\033[0m. The decimal can alternatively be\n" + " space-separated, such as: \033[36;1m6 22\033[0m, \033[36;1m7 01\033[0m, or \033[36;1m7 10\033[0m.\n" + "\n" + "Notes:\n" + " The DOS version can also be set in the configuration file under the [dos]\n" + " section using the \"ver = \033[36;1mVERSION\033[0m\" setting.\n" + "\n" + "Examples:\n" + " \033[32;1mver\033[0m \033[37;1mset\033[0m \033[36;1m6.22\033[0m\n" + " \033[32;1mver\033[0m \033[37;1mset\033[0m \033[36;1m7 10\033[0m\n"); + MSG_Add("SHELL_CMD_VER_VER", "DOSBox Staging version %s\n" + "DOS version %d.%02d\n"); MSG_Add("SHELL_CMD_VER_INVALID", "The specified DOS version is not correct.\n"); /* Regular startup */ @@ -825,5 +847,5 @@ SHELL_ProgramStart_First_shell(&first_shell); first_shell->Run(); delete first_shell; - first_shell = 0;//Make clear that it shouldn't be used anymore + first_shell = nullptr; // Make clear that it shouldn't be used anymore } diff -Nru dosbox-staging-0.76.0/src/shell/shell_misc.cpp dosbox-staging-0.77.0/src/shell/shell_misc.cpp --- dosbox-staging-0.76.0/src/shell/shell_misc.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/shell/shell_misc.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 The DOSBox Team + * Copyright (C) 2002-2021 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,10 +23,16 @@ #include #include #include +#include #include "regs.h" #include "callback.h" -#include "support.h" +#include "string_utils.h" + +DOS_Shell::~DOS_Shell() { + delete bf; + bf = nullptr; +} void DOS_Shell::ShowPrompt(void) { Bit8u drive=DOS_GetDefaultDrive()+'A'; @@ -46,7 +52,8 @@ void DOS_Shell::InputCommand(char * line) { Bitu size=CMD_MAXLINE-2; //lastcharacter+0 Bit8u c;Bit16u n=1; - Bitu str_len=0;Bitu str_index=0; + size_t str_len = 0; + size_t str_index = 0; Bit16u len=0; bool current_hist=false; // current command stored in history? @@ -54,7 +61,7 @@ std::list::iterator it_history = l_history.begin(), it_completion = l_completion.begin(); - while (size) { + while (size && !exit_requested) { dos.echo=false; while(!DOS_ReadFile(input_handle,&c,&n)) { Bit16u dummy; @@ -67,12 +74,12 @@ continue; } switch (c) { - case 0x00: /* Extended Keys */ + case 0x00: /* Extended Keys */ { DOS_ReadFile(input_handle,&c,&n); switch (c) { - case 0x3d: /* F3 */ + case 0x3d: /* F3 */ if (!l_history.size()) break; it_history = l_history.begin(); if (it_history != l_history.end() && it_history->length() > str_len) { @@ -81,39 +88,39 @@ line[str_index ++] = c; DOS_WriteFile(STDOUT,&c,&n); } - str_len = str_index = (Bitu)it_history->length(); + str_len = str_index = it_history->length(); size = CMD_MAXLINE - str_index - 2; line[str_len] = 0; } break; - case 0x4B: /* LEFT */ + case 0x4B: /* Left */ if (str_index) { outc(8); str_index --; } break; - case 0x4D: /* RIGHT */ + case 0x4D: /* Right */ if (str_index < str_len) { outc(line[str_index++]); } break; - case 0x47: /* HOME */ + case 0x47: /* Home */ while (str_index) { outc(8); str_index--; } break; - case 0x4F: /* END */ + case 0x4F: /* End */ while (str_index < str_len) { outc(line[str_index++]); } break; - case 0x48: /* UP */ + case 0x48: /* Up */ if (l_history.empty() || it_history == l_history.end()) break; // store current command in history if we are at beginning @@ -134,7 +141,7 @@ it_history ++; break; - case 0x50: /* DOWN */ + case 0x50: /* Down */ if (l_history.empty() || it_history == l_history.begin()) break; // not very nice but works .. @@ -163,14 +170,14 @@ it_history ++; break; - case 0x53:/* DELETE */ + case 0x53: /* Delete */ { if(str_index>=str_len) break; - Bit16u a=str_len-str_index-1; + auto text_len = static_cast(str_len - str_index - 1); Bit8u* text=reinterpret_cast(&line[str_index+1]); - DOS_WriteFile(STDOUT,text,&a);//write buffer to screen + DOS_WriteFile(STDOUT, text, &text_len); // write buffer to screen outc(' ');outc(8); - for(Bitu i=str_index;i(str_len - str_index); Bit8u* text=reinterpret_cast(&line[str_index]); - DOS_WriteFile(STDOUT,text,&a);//write buffer to screen + DOS_WriteFile(STDOUT, text, &text_len); // write buffer to screen outc(8);//undo the cursor the right. - for(Bitu i=str_len;i>str_index;i--) { + for (auto i = str_len; i > str_index; i--) { line[i]=line[i-1]; //move internal buffer outc(8); //move cursor back (from write buffer to screen) } line[++str_len]=0;//new end (as the internal buffer moved one place to the right size--; }; - + line[str_index]=c; str_index ++; if (str_index > str_len){ @@ -378,6 +385,43 @@ // add command line to history l_history.push_front(line); it_history = l_history.begin(); if (l_completion.size()) l_completion.clear(); + + /* DOS %variable% substitution */ + ProcessCmdLineEnvVarStitution(line); +} + +/* Note: Buffer pointed to by "line" must be at least CMD_MAXLINE+1 bytes long! */ +void DOS_Shell::ProcessCmdLineEnvVarStitution(char* line) { + constexpr char surrogate_percent = 8; + const static std::regex re("\\%([^%0-9][^%]*)?%"); + std::string text = line; + std::smatch match; + /* Iterate over potential %var1%, %var2%, etc matches found in the text string */ + while (std::regex_search(text, match, re)) { + std::string variable_name; + variable_name = match[1].str(); + if (!variable_name.size()) { + /* Replace %% with the character "surrogate_percent", then (eventually) % */ + text.replace(match[0].first, match[0].second, std::string(1, surrogate_percent)); + continue; + } + /* Trim preceding spaces from the variable name */ + variable_name.erase(0, variable_name.find_first_not_of(' ')); + std::string variable_value; + if (variable_name.size() && GetEnvStr(variable_name.c_str(), variable_value)) { + const size_t equal_pos = variable_value.find_first_of('='); + /* Replace the original %var% with its corresponding value from the environment */ + const std::string replacement = equal_pos != std::string::npos + ? variable_value.substr(equal_pos + 1) : ""; + text.replace(match[0].first, match[0].second, replacement); + } + else { + text.replace(match[0].first, match[0].second, ""); + } + } + std::replace(text.begin(), text.end(), surrogate_percent, '%'); + assert(text.size() <= CMD_MAXLINE); + safe_strncpy(line, text.c_str(), CMD_MAXLINE); } std::string full_arguments = ""; diff -Nru dosbox-staging-0.76.0/src/version.cpp.in dosbox-staging-0.77.0/src/version.cpp.in --- dosbox-staging-0.76.0/src/version.cpp.in 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/src/version.cpp.in 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "dosbox.h" + +const char *DOSBOX_GetDetailedVersion() noexcept +{ + static const char version[] = "@VCS_TAG@"; + // Git tag names start with a letter v (by convention). + if (version[0] == 'v') + return version + 1; + else + return version; +} diff -Nru dosbox-staging-0.76.0/src/winres.rc dosbox-staging-0.77.0/src/winres.rc --- dosbox-staging-0.76.0/src/winres.rc 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/src/winres.rc 2021-07-02 15:47:39.000000000 +0000 @@ -6,8 +6,8 @@ // version resource VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,76,0,0 - PRODUCTVERSION 0,76,0,0 + FILEVERSION 0,77,0,0 + PRODUCTVERSION 0,77,0,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -18,15 +18,15 @@ BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "Š 2020 dosbox-staging team, published under GNU GPL" + VALUE "Comments", "Š 2021 DOSBox Staging Team, published under GNU GPL" VALUE "CompanyName", "DOSBox Staging" VALUE "FileDescription", "DOSBox Staging DOS Emulator" - VALUE "FileVersion", "0, 76, 0, 0" + VALUE "FileVersion", "0, 77, 0, 0" VALUE "InternalName", "dosbox-staging" - VALUE "LegalCopyright", "Copyright Š 2020 dosbox-staging team" + VALUE "LegalCopyright", "Copyright Š 2021 DOSBox Staging Team" VALUE "OriginalFilename", "dosbox.exe" VALUE "ProductName", "DOSBox Staging" - VALUE "ProductVersion", "0, 76, 0, 0" + VALUE "ProductVersion", "0, 77, 0, 0" END END BLOCK "VarFileInfo" diff -Nru dosbox-staging-0.76.0/subprojects/fluidsynth.wrap dosbox-staging-0.77.0/subprojects/fluidsynth.wrap --- dosbox-staging-0.76.0/subprojects/fluidsynth.wrap 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/subprojects/fluidsynth.wrap 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,11 @@ +[wrap-file] +directory = fluidsynth-2.2.0 +source_url = https://github.com/FluidSynth/fluidsynth/archive/v2.2.0.tar.gz +source_filename = fluidsynth-2.2.0.tar.gz +source_hash = 928fb16f307507485bd1d9b010dafba8c747bce5de2ba47ab1705944c87013b6 +patch_url = https://wrapdb.mesonbuild.com/v1/projects/fluidsynth/2.2.0/1/get_zip +patch_filename = fluidsynth-2.2.0-1-wrap.zip +patch_hash = 8017e749a0879df74ce8ee8316a5b8e79a79c2bf7931db25e8f40a7f3d33e9b0 + +[provide] +fluidsynth = fluidsynth_dep diff -Nru dosbox-staging-0.76.0/subprojects/.gitignore dosbox-staging-0.77.0/subprojects/.gitignore --- dosbox-staging-0.76.0/subprojects/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/subprojects/.gitignore 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,4 @@ +googletest-release-* +munt-libmt32emu* +fluidsynth-* +packagecache diff -Nru dosbox-staging-0.76.0/subprojects/gtest.wrap dosbox-staging-0.77.0/subprojects/gtest.wrap --- dosbox-staging-0.76.0/subprojects/gtest.wrap 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/subprojects/gtest.wrap 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,10 @@ +[wrap-file] +directory = googletest-release-1.10.0 + +source_url = https://github.com/google/googletest/archive/release-1.10.0.zip +source_filename = gtest-1.10.0.zip +source_hash = 94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91 + +patch_url = https://wrapdb.mesonbuild.com/v1/projects/gtest/1.10.0/1/get_zip +patch_filename = gtest-1.10.0-1-wrap.zip +patch_hash = 04ff14e8880e4e465f6260221e9dfd56fea6bc7cce4c4aff0dc528e4a2c8f514 diff -Nru dosbox-staging-0.76.0/subprojects/mt32emu.wrap dosbox-staging-0.77.0/subprojects/mt32emu.wrap --- dosbox-staging-0.76.0/subprojects/mt32emu.wrap 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/subprojects/mt32emu.wrap 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,12 @@ +[wrap-file] +directory = munt-libmt32emu_2_5_0 +source_url = https://github.com/munt/munt/archive/libmt32emu_2_5_0.tar.gz +source_filename = libmt32emu_2_5_0.tar.gz +source_hash = eb43864c002acedc42b304e1500f682c871ef8dabd8b5cbe492ec314a226f231 +patch_url = https://wrapdb.mesonbuild.com/v1/projects/mt32emu/2.5.0/1/get_zip +patch_filename = mt32emu-2.5.0-1-wrap.zip +patch_hash = c41bf6e09a912a08a4b340a706230ad80fb31a7b96af0532201579ec88b0ae48 + +[provide] +mt32emu = mt32emu_dep + diff -Nru dosbox-staging-0.76.0/tests/example.cpp dosbox-staging-0.77.0/tests/example.cpp --- dosbox-staging-0.76.0/tests/example.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/example.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -/* - * SPDX-License-Identifier: GPL-2.0-or-later - * - * Copyright (C) 2020-2020 The dosbox-staging team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/* Uncomment next line if you want to actually build the example tests */ -//#define BUILD_EXAMPLE - -/* This sample shows how to write a simple unit test for dosbox-staging using - * Google C++ testing framework. - * - * Read Google Test Primer for reference of most available features, macros, - * and guidance about writing unit tests: - * - * https://github.com/google/googletest/blob/master/googletest/docs/primer.md#googletest-primer - */ - -#ifdef BUILD_EXAMPLE - -/* Include necessary header files; order of headers should be as follows: - * - * 1. Header declaring functions/classes being tested - * 2. , which declares the testing framework - * 3. Additional system headers (if needed) - * 4. Additional dosbox-staging headers (if needed) - */ - -#include "support.h" - -#include - -#include - -// Open anonymous namespace (this is Google Test requirement) - -namespace { - -/* Use the TEST macro to define your tests. You can also create test fixtures - * using a similar TEST_F macro (see the primer for details). - * - * TEST has two parameters: the test case name and the test name. - * After using the macro, you should define your test logic between a - * pair of braces. - * - * You can use a bunch of macros to indicate the success or failure of a test. - * EXPECT_TRUE and EXPECT_EQ are examples of such macros, but there are many - * similar ones, appropriate for various situations. - */ - -TEST(DriveIndexTest, BigLetters) -{ - EXPECT_EQ(0, drive_index('A')); - EXPECT_EQ(25, drive_index('Z')); -} - -/* Remember: tests are not code - they should exercise specific edge cases, - * not re-implement the functionality. - * - * When writing *non-trivial* unit tests, it's recommended to follow - * "Given-When-Then" style. It's a style of writing tests, where a single - * case is split into three sections. Here's a test similar to the previous one, - * but rewritten using this style: - */ - -TEST(DriveIndexTest, SmallLetters) -{ - // "Given" section describes test-prerequisites - const char input_letter = 'b'; - - // "When" section runs the tested code and records the results - const uint8_t result = drive_index(input_letter); - - // "Then" section describes expectations for the test result - EXPECT_EQ(1, result); -} - -/* Below you'll find an example failing test. - * - * Remember to pass code results as second parameter to the macro - this will - * result in Google Test generating more helpful test output. - * - * In this case output will look like this: - * - * [ RUN ] DriveIndexTest.ExampleFailingTest - * example.cpp:110: Failure - * Expected equality of these values: - * 42 - * drive_index('C') - * Which is: '\x2' (2) - * [ FAILED ] DriveIndexTest.ExampleFailingTest (0 ms) - */ - -TEST(DriveIndexTest, ExampleFailingTest) -{ - EXPECT_EQ(42, drive_index('C')); // this is clearly incorrect test :) -} - -/* Sometimes it might be convenient to disable a test during development for - * a while. You can accomplish this by prefixing test name with "DISABLED_" - * prefix. - * - * Google Test will print a reminder about disabled tests in test results. - */ - -TEST(DriveIndexTest, DISABLED_ExampleFailingTest2) -{ - EXPECT_EQ(42, drive_index('C')); // this is clearly incorrect test :) -} - -/* Once the tests are built, run ./tests to see the testing results. - * - * You can also use "make test" to build and run tests in one go. - * - * See "./tests --help" for additional options (like e.g. filtering which tests - * should be run or randomizing the tests order). - */ - -} // namespace - -#endif diff -Nru dosbox-staging-0.76.0/tests/example_tests.cpp dosbox-staging-0.77.0/tests/example_tests.cpp --- dosbox-staging-0.76.0/tests/example_tests.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/example_tests.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* This sample shows how to write a simple unit test for dosbox-staging using + * Google C++ testing framework. + * + * Read Google Test Primer for reference of most available features, macros, + * and guidance about writing unit tests: + * + * https://github.com/google/googletest/blob/master/googletest/docs/primer.md#googletest-primer + */ + +/* Include necessary header files; order of headers should be as follows: + * + * 1. Header declaring functions/classes being tested + * 2. , which declares the testing framework + * 3. Additional system headers (if needed) + * 4. Additional dosbox-staging headers (if needed) + */ + +#include "support.h" + +#include + +#include + +// Open anonymous namespace (this is Google Test requirement) + +namespace { + +/* Use the TEST macro to define your tests. You can also create test fixtures + * using a similar TEST_F macro (see the primer for details). + * + * TEST has two parameters: the test case name and the test name. + * After using the macro, you should define your test logic between a + * pair of braces. + * + * You can use a bunch of macros to indicate the success or failure of a test. + * EXPECT_TRUE and EXPECT_EQ are examples of such macros, but there are many + * similar ones, appropriate for various situations. + */ + +TEST(DriveIndexTest, BigLetters) +{ + EXPECT_EQ(0, drive_index('A')); + EXPECT_EQ(25, drive_index('Z')); +} + +/* Remember: tests are not code - they should exercise specific edge cases, + * not re-implement the functionality. + * + * When writing *non-trivial* unit tests, it's recommended to follow + * "Given-When-Then" style. It's a style of writing tests, where a single + * case is split into three sections. Here's a test similar to the previous one, + * but rewritten using this style: + */ + +TEST(DriveIndexTest, SmallLetters) +{ + // "Given" section describes test-prerequisites + const char input_letter = 'b'; + + // "When" section runs the tested code and records the results + const uint8_t result = drive_index(input_letter); + + // "Then" section describes expectations for the test result + EXPECT_EQ(1, result); +} + +/* Below you'll find an example failing test. + * + * Remember to pass code results as second parameter to the macro - this will + * result in Google Test generating more helpful test output. + * + * In this case output will look like this: + * + * [ RUN ] DriveIndexTest.ExampleFailingTest + * example.cpp:110: Failure + * Expected equality of these values: + * 42 + * drive_index('C') + * Which is: '\x2' (2) + * [ FAILED ] DriveIndexTest.ExampleFailingTest (0 ms) + */ + +TEST(DriveIndexTest, ExampleFailingTest) +{ + EXPECT_EQ(42, drive_index('C')); // this is clearly incorrect test :) +} + +/* Sometimes it might be convenient to disable a test during development for + * a while. You can accomplish this by prefixing test name with "DISABLED_" + * prefix. + * + * Google Test will print a reminder about disabled tests in test results. + */ + +TEST(DriveIndexTest, DISABLED_ExampleFailingTest2) +{ + EXPECT_EQ(42, drive_index('C')); // this is clearly incorrect test :) +} + +/* Once the tests are built, run ./tests to see the testing results. + * + * You can also use "make test" to build and run tests in one go. + * + * See "./tests --help" for additional options (like e.g. filtering which tests + * should be run or randomizing the tests order). + */ + +} // namespace diff -Nru dosbox-staging-0.76.0/tests/fs_utils.cpp dosbox-staging-0.77.0/tests/fs_utils.cpp --- dosbox-staging-0.76.0/tests/fs_utils.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/fs_utils.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -/* - * SPDX-License-Identifier: GPL-2.0-or-later - * - * Copyright (C) 2020-2020 The dosbox-staging team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "fs_utils.h" - -#include - -#include -#include - -namespace { - -TEST(PathExists, DirExists) -{ - EXPECT_TRUE(path_exists("tests")); -} - -TEST(PathExists, FileExists) -{ - EXPECT_TRUE(path_exists("tests/fs_utils.cpp")); -} - -TEST(PathExists, MissingPath) -{ - EXPECT_FALSE(path_exists("foobar")); -} - -TEST(PathExists, ExistingPathAsString) -{ - const std::string path = "tests/fs_utils.cpp"; - EXPECT_TRUE(path_exists(path)); -} - -TEST(PathExists, MissingPathAsString) -{ - const std::string path = "barbaz"; - EXPECT_FALSE(path_exists("foobar")); -} - -TEST(PathConversion, SimpleTest) -{ - constexpr auto expected_result = "tests/files/paths/empty.txt"; - constexpr auto input = "tests\\files\\PATHS\\EMPTY.TXT"; - ASSERT_TRUE(path_exists(expected_result)); - EXPECT_TRUE(path_exists(to_native_path(input))); -#if !defined(WIN32) - EXPECT_EQ(expected_result, to_native_path(input)); -#endif -} - -TEST(PathConversion, MissingFile) -{ - constexpr auto nonexistent_file = "tests/files/paths/missing.txt"; - ASSERT_FALSE(path_exists(nonexistent_file)); - EXPECT_FALSE(path_exists(to_native_path(nonexistent_file))); -} - -constexpr char TEST_DIR[] = "tests/files/no_path"; - -struct CreateDirTest : public testing::Test { - ~CreateDirTest() { - if (path_exists(TEST_DIR)) - rmdir(TEST_DIR); - } -}; - -TEST_F(CreateDirTest, CreateDir) -{ - ASSERT_FALSE(path_exists(TEST_DIR)); - EXPECT_EQ(create_dir(TEST_DIR, 0700), 0); - EXPECT_TRUE(path_exists(TEST_DIR)); - EXPECT_EQ(create_dir(TEST_DIR, 0700), -1); - EXPECT_EQ(errno, EEXIST); -} - -TEST_F(CreateDirTest, CreateDirWithoutFail) -{ - ASSERT_FALSE(path_exists(TEST_DIR)); - EXPECT_EQ(create_dir(TEST_DIR, 0700, OK_IF_EXISTS), 0); - EXPECT_TRUE(path_exists(TEST_DIR)); - EXPECT_EQ(create_dir(TEST_DIR, 0700, OK_IF_EXISTS), 0); -} - -TEST_F(CreateDirTest, FailDueToFileExisting) -{ - constexpr char path[] = "tests/files/paths/empty.txt"; - ASSERT_TRUE(path_exists(path)); - EXPECT_EQ(create_dir(path, 0700), -1); - EXPECT_EQ(errno, EEXIST); -} - -TEST_F(CreateDirTest, FailDueToFileExisting2) -{ - constexpr char path[] = "tests/files/paths/empty.txt"; - ASSERT_TRUE(path_exists(path)); - EXPECT_EQ(create_dir(path, 0700, OK_IF_EXISTS), -1); - EXPECT_EQ(errno, EEXIST); -} - -} // namespace diff -Nru dosbox-staging-0.76.0/tests/fs_utils_tests.cpp dosbox-staging-0.77.0/tests/fs_utils_tests.cpp --- dosbox-staging-0.76.0/tests/fs_utils_tests.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/fs_utils_tests.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "fs_utils.h" + +#include + +#include +#include + +namespace { + +TEST(PathExists, DirExists) +{ + EXPECT_TRUE(path_exists("tests")); +} + +TEST(PathExists, FileExists) +{ + EXPECT_TRUE(path_exists("tests/fs_utils_tests.cpp")); +} + +TEST(PathExists, MissingPath) +{ + EXPECT_FALSE(path_exists("foobar")); +} + +TEST(PathExists, ExistingPathAsString) +{ + const std::string path = "tests/fs_utils_tests.cpp"; + EXPECT_TRUE(path_exists(path)); +} + +TEST(PathExists, MissingPathAsString) +{ + const std::string path = "barbaz"; + EXPECT_FALSE(path_exists("foobar")); +} + +TEST(PathConversion, SimpleTest) +{ + constexpr auto expected_result = "tests/files/paths/empty.txt"; + constexpr auto input = "tests\\files\\PATHS\\EMPTY.TXT"; + ASSERT_TRUE(path_exists(expected_result)); + EXPECT_TRUE(path_exists(to_native_path(input))); +#if !defined(WIN32) + EXPECT_EQ(expected_result, to_native_path(input)); +#endif +} + +TEST(PathConversion, MissingFile) +{ + constexpr auto nonexistent_file = "tests/files/paths/missing.txt"; + ASSERT_FALSE(path_exists(nonexistent_file)); + EXPECT_FALSE(path_exists(to_native_path(nonexistent_file))); +} + +constexpr char TEST_DIR[] = "tests/files/no_path"; + +struct CreateDirTest : public testing::Test { + ~CreateDirTest() { + if (path_exists(TEST_DIR)) + rmdir(TEST_DIR); + } +}; + +TEST_F(CreateDirTest, CreateDir) +{ + ASSERT_FALSE(path_exists(TEST_DIR)); + EXPECT_EQ(create_dir(TEST_DIR, 0700), 0); + EXPECT_TRUE(path_exists(TEST_DIR)); + EXPECT_EQ(create_dir(TEST_DIR, 0700), -1); + EXPECT_EQ(errno, EEXIST); +} + +TEST_F(CreateDirTest, CreateDirWithoutFail) +{ + ASSERT_FALSE(path_exists(TEST_DIR)); + EXPECT_EQ(create_dir(TEST_DIR, 0700, OK_IF_EXISTS), 0); + EXPECT_TRUE(path_exists(TEST_DIR)); + EXPECT_EQ(create_dir(TEST_DIR, 0700, OK_IF_EXISTS), 0); +} + +TEST_F(CreateDirTest, FailDueToFileExisting) +{ + constexpr char path[] = "tests/files/paths/empty.txt"; + ASSERT_TRUE(path_exists(path)); + EXPECT_EQ(create_dir(path, 0700), -1); + EXPECT_EQ(errno, EEXIST); +} + +TEST_F(CreateDirTest, FailDueToFileExisting2) +{ + constexpr char path[] = "tests/files/paths/empty.txt"; + ASSERT_TRUE(path_exists(path)); + EXPECT_EQ(create_dir(path, 0700, OK_IF_EXISTS), -1); + EXPECT_EQ(errno, EEXIST); +} + +} // namespace diff -Nru dosbox-staging-0.76.0/tests/.gitignore dosbox-staging-0.77.0/tests/.gitignore --- dosbox-staging-0.76.0/tests/.gitignore 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -tests -.deps diff -Nru dosbox-staging-0.76.0/tests/Makefile.am dosbox-staging-0.77.0/tests/Makefile.am --- dosbox-staging-0.76.0/tests/Makefile.am 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -if BUILD_TESTS - -AM_CPPFLAGS = -I$(top_srcdir)/include - -SUBDIRS = ../src/misc - -bin_PROGRAMS = tests - -tests_CXXFLAGS = $(AM_CXXFLAGS) $(CXXFLAGS) -if USE_GTEST_STATIC -tests_CXXFLAGS += -Wl,-Bstatic -lgtest_main -lgtest -Wl,-Bdynamic -else -tests_CXXFLAGS += -lgtest_main -lgtest -endif - -tests_SOURCES = \ - example.cpp \ - fs_utils.cpp \ - soft_limiter.cpp \ - string_utils.cpp \ - support.cpp - -tests_LDADD = ../src/misc/libmisc.a - -# Override automake's distclean target to prevent it recursing into -# SUBDIRS and failing (it was already invoked in there via src/Makefile.am). -distclean: - -rm tests$(EXEEXT) - -rm *.o - -rm Makefile - -endif diff -Nru dosbox-staging-0.76.0/tests/meson.build dosbox-staging-0.77.0/tests/meson.build --- dosbox-staging-0.76.0/tests/meson.build 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/meson.build 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,59 @@ +# gtest dependency +# +# If feature 'unit_tests' is set to 'auto', then unit tests are disabled +# for release builds and enabled everywhere else. +# +# Meson will first try to find pre-installed gtest via pkg-config; +# if this fails, it will download wrap dependency (subproject). +# +# Users can further configure the download behaviour using: +# +# meson setup --wrap-mode={nofallback,nodownload,forcefallback} +# +# If gtest is not available at all, unit tests will be disabled. +# +gtest_dep = optional_dep +if not (get_option('buildtype') == 'release' and get_option('unit_tests').auto()) + gtest_dep = dependency('gtest', main : true, + required : get_option('unit_tests'), + fallback : ['gtest', 'gtest_main_dep']) +endif +if not gtest_dep.found() + gtest_dep = disabler() +endif + +# unit tests with specific requirements +# +# - example - has a failing testcase (on purpose) +# - fs_utils - depends on files in: tests/files/ +# +example = executable('example', 'example_tests.cpp', + dependencies : [gtest_dep, sdl2_dep, libmisc_dep], + include_directories : incdir) +test('gtest example', example, + should_fail : true) + +fs_utils = executable('fs_utils', 'fs_utils_tests.cpp', + dependencies : [gtest_dep, libmisc_dep], + include_directories : incdir) +test('gtest fs_utils', fs_utils, + workdir : project_source_root, is_parallel : false) + + +# other unit tests +# +unit_tests = [ + {'name' : 'rwqueue', 'deps' : [libmisc_dep]}, + {'name' : 'soft_limiter', 'deps' : [atomic_dep, sdl2_dep, libmisc_dep]}, + {'name' : 'string_utils', 'deps' : []}, + {'name' : 'setup', 'deps' : [sdl2_dep, libmisc_dep]}, + {'name' : 'support', 'deps' : [sdl2_dep, libmisc_dep]}, +] + +foreach ut : unit_tests + name = ut.get('name') + exe = executable(name, [name + '_tests.cpp', 'stubs.cpp'], + dependencies : [gtest_dep] + ut.get('deps'), + include_directories : incdir) + test('gtest ' + name, exe) +endforeach diff -Nru dosbox-staging-0.76.0/tests/README.md dosbox-staging-0.77.0/tests/README.md --- dosbox-staging-0.76.0/tests/README.md 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/README.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -# Unit tests / Selftests - -To build unit tests you need to install additional dependency (Google Test -framework): - -``` shell -# Fedora -sudo dnf install gtest-devel -``` - -``` shell -# Debian, Ubuntu -sudo apt install libgtest-dev -``` - -``` shell -# Arch, Manjaro -sudo pacman -S gtest -``` - -Use `--enable-tests` config flag: - -``` shell -./autogen.sh -./configure --enable-tests -make -j$(nproc) -``` - -Run tests: - -``` -./tests/tests -``` - -Additional options (selectve test run, shuffling tests order, etc) are -documented in the test binary itself: `./tests/tests --help`. - -# Writing tests - -See `tests/example.cpp` for brief tutorial (with examples) on writing tests -using Google Test framework. diff -Nru dosbox-staging-0.76.0/tests/rwqueue_tests.cpp dosbox-staging-0.77.0/tests/rwqueue_tests.cpp --- dosbox-staging-0.76.0/tests/rwqueue_tests.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/rwqueue_tests.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,240 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "rwqueue.h" + +#include + +#include +#include + +namespace { + +constexpr auto iterations = 10000; + +TEST(RWQueue, TrivialSerial) +{ + RWQueue q(65); + for (int iteration = 0; iteration != 128; + ++iteration) { // check there's no problem with mismatch + // between nominal and allocated capacity + EXPECT_EQ(q.MaxCapacity(), 65); + EXPECT_EQ(q.Size(), 0); + EXPECT_TRUE(q.IsEmpty()); + q.Enqueue(0); + EXPECT_EQ(q.MaxCapacity(), 65); + EXPECT_EQ(q.Size(), 1); + EXPECT_FALSE(q.IsEmpty()); + for (int i = 1; i != 65; ++i) + q.Enqueue(std::move(i)); + EXPECT_EQ(q.Size(), 65); + EXPECT_FALSE(q.IsEmpty()); + + // Basic dequeue + int item; + item = q.Dequeue(); + EXPECT_EQ(item, 0); + for (int i = 1; i != 65; ++i) { + item = q.Dequeue(); + EXPECT_EQ(item, i); + } + EXPECT_EQ(item, 64); + EXPECT_TRUE(q.IsEmpty()); + } +} + +TEST(RWQueue, TrivialZeroCapacity) +{ + // Zero capacity + EXPECT_DEBUG_DEATH({ RWQueue q(0); }, ""); +} + +void rw_consume_trivial(RWQueue *q, const size_t *max_depth) +{ + int item; + for (int i = 0; i != iterations; ++i) { + EXPECT_TRUE(q->Size() <= *max_depth); + item = q->Dequeue(); + EXPECT_EQ(item, i); + } +} + +void rw_produce_copy_trivial(RWQueue *q, const size_t *max_depth) +{ + for (int i = 0; i != iterations; ++i) { + q->Enqueue(i); + EXPECT_TRUE(q->Size() <= *max_depth); + } +} + +void rw_produce_move_trivial(RWQueue *q, const size_t *max_depth) +{ + for (int i = 0; i != iterations; ++i) { + q->Enqueue(std::move(i)); + EXPECT_TRUE(q->Size() <= *max_depth); + } +} + +TEST(RWQueue, TrivialCopyAsync) +{ + const size_t max_depth = 8; + RWQueue q(max_depth); + + std::thread writer(rw_produce_copy_trivial, &q, &max_depth); + std::thread reader(rw_consume_trivial, &q, &max_depth); + + writer.join(); + reader.join(); + + // Make sure we've consumed all produced items and the queue is empty + EXPECT_EQ(q.Size(), 0); +} + +TEST(RWQueue, TrivialMoveAsync) +{ + const size_t max_depth = 8; + RWQueue q(max_depth); + + std::thread writer(rw_produce_move_trivial, &q, &max_depth); + std::thread reader(rw_consume_trivial, &q, &max_depth); + + writer.join(); + reader.join(); + + // Make sure we've consumed all produced items and the queue is empty + EXPECT_EQ(q.Size(), 0); +} + + +using container_t = std::vector; + +TEST(RWQueue,ContainerSerial) +{ + RWQueue q(65); + for (int iteration = 0; iteration != 128; + ++iteration) { // check there's no problem with mismatch + // between nominal and allocated capacity + EXPECT_EQ(q.MaxCapacity(), 65); + EXPECT_EQ(q.Size(), 0); + EXPECT_TRUE(q.IsEmpty()); + + container_t v(iteration + 1); + v[iteration] = iteration; + q.Enqueue(v); + EXPECT_EQ(v.size(), iteration + 1); // check copy + + EXPECT_EQ(q.MaxCapacity(), 65); + EXPECT_EQ(q.Size(), 1); + EXPECT_FALSE(q.IsEmpty()); + for (int i = 1; i != 65; ++i) { + container_t v(i + 1); + v[i] = i; + q.Enqueue(std::move(v)); + EXPECT_EQ(v.size(), 0); // check move + } + EXPECT_EQ(q.Size(), 65); + EXPECT_FALSE(q.IsEmpty()); + + // Basic dequeue + v = q.Dequeue(); + EXPECT_EQ(v[0], 0); + EXPECT_EQ(v.size(), iteration + 1); + + for (int i = 1; i != 65; ++i) { + v = q.Dequeue(); + EXPECT_EQ(v[i], i); + EXPECT_EQ(v.size(), i + 1); + } + EXPECT_EQ(v[64], 64); + EXPECT_EQ(v.size(), 65); + EXPECT_TRUE(q.IsEmpty()); + } +} + +TEST(RWQueue,ContainerZeroCapacity) +{ + // Zero capacity + EXPECT_DEBUG_DEATH({ RWQueue q(0); }, ""); +} + +void rw_consume_container(RWQueue *q, const size_t *max_depth) +{ + container_t v; + for (int i = 0; i != iterations; ++i) { + EXPECT_TRUE(q->Size() <= *max_depth); + v = q->Dequeue(); + EXPECT_EQ(v[i], i); + EXPECT_EQ(v.size(), i + 1); + } +} + +void rw_produce_copy_container(RWQueue *q, const size_t *max_depth) +{ + for (int i = 0; i != iterations; ++i) { + container_t v(i + 1); + v[i] = i; + q->Enqueue(v); + EXPECT_EQ(v.size(), i + 1); // check copy + EXPECT_TRUE(q->Size() <= *max_depth); + } +} + +void rw_produce_move_container(RWQueue *q, const size_t *max_depth) +{ + for (int i = 0; i != iterations; ++i) { + container_t v(i + 1); + v[i] = i; + q->Enqueue(std::move(v)); + EXPECT_EQ(v.size(), 0); // check move + EXPECT_TRUE(q->Size() <= *max_depth); + } +} + +TEST(RWQueue,ContainerCopyAsync) +{ + const size_t max_depth = 8; + RWQueue q(max_depth); + + std::thread writer(rw_produce_copy_container, &q, &max_depth); + std::thread reader(rw_consume_container, &q, &max_depth); + + writer.join(); + reader.join(); + + // Make sure we've consumed all produced items and the queue is empty + EXPECT_EQ(q.Size(), 0); +} + +TEST(RWQueue,ContainerMoveAsync) +{ + const size_t max_depth = 8; + RWQueue q(max_depth); + + std::thread writer(rw_produce_move_container, &q, &max_depth); + std::thread reader(rw_consume_container, &q, &max_depth); + + writer.join(); + reader.join(); + + // Make sure we've consumed all produced items and the queue is empty + EXPECT_EQ(q.Size(), 0); +} + +} // namespace diff -Nru dosbox-staging-0.76.0/tests/setup_tests.cpp dosbox-staging-0.77.0/tests/setup_tests.cpp --- dosbox-staging-0.76.0/tests/setup_tests.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/setup_tests.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,101 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "setup.h" + +#include + +#include + +namespace { + +const parse_environ_result_t expected_empty{}; + +TEST(ParseEnv, NoRelevantEnvVariables) +{ + const char *test_environ[] = {"FOO=foo", "BAR=bar", "BAZ=baz", nullptr}; + + EXPECT_EQ(expected_empty, parse_environ(test_environ)); +} + +TEST(ParseEnv, SingleValueInEnv) +{ + const char *test_environ[] = { + "SOME_NAME=value", + "DOSBOX_SECTIONNAME_PROPNAME=value", + "OTHER_NAME=other_value", + nullptr + }; + parse_environ_result_t expected{{"SECTIONNAME", "PROPNAME=value"}}; + + EXPECT_EQ(expected, parse_environ(test_environ)); +} + +TEST(ParseEnv, PropertyOrValueCanHaveUnderscores) +{ + const char *test_environ[] = { + "DOSBOX_sec_prop_name=value", + "DOSBOX_sec_prop=value_name", + nullptr + }; + parse_environ_result_t expected{{"sec", "prop_name=value"}, + {"sec", "prop=value_name"}}; + + EXPECT_EQ(expected, parse_environ(test_environ)); +} + +TEST(ParseEnv, SelectVarsBasedOnPrefix) +{ + const char *test_environ[] = { + "DOSBOX_sec_prop1=value1", + "dosbox_sec_prop2=value2", + "DOSBox_sec_prop3=value3", + "dOsBoX_sec_prop4=value4", + "non_dosbox_sec_prop=val", + nullptr + }; + + EXPECT_EQ(4, parse_environ(test_environ).size()); +} + +TEST(ParseEnv, FilterOutEmptySection) +{ + const char *test_environ[] = { + "DOSBOX=value", + "DOSBOX_=value", + "DOSBOX__prop=value", + nullptr + }; + + EXPECT_EQ(expected_empty, parse_environ(test_environ)); +} + +TEST(ParseEnv, FilterOutEmptyPropname) +{ + const char *test_environ[] = { + "DOSBOX_sec=value", + "DOSBOX_sec_=value", + nullptr + }; + + EXPECT_EQ(expected_empty, parse_environ(test_environ)); +} + +} // namespace diff -Nru dosbox-staging-0.76.0/tests/soft_limiter.cpp dosbox-staging-0.77.0/tests/soft_limiter.cpp --- dosbox-staging-0.76.0/tests/soft_limiter.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/soft_limiter.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,319 +0,0 @@ -/* - * SPDX-License-Identifier: GPL-2.0-or-later - * - * Copyright (C) 2020-2020 The dosbox-staging team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "soft_limiter.h" - -#include - -namespace { - -TEST(SoftLimiter, InboundsProcessAllFrames) -{ - constexpr int frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-3, -2, -1, 0, 1, 2}; - - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected{-3, -2, -1, 0, 1, 2}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, InboundsProcessPartialFrames) -{ - const auto frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-3, -2, -1, 0, 1, 2}; - - SoftLimiter::out_array_t out = limiter.Apply(in, 1); - const SoftLimiter::out_array_t expected{-3, -2}; - EXPECT_EQ(out[0], expected[0]); - EXPECT_EQ(out[1], expected[1]); -} - -TEST(SoftLimiter, InboundsProcessTooManyFrames) -{ - const auto frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-3, -2, -1, 0, 1, 2}; - EXPECT_DEBUG_DEATH({ limiter.Apply(in, frames + 1); }, ""); -} - -TEST(SoftLimiter, OutOfBoundsLeftChannel) -{ - const auto frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-8.1f, 32000.0f, 65535.0f, - 32000.0f, 4.1f, 32000.0f}; - - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected{-4, 32000, 32766, - 32000, 2, 32000}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutOfBoundsRightChannel) -{ - const auto frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{32000.0f, -3.1f, 32000.0f, - 98304.1f, 32000.0f, 6.1f}; - - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected{32000, -1, 32000, - 32765, 32000, 2}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsBothChannelsPositive) -{ - const auto frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-8.1f, -3.1f, 65535.0f, - 98304.1f, 4.1f, 6.1f}; - - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected{-4, -1, 32766, - 32765, 2, 2}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsBothChannelsNegative) -{ - const auto frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-8.1f, -3.1f, -65535.0f, - -98304.1f, 4.1f, 6.1f}; - - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected{-4, -1, -32766, - -32765, 2, 2}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsBothChannelsMixed) -{ - const auto frames = 3; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{40000.0f, -40000.0f, - 65534.0f, -98301.0f, - 40000.0f, -40000.0f}; - - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected{19999, -13332, 32766, - -32766, 19999, -13332}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsBigOneReleaseStep) -{ - const auto frames = 1; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - SoftLimiter::in_array_t in{-60000.0f, 80000.0f}; - SoftLimiter::out_array_t out = limiter.Apply(in, 1); - - in[0] = static_cast(out[0]); - in[1] = static_cast(out[1]); - out = limiter.Apply(in, frames); - - const SoftLimiter::out_array_t expected{-17920, 13434}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsBig600ReleaseSteps) -{ - const auto frames = 1; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - SoftLimiter::in_array_t in{-60000.0f, 80000.0f}; - SoftLimiter::out_array_t out; - - for (int i = 0; i < 600; ++i) { - out = limiter.Apply(in, frames); - in[0] = -32767; - in[1] = 32768; - } - const SoftLimiter::out_array_t expected{-32766, 32766}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsSmallTwoReleaseSteps) -{ - const auto frames = 1; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - SoftLimiter::in_array_t in{-32800.0f, 32800.0f}; - SoftLimiter::out_array_t out; - for (int i = 0; i < 2; ++i) { - out = limiter.Apply(in, frames); - in[0] = -32767; - in[1] = 32767; - } - const SoftLimiter::out_array_t expected{-32766, 32766}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsSmallTenReleaseSteps) -{ - const auto frames = 1; - const AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - SoftLimiter::in_array_t in{-32800.0f, 32800.0f}; - SoftLimiter::out_array_t out{}; - - for (int i = 0; i < 10; ++i) { - out = limiter.Apply(in, frames); - in[0] = -32767; - in[1] = 32768; - } - const SoftLimiter::out_array_t expected{-32766, 32766}; - EXPECT_EQ(out, expected); -} - -TEST(SoftLimiter, OutboundsPolyJoinPositive) -{ - const auto frames = 3; - AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - - const SoftLimiter::in_array_t first_chunk{18000, 18000, 20000, - 20000, 22000, 22000}; - SoftLimiter::out_array_t out = limiter.Apply(first_chunk, frames); - const SoftLimiter::out_array_t expected_first{18000, 18000, - 20000, 20000, - 22000, 22000}; - EXPECT_EQ(out, expected_first); - - const SoftLimiter::in_array_t second_chunk{30000, 30000, 60000, - 60000, 30000, 30000}; - out = limiter.Apply(second_chunk, frames); - - const SoftLimiter::out_array_t expected_second{24266, 24266, - 32766, 32766, - 16383, 16383}; - EXPECT_EQ(out, expected_second); -} - -TEST(SoftLimiter, OutboundsPolyJoinNegative) -{ - const auto frames = 3; - AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - - const SoftLimiter::in_array_t first_chunk{-18000, -18000, - -20000, -20000, - -22000, -22000}; - SoftLimiter::out_array_t out = limiter.Apply(first_chunk, frames); - const SoftLimiter::out_array_t expected_first{-18000, -18000, - -20000, -20000, - -22000, -22000}; - EXPECT_EQ(out, expected_first); - - const SoftLimiter::in_array_t second_chunk{-30000, -30000, - -60000, -60000, - -30000, -30000}; - out = limiter.Apply(second_chunk, frames); - - const SoftLimiter::out_array_t expected_second{-24266, -24266, - -32766, -32766, - -16383, -16383}; - EXPECT_EQ(out, expected_second); -} - -TEST(SoftLimiter, OutboundsJoinWithZeroCross) -{ - const auto frames = 6; - AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - - const SoftLimiter::in_array_t first_chunk{-5000, 1000, -3000, - 1000, -1000, 1000, - 0, 1000, 3000, - 1000, 5000, 1000}; - SoftLimiter::out_array_t out = limiter.Apply(first_chunk, frames); - - const SoftLimiter::in_array_t second_chunk{ - 15000, 1000, 25000, 1000, 32000, 1000, - 0, 1000, -15000, 1000, -40000, 1000}; - out = limiter.Apply(second_chunk, frames); - - const SoftLimiter::out_array_t expected_second{ - 12287, 1000, 20478, 1000, 26212, 1000, - 0, 1000, -12287, 1000, -32765, 1000}; - EXPECT_EQ(out, expected_second); - - const SoftLimiter::in_array_t third_chunk{ - -25000, 1000, -15000, 1000, -10000, 1000, - -5000, 1000, 0, 1000, 3000, 1000}; - out = limiter.Apply(third_chunk, frames); - - const SoftLimiter::out_array_t expected_third{ - -20524, 1000, -12314, 1000, -8209, 1000, - -4104, 1000, 0, 1000, 2462, 1000}; - EXPECT_EQ(out, expected_third); -} - -TEST(SoftLimiter, PrescaleAttenuate) -{ - const auto frames = 1; - AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-30000.1f, 30000.0f}; - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected_first{-30000, 30000}; - EXPECT_EQ(out, expected_first); - - // The limiter holds a reference to the prescaling struct so it can - // be adjusted on-the-fly via callback. We simulate this callback here. - prescale.left = 0.5f; - prescale.right = 0.1f; - out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected_scaled{-15000, 3000}; - EXPECT_EQ(out, expected_scaled); -} - -TEST(SoftLimiter, PrescaleAmplify) -{ - const auto frames = 1; - AudioFrame prescale{1, 1}; - SoftLimiter limiter("test-channel", prescale); - const SoftLimiter::in_array_t in{-10000.1f, 10000.0f}; - SoftLimiter::out_array_t out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected_first{-10000, 10000}; - EXPECT_EQ(out, expected_first); - - // The limiter holds a reference to the prescaling struct so it can - // be adjusted on-the-fly via callback. We simulate this callback here. - prescale.left = 1.5f; - prescale.right = 1.1f; - out = limiter.Apply(in, frames); - const SoftLimiter::out_array_t expected_scaled{-15000, 11000}; - EXPECT_EQ(out, expected_scaled); -} - -} // namespace diff -Nru dosbox-staging-0.76.0/tests/soft_limiter_tests.cpp dosbox-staging-0.77.0/tests/soft_limiter_tests.cpp --- dosbox-staging-0.76.0/tests/soft_limiter_tests.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/soft_limiter_tests.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,326 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "soft_limiter.h" + +#include + +namespace { + +TEST(SoftLimiter, InboundsProcessAllFrames) +{ + constexpr int frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{-3, -2, -1, 0, 1, 2}; + + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected{-3, -2, -1, 0, 1, 2}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, InboundsProcessPartialFrames) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{-3, -2, -1, 0, 1, 2}; + + std::vector out(frames * 2); + limiter.Process(in, 1, out); + const std::vector expected{-3, -2}; + EXPECT_EQ(out[0], expected[0]); + EXPECT_EQ(out[1], expected[1]); +} + +TEST(SoftLimiter, InboundsProcessTooManyFrames) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{-3, -2, -1, 0, 1, 2}; + std::vector out(frames * 2); +#ifdef _GLIBCXX_ASSERTIONS + EXPECT_DEATH({ limiter.Process(in, frames + 1, out); }, ""); +#else + EXPECT_DEBUG_DEATH({ limiter.Process(in, frames + 1, out); }, ""); +#endif +} + +TEST(SoftLimiter, OutOfBoundsLeftChannel) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{-8.1f, 32000.0f, 65535.0f, + 32000.0f, 4.1f, 32000.0f}; + + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected{-4, 32000, 32766, 32000, 2, 32000}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutOfBoundsRightChannel) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{32000.0f, -3.1f, 32000.0f, + 98304.1f, 32000.0f, 6.1f}; + + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected{32000, -1, 32000, 32765, 32000, 2}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsBothChannelsPositive) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{-8.1f, -3.1f, 65535.0f, + 98304.1f, 4.1f, 6.1f}; + + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected{-4, -1, 32766, 32765, 2, 2}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsBothChannelsNegative) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{-8.1f, -3.1f, -65535.0f, + -98304.1f, 4.1f, 6.1f}; + + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected{-4, -1, -32766, -32765, 2, 2}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsBothChannelsMixed) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + const std::vector in{40000.0f, -40000.0f, 65534.0f, + -98301.0f, 40000.0f, -40000.0f}; + + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected{19999, -13332, 32766, + -32766, 19999, -13332}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsBigOneReleaseStep) +{ + const auto frames = 1; + SoftLimiter limiter("test-channel"); + std::vector in{-60000.0f, 80000.0f}; + std::vector out(frames * 2); + limiter.Process(in, 1, out); + + in[0] = static_cast(out[0]); + in[1] = static_cast(out[1]); + limiter.Process(in, frames, out); + + const std::vector expected{-17920, 13434}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsBig600ReleaseSteps) +{ + const auto frames = 1; + SoftLimiter limiter("test-channel"); + std::vector in{-60000.0f, 80000.0f}; + std::vector out(frames * 2); + + for (int i = 0; i < 600; ++i) { + limiter.Process(in, frames, out); + in[0] = -32767; + in[1] = 32768; + } + const std::vector expected{-32766, 32766}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsSmallTwoReleaseSteps) +{ + const auto frames = 1; + SoftLimiter limiter("test-channel"); + std::vector in{-32800.0f, 32800.0f}; + std::vector out(frames * 2); + for (int i = 0; i < 2; ++i) { + limiter.Process(in, frames, out); + in[0] = -32767; + in[1] = 32767; + } + const std::vector expected{-32766, 32766}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsSmallTenReleaseSteps) +{ + const auto frames = 1; + SoftLimiter limiter("test-channel"); + std::vector in{-32800.0f, 32800.0f}; + std::vector out(frames * 2); + + for (int i = 0; i < 10; ++i) { + limiter.Process(in, frames, out); + in[0] = -32767; + in[1] = 32768; + } + const std::vector expected{-32766, 32766}; + EXPECT_EQ(out, expected); +} + +TEST(SoftLimiter, OutboundsPolyJoinPositive) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + + const std::vector first_chunk{18000, 18000, 20000, + 20000, 22000, 22000}; + std::vector out(frames * 2); + limiter.Process(first_chunk, frames, out); + const std::vector expected_first{18000, 18000, 20000, + 20000, 22000, 22000}; + EXPECT_EQ(out, expected_first); + + const std::vector second_chunk{30000, 30000, 60000, + 60000, 30000, 30000}; + limiter.Process(second_chunk, frames, out); + + const std::vector expected_second{24266, 24266, 32766, + 32766, 16383, 16383}; + EXPECT_EQ(out, expected_second); +} + +TEST(SoftLimiter, OutboundsPolyJoinNegative) +{ + const auto frames = 3; + SoftLimiter limiter("test-channel"); + + const std::vector first_chunk{-18000, -18000, -20000, + -20000, -22000, -22000}; + std::vector out(frames * 2); + limiter.Process(first_chunk, frames, out); + const std::vector expected_first{-18000, -18000, -20000, + -20000, -22000, -22000}; + EXPECT_EQ(out, expected_first); + + const std::vector second_chunk{-30000, -30000, -60000, + -60000, -30000, -30000}; + limiter.Process(second_chunk, frames, out); + + const std::vector expected_second{-24266, -24266, -32766, + -32766, -16383, -16383}; + EXPECT_EQ(out, expected_second); +} + +TEST(SoftLimiter, OutboundsJoinWithZeroCross) +{ + const auto frames = 6; + SoftLimiter limiter("test-channel"); + + const std::vector first_chunk{-5000, 1000, -3000, 1000, + -1000, 1000, 0, 1000, + 3000, 1000, 5000, 1000}; + std::vector out(frames * 2); + limiter.Process(first_chunk, frames, out); + + const std::vector second_chunk{15000, 1000, 25000, 1000, + 32000, 1000, 0, 1000, + -15000, 1000, -40000, 1000}; + limiter.Process(second_chunk, frames, out); + + const std::vector expected_second{12287, 1000, 20478, 1000, + 26212, 1000, 0, 1000, + -12287, 1000, -32765, 1000}; + EXPECT_EQ(out, expected_second); + + const std::vector third_chunk{-25000, 1000, -15000, 1000, + -10000, 1000, -5000, 1000, + 0, 1000, 3000, 1000}; + limiter.Process(third_chunk, frames, out); + + const std::vector expected_third{-20524, 1000, -12314, 1000, + -8209, 1000, -4104, 1000, + 0, 1000, 2462, 1000}; + EXPECT_EQ(out, expected_third); +} + +TEST(SoftLimiter, ScaleAttenuate) +{ + const auto frames = 1; + SoftLimiter limiter("test-channel"); + const std::vector in{-30000.1f, 30000.0f}; + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected_first{-30000, 30000}; + EXPECT_EQ(out, expected_first); + + // The limiter holds a reference to the prescaling struct so it can + // be adjusted on-the-fly via callback. We simulate this callback here. + AudioFrame levels = {0.5f, 0.1f}; + const float range_multiplier = 1.0f; + limiter.UpdateLevels(levels, range_multiplier); + limiter.Process(in, frames, out); + const std::vector expected_scaled{-15000, 3000}; + EXPECT_EQ(out, expected_scaled); +} + +TEST(SoftLimiter, ScaleAmplify) +{ + const auto frames = 1; + SoftLimiter limiter("test-channel"); + const std::vector in{-10000.1f, 10000.0f}; + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected_first{-10000, 10000}; + EXPECT_EQ(out, expected_first); + + // The limiter holds a reference to the prescaling struct so it can + // be adjusted on-the-fly via callback. We simulate this callback here. + AudioFrame levels = {1.5f, 1.1f}; + const float range_multiplier = 1.0f; + limiter.UpdateLevels(levels, range_multiplier); + limiter.Process(in, frames, out); + const std::vector expected_scaled{-15000, 11000}; + EXPECT_EQ(out, expected_scaled); +} + +TEST(SoftLimiter, RangeMultiply) +{ + const auto frames = 1; + SoftLimiter limiter("test-channel"); + + AudioFrame levels = {1, 1}; + const float range_multiplier = 2; + limiter.UpdateLevels(levels, range_multiplier); + + const std::vector in{-10000.1f, 10000.0f}; + std::vector out(frames * 2); + limiter.Process(in, frames, out); + const std::vector expected{-20000, 20000}; + EXPECT_EQ(out, expected); +} + +} // namespace diff -Nru dosbox-staging-0.76.0/tests/string_utils.cpp dosbox-staging-0.77.0/tests/string_utils.cpp --- dosbox-staging-0.76.0/tests/string_utils.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/string_utils.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -/* - * SPDX-License-Identifier: GPL-2.0-or-later - * - * Copyright (C) 2020-2020 The dosbox-staging team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "string_utils.h" - -#include - -#include - -namespace { - -TEST(StartsWith, Prefix) -{ - EXPECT_TRUE(starts_with("ab", "abcd")); - EXPECT_TRUE(starts_with("ab", std::string{"abcd"})); -} - -TEST(StartsWith, NotPrefix) -{ - EXPECT_FALSE(starts_with("xy", "abcd")); - EXPECT_FALSE(starts_with("xy", std::string{"abcd"})); -} - -TEST(StartsWith, TooLongPrefix) -{ - EXPECT_FALSE(starts_with("abcd", "ab")); - EXPECT_FALSE(starts_with("abcd", std::string{"ab"})); -} - -TEST(StartsWith, EmptyPrefix) -{ - EXPECT_TRUE(starts_with("", "abcd")); - EXPECT_TRUE(starts_with("", std::string{"abcd"})); -} - -TEST(StartsWith, EmptyString) -{ - EXPECT_FALSE(starts_with("ab", "")); - EXPECT_FALSE(starts_with("ab", std::string{""})); -} - -} // namespace diff -Nru dosbox-staging-0.76.0/tests/string_utils_tests.cpp dosbox-staging-0.77.0/tests/string_utils_tests.cpp --- dosbox-staging-0.76.0/tests/string_utils_tests.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/string_utils_tests.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "string_utils.h" + +#include + +#include + +#include "support.h" + +namespace { + +TEST(StartsWith, Prefix) +{ + EXPECT_TRUE(starts_with("ab", "abcd")); + EXPECT_TRUE(starts_with("ab", std::string{"abcd"})); +} + +TEST(StartsWith, NotPrefix) +{ + EXPECT_FALSE(starts_with("xy", "abcd")); + EXPECT_FALSE(starts_with("xy", std::string{"abcd"})); +} + +TEST(StartsWith, TooLongPrefix) +{ + EXPECT_FALSE(starts_with("abcd", "ab")); + EXPECT_FALSE(starts_with("abcd", std::string{"ab"})); +} + +TEST(StartsWith, EmptyPrefix) +{ + EXPECT_TRUE(starts_with("", "abcd")); + EXPECT_TRUE(starts_with("", std::string{"abcd"})); +} + +TEST(StartsWith, EmptyString) +{ + EXPECT_FALSE(starts_with("ab", "")); + EXPECT_FALSE(starts_with("ab", std::string{""})); +} + +TEST(SafeSprintF, PreventOverflow) +{ + char buf[3]; + const int full_msg_len = safe_sprintf(buf, "%d", 98765); + EXPECT_EQ(buf[0], '9'); + EXPECT_EQ(buf[1], '8'); + EXPECT_EQ(buf[2], '\0'); + EXPECT_EQ(full_msg_len, 5); +} + +TEST(SafeSprintF, PreventUnderflow) +{ + char buf[10]; + const int full_msg_len = safe_sprintf(buf, "%d", 987); + EXPECT_STREQ(buf, "987"); + EXPECT_EQ(full_msg_len, 3); +} + +TEST(SafeStrcpy, SimpleCopy) +{ + char buffer[10] = ""; + char *ret_value = safe_strcpy(buffer, "abc"); + EXPECT_EQ(ret_value, &buffer[0]); + EXPECT_STREQ("abc", buffer); +} + +TEST(SafeStrcpy, CopyFromNonArray) +{ + char buffer[10] = ""; + std::string str = "abc"; + EXPECT_STREQ("abc", safe_strcpy(buffer, str.c_str())); +} + +TEST(SafeStrcpy, EmptyStringOverwrites) +{ + char buffer[4] = "abc"; + EXPECT_STREQ("", safe_strcpy(buffer, "")); +} + +TEST(SafeStrcpy, StringLongerThanBuffer) +{ + char buffer[5] = ""; + char long_input[] = "1234567890"; + ASSERT_LT(ARRAY_LEN(buffer), strlen(long_input)); + EXPECT_STREQ("1234", safe_strcpy(buffer, long_input)); +} + +TEST(SafeStrcpyDeathTest, PassNull) +{ + char buf[] = "12345678"; + EXPECT_DEBUG_DEATH({ safe_strcpy(buf, nullptr); }, ""); +} + +TEST(SafeStrcpyDeathTest, ProtectFromCopyingOverlappingString) +{ + char buf[] = "12345678"; + char *overlapping = &buf[2]; + ASSERT_LE(buf, overlapping); + ASSERT_LE(overlapping, buf + ARRAY_LEN(buf)); + EXPECT_DEBUG_DEATH({ safe_strcpy(buf, overlapping); }, ""); +} + +} // namespace diff -Nru dosbox-staging-0.76.0/tests/stubs.cpp dosbox-staging-0.77.0/tests/stubs.cpp --- dosbox-staging-0.76.0/tests/stubs.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/stubs.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2021-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "dosbox.h" + +#include "control.h" +#include "logging.h" + +// This global variable should be setup/torn down per test. +Config *control = nullptr; + +// During testing we never want to log to stdout/stderr, as it could +// negatively affect test harness. +void GFX_ShowMsg(const char *, ...) {} +void DEBUG_ShowMsg(const char *, ...) {} + +void DEBUG_HeavyWriteLogInstruction(){} +void MSG_Add(const char *, const char *){} +const char *MSG_Get(char const *) +{ + return nullptr; +} + diff -Nru dosbox-staging-0.76.0/tests/support.cpp dosbox-staging-0.77.0/tests/support.cpp --- dosbox-staging-0.76.0/tests/support.cpp 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/tests/support.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -/* - * SPDX-License-Identifier: GPL-2.0-or-later - * - * Copyright (C) 2020-2020 The dosbox-staging team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "support.h" - -#include - -#include - -namespace { - -TEST(SafeStrcpy, SimpleCopy) -{ - char buffer[10] = ""; - char *ret_value = safe_strcpy(buffer, "abc"); - EXPECT_EQ(ret_value, &buffer[0]); - EXPECT_STREQ("abc", buffer); -} - -TEST(SafeStrcpy, CopyFromNonArray) -{ - char buffer[10] = ""; - std::string str = "abc"; - EXPECT_STREQ("abc", safe_strcpy(buffer, str.c_str())); -} - -TEST(SafeStrcpy, EmptyStringOverwrites) -{ - char buffer[4] = "abc"; - EXPECT_STREQ("", safe_strcpy(buffer, "")); -} - -TEST(SafeStrcpy, StringLongerThanBuffer) -{ - char buffer[5] = ""; - char long_input[] = "1234567890"; - ASSERT_LT(ARRAY_LEN(buffer), strlen(long_input)); - EXPECT_STREQ("1234", safe_strcpy(buffer, long_input)); -} - -TEST(SafeStrcpyDeathTest, PassNull) -{ - char buf[] = "12345678"; - EXPECT_DEBUG_DEATH({ safe_strcpy(buf, nullptr); }, ""); -} - -TEST(SafeStrcpyDeathTest, ProtectFromCopyingOverlappingString) -{ - char buf[] = "12345678"; - char *overlapping = &buf[2]; - ASSERT_LE(buf, overlapping); - ASSERT_LE(overlapping, buf + ARRAY_LEN(buf)); - EXPECT_DEBUG_DEATH({ safe_strcpy(buf, overlapping); }, ""); -} - -TEST(DriveIndex, DriveA) -{ - EXPECT_EQ(0, drive_index('a')); - EXPECT_EQ(0, drive_index('A')); -} - -TEST(DriveIndex, DriveZ) -{ - EXPECT_EQ(25, drive_index('z')); - EXPECT_EQ(25, drive_index('Z')); -} - -} // namespace diff -Nru dosbox-staging-0.76.0/tests/support_tests.cpp dosbox-staging-0.77.0/tests/support_tests.cpp --- dosbox-staging-0.76.0/tests/support_tests.cpp 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/support_tests.cpp 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,384 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (C) 2020-2021 The DOSBox Staging Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "support.h" + +#include +#include + +#include +#include + +namespace { + +TEST(DriveIndex, DriveA) +{ + EXPECT_EQ(0, drive_index('a')); + EXPECT_EQ(0, drive_index('A')); +} + +TEST(DriveIndex, DriveZ) +{ + EXPECT_EQ(25, drive_index('z')); + EXPECT_EQ(25, drive_index('Z')); +} + +TEST(Support_split_delim, NoBoundingDelims) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split("a:/b:/c/d:/e/f/", ':'), expected); + EXPECT_EQ(split("a /b /c/d /e/f/", ' '), expected); + EXPECT_EQ(split("abc", 'x'), std::vector{"abc"}); +} + +TEST(Support_split_delim, DelimAtStartNotEnd) +{ + const std::vector expected({"", "a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split(":a:/b:/c/d:/e/f/", ':'), expected); + EXPECT_EQ(split(" a /b /c/d /e/f/", ' '), expected); +} + +TEST(Support_split_delim, DelimAtEndNotStart) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/", ""}); + EXPECT_EQ(split("a:/b:/c/d:/e/f/:", ':'), expected); + EXPECT_EQ(split("a /b /c/d /e/f/ ", ' '), expected); +} + +TEST(Support_split_delim, DelimsAtBoth) +{ + const std::vector expected({"", "a", "/b", "/c/d", "/e/f/", ""}); + EXPECT_EQ(split(":a:/b:/c/d:/e/f/:", ':'), expected); + EXPECT_EQ(split(" a /b /c/d /e/f/ ", ' '), expected); +} + +TEST(Support_split_delim, MultiInternalDelims) +{ + const std::vector expected( + {"a", "/b", "", "/c/d", "", "", "/e/f/"}); + EXPECT_EQ(split("a:/b::/c/d:::/e/f/", ':'), expected); + EXPECT_EQ(split("a /b /c/d /e/f/", ' '), expected); +} + +TEST(Support_split_delim, MultiBoundingDelims) +{ + const std::vector expected( + {"", "", "a", "/b", "/c/d", "/e/f/", "", "", ""}); + EXPECT_EQ(split("::a:/b:/c/d:/e/f/:::", ':'), expected); + EXPECT_EQ(split(" a /b /c/d /e/f/ ", ' '), expected); +} + +TEST(Support_split_delim, MixedDelims) +{ + const std::vector expected( + {"", "", "a", "/b", "", "/c/d", "/e/f/"}); + EXPECT_EQ(split("::a:/b::/c/d:/e/f/", ':'), expected); + EXPECT_EQ(split(" a /b /c/d /e/f/", ' '), expected); +} + +TEST(Support_split_delim, Empty) +{ + const std::vector empty; + const std::vector two({"", ""}); + const std::vector three({"", "", ""}); + + EXPECT_EQ(split("", ':'), empty); + EXPECT_EQ(split(":", ':'), two); + EXPECT_EQ(split("::", ':'), three); + EXPECT_EQ(split("", ' '), empty); + EXPECT_EQ(split(" ", ' '), two); + EXPECT_EQ(split(" ", ' '), three); +} + +TEST(Support_split, NoBoundingWhitespace) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split("a /b /c/d /e/f/"), expected); + EXPECT_EQ(split("abc"), std::vector{"abc"}); +} +TEST(Support_split, WhitespaceAtStartNotEnd) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split(" a /b /c/d /e/f/"), expected); +} + +TEST(Support_split, WhitespaceAtEndNotStart) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split("a /b /c/d /e/f/ "), expected); +} + +TEST(Support_split, WhitespaceAtBoth) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split(" a /b /c/d /e/f/ "), expected); +} + +TEST(Support_split, MultiInternalWhitespace) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split("a /b /c/d /e/f/"), expected); +} + +TEST(Support_split, MultiBoundingWhitespace) +{ + const std::vector expected({"a", "/b", "/c/d", "/e/f/"}); + EXPECT_EQ(split(" a /b /c/d /e/f/ "), expected); +} + +TEST(Support_split, MixedWhitespace) +{ + const std::vector expected({"a", "b", "c"}); + EXPECT_EQ(split("\t\na\f\vb\rc"), expected); + EXPECT_EQ(split("a\tb\f\vc"), expected); + EXPECT_EQ(split(" a \n \v \r b \f \r c "), expected); +} + +TEST(Support_split, Empty) +{ + const std::vector empty; + EXPECT_EQ(split(""), empty); + EXPECT_EQ(split(" "), empty); + EXPECT_EQ(split(" "), empty); +} + +TEST(Support_next_int, Signed) +{ + // 8-bit types should upgrade to int16_t + EXPECT_EQ(typeid(next_int_t), typeid(int16_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int16_t)); + + ASSERT_TRUE(sizeof(char) == 1); + EXPECT_EQ(typeid(next_int_t), typeid(int16_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int16_t)); + + // 16-bit types should upgrade to int32_t + EXPECT_EQ(typeid(next_int_t), typeid(int32_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int32_t)); + + ASSERT_TRUE(sizeof(short) == 2); + EXPECT_EQ(typeid(next_int_t), typeid(int32_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int32_t)); + + // 32-bit types should upgrade to int64_t + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); + + ASSERT_TRUE(sizeof(int) == 4); + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); + + // 64-bit types should remain at parity with int64_t + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); + + ASSERT_TRUE(sizeof(long int) >= 4); + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); + EXPECT_EQ(typeid(next_int_t), typeid(int64_t)); +} + +TEST(Support_next_int, SignedInvalid) +{ + // 8-bit types should not upgrade to int8_t, int32_t, or int64_t + EXPECT_NE(typeid(next_int_t), typeid(int8_t)); + EXPECT_NE(typeid(next_int_t), typeid(int32_t)); + EXPECT_NE(typeid(next_int_t), typeid(int64_t)); + + // 16-bit types should not upgrade to int8_t, int16_t, or int64_t + EXPECT_NE(typeid(next_int_t), typeid(int8_t)); + EXPECT_NE(typeid(next_int_t), typeid(int16_t)); + EXPECT_NE(typeid(next_int_t), typeid(int64_t)); + + // 32-bit types should not upgrade to int8_t, int16_t, or int32_t + EXPECT_NE(typeid(next_int_t), typeid(int8_t)); + EXPECT_NE(typeid(next_int_t), typeid(int16_t)); + EXPECT_NE(typeid(next_int_t), typeid(int32_t)); + + // 64-bit types should not upgrade to int8_t, int16_t, or int32_t + EXPECT_NE(typeid(next_int_t), typeid(int8_t)); + EXPECT_NE(typeid(next_int_t), typeid(int16_t)); + EXPECT_NE(typeid(next_int_t), typeid(int32_t)); +} + +TEST(Support_next_uint, Unsigned) +{ + // 8-bit types should upgrade to uint16_t + EXPECT_EQ(typeid(next_uint_t), typeid(uint16_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint16_t)); + + ASSERT_TRUE(sizeof(char) == 1); + EXPECT_EQ(typeid(next_uint_t), typeid(uint16_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint16_t)); + + // 16-bit types should upgrade to uint32_t + EXPECT_EQ(typeid(next_uint_t), typeid(uint32_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint32_t)); + + ASSERT_TRUE(sizeof(short) == 2); + EXPECT_EQ(typeid(next_uint_t), typeid(uint32_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint32_t)); + + // 32-bit types should upgrade to uint64_t + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); + + ASSERT_TRUE(sizeof(int) == 4); + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); + + // 64-bit types should remain at parity with uint64_t + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); + + ASSERT_TRUE(sizeof(long int) >= 4); + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); + EXPECT_EQ(typeid(next_uint_t), typeid(uint64_t)); +} + +TEST(Support_next_uint, UnsignedInvalid) +{ + // 8-bit types should not upgrade to uint8_t, uint32_t, or uint64_t + EXPECT_NE(typeid(next_uint_t), typeid(uint8_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint32_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint64_t)); + + // 16-bit types should not upgrade to uint8_t, uint16_t, or uint64_t + EXPECT_NE(typeid(next_uint_t), typeid(uint8_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint16_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint64_t)); + + // 32-bit types should not upgrade to uint8_t, uint16_t, or uint32_t + EXPECT_NE(typeid(next_uint_t), typeid(uint8_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint16_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint32_t)); + + // 64-bit types should not upgrade to uint8_t, uint16_t, or uint32_t + EXPECT_NE(typeid(next_uint_t), typeid(uint8_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint16_t)); + EXPECT_NE(typeid(next_uint_t), typeid(uint32_t)); +} + +TEST(Support_left_shift_signed, Positive) +{ + // shifting zero ... + int8_t var_8bit = 0; + int16_t var_16bit = 0; + int32_t var_32bit = 0; + // by zero + EXPECT_EQ(left_shift_signed(var_8bit, 0), 0); + EXPECT_EQ(left_shift_signed(var_16bit, 0), 0); + EXPECT_EQ(left_shift_signed(var_32bit, 0), 0); + + // shifting one ... + var_8bit = 1; + var_16bit = 1; + var_32bit = 1; + + // by four + EXPECT_EQ(left_shift_signed(var_8bit, 4), 16); + EXPECT_EQ(left_shift_signed(var_16bit, 4), 16); + EXPECT_EQ(left_shift_signed(var_32bit, 4), 16); + + // by max signed bits + EXPECT_EQ(left_shift_signed(var_8bit, 6), 64); + EXPECT_EQ(left_shift_signed(var_16bit, 14), 16384); + EXPECT_EQ(left_shift_signed(var_32bit, 30), 1073741824); + + // max shiftable value before overflow + var_8bit = INT8_MAX / 2; + var_16bit = INT16_MAX / 2; + var_32bit = INT32_MAX / 2; + + EXPECT_EQ(left_shift_signed(var_8bit, 1), INT8_MAX - 1); + EXPECT_EQ(left_shift_signed(var_16bit, 1), INT16_MAX - 1); + EXPECT_EQ(left_shift_signed(var_32bit, 1), INT32_MAX - 1); +} + +TEST(Support_left_shift_signed, PositiveOverflow) +{ + int8_t var_8bit = INT8_MAX; + int16_t var_16bit = INT16_MAX; + int32_t var_32bit = INT32_MAX; + + EXPECT_DEBUG_DEATH({ left_shift_signed(var_8bit, 1); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_16bit, 1); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_32bit, 1); }, ""); + + var_8bit = 1; + var_16bit = 1; + var_32bit = 1; + + EXPECT_DEBUG_DEATH({ left_shift_signed(var_8bit, 7); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_16bit, 15); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_32bit, 31); }, ""); +} + +TEST(Support_left_shift_signed, Negative) +{ + // shifting negative one ... + int8_t var_8bit = -1; + int16_t var_16bit = -1; + int32_t var_32bit = -1; + + // by four + EXPECT_EQ(left_shift_signed(var_8bit, 4), -16); + EXPECT_EQ(left_shift_signed(var_16bit, 4), -16); + EXPECT_EQ(left_shift_signed(var_32bit, 4), -16); + + // by max signed bits + EXPECT_EQ(left_shift_signed(var_8bit, 7), INT8_MIN); + EXPECT_EQ(left_shift_signed(var_16bit, 15), INT16_MIN); + EXPECT_EQ(left_shift_signed(var_32bit, 31), INT32_MIN); + + // max shiftable value before overflow + var_8bit = INT8_MIN / 2; + var_16bit = INT16_MIN / 2; + var_32bit = INT32_MIN / 2; + + EXPECT_EQ(left_shift_signed(var_8bit, 1), INT8_MIN); + EXPECT_EQ(left_shift_signed(var_16bit, 1), INT16_MIN); + EXPECT_EQ(left_shift_signed(var_32bit, 1), INT32_MIN); +} + +TEST(Support_left_shift_signed, NegativeOverflow) +{ + int8_t var_8bit = INT8_MIN; + int16_t var_16bit = INT16_MIN; + int32_t var_32bit = INT32_MIN; + + EXPECT_DEBUG_DEATH({ left_shift_signed(var_8bit, 1); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_16bit, 1); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_32bit, 1); }, ""); + + var_8bit = -1; + var_16bit = -1; + var_32bit = -1; + + EXPECT_DEBUG_DEATH({ left_shift_signed(var_8bit, 8); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_16bit, 16); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_32bit, 32); }, ""); + + // Shift a negative number of bits + EXPECT_DEBUG_DEATH({ left_shift_signed(var_8bit, -1); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_16bit, -100); }, ""); + EXPECT_DEBUG_DEATH({ left_shift_signed(var_32bit, -10000); }, ""); +} + +} // namespace diff -Nru dosbox-staging-0.76.0/tests/vs/.gitignore dosbox-staging-0.77.0/tests/vs/.gitignore --- dosbox-staging-0.76.0/tests/vs/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/vs/.gitignore 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,9 @@ +# Visual Studio +.vs +Debug +Release +*.vcxproj.user +*.ncb +*.suo +Win32 +x64 diff -Nru dosbox-staging-0.76.0/tests/vs/tests.vcxproj dosbox-staging-0.77.0/tests/vs/tests.vcxproj --- dosbox-staging-0.76.0/tests/vs/tests.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/vs/tests.vcxproj 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,236 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {10F658E8-8DB0-4F7A-9B61-6272BB309144} + testsinvs + 10.0 + + + + Application + true + v142 + MultiByte + + + Application + false + v142 + MultiByte + + + Application + true + v142 + MultiByte + + + Application + false + v142 + MultiByte + + + + + + + + + + + + + + + + + + + + + ..\..\src\platform\visualc;..\..\include;$(IncludePath) + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + false + ..\..\include;$(ExternalIncludePath) + + + ..\..\src\platform\visualc;..\..\include;$(IncludePath) + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\..\include;$(ExternalIncludePath) + false + + + ..\..\src\platform\visualc;..\..\include;$(IncludePath) + $(LibraryPath) + $(Platform)\$(Configuration)\ + true + false + ..\..\include;$(ExternalIncludePath) + + + ..\..\src\platform\visualc;..\..\include;$(IncludePath) + $(Platform)\$(Configuration)\ + true + ..\..\include;$(ExternalIncludePath) + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + stdc11 + Speed + true + true + true + true + + + Console + gmock_maind.lib;%(AdditionalDependencies) + + + cd $(SolutionDir) +cd .. +$(TargetPath) + + Run tests + + + + + Level2 + true + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + stdc11 + Speed + true + Fast + false + true + Default + true + AssemblyAndSourceCode + + + Console + true + true + gmock_main.lib;%(AdditionalDependencies) + false + + + cd $(SolutionDir) +cd .. +$(TargetPath) + + Run tests + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + stdc11 + Speed + true + true + true + true + false + + + Console + gmock_maind.lib;%(AdditionalDependencies) + + + cd $(SolutionDir) +cd .. +$(TargetPath) + + Run tests + + + + + Level2 + true + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + stdc11 + Speed + true + Fast + false + true + true + Default + AssemblyAndSourceCode + + + Console + true + true + gmock_main.lib;%(AdditionalDependencies) + false + + + cd $(SolutionDir) +cd .. +$(TargetPath) + + Run tests + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru dosbox-staging-0.76.0/tests/vs/tests.vcxproj.filters dosbox-staging-0.77.0/tests/vs/tests.vcxproj.filters --- dosbox-staging-0.76.0/tests/vs/tests.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ dosbox-staging-0.77.0/tests/vs/tests.vcxproj.filters 2021-07-02 15:47:39.000000000 +0000 @@ -0,0 +1,67 @@ +ďťż + + + + {3560079a-d647-4de5-acc1-76ef66ab9dd2} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + + + tests + + + tests + + + tests + + + tests + + + tests + + + tests + + + tests + + + dosbox_sources + + + dosbox_sources + + + dosbox_sources + + + dosbox_sources + + + dosbox_sources + + + dosbox_sources + + + tests + + + + + + diff -Nru dosbox-staging-0.76.0/THANKS dosbox-staging-0.77.0/THANKS --- dosbox-staging-0.76.0/THANKS 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/THANKS 2021-07-02 15:47:39.000000000 +0000 @@ -1,16 +1,19 @@ We would like to thank: -Whole SDL2 team for quality cross-platform software. +The SDL2 team for their quality cross-platform software. David Reid for his MP3, FLAC, and WAV decoder libraries. Sean Barrett for his Vorbis decoder library. -Alexey Khokholov for perfect OPL3 emulator. +Alexey Khokholov for his perfect OPL3 emulator. Anton Shepelev for implementing pixel-perfect support. -Yann Collet for xxHash algorithm. +Yann Collet for the xxHash algorithm. jmarsh for his numerous contributions to CPU dynrec core and other areas. -nemo93 for taking great care of dosbox-staging Wiki. +nemo93 for taking great care of the dosbox-staging Wiki. +Jason Kim for his IBM PS/1 Audio card implementation. +Dag Lem, Antti S. Lankila, Ken Händel, and Leandro Nini for the reSID library. +Johnathan Campbell and Wengier Wu for their unabated progress on the DOSBox-X project. -Vlad R. of the vdmsound project for excellent sound blaster info. -Tatsuyuki Satoh of the Mame Team for making an excellent FM emulator. +Vlad R. of the vdmsound project for excellent Sound Blaster info. +Tatsuyuki Satoh of the MAME Team for making an excellent FM emulator. Jarek Burczynski for his work on an OPL3 emulator. Ken Silverman for his work on an OPL2 emulator. The Bochs and DOSemu projects which I used for information. @@ -18,15 +21,19 @@ Pierre-Yves GĂŠrardy for hosting the old Beta Board. Colin Snover for hosting our forum. Mirek Luza, for his moderation of the forums. -eL_Pusher, DosFreak and MiniMax for their moderation of Vogons forum. -crazyc, gulikoza, M-HT for their work on the dynrec core. +eL_Pusher, DosFreak, and MiniMax for their moderation of Vogons forum. +crazyc, gulikoza, and M-HT for their work on the dynrec core. Jantien for the version management. -Shawn, Johannes and Marcus for creating the MacOS X version. +Shawn, Johannes, and Marcus for creating the MacOS X version. Jochen for creating the OS/2 version. Ido Beeri for the original DOSBox icon. ripsaw8080 for his hard debugging work. GOG Team for the splash screen. -All the people who reported a bug. -All the people who submitted a path or PR. -The Beta Testers. +All the supporters who have: + - reported bugs, + - generously donated, + - helped test development builds, + - submitted patches or pull-requests, + - improved the documentation and wiki pages, and/or + - been a constructive force on public forums and chat channel(s)! diff -Nru dosbox-staging-0.76.0/vs/dosbox.sln dosbox-staging-0.77.0/vs/dosbox.sln --- dosbox-staging-0.76.0/vs/dosbox.sln 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/vs/dosbox.sln 2021-07-02 15:47:39.000000000 +0000 @@ -3,9 +3,14 @@ VisualStudioVersion = 16.0.29324.140 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dosbox", "dosbox.vcxproj", "{7FCFFB9B-8629-4D51-849C-8490CECF8AB7}" + ProjectSection(ProjectDependencies) = postProject + {619CF3F9-C373-4BD5-93DA-025F5E16F8FA} = {619CF3F9-C373-4BD5-93DA-025F5E16F8FA} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zmbv", "..\src\libs\zmbv\zmbv.vcxproj", "{619CF3F9-C373-4BD5-93DA-025F5E16F8FA}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "..\tests\vs\tests.vcxproj", "{10F658E8-8DB0-4F7A-9B61-6272BB309144}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -30,6 +35,14 @@ {619CF3F9-C373-4BD5-93DA-025F5E16F8FA}.Release|x64.Build.0 = Release|x64 {619CF3F9-C373-4BD5-93DA-025F5E16F8FA}.Release|x86.ActiveCfg = Release|Win32 {619CF3F9-C373-4BD5-93DA-025F5E16F8FA}.Release|x86.Build.0 = Release|Win32 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Debug|x64.ActiveCfg = Debug|x64 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Debug|x64.Build.0 = Debug|x64 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Debug|x86.ActiveCfg = Debug|Win32 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Debug|x86.Build.0 = Debug|Win32 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Release|x64.ActiveCfg = Release|x64 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Release|x64.Build.0 = Release|x64 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Release|x86.ActiveCfg = Release|Win32 + {10F658E8-8DB0-4F7A-9B61-6272BB309144}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff -Nru dosbox-staging-0.76.0/vs/dosbox.vcxproj dosbox-staging-0.77.0/vs/dosbox.vcxproj --- dosbox-staging-0.76.0/vs/dosbox.vcxproj 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/vs/dosbox.vcxproj 2021-07-02 15:47:39.000000000 +0000 @@ -36,6 +36,7 @@ v142 false MultiByte + true Application @@ -71,21 +72,31 @@ $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ + true + false $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ + true false - false $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ + true + false $(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ + true + false + + + + Disabled @@ -98,18 +109,24 @@ Level3 true EditAndContinue - Default true + Speed + true + stdc11 + true + false + true + AssemblyAndSourceCode - opengl32.lib;SDL2_net.lib;winmm.lib;libpng16d.lib;SDL2maind.lib;SDL2d.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;opusfile.lib;opus.lib;ogg.lib;fluidsynth.lib;%(AdditionalDependencies) + opengl32.lib;SDL2_net.lib;winmm.lib;libpng16d.lib;SDL2maind.lib;SDL2d.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;mt32emu.lib;opusfile.lib;opus.lib;ogg.lib;fluidsynth.lib;%(AdditionalDependencies) $(OutDir)\dosbox.exe - true true Console MachineX86 false msvcrt.lib + true _DEBUG;%(PreprocessorDefinitions) @@ -128,17 +145,24 @@ Level3 true ProgramDatabase - Default true + Speed + false + true + false + stdc11 + true + true + AssemblyAndSourceCode - opengl32.lib;SDL2_net.lib;winmm.lib;libpng16d.lib;SDL2maind.lib;SDL2d.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;opusfile.lib;opus.lib;ogg.lib;%(AdditionalDependencies) + opengl32.lib;SDL2_net.lib;winmm.lib;libpng16d.lib;SDL2maind.lib;SDL2d.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;mt32emu.lib;opusfile.lib;opus.lib;ogg.lib;%(AdditionalDependencies) $(OutDir)\dosbox.exe - true true Console false msvcrt.lib + true _DEBUG;%(PreprocessorDefinitions) @@ -156,30 +180,33 @@ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL - false true true - AssemblyAndSourceCode true - Level3 + Level2 true None - Default - true true true + true + Fast + false + stdc11 + AssemblyAndSourceCode + false - opengl32.lib;winmm.lib;libpng16.lib;SDL2_net.lib;SDL2.lib;SDL2main.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;opusfile.lib;opus.lib;ogg.lib;fluidsynth.lib;%(AdditionalDependencies) + opengl32.lib;winmm.lib;libpng16.lib;SDL2_net.lib;SDL2.lib;SDL2main.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;mt32emu.lib;opusfile.lib;opus.lib;ogg.lib;fluidsynth.lib;%(AdditionalDependencies) $(OutDir)\dosbox.exe - true - true + false - true Console MachineX86 false UseLinkTimeCodeGeneration + true + true + true .\Release/dosbox.tlb @@ -201,30 +228,33 @@ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreadedDLL - false true true - AssemblyAndSourceCode true - Level3 + Level2 true None - Default - true true true + true + Fast + false + stdc11 + AssemblyAndSourceCode + false - opengl32.lib;winmm.lib;libpng16.lib;SDL2_net.lib;SDL2.lib;SDL2main.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;opusfile.lib;opus.lib;ogg.lib;%(AdditionalDependencies) + opengl32.lib;winmm.lib;libpng16.lib;SDL2_net.lib;SDL2.lib;SDL2main.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;mt32emu.lib;opusfile.lib;opus.lib;ogg.lib;%(AdditionalDependencies) $(OutDir)\dosbox.exe - true - true + false - true Console false UseLinkTimeCodeGeneration + true + true + true .\Release/dosbox.tlb @@ -237,6 +267,8 @@ + + @@ -252,7 +284,6 @@ - @@ -292,6 +323,7 @@ + @@ -308,6 +340,7 @@ + @@ -356,20 +389,41 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -409,9 +463,11 @@ + + @@ -488,9 +544,30 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -502,4 +579,4 @@ - + \ No newline at end of file diff -Nru dosbox-staging-0.76.0/vs/dosbox.vcxproj.filters dosbox-staging-0.77.0/vs/dosbox.vcxproj.filters --- dosbox-staging-0.76.0/vs/dosbox.vcxproj.filters 2020-12-03 18:36:19.000000000 +0000 +++ dosbox-staging-0.77.0/vs/dosbox.vcxproj.filters 2021-07-02 15:47:39.000000000 +0000 @@ -157,6 +157,9 @@ src\hardware + + src\hardware + src\hardware @@ -205,6 +208,9 @@ src\hardware + + src\hardware + src\hardware @@ -349,7 +355,7 @@ src\libs\decoders - + src\libs\nuked @@ -364,9 +370,15 @@ src\misc + + src\misc + src\misc + + src\misc + src\misc @@ -394,12 +406,72 @@ src\midi + + src\midi + + + src\midi + src\dos src\misc + + src + + + src\platform\visualc + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + @@ -498,6 +570,9 @@ include + + include + include @@ -507,6 +582,9 @@ include + + include + include @@ -717,7 +795,7 @@ src\libs\decoders - + src\libs\nuked @@ -738,6 +816,12 @@ src\midi + + src\midi + + + src\midi + src\midi @@ -756,6 +840,69 @@ src\gui + + src\gui + + + src\gui + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + + + src\libs\residfp + @@ -846,5 +993,8 @@ {5920d562-013f-417e-8095-198288c97b52} + + {e8ef008d-ceb9-4224-9b9e-b5b62933ca0d} + - + \ No newline at end of file