mirror of
https://github.com/libretro/dosbox-libretro.git
synced 2026-11-07 10:25:58 -10:00
Base the dosbox core on dosbox-core, with ZIP support and more from DOSBox Pure
The core is replaced by dosbox-core as of libretro/dosbox-core d38fcb50 (its history is in that repository), with the following on top: - Frontend VFS for mounted drives (libretro/dosbox-core#11): Android content:// and saf:// content works. - Built as dosbox_libretro and called DOSBox, so it installs next to dosbox-core without sharing its options, saves directory or config file. Option keys keep their dosbox_core_ prefix. - ZIP files as content, from DOSBox Pure (Bernhard Schelling): its zipDrive, unionDrive and memoryDrive, and the helpers they share (drive_dbp.cpp). The archive is mounted as C: without being extracted and the game's changes go to <name>.save.zip in the saves directory. DOS_Drive and DOS_File get the few members those drives need, with defaults. - The game in a ZIP is started when there is nothing to choose: the single program in the root, or in the one folder the root holds, leaving setup and install programs aside. - Disk images inside a ZIP: CD images (cue sheets with data and audio tracks, or ISOs) as D:, floppy images as A:, hard disk images as E: and on. Files on emulated drives can be named "$C:\PATH" as in DOSBox Pure; host_stat, fopen_wrap, the CD image reader and the audio track decoder open them through the drive, finding files by their long names. CDs and floppies go to RetroArch's disc control. - A start menu after DOSBox Pure's when a ZIP leaves a choice: it lists the programs on C: and on the mounted images, starts the one picked, can make it start on its own next time (kept in C:\DOSBOX.RUN, in the save file), and comes back when the program exits. Keyboard and gamepad; it can be turned off in the core options. - Automatic gamepad mapping from DOSBox Pure's Keyb2Joypad database (original data by Jemy Murphy and bigjim, used by DOSBox Pure with permission): a game the database knows, as a ZIP or from a directory, gets its keys, mouse and joystick actions on the first gamepad instead of the DOS joystick, with the action names shown in RetroArch. It can be turned off. - The CPU speed from the game's year, from its name or the database, as in DOSBox Pure; it can be turned off. - Roland SC-55 MIDI with Nuked-SC55 (nukeykt), from DOSBox Pure, as a new MIDI driver taking the module's ROMs from the system directory.
This commit is contained in:
1 parent
0e3a122d16
commit
a563bb5e97
6438 files changed
+1895432
-19382
No files matched your search
@@ -0,0 +1,152 @@
|
||||
version: 2.1
|
||||
|
||||
parameters:
|
||||
GHA_Actor:
|
||||
type: string
|
||||
default: ""
|
||||
GHA_Action:
|
||||
type: string
|
||||
default: ""
|
||||
GHA_Event:
|
||||
type: string
|
||||
default: ""
|
||||
GHA_Meta:
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
workflows:
|
||||
build:
|
||||
when:
|
||||
equal: ['build_linux_arm', << pipeline.parameters.GHA_Action >>]
|
||||
jobs:
|
||||
- build-linux:
|
||||
name: build-linux-arm64v8
|
||||
image_tag: 'linux-arm64v8'
|
||||
dynarec: 'arm64'
|
||||
file_arch: 'arm64'
|
||||
context:
|
||||
- global-org
|
||||
- build-linux:
|
||||
name: build-linux-arm32v7
|
||||
image_tag: 'linux-arm32v7'
|
||||
dynarec: 'arm'
|
||||
file_arch: 'armhf'
|
||||
context:
|
||||
- global-org
|
||||
- upload-linux:
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- 'libretro'
|
||||
context:
|
||||
- global-org
|
||||
requires:
|
||||
- build-linux-arm64v8
|
||||
- build-linux-arm32v7
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
parameters:
|
||||
image_tag:
|
||||
type: string
|
||||
dynarec:
|
||||
type: string
|
||||
file_arch:
|
||||
type: string
|
||||
|
||||
resource_class: arm.medium
|
||||
machine:
|
||||
image: ubuntu-2004:current
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: |
|
||||
docker run \
|
||||
-v "$PWD":/build \
|
||||
-w /build \
|
||||
-e CC=gcc-9 \
|
||||
-e CXX=g++-9 \
|
||||
-e platform=unix \
|
||||
-e BUNDLED_AUDIO_CODECS=1 \
|
||||
-e BUNDLED_LIBSNDFILE=1 \
|
||||
-e BUNDLED_SDL=1 \
|
||||
-e CMAKE_GENERATOR=Ninja \
|
||||
-e STATIC_LIBCXX=1 \
|
||||
-e WITH_BASSMIDI=1 \
|
||||
-e WITH_DYNAREC=<< parameters.dynarec >> \
|
||||
-e WITH_FLUIDSYNTH=1 \
|
||||
-e WITH_VOODOO=1 \
|
||||
realnc/dosbox-core-build:<< parameters.image_tag >> \
|
||||
bash -c '(
|
||||
set -ex
|
||||
touch libretro/deps/mpg123/aclocal.m4
|
||||
sleep 1
|
||||
find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
sleep 1
|
||||
touch libretro/deps/mpg123/configure
|
||||
make -C libretro -f Makefile.libretro clean
|
||||
make -C libretro -f Makefile.libretro deps
|
||||
export LDFLAGS="-Wl,--no-undefined"
|
||||
make -C libretro -f Makefile.libretro -j`nproc`
|
||||
strip libretro/dosbox_core_libretro.so
|
||||
chmod -x libretro/dosbox_core_libretro.so
|
||||
)'
|
||||
mkdir -p /tmp/workspace
|
||||
cp libretro/dosbox_core_libretro.so /tmp/workspace/
|
||||
cd /tmp/workspace
|
||||
xz -9 -T0 dosbox_core_libretro.so
|
||||
mv dosbox_core_libretro.so.xz linux-<< parameters.file_arch >>.xz
|
||||
|
||||
- when:
|
||||
condition:
|
||||
equal: [ 'libretro', << pipeline.git.branch >> ]
|
||||
steps:
|
||||
- persist_to_workspace:
|
||||
root: /tmp/workspace
|
||||
paths:
|
||||
- linux-<< parameters.file_arch >>.xz
|
||||
|
||||
upload-linux:
|
||||
resource_class: small
|
||||
docker:
|
||||
- image: cimg/go:1.19
|
||||
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
- run:
|
||||
name: "Upload release"
|
||||
command: |
|
||||
mkdir zip_release
|
||||
mkdir /tmp/upload
|
||||
cd zip_release
|
||||
cp /tmp/workspace/*.xz .
|
||||
|
||||
bash -c '(
|
||||
set -ex
|
||||
for f in *.xz
|
||||
do
|
||||
BASENAME=$(basename "$f" .xz)
|
||||
mkdir -p "${BASENAME}"
|
||||
cd "${BASENAME}"
|
||||
mv "../${BASENAME}.xz" dosbox_core_libretro.so.xz
|
||||
unxz dosbox_core_libretro.so.xz
|
||||
zip -9 "/tmp/upload/${BASENAME}.zip" dosbox_core_libretro.so
|
||||
cd ..
|
||||
done
|
||||
)'
|
||||
|
||||
go install github.com/tcnksm/ghr@latest
|
||||
ghr \
|
||||
-t "${GITHUB_TOKEN}" \
|
||||
-u "${CIRCLE_PROJECT_USERNAME}" \
|
||||
-r "${CIRCLE_PROJECT_REPONAME}" \
|
||||
-c "${CIRCLE_SHA1}" \
|
||||
-n "Latest Build (Linux ARM)" \
|
||||
-b "Linux ARM builds of current libretro branch." \
|
||||
-delete \
|
||||
-prerelease \
|
||||
latest_build_linux_arm \
|
||||
/tmp/upload \
|
||||
;
|
||||
@@ -0,0 +1,99 @@
|
||||
---
|
||||
Language: Cpp
|
||||
BasedOnStyle: WebKit
|
||||
Standard: Latest
|
||||
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignConsecutiveDeclarations: None
|
||||
AlignConsecutiveMacros: None
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: AlignAfterOperator
|
||||
AlignTrailingComments: false
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: MultiLine
|
||||
AfterEnum: false
|
||||
AfterExternBlock: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyNamespace: false
|
||||
SplitEmptyRecord: false
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakInheritanceList: AfterColon
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: ''
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DeriveLineEnding: false
|
||||
DerivePointerAlignment: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- BOOST_FOREACH
|
||||
- Q_FOREACH
|
||||
- foreach
|
||||
IncludeBlocks: Preserve
|
||||
IndentCaseLabels: false
|
||||
IndentGotoLabels: false
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
PackConstructorInitializers: Never
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
UseCRLF: false
|
||||
UseTab: ForIndentation
|
||||
...
|
||||
@@ -0,0 +1,255 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- 'latest_build_linux_arm'
|
||||
paths-ignore:
|
||||
- '.gitlab-ci.yml'
|
||||
- 'AUTHORS'
|
||||
- 'COPYING'
|
||||
- 'ChangeLog'
|
||||
- 'INSTALL'
|
||||
- 'NEWS'
|
||||
- 'README'
|
||||
- 'README.md'
|
||||
- 'THANKS'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.gitlab-ci.yml'
|
||||
- 'AUTHORS'
|
||||
- 'COPYING'
|
||||
- 'ChangeLog'
|
||||
- 'INSTALL'
|
||||
- 'NEWS'
|
||||
- 'README'
|
||||
- 'README.md'
|
||||
- 'THANKS'
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
build_linux_intel:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {image_tag: 'linux-x64', dynarec: x86_64, zip_name: linux-x64.zip}
|
||||
- {image_tag: 'linux-x86', dynarec: x86, zip_name: linux-x86.zip}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
docker run \
|
||||
-v "$PWD":/build \
|
||||
-w /build \
|
||||
-e CC=gcc-9 \
|
||||
-e CXX=g++-9 \
|
||||
-e platform=unix \
|
||||
-e BUNDLED_AUDIO_CODECS=1 \
|
||||
-e BUNDLED_LIBSNDFILE=1 \
|
||||
-e BUNDLED_SDL=1 \
|
||||
-e CMAKE_GENERATOR=Ninja \
|
||||
-e STATIC_LIBCXX=1 \
|
||||
-e WITH_BASSMIDI=1 \
|
||||
-e WITH_DYNAREC=${{ matrix.config.dynarec }} \
|
||||
-e WITH_FLUIDSYNTH=1 \
|
||||
-e WITH_VOODOO=1 \
|
||||
realnc/dosbox-core-build:${{ matrix.config.image_tag }} \
|
||||
bash -c '(
|
||||
set -ex
|
||||
git config --global --add safe.directory '*' || true
|
||||
touch libretro/deps/mpg123/aclocal.m4
|
||||
sleep 1
|
||||
find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
sleep 1
|
||||
touch libretro/deps/mpg123/configure
|
||||
make -C libretro -f Makefile.libretro clean
|
||||
make -C libretro -f Makefile.libretro deps
|
||||
export LDFLAGS="-Wl,--no-undefined"
|
||||
make -C libretro -f Makefile.libretro -j`nproc`
|
||||
strip libretro/dosbox_core_libretro.so
|
||||
chmod -x libretro/dosbox_core_libretro.so
|
||||
)'
|
||||
cd libretro
|
||||
zip -9 ${{ matrix.config.zip_name }} dosbox_core_libretro.so
|
||||
|
||||
- name: Upload artifact
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.config.zip_name }}
|
||||
path: libretro/${{ matrix.config.zip_name }}
|
||||
|
||||
trigger_circleci_arm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger CircleCI ARM builds
|
||||
id: 'build_linux_arm'
|
||||
uses: CircleCI-Public/[email protected]
|
||||
env:
|
||||
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
|
||||
|
||||
# build_macos:
|
||||
# runs-on: macos-12
|
||||
#
|
||||
# env:
|
||||
# CC: gcc-11
|
||||
# CXX: g++-11
|
||||
# platform: osx
|
||||
# WITH_DYNAREC: x86_64
|
||||
# STATIC_LIBCXX: 1
|
||||
# BUNDLED_AUDIO_CODECS: 1
|
||||
# BUNDLED_LIBSNDFILE: 1
|
||||
# BUNDLED_SDL: 1
|
||||
# PKG_CONFIG_FLAGS: --static
|
||||
# MACOSX_DEPLOYMENT_TARGET: '10.9'
|
||||
# HOMEBREW_PREFIX: /Users/Shared/homebrew-dosbox-core
|
||||
# HOMEBREW_CELLAR: /Users/Shared/homebrew-dosbox-core/Cellar
|
||||
# HOMEBREW_SHELLENV_PREFIX: /Users/Shared/homebrew-dosbox-core
|
||||
#
|
||||
# steps:
|
||||
# - run: echo "${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin:${PATH}" >> $GITHUB_PATH
|
||||
#
|
||||
# - name: Install custom homebrew
|
||||
# run: |
|
||||
# git config --global --add safe.directory '*' || true
|
||||
# rm -rf "${HOMEBREW_PREFIX}"
|
||||
# mkdir "${HOMEBREW_PREFIX}"
|
||||
# cd "${HOMEBREW_PREFIX}"/..
|
||||
# curl -s -S -L 'https://github.com/realnc/stuff/releases/download/stuff/homebrew-dosbox-core.tar.zst' | zstd -d | tar x
|
||||
#
|
||||
# # Since macOS is developed by monkeys, we have to do this shit to get static linking against
|
||||
# # homebrew-installed libraries.
|
||||
# - name: Symlink static homebrew libs
|
||||
# run: |
|
||||
# cd "${HOMEBREW_PREFIX}"
|
||||
# mkdir static_libs
|
||||
# ln -s "${HOMEBREW_PREFIX}"/lib/*.a static_libs/
|
||||
#
|
||||
# - uses: actions/checkout@v3
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - name: Remove /usr/local homebrew
|
||||
# working-directory: /usr/local
|
||||
# run: |
|
||||
# sudo mkdir /tmp/oldbrew
|
||||
# sudo mv * /tmp/oldbrew/
|
||||
#
|
||||
# - name: Build
|
||||
# working-directory: ./libretro
|
||||
# run: |
|
||||
# cd deps/mpg123/
|
||||
# autoreconf -iv
|
||||
# cd ../../
|
||||
# make deps
|
||||
# export LDFLAGS="-L \"$PWD/deps_bin/lib\" -L ${HOMEBREW_PREFIX}/static_libs -undefined error"
|
||||
# make -j`sysctl -n hw.ncpu`
|
||||
# strip -u -r -S dosbox_core_libretro.dylib
|
||||
# zip -9 macOS-x64.zip dosbox_core_libretro.dylib
|
||||
#
|
||||
# - name: Restore /usr/local homebrew
|
||||
# working-directory: /usr/local
|
||||
# run: |
|
||||
# sudo mv /tmp/oldbrew/* .
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# if: github.event_name == 'push'
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: macOS-x64.zip
|
||||
# path: libretro/macOS-x64.zip
|
||||
|
||||
build_mxe:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {image: 'realnc/dosbox-core-build:mxe-x86', triplet: i686-w64-mingw32.static, dynarec: x86, zip_name: windows-x86.zip}
|
||||
- {image: 'realnc/dosbox-core-build:mxe-x64', triplet: x86_64-w64-mingw32.static, dynarec: x86_64, zip_name: windows-x64.zip}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.config.image }}
|
||||
|
||||
env:
|
||||
CC: gcc
|
||||
platform: win
|
||||
TARGET_TRIPLET: ${{ matrix.config.triplet }}
|
||||
STATIC_LIBCXX: 0
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
WITH_DYNAREC: ${{ matrix.config.dynarec }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build
|
||||
working-directory: ./libretro
|
||||
run: |
|
||||
git config --global --add safe.directory '*' || true
|
||||
touch deps/sdl_net/aclocal.m4
|
||||
touch deps/mpg123/aclocal.m4
|
||||
sleep 1
|
||||
find deps/sdl_net/ -name "*.in" -exec touch '{}' \;
|
||||
find deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
sleep 1
|
||||
touch deps/sdl_net/configure
|
||||
touch deps/mpg123/configure
|
||||
make PKGCONFIG="${{ matrix.config.triplet }}-pkg-config" CMAKE="${{ matrix.config.triplet }}-cmake" deps
|
||||
export LDFLAGS="-Wl,--no-undefined"
|
||||
make PKGCONFIG="${{ matrix.config.triplet }}-pkg-config" CMAKE="${{ matrix.config.triplet }}-cmake" -j`nproc`
|
||||
${{ matrix.config.triplet }}-strip dosbox_core_libretro.dll
|
||||
zip -9 ${{ matrix.config.zip_name }} dosbox_core_libretro.dll
|
||||
|
||||
- name: Upload artifact
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.config.zip_name }}
|
||||
path: libretro/${{ matrix.config.zip_name }}
|
||||
|
||||
upload_build:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/libretro'
|
||||
runs-on: ubuntu-latest
|
||||
needs: [
|
||||
build_linux_intel,
|
||||
#build_macos,
|
||||
build_mxe,
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: /tmp/build_artifacts
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
|
||||
- name: Upload release binaries
|
||||
run: |
|
||||
mkdir /tmp/build_artifacts/upload
|
||||
mv /tmp/build_artifacts/*/* /tmp/build_artifacts/upload/
|
||||
export PATH="$PATH:$(go env GOPATH)/bin"
|
||||
go install github.com/tcnksm/ghr@latest
|
||||
ghr \
|
||||
-t "${{ secrets.GITHUB_TOKEN }}" \
|
||||
-u "${GITHUB_ACTOR}" \
|
||||
-r "${GITHUB_REPOSITORY#*/}" \
|
||||
-c "${GITHUB_SHA}" \
|
||||
-n "Latest Build" \
|
||||
-b "Builds of current libretro branch." \
|
||||
-delete \
|
||||
-prerelease \
|
||||
latest_build \
|
||||
/tmp/build_artifacts/upload \
|
||||
;
|
||||
+6
-2
@@ -1,3 +1,7 @@
|
||||
*.o
|
||||
*.[do]
|
||||
*.dll
|
||||
*.dylib
|
||||
*.so
|
||||
*.a
|
||||
*~
|
||||
/libretro/deps_bin
|
||||
autom4te.cache/
|
||||
+315
-46
@@ -1,3 +1,4 @@
|
||||
|
||||
# DESCRIPTION: GitLab CI/CD for libRetro (NOT FOR GitLab-proper)
|
||||
|
||||
##############################################################################
|
||||
@@ -7,36 +8,41 @@
|
||||
# Core definitions
|
||||
.core-defs:
|
||||
variables:
|
||||
# Not JNI_PATH: the android-jni template appends /jni to it itself, so
|
||||
# naming the directory here made it look for jni/jni and stop before it
|
||||
# compiled anything. The default, ".", is what this repository wants.
|
||||
MAKEFILE: Makefile.libretro
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
JNI_PATH: libretro
|
||||
CORENAME: dosbox
|
||||
MAKEFILE_PATH: libretro
|
||||
MAKEFILE: Makefile.libretro
|
||||
|
||||
# Inclusion templates, required for the build to work
|
||||
include:
|
||||
################################## DESKTOPS ################################
|
||||
# Windows 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-x64-mingw.yml'
|
||||
|
||||
# Windows 32-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-i686-mingw.yml'
|
||||
|
||||
# Linux 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/linux-x64.yml'
|
||||
|
||||
# Linux 32-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/linux-i686.yml'
|
||||
|
||||
# Linux ARM 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/linux-aarch64.yml'
|
||||
|
||||
# Windows 64-bit
|
||||
# Linux 32-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/windows-x64-mingw.yml'
|
||||
file: '/linux-i686.yml'
|
||||
|
||||
# MacOS ARM 64-bit
|
||||
# MacOS 64-bit
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/osx-arm64.yml'
|
||||
file: '/osx-x64.yml'
|
||||
|
||||
# webOS
|
||||
#################################### MISC ##################################
|
||||
# webOS 32-bit (LGTV)
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/webos-make.yml'
|
||||
|
||||
@@ -49,84 +55,347 @@ include:
|
||||
stages:
|
||||
- build-prepare
|
||||
- build-shared
|
||||
- build-static
|
||||
|
||||
##############################################################################
|
||||
#################################### STAGES ##################################
|
||||
##############################################################################
|
||||
#
|
||||
################################### DESKTOPS #################################
|
||||
# Windows 64-bit
|
||||
libretro-build-windows-x64:
|
||||
extends:
|
||||
- .libretro-windows-x64-mingw-make-default
|
||||
- .core-defs
|
||||
variables:
|
||||
STRIP_CORE_LIB: 0
|
||||
AR: ar
|
||||
AS: as
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
CMAKE_GENERATOR: Ninja
|
||||
platform: win
|
||||
TARGET_TRIPLET: x86_64-w64-mingw32.static
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
STATIC_LIBCXX: 0
|
||||
WITH_BASSMIDI: 1
|
||||
WITH_DYNAREC: x86_64
|
||||
WITH_FLUIDSYNTH: 1
|
||||
WITH_VOODOO: 1
|
||||
script:
|
||||
- touch libretro/deps/sdl_net/aclocal.m4
|
||||
- touch libretro/deps/mpg123/aclocal.m4
|
||||
- sleep 1
|
||||
- find libretro/deps/sdl_net/ -name "*.in" -exec touch '{}' \;
|
||||
- find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
- sleep 1
|
||||
- touch libretro/deps/sdl_net/configure
|
||||
- touch libretro/deps/mpg123/configure
|
||||
- make PKGCONFIG="${TARGET_TRIPLET}-pkg-config" CMAKE="${TARGET_TRIPLET}-cmake" -C ${MAKEFILE_PATH} -f ${MAKEFILE} clean
|
||||
- make PKGCONFIG="${TARGET_TRIPLET}-pkg-config" CMAKE="${TARGET_TRIPLET}-cmake" -C ${MAKEFILE_PATH} -f ${MAKEFILE} deps
|
||||
- LDFLAGS="-Wl,--no-undefined" make PKGCONFIG="${TARGET_TRIPLET}-pkg-config" CMAKE="${TARGET_TRIPLET}-cmake" -C ${MAKEFILE_PATH} -f ${MAKEFILE} -j${NUMPROC}
|
||||
- x86_64-w64-mingw32.static-strip ${MAKEFILE_PATH}/${CORENAME}_libretro.dll
|
||||
|
||||
# Windows 32-bit
|
||||
libretro-build-windows-i686:
|
||||
extends:
|
||||
- .libretro-windows-i686-mingw-make-default
|
||||
- .core-defs
|
||||
variables:
|
||||
STRIP_CORE_LIB: 0
|
||||
AR: ar
|
||||
AS: as
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
CMAKE_GENERATOR: Ninja
|
||||
platform: win
|
||||
TARGET_TRIPLET: i686-w64-mingw32.static
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
STATIC_LIBCXX: 0
|
||||
WITH_BASSMIDI: 1
|
||||
WITH_DYNAREC: x86
|
||||
WITH_FLUIDSYNTH: 1
|
||||
WITH_VOODOO: 1
|
||||
script:
|
||||
- touch libretro/deps/sdl_net/aclocal.m4
|
||||
- touch libretro/deps/mpg123/aclocal.m4
|
||||
- sleep 1
|
||||
- find libretro/deps/sdl_net/ -name "*.in" -exec touch '{}' \;
|
||||
- find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
- sleep 1
|
||||
- touch libretro/deps/sdl_net/configure
|
||||
- touch libretro/deps/mpg123/configure
|
||||
- make PKGCONFIG="${TARGET_TRIPLET}-pkg-config" CMAKE="${TARGET_TRIPLET}-cmake" -C ${MAKEFILE_PATH} -f ${MAKEFILE} clean
|
||||
- make PKGCONFIG="${TARGET_TRIPLET}-pkg-config" CMAKE="${TARGET_TRIPLET}-cmake" -C ${MAKEFILE_PATH} -f ${MAKEFILE} deps
|
||||
- LDFLAGS="-Wl,--no-undefined" make PKGCONFIG="${TARGET_TRIPLET}-pkg-config" CMAKE="${TARGET_TRIPLET}-cmake" -C ${MAKEFILE_PATH} -f ${MAKEFILE} -j${NUMPROC}
|
||||
- i686-w64-mingw32.static-strip ${MAKEFILE_PATH}/${CORENAME}_libretro.dll
|
||||
|
||||
# Linux 64-bit
|
||||
libretro-build-linux-x64:
|
||||
extends:
|
||||
- .libretro-linux-x64-make-default
|
||||
- .core-defs
|
||||
variables:
|
||||
CC: gcc-9
|
||||
CXX: g++-9
|
||||
platform: unix
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
CMAKE_GENERATOR: Ninja
|
||||
STATIC_LIBCXX: 1
|
||||
WITH_BASSMIDI: 1
|
||||
WITH_DYNAREC: x86_64
|
||||
WITH_FLUIDSYNTH: 1
|
||||
WITH_VOODOO: 1
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:xenial-gcc9
|
||||
script:
|
||||
- python3 -m pip install --no-cache-dir meson==0.55.3 ninja
|
||||
- touch libretro/deps/mpg123/aclocal.m4
|
||||
- sleep 1
|
||||
- find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
- sleep 1
|
||||
- touch libretro/deps/mpg123/configure
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} clean
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} deps
|
||||
- LDFLAGS="-Wl,--no-undefined" make -C ${MAKEFILE_PATH} -f ${MAKEFILE} -j${NUMPROC}
|
||||
- strip ${MAKEFILE_PATH}/${CORENAME}_libretro.so
|
||||
|
||||
# Linux ARM 64-bit
|
||||
libretro-build-linux-aarch64:
|
||||
extends:
|
||||
- .libretro-linux-aarch64-make-default
|
||||
- .core-defs
|
||||
variables:
|
||||
platform: unix
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
CMAKE_GENERATOR: Ninja
|
||||
STATIC_LIBCXX: 1
|
||||
WITH_BASSMIDI: 1
|
||||
WITH_DYNAREC: arm64
|
||||
WITH_FLUIDSYNTH: 1
|
||||
WITH_VOODOO: 1
|
||||
script:
|
||||
# flac and opusfile bootstrap themselves with autogen.sh, and the aarch64
|
||||
# image has no autotools - the dependency build stops on "Missing program
|
||||
# 'libtool'" before flac is configured. The x64 and i686 jobs pin
|
||||
# xenial-gcc9 images that carry them already.
|
||||
#
|
||||
# libtool-bin is the one that matters for that message: flac's autogen.sh
|
||||
# tests `command -v libtool`, and on Debian the libtool package ships only
|
||||
# libtoolize and the m4 macros - /usr/bin/libtool lives in libtool-bin.
|
||||
- apt-get update -qq && apt-get install -y --no-install-recommends autoconf automake libtool libtool-bin
|
||||
- python3 -m pip install --no-cache-dir meson==0.55.3 ninja
|
||||
- touch libretro/deps/mpg123/aclocal.m4
|
||||
- sleep 1
|
||||
- find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
- sleep 1
|
||||
- touch libretro/deps/mpg123/configure
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} clean
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} deps
|
||||
- LDFLAGS="-Wl,--no-undefined" make -C ${MAKEFILE_PATH} -f ${MAKEFILE} -j${NUMPROC}
|
||||
- strip ${MAKEFILE_PATH}/${CORENAME}_libretro.so
|
||||
|
||||
# Linux 32-bit
|
||||
libretro-build-linux-i686:
|
||||
extends:
|
||||
- .libretro-linux-i686-make-default
|
||||
- .core-defs
|
||||
variables:
|
||||
CC: gcc-9
|
||||
CXX: g++-9
|
||||
platform: unix
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
CMAKE_GENERATOR: Ninja
|
||||
STATIC_LIBCXX: 1
|
||||
WITH_BASSMIDI: 1
|
||||
WITH_DYNAREC: x86
|
||||
WITH_FLUIDSYNTH: 1
|
||||
WITH_VOODOO: 1
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-i386-ubuntu:xenial-gcc9
|
||||
script:
|
||||
- linux32 python3 -m pip install --no-cache-dir meson==0.55.3 ninja
|
||||
- touch libretro/deps/mpg123/aclocal.m4
|
||||
- sleep 1
|
||||
- find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
- sleep 1
|
||||
- touch libretro/deps/mpg123/configure
|
||||
- linux32 make -C ${MAKEFILE_PATH} -f ${MAKEFILE} clean
|
||||
- linux32 make -C ${MAKEFILE_PATH} -f ${MAKEFILE} deps
|
||||
- LDFLAGS="-Wl,--no-undefined" linux32 make -C ${MAKEFILE_PATH} -f ${MAKEFILE} -j${NUMPROC}
|
||||
- strip ${MAKEFILE_PATH}/${CORENAME}_libretro.so
|
||||
|
||||
# Linux ARM 64-bit
|
||||
# No dynarec: this fork only carries the armv4le, x86, x86_64 and mipsel
|
||||
# backends, so aarch64 runs the interpreter.
|
||||
libretro-build-linux-aarch64:
|
||||
# MacOS 64-bit
|
||||
libretro-build-osx-x64:
|
||||
extends:
|
||||
- .libretro-linux-aarch64-make-default
|
||||
- .core-defs
|
||||
|
||||
# Windows 64-bit
|
||||
# The makefile knows platform=win, not win64, and cannot guess the dynarec
|
||||
# when it is cross compiled from Linux.
|
||||
libretro-build-windows-x64:
|
||||
extends:
|
||||
- .libretro-windows-x64-mingw-make-default
|
||||
- .libretro-osx-x64-make-default
|
||||
- .core-defs
|
||||
variables:
|
||||
platform: win
|
||||
CC: gcc-11
|
||||
CXX: g++-11
|
||||
platform: osx
|
||||
WITH_DYNAREC: x86_64
|
||||
STATIC_LIBCXX: 1
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
PKG_CONFIG_FLAGS: --static
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.9'
|
||||
HOMEBREW_PREFIX: /Users/Shared/homebrew-dosbox-core
|
||||
HOMEBREW_CELLAR: /Users/Shared/homebrew-dosbox-core/Cellar
|
||||
HOMEBREW_SHELLENV_PREFIX: /Users/Shared/homebrew-dosbox-core
|
||||
script:
|
||||
- export PATH="${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin:$PATH"
|
||||
- rm -rf "${HOMEBREW_PREFIX}"
|
||||
- mkdir "${HOMEBREW_PREFIX}"
|
||||
- pushd .
|
||||
- cd "${HOMEBREW_PREFIX}"/..
|
||||
- curl -s -S -L 'https://github.com/realnc/stuff/releases/download/stuff/zstd-macos.tar.xz' | tar x
|
||||
- curl -s -S -L 'https://github.com/realnc/stuff/releases/download/stuff/homebrew-dosbox-core.tar.zst' | ./zstd -d | tar x
|
||||
- cd "${HOMEBREW_PREFIX}"
|
||||
- mkdir static_libs
|
||||
- ln -s "${HOMEBREW_PREFIX}"/lib/*.a static_libs/
|
||||
- popd
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} clean
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} deps
|
||||
- export LDFLAGS="-L \"$PWD/libretro/deps_bin/lib\" -L ${HOMEBREW_PREFIX}/static_libs -undefined error"
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} -j${NUMPROC}
|
||||
- strip -u -r -S ${MAKEFILE_PATH}/${CORENAME}_libretro.dylib
|
||||
- rm -rf "${HOMEBREW_PREFIX}"
|
||||
|
||||
# MacOS ARM 64-bit
|
||||
libretro-build-osx-arm64:
|
||||
extends:
|
||||
- .libretro-osx-arm64-make-default
|
||||
- .core-defs
|
||||
|
||||
# webOS ARMv7a
|
||||
# The makefile guesses the dynarec from `uname -m` on platform=unix, which is
|
||||
# the build host here, so the target's own has to be named.
|
||||
#################################### MISC ####################################
|
||||
# webOS 32-bit (LGTV)
|
||||
libretro-build-webos-armv7a:
|
||||
extends:
|
||||
- .libretro-webos-armv7a-make-default
|
||||
- .core-defs
|
||||
variables:
|
||||
platform: unix
|
||||
TARGET_TRIPLET: arm-webos-linux-gnueabi
|
||||
# The CMake dependencies need the buildroot toolchain file. Repeat the
|
||||
# C++ standard flag the Makefile would otherwise have set here.
|
||||
EXTRA_CMAKE_FLAGS: -DCMAKE_CXX_STANDARD=17 -DPKG_CONFIG_EXECUTABLE=/usr/bin/pkg-config -DCMAKE_TOOLCHAIN_FILE=/developer/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
|
||||
BUNDLED_AUDIO_CODECS: 1
|
||||
BUNDLED_LIBSNDFILE: 1
|
||||
BUNDLED_SDL: 1
|
||||
CMAKE_GENERATOR: Ninja
|
||||
STATIC_LIBCXX: 1
|
||||
WITH_BASSMIDI: 1
|
||||
WITH_DYNAREC: arm
|
||||
# ALSA sequencer MIDI is a host-side feature and there is no alsa in the
|
||||
# dependency prefix; MIDI here goes through FluidSynth and BASSMIDI.
|
||||
WITH_ALSA_MIDI: 0
|
||||
WITH_FLUIDSYNTH: 1
|
||||
WITH_VOODOO: 1
|
||||
script:
|
||||
# FLAC's dependency recipe runs its autogen.sh unconditionally, and the
|
||||
# webOS image carries no autotools at all - the SDK is a cross toolchain,
|
||||
# not a build environment. gettext is part of it: autogen.sh looks for
|
||||
# autopoint before anything else.
|
||||
- apt-get update -qy
|
||||
- apt-get install -qy autoconf automake libtool libtool-bin gettext
|
||||
# The SDK's environment-setup, which the template sources, points CC and
|
||||
# friends at the prefixed cross tools. Hand the Makefile the bare names
|
||||
# instead and let it build the prefixed ones itself from TARGET_TRIPLET,
|
||||
# the same way the MXE jobs do - otherwise every one of them ends up
|
||||
# doubled, as in arm-webos-linux-gnueabi-arm-webos-linux-gnueabi-ld.
|
||||
- export AR=ar AS=as CC=gcc CXX=g++ LD=ld
|
||||
# The SDK ships pkg-config as a wrapper that rewrites every path it
|
||||
# reports to sit under the sysroot, and it sets that up itself, so the
|
||||
# environment cannot talk it out of it. That is right for the SDK's own
|
||||
# libraries and wrong for the ones we build next to the source tree,
|
||||
# which is all of them here - SDL_net was handed a sysroot-prefixed SDL
|
||||
# include path that does not exist. Use the plain pkg-config and point
|
||||
# it at nothing but our own .pc files.
|
||||
- export PKG_CONFIG=/usr/bin/pkg-config
|
||||
- export PKG_CONFIG_LIBDIR="$PWD/${MAKEFILE_PATH}/deps_bin/lib/pkgconfig"
|
||||
# Same autotools timestamp dance as the other cross jobs: the checkout
|
||||
# gives configure and its inputs the same mtime, and the deps then try
|
||||
# to re-run autoconf, which is not in this image.
|
||||
- touch libretro/deps/sdl_net/aclocal.m4
|
||||
- touch libretro/deps/mpg123/aclocal.m4
|
||||
- sleep 1
|
||||
- find libretro/deps/sdl_net/ -name "*.in" -exec touch '{}' \;
|
||||
- find libretro/deps/mpg123/ -name "*.in" -exec touch '{}' \;
|
||||
- sleep 1
|
||||
- touch libretro/deps/sdl_net/configure
|
||||
- touch libretro/deps/mpg123/configure
|
||||
# CMAKE and PKGCONFIG go on the command line rather than in the
|
||||
# environment: the Makefile assigns both with = and that beats an
|
||||
# environment variable. The SDK carries a cmake of its own, and its
|
||||
# pkg-config is the wrapper described above.
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} CMAKE=/usr/bin/cmake PKGCONFIG=/usr/bin/pkg-config clean
|
||||
- make -C ${MAKEFILE_PATH} -f ${MAKEFILE} CMAKE=/usr/bin/cmake PKGCONFIG=/usr/bin/pkg-config deps
|
||||
- LDFLAGS="-Wl,--no-undefined" make -C ${MAKEFILE_PATH} -f ${MAKEFILE} CMAKE=/usr/bin/cmake PKGCONFIG=/usr/bin/pkg-config -j${NUMPROC}
|
||||
|
||||
################################### CELLULAR #################################
|
||||
# All four ABIs. The 32-bit two run the interpreter rather than a dynarec --
|
||||
# jni/Android.mk says why -- which is still a core where there was none.
|
||||
#
|
||||
# Android ARMv7a
|
||||
android-armeabi-v7a:
|
||||
extends:
|
||||
- .libretro-android-jni-armeabi-v7a
|
||||
- .core-defs
|
||||
variables:
|
||||
CMAKE: cmake
|
||||
CMAKE_BUILD_TYPE: Release
|
||||
script:
|
||||
- DEPS_BIN_DIR="$PWD/$MAKEFILE_PATH/deps_bin/$ANDROID_ABI"
|
||||
EXTRA_CMAKE_FLAGS="-DANDROID_PLATFORM=android-16 -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DANDROID_ABI=${ANDROID_ABI}"
|
||||
make -C ${MAKEFILE_PATH} -f deps/munt.makefile
|
||||
- $NDK_ROOT/ndk-build --no-print-directory -j$NUMPROC -C $JNI_PATH/jni $PLATFORM_ARGS
|
||||
- mv $JNI_PATH/libs/$ANDROID_ABI/libretro.so $LIBNAME
|
||||
- if [ $STRIP_CORE_LIB -eq 1 ]; then $NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip $LIBNAME; fi
|
||||
|
||||
# Android ARMv8a
|
||||
android-arm64-v8a:
|
||||
extends:
|
||||
- .libretro-android-jni-arm64-v8a
|
||||
- .core-defs
|
||||
|
||||
# Android 32-bit x86
|
||||
android-x86:
|
||||
extends:
|
||||
- .libretro-android-jni-x86
|
||||
- .core-defs
|
||||
variables:
|
||||
CMAKE: cmake
|
||||
CMAKE_BUILD_TYPE: Release
|
||||
script:
|
||||
- DEPS_BIN_DIR="$PWD/$MAKEFILE_PATH/deps_bin/$ANDROID_ABI"
|
||||
EXTRA_CMAKE_FLAGS="-DANDROID_PLATFORM=android-16 -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DANDROID_ABI=${ANDROID_ABI}"
|
||||
make -C ${MAKEFILE_PATH} -f deps/munt.makefile
|
||||
- $NDK_ROOT/ndk-build --no-print-directory -j$NUMPROC -C $JNI_PATH/jni $PLATFORM_ARGS
|
||||
- mv $JNI_PATH/libs/$ANDROID_ABI/libretro.so $LIBNAME
|
||||
- if [ $STRIP_CORE_LIB -eq 1 ]; then $NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip $LIBNAME; fi
|
||||
|
||||
# Android 64-bit x86
|
||||
android-x86_64:
|
||||
extends:
|
||||
- .libretro-android-jni-x86_64
|
||||
- .core-defs
|
||||
variables:
|
||||
CMAKE: cmake
|
||||
CMAKE_BUILD_TYPE: Release
|
||||
script:
|
||||
- DEPS_BIN_DIR="$PWD/$MAKEFILE_PATH/deps_bin/$ANDROID_ABI"
|
||||
EXTRA_CMAKE_FLAGS="-DANDROID_PLATFORM=android-16 -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DANDROID_ABI=${ANDROID_ABI}"
|
||||
make -C ${MAKEFILE_PATH} -f deps/munt.makefile
|
||||
- $NDK_ROOT/ndk-build --no-print-directory -j$NUMPROC -C $JNI_PATH/jni $PLATFORM_ARGS
|
||||
- mv $JNI_PATH/libs/$ANDROID_ABI/libretro.so $LIBNAME
|
||||
- if [ $STRIP_CORE_LIB -eq 1 ]; then $NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip $LIBNAME; fi
|
||||
|
||||
# Android 32-bit x86
|
||||
android-x86:
|
||||
extends:
|
||||
- .libretro-android-jni-x86
|
||||
- .core-defs
|
||||
variables:
|
||||
CMAKE: cmake
|
||||
CMAKE_BUILD_TYPE: Release
|
||||
script:
|
||||
- DEPS_BIN_DIR="$PWD/$MAKEFILE_PATH/deps_bin/$ANDROID_ABI"
|
||||
EXTRA_CMAKE_FLAGS="-DANDROID_PLATFORM=android-16 -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DANDROID_ABI=${ANDROID_ABI}"
|
||||
make -C ${MAKEFILE_PATH} -f deps/munt.makefile
|
||||
- $NDK_ROOT/ndk-build --no-print-directory -j$NUMPROC -C $JNI_PATH/jni $PLATFORM_ARGS
|
||||
- mv $JNI_PATH/libs/$ANDROID_ABI/libretro.so $LIBNAME
|
||||
- if [ $STRIP_CORE_LIB -eq 1 ]; then $NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip $LIBNAME; fi
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
language: generic
|
||||
os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
env:
|
||||
global:
|
||||
- CORE=dosbox
|
||||
- COMPILER_NAME=gcc CXX=g++-7 CC=gcc-7
|
||||
matrix:
|
||||
- PLATFORM=3ds
|
||||
- PLATFORM=linux_x64
|
||||
- PLATFORM=wiiu
|
||||
before_script:
|
||||
- pwd
|
||||
- mkdir -p ~/bin
|
||||
- ln -s /usr/bin/gcc-7 ~/bin/gcc
|
||||
- ln -s /usr/bin/g++-7 ~/bin/g++
|
||||
- ln -s /usr/bin/cpp-7 ~/bin/cpp
|
||||
- export PATH=~/bin:$PATH
|
||||
- ls -l ~/bin
|
||||
- echo $PATH
|
||||
- g++-7 --version
|
||||
- g++ --version
|
||||
script:
|
||||
- cd ~/
|
||||
- git clone --depth=50 https://github.com/libretro/libretro-super
|
||||
- cd libretro-super/travis
|
||||
- ./build.sh
|
||||
@@ -1,8 +1,8 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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-1335 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
|
||||
@@ -1,3 +1,89 @@
|
||||
0.74-3
|
||||
- Implement basic file access control for files available from within
|
||||
the emulation, so that programs running inside DOSBox can't access
|
||||
/proc (e.g. /proc/self/mem). (CVE-2019-12594)
|
||||
- Unify unmounting code and add some protections against out of bound access
|
||||
when DOS_DRIVES is not 26.
|
||||
- Use correct type for return value of strlen.
|
||||
- Change scan3x to a bit brighter.
|
||||
- Fix unitialized access to some isoDrive fields and improve stability
|
||||
when switching CD images.
|
||||
- Small fix to hq3x.
|
||||
- Fix 256 colour mode encoding in zmbv.dll.
|
||||
- Some small aliassing fix.
|
||||
- Change SET to check the size of the MCB when adding variables. Fixes
|
||||
hangs with Norton Commander.
|
||||
- Check buffer length before doing tab completion.
|
||||
- Correct buffer overflow with very long lines in bat files. (CVE-2019-7165)
|
||||
- Correct the boundary check for the internal programs array.
|
||||
- Increase stability in max cycles mode by increasing the lower bound.
|
||||
- Fix command prompt in windows 3.11 with dynrec core.
|
||||
- Fix Win64 dynrec core.
|
||||
- Always clear buffers before drawing in OpenGL mode. Fixes artifacts with
|
||||
drivers that have more than 2 buffers and overlays.
|
||||
- Fix red border that appeared when scaling the image in OpenGL
|
||||
mode with Nvidia on Linux and Mac.
|
||||
- Change default output to opengl on Mac, as surface is very slow there in 64 bit.
|
||||
- Add workaround for the mouse unlocking problem with X.org 1.20.1.
|
||||
- Fix table access when USE_FULL_TLB is undefined (non-default configuration).
|
||||
- Several fixes to prevent compilation errors.
|
||||
- Update Visual studio file to fix missing files from 0.74-2.
|
||||
|
||||
0.74-2
|
||||
- Rewrite auto/max cycles algorithm to work better with windows 7, other
|
||||
OSes might benefit as well.
|
||||
- Update 64bit recompiler to work on OSX and Linux.
|
||||
- Several improvements to make the recompilers work with newer compilers and
|
||||
add some workarounds about clang confusing itself.
|
||||
- Fix several variables being the wrong size in the recompiler.
|
||||
- Support absolute 64 bit addressing. (DRC:64 bit error messages)
|
||||
- Zero extend data in dynrec core for LLVM compilation/
|
||||
- Reduce overhead of the Mac version with a lot. Results in a speed increase.
|
||||
- Replace NV_PixelDataRange with the more common ARB_PixelBufferObject
|
||||
extension. Should help with output=opengl.
|
||||
- Reuse graphics window if possible instead of always creating a new one!
|
||||
- Add patches to work better when called by WINE:
|
||||
- support WINE style namemangling.
|
||||
- allow Z:\ to be moved to a different drive.
|
||||
- Try to fix stuttering audio with opengl output on Linux. (or at least
|
||||
improve it. Linux users might need to increase the prebuffer option a bit)
|
||||
- Fix automake and autoconf problems.
|
||||
- Fix problems related to packed struct layouts.
|
||||
- Fix compilation on gcc 4.4 and gcc 4.6.1.
|
||||
- Fix compilation with -DPIC.
|
||||
- Hopefully fix crash on shutdown, when unknown condition is encountered.
|
||||
- Fix -lto with gcc.
|
||||
- Fix clang compliation with asm fpu core.
|
||||
- Fix mapper crash on startup and when changing the mapper key.
|
||||
- Fix compilation in VS2015.
|
||||
- Fix compilation on mingw64.
|
||||
- Fix compilation on Frisbee and newer clang.
|
||||
- Fix compilation machines that have X11 libraries installed, but use a SDL
|
||||
without X11.
|
||||
- Fix a few problems relating to video capturing:
|
||||
- Writing out the index too often. (slowdown with longer captures)
|
||||
- Not being aware of when only the refresh rate changed.
|
||||
- Fix call order when bitshifting the return order (VS C /O2 builds).
|
||||
- Fix sign-extension error in S3 draw funcion, i.e. win3.1 analog clock.
|
||||
- Fix expanddot not caring about the size of the inputbuffer.
|
||||
- Some fixes for the debugger related to starting a program through debug.com.
|
||||
- Bring OS/2 port code up to date.
|
||||
- Reduce the amount of warning when compiling with quite a bit.
|
||||
- Allow 15/26/32 bits input to the opengl output.
|
||||
- Add cmd-q as exit key for macs.
|
||||
- Fix icon and titlebar on very old setups.
|
||||
- Fix off by one display size calculation errors with very large displays.
|
||||
- Fix out of bounds access the unused byte in the 32 bit colour value of the
|
||||
hardware mouse cursor pixel was affected.
|
||||
- Fix depreciated warnings on Mac, allow soundfont loading for coreaudio.
|
||||
- Keep repeating a pressed key if another key was unpressed.
|
||||
- Fix crash on OS X related to putting junk in the titlebar.
|
||||
- Extend fullresolution=0x0 to work on Linux and Mac.
|
||||
- Change gameblaster and tandy sound core to latest mame version.
|
||||
- Improve numlock and capslock support on Linux and Macs. Still not perfect
|
||||
on Windows.
|
||||
- Added even more code to workaround Windows behaving weirdly with alt-tab.
|
||||
|
||||
0.74
|
||||
- Several small game specific fixes/hacks/support. (Offensive,
|
||||
Roadhog, GTA installer, Kingdom O' Magic soundcard detection,
|
||||
|
||||
@@ -1,90 +1,97 @@
|
||||
Things needed for compilation.
|
||||
Things needed for compilation:
|
||||
|
||||
SDL
|
||||
The Simple DirectMedia Library available at http://www.libsdl.org
|
||||
SDL
|
||||
The Simple DirectMedia Library available at https://www.libsdl.org/
|
||||
The dll distributed with the windows version of DOSBox is slightly
|
||||
modified. You can find the changes in the sourcepackage of DOSBox
|
||||
(src/platform/sdl-win32.diff). If you want the patched sourcetree
|
||||
send us an email. (see README)
|
||||
Licensed under LGPL
|
||||
Note that only version 1.2 and its subversions (1.2.8, 1.2.13 etc.)
|
||||
are currently supported.
|
||||
License: LGPLv2+
|
||||
|
||||
Curses (optional)
|
||||
If you want to enable the debugger you need a curses library.
|
||||
ncurses should be installed on just about every unix distro.
|
||||
For win32 get pdcurses at http://pdcurses.sourceforge.net
|
||||
License: Open source
|
||||
For win32 get pdcurses at https://pdcurses.org/
|
||||
License: 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: Open Source
|
||||
License: zlib/libpng
|
||||
|
||||
Zlib (optional)
|
||||
Needed by libpng.
|
||||
For win32 get libz (rename to zlib) from http://gnuwin32.sourceforge.net/packages.html
|
||||
See http://www.zlib.net for more details.
|
||||
License: Open Source
|
||||
See https://www.zlib.net/ for more details.
|
||||
License: zlib
|
||||
|
||||
SDL_Net (optional)
|
||||
For modem/ipx support. Get it from http://www.libsdl.org/projects/SDL_net/
|
||||
Licensed under LGPL
|
||||
For modem/ipx support.
|
||||
Get it from https://www.libsdl.org/projects/SDL_net/release-1.2.html
|
||||
License: LGPLv2+
|
||||
|
||||
SDL_Sound
|
||||
For compressed audio on diskimages. (optional)
|
||||
SDL_Sound (optional)
|
||||
For compressed audio on diskimages (cue sheets) support.
|
||||
This is for cue/bin cdrom images with compressed (mp3/ogg) audio tracks.
|
||||
Get it from http://icculus.org/SDL_sound
|
||||
Licenced under LGPL
|
||||
Licence: LGPLv2+
|
||||
|
||||
ALSA_Headers
|
||||
(optional)
|
||||
ALSA_Headers (optional)
|
||||
for Alsa support under linux. Part of the linux kernel sources
|
||||
Licensed under LGPL
|
||||
License: LGPLv2+
|
||||
|
||||
If you want compile from developer sources (SVN) under a unix system, you'll also need
|
||||
automake (>=1.6), autoconf(>=2.50). Should be available at http://www.gnu.org
|
||||
If you want compile from developer sources (SVN) under a unix system, you'll
|
||||
also need automake (>=1.6) and autoconf(>=2.50).
|
||||
Should be available at https://www.gnu.org/software/
|
||||
|
||||
For building on unix systems.
|
||||
If you are building from developer sources run ./autogen.sh first before doing the following.
|
||||
If you are building from developer sources run ./autogen.sh first before doing
|
||||
the following:
|
||||
|
||||
1. ./configure
|
||||
2. make
|
||||
$ ./configure
|
||||
$ make
|
||||
|
||||
In step 1 you could add the following switches:
|
||||
--enable-debug
|
||||
enables the internal debugger. --enable-debug=heavy enables even more
|
||||
debug options. DOSBox should then be run from a xterm and when the sdl-
|
||||
window is active press alt-pause to enter the debugger.
|
||||
You can also run "./configure --help" for extra features to enable/disable.
|
||||
Some of them are:
|
||||
|
||||
--enable-core-inline
|
||||
enables some memory increasing inlines. This greatly increases
|
||||
compiletime for maybe a increase in speed.
|
||||
--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.
|
||||
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
|
||||
disables the assembly fpu core. Although relatively new the x86 fpu
|
||||
core has more accuracy then the regular fpu core.
|
||||
--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 specific cpu core. Although it might be
|
||||
be a bit unstable, it can greatly improve the speed of dosbox on x86
|
||||
hosts.
|
||||
Please note that this option on x86 will result in a different
|
||||
dynamic/recompiling cpu core being compiled then the default.
|
||||
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 and x86_64 only.
|
||||
You can activate this core on x86 by disabling the dynamic-x86 core.
|
||||
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 --disable-dynrec)
|
||||
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
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Main Makefile for DOSBox
|
||||
|
||||
EXTRA_DIST = autogen.sh
|
||||
SUBDIRS = src include docs visualc_net
|
||||
-160
@@ -1,160 +0,0 @@
|
||||
LIBRETRO_COMM_DIR := $(CORE_DIR)/libretro-common
|
||||
|
||||
INCFLAGS += -I$(CORE_DIR)/src \
|
||||
-I$(CORE_DIR)/libretro \
|
||||
-I$(LIBRETRO_COMM_DIR)/include \
|
||||
-I$(CORE_DIR)/include \
|
||||
-I$(CORE_DIR)/src/midi/munt
|
||||
|
||||
SOURCES_CXX := \
|
||||
$(CORE_DIR)/src/cpu/callback.cpp \
|
||||
$(CORE_DIR)/src/cpu/cpu.cpp \
|
||||
$(CORE_DIR)/src/cpu/flags.cpp \
|
||||
$(CORE_DIR)/src/cpu/modrm.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_full.cpp \
|
||||
$(CORE_DIR)/src/cpu/paging.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_normal.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_simple.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_prefetch.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_dyn_x86.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_dynrec.cpp \
|
||||
$(CORE_DIR)/src/cpu/mmx.cpp \
|
||||
$(CORE_DIR)/src/dos/dos.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_devices.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_execute.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_files.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_ioctl.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_memory.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_misc.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_classes.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_programs.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_tables.cpp \
|
||||
$(CORE_DIR)/src/dos/drives.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_virtual.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_local.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_cache.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_fat.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_iso.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_mscdex.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_keyboard_layout.cpp \
|
||||
$(CORE_DIR)/src/dos/cdrom.cpp \
|
||||
$(CORE_DIR)/src/dos/cdrom_image.cpp \
|
||||
$(CORE_DIR)/src/fpu/fpu.cpp \
|
||||
$(CORE_DIR)/src/hardware/adlib.cpp \
|
||||
$(CORE_DIR)/src/hardware/dma.cpp \
|
||||
$(CORE_DIR)/src/hardware/gameblaster.cpp \
|
||||
$(CORE_DIR)/src/hardware/hardware.cpp \
|
||||
$(CORE_DIR)/src/hardware/iohandler.cpp \
|
||||
$(CORE_DIR)/src/hardware/joystick.cpp \
|
||||
$(CORE_DIR)/src/hardware/keyboard.cpp \
|
||||
$(CORE_DIR)/src/hardware/memory.cpp \
|
||||
$(CORE_DIR)/src/hardware/pcspeaker.cpp \
|
||||
$(CORE_DIR)/src/hardware/pci_bus.cpp \
|
||||
$(CORE_DIR)/src/hardware/pic.cpp \
|
||||
$(CORE_DIR)/src/hardware/sblaster.cpp \
|
||||
$(CORE_DIR)/src/hardware/tandy_sound.cpp \
|
||||
$(CORE_DIR)/src/hardware/timer.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_attr.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_crtc.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_dac.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_draw.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_gfx.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_other.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_memory.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_misc.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_seq.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_xga.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_s3.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_tseng.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_paradise.cpp \
|
||||
$(CORE_DIR)/src/hardware/cmos.cpp \
|
||||
$(CORE_DIR)/src/hardware/disney.cpp \
|
||||
$(CORE_DIR)/src/hardware/gus.cpp \
|
||||
$(CORE_DIR)/src/hardware/mpu401.cpp \
|
||||
$(CORE_DIR)/src/hardware/dbopl.cpp \
|
||||
$(CORE_DIR)/src/ints/mouse.cpp \
|
||||
$(CORE_DIR)/src/ints/xms.cpp \
|
||||
$(CORE_DIR)/src/ints/ems.cpp \
|
||||
$(CORE_DIR)/src/ints/int10.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_char.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_memory.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_misc.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_modes.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_vesa.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_pal.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_put_pixel.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_video_state.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_vptable.cpp \
|
||||
$(CORE_DIR)/src/ints/bios.cpp \
|
||||
$(CORE_DIR)/src/ints/bios_disk.cpp \
|
||||
$(CORE_DIR)/src/ints/bios_keyboard.cpp \
|
||||
$(CORE_DIR)/src/misc/cross.cpp \
|
||||
$(CORE_DIR)/src/misc/messages.cpp \
|
||||
$(CORE_DIR)/src/misc/programs.cpp \
|
||||
$(CORE_DIR)/src/misc/setup.cpp \
|
||||
$(CORE_DIR)/src/misc/support.cpp \
|
||||
$(CORE_DIR)/src/shell/shell.cpp \
|
||||
$(CORE_DIR)/src/shell/shell_batch.cpp \
|
||||
$(CORE_DIR)/src/shell/shell_cmds.cpp \
|
||||
$(CORE_DIR)/src/shell/shell_misc.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/directserial.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/libserial.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/serialdummy.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/serialport.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/softmodem.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/misc_util.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/nullmodem.cpp \
|
||||
$(CORE_DIR)/libretro/dosbox.cpp \
|
||||
$(CORE_DIR)/libretro/render.cpp \
|
||||
$(CORE_DIR)/libretro/render_scalers.cpp \
|
||||
$(CORE_DIR)/libretro/libretro.cpp \
|
||||
$(CORE_DIR)/libretro/dos_gfx.cpp \
|
||||
$(CORE_DIR)/libretro/mapper.cpp \
|
||||
$(CORE_DIR)/libretro/mixer-retro.cpp \
|
||||
$(CORE_DIR)/libretro/nonlibc/snprintf.cpp \
|
||||
$(CORE_DIR)/src/midi/midi.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/Analog.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/BReverbModel.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/File.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/FileStream.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/LA32Ramp.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/LA32WaveGenerator.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/MidiStreamParser.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/Part.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/Partial.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/PartialManager.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/Poly.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/ROMInfo.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/Synth.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/Tables.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/TVA.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/TVF.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/TVP.cpp \
|
||||
$(CORE_DIR)/src/midi/munt/sha1/sha1.cpp
|
||||
|
||||
SOURCES_C := $(LIBRETRO_COMM_DIR)/libco/libco.c
|
||||
|
||||
ifneq ($(STATIC_LINKING), 1)
|
||||
SOURCES_C += $(LIBRETRO_COMM_DIR)/file/retro_dirent.c \
|
||||
$(LIBRETRO_COMM_DIR)/file/retro_stat.c
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_DYNAREC), arm)
|
||||
COMMONFLAGS += -DC_DYNREC="1" -DC_TARGETCPU="ARMV7LE"
|
||||
else ifeq ($(WITH_DYNAREC), arm64)
|
||||
COMMONFLAGS += -DC_DYNREC="1" -DC_TARGETCPU="ARMV8LE" -DC_UNALIGNED_MEMORY="1"
|
||||
else ifeq ($(WITH_DYNAREC), oldarm)
|
||||
COMMONFLAGS += -DC_DYNREC="1" -DC_TARGETCPU="ARMV4LE"
|
||||
else ifeq ($(WITH_DYNAREC), x86_64)
|
||||
# dynarec currently broken in x86_64
|
||||
ifneq ($(platform),win)
|
||||
COMMONFLAGS += -DC_DYNREC="1" -DC_TARGETCPU="X86_64"
|
||||
endif
|
||||
else ifeq ($(WITH_DYNAREC), x86)
|
||||
COMMONFLAGS += -DC_DYNAMIC_X86="1" -DC_TARGETCPU="X86"
|
||||
else ifeq ($(WITH_DYNAREC), ppc)
|
||||
COMMONFLAGS += -DC_DYNREC="1" -DC_TARGETCPU="POWERPC"
|
||||
else ifeq ($(WITH_DYNAREC), mips)
|
||||
COMMONFLAGS += -DC_DYNREC="0" -DC_TARGETCPU="MIPSEL"
|
||||
endif
|
||||
@@ -1,263 +0,0 @@
|
||||
DEBUG := 0
|
||||
GIT_VERSION := " $(shell git rev-parse --short HEAD)"
|
||||
|
||||
UNAME=$(shell uname -s)
|
||||
UNAMEM=$(shell uname -m)
|
||||
|
||||
platform ?= unix
|
||||
ifneq ($(findstring MINGW,$(UNAME)),)
|
||||
platform = win
|
||||
else ifneq ($(findstring Darwin,$(UNAME)),)
|
||||
platform = osx
|
||||
else ifneq ($(findstring win,$(UNAME)),)
|
||||
platform = win
|
||||
endif
|
||||
|
||||
LIBRETRO_DIR := libretro
|
||||
TARGET_NAME := dosbox
|
||||
WITH_DYNAREC :=
|
||||
|
||||
CORE_DIR := .
|
||||
INCFLAGS :=
|
||||
SOURCES_C :=
|
||||
SOURCES_CXX :=
|
||||
|
||||
include Makefile.common
|
||||
|
||||
# try to guess the dynarec based on the host system, unreliable
|
||||
ifeq ($(platform),win)
|
||||
ifneq ($(findstring MINGW32,$(UNAME)),)
|
||||
WITH_DYNAREC=x86
|
||||
else ifneq ($(findstring MINGW64,$(UNAME)),)
|
||||
WITH_DYNAREC=x86_64
|
||||
endif
|
||||
else ifeq ($(platform),unix)
|
||||
ifneq ($(findstring i686,$(UNAMEM)),)
|
||||
WITH_DYNAREC=x86
|
||||
else ifneq ($(findstring x86_64,$(UNAMEM)),)
|
||||
WITH_DYNAREC=x86_64
|
||||
endif
|
||||
else ifeq ($(platform),osx)
|
||||
ifneq ($(findstring i686,$(UNAMEM)),)
|
||||
WITH_DYNAREC=x86
|
||||
else ifneq ($(findstring x86_64,$(UNAMEM)),)
|
||||
WITH_DYNAREC=x86_64
|
||||
else ifneq ($(findstring arm64,$(UNAMEM)),)
|
||||
WITH_DYNAREC=arm64
|
||||
endif
|
||||
endif
|
||||
|
||||
# defines for sbcs
|
||||
ifeq ($(target), cpi)
|
||||
COMMONFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
||||
WITH_DYNAREC = arm
|
||||
else ifeq ($(target), nintendoc)
|
||||
COMMONFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
||||
WITH_DYNAREC = arm
|
||||
endif
|
||||
|
||||
# flags
|
||||
ifeq ($(platform),unix)
|
||||
COMMONFLAGS += -DC_HAVE_MPROTECT="1"
|
||||
TARGET := $(TARGET_NAME)_libretro.so
|
||||
LDFLAGS += -shared -Wl,--version-script=libretro/link.T
|
||||
fpic = -fPIC
|
||||
else ifeq ($(platform),osx)
|
||||
COMMONFLAGS += -DC_HAVE_MPROTECT="1"
|
||||
ifneq ($(findstring arm64,$(UNAMEM)),)
|
||||
COMMONFLAGS += -DHAVE_POSIX_MEMALIGN=1
|
||||
endif
|
||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||
LDFLAGS += -dynamiclib
|
||||
fpic = -fPIC
|
||||
ifeq ($(arch),ppc)
|
||||
COMMONFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__
|
||||
endif
|
||||
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
|
||||
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
|
||||
fpic += -mmacosx-version-min=10.1
|
||||
ifndef ($(UNIVERSAL))
|
||||
CFLAGS += $(ARCHFLAGS)
|
||||
CXXFLAGS += $(ARCHFLAGS)
|
||||
LDFLAGS += $(ARCHFLAGS)
|
||||
endif
|
||||
else ifneq (,$(findstring ios,$(platform)))
|
||||
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
||||
COMMONFLAGS += -DHAVE_POSIX_MEMALIGN=1 -marm
|
||||
fpic = -fPIC
|
||||
LDFLAGS += -dynamiclib
|
||||
ifeq ($(IOSSDK),)
|
||||
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
|
||||
endif
|
||||
ifeq ($(platform),ios-arm64)
|
||||
CC = cc -arch arm64 -isysroot $(IOSSDK)
|
||||
CXX = c++ -arch arm64 -isysroot $(IOSSDK)
|
||||
WITH_DYNAREC = arm64
|
||||
else
|
||||
CC = cc -arch armv7 -isysroot $(IOSSDK)
|
||||
CXX = c++ -arch armv7 -isysroot $(IOSSDK)
|
||||
WITH_DYNAREC = arm
|
||||
endif
|
||||
COMMONFLAGS += -DIOS
|
||||
ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
|
||||
CC += -miphoneos-version-min=8.0
|
||||
COMMONFLAGS += -miphoneos-version-min=8.0
|
||||
else
|
||||
CC += -miphoneos-version-min=5.0
|
||||
COMMONFLAGS += -miphoneos-version-min=5.0
|
||||
endif
|
||||
else ifeq ($(platform),tvos-arm64)
|
||||
TARGET := $(TARGET_NAME)_libretro_tvos.dylib
|
||||
COMMONFLAGS += -DHAVE_POSIX_MEMALIGN=1 -marm
|
||||
fpic = -fPIC
|
||||
LDFLAGS += -dynamiclib
|
||||
ifeq ($(IOSSDK),)
|
||||
IOSSDK := $(shell xcodebuild -version -sdk appletvos Path)
|
||||
endif
|
||||
COMMONFLAGS += -DIOS
|
||||
|
||||
else ifeq ($(platform),psp1)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = psp-gcc$(EXE_EXT)
|
||||
CXX = psp-g++$(EXE_EXT)
|
||||
AR = psp-ar$(EXE_EXT)
|
||||
WITH_DYNAREC = mips
|
||||
COMMONFLAGS += -DPSP -G0
|
||||
STATIC_LINKING = 1
|
||||
else ifeq ($(platform),vita)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = arm-vita-eabi-gcc$(EXE_EXT)
|
||||
CXX = arm-vita-eabi-g++$(EXE_EXT)
|
||||
AR = arm-vita-eabi-ar$(EXE_EXT)
|
||||
WITH_DYNAREC = arm
|
||||
COMMONFLAGS += -DVITA
|
||||
COMMONFLAGS += -mthumb -mcpu=cortex-a9 -mfloat-abi=hard -ftree-vectorize -ffast-math -fsingle-precision-constant -funroll-loops
|
||||
COMMONFLAGS += -mword-relocations
|
||||
COMMONFLAGS += -fno-optimize-sibling-calls
|
||||
STATIC_LINKING = 1
|
||||
else ifeq ($(platform),ctr)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT)
|
||||
AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)
|
||||
WITH_DYNAREC = oldarm
|
||||
ENDIANNESS_DEFINES :=
|
||||
COMMONFLAGS += -DARM11 -D_3DS -Os -s -I$(CTRULIB)/include/
|
||||
COMMONFLAGS += -DHAVE_MKDIR
|
||||
COMMONFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
||||
COMMONFLAGS += -mword-relocations
|
||||
COMMONFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffast-math
|
||||
COMMONFLAGS += -DDISABLE_EXCEPTIONS
|
||||
COMMONFLAGS += -I$(DEVKITPRO)/libctru/include
|
||||
STATIC_LINKING = 1
|
||||
else ifeq ($(platform),ngc)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
|
||||
COMMONFLAGS += -DGEKKO -DHW_DOL -mrvl -mcpu=750 -meabi -mhard-float
|
||||
STATIC_LINKING = 1
|
||||
else ifeq ($(platform),wii)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
|
||||
COMMONFLAGS += -DGEKKO -DWII -mrvl -mcpu=750 -meabi -mhard-float -D__POWERPC__ -D__ppc__ -DWORDS_BIGENDIAN=1
|
||||
STATIC_LINKING = 1
|
||||
else ifeq ($(platform),wiiu)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
|
||||
COMMONFLAGS += -DGEKKO -DWIIU -DHW_RVL -mcpu=750 -meabi -mhard-float -D__POWERPC__ -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1 -I./deps/include/
|
||||
COMMONFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
WITH_EMBEDDED_SDL = 1
|
||||
STATIC_LINKING = 1
|
||||
WITH_DYNAREC =
|
||||
else ifneq (,$(filter $(platform), ps3 psl1ght))
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)gcc$(EXE_EXT)
|
||||
CXX = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)g++$(EXE_EXT)
|
||||
AR = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)ar$(EXE_EXT)
|
||||
COMMONFLAGS += -D__PS3__ -D__POWERPC__ -D__ppc__ -DMSB_FIRST -DWORDS_BIGENDIAN=1
|
||||
STATIC_LINKING = 1
|
||||
ifeq ($(platform),psl1ght)
|
||||
COMMONFLAGS += -D__PSL1GHT__
|
||||
endif
|
||||
else ifeq ($(platform),libnx)
|
||||
include $(DEVKITPRO)/libnx/switch_rules
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CFLAGS += -g -O2 -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
|
||||
CFLAGS += $(INCLUDE) -D__SWITCH__ -DHAVE_LIBNX
|
||||
CXXFLAGS += $(ASFLAGS) $(CFLAGS) -std=gnu++11
|
||||
CFLAGS += -std=gnu11
|
||||
WITH_DYNAREC =
|
||||
STATIC_LINKING = 1
|
||||
else ifeq ($(platform),emscripten)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
|
||||
STATIC_LINKING = 1
|
||||
COMMONFLAGS += -DEMSCRIPTEN
|
||||
WITH_EMBEDDED_SDL = 1
|
||||
else ifeq ($(platform),win)
|
||||
COMMONFLAGS += -mno-ms-bitfields
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
LDFLAGS += -shared -static-libgcc -static-libstdc++ -Wl,--version-script=libretro/link.T -lwinmm -Wl,-Bstatic `sdl-config --static-libs` -Wl,-Bdynamic
|
||||
else ifeq ($(platform),genode)
|
||||
TARGET := $(TARGET_NAME)_libretro.lib.so
|
||||
CC := $(shell pkg-config genode-base --variable=cc)
|
||||
CXX := $(shell pkg-config genode-base --variable=cxx)
|
||||
LD := $(shell pkg-config genode-base --variable=ld)
|
||||
CXXFLAGS += $(shell pkg-config --cflags genode-stdcxx)
|
||||
CFLAGS += $(shell pkg-config --cflags genode-libc)
|
||||
LDFLAGS += -shared --version-script=libretro/link.T
|
||||
LDFLAGS += $(shell pkg-config --libs genode-lib genode-libc genode-stdcxx)
|
||||
COMMONFLAGS += -D__GENODE__
|
||||
O_LEVEL = -O1
|
||||
LIBM =
|
||||
# Genode-specific stack allocation code for libco
|
||||
SOURCES_CXX += $(LIBRETRO_COMM_DIR)/libco/genode.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
COMMONFLAGS += -O0 -g
|
||||
else
|
||||
O_LEVEL ?= -O3
|
||||
COMMONFLAGS += $(O_LEVEL) -DNDEBUG -DGIT_VERSION=\"$(GIT_VERSION)\" -DSVN_VERSION=\"$(SVN_VERSION)\"
|
||||
endif
|
||||
|
||||
OBJECTS = $(sort $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o))
|
||||
# The C++ here is C++11 at least - setup.h uses noexcept - and C++14 at most,
|
||||
# since the dynarec headers still say `register`, which C++17 removed. Nothing
|
||||
# says which standard a compiler will pick by default: clang on macOS picks
|
||||
# gnu++98 and stops on the first noexcept, while the NDK picks C++17 and stops
|
||||
# on the first register. So say it, unless the platform above already has.
|
||||
ifeq ($(findstring -std=,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -std=gnu++14
|
||||
endif
|
||||
|
||||
CXXFLAGS += -D__LIBRETRO__ $(fpic) $(INCFLAGS) $(COMMONFLAGS)
|
||||
CFLAGS += -D__LIBRETRO__ $(fpic) $(INCFLAGS) $(COMMONFLAGS)
|
||||
LIBM ?= -lm
|
||||
LDFLAGS += $(LIBM) $(fpic)
|
||||
|
||||
all: $(TARGET)
|
||||
$(TARGET): $(OBJECTS)
|
||||
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
$(AR) rcs $@ $(OBJECTS)
|
||||
else ifeq ($(platform),genode)
|
||||
$(LD) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
else
|
||||
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $^ -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $^ -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(TARGET)
|
||||
|
||||
.PHONY: clean install uninstall
|
||||
@@ -1,3 +1,29 @@
|
||||
0.74-3
|
||||
A security release for DOSBox 0.74:
|
||||
- Fixed that a very long line inside a bat file would overflow the parsing
|
||||
buffer (CVE-2019-7165 by Alexandre Bartel)
|
||||
- Added a basic permission system so that a program running inside DOSBox
|
||||
can't access the contents of /proc (e.g. /proc/self/mem) when / or /proc
|
||||
were (to be) mounted (CVE-2019-12594 by Alexandre Bartel)
|
||||
- Several other fixes for out of bounds access and buffer overflows.
|
||||
- Some fixes to the OpenGL rendering.
|
||||
|
||||
It's recommended to use config -securemode when dealing with untrusted
|
||||
files.
|
||||
See the Changelog for all the changes.
|
||||
|
||||
0.74-2
|
||||
A maintenance release for DOSBox 0.74, which solves the following problems:
|
||||
|
||||
- Windows: Fix auto/max cycles algorithm on Windows 7, which helps with
|
||||
stuttering audio.
|
||||
- Mac OS X: Bring a 64 bit version and improve performance.
|
||||
- Linux: Fix the 64bit dynrec cpu core and a lot of compilation problems.
|
||||
Add patches for the WINE Team.
|
||||
|
||||
The game compatibility should be identical to 0.74.
|
||||
See the Changelog for a full list of changes.
|
||||
|
||||
0.74
|
||||
- Several small game specific fixes/hacks/support. (Offensive,
|
||||
Roadhog, GTA installer, Kingdom O' Magic soundcard detection,
|
||||
|
||||
-1556
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,206 @@
|
||||
# DOSBox-core
|
||||
|
||||
A libretro core of [DOSBox](https://www.dosbox.com) for use in
|
||||
[RetroArch](https://www.retroarch.com) and other
|
||||
[libretro frontends](https://www.libretro.com/index.php/powered-by-libretro).
|
||||
DOSBox-core is kept up to date with the latest sources from DOSBox SVN trunk.
|
||||
|
||||
The core provides some improvements over the DOSBox-SVN core:
|
||||
|
||||
* Native MIDI support on Linux and Windows.
|
||||
You can select the MIDI output port in the core settings. The core will try
|
||||
to select the correct MIDI device even if the MIDI port changes in the
|
||||
future, as it remembers the MIDI port by name, not by number.
|
||||
|
||||
Native MIDI support allows you to use any stand-alone MIDI synth, like the
|
||||
Munt MT-32 emulator or Roland's Sound Canvas emulator VSTi plugin "Sound
|
||||
Canvas VA," which you can run using a VSTi host like
|
||||
[Falcosoft Midi Player](https://www.vogons.org/viewtopic.php?f=5&t=48207),
|
||||
which is shown running on Linux through Wine in this screenshot:
|
||||
|
||||
<img src="/docs/images/screenshot_ultima8_scva.jpg?raw=true" alt="screenshot" style="width: 40%;"/>
|
||||
|
||||
* Cycle-accurate OPL3 (YMF262) emulation option.
|
||||
Using [Nuked OPL3](https://nukeykt.retrohost.net).
|
||||
|
||||
* Built-in MT-32, CM32-L and LAPC-I emulation.
|
||||
Using [Munt](https://github.com/munt/munt).
|
||||
|
||||
* Built-in soundfont-based MIDI synthesizer.
|
||||
- Using [FluidSynth](http://www.fluidsynth.org), a MIDI software synthesizer
|
||||
that supports SF2/SF3 soundfonts.
|
||||
- Using [BASSMIDI](https://www.un4seen.com), a MIDI software synthesizer that
|
||||
supports SF2/SFZ soundfonts.
|
||||
|
||||
* Support for CUE CD images with split audio tracks.
|
||||
Audio tracks can be WAV, FLAC, Opus, Ogg Vorbis or MP3 files.
|
||||
|
||||
* Experimental 3dfx Voodoo support.
|
||||
This is based on a [patch by kekko](https://www.vogons.org/viewtopic.php?t=41853),
|
||||
which in turn is based on MAME code. Currently, only software-based emulation
|
||||
is provided and as a result it is very slow. Most games will probably not be
|
||||
able to run at full speed yet.
|
||||
|
||||
* On-screen virtual keyboard.
|
||||
Ported over by [sonninnos](https://github.com/sonninnos) from the
|
||||
[UAE](https://github.com/libretro/libretro-uae) and
|
||||
[VICE](https://github.com/libretro/vice-libretro) cores.
|
||||
|
||||
* Pinhack support.
|
||||
A [patch by Felipe Sanches](https://github.com/DeXteRrBDN/dosbox-pinhack)
|
||||
that allows some pinball games (like Pinball Dreams, Pinball Fantasies and
|
||||
others) to show the whole table at once without scrolling. There is a
|
||||
[discussion thread over at Vogons](https://www.vogons.org/viewtopic.php?f=41&t=12424)
|
||||
about this patch.
|
||||
|
||||
* Better support for .conf files.
|
||||
When a .conf file is loaded as content, the dosbox settings specified in the
|
||||
.conf file will not conflict with core options. The core options will be
|
||||
synced with the .conf file settings and marked as locked.
|
||||
|
||||
It's also possible to load the default DOSBox-core.conf file in the libretro
|
||||
saves directory, if it exists. This is disabled by default but can be enabled
|
||||
in the core options. This is equivalent to using the "-userconf" flag in
|
||||
stand-alone dosbox.
|
||||
|
||||
* Other general, under-the-hood improvements and bugfixes.
|
||||
|
||||
DOSBox-core was originally based on the https://github.com/libretro/dosbox-svn
|
||||
libretro core, developed mainly by [Radius](https://github.com/fr500) as well
|
||||
as other contributors (the full commit history has been preserved.)
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
* Linux (x86, x86-64, ARMv7 (armhf), ARM64)
|
||||
* Windows 7 or later
|
||||
* macOS 10.9 (Mavericks) or later
|
||||
* Android
|
||||
|
||||
It may work on other platforms as well if you build from source.
|
||||
|
||||
## Usage
|
||||
|
||||
You can load .exe, .bat, .iso, .cue, and .conf files directly. Note that when
|
||||
loading content, the current directory is set to the content's directory. This
|
||||
means it is possible to use relative paths in your `mount` and `imgmount`
|
||||
commands.
|
||||
|
||||
The recommended way to run DOS games is to have a .conf file for each game and
|
||||
then use the manual scanner in RetroArch to scan for `conf` files. For example,
|
||||
here is:
|
||||
|
||||
```text
|
||||
Ultima VII - The Black Gate.conf
|
||||
```
|
||||
|
||||
for running Ultima 7 when the game's DOS installation is inside the
|
||||
`drive_c/ultima71` folder and the game expects to be available in `C:\ultima71`
|
||||
inside DOS:
|
||||
|
||||
```ini
|
||||
[dos]
|
||||
xms = true
|
||||
ems = false
|
||||
umb = false
|
||||
|
||||
[autoexec]
|
||||
@echo off
|
||||
mixer sb 50:50 /noshow
|
||||
mount c drive_c
|
||||
c:
|
||||
cd ultima71
|
||||
ultima7.com
|
||||
exit
|
||||
```
|
||||
|
||||
This game is known to not run correctly with EMS and UMB, and runs best with
|
||||
XMS, so you can set those dosbox settings as shown above. The respective core
|
||||
options for XMS, EMS and UMB will be locked.
|
||||
|
||||
Specifying dosbox settings in the .conf file is optional. In this example, you
|
||||
could just as well configure XMS, EMS and UMB using the core options instead.
|
||||
But if you prefer to configure settings in .conf files, you can do it without
|
||||
worrying that those settings might conflict with core options.
|
||||
|
||||
### Cycling between mounted CD images
|
||||
|
||||
If you mount multiple CD images to the same CD-ROM drive:
|
||||
|
||||
```text
|
||||
imgmount d cd1.cue cd2.cue cd3.cue -t cdrom
|
||||
```
|
||||
|
||||
You can cycle between them with CTRL+F4.
|
||||
|
||||
### Temporary adjustment of CPU cycles
|
||||
|
||||
You can decrease/increase current CPU cycles using CTRL+F11 and CTRL+F12. The
|
||||
cycle decrement/increment amount can be configured in the core options. The
|
||||
change in cycles is only temporary and will not be saved permanently.
|
||||
|
||||
### MT-32
|
||||
|
||||
For MT-32 emulation, make sure you have the correct MT-32 ROMs in your
|
||||
frontend's system directory. See the `dosbox_core_libretro.info` file for the
|
||||
ROM filenames and MD5 checksums.
|
||||
|
||||
### BASSMIDI
|
||||
|
||||
To use BASSMIDI for MIDI output, you need to download the BASS and BASSMIDI
|
||||
dynamic libraries for your OS from https://www.un4seen.com and place them in
|
||||
the system folder of your frontend. These files are not included with
|
||||
DOSBox-core due to licensing issues.
|
||||
|
||||
On Linux you need `libbass.so` and `libbassmidi.so`, on Windows `bass.dll` and
|
||||
`bassmidi.dll`, and on macOS `libbass.dylib` and `libbassmidi.dylib`. Make sure
|
||||
to use the 32-bit or 64-bit versions of these files depending on whether your
|
||||
frontend is 32-bit or 64-bit.
|
||||
|
||||
## Compilation
|
||||
|
||||
Building the core requires a C++17 compiler. GCC 9 and Clang 9 are known to
|
||||
work. When building on macOS with XCode Clang, macOS 10.15 and XCode 11.1 are
|
||||
required. Using GCC instead will allow building for older macOS versions.
|
||||
|
||||
CMake and Ninja are also assumed to be installed in order to build the bundled
|
||||
dependencies.
|
||||
|
||||
Most of the dependencies are bundled. They are built and linked statically.
|
||||
See `Makefile.libretro` for which make variables to set to enable/disable the
|
||||
bundled libraries.
|
||||
|
||||
The only dependencies that are not bundled are alsa-lib, which is only needed
|
||||
on Linux, and dlfnc which is needed on Windows. dlfcn is available as a package
|
||||
in both MXE as well as MSYS2.
|
||||
|
||||
To build on Linux x86-64 with the bundled audio, libsndfile, SDL and SDL_net
|
||||
libraries, you would do:
|
||||
|
||||
cd libretro
|
||||
make BUNDLED_AUDIO_CODECS=1 BUNDLED_LIBSNDFILE=1 BUNDLED_SDL=1 WITH_DYNAREC=x86_64 deps
|
||||
make BUNDLED_AUDIO_CODECS=1 BUNDLED_LIBSNDFILE=1 BUNDLED_SDL=1 WITH_DYNAREC=x86_64 -j`nproc`
|
||||
|
||||
The first `make` invokation will build the bundled dependencies, the second
|
||||
will built the core itself. You can omit the first invokation and the deps
|
||||
will be built regardless, but doing it this way results in a faster build.
|
||||
|
||||
Note that the `clean` target will clean both dependency
|
||||
and core object files. To clean just core objects, use the `targetclean`
|
||||
target. To clean deps only, use `depsclean`.
|
||||
|
||||
To specify which compiler to use, set the `CC` and `CXX` environment
|
||||
variables. For example:
|
||||
|
||||
CC=gcc-9 CXX=g++-9 make ...
|
||||
|
||||
If you want to cross-compile, you should set `TARGET_TRIPLET` to the prefix
|
||||
string of your cross compilation toolchain. If your toolchain uses wrappers for
|
||||
cmake and pkg-config, pass their full names when calling make. For example:
|
||||
|
||||
make TARGET_TRIPLET="i686-w64-mingw32.static" \
|
||||
PKGCONFIG="i686-w64-mingw32.static-pkg-config" \
|
||||
CMAKE="i686-w64-mingw32.static-cmake" \
|
||||
...
|
||||
|
||||
If you want to use a different CMake generator when building dependencies that
|
||||
use CMake, set the `CMAKE_GENERATOR` variable. By default, it's set to `Ninja`.
|
||||
+410
@@ -0,0 +1,410 @@
|
||||
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_SDL],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the sdl-config script
|
||||
dnl
|
||||
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
|
||||
sdl_prefix="$withval", sdl_prefix="")
|
||||
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
|
||||
sdl_exec_prefix="$withval", sdl_exec_prefix="")
|
||||
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
|
||||
, enable_sdltest=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/sdl-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/sdl-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(SDL_CONFIG, sdl-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`
|
||||
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
|
||||
|
||||
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 sdl-config to some extent
|
||||
dnl
|
||||
rm -f conf.sdltest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "SDL.h"
|
||||
|
||||
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*** 'sdl-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 sdl-config is correct, then it is\n", major, minor, micro);
|
||||
printf("*** best to upgrade to the required version.\n");
|
||||
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
|
||||
printf("*** to point to the correct copy of sdl-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 sdl-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 sdl-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 <stdio.h>
|
||||
#include "SDL.h"
|
||||
], [ 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 sdl-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
|
||||
])
|
||||
|
||||
dnl Configure Paths for Alsa
|
||||
dnl Some modifications by Richard Boulton <[email protected]>
|
||||
dnl Christopher Lansdown <[email protected]>
|
||||
dnl Jaroslav Kysela <[email protected]>
|
||||
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.
|
||||
dnl
|
||||
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 <alsa/asoundlib.h>
|
||||
], [
|
||||
/* 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)
|
||||
])
|
||||
|
||||
AH_TOP([
|
||||
/*
|
||||
* 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 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])
|
||||
|
||||
AH_BOTTOM([#if C_ATTRIBUTE_FASTCALL
|
||||
#define DB_FASTCALL __attribute__((fastcall))
|
||||
#else
|
||||
#define DB_FASTCALL
|
||||
#endif])
|
||||
|
||||
|
||||
AH_BOTTOM([#if C_HAS_ATTRIBUTE
|
||||
#define GCC_ATTRIBUTE(x) __attribute__ ((x))
|
||||
#else
|
||||
#define GCC_ATTRIBUTE(x) /* attribute not supported */
|
||||
#endif])
|
||||
|
||||
AH_BOTTOM([#if C_HAS_BUILTIN_EXPECT
|
||||
#define GCC_UNLIKELY(x) __builtin_expect((x),0)
|
||||
#define GCC_LIKELY(x) __builtin_expect((x),1)
|
||||
#else
|
||||
#define GCC_UNLIKELY(x) (x)
|
||||
#define GCC_LIKELY(x) (x)
|
||||
#endif])
|
||||
|
||||
AH_BOTTOM([
|
||||
typedef double Real64;
|
||||
|
||||
#if SIZEOF_UNSIGNED_CHAR != 1
|
||||
# error "sizeof (unsigned char) != 1"
|
||||
#else
|
||||
typedef unsigned char Bit8u;
|
||||
typedef signed char Bit8s;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_UNSIGNED_SHORT != 2
|
||||
# error "sizeof (unsigned short) != 2"
|
||||
#else
|
||||
typedef unsigned short Bit16u;
|
||||
typedef signed short Bit16s;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_UNSIGNED_INT == 4
|
||||
typedef unsigned int Bit32u;
|
||||
typedef signed int Bit32s;
|
||||
#define sBit32t
|
||||
#elif SIZEOF_UNSIGNED_LONG == 4
|
||||
typedef unsigned long Bit32u;
|
||||
typedef signed long Bit32s;
|
||||
#define sBit32t "l"
|
||||
#else
|
||||
# error "can't find sizeof(type) of 4 bytes!"
|
||||
#endif
|
||||
#define sBit32fs(a) sBit32t #a
|
||||
|
||||
#if SIZEOF_UNSIGNED_LONG == 8
|
||||
typedef unsigned long Bit64u;
|
||||
typedef signed long Bit64s;
|
||||
#define sBit64t "l"
|
||||
#elif SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
typedef unsigned long long Bit64u;
|
||||
typedef signed long long Bit64s;
|
||||
#define sBit64t "ll"
|
||||
#else
|
||||
# error "can't find data type of 8 bytes"
|
||||
#endif
|
||||
#define sBit64fs(a) sBit64t #a
|
||||
|
||||
#if SIZEOF_INT_P == 4
|
||||
|
||||
typedef Bit32u Bitu;
|
||||
typedef Bit32s Bits;
|
||||
#define sBitfs sBit32fs
|
||||
|
||||
#else //SIZEOF_INT_P
|
||||
|
||||
typedef Bit64u Bitu;
|
||||
typedef Bit64s Bits;
|
||||
#define sBitfs sBit64fs
|
||||
|
||||
#endif
|
||||
|
||||
])
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Generating build information using aclocal, autoheader, automake and autoconf"
|
||||
echo "This may take a while ..."
|
||||
|
||||
# Regenerate configuration files.
|
||||
|
||||
aclocal
|
||||
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."
|
||||
+702
@@ -0,0 +1,702 @@
|
||||
dnl Init.
|
||||
AC_INIT(dosbox,SVN)
|
||||
AC_PREREQ(2.50)
|
||||
AC_CONFIG_SRCDIR(README)
|
||||
|
||||
dnl Detect the canonical host and target build environment
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
dnl Setup for automake
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Some needed libaries for OS2
|
||||
dnl perharps join this with the other target depended checks. move them upwards
|
||||
if test x$host = xi386-pc-os2-emx ; then
|
||||
CXXFLAGS="$CXXFLAGS -Zmt"
|
||||
LDFLAGS="$LDFLAGS -Zmt"
|
||||
fi
|
||||
|
||||
dnl Check for SDL
|
||||
SDL_VERSION=1.2.0
|
||||
AM_PATH_SDL($SDL_VERSION,
|
||||
:,
|
||||
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
||||
)
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
|
||||
|
||||
dnl Check if SDL is 1.2.x (1.3 not supported)
|
||||
AC_MSG_CHECKING([SDL version only being 1.2.X])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#include "SDL.h"
|
||||
void blah(){
|
||||
#if SDL_MINOR_VERSION != 2
|
||||
#error "Only SDL 1.2 supported"
|
||||
#endif
|
||||
;
|
||||
}
|
||||
])],AC_MSG_RESULT([yes]),[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Only libSDL 1.2.X supported])])
|
||||
|
||||
dnl Checks for header files.
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_STRUCT_TM
|
||||
AC_CHECK_SIZEOF(unsigned char)
|
||||
AC_CHECK_SIZEOF(unsigned short)
|
||||
AC_CHECK_SIZEOF(unsigned int)
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
AC_CHECK_SIZEOF(unsigned long long)
|
||||
AC_CHECK_SIZEOF(int *)
|
||||
|
||||
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 <stdio.h>
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
dnl check for the socklen_t (darwin doesn't always have it)
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#include <stdio.h>
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
#else
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#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 <unistd.h>
|
||||
#include <stdlib.h>]],[[*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 <sys/types.h>
|
||||
#include <dirent.h>
|
||||
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 Check for powf
|
||||
AC_MSG_CHECKING(for powf in libm);
|
||||
LIBS_BACKUP=$LIBS;
|
||||
LIBS="$LIBS -lm";
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],[[
|
||||
powf(1.0f, 1.0f);
|
||||
]])], [AC_MSG_RESULT(yes)], [AC_DEFINE([DB_HAVE_NO_POWF],[1],[libm doesn't include powf])])
|
||||
LIBS=$LIBS_BACKUP
|
||||
|
||||
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))
|
||||
|
||||
AH_TEMPLATE([C_ATTRIBUTE_FASTCALL],[Determines if the compiler supports fastcall attribute.])
|
||||
AC_MSG_CHECKING(if compiler allows __attribute__((fastcall)) )
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([ void __attribute__((fastcall)) test(){}
|
||||
])],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_FASTCALL)],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 test if compiler supports -mno-ms-bitfields as it is bugged
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991
|
||||
BACKUP_CFLAGS="$CFLAGS"
|
||||
CFLAGS="-mno-ms-bitfields"
|
||||
AC_MSG_CHECKING(if compiler supports -mno-ms-bitfields)
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
void blah(){
|
||||
;
|
||||
}
|
||||
])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
CXXFLAGS="$CXXFLAGS -mno-ms-bitfields"
|
||||
],[AC_MSG_RESULT([no])])
|
||||
CFLAGS="$BACKUP_CFLAGS"
|
||||
|
||||
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 <CoreMIDI/MIDIServices.h>
|
||||
int blah() { return 0; }
|
||||
]])], [AC_MSG_RESULT(yes);LIBS="$LIBS -framework CoreMIDI";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 <AudioToolbox/AUGraph.h>
|
||||
#include <CoreServices/CoreServices.h>
|
||||
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!]))
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_CHECKING(if compiler supports Apple's MIDI headers)
|
||||
AC_MSG_RESULT([no, not on Apple])
|
||||
;;
|
||||
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
|
||||
|
||||
#Check for big endian machine, should #define WORDS_BIGENDIAN if so
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
#Features to enable/disable
|
||||
AH_TEMPLATE(C_DEBUG,[Define to 1 to enable internal debugger, requires libcurses])
|
||||
AH_TEMPLATE(C_HEAVY_DEBUG,[Define to 1 to enable heavy debugging, also have to enable C_DEBUG])
|
||||
AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[Enable debug mode]),[
|
||||
AC_CHECK_HEADER(curses.h,have_curses_h=yes,)
|
||||
AC_CHECK_LIB(curses, initscr, have_curses_lib=yes, , )
|
||||
AC_CHECK_LIB(ncurses, initscr, have_ncurses_lib=yes, , )
|
||||
AC_CHECK_LIB(pdcurses, initscr, have_pdcurses_lib=yes, , )
|
||||
|
||||
if test x$enable_debug = xno; then
|
||||
AC_MSG_RESULT([Debugger not enabled])
|
||||
elif test x$have_ncurses_lib = xyes -a x$have_curses_h = xyes ; then
|
||||
LIBS="$LIBS -lncurses"
|
||||
if test x$host = xi386-pc-os2-emx ; then
|
||||
LIBS="$LIBS -ltinfo"
|
||||
fi
|
||||
AC_DEFINE(C_DEBUG,1)
|
||||
if test x$enable_debug = xheavy ; then
|
||||
AC_DEFINE(C_HEAVY_DEBUG,1)
|
||||
fi
|
||||
elif test x$have_curses_lib = xyes -a x$have_curses_h = xyes ; then
|
||||
LIBS="$LIBS -lcurses"
|
||||
AC_DEFINE(C_DEBUG,1)
|
||||
if test x$enable_debug = xheavy ; then
|
||||
AC_DEFINE(C_HEAVY_DEBUG,1)
|
||||
fi
|
||||
elif test x$have_pdcurses_lib = xyes -a x$have_curses_h = xyes ; then
|
||||
LIBS="$LIBS -lpdcurses"
|
||||
AC_DEFINE(C_DEBUG,1)
|
||||
if test x$enable_debug = xheavy ; then
|
||||
AC_DEFINE(C_HEAVY_DEBUG,1)
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Can't find curses, which is required for debug mode])
|
||||
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
|
||||
;;
|
||||
powerpc*)
|
||||
AC_DEFINE(C_TARGETCPU,POWERPC)
|
||||
AC_MSG_RESULT(Power PC)
|
||||
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
|
||||
AC_MSG_CHECKING([whether Apple user wants to override the build process to produce a 32 bit binary])
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
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
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no, not on Apple])
|
||||
;;
|
||||
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 ; 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]),enable_screenshots=no,enable_screenshots=yes)
|
||||
AC_CHECK_HEADER(png.h,have_png_h=yes,have_png_h=no)
|
||||
AC_CHECK_LIB(png, png_get_io_ptr, have_png_lib=yes, have_png_lib=no,-lz)
|
||||
AC_MSG_CHECKING([whether screenshots will be enabled])
|
||||
if test x$enable_screenshots = xyes; then
|
||||
if test x$have_png_lib = xyes -a x$have_png_h = xyes ; then
|
||||
LIBS="$LIBS -lpng -lz"
|
||||
AC_DEFINE(C_SSHOT,1)
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, can't find libpng.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(C_SRECORD,[Define to 1 to enable movie recording, requires zlib built without Z_SOLO])
|
||||
AC_ARG_ENABLE(recording,AC_HELP_STRING([--disable-recording],[Disable movie recording]),,enable_recording=yes)
|
||||
AC_CHECK_HEADER(zlib.h,have_zlib_h=yes)
|
||||
AC_CHECK_LIB(z,compress,have_z_lib=yes,,)
|
||||
AC_MSG_CHECKING([whether recording will be enabled])
|
||||
if test x$enable_recording = xyes; then
|
||||
if test x$have_z_lib = xyes -a x$have_zlib_h = xyes ; then
|
||||
if test x$enable_screenshots = xno -o x$have_png_h = xno -o x$have_png_lib = xno ; then
|
||||
LIBS="$LIBS -lz"
|
||||
fi
|
||||
AC_DEFINE(C_SRECORD,1)
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, can't find zlib.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(C_MODEM,[Define to 1 to enable internal modem support, requires SDL_net])
|
||||
AH_TEMPLATE(C_IPX,[Define to 1 to enable IPX over Internet networking, requires SDL_net])
|
||||
AC_CHECK_HEADER(SDL_net.h,have_sdl_net_h=yes,)
|
||||
|
||||
if test x$host = xi386-pc-os2-emx ; then
|
||||
AC_MSG_CHECKING(for SDLNet_Init in SDL_net);
|
||||
LIBS_BACKUP=$LIBS;
|
||||
LIBS="$LIBS -lSDL_Net";
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <SDL_Net.h>]],[[
|
||||
SDLNet_Init ();
|
||||
]])], [AC_MSG_RESULT(yes); have_sdl_net_lib=yes], AC_MSG_RESULT(no))
|
||||
LIBS=$LIBS_BACKUP
|
||||
else
|
||||
AC_CHECK_LIB(SDL_net, SDLNet_Init, have_sdl_net_lib=yes, , )
|
||||
fi
|
||||
if test x$have_sdl_net_lib = xyes -a x$have_sdl_net_h = xyes ; then
|
||||
LIBS="$LIBS -lSDL_net"
|
||||
AC_DEFINE(C_MODEM,1)
|
||||
AC_DEFINE(C_IPX,1)
|
||||
else
|
||||
AC_MSG_WARN([Can't find SDL_net, internal modem and ipx disabled])
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(C_X11_XKB,[define to 1 if you have XKBlib.h and X11 lib])
|
||||
AC_CHECK_LIB(X11, main, have_x11_lib=yes, have_x11_lib=no, )
|
||||
AC_CHECK_HEADER(X11/XKBlib.h, have_x11_h=yes, have_x11_h=no, )
|
||||
AC_MSG_CHECKING(for XKBlib support)
|
||||
if test x$have_x11_lib = xyes -a x$have_x11_h = xyes ; then
|
||||
LIBS="$LIBS -lX11"
|
||||
AC_DEFINE(C_X11_XKB,1)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
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"
|
||||
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
|
||||
|
||||
AH_TEMPLATE(C_DDRAW,[Define to 1 to enable output=ddraw (Win32)])
|
||||
AC_ARG_ENABLE(ddraw,AC_HELP_STRING([--disable-ddraw],[Disable ddraw support]),,enable_ddraw=yes)
|
||||
AC_CHECK_HEADER(ddraw.h, have_ddraw_h=yes , have_ddraw_h=no , )
|
||||
AC_MSG_CHECKING(whether ddraw display output will be enabled)
|
||||
if test x$enable_ddraw = xyes; then
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw32*)
|
||||
if test x$have_ddraw_h = xyes ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(C_DDRAW,1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AH_TEMPLATE(C_SDL_SOUND,[Define to 1 to enable SDL_sound support])
|
||||
AC_CHECK_HEADER(SDL_sound.h,have_SDL_sound_h=yes,)
|
||||
AC_CHECK_LIB(SDL_sound, Sound_Init, have_SDL_sound_init=yes,,)
|
||||
AC_CHECK_LIB(SDL_sound, Sound_Seek, have_SDL_sound_seek=yes,,)
|
||||
if test x$host = xi386-pc-os2-emx -a x$have_SDL_sound_init != xyes ; then
|
||||
LIBS_BACKUP=$LIBS;
|
||||
LIBS="$LIBS -lSDL_Sound -Zomf -lstdc++ -lmodplug -lsmpeg -lmikmod -logg -lspeex -lvorbis -lflac -lvorbisfile";
|
||||
AC_MSG_CHECKING(for Sound_Init in SDL_Sound on OS/2);
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <SDL_Sound.h>]],[[
|
||||
Sound_Init ();
|
||||
]])], [AC_MSG_RESULT(yes); have_SDL_sound_init=yes], AC_MSG_RESULT(no))
|
||||
AC_MSG_CHECKING(for Sound_Seek in SDL_Sound on OS/2);
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <SDL_Sound.h>]],[[
|
||||
Sound_Seek (NULL, 0);
|
||||
]])], [AC_MSG_RESULT(yes); have_SDL_sound_seek=yes], AC_MSG_RESULT(no))
|
||||
if test x$have_SDL_sound_init != xyes ; then
|
||||
LIBS=$LIBS_BACKUP
|
||||
fi
|
||||
fi
|
||||
if test x$have_SDL_sound_h = xyes -a x$have_SDL_sound_init = xyes ; then
|
||||
if test x$have_SDL_sound_seek = xyes ; then
|
||||
LIBS="-lSDL_sound $LIBS"
|
||||
AC_DEFINE(C_SDL_SOUND,1)
|
||||
else
|
||||
AC_MSG_WARN([Can't find SoundSeek in libSDL_Sound, libSDL_sound support disabled])
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([Can't find libSDL_sound, libSDL_sound support disabled])
|
||||
fi
|
||||
|
||||
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 <sys/resource.h>
|
||||
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* | *-*-mingw32*)
|
||||
LIBS="$LIBS -lwinmm"
|
||||
AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2 only).])
|
||||
if test x$have_sdl_net_lib = xyes -a x$have_sdl_net_h = xyes ; then
|
||||
LIBS="$LIBS -lws2_32"
|
||||
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, Posix and OS/2).])
|
||||
;;
|
||||
*-*-linux*)
|
||||
AC_DEFINE(LINUX, 1, [Compiling on GNU/Linux])
|
||||
AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
|
||||
;;
|
||||
*-*-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, Posix and OS/2).])
|
||||
;;
|
||||
*-*-os2-emx*)
|
||||
AC_DEFINE(OS2, 1, [Compiling on OS/2 EMX])
|
||||
AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Some stuff for the icon and other makefile platform stuff.
|
||||
dnl Slightly double with the above, but that deals more with compiled features.
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw32*)
|
||||
dnl Some stuff for the ico
|
||||
AC_CHECK_TOOL(WINDRES, windres, :)
|
||||
DBPLATFORM="win"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
WINDRES=":"
|
||||
DBPLATFORM="mac"
|
||||
;;
|
||||
*)
|
||||
WINDRES=":"
|
||||
DBPLATFORM="other"
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(HAVE_WINDRES, test "x$WINDRES" != "x:")
|
||||
AM_CONDITIONAL(MACOSX, test "x$DBPLATFORM" = "xmac")
|
||||
AC_SUBST(WINDRES)
|
||||
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
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/misc/Makefile
|
||||
src/shell/Makefile
|
||||
src/platform/Makefile
|
||||
src/platform/macosx/Makefile
|
||||
src/platform/visualc/Makefile
|
||||
visualc_net/Makefile
|
||||
include/Makefile
|
||||
docs/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,8 @@
|
||||
# Main Makefile for DOSBox
|
||||
|
||||
man_MANS = dosbox.1
|
||||
EXTRA_DIST = $(man_MANS) README.video PORTING
|
||||
|
||||
|
||||
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,35 @@
|
||||
Starting with version 0.65, DOSBox allows you to create movies out of screen
|
||||
output.
|
||||
|
||||
To record a movie, you have to press CTRL-ALT-F5.
|
||||
To stop/end the recording, you have to press CTRL-ALT-F5 again.
|
||||
|
||||
To play the recorded movie, you need a movie player which can handle the
|
||||
ZMBV codec. MS Windows users can find this codec in the start menu entry of
|
||||
DOSBox. Users of Linux and other OSes should look for a movie player that
|
||||
uses the ffmpeg libary (you may need to update or ask your distribution to
|
||||
upgrade).
|
||||
|
||||
FAQ:
|
||||
Q: During the display of the movies the sound is lagging.
|
||||
A: Check your display properties to see whether your refresh rate is set to
|
||||
at least 70 hz. Try playing the movie in virtualdub (http://virtualdub.sf.net)
|
||||
|
||||
Q: Why does the resulting movie consist of multiple files?
|
||||
A: Each time the game changes resolution, DOSBox creates a new movie file,
|
||||
because a movie file can only contain one resolution.
|
||||
|
||||
Q: Can I set the cycles higher than my PC can handle during recording?
|
||||
A: Yes. During recording, the game might play slowly and stuttering, but the
|
||||
resulting movie should play at the intended speed and have no stuttering.
|
||||
|
||||
Q: CTRL-ALT-F5 switches to the console under linux.
|
||||
A: 1. Start DOSBox like this: dosbox -startmapper
|
||||
2. Click on Video, click on Add
|
||||
3. Press the key you want (for example scroll lock or printscreen)
|
||||
4. Click exit.
|
||||
5. You can make movies by pressing scroll lock or whichever key you
|
||||
selected.
|
||||
|
||||
Q: The colours are wrong and I'm using 64 bit windows
|
||||
A: Look here: https://www.vogons.org/viewtopic.php?t=12133
|
||||
+23
-19
@@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH DOSBOX 1 "Feb 26, 2010"
|
||||
.TH DOSBOX 1 "Sep 08, 2015"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.SH NAME
|
||||
dosbox \- an x86/DOS emulator with sound/graphics
|
||||
@@ -14,10 +14,11 @@ dosbox \- an x86/DOS emulator with sound/graphics
|
||||
.BI "[\-forcescaler " scaler ]
|
||||
.BI "[\-conf " configfile ]
|
||||
.BI "[\-lang " langfile ]
|
||||
.B [file]
|
||||
.BI "[\-machine " machinetype ]
|
||||
.BI "[\-socket " socketnumber ]
|
||||
.BI "[\-c " command ]
|
||||
.B [\-exit]
|
||||
.BI "[\-machine " machinetype ]
|
||||
.B [file]
|
||||
.LP
|
||||
.B dosbox \-version
|
||||
.LP
|
||||
@@ -76,6 +77,25 @@ file for the available scalers
|
||||
.RB "Similar to the " \-scaler " parameter, but tries to force usage of"
|
||||
the specified scaler even if it might not fit.
|
||||
.TP
|
||||
.BI \-conf " configfile"
|
||||
.RB "Start " dosbox " with the options specified in "
|
||||
.IR configfile ". This file has a section in which you can put commands you "
|
||||
wish to execute on startup. Multiple
|
||||
.IR configfiles " can be present at the commandline."
|
||||
.TP
|
||||
.BI \-lang " langfile"
|
||||
.RB "Start " dosbox " with the language specified in "
|
||||
.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.
|
||||
.TP
|
||||
.BI \-socket " socketnumber"
|
||||
.RI "Passes the socket number " socketnumber " to the nullmodem emulation. See README for details."
|
||||
.TP
|
||||
.BI \-c " command"
|
||||
.RI "Runs the specified " command " before running "
|
||||
.BR file .
|
||||
@@ -83,25 +103,9 @@ the specified scaler even if it might not fit.
|
||||
.BR \-c " though. A command can be:"
|
||||
an Internal Program, a DOS command or an executable on a mounted drive.
|
||||
.TP
|
||||
.BI \-conf " configfile
|
||||
.RB "Start " dosbox " with the options specified in "
|
||||
.IR configfile ". This file has a section in which you can put commands you "
|
||||
wish to execute on startup. Multiple
|
||||
.IR configfiles " can be present at the commandline."
|
||||
.TP
|
||||
.BI \-lang " langfile
|
||||
.RB "Start " dosbox " with the language specified in "
|
||||
.IR langfile .
|
||||
.TP
|
||||
.B "\-exit "
|
||||
.BR "dosbox" " will close itself when the DOS program specified by "file " ends."
|
||||
.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.
|
||||
.TP
|
||||
.B \-version
|
||||
Output version information and exit. Useful for frontends.
|
||||
.TP
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 935 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 415 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 483 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 749 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
exec retroarch-clover dosbox "$@"
|
||||
@@ -1,22 +0,0 @@
|
||||
-----------------------
|
||||
Name: DOSBox
|
||||
Creator: Libretro
|
||||
Category: RetroArch Cores
|
||||
-----------------------
|
||||
=== DOSBox Core for RetroArch ===
|
||||
|
||||
Module adds support for DOSBox
|
||||
|
||||
Available executables and arguments to run Core:
|
||||
- /bin/dosbox <rom> <clover_args>
|
||||
|
||||
Core by libretro
|
||||
|
||||
Built and assembled by HakchiCloud - [Website](https://hakchiresources.com)
|
||||
|
||||
Hakchi module system by madmonkey
|
||||
|
||||
NES/SNES Mini shell integration by Cluster
|
||||
|
||||
(c) 2016-2018
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
noinst_HEADERS = \
|
||||
bios.h \
|
||||
bios_disk.h \
|
||||
callback.h \
|
||||
cpu.h \
|
||||
cross.h \
|
||||
control.h \
|
||||
debug.h \
|
||||
dma.h \
|
||||
dos_inc.h \
|
||||
dos_system.h \
|
||||
dosbox.h \
|
||||
fpu.h \
|
||||
hardware.h \
|
||||
inout.h \
|
||||
joystick.h \
|
||||
ipx.h \
|
||||
ipxserver.h \
|
||||
keyboard.h \
|
||||
logging.h \
|
||||
mapper.h \
|
||||
mem.h \
|
||||
midi.h \
|
||||
mixer.h \
|
||||
mouse.h \
|
||||
paging.h \
|
||||
pci_bus.h \
|
||||
pic.h \
|
||||
programs.h \
|
||||
render.h \
|
||||
regs.h \
|
||||
render.h \
|
||||
serialport.h \
|
||||
setup.h \
|
||||
shell.h \
|
||||
support.h \
|
||||
timer.h \
|
||||
vga.h \
|
||||
video.h \
|
||||
voodoo.h
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#ifndef SDL_FAKE_
|
||||
#define SDL_FAKE_
|
||||
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef VITA
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
#endif
|
||||
|
||||
typedef uint8_t Uint8;
|
||||
typedef uint16_t Uint16;
|
||||
typedef uint32_t Uint32;
|
||||
|
||||
// This is used in src/ints/bios_keyboard.cpp as a workaround for caps/num lock on old SDL versions.
|
||||
#define SDL_VERSION_ATLEAST(...) 0
|
||||
|
||||
// These are 'used' in src/dos/cdrom_image.cpp and src/dos/cdrom_ioctl_win32.cpp.
|
||||
// Really they are meant to synchronize with an audio thread, but
|
||||
// that isn't used in libreto so there is no need for these.
|
||||
typedef int SDL_mutex;
|
||||
#define SDL_CreateMutex() 0
|
||||
#define SDL_DestroyMutex(...)
|
||||
#define SDL_mutexV(...)
|
||||
#define SDL_mutexP(...)
|
||||
|
||||
// TIMER
|
||||
inline void SDL_Delay(unsigned ms)
|
||||
{
|
||||
retro_sleep(ms);
|
||||
}
|
||||
|
||||
inline unsigned SDL_GetTicks()
|
||||
{
|
||||
struct timeval t;
|
||||
gettimeofday(&t, 0);
|
||||
|
||||
return (t.tv_sec * 1000) + (t.tv_usec / 1000);
|
||||
}
|
||||
|
||||
// CD
|
||||
#define SDL_CDNumDrives() 0
|
||||
#define SDL_CDName(x) "NONE"
|
||||
struct SDL_CD {int dummy;};
|
||||
|
||||
/** @name Frames / MSF Conversion Functions
|
||||
* Conversion functions from frames to Minute/Second/Frames and vice versa
|
||||
*/
|
||||
/*@{*/
|
||||
#define CD_FPS 75
|
||||
#define FRAMES_TO_MSF(f, M,S,F) { \
|
||||
int value = f; \
|
||||
*(F) = value%CD_FPS; \
|
||||
value /= CD_FPS; \
|
||||
*(S) = value%60; \
|
||||
value /= 60; \
|
||||
*(M) = value; \
|
||||
}
|
||||
#define MSF_TO_FRAMES(M, S, F) ((M)*60*CD_FPS+(S)*CD_FPS+(F))
|
||||
/*@}*/
|
||||
|
||||
#endif
|
||||
@@ -1 +0,0 @@
|
||||
// INTENTIONALLY BLANK
|
||||
+6
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_BIOS_H
|
||||
@@ -61,6 +61,7 @@
|
||||
#define BIOS_VDU_CONTROL 0x465
|
||||
#define BIOS_VDU_COLOR_REGISTER 0x466
|
||||
/* 0x467-0x468 is reserved */
|
||||
#define BIOS_LAST_UNEXPECTED_IRQ 0x46b
|
||||
#define BIOS_TIMER 0x46c
|
||||
#define BIOS_24_HOURS_FLAG 0x470
|
||||
#define BIOS_KEYBOARD_FLAGS 0x471
|
||||
@@ -107,7 +108,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
|
||||
|
||||
+11
-9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_BIOS_DISK_H
|
||||
@@ -54,13 +54,13 @@ public:
|
||||
void Get_Geometry(Bit32u * getHeads, Bit32u *getCyl, Bit32u *getSect, Bit32u *getSectSize);
|
||||
Bit8u GetBiosType(void);
|
||||
Bit32u getSectSize(void);
|
||||
imageDisk(FILE *imgFile, Bit8u *imgName, Bit32u imgSizeK, bool isHardDisk);
|
||||
imageDisk(FILE *imgFile, const char *imgName, Bit32u imgSizeK, bool isHardDisk);
|
||||
~imageDisk() { if(diskimg != NULL) { fclose(diskimg); } };
|
||||
|
||||
bool hardDrive;
|
||||
bool active;
|
||||
FILE *diskimg;
|
||||
Bit8u diskname[512];
|
||||
char diskname[512];
|
||||
Bit8u floppytype;
|
||||
|
||||
Bit32u sector_size;
|
||||
@@ -75,15 +75,17 @@ void incrementFDD(void);
|
||||
|
||||
#define MAX_HDD_IMAGES 2
|
||||
|
||||
extern imageDisk *imageDiskList[2 + MAX_HDD_IMAGES];
|
||||
extern imageDisk *diskSwap[20];
|
||||
#define MAX_DISK_IMAGES (2 + MAX_HDD_IMAGES)
|
||||
|
||||
extern imageDisk *imageDiskList[MAX_DISK_IMAGES];
|
||||
extern imageDisk *diskSwap[MAX_SWAPPABLE_DISKS];
|
||||
extern Bit32s swapPosition;
|
||||
extern Bit16u imgDTASeg; /* Real memory location of temporary DTA pointer for fat image disk access */
|
||||
extern RealPt imgDTAPtr; /* Real memory location of temporary DTA pointer for fat image disk access */
|
||||
extern DOS_DTA *imgDTA;
|
||||
|
||||
void swapInDisks(void);
|
||||
void swapInNextDisk(void);
|
||||
void swapInNextDisk(bool pressed); // libretro fix
|
||||
bool getSwapRequest(void);
|
||||
|
||||
#endif
|
||||
+7
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
typedef Bitu (*CallBack_Handler)(void);
|
||||
extern CallBack_Handler CallBack_Handlers[];
|
||||
|
||||
enum { CB_RETN,CB_RETF,CB_RETF8,CB_IRET,CB_IRETD,CB_IRET_STI,CB_IRET_EOI_PIC1,
|
||||
enum { CB_RETN,CB_RETF,CB_RETF8,CB_RETF_STI,CB_RETF_CLI,
|
||||
CB_IRET,CB_IRETD,CB_IRET_STI,CB_IRET_EOI_PIC1,
|
||||
CB_IRQ0,CB_IRQ1,CB_IRQ9,CB_IRQ12,CB_IRQ12_RET,CB_IRQ6_PCJR,CB_MOUSE,
|
||||
CB_INT29,CB_INT16,CB_HOOKABLE,CB_TDE_IRET,CB_IPXESR,CB_IPXESR_RET,
|
||||
CB_INT21,CB_INT13 };
|
||||
CB_INT21,CB_INT13,CB_VESA_WAIT,CB_VESA_PM };
|
||||
|
||||
#define CB_MAX 128
|
||||
#define CB_SIZE 32
|
||||
|
||||
+24
-7
@@ -29,7 +29,7 @@
|
||||
/* #undef OS2 */
|
||||
|
||||
#ifdef __WIN32__
|
||||
# define WIN32 1
|
||||
//# define WIN32 1
|
||||
#else
|
||||
//# define MACOSX 1
|
||||
#endif
|
||||
@@ -42,11 +42,13 @@
|
||||
/* #undef C_TARGETCPU */ /* The type of cpu this target has */
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#define C_UNALIGNED_MEMORY 1 /* Define to 1 to use a unaligned memory access */
|
||||
#endif
|
||||
|
||||
// ----- DOSBOX CORE FEATURES: Many of these probably won't work even if you enable them
|
||||
#define C_FPU 1 /* Define to 1 to enable floating point emulation */
|
||||
/* #undef C_CORE_INLINE */ /* Define to 1 to use inlined memory functions in cpu core */
|
||||
#define C_CORE_INLINE 1 /* Define to 1 to use inlined memory functions in cpu core */
|
||||
/* #undef C_DIRECTSERIAL */ /* Define to 1 if you want serial passthrough support (Win32, Posix and OS/2). */
|
||||
/* #undef C_IPX */ /* Define to 1 to enable IPX over Internet networking, requires SDL_net */
|
||||
/* #undef C_MODEM */ /* Define to 1 to enable internal modem support, requires SDL_net */
|
||||
@@ -58,21 +60,19 @@
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#ifndef __PS3__
|
||||
#define HAVE_STRINGS_H 1
|
||||
#endif
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#if !defined(__WIN32__) && !defined(__POWERPC__) && !defined(VITA) && !defined(_3DS)
|
||||
#if !defined(__WIN32__) && !defined(__POWERPC__)
|
||||
# define HAVE_PWD_H 1
|
||||
#endif
|
||||
|
||||
// ----- STANDARD LIBRARY FEATURES
|
||||
#ifndef __QNX__
|
||||
#if !defined (__QNX__)
|
||||
#define DIRENT_HAS_D_TYPE 1 /* struct dirent has d_type */
|
||||
#endif
|
||||
/* #undef DB_HAVE_NO_POWF */ /* libm doesn't include powf */
|
||||
@@ -91,7 +91,7 @@
|
||||
///////////////////
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "SVN-libretro"
|
||||
#define VERSION "core"
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
@@ -143,6 +143,10 @@
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
typedef double Real64;
|
||||
typedef uint8_t Bit8u;
|
||||
typedef int8_t Bit8s;
|
||||
@@ -152,5 +156,18 @@ typedef uint32_t Bit32u;
|
||||
typedef int32_t Bit32s;
|
||||
typedef uint64_t Bit64u;
|
||||
typedef int64_t Bit64s;
|
||||
|
||||
#define sBit32t PRId32
|
||||
#define sBit64t PRId64
|
||||
#define sBit32fs(a) sBit32t #a
|
||||
#define sBit64fs(a) sBit64t #a
|
||||
typedef uintptr_t Bitu;
|
||||
typedef intptr_t Bits;
|
||||
#if UINTPTR_MAX == 0xFFFFFFFF
|
||||
#define sBitfs sBit32fs
|
||||
#elif UINTPTR_MAX == 0xFFFFFFFFFFFFFFFFu
|
||||
#define sBitfs sBit64fs
|
||||
#else
|
||||
#error "Can't determine pointer size"
|
||||
#endif
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
+18
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -43,10 +43,9 @@
|
||||
#define CPU_ARCHTYPE_MIXED 0xff
|
||||
#define CPU_ARCHTYPE_386SLOW 0x30
|
||||
#define CPU_ARCHTYPE_386FAST 0x35
|
||||
#define CPU_ARCHTYPE_486OLD 0x40
|
||||
#define CPU_ARCHTYPE_486NEW 0x45
|
||||
#define CPU_ARCHTYPE_PENTIUM 0x50
|
||||
#define CPU_ARCHTYPE_P55C 0x55
|
||||
#define CPU_ARCHTYPE_486OLDSLOW 0x40
|
||||
#define CPU_ARCHTYPE_486NEWSLOW 0x45
|
||||
#define CPU_ARCHTYPE_PENTIUMSLOW 0x50
|
||||
|
||||
/* CPU Cycle Timing */
|
||||
extern Bit32s CPU_Cycles;
|
||||
@@ -72,6 +71,7 @@ extern CPU_Decoder * cpudecoder;
|
||||
Bits CPU_Core_Normal_Run(void);
|
||||
Bits CPU_Core_Normal_Trap_Run(void);
|
||||
Bits CPU_Core_Simple_Run(void);
|
||||
Bits CPU_Core_Simple_Trap_Run(void);
|
||||
Bits CPU_Core_Full_Run(void);
|
||||
Bits CPU_Core_Dyn_X86_Run(void);
|
||||
Bits CPU_Core_Dyn_X86_Trap_Run(void);
|
||||
@@ -156,6 +156,7 @@ static INLINE void CPU_SW_Interrupt_NoIOPLCheck(Bitu num,Bitu oldeip) {
|
||||
|
||||
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 +169,7 @@ void CPU_Push32(Bitu value);
|
||||
|
||||
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 +184,14 @@ void CPU_SetFlags(Bitu word,Bitu mask);
|
||||
#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
|
||||
@@ -488,5 +497,4 @@ static INLINE void CPU_SetFlagsw(Bitu word) {
|
||||
CPU_SetFlags(word,mask);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
+45
-14
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,11 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Wengier: LFN support
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -38,6 +36,7 @@
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#else /* LINUX / GCC */
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#define LONGTYPE(a) a##LL
|
||||
#endif
|
||||
@@ -77,16 +76,48 @@ public:
|
||||
static bool IsPathAbsolute(std::string const& in);
|
||||
};
|
||||
|
||||
#include <retro_dirent.h>
|
||||
|
||||
typedef struct dir_struct {
|
||||
RDIR* dir;
|
||||
char base_path[CROSS_LEN];
|
||||
#if defined (WIN32)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from
|
||||
#include <windows.h>
|
||||
|
||||
typedef struct dir_struct {
|
||||
HANDLE handle;
|
||||
char base_path[MAX_PATH+4];
|
||||
WIN32_FIND_DATA search_data;
|
||||
} dir_information;
|
||||
|
||||
dir_information* open_directory(const char* dirname);
|
||||
bool read_directory_first(dir_information* dirp, char* entry_name, char* entry_sname, bool& is_directory);
|
||||
bool read_directory_next(dir_information* dirp, char* entry_name, char* entry_sname, bool& is_directory);
|
||||
void close_directory(dir_information* dirp);
|
||||
#else
|
||||
|
||||
//#include <sys/types.h> //Included above
|
||||
#include <dirent.h>
|
||||
|
||||
typedef struct dir_struct {
|
||||
DIR* dir;
|
||||
char base_path[CROSS_LEN];
|
||||
void* vfs_dir; // frontend VFS directory handle, instead of dir, for host_is_vfs_path paths
|
||||
int vfs_dots; // how many of the "." and ".." entries have been handed out
|
||||
} dir_information;
|
||||
|
||||
#endif
|
||||
|
||||
dir_information* open_directory(const char* dirname);
|
||||
bool read_directory_first(dir_information* dirp, char* entry_name, bool& is_directory);
|
||||
bool read_directory_next(dir_information* dirp, char* entry_name, bool& is_directory);
|
||||
void close_directory(dir_information* dirp);
|
||||
|
||||
FILE *fopen_wrap(const char *path, const char *mode);
|
||||
|
||||
// A path the libretro frontend hands over can be one only it can open, such as
|
||||
// the saf:// paths RetroArch uses for Android's Storage Access Framework. Those
|
||||
// go through the frontend's VFS; every other path goes to the C library as before.
|
||||
bool host_is_vfs_path(const char* path);
|
||||
int host_stat(const char* path, struct stat* st);
|
||||
int host_access(const char* path);
|
||||
int host_mkdir(const char* path);
|
||||
int host_rmdir(const char* path);
|
||||
int host_unlink(const char* path);
|
||||
int host_rename(const char* oldpath, const char* newpath);
|
||||
int host_ftruncate(FILE* f, long length);
|
||||
#endif
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
void DEBUG_SetupConsole(void);
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ enum DMAEvent {
|
||||
DMA_REACHED_TC,
|
||||
DMA_MASKED,
|
||||
DMA_UNMASKED,
|
||||
DMA_TRANSFEREND
|
||||
// DMA_TRANSFEREND, this shouldn't really be a ignal
|
||||
};
|
||||
|
||||
class DmaChannel;
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
Bit8u DMA16;
|
||||
bool increment;
|
||||
bool autoinit;
|
||||
Bit8u trantype;
|
||||
// Bit8u trantype; //Not used at the moment
|
||||
bool masked;
|
||||
bool tcount;
|
||||
bool request;
|
||||
@@ -86,8 +86,8 @@ private:
|
||||
bool flipflop;
|
||||
DmaChannel *DmaChannels[4];
|
||||
public:
|
||||
IO_ReadHandleObject DMA_ReadHandler[0x11];
|
||||
IO_WriteHandleObject DMA_WriteHandler[0x11];
|
||||
IO_ReadHandleObject DMA_ReadHandler[0x12];
|
||||
IO_WriteHandleObject DMA_WriteHandler[0x12];
|
||||
DmaController(Bit8u num) {
|
||||
flipflop = false;
|
||||
ctrlnum = num; /* first or second DMA controller */
|
||||
|
||||
+14
-22
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,11 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Wengier: LFN support
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -30,14 +28,13 @@
|
||||
#endif
|
||||
|
||||
#include <stddef.h> //for offsetof
|
||||
#define CTBUF 127
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack (1)
|
||||
#endif
|
||||
struct CommandTail{
|
||||
Bit8u count; /* number of bytes returned */
|
||||
char buffer[CTBUF]; /* the buffer itself */
|
||||
char buffer[127]; /* the buffer itself */
|
||||
} GCC_ATTRIBUTE(packed);
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack ()
|
||||
@@ -116,7 +113,7 @@ void DOS_SetupFiles (void);
|
||||
bool DOS_ReadFile(Bit16u handle,Bit8u * data,Bit16u * amount, bool fcb = false);
|
||||
bool DOS_WriteFile(Bit16u handle,Bit8u * data,Bit16u * amount,bool fcb = false);
|
||||
bool DOS_SeekFile(Bit16u handle,Bit32u * pos,Bit32u type,bool fcb = false);
|
||||
bool DOS_CloseFile(Bit16u handle,bool fcb = false);
|
||||
bool DOS_CloseFile(Bit16u handle,bool fcb = false,Bit8u * refcnt = NULL);
|
||||
bool DOS_FlushFile(Bit16u handle);
|
||||
bool DOS_DuplicateEntry(Bit16u entry,Bit16u * newentry);
|
||||
bool DOS_ForceDuplicateEntry(Bit16u entry,Bit16u newentry);
|
||||
@@ -127,7 +124,6 @@ bool DOS_OpenFile(char const * name,Bit8u flags,Bit16u * entry,bool fcb = false)
|
||||
bool DOS_OpenFileExtended(char const * name, Bit16u flags, Bit16u createAttr, Bit16u action, Bit16u *entry, Bit16u* status);
|
||||
bool DOS_CreateFile(char const * name,Bit16u attribute,Bit16u * entry, bool fcb = false);
|
||||
bool DOS_UnlinkFile(char const * const name);
|
||||
bool DOS_GetSFNPath(char const * const path, char *SFNpath, bool LFN);
|
||||
bool DOS_FindFirst(char *search,Bit16u attr,bool fcb_findfirst=false);
|
||||
bool DOS_FindNext(void);
|
||||
bool DOS_Canonicalize(char const * const name,char * const big);
|
||||
@@ -140,7 +136,7 @@ bool DOS_MakeName(char const * const name,char * const fullname,Bit8u * drive);
|
||||
Bit8u DOS_GetDefaultDrive(void);
|
||||
void DOS_SetDefaultDrive(Bit8u drive);
|
||||
bool DOS_SetDrive(Bit8u drive);
|
||||
bool DOS_GetCurrentDir(Bit8u drive,char * const buffer, bool LFN);
|
||||
bool DOS_GetCurrentDir(Bit8u drive,char * const buffer);
|
||||
bool DOS_ChangeDir(char const * const dir);
|
||||
bool DOS_MakeDir(char const * const dir);
|
||||
bool DOS_RemoveDir(char const * const dir);
|
||||
@@ -148,9 +144,6 @@ bool DOS_Rename(char const * const oldname,char const * const newname);
|
||||
bool DOS_GetFreeDiskSpace(Bit8u drive,Bit16u * bytes,Bit8u * sectors,Bit16u * clusters,Bit16u * free);
|
||||
bool DOS_GetFileAttr(char const * const name,Bit16u * attr);
|
||||
bool DOS_SetFileAttr(char const * const name,Bit16u attr);
|
||||
bool DOS_GetFileAttrEx(char const* const name, struct stat *status, Bit8u hdrive=-1);
|
||||
Bit32u DOS_GetCompressedFileSize(char const* const name);
|
||||
void* DOS_CreateOpenFile(char const* const name);
|
||||
|
||||
/* IOCTL Stuff */
|
||||
bool DOS_IOCTL(void);
|
||||
@@ -310,8 +303,6 @@ public:
|
||||
void SetFCB1 (RealPt src);
|
||||
void SetFCB2 (RealPt src);
|
||||
void SetCommandTail (RealPt src);
|
||||
void StoreCommandTail (void);
|
||||
void RestoreCommandTail (void);
|
||||
bool SetNumFiles (Bit16u fileNum);
|
||||
Bit16u FindEntryByHandle (Bit8u handle);
|
||||
|
||||
@@ -395,6 +386,7 @@ public:
|
||||
void SetDiskBufferHeadPt(Bit32u _dbheadpt);
|
||||
void SetStartOfUMBChain(Bit16u _umbstartseg);
|
||||
void SetUMBChainState(Bit8u _umbchaining);
|
||||
void SetBlockDevices(Bit8u _count);
|
||||
Bit16u GetStartOfUMBChain(void);
|
||||
Bit8u GetUMBChainState(void);
|
||||
RealPt GetPointer(void);
|
||||
@@ -464,12 +456,11 @@ public:
|
||||
DOS_DTA(RealPt addr) { SetPt(addr); }
|
||||
|
||||
void SetupSearch(Bit8u _sdrive,Bit8u _sattr,char * _pattern);
|
||||
void SetResult(const char * _name,const char * _lname,Bit32u _size,Bit16u _date,Bit16u _time,Bit8u _attr);
|
||||
void SetResult(const char * _name,Bit32u _size,Bit16u _date,Bit16u _time,Bit8u _attr);
|
||||
|
||||
int GetFindData(int fmt,char * finddata);
|
||||
Bit8u GetSearchDrive(void);
|
||||
void GetSearchParams(Bit8u & _sattr,char * _spattern,bool lfn);
|
||||
void GetResult(char * _name,char * _lname,Bit32u & _size,Bit16u & _date,Bit16u & _time,Bit8u & _attr);
|
||||
void GetSearchParams(Bit8u & _sattr,char * _spattern);
|
||||
void GetResult(char * _name,Bit32u & _size,Bit16u & _date,Bit16u & _time,Bit8u & _attr);
|
||||
|
||||
void SetDirID(Bit16u entry) { sSave(sDTA,dirID,entry); };
|
||||
void SetDirIDCluster(Bit16u entry) { sSave(sDTA,dirCluster,entry); };
|
||||
@@ -481,8 +472,8 @@ private:
|
||||
#endif
|
||||
struct sDTA {
|
||||
Bit8u sdrive; /* The Drive the search is taking place */
|
||||
Bit8u spname[8]; /* The Search pattern for the filename */
|
||||
Bit8u spext[3]; /* The Search pattern for the extenstion */
|
||||
Bit8u sname[8]; /* The Search pattern for the filename */
|
||||
Bit8u sext[3]; /* The Search pattern for the extenstion */
|
||||
Bit8u sattr; /* The Attributes that need to be found */
|
||||
Bit16u dirID; /* custom: dir-search ID for multiple searches at the same time */
|
||||
Bit16u dirCluster; /* custom (drive_fat only): cluster number for multiple searches at the same time */
|
||||
@@ -637,6 +628,7 @@ struct DOS_Block {
|
||||
bool breakcheck;
|
||||
bool echo; // if set to true dev_con::read will echo input
|
||||
bool direct_output;
|
||||
bool internal_output;
|
||||
struct {
|
||||
RealPt mediaid;
|
||||
RealPt tempdta;
|
||||
|
||||
+41
-17
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,11 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Wengier: LFN support
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -38,10 +36,9 @@
|
||||
|
||||
#define DOS_NAMELENGTH 12
|
||||
#define DOS_NAMELENGTH_ASCII (DOS_NAMELENGTH+1)
|
||||
#define LFN_NAMELENGTH 255
|
||||
#define DOS_FCBNAME 15
|
||||
#define DOS_DIRDEPTH 8
|
||||
#define DOS_PATHLENGTH 255
|
||||
#define DOS_PATHLENGTH 80
|
||||
#define DOS_TEMPSIZE 1024
|
||||
|
||||
enum {
|
||||
@@ -65,7 +62,7 @@ class DOS_DTA;
|
||||
|
||||
class DOS_File {
|
||||
public:
|
||||
DOS_File():flags(0) { name=0; refCtr = 0; hdrive=0xff; };
|
||||
DOS_File():flags(0),time(0),date(0),attr(0),refCtr(0),open(false),name(0),hdrive(0xff) { };
|
||||
DOS_File(const DOS_File& orig);
|
||||
DOS_File & operator= (const DOS_File & orig);
|
||||
virtual ~DOS_File(){if(name) delete [] name;};
|
||||
@@ -81,6 +78,9 @@ public:
|
||||
virtual void AddRef() { refCtr++; };
|
||||
virtual Bits RemoveRef() { return --refCtr; };
|
||||
virtual bool UpdateDateTimeFromHost() { return true; }
|
||||
// 64-bit seek for archives past 4 GB (from DOSBox Pure); files that
|
||||
// cannot do better fall back to the 32-bit one.
|
||||
virtual bool Seek64(Bit64u * pos,Bit32u type) { Bit32u i = (Bit32u)*pos; bool j = Seek(&i, type); *pos = i; return j; }
|
||||
void SetDrive(Bit8u drv) { hdrive=drv;}
|
||||
Bit8u GetDrive(void) { return hdrive;}
|
||||
Bit32u flags;
|
||||
@@ -90,6 +90,7 @@ public:
|
||||
Bits refCtr;
|
||||
bool open;
|
||||
char* name;
|
||||
bool newtime = false; // time and date were changed and are to be written on close (DOSBox Pure's drives)
|
||||
/* Some Device Specific Stuff */
|
||||
private:
|
||||
Bit8u hdrive;
|
||||
@@ -120,6 +121,23 @@ private:
|
||||
Bitu devnum;
|
||||
};
|
||||
|
||||
class localFile : public DOS_File {
|
||||
public:
|
||||
localFile(const char* name, FILE * handle);
|
||||
bool Read(Bit8u * data,Bit16u * size);
|
||||
bool Write(Bit8u * data,Bit16u * size);
|
||||
bool Seek(Bit32u * pos,Bit32u type);
|
||||
bool Close();
|
||||
Bit16u GetInformation(void);
|
||||
bool UpdateDateTimeFromHost(void);
|
||||
void FlagReadOnlyMedium(void);
|
||||
void Flush(void);
|
||||
FILE * fhandle; //todo handle this properly
|
||||
private:
|
||||
bool read_only_medium;
|
||||
enum { NONE,READ,WRITE } last_action;
|
||||
};
|
||||
|
||||
/* The following variable can be lowered to free up some memory.
|
||||
* The negative side effect: The stored searches will be turned over faster.
|
||||
* Should not have impact on systems with few directory entries. */
|
||||
@@ -137,17 +155,19 @@ public:
|
||||
void SetBaseDir (const char* path);
|
||||
void SetDirSort (TDirSort sort) { sortDirType = sort; };
|
||||
bool OpenDir (const char* path, Bit16u& id);
|
||||
bool ReadDir (Bit16u id, char* &result, char * &lresult);
|
||||
bool ReadDir (Bit16u id, char* &result);
|
||||
|
||||
void ExpandName (char* path);
|
||||
char* GetExpandName (const char* path);
|
||||
bool GetShortName (const char* fullname, char* shortname);
|
||||
|
||||
bool FindFirst (char* path, Bit16u& id);
|
||||
bool FindNext (Bit16u id, char* &result, char* &lresult);
|
||||
bool FindNext (Bit16u id, char* &result);
|
||||
|
||||
void CacheOut (const char* path, bool ignoreLastDir = false);
|
||||
void AddEntry (const char* path, bool checkExist = false);
|
||||
void AddEntryDirOverlay (const char* path, bool checkExist = false);
|
||||
|
||||
void DeleteEntry (const char* path, bool ignoreLastDir = false);
|
||||
|
||||
void EmptyCache (void);
|
||||
@@ -158,7 +178,7 @@ public:
|
||||
public:
|
||||
CFileInfo(void) {
|
||||
orgname[0] = shortname[0] = 0;
|
||||
isDir = false;
|
||||
isOverlayDir = isDir = false;
|
||||
id = MAX_OPENDIRS;
|
||||
nextEntry = shortNr = 0;
|
||||
}
|
||||
@@ -169,6 +189,7 @@ public:
|
||||
};
|
||||
char orgname [CROSS_LEN];
|
||||
char shortname [DOS_NAMELENGTH_ASCII];
|
||||
bool isOverlayDir;
|
||||
bool isDir;
|
||||
Bit16u id;
|
||||
Bitu nextEntry;
|
||||
@@ -187,12 +208,12 @@ private:
|
||||
void CreateShortName (CFileInfo* dir, CFileInfo* info);
|
||||
Bitu CreateShortNameID (CFileInfo* dir, const char* name);
|
||||
int CompareShortname (const char* compareName, const char* shortName);
|
||||
bool SetResult (CFileInfo* dir, char * &result, char * &lresult, Bitu entryNr);
|
||||
bool SetResult (CFileInfo* dir, char * &result, Bitu entryNr);
|
||||
bool IsCachedIn (CFileInfo* dir);
|
||||
CFileInfo* FindDirInfo (const char* path, char* expandedPath);
|
||||
bool RemoveSpaces (char* str);
|
||||
bool OpenDir (CFileInfo* dir, const char* path, Bit16u& id);
|
||||
void CreateEntry (CFileInfo* dir, const char* name, const char* sname, bool query_directory);
|
||||
void CreateEntry (CFileInfo* dir, const char* name, bool is_directory);
|
||||
void CopyEntry (CFileInfo* dir, CFileInfo* from);
|
||||
Bit16u GetFreeID (CFileInfo* dir);
|
||||
void Clear (void);
|
||||
@@ -229,9 +250,6 @@ public:
|
||||
virtual bool FindFirst(char * _dir,DOS_DTA & dta,bool fcb_findfirst=false)=0;
|
||||
virtual bool FindNext(DOS_DTA & dta)=0;
|
||||
virtual bool GetFileAttr(char * name,Bit16u * attr)=0;
|
||||
virtual bool GetFileAttrEx(char* name, struct stat *status)=0;
|
||||
virtual Bit32u GetCompressedSize(char* name)=0;
|
||||
virtual void* CreateOpenFile(char const* const name)=0;
|
||||
virtual bool Rename(char * oldname,char * newname)=0;
|
||||
virtual bool AllocationInfo(Bit16u * _bytes_sector,Bit8u * _sectors_cluster,Bit16u * _total_clusters,Bit16u * _free_clusters)=0;
|
||||
virtual bool FileExists(const char* name)=0;
|
||||
@@ -242,6 +260,12 @@ public:
|
||||
virtual bool isRemote(void)=0;
|
||||
virtual bool isRemovable(void)=0;
|
||||
virtual Bits UnMount(void)=0;
|
||||
// From DOSBox Pure, for the ZIP, memory and union drives: the long name
|
||||
// behind an 8.3 one, the drives layered underneath this one, and closing
|
||||
// every file still open on it.
|
||||
virtual bool GetLongFileName(const char* name, char longname[256]) { return false; }
|
||||
virtual DOS_Drive* GetShadow(int n, bool only_owned) { return NULL; }
|
||||
void ForceCloseAll();
|
||||
|
||||
char * GetInfo(void);
|
||||
char curdir[DOS_PATHLENGTH];
|
||||
|
||||
+6
-29
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,11 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Wengier: LFN support
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -62,7 +60,6 @@ enum SVGACards {
|
||||
extern SVGACards svgaCard;
|
||||
extern MachineType machine;
|
||||
extern bool SDLNetInited;
|
||||
extern bool uselfn, autolfn;
|
||||
|
||||
#define IS_TANDY_ARCH ((machine==MCH_TANDY) || (machine==MCH_PCJR))
|
||||
#define IS_EGAVGA_ARCH ((machine==MCH_EGA) || (machine==MCH_VGA))
|
||||
@@ -75,28 +72,8 @@ extern bool uselfn, autolfn;
|
||||
#include "logging.h"
|
||||
#endif // the logging system.
|
||||
|
||||
#ifdef __PS3__
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/sys_time.h>
|
||||
#include <sys/timer.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
#define S_IREAD S_IRUSR
|
||||
#define S_IWRITE S_IWUSR
|
||||
#define F_OK 0 /* test for existence of file */
|
||||
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#define getenv(a) "/dev_hdd0/RETROARCH/USRDIR/cores/"
|
||||
#define getcwd(a,b) "/dev_hdd0/RETROARCH/USRDIR/"
|
||||
struct timeb {
|
||||
time_t time;
|
||||
unsigned short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
int access(const char *fpath, int /*mode*/);
|
||||
#ifdef __LIBRETRO__
|
||||
void DOSBOX_UnlockSpeed( bool pressed );
|
||||
#endif
|
||||
|
||||
#endif /* DOSBOX_DOSBOX_H */
|
||||
+30
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,14 +11,19 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_FPU_H
|
||||
#define DOSBOX_FPU_H
|
||||
|
||||
#ifndef DOSBOX_DOSBOX_H
|
||||
//So the right config.h gets included for C_DEBUG
|
||||
#include "dosbox.h"
|
||||
#endif
|
||||
|
||||
#ifndef DOSBOX_MEM_H
|
||||
#include "mem.h"
|
||||
#endif
|
||||
@@ -150,5 +155,26 @@ static INLINE void FPU_SET_C3(Bitu C){
|
||||
if(C) fpu.sw |= 0x4000;
|
||||
}
|
||||
|
||||
static INLINE void FPU_LOG_WARN(Bitu tree, bool ea, Bitu group, Bitu sub) {
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC %" sBitfs(d) "%s:Unhandled group %" sBitfs(d) " subfunction %" sBitfs(d),tree,ea?" EA":"",group,sub);
|
||||
}
|
||||
|
||||
#define DB_FPU_STACK_CHECK_NONE 0
|
||||
#define DB_FPU_STACK_CHECK_LOG 1
|
||||
#define DB_FPU_STACK_CHECK_EXIT 2
|
||||
//NONE is 0.74 behavior: not care about stack overflow/underflow
|
||||
//Overflow is always logged/exited on.
|
||||
//Underflow can be controlled with by this.
|
||||
//LOG is giving a message when encountered
|
||||
//EXIT is to hard exit.
|
||||
//Currently pop is ignored in release mode and overflow is exit.
|
||||
//in debug mode: pop will log and overflow is exit.
|
||||
#if C_DEBUG
|
||||
#define DB_FPU_STACK_CHECK_POP DB_FPU_STACK_CHECK_LOG
|
||||
#define DB_FPU_STACK_CHECK_PUSH DB_FPU_STACK_CHECK_EXIT
|
||||
#else
|
||||
#define DB_FPU_STACK_CHECK_POP DB_FPU_STACK_CHECK_NONE
|
||||
#define DB_FPU_STACK_CHECK_PUSH DB_FPU_STACK_CHECK_EXIT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+9
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -45,10 +45,13 @@ bool TS_Get_Address(Bitu& tsaddr, Bitu& tsirq, Bitu& tsdma);
|
||||
extern Bit8u adlib_commandreg;
|
||||
FILE * OpenCaptureFile(const char * type,const char * ext);
|
||||
|
||||
void CAPTURE_AddWave(Bit32u freq, Bit32u len, Bit16s * data);
|
||||
void CAPTURE_AddWave(Bit32u freq, Bitu len, Bit16s * data);
|
||||
#define CAPTURE_FLAG_DBLW 0x1
|
||||
#define CAPTURE_FLAG_DBLH 0x2
|
||||
void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags, float fps, Bit8u * data, Bit8u * pal);
|
||||
#define CAPTURE_FLAG_DUPLICATE 0x4
|
||||
void CAPTURE_AddImage(Bitu width, Bitu height, Bitu bpp, Bitu pitch, Bitu flags, float fps, const Bit8u * data, const Bit8u * pal);
|
||||
void CAPTURE_AddMidi(bool sysex, Bitu len, Bit8u * data);
|
||||
void CAPTURE_VideoStart();
|
||||
void CAPTURE_VideoStop();
|
||||
|
||||
#endif
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_IPXSERVER_H_
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_JOYSTICK_H
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_KEYBOARD_H
|
||||
|
||||
+11
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_LOGGING_H
|
||||
@@ -28,6 +28,7 @@ enum LOG_TYPES {
|
||||
LOG_MOUSE,LOG_BIOS,LOG_GUI,LOG_MISC,
|
||||
LOG_IO,
|
||||
LOG_PCI,
|
||||
LOG_VOODOO,
|
||||
LOG_MAX
|
||||
};
|
||||
|
||||
@@ -79,10 +80,16 @@ struct LOG
|
||||
void operator()(char const* , char const*, char const*) { }
|
||||
|
||||
void operator()(char const* , double , double , double , char const* ) { }
|
||||
void operator()(char const* , double, char const*, double, double ) {}
|
||||
}; //add missing operators to here
|
||||
//try to avoid anything smaller than bit32...
|
||||
#ifdef __LIBRETRO__
|
||||
#include "log.h"
|
||||
#define LOG_MSG retro::dosboxLogMsgHandler
|
||||
#else
|
||||
void GFX_ShowMsg(char const* format,...) GCC_ATTRIBUTE(__format__(__printf__, 1, 2));
|
||||
#define LOG_MSG GFX_ShowMsg
|
||||
#endif
|
||||
|
||||
#endif //C_DEBUG
|
||||
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_MAPPER_H
|
||||
|
||||
+36
-15
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_MEM_H
|
||||
@@ -57,20 +57,39 @@ MemHandle MEM_NextHandleAt(MemHandle handle,Bitu where);
|
||||
Working on big or little endian machines
|
||||
*/
|
||||
|
||||
#if defined(WORDS_BIGENDIAN) || !defined(C_UNALIGNED_MEMORY)
|
||||
|
||||
static INLINE Bit8u host_readb(HostPt off) {
|
||||
return off[0];
|
||||
}
|
||||
|
||||
static INLINE void host_writeb(HostPt off,Bit8u val) {
|
||||
off[0]=val;
|
||||
}
|
||||
|
||||
// use __builtin_bswap* for gcc >= 4.3
|
||||
#if defined(WORDS_BIGENDIAN) && defined(__GNUC__) && \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
|
||||
static INLINE Bit16u host_readw(HostPt off) {
|
||||
return __builtin_bswap16(*(Bit16u *)off);
|
||||
}
|
||||
static INLINE Bit32u host_readd(HostPt off) {
|
||||
return __builtin_bswap32(*(Bit32u *)off);
|
||||
}
|
||||
static INLINE void host_writew(HostPt off, Bit16u val) {
|
||||
*(Bit16u *)off = __builtin_bswap16(val);
|
||||
}
|
||||
static INLINE void host_writed(HostPt off, Bit32u val) {
|
||||
*(Bit32u *)off = __builtin_bswap32(val);
|
||||
}
|
||||
|
||||
#elif defined(WORDS_BIGENDIAN) || !defined(C_UNALIGNED_MEMORY)
|
||||
|
||||
static INLINE Bit16u host_readw(HostPt off) {
|
||||
return off[0] | (off[1] << 8);
|
||||
}
|
||||
static INLINE Bit32u host_readd(HostPt off) {
|
||||
return off[0] | (off[1] << 8) | (off[2] << 16) | (off[3] << 24);
|
||||
}
|
||||
static INLINE void host_writeb(HostPt off,Bit8u val) {
|
||||
off[0]=val;
|
||||
}
|
||||
static INLINE void host_writew(HostPt off,Bit16u val) {
|
||||
off[0]=(Bit8u)(val);
|
||||
off[1]=(Bit8u)(val >> 8);
|
||||
@@ -84,18 +103,12 @@ static INLINE void host_writed(HostPt off,Bit32u val) {
|
||||
|
||||
#else
|
||||
|
||||
static INLINE Bit8u host_readb(HostPt off) {
|
||||
return *(Bit8u *)off;
|
||||
}
|
||||
static INLINE Bit16u host_readw(HostPt off) {
|
||||
return *(Bit16u *)off;
|
||||
}
|
||||
static INLINE Bit32u host_readd(HostPt off) {
|
||||
return *(Bit32u *)off;
|
||||
}
|
||||
static INLINE void host_writeb(HostPt off,Bit8u val) {
|
||||
*(Bit8u *)(off)=val;
|
||||
}
|
||||
static INLINE void host_writew(HostPt off,Bit16u val) {
|
||||
*(Bit16u *)(off)=val;
|
||||
}
|
||||
@@ -118,6 +131,14 @@ static INLINE void var_write(Bit32u * var, Bit32u val) {
|
||||
host_writed((HostPt)var, val);
|
||||
}
|
||||
|
||||
static INLINE Bit16u var_read(Bit16u * var) {
|
||||
return host_readw((HostPt)var);
|
||||
}
|
||||
|
||||
static INLINE Bit32u var_read(Bit32u * var) {
|
||||
return host_readd((HostPt)var);
|
||||
}
|
||||
|
||||
/* The Folowing six functions are slower but they recognize the paged memory system */
|
||||
|
||||
Bit8u mem_readb(PhysPt pt);
|
||||
|
||||
+13
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,15 +11,19 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_MIDI_H
|
||||
#define DOSBOX_MIDI_H
|
||||
|
||||
#ifndef DOSBOX_DOSBOX_H
|
||||
#include "dosbox.h"
|
||||
#endif
|
||||
|
||||
#ifndef DOSBOX_PROGRAMS_H
|
||||
#include "programs.h"
|
||||
#endif
|
||||
@@ -27,8 +31,12 @@
|
||||
class MidiHandler {
|
||||
public:
|
||||
MidiHandler();
|
||||
virtual bool Open(const char * /*conf*/) { return true; };
|
||||
virtual bool Open(const char * /*conf*/) {
|
||||
LOG_MSG("No working midi device found/selected! Please check your settings and/or compilation environment.");
|
||||
return true;
|
||||
};
|
||||
virtual void Close(void) {};
|
||||
void HaltSequence();
|
||||
virtual void PlayMsg(Bit8u * /*msg*/) {};
|
||||
virtual void PlaySysex(Bit8u * /*sysex*/,Bitu /*len*/) {};
|
||||
virtual const char * GetName(void) { return "none"; };
|
||||
|
||||
+28
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -72,19 +72,34 @@ public:
|
||||
void AddSamples_s16u_nonnative(Bitu len, const Bit16u * data);
|
||||
void AddSamples_m32_nonnative(Bitu len, const Bit32s * data);
|
||||
void AddSamples_s32_nonnative(Bitu len, const Bit32s * data);
|
||||
|
||||
|
||||
void AddStretched(Bitu len,Bit16s * data); //Strech block up into needed data
|
||||
|
||||
void FillUp(void);
|
||||
void Enable(bool _yesno);
|
||||
MIXER_Handler handler;
|
||||
float volmain[2];
|
||||
float scale;
|
||||
Bit32s volmul[2];
|
||||
Bitu freq_add,freq_index;
|
||||
Bitu done,needed;
|
||||
|
||||
//This gets added the frequency counter each mixer step
|
||||
Bits last[2];
|
||||
Bitu freq_add, freq_index;
|
||||
//When this flows over a new sample needs to be read from the device
|
||||
Bitu freq_counter;
|
||||
//Timing on how many samples have been done and were needed by th emixer
|
||||
Bitu done, needed;
|
||||
//Previous and next samples
|
||||
Bits prevSample[2];
|
||||
Bits nextSample[2];
|
||||
//Simple way to lower the impact of DC offset. if MIXER_UPRAMP_STEPS is >0.
|
||||
//Still work in progress and thus disabled for now.
|
||||
Bits offset[2];
|
||||
const char * name;
|
||||
bool interpolate;
|
||||
bool enabled;
|
||||
bool last_samples_were_stereo;
|
||||
bool last_samples_were_silence;
|
||||
MixerChannel * next;
|
||||
};
|
||||
|
||||
@@ -110,4 +125,10 @@ public:
|
||||
void PCSPEAKER_SetCounter(Bitu cntr,Bitu mode);
|
||||
void PCSPEAKER_SetType(Bitu mode);
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
auto MIXER_RETRO_GetAvailableFrames() noexcept -> Bitu;
|
||||
auto MIXER_RETRO_GetFrequency() -> Bit32u;
|
||||
void MIXER_CallBack(void* userdata, uint8_t* stream, int len);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef DOSBOX_MMX_H
|
||||
#define DOSBOX_MMX_H
|
||||
|
||||
typedef union {
|
||||
|
||||
Bit64u q;
|
||||
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
struct {
|
||||
Bit32u d0,d1;
|
||||
} ud;
|
||||
|
||||
struct {
|
||||
Bit32s d0,d1;
|
||||
} sd;
|
||||
|
||||
struct {
|
||||
Bit16u w0,w1,w2,w3;
|
||||
} uw;
|
||||
|
||||
struct {
|
||||
Bit16s w0,w1,w2,w3;
|
||||
} sw;
|
||||
|
||||
struct {
|
||||
Bit8u b0,b1,b2,b3,b4,b5,b6,b7;
|
||||
} ub;
|
||||
|
||||
struct {
|
||||
Bit8s b0,b1,b2,b3,b4,b5,b6,b7;
|
||||
} sb;
|
||||
#else
|
||||
struct {
|
||||
Bit32u d1,d0;
|
||||
} ud;
|
||||
|
||||
struct {
|
||||
Bit32s d1,d0;
|
||||
} sd;
|
||||
|
||||
struct {
|
||||
Bit16u w3,w2,w1,w0;
|
||||
} uw;
|
||||
|
||||
struct {
|
||||
Bit16u w3,w2,w1,w0;
|
||||
} sw;
|
||||
|
||||
struct {
|
||||
Bit8u b7,b6,b5,b4,b3,b2,b1,b0;
|
||||
} ub;
|
||||
|
||||
struct {
|
||||
Bit8u b7,b6,b5,b4,b3,b2,b1,b0;
|
||||
} sb;
|
||||
#endif
|
||||
|
||||
} MMX_reg;
|
||||
|
||||
extern MMX_reg reg_mmx[8];
|
||||
extern MMX_reg * lookupRMregMM[256];
|
||||
|
||||
|
||||
Bit8s SaturateWordSToByteS(Bit16s value);
|
||||
Bit16s SaturateDwordSToWordS(Bit32s value);
|
||||
Bit8u SaturateWordSToByteU(Bit16s value);
|
||||
Bit16u SaturateDwordSToWordU(Bit32s value);
|
||||
|
||||
void setFPU(Bit16u tag);
|
||||
|
||||
#endif
|
||||
@@ -1,180 +0,0 @@
|
||||
/* Standard data types used */
|
||||
|
||||
typedef unsigned char Bit8u;
|
||||
typedef signed char Bit8s;
|
||||
typedef unsigned short Bit16u;
|
||||
typedef signed short Bit16s;
|
||||
typedef unsigned long Bit32u;
|
||||
typedef signed long Bit32s;
|
||||
#if defined(_MSC_VER)
|
||||
typedef unsigned __int64 Bit64u;
|
||||
typedef signed __int64 Bit64s;
|
||||
#else
|
||||
typedef unsigned long long int Bit64u;
|
||||
typedef signed long long int Bit64s;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Setting up pointers to all subfunctions */
|
||||
#ifdef MODULE_WANT_IO_READ
|
||||
typedef Bit8u (* IO_ReadHandler)(Bit32u port);
|
||||
static void (* IO_RegisterReadHandler)(Bit32u port,IO_ReadHandler handler,char * name);
|
||||
static void (* IO_FreeReadHandler)(Bit32u port);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_IO_WRITE
|
||||
typedef void (* IO_WriteHandler)(Bit32u port,Bit8u value);
|
||||
static void (* IO_RegisterWriteHandler)(Bit32u port,IO_WriteHandler handler,char * name);
|
||||
static void (* IO_FreeWriteHandler)(Bit32u port);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_IRQ_EOI
|
||||
typedef void (* IRQ_EOIHandler)(void);
|
||||
static void (* IRQ_RegisterEOIHandler)(Bit32u irq,IRQ_EOIHandler handler,char * name);
|
||||
static void (* IRQ_FreeEOIHandler)(Bit32u irq);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_IRQ
|
||||
static void (* IRQ_Activate)(Bit32u irq);
|
||||
static void (* IRQ_Deactivate)(Bit32u irq);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_TIMER
|
||||
typedef void (* TIMER_MicroHandler)(void);
|
||||
static void (* TIMER_RegisterMicroHandler)(TIMER_MicroHandler handler,Bit32u micro);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_TIMER_TICK
|
||||
typedef void (* TIMER_TickHandler)(Bit32u ticks);
|
||||
static void (* TIMER_RegisterTickHandler)(TIMER_TickHandler handler);
|
||||
#endif
|
||||
|
||||
/*
|
||||
4 8-bit and 4 16-bit channels you can read data from
|
||||
16-bit reads are word sized
|
||||
*/
|
||||
|
||||
#ifdef MODULE_WANT_DMA_READ
|
||||
static void (* DMA_8_Read)(Bit32u chan,Bit8u * data,Bit16u size);
|
||||
static void (* DMA_16_Read)(Bit32u chan,Bit8u * data,Bit16u size);
|
||||
#endif
|
||||
|
||||
/*
|
||||
4 8-bit and 4 16-bit channels you can write data from
|
||||
16-bit writes are word sized
|
||||
*/
|
||||
|
||||
#ifdef MODULE_WANT_DMA_READ
|
||||
static void (* DMA_8_Write)(Bit32u chan,Bit8u * data,Bit16u size);
|
||||
static void (* DMA_16_Write)(Bit32u chan,Bit8u * data,Bit16u size);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MODULE_WANT_MIXER
|
||||
/* The len here means the amount of samples needed not the buffersize it needed to fill */
|
||||
typedef void (* MIXER_MixHandler)(Bit8u * sampdate,Bit32u len);
|
||||
|
||||
/* Different types if modes a mixer channel can work in */
|
||||
#define MIXER_8MONO 0
|
||||
#define MIXER_8STEREO 1
|
||||
#define MIXER_16MONO 2
|
||||
#define MIXER_16STEREO 3
|
||||
struct MIXER_Channel;
|
||||
|
||||
#define MAX_AUDIO ((1<<(16-1))-1)
|
||||
#define MIN_AUDIO -(1<<(16-1))
|
||||
|
||||
MIXER_Channel *(* MIXER_AddChannel)(MIXER_MixHandler handler,Bit32u freq,char * name);
|
||||
void (* MIXER_SetVolume)(MIXER_Channel * chan,Bit8u vol);
|
||||
void (* MIXER_SetFreq)(MIXER_Channel * chan,Bit32u freq);
|
||||
void (* MIXER_SetMode)(MIXER_Channel * chan,Bit8u mode);
|
||||
void (* MIXER_Enable)(MIXER_Channel * chan,bool enable);
|
||||
#endif
|
||||
|
||||
typedef bool (* MODULE_FindHandler)(char * name,void * * function);
|
||||
typedef char *(* MODULE_StartHandler)(MODULE_FindHandler find_handler);
|
||||
|
||||
#define MODULE_START_PROC "ModuleStart"
|
||||
|
||||
#ifdef MODULE_START_FUNCTION
|
||||
#include <stdio.h>
|
||||
|
||||
#define GET_FUNCTION(a) \
|
||||
if (!find_handler(#a ,(void * *) &a)) { \
|
||||
return "Can't find requested function"; \
|
||||
};
|
||||
|
||||
|
||||
#if defined (WIN32)
|
||||
#include <windows.h>
|
||||
BOOL APIENTRY DllMain( HANDLE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
char * ModuleStart (MODULE_FindHandler find_handler) {
|
||||
|
||||
#ifdef MODULE_WANT_IRQ_EOI
|
||||
GET_FUNCTION(IRQ_RegisterEOIHandler);
|
||||
GET_FUNCTION(IRQ_FreeEOIHandler);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_IRQ
|
||||
GET_FUNCTION(IRQ_Activate);
|
||||
GET_FUNCTION(IRQ_Deactivate);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_IO_READ
|
||||
GET_FUNCTION(IO_RegisterReadHandler);
|
||||
GET_FUNCTION(IO_FreeReadHandler);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_IO_WRITE
|
||||
GET_FUNCTION(IO_RegisterWriteHandler);
|
||||
GET_FUNCTION(IO_FreeWriteHandler);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_TIMER
|
||||
GET_FUNCTION(TIMER_RegisterMicroHandler);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_TIMER_TICKS
|
||||
GET_FUNCTION(TIMER_RegisterTickHandler);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_DMA_READ
|
||||
GET_FUNCTION(DMA_8_Read);
|
||||
GET_FUNCTION(DMA_16_Read);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_DMA_WRITE
|
||||
GET_FUNCTION(DMA_8_Write);
|
||||
GET_FUNCTION(DMA_16_Write);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_WANT_MIXER
|
||||
GET_FUNCTION(MIXER_AddChannel);
|
||||
GET_FUNCTION(MIXER_SetVolume);
|
||||
GET_FUNCTION(MIXER_SetFreq);
|
||||
GET_FUNCTION(MIXER_SetMode);
|
||||
GET_FUNCTION(MIXER_Enable);
|
||||
#endif
|
||||
|
||||
return MODULE_START_FUNCTION;
|
||||
|
||||
}
|
||||
#if defined (WIN32)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ void Mouse_CursorSet(float x,float y);
|
||||
void Mouse_ButtonPressed(Bit8u button);
|
||||
void Mouse_ButtonReleased(Bit8u button);
|
||||
|
||||
void Mouse_AutoLock(bool enable);
|
||||
void Mouse_BeforeNewVideoMode(bool setmode);
|
||||
void Mouse_AfterNewVideoMode(bool setmode);
|
||||
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
|
||||
// disable this to reduce the size of the TLB
|
||||
// NOTE: does not work with the dynamic core (dynrec is fine)
|
||||
#ifndef GEKKO // __LIBRETRO__: Save 20 MB of bss
|
||||
#define USE_FULL_TLB
|
||||
#endif
|
||||
|
||||
class PageDirectory;
|
||||
|
||||
@@ -50,9 +48,11 @@ class PageDirectory;
|
||||
#define PFLAG_READABLE 0x1
|
||||
#define PFLAG_WRITEABLE 0x2
|
||||
#define PFLAG_HASROM 0x4
|
||||
#define PFLAG_HASCODE 0x8 //Page contains dynamic code
|
||||
#define PFLAG_HASCODE32 0x8 //Page contains 32-bit dynamic code
|
||||
#define PFLAG_NOCODE 0x10 //No dynamic code can be generated here
|
||||
#define PFLAG_INIT 0x20 //No dynamic code can be generated here
|
||||
#define PFLAG_HASCODE16 0x40 //Page contains 16-bit dynamic code
|
||||
#define PFLAG_HASCODE (PFLAG_HASCODE32|PFLAG_HASCODE16)
|
||||
|
||||
#define LINK_START ((1024+64)/4) //Start right after the HMA
|
||||
|
||||
@@ -226,7 +226,7 @@ void PAGING_InitTLBBank(tlb_entry **bank);
|
||||
|
||||
static INLINE tlb_entry *get_tlb_entry(PhysPt address) {
|
||||
Bitu index=(address>>12);
|
||||
if (TLB_BANKS && (index > TLB_SIZE)) {
|
||||
if (TLB_BANKS && (index >= TLB_SIZE)) {
|
||||
Bitu bank=(address>>BANK_SHIFT) - 1;
|
||||
if (!paging.tlbh_banks[bank])
|
||||
PAGING_InitTLBBank(&paging.tlbh_banks[bank]);
|
||||
|
||||
+13
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,15 +11,17 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_PCI_H
|
||||
#define DOSBOX_PCI_H
|
||||
|
||||
//#define PCI_FUNCTIONALITY_ENABLED 0
|
||||
#ifdef WITH_VOODOO
|
||||
#define PCI_FUNCTIONALITY_ENABLED 1
|
||||
#endif
|
||||
|
||||
#if defined PCI_FUNCTIONALITY_ENABLED
|
||||
|
||||
@@ -83,4 +85,10 @@ RealPt PCI_GetPModeInterface(void);
|
||||
|
||||
#endif
|
||||
|
||||
void PCI_AddSVGAS3_Device(void);
|
||||
void PCI_RemoveSVGAS3_Device(void);
|
||||
|
||||
void PCI_AddSST_Device(Bitu type);
|
||||
void PCI_RemoveSST_Device(void);
|
||||
|
||||
#endif
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_PIC_H
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyleft:
|
||||
* This file was made to be used with DOSBOX, and so
|
||||
* is under GNU general public license
|
||||
*/
|
||||
|
||||
#ifndef __DOSBOX_PINHACK_H
|
||||
#define __DOSBOX_PINHACK_H
|
||||
#define PINHACKVERSION 4
|
||||
|
||||
extern struct scrollhack {
|
||||
bool enabled;
|
||||
bool active;
|
||||
bool trigger;
|
||||
struct {
|
||||
int min, max;
|
||||
} triggerwidth, triggerheight;
|
||||
struct {
|
||||
int height, width;
|
||||
} expand;
|
||||
} pinhack;
|
||||
|
||||
#endif /* __DOSBOX_PINHACK_H */
|
||||
+7
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
void MSCDEX_SetCDInterface(int intNr, int forceCD);
|
||||
|
||||
class CommandLine {
|
||||
public:
|
||||
CommandLine(int argc,char const * const argv[]);
|
||||
@@ -44,7 +46,7 @@ public:
|
||||
const char * GetFileName(){ return file_name.c_str();}
|
||||
|
||||
bool FindExist(char const * const name,bool remove=false);
|
||||
bool FindHex(char const * const name,int & value,bool remove=false);
|
||||
bool FindHex(char const * const name,unsigned int & value,bool remove=false);
|
||||
bool FindInt(char const * const name,int & value,bool remove=false);
|
||||
bool FindString(char const * const name,std::string & value,bool remove=false);
|
||||
bool FindCommand(unsigned int which,std::string & value);
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_REGS_H
|
||||
|
||||
+16
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_RENDER_H
|
||||
@@ -23,11 +23,11 @@
|
||||
// 1: complex scalers off, scaler cache off, all simple scalers on
|
||||
// 2: complex scalers off, scaler cache on
|
||||
// 3: complex scalers on
|
||||
#ifndef RENDER_USE_ADVANCED_SCALERS
|
||||
#define RENDER_USE_ADVANCED_SCALERS 3
|
||||
#endif
|
||||
|
||||
// Don't need scalers with libretro
|
||||
#define RENDER_USE_ADVANCED_SCALERS 0
|
||||
|
||||
#include "render_scalers.h"
|
||||
#include "../src/gui/render_scalers.h"
|
||||
|
||||
#define RENDER_SKIP_CACHE 16
|
||||
//Enable this for scalers to support 0 input for empty lines
|
||||
@@ -60,8 +60,8 @@ typedef struct {
|
||||
float fps;
|
||||
} src;
|
||||
struct {
|
||||
Bitu count;
|
||||
Bitu max;
|
||||
int count;
|
||||
int max;
|
||||
Bitu index;
|
||||
Bit8u hadSkip[RENDER_SKIP_CACHE];
|
||||
} frameskip;
|
||||
@@ -82,11 +82,15 @@ typedef struct {
|
||||
Bit8u *cacheRead;
|
||||
Bitu inHeight, inLine, outLine;
|
||||
} scale;
|
||||
#if C_OPENGL
|
||||
char* shader_src;
|
||||
#endif
|
||||
RenderPal_t pal;
|
||||
bool updating;
|
||||
bool active;
|
||||
bool aspect;
|
||||
bool fullFrame;
|
||||
bool forceUpdate;
|
||||
} Render_t;
|
||||
|
||||
extern Render_t render;
|
||||
@@ -95,6 +99,8 @@ void RENDER_SetSize(Bitu width,Bitu height,Bitu bpp,float fps,double ratio,bool
|
||||
bool RENDER_StartUpdate(void);
|
||||
void RENDER_EndUpdate(bool abort);
|
||||
void RENDER_SetPal(Bit8u entry,Bit8u red,Bit8u green,Bit8u blue);
|
||||
bool RENDER_GetForceUpdate(void);
|
||||
void RENDER_SetForceUpdate(bool);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
+45
-48
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,17 +11,15 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_SETUP_H
|
||||
#define DOSBOX_SETUP_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning ( disable : 4786 )
|
||||
#pragma warning ( disable : 4290 )
|
||||
@@ -45,7 +43,7 @@
|
||||
|
||||
#ifndef CH_CSTDIO
|
||||
#define CH_CSTDIO
|
||||
#include <cstdio>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -57,7 +55,6 @@ public:
|
||||
Hex():_hex(0) { };
|
||||
bool operator==(Hex const& other) {return _hex == other._hex;}
|
||||
operator int () const { return _hex; }
|
||||
|
||||
};
|
||||
|
||||
class Value {
|
||||
@@ -77,41 +74,41 @@ private:
|
||||
public:
|
||||
class WrongType { }; // Conversion error class
|
||||
enum Etype { V_NONE, V_HEX, V_BOOL, V_INT, V_STRING, V_DOUBLE,V_CURRENT} type;
|
||||
|
||||
|
||||
/* Constructors */
|
||||
Value() :_string(0), type(V_NONE) { };
|
||||
Value(Hex in) :_hex(in), type(V_HEX) { };
|
||||
Value(int in) :_int(in), type(V_INT) { };
|
||||
Value(bool in) :_bool(in), type(V_BOOL) { };
|
||||
Value(double in) :_double(in), type(V_DOUBLE) { };
|
||||
Value(std::string const& in) :_string(new std::string(in)),type(V_STRING) { };
|
||||
Value(char const * const in) :_string(new std::string(in)),type(V_STRING) { };
|
||||
Value() :_hex(0), _bool(false),_int(0), _string(0), _double(0), type(V_NONE) { };
|
||||
Value(Hex in) :_hex(in),_bool(false),_int(0), _string(0), _double(0), type(V_HEX) { };
|
||||
Value(int in) :_hex(0), _bool(false),_int(in),_string(0), _double(0), type(V_INT) { };
|
||||
Value(bool in) :_hex(0), _bool(in) ,_int(0), _string(0), _double(0), type(V_BOOL) { };
|
||||
Value(double in) :_hex(0), _bool(false),_int(0), _string(0), _double(in),type(V_DOUBLE) { };
|
||||
Value(std::string const& in) :_hex(0), _bool(false),_int(0), _string(new std::string(in)),_double(0), type(V_STRING) { };
|
||||
Value(char const * const in) :_hex(0), _bool(false),_int(0), _string(new std::string(in)),_double(0), type(V_STRING) { };
|
||||
Value(Value const& in):_string(0) {plaincopy(in);}
|
||||
~Value() { destroy();};
|
||||
Value(std::string const& in,Etype _t) :_hex(0),_bool(false),_int(0),_string(0),_double(0),type(V_NONE) {SetValue(in,_t);}
|
||||
|
||||
/* Assigment operators */
|
||||
Value& operator= (Hex in) noexcept(false) { return copy(Value(in)); }
|
||||
Value& operator= (int in) noexcept(false) { return copy(Value(in)); }
|
||||
Value& operator= (bool in) noexcept(false) { return copy(Value(in)); }
|
||||
Value& operator= (double in) noexcept(false) { return copy(Value(in)); }
|
||||
Value& operator= (std::string const& in) noexcept(false) { return copy(Value(in)); }
|
||||
Value& operator= (char const * const in) noexcept(false) { return copy(Value(in)); }
|
||||
Value& operator= (Value const& in) noexcept(false) { return copy(Value(in)); }
|
||||
|
||||
bool operator== (Value const & other);
|
||||
operator bool () const noexcept(false);
|
||||
operator Hex () const noexcept(false);
|
||||
operator int () const noexcept(false);
|
||||
operator double () const noexcept(false);
|
||||
operator char const* () const noexcept(false);
|
||||
bool SetValue(std::string const& in, Etype _type = V_CURRENT) noexcept(false);
|
||||
/* Assigment operators */
|
||||
Value& operator= (Hex in) { return copy(Value(in));}
|
||||
Value& operator= (int in) { return copy(Value(in));}
|
||||
Value& operator= (bool in) { return copy(Value(in));}
|
||||
Value& operator= (double in) { return copy(Value(in));}
|
||||
Value& operator= (std::string const& in) { return copy(Value(in));}
|
||||
Value& operator= (char const * const in) { return copy(Value(in));}
|
||||
Value& operator= (Value const& in) { return copy(Value(in));}
|
||||
|
||||
bool operator== (Value const & other) const;
|
||||
operator bool () const;
|
||||
operator Hex () const;
|
||||
operator int () const;
|
||||
operator double () const;
|
||||
operator char const* () const;
|
||||
bool SetValue(std::string const& in,Etype _type = V_CURRENT);
|
||||
std::string ToString() const;
|
||||
|
||||
private:
|
||||
void destroy() noexcept;
|
||||
Value& copy(Value const& in) noexcept(false);
|
||||
void plaincopy(Value const& in) noexcept;
|
||||
void destroy() throw();
|
||||
Value& copy(Value const& in);
|
||||
void plaincopy(Value const& in) throw();
|
||||
bool set_hex(std::string const& in);
|
||||
bool set_int(std::string const&in);
|
||||
bool set_bool(std::string const& in);
|
||||
@@ -136,7 +133,7 @@ public:
|
||||
//specific features.
|
||||
virtual bool CheckValue(Value const& in, bool warn);
|
||||
public:
|
||||
virtual ~Property(){ }
|
||||
virtual ~Property(){ }
|
||||
virtual const std::vector<Value>& GetValues() const;
|
||||
Value::Etype Get_type(){return default_value.type;}
|
||||
Changeable::Value getChange() {return change;}
|
||||
@@ -145,15 +142,15 @@ protected:
|
||||
//Set interval value to in or default if in is invalid. force always sets the value.
|
||||
//Can be overriden to set a different value if invalid.
|
||||
virtual bool SetVal(Value const& in, bool forced,bool warn=true) {
|
||||
if(forced || CheckValue(in,warn)) {
|
||||
if(forced || CheckValue(in,warn)) {
|
||||
value = in; return true;
|
||||
} else {
|
||||
} else {
|
||||
value = default_value; return false;
|
||||
}
|
||||
}
|
||||
Value value;
|
||||
std::vector<Value> suggested_values;
|
||||
typedef std::vector<Value>::iterator iter;
|
||||
typedef std::vector<Value>::const_iterator const_iter;
|
||||
Value default_value;
|
||||
const Changeable::Value change;
|
||||
};
|
||||
@@ -161,12 +158,12 @@ protected:
|
||||
class Prop_int:public Property {
|
||||
public:
|
||||
Prop_int(std::string const& _propname,Changeable::Value when, int _value)
|
||||
:Property(_propname,when) {
|
||||
:Property(_propname,when) {
|
||||
default_value = value = _value;
|
||||
min = max = -1;
|
||||
}
|
||||
Prop_int(std::string const& _propname,Changeable::Value when, int _min,int _max,int _value)
|
||||
:Property(_propname,when) {
|
||||
:Property(_propname,when) {
|
||||
default_value = value = _value;
|
||||
min = _min;
|
||||
max = _max;
|
||||
@@ -179,7 +176,7 @@ public:
|
||||
virtual bool CheckValue(Value const& in, bool warn);
|
||||
// Override SetVal, so it takes min,max in account when there are no suggested values
|
||||
virtual bool SetVal(Value const& in, bool forced,bool warn=true);
|
||||
|
||||
|
||||
private:
|
||||
Value min,max;
|
||||
};
|
||||
@@ -197,7 +194,7 @@ public:
|
||||
class Prop_bool:public Property {
|
||||
public:
|
||||
Prop_bool(std::string const& _propname, Changeable::Value when, bool _value)
|
||||
:Property(_propname,when) {
|
||||
:Property(_propname,when) {
|
||||
default_value = value = _value;
|
||||
}
|
||||
bool SetValue(std::string const& in);
|
||||
@@ -207,7 +204,7 @@ public:
|
||||
class Prop_string:public Property{
|
||||
public:
|
||||
Prop_string(std::string const& _propname, Changeable::Value when, char const * const _value)
|
||||
:Property(_propname,when) {
|
||||
:Property(_propname,when) {
|
||||
default_value = value = _value;
|
||||
}
|
||||
bool SetValue(std::string const& in);
|
||||
@@ -218,7 +215,7 @@ class Prop_path:public Prop_string{
|
||||
public:
|
||||
std::string realpath;
|
||||
Prop_path(std::string const& _propname, Changeable::Value when, char const * const _value)
|
||||
:Prop_string(_propname,when,_value) {
|
||||
:Prop_string(_propname,when,_value) {
|
||||
default_value = value = _value;
|
||||
realpath = _value;
|
||||
}
|
||||
@@ -229,7 +226,7 @@ public:
|
||||
class Prop_hex:public Property {
|
||||
public:
|
||||
Prop_hex(std::string const& _propname, Changeable::Value when, Hex _value)
|
||||
:Property(_propname,when) {
|
||||
:Property(_propname,when) {
|
||||
default_value = value = _value;
|
||||
}
|
||||
bool SetValue(std::string const& in);
|
||||
@@ -283,7 +280,7 @@ public:
|
||||
Prop_path* Add_path(std::string const& _propname, Property::Changeable::Value when, char const * const _value=NULL);
|
||||
Prop_bool* Add_bool(std::string const& _propname, Property::Changeable::Value when, bool _value=false);
|
||||
Prop_hex* Add_hex(std::string const& _propname, Property::Changeable::Value when, Hex _value=0);
|
||||
// void Add_double(char const * const _propname, double _value=0.0);
|
||||
// void Add_double(char const * const _propname, double _value=0.0);
|
||||
Prop_multival *Add_multi(std::string const& _propname, Property::Changeable::Value when,std::string const& sep);
|
||||
Prop_multival_remain *Add_multiremain(std::string const& _propname, Property::Changeable::Value when,std::string const& sep);
|
||||
|
||||
@@ -326,7 +323,7 @@ public:
|
||||
virtual bool SetValue(std::string const& input);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class Section_line: public Section{
|
||||
public:
|
||||
Section_line(std::string const& _sectionname):Section(_sectionname){}
|
||||
|
||||
+7
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
#define CMD_MAXCMDS 20
|
||||
#define CMD_OLDSIZE 4096
|
||||
extern Bitu call_shellstop;
|
||||
class DOS_Shell;
|
||||
|
||||
/* first_shell is used to add and delete stuff from the shell env
|
||||
* by "external" programs. (config) */
|
||||
extern Program * first_shell;
|
||||
extern DOS_Shell * first_shell;
|
||||
|
||||
class DOS_Shell;
|
||||
|
||||
class BatchFile {
|
||||
public:
|
||||
|
||||
+5
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,11 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Wengier: LFN support
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -50,12 +48,12 @@ char * lowcase(char * str);
|
||||
bool ScanCMDBool(char * cmd,char const * const check);
|
||||
char * ScanCMDRemain(char * cmd);
|
||||
char * StripWord(char *&cmd);
|
||||
char * StripArg(char *&cmd);
|
||||
bool IsDecWord(char * word);
|
||||
bool IsHexWord(char * word);
|
||||
Bits ConvDecWord(char * word);
|
||||
Bits ConvHexWord(char * word);
|
||||
|
||||
void trim(std::string& str);
|
||||
void upcase(std::string &str);
|
||||
void lowcase(std::string &str);
|
||||
|
||||
|
||||
+9
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,24 +11,25 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_TIMER_H
|
||||
#define DOSBOX_TIMER_H
|
||||
|
||||
/* underlying clock rate in HZ */
|
||||
#ifndef __LIBRETRO__ // Don't use system version of SDL.h
|
||||
#include <SDL.h>
|
||||
#else
|
||||
#include "SDL.h"
|
||||
#endif
|
||||
|
||||
#define PIT_TICK_RATE 1193182
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
#include "fake_timing.h"
|
||||
#define GetTicks() fakeGetTicks()
|
||||
#else
|
||||
#define GetTicks() SDL_GetTicks()
|
||||
#endif
|
||||
|
||||
typedef void (*TIMER_TickHandler)(void);
|
||||
|
||||
|
||||
+12
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2015 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -409,6 +409,13 @@ typedef struct {
|
||||
VGA_LFB lfb;
|
||||
} VGA_Type;
|
||||
|
||||
#ifdef __LIBRETRO__
|
||||
/* CGA Composite Mode function */
|
||||
void CGA_Composite_Mode(Bitu);
|
||||
|
||||
/* CGA Model function */
|
||||
void CGA_Model(bool);
|
||||
#endif
|
||||
|
||||
/* Hercules Palette function */
|
||||
void Herc_Palette(void);
|
||||
|
||||
+17
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2013 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
|
||||
@@ -11,9 +11,9 @@
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ void GFX_SetPalette(Bitu start,Bitu count,GFX_PalEntry * entries);
|
||||
Bitu GFX_GetBestMode(Bitu flags);
|
||||
Bitu GFX_GetRGB(Bit8u red,Bit8u green,Bit8u blue);
|
||||
Bitu GFX_SetSize(Bitu width,Bitu height,Bitu flags,double scalex,double scaley,GFX_CallBack_t cb);
|
||||
void GFX_SetShader(const char* src);
|
||||
void GFX_TearDown(void);
|
||||
|
||||
void GFX_ResetScreen(void);
|
||||
void GFX_Start(void);
|
||||
@@ -69,6 +71,13 @@ void GFX_EndUpdate( const Bit16u *changedLines );
|
||||
void GFX_GetSize(int &width, int &height, bool &fullscreen);
|
||||
void GFX_LosingFocus(void);
|
||||
|
||||
bool GFX_IsFullscreen(void);
|
||||
void GFX_SwitchLazyFullscreen(bool lazy);
|
||||
bool GFX_LazyFullscreenRequested(void);
|
||||
void GFX_SwitchFullscreenNoReset(void);
|
||||
void GFX_RestoreMode(void);
|
||||
void GFX_UpdateSDLCaptureState(void);
|
||||
|
||||
#if defined (WIN32)
|
||||
bool GFX_SDLUsingWinDIB(void);
|
||||
#endif
|
||||
@@ -77,4 +86,8 @@ bool GFX_SDLUsingWinDIB(void);
|
||||
void MAPPER_UpdateJoysticks(void);
|
||||
#endif
|
||||
|
||||
/* Mouse related */
|
||||
void GFX_CaptureMouse(void);
|
||||
extern bool mouselocked; //true if mouse is confined to window
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2011 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DOSBOX_VOODOO_H
|
||||
#define DOSBOX_VOODOO_H
|
||||
|
||||
|
||||
#define VOODOO_INITIAL_LFB 0xd0000000
|
||||
#define VOODOO_REG_PAGES 1024
|
||||
#define VOODOO_LFB_PAGES 1024
|
||||
#define VOODOO_TEX_PAGES 2048
|
||||
#define VOODOO_PAGES (VOODOO_REG_PAGES+VOODOO_LFB_PAGES+VOODOO_TEX_PAGES)
|
||||
|
||||
|
||||
#define VOODOO_EMU_TYPE_OFF 0
|
||||
#define VOODOO_EMU_TYPE_SOFTWARE 1
|
||||
#define VOODOO_EMU_TYPE_ACCELERATED 2
|
||||
|
||||
|
||||
void VOODOO_PCI_InitEnable(Bitu val);
|
||||
void VOODOO_PCI_Enable(bool enable);
|
||||
void VOODOO_PCI_SetLFB(Bit32u lfbaddr);
|
||||
bool VOODOO_PCI_CheckLFBPage(Bitu page);
|
||||
PageHandler* VOODOO_GetPageHandler();
|
||||
|
||||
#endif
|
||||
@@ -1,34 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
CORE_DIR := $(LOCAL_PATH)/..
|
||||
|
||||
INCFLAGS :=
|
||||
COMMONFLAGS :=
|
||||
|
||||
# No dynarec on the 32-bit ABIs: the NDK's clang rejects both of them. The ARM
|
||||
# one writes to r7 from inline asm, which is the frame pointer and reserved,
|
||||
# and the x86 one is not position independent, which the NDK requires. Both
|
||||
# ABIs build and run on the interpreter, which is what they get - the
|
||||
# alternative is not building for them at all.
|
||||
WITH_DYNAREC :=
|
||||
ifeq ($(TARGET_ARCH_ABI), x86_64)
|
||||
WITH_DYNAREC := x86_64
|
||||
endif
|
||||
|
||||
include $(CORE_DIR)/Makefile.common
|
||||
|
||||
COMMONFLAGS += -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 $(INCFLAGS) -DC_HAVE_MPROTECT="1"
|
||||
|
||||
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
|
||||
ifneq ($(GIT_VERSION)," unknown")
|
||||
COMMONFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := retro
|
||||
LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_CXX)
|
||||
LOCAL_CFLAGS := $(COMMONFLAGS)
|
||||
LOCAL_CPPFLAGS := $(COMMONFLAGS)
|
||||
LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/libretro/link.T
|
||||
LOCAL_CPP_FEATURES := rtti exceptions
|
||||
LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -1,4 +0,0 @@
|
||||
APP_STL := c++_static
|
||||
APP_ABI := all
|
||||
# dosbox still uses `register`, which is an error under the NDK's default C++17
|
||||
APP_CPPFLAGS := -std=gnu++14
|
||||
@@ -1,159 +0,0 @@
|
||||
/* Copyright (C) 2010-2016 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (retro_dirent.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* 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, 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 AUTHORS OR 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.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <retro_common.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_stat.h>
|
||||
#include <retro_dirent.h>
|
||||
|
||||
struct RDIR *retro_opendir(const char *name)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
char path_buf[1024];
|
||||
#endif
|
||||
struct RDIR *rdir = (struct RDIR*)calloc(1, sizeof(*rdir));
|
||||
|
||||
if (!rdir)
|
||||
return NULL;
|
||||
|
||||
#if defined(_WIN32)
|
||||
snprintf(path_buf, sizeof(path_buf), "%s\\*", name);
|
||||
rdir->directory = FindFirstFile(path_buf, &rdir->entry);
|
||||
#elif defined(VITA) || defined(PSP)
|
||||
rdir->directory = sceIoDopen(name);
|
||||
#elif defined(__PS3__)
|
||||
rdir->error = cellFsOpendir(name, &rdir->directory);
|
||||
#else
|
||||
rdir->directory = opendir(name);
|
||||
rdir->entry = NULL;
|
||||
#endif
|
||||
|
||||
return rdir;
|
||||
}
|
||||
|
||||
bool retro_dirent_error(struct RDIR *rdir)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
return (rdir->directory == INVALID_HANDLE_VALUE);
|
||||
#elif defined(VITA) || defined(PSP)
|
||||
return (rdir->directory < 0);
|
||||
#elif defined(__PS3__)
|
||||
return (rdir->error != CELL_FS_SUCCEEDED);
|
||||
#else
|
||||
return !(rdir->directory);
|
||||
#endif
|
||||
}
|
||||
|
||||
int retro_readdir(struct RDIR *rdir)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
if(rdir->next)
|
||||
return (FindNextFile(rdir->directory, &rdir->entry) != 0);
|
||||
else {
|
||||
rdir->next = true;
|
||||
return (rdir->directory != INVALID_HANDLE_VALUE);
|
||||
}
|
||||
#elif defined(VITA) || defined(PSP)
|
||||
return (sceIoDread(rdir->directory, &rdir->entry) > 0);
|
||||
#elif defined(__PS3__)
|
||||
uint64_t nread;
|
||||
rdir->error = cellFsReaddir(rdir->directory, &rdir->entry, &nread);
|
||||
return (nread != 0);
|
||||
#else
|
||||
return ((rdir->entry = readdir(rdir->directory)) != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *retro_dirent_get_name(struct RDIR *rdir)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
return rdir->entry.cFileName;
|
||||
#elif defined(VITA) || defined(PSP) || defined(__PS3__)
|
||||
return rdir->entry.d_name;
|
||||
#else
|
||||
return rdir->entry->d_name;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* retro_dirent_is_dir:
|
||||
* @rdir : pointer to the directory entry.
|
||||
* @path : path to the directory entry.
|
||||
*
|
||||
* Is the directory listing entry a directory?
|
||||
*
|
||||
* Returns: true if directory listing entry is
|
||||
* a directory, false if not.
|
||||
*/
|
||||
bool retro_dirent_is_dir(struct RDIR *rdir, const char *path)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
const WIN32_FIND_DATA *entry = (const WIN32_FIND_DATA*)&rdir->entry;
|
||||
return entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
const SceIoDirent *entry = (const SceIoDirent*)&rdir->entry;
|
||||
#if defined(PSP)
|
||||
return (entry->d_stat.st_attr & FIO_SO_IFDIR) == FIO_SO_IFDIR;
|
||||
#elif defined(VITA)
|
||||
return SCE_S_ISDIR(entry->d_stat.st_mode);
|
||||
#endif
|
||||
#elif defined(__PS3__)
|
||||
CellFsDirent *entry = (CellFsDirent*)&rdir->entry;
|
||||
return (entry->d_type == CELL_FS_TYPE_DIRECTORY);
|
||||
#elif defined(DT_DIR)
|
||||
const struct dirent *entry = (const struct dirent*)rdir->entry;
|
||||
if (entry->d_type == DT_DIR)
|
||||
return true;
|
||||
/* This can happen on certain file systems. */
|
||||
if (entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK)
|
||||
return path_is_directory(path);
|
||||
return false;
|
||||
#else
|
||||
/* dirent struct doesn't have d_type, do it the slow way ... */
|
||||
return path_is_directory(path);
|
||||
#endif
|
||||
}
|
||||
|
||||
void retro_closedir(struct RDIR *rdir)
|
||||
{
|
||||
if (!rdir)
|
||||
return;
|
||||
|
||||
#if defined(_WIN32)
|
||||
if (rdir->directory != INVALID_HANDLE_VALUE)
|
||||
FindClose(rdir->directory);
|
||||
#elif defined(VITA) || defined(PSP)
|
||||
sceIoDclose(rdir->directory);
|
||||
#elif defined(__PS3__)
|
||||
rdir->error = cellFsClosedir(rdir->directory);
|
||||
#else
|
||||
if (rdir->directory)
|
||||
closedir(rdir->directory);
|
||||
#endif
|
||||
|
||||
free(rdir);
|
||||
}
|
||||
@@ -1,213 +0,0 @@
|
||||
/* Copyright (C) 2010-2016 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (retro_stat.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* 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, 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 AUTHORS OR 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.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
#define setmode _setmode
|
||||
#endif
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#define INVALID_FILE_ATTRIBUTES -1
|
||||
#else
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <direct.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#elif defined(VITA)
|
||||
#define SCE_ERROR_ERRNO_EEXIST 0x80010011
|
||||
#include <psp2/io/fcntl.h>
|
||||
#include <psp2/io/dirent.h>
|
||||
#include <psp2/io/stat.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(PSP)
|
||||
#include <pspkernel.h>
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <kernel/image.h>
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__)
|
||||
#include <cell/cell_fs.h>
|
||||
#endif
|
||||
|
||||
#if defined(VITA)
|
||||
#define FIO_S_ISDIR SCE_S_ISDIR
|
||||
#endif
|
||||
|
||||
#if (defined(__PS3__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
|
||||
#include <unistd.h> /* stat() is defined here */
|
||||
#endif
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <boolean.h>
|
||||
|
||||
enum stat_mode
|
||||
{
|
||||
IS_DIRECTORY = 0,
|
||||
IS_CHARACTER_SPECIAL,
|
||||
IS_VALID
|
||||
};
|
||||
|
||||
static bool path_stat(const char *path, enum stat_mode mode, int32_t *size)
|
||||
{
|
||||
#if defined(VITA) || defined(PSP)
|
||||
SceIoStat buf;
|
||||
char *tmp = strdup(path);
|
||||
size_t len = strlen(tmp);
|
||||
if (tmp[len-1] == '/')
|
||||
tmp[len-1]='\0';
|
||||
|
||||
if (sceIoGetstat(tmp, &buf) < 0)
|
||||
{
|
||||
free(tmp);
|
||||
return false;
|
||||
}
|
||||
free(tmp);
|
||||
|
||||
#elif defined(__PS3__)
|
||||
CellFsStat buf;
|
||||
if (cellFsStat(path, &buf) < 0)
|
||||
return false;
|
||||
#elif defined(_WIN32)
|
||||
WIN32_FILE_ATTRIBUTE_DATA file_info;
|
||||
GET_FILEEX_INFO_LEVELS fInfoLevelId = GetFileExInfoStandard;
|
||||
DWORD ret = GetFileAttributesEx(path, fInfoLevelId, &file_info);
|
||||
if (ret == 0)
|
||||
return false;
|
||||
#else
|
||||
struct stat buf;
|
||||
if (stat(path, &buf) < 0)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
if (size)
|
||||
*size = file_info.nFileSizeLow;
|
||||
#else
|
||||
if (size)
|
||||
*size = buf.st_size;
|
||||
#endif
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case IS_DIRECTORY:
|
||||
#if defined(VITA) || defined(PSP)
|
||||
return FIO_S_ISDIR(buf.st_mode);
|
||||
#elif defined(__PS3__)
|
||||
return ((buf.st_mode & S_IFMT) == S_IFDIR);
|
||||
#elif defined(_WIN32)
|
||||
return (file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
|
||||
#else
|
||||
return S_ISDIR(buf.st_mode);
|
||||
#endif
|
||||
case IS_CHARACTER_SPECIAL:
|
||||
#if defined(VITA) || defined(PSP) || defined(__PS3__) || defined(_WIN32)
|
||||
return false;
|
||||
#else
|
||||
return S_ISCHR(buf.st_mode);
|
||||
#endif
|
||||
case IS_VALID:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* path_is_directory:
|
||||
* @path : path
|
||||
*
|
||||
* Checks if path is a directory.
|
||||
*
|
||||
* Returns: true (1) if path is a directory, otherwise false (0).
|
||||
*/
|
||||
bool path_is_directory(const char *path)
|
||||
{
|
||||
return path_stat(path, IS_DIRECTORY, NULL);
|
||||
}
|
||||
|
||||
bool path_is_character_special(const char *path)
|
||||
{
|
||||
return path_stat(path, IS_CHARACTER_SPECIAL, NULL);
|
||||
}
|
||||
|
||||
bool path_is_valid(const char *path)
|
||||
{
|
||||
return path_stat(path, IS_VALID, NULL);
|
||||
}
|
||||
|
||||
int32_t path_get_size(const char *path)
|
||||
{
|
||||
int32_t filesize = 0;
|
||||
if (path_stat(path, IS_VALID, &filesize))
|
||||
return filesize;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* path_mkdir_norecurse:
|
||||
* @dir : directory
|
||||
*
|
||||
* Create directory on filesystem.
|
||||
*
|
||||
* Returns: true (1) if directory could be created, otherwise false (0).
|
||||
**/
|
||||
bool mkdir_norecurse(const char *dir)
|
||||
{
|
||||
int ret;
|
||||
#if defined(_WIN32)
|
||||
ret = _mkdir(dir);
|
||||
#elif defined(IOS)
|
||||
ret = mkdir(dir, 0755);
|
||||
#elif defined(VITA) || defined(PSP)
|
||||
ret = sceIoMkdir(dir, 0777);
|
||||
#else
|
||||
ret = mkdir(dir, 0750);
|
||||
#endif
|
||||
/* Don't treat this as an error. */
|
||||
#if defined(VITA)
|
||||
if ((ret == SCE_ERROR_ERRNO_EEXIST) && path_is_directory(dir))
|
||||
ret = 0;
|
||||
#elif defined(PSP) || defined(_3DS)
|
||||
if ((ret == -1) && path_is_directory(dir))
|
||||
ret = 0;
|
||||
#else
|
||||
if (ret < 0 && errno == EEXIST && path_is_directory(dir))
|
||||
ret = 0;
|
||||
#endif
|
||||
if (ret < 0)
|
||||
printf("mkdir(%s) error: %s.\n", dir, strerror(errno));
|
||||
return ret == 0;
|
||||
}
|
||||
@@ -1,199 +0,0 @@
|
||||
/* Copyright (C) 2010-2016 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (retro_miscellaneous.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* 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, 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 AUTHORS OR 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.
|
||||
*/
|
||||
|
||||
#ifndef __RARCH_MISCELLANEOUS_H
|
||||
#define __RARCH_MISCELLANEOUS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#if defined(__PS3__) && !defined(__PSL1GHT__)
|
||||
#include <sys/timer.h>
|
||||
#elif defined(XENON)
|
||||
#include <time/time.h>
|
||||
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(__QNX__)
|
||||
#include <unistd.h>
|
||||
#elif defined(PSP)
|
||||
#include <pspthreadman.h>
|
||||
#elif defined(VITA)
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
#elif defined(_3DS)
|
||||
#include <3ds.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#elif defined(_WIN32) && defined(_XBOX)
|
||||
#include <Xtl.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <compat/msvc.h>
|
||||
#endif
|
||||
#include <retro_inline.h>
|
||||
|
||||
#ifndef PATH_MAX_LENGTH
|
||||
#if defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(GEKKO)
|
||||
#define PATH_MAX_LENGTH 512
|
||||
#else
|
||||
#define PATH_MAX_LENGTH 4096
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#define RARCH_SCALE_BASE 256
|
||||
|
||||
/**
|
||||
* retro_sleep:
|
||||
* @msec : amount in milliseconds to sleep
|
||||
*
|
||||
* Sleeps for a specified amount of milliseconds (@msec).
|
||||
**/
|
||||
static INLINE void retro_sleep(unsigned msec)
|
||||
{
|
||||
#if defined(__PS3__) && !defined(__PSL1GHT__)
|
||||
sys_timer_usleep(1000 * msec);
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
sceKernelDelayThread(1000 * msec);
|
||||
#elif defined(_3DS)
|
||||
svcSleepThread(1000000 * (s64)msec);
|
||||
#elif defined(_WIN32)
|
||||
Sleep(msec);
|
||||
#elif defined(XENON)
|
||||
udelay(1000 * msec);
|
||||
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(__QNX__)
|
||||
usleep(1000 * msec);
|
||||
#else
|
||||
struct timespec tv = {0};
|
||||
tv.tv_sec = msec / 1000;
|
||||
tv.tv_nsec = (msec % 1000) * 1000000;
|
||||
nanosleep(&tv, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* next_pow2:
|
||||
* @v : initial value
|
||||
*
|
||||
* Get next power of 2 value based on initial value.
|
||||
*
|
||||
* Returns: next power of 2 value (derived from @v).
|
||||
**/
|
||||
static INLINE uint32_t next_pow2(uint32_t v)
|
||||
{
|
||||
v--;
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
v++;
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* prev_pow2:
|
||||
* @v : initial value
|
||||
*
|
||||
* Get previous power of 2 value based on initial value.
|
||||
*
|
||||
* Returns: previous power of 2 value (derived from @v).
|
||||
**/
|
||||
static INLINE uint32_t prev_pow2(uint32_t v)
|
||||
{
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
return v - (v >> 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* db_to_gain:
|
||||
* @db : Decibels.
|
||||
*
|
||||
* Converts decibels to voltage gain.
|
||||
*
|
||||
* Returns: voltage gain value.
|
||||
**/
|
||||
static INLINE float db_to_gain(float db)
|
||||
{
|
||||
return powf(10.0f, db / 20.0f);
|
||||
}
|
||||
|
||||
/* Helper macros and struct to keep track of many booleans.
|
||||
* To check for multiple bits, use &&, not &.
|
||||
* For OR, | can be used. */
|
||||
typedef struct
|
||||
{
|
||||
uint32_t data[8];
|
||||
} retro_bits_t;
|
||||
|
||||
#define BIT_SET(a, bit) ((a)[(bit) >> 3] |= (1 << ((bit) & 7)))
|
||||
#define BIT_CLEAR(a, bit) ((a)[(bit) >> 3] &= ~(1 << ((bit) & 7)))
|
||||
#define BIT_GET(a, bit) ((a)[(bit) >> 3] & (1 << ((bit) & 7)))
|
||||
|
||||
#define BIT16_SET(a, bit) ((a) |= (1 << ((bit) & 15)))
|
||||
#define BIT16_CLEAR(a, bit) ((a) &= ~(1 << ((bit) & 15)))
|
||||
#define BIT16_GET(a, bit) (!!((a) & (1 << ((bit) & 15))))
|
||||
#define BIT16_CLEAR_ALL(a) ((a) = 0)
|
||||
|
||||
#define BIT32_SET(a, bit) ((a) |= (1 << ((bit) & 31)))
|
||||
#define BIT32_CLEAR(a, bit) ((a) &= ~(1 << ((bit) & 31)))
|
||||
#define BIT32_GET(a, bit) (!!((a) & (1 << ((bit) & 31))))
|
||||
#define BIT32_CLEAR_ALL(a) ((a) = 0)
|
||||
|
||||
#define BIT64_SET(a, bit) ((a) |= (UINT64_C(1) << ((bit) & 63)))
|
||||
#define BIT64_CLEAR(a, bit) ((a) &= ~(UINT64_C(1) << ((bit) & 63)))
|
||||
#define BIT64_GET(a, bit) (!!((a) & (UINT64_C(1) << ((bit) & 63))))
|
||||
#define BIT64_CLEAR_ALL(a) ((a) = 0)
|
||||
|
||||
#define BIT128_SET(a, bit) ((a).data[(bit) >> 5] |= (1 << ((bit) & 31))
|
||||
#define BIT128_CLEAR(a, bit) ((a).data[(bit) >> 5] &= ~(1 << ((bit) & 31)))
|
||||
#define BIT128_GET(a, bit) ((a).data[(bit) >> 5] & (1 << ((bit) & 31)))
|
||||
#define BIT128_CLEAR_ALL(a) memset(&(a), 0, sizeof(a));
|
||||
|
||||
#ifdef __PS3__
|
||||
int gettimeofday(struct timeval* tv, void* /*tz*/);
|
||||
int access(const char *fpath, int /*mode*/);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,55 +0,0 @@
|
||||
.globl .co_swap_asm
|
||||
.globl co_swap_asm
|
||||
.type .co_swap_asm, @function
|
||||
.type co_swap_asm, @function
|
||||
.co_swap_asm:
|
||||
co_swap_asm:
|
||||
mfcr 8
|
||||
std 1,40(4)
|
||||
mflr 9
|
||||
std 14,72(4)
|
||||
std 15,80(4)
|
||||
std 16,88(4)
|
||||
std 17,96(4)
|
||||
std 18,104(4)
|
||||
std 19,112(4)
|
||||
std 20,120(4)
|
||||
std 21,128(4)
|
||||
std 22,136(4)
|
||||
std 23,144(4)
|
||||
std 24,152(4)
|
||||
std 25,160(4)
|
||||
std 26,168(4)
|
||||
std 27,176(4)
|
||||
std 28,184(4)
|
||||
std 29,192(4)
|
||||
std 30,200(4)
|
||||
std 31,208(4)
|
||||
std 9,32(4)
|
||||
ld 7,32(3)
|
||||
ld 1,40(3)
|
||||
bl swap
|
||||
trap
|
||||
swap: stw 8,48(4)
|
||||
lwz 6,48(3)
|
||||
mtctr 7
|
||||
ld 14,72(3)
|
||||
ld 15,80(3)
|
||||
ld 16,88(3)
|
||||
ld 17,96(3)
|
||||
ld 18,104(3)
|
||||
ld 19,112(3)
|
||||
ld 20,120(3)
|
||||
ld 21,128(3)
|
||||
ld 22,136(3)
|
||||
ld 23,144(3)
|
||||
ld 24,152(3)
|
||||
ld 25,160(3)
|
||||
ld 26,168(3)
|
||||
ld 27,176(3)
|
||||
ld 28,184(3)
|
||||
ld 29,192(3)
|
||||
ld 30,200(3)
|
||||
ld 31,208(3)
|
||||
mtcr 6
|
||||
bctr
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
Language: Cpp
|
||||
BasedOnStyle: InheritParentConfig
|
||||
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
IndentPPDirectives: BeforeHash
|
||||
UseTab: Never
|
||||
...
|
||||
File renamed without changes.
@@ -0,0 +1,264 @@
|
||||
LIBRETRO_COMM_DIR := \
|
||||
$(CORE_DIR)/libretro/deps/common
|
||||
|
||||
LIBRETRO_SDL_DIR := \
|
||||
$(CORE_DIR)/libretro/deps/embedded_sdl
|
||||
|
||||
ifeq ($(WITH_FAKE_SDL), 1)
|
||||
INCFLAGS += \
|
||||
-I$(CORE_DIR)/libretro/src/fakesdl
|
||||
SOURCES_CXX += \
|
||||
$(CORE_DIR)/libretro/src/fakesdl/SDL/SDL_endian.cpp \
|
||||
$(CORE_DIR)/libretro/src/fakesdl/SDL/SDL_thread.cpp \
|
||||
$(CORE_DIR)/libretro/src/fakesdl/SDL/SDL_timer.cpp
|
||||
endif
|
||||
|
||||
# include flags
|
||||
INCFLAGS += \
|
||||
-I$(CORE_DIR)/include \
|
||||
-I$(CORE_DIR)/libretro \
|
||||
-I$(CORE_DIR)/libretro/src \
|
||||
-I$(CORE_DIR)/libretro/src/virtual_keyboard \
|
||||
-I$(CORE_DIR)/src \
|
||||
-I$(LIBRETRO_COMM_DIR)/include
|
||||
|
||||
# common files
|
||||
SOURCES_CXX += \
|
||||
$(CORE_DIR)/libretro/src/CoreOptionCategory.cpp \
|
||||
$(CORE_DIR)/libretro/src/CoreOptionDefinition.cpp \
|
||||
$(CORE_DIR)/libretro/src/CoreOptionValue.cpp \
|
||||
$(CORE_DIR)/libretro/src/CoreOptions.cpp \
|
||||
$(CORE_DIR)/libretro/src/disk_control.cpp \
|
||||
$(CORE_DIR)/libretro/src/emu_thread.cpp \
|
||||
$(CORE_DIR)/libretro/src/fake_timing.cpp \
|
||||
$(CORE_DIR)/libretro/src/libretro.cpp \
|
||||
$(CORE_DIR)/libretro/src/libretro_audio.cpp \
|
||||
$(CORE_DIR)/libretro/src/libretro_core_options.cpp \
|
||||
$(CORE_DIR)/libretro/src/libretro_gfx.cpp \
|
||||
$(CORE_DIR)/libretro/src/libretro_input.cpp \
|
||||
$(CORE_DIR)/libretro/src/automap.cpp \
|
||||
$(CORE_DIR)/libretro/src/keyb2joypad.cpp \
|
||||
$(CORE_DIR)/libretro/src/libretro_message.cpp \
|
||||
$(CORE_DIR)/libretro/src/log.cpp \
|
||||
$(CORE_DIR)/libretro/src/util.cpp \
|
||||
$(CORE_DIR)/libretro/src/virtual_keyboard/libretro-graph.cpp \
|
||||
$(CORE_DIR)/libretro/src/virtual_keyboard/libretro-vkbd.cpp \
|
||||
$(CORE_DIR)/src/cpu/callback.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_dyn_x86.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_dynrec.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_full.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_normal.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_prefetch.cpp \
|
||||
$(CORE_DIR)/src/cpu/core_simple.cpp \
|
||||
$(CORE_DIR)/src/cpu/cpu.cpp \
|
||||
$(CORE_DIR)/src/cpu/flags.cpp \
|
||||
$(CORE_DIR)/src/cpu/modrm.cpp \
|
||||
$(CORE_DIR)/src/cpu/paging.cpp \
|
||||
$(CORE_DIR)/src/dos/cdrom.cpp \
|
||||
$(CORE_DIR)/src/dos/cdrom_aspi_win32.cpp \
|
||||
$(CORE_DIR)/src/dos/cdrom_image.cpp \
|
||||
$(CORE_DIR)/src/dos/cdrom_ioctl_win32.cpp \
|
||||
$(CORE_DIR)/src/dos/dos.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_classes.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_devices.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_execute.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_files.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_ioctl.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_keyboard_layout.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_memory.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_misc.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_mscdex.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_programs.cpp \
|
||||
$(CORE_DIR)/src/dos/dos_tables.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_cache.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_fat.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_iso.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_local.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_overlay.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_dbp.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_memory.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_union.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_zip.cpp \
|
||||
$(CORE_DIR)/src/dos/drive_virtual.cpp \
|
||||
$(CORE_DIR)/src/dos/drives.cpp \
|
||||
$(CORE_DIR)/src/dosbox.cpp \
|
||||
$(CORE_DIR)/src/fpu/fpu.cpp \
|
||||
$(CORE_DIR)/src/gui/midi.cpp \
|
||||
$(CORE_DIR)/src/gui/midi_mt32.cpp \
|
||||
$(CORE_DIR)/src/gui/render.cpp \
|
||||
$(CORE_DIR)/src/gui/render_scalers.cpp \
|
||||
$(CORE_DIR)/src/hardware/adlib.cpp \
|
||||
$(CORE_DIR)/src/hardware/cmos.cpp \
|
||||
$(CORE_DIR)/src/hardware/dbopl.cpp \
|
||||
$(CORE_DIR)/src/hardware/disney.cpp \
|
||||
$(CORE_DIR)/src/hardware/dma.cpp \
|
||||
$(CORE_DIR)/src/hardware/gameblaster.cpp \
|
||||
$(CORE_DIR)/src/hardware/gus.cpp \
|
||||
$(CORE_DIR)/src/hardware/hardware.cpp \
|
||||
$(CORE_DIR)/src/hardware/iohandler.cpp \
|
||||
$(CORE_DIR)/src/hardware/joystick.cpp \
|
||||
$(CORE_DIR)/src/hardware/keyboard.cpp \
|
||||
$(CORE_DIR)/src/hardware/mame/fmopl.cpp \
|
||||
$(CORE_DIR)/src/hardware/mame/saa1099.cpp \
|
||||
$(CORE_DIR)/src/hardware/mame/sn76496.cpp \
|
||||
$(CORE_DIR)/src/hardware/mame/ymf262.cpp \
|
||||
$(CORE_DIR)/src/hardware/memory.cpp \
|
||||
$(CORE_DIR)/src/hardware/mixer.cpp \
|
||||
$(CORE_DIR)/src/hardware/mpu401.cpp \
|
||||
$(CORE_DIR)/src/hardware/nukedsc55.cpp \
|
||||
$(CORE_DIR)/src/hardware/pci_bus.cpp \
|
||||
$(CORE_DIR)/src/hardware/pcspeaker.cpp \
|
||||
$(CORE_DIR)/src/hardware/pic.cpp \
|
||||
$(CORE_DIR)/src/hardware/sblaster.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/directserial.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/libserial.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/misc_util.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/nullmodem.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/serialdummy.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/serialport.cpp \
|
||||
$(CORE_DIR)/src/hardware/serialport/softmodem.cpp \
|
||||
$(CORE_DIR)/src/hardware/tandy_sound.cpp \
|
||||
$(CORE_DIR)/src/hardware/timer.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_attr.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_crtc.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_dac.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_draw.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_gfx.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_memory.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_misc.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_other.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_paradise.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_s3.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_seq.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_tseng.cpp \
|
||||
$(CORE_DIR)/src/hardware/vga_xga.cpp \
|
||||
$(CORE_DIR)/src/ints/bios.cpp \
|
||||
$(CORE_DIR)/src/ints/bios_disk.cpp \
|
||||
$(CORE_DIR)/src/ints/bios_keyboard.cpp \
|
||||
$(CORE_DIR)/src/ints/ems.cpp \
|
||||
$(CORE_DIR)/src/ints/int10.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_char.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_memory.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_misc.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_modes.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_pal.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_put_pixel.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_vesa.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_video_state.cpp \
|
||||
$(CORE_DIR)/src/ints/int10_vptable.cpp \
|
||||
$(CORE_DIR)/src/ints/mouse.cpp \
|
||||
$(CORE_DIR)/src/ints/xms.cpp \
|
||||
$(CORE_DIR)/src/misc/cross.cpp \
|
||||
$(CORE_DIR)/src/misc/messages.cpp \
|
||||
$(CORE_DIR)/src/misc/programs.cpp \
|
||||
$(CORE_DIR)/src/misc/setup.cpp \
|
||||
$(CORE_DIR)/src/misc/support.cpp \
|
||||
$(CORE_DIR)/src/shell/shell.cpp \
|
||||
$(CORE_DIR)/src/shell/shell_batch.cpp \
|
||||
$(CORE_DIR)/src/shell/shell_cmds.cpp \
|
||||
$(CORE_DIR)/src/shell/shell_misc.cpp
|
||||
|
||||
SOURCES_C += \
|
||||
$(CORE_DIR)/src/hardware/nukedopl.c
|
||||
|
||||
ifeq ($(WITH_VOODOO), 1)
|
||||
SOURCES_CXX += \
|
||||
$(CORE_DIR)/src/hardware/voodoo.cpp \
|
||||
$(CORE_DIR)/src/hardware/voodoo_emu.cpp \
|
||||
$(CORE_DIR)/src/hardware/voodoo_interface.cpp \
|
||||
$(CORE_DIR)/src/hardware/voodoo_opengl.cpp \
|
||||
$(CORE_DIR)/src/hardware/voodoo_vogl.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(WITH_FAKE_SDL), 1)
|
||||
ifeq ($(WITH_IPX), 1)
|
||||
SOURCES_CXX += \
|
||||
$(CORE_DIR)/src/hardware/ipx.cpp \
|
||||
$(CORE_DIR)/src/hardware/ipxserver.cpp
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_ALSA_MIDI), 1)
|
||||
SOURCES_CXX += \
|
||||
$(CORE_DIR)/libretro/src/midi_alsa.cpp
|
||||
endif
|
||||
ifeq ($(platform), win)
|
||||
SOURCES_CXX += \
|
||||
$(CORE_DIR)/libretro/src/midi_win32.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_BASSMIDI), 1)
|
||||
SOURCES_CXX += $(CORE_DIR)/libretro/src/midi_bassmidi.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_FLUIDSYNTH), 1)
|
||||
SOURCES_CXX += $(CORE_DIR)/libretro/src/midi_fluidsynth.cpp
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SDL_SOUND_WRAPPER), 1)
|
||||
INCFLAGS += \
|
||||
-I$(CORE_DIR)/libretro/deps/SDL_audiolib/3rdparty/dr_libs \
|
||||
-I$(CORE_DIR)/libretro/deps/SDL_audiolib/3rdparty/speex_resampler \
|
||||
-I$(CORE_DIR)/libretro/deps/SDL_audiolib/include \
|
||||
-I$(CORE_DIR)/libretro/deps/SDL_audiolib/src \
|
||||
-I$(CORE_DIR)/libretro/src/sdl_sound_wrapper
|
||||
|
||||
COMMONFLAGS += \
|
||||
-DAULIB_STATIC_DEFINE \
|
||||
-DOUTSIDE_SPEEX \
|
||||
-DRANDOM_PREFIX=SDL_audiolib \
|
||||
-DSPX_RESAMPLE_EXPORT=
|
||||
|
||||
SOURCES_C += \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/3rdparty/speex_resampler/resample.c \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/dr_flac.c \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/dr_wav.c \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/missing/sdl_load_file_rw.c \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/missing/sdl_rwsize.c
|
||||
|
||||
SOURCES_CXX += \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/Decoder.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/DecoderDrflac.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/DecoderDrwav.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/DecoderMpg123.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/DecoderOpus.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/DecoderVorbis.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/Resampler.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/ResamplerSpeex.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/Stream.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/aulib.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/sampleconv.cpp \
|
||||
$(CORE_DIR)/libretro/deps/SDL_audiolib/src/stream_p.cpp \
|
||||
$(CORE_DIR)/libretro/src/sdl_sound_wrapper/SDL_sound.cpp
|
||||
endif
|
||||
|
||||
SOURCES_C += \
|
||||
$(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
|
||||
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
|
||||
$(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
|
||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
|
||||
$(LIBRETRO_COMM_DIR)/file/file_path.c \
|
||||
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
|
||||
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
|
||||
$(LIBRETRO_COMM_DIR)/time/rtime.c \
|
||||
$(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c
|
||||
|
||||
# dynarec flags
|
||||
ifeq ($(WITH_DYNAREC), arm)
|
||||
COMMONFLAGS += -DC_DYNREC -DC_TARGETCPU="ARMV7LE"
|
||||
else ifeq ($(WITH_DYNAREC), arm64)
|
||||
COMMONFLAGS += -DC_DYNREC -DC_TARGETCPU="ARMV8LE"
|
||||
else ifeq ($(WITH_DYNAREC), oldarm)
|
||||
COMMONFLAGS += -DC_DYNREC -DC_TARGETCPU="ARMV4LE"
|
||||
else ifeq ($(WITH_DYNAREC), x86_64)
|
||||
COMMONFLAGS += -DC_DYNAMIC_X86 -DC_TARGETCPU="X86_64"
|
||||
else ifeq ($(WITH_DYNAREC), x86)
|
||||
COMMONFLAGS += -DC_DYNAMIC_X86 -DC_TARGETCPU="X86"
|
||||
else ifeq ($(WITH_DYNAREC), x86_generic)
|
||||
COMMONFLAGS += -DC_DYNREC -DC_TARGETCPU="X86"
|
||||
else ifeq ($(WITH_DYNAREC), ppc)
|
||||
COMMONFLAGS += -DC_DYNREC -DC_TARGETCPU="POWERPC"
|
||||
else ifeq ($(WITH_DYNAREC), mips)
|
||||
COMMONFLAGS += -DC_DYNREC=0 -DC_TARGETCPU="MIPSEL"
|
||||
endif
|
||||
@@ -0,0 +1,333 @@
|
||||
DEBUG := 0
|
||||
# Use C++20 for building. This is useful during development. For example it allows for compile-time
|
||||
# checks of fmtlib format arguments.
|
||||
WITH_CPP20 ?= 0
|
||||
# Build with 3dfx Voodoo emulation support
|
||||
WITH_VOODOO ?= 1
|
||||
# Link statically against libgcc_s and libstdc++.
|
||||
STATIC_LIBCXX ?= 0
|
||||
# Build and link our own bundled ogg, flac, etc. statically.
|
||||
BUNDLED_AUDIO_CODECS ?= 1
|
||||
# Build and link our own libsndfile statically.
|
||||
BUNDLED_LIBSNDFILE ?= 1
|
||||
# Build and link our own sdl and sdl_net statically.
|
||||
BUNDLED_SDL ?= 0
|
||||
# Build with BASSMIDI support
|
||||
WITH_BASSMIDI ?= 1
|
||||
# Build with fluidsynth support
|
||||
WITH_FLUIDSYNTH ?= 1
|
||||
# Build with pinhack patch
|
||||
WITH_PINHACK ?= 1
|
||||
# Extra command-line flags to pass to pkg-config.
|
||||
PKG_CONFIG_FLAGS ?=
|
||||
# Link statically against some system-installed libraries (audio codecs and libsndfile.)
|
||||
STATIC_PACKAGES ?= 0
|
||||
# CMake generator.
|
||||
CMAKE_GENERATOR ?= Ninja
|
||||
# CMake 4 removed compatibility with cmake_minimum_required() values below 3.5, which several
|
||||
# bundled dependencies still declare. This is passed through the environment rather than as a -D
|
||||
# flag so that nested configure runs (fluidsynth spawns one for its gentables ExternalProject)
|
||||
# inherit it as well. CMake releases older than 3.31.6 ignore it.
|
||||
CMAKE_POLICY_VERSION_MINIMUM ?= 3.5
|
||||
# Meson executable.
|
||||
MESON ?= meson
|
||||
# Ninja executable.
|
||||
NINJA ?= ninja
|
||||
|
||||
GIT_VERSION := "$(shell git rev-parse --short HEAD)"
|
||||
SVN_VERSION := "$(shell cat svn)"
|
||||
|
||||
UNAME=$(shell uname -s)
|
||||
UNAMEM=$(shell uname -m)
|
||||
NUMPROC?=$(shell nproc)
|
||||
ifeq ($(NUMPROC),)
|
||||
NUMPROC=2
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_CPP20), 1)
|
||||
CXXFLAGS += -std=gnu++20
|
||||
EXTRA_CMAKE_FLAGS := -DCMAKE_CXX_STANDARD=20
|
||||
else
|
||||
CXXFLAGS += -std=gnu++17
|
||||
EXTRA_CMAKE_FLAGS := -DCMAKE_CXX_STANDARD=17
|
||||
endif
|
||||
CXXFLAGS += -Wno-register -DFMT_HEADER_ONLY
|
||||
COMMONFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" -DSVN_VERSION=\"$(SVN_VERSION)\"
|
||||
|
||||
# Target triplet for cross compilation. When cross compiling from Linux to
|
||||
# Windows 32-bit using MXE for example, you'd set this to something like:
|
||||
#
|
||||
# $ make TARGET_TRIPLET=i686-w64-mingw32.static [...]
|
||||
#
|
||||
# Or whatever your wanted target is.
|
||||
ifdef TARGET_TRIPLET
|
||||
cross_prefix = $(TARGET_TRIPLET)-
|
||||
endif
|
||||
AR:=$(cross_prefix)$(AR)
|
||||
AS:=$(cross_prefix)$(AS)
|
||||
CC:=$(cross_prefix)$(CC)
|
||||
CXX:=$(cross_prefix)$(CXX)
|
||||
LD:=$(cross_prefix)$(LD)
|
||||
CMAKE=cmake
|
||||
PKGCONFIG=pkg-config
|
||||
|
||||
platform ?= unix
|
||||
ifneq ($(findstring MINGW,$(UNAME)),)
|
||||
platform = win
|
||||
else ifneq ($(findstring Darwin,$(UNAME)),)
|
||||
platform = osx
|
||||
else ifneq ($(findstring win,$(UNAME)),)
|
||||
platform = win
|
||||
endif
|
||||
|
||||
LIBRETRO_DIR := libretro
|
||||
TARGET_NAME := dosbox
|
||||
WITH_DYNAREC ?=
|
||||
|
||||
# try to guess the dynarec based on the host system, unreliable
|
||||
ifeq ($(platform),win)
|
||||
ifneq ($(findstring MINGW32,$(UNAME)),)
|
||||
WITH_DYNAREC := x86
|
||||
else ifneq ($(findstring MINGW64,$(UNAME)),)
|
||||
WITH_DYNAREC := x86_64
|
||||
endif
|
||||
else ifeq ($(platform),unix)
|
||||
ifneq ($(findstring x86_64,$(UNAMEM)),)
|
||||
WITH_DYNAREC := x86_64
|
||||
else ifneq ($(findstring amd64,$(UNAMEM)),)
|
||||
WITH_DYNAREC := x86_64
|
||||
else ifneq ($(findstring 86,$(UNAMEM)),)
|
||||
WITH_DYNAREC := x86
|
||||
else ifneq ($(findstring aarch64,$(UNAMEM)),)
|
||||
WITH_DYNAREC := arm64
|
||||
COMMONFLAGS += -DPAGESIZE=$(shell getconf PAGESIZE)
|
||||
else ifneq ($(findstring arm64,$(UNAMEM)),)
|
||||
WITH_DYNAREC := arm64
|
||||
else ifneq ($(findstring arm,$(UNAMEM)),)
|
||||
WITH_DYNAREC := arm
|
||||
endif
|
||||
else ifeq ($(platform),osx)
|
||||
ifeq ($(target), x86)
|
||||
WITH_DYNAREC := x86
|
||||
else ifeq ($(target),x86_64)
|
||||
WITH_DYNAREC := x86_64
|
||||
endif
|
||||
endif
|
||||
|
||||
# enable IPX
|
||||
ifeq ($(platform),win)
|
||||
WITH_IPX := 1
|
||||
else ifeq ($(platform),unix)
|
||||
WITH_IPX := 1
|
||||
else ifeq ($(platform),osx)
|
||||
WITH_IPX := 1
|
||||
endif
|
||||
|
||||
# arm
|
||||
ifeq ($(CORTEX_A7), 1)
|
||||
COMMONFLAGS += -marm -mcpu=cortex-a7
|
||||
WITH_DYNAREC = arm
|
||||
ifeq ($(ARM_NEON), 1)
|
||||
COMMONFLAGS += -mfpu=neon-vfpv4
|
||||
endif
|
||||
endif
|
||||
ifeq ($(ARM_HARDFLOAT), 1)
|
||||
COMMONFLAGS += -mfloat-abi=hard
|
||||
endif
|
||||
|
||||
# flags
|
||||
ifeq ($(platform), osx)
|
||||
COMMONFLAGS += -DC_HAVE_MPROTECT
|
||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||
LDFLAGS += -dynamiclib `$(PKGCONFIG) $(PKG_CONFIG_FLAGS) --libs SDL_net`
|
||||
fpic = -fPIC
|
||||
ifeq ($(arch),ppc)
|
||||
COMMONFLAGS += -D__ppc__
|
||||
endif
|
||||
ifndef ($(UNIVERSAL))
|
||||
CFLAGS += $(ARCHFLAGS)
|
||||
CXXFLAGS += $(ARCHFLAGS)
|
||||
LDFLAGS += $(ARCHFLAGS)
|
||||
endif
|
||||
COMMONFLAGS += -D__MACOSX__
|
||||
else ifeq ($(platform), win)
|
||||
COMMONFLAGS += -mno-ms-bitfields
|
||||
TARGET := $(TARGET_NAME)_libretro.dll
|
||||
LDFLAGS += -shared -Wl,--version-script=link.T -lwinmm
|
||||
ifeq ($(WITH_FAKE_SDL), 1)
|
||||
LDFLAGS += -Wl,-Bstatic
|
||||
else
|
||||
LDFLAGS += -Wl,-Bstatic `$(PKGCONFIG) --libs sdl` -lSDL_net
|
||||
LDFLAGS += -Wl,-Bdynamic -liphlpapi -lws2_32 -lopengl32
|
||||
endif
|
||||
COMMONFLAGS += -DWIN32 -D__USE_W32_SOCKETS -Werror=return-type
|
||||
else
|
||||
ifeq ($(UNAME),Linux)
|
||||
# $(UNAME) is the machine doing the building, so a cross build lands
|
||||
# here as well and then asks pkg-config for an alsa that is not in the
|
||||
# dependency prefix - a link full of undefined snd_seq_*. Let the
|
||||
# caller say no.
|
||||
WITH_ALSA_MIDI ?= 1
|
||||
ifeq ($(WITH_ALSA_MIDI),1)
|
||||
COMMONFLAGS += -DHAVE_ALSA
|
||||
LDFLAGS += `$(PKGCONFIG) --libs alsa`
|
||||
endif
|
||||
endif
|
||||
COMMONFLAGS += -DC_HAVE_MPROTECT
|
||||
TARGET := $(TARGET_NAME)_libretro.so
|
||||
LDFLAGS += -shared -Wl,--version-script=link.T
|
||||
ifeq ($(WITH_FAKE_SDL), 1)
|
||||
LDFLAGS += -Wl,-Bstatic
|
||||
else
|
||||
LDFLAGS += `$(PKGCONFIG) --libs SDL_net`
|
||||
endif
|
||||
LDFLAGS += -Wl,-Bdynamic
|
||||
fpic = -fPIC
|
||||
endif
|
||||
ifeq ($(DEBUG), 1)
|
||||
COMMONFLAGS += -O0 -g
|
||||
CMAKE_BUILD_TYPE = Debug
|
||||
MESON_BUILD_TYPE = debug
|
||||
AUTOCONF_DEBUG_FLAG = yes
|
||||
else
|
||||
COMMONFLAGS += -O3 -DNDEBUG
|
||||
CMAKE_BUILD_TYPE = Release
|
||||
MESON_BUILD_TYPE = release
|
||||
AUTOCONF_DEBUG_FLAG = no
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_FAKE_SDL), 1)
|
||||
COMMONFLAGS += -DWITH_FAKE_SDL -Isrc/fakesdl/SDL
|
||||
else
|
||||
WITH_SDL_SOUND_WRAPPER ?= 1
|
||||
COMMONFLAGS += `$(PKGCONFIG) --cflags sdl`
|
||||
ifeq ($(WITH_IPX), 1)
|
||||
COMMONFLAGS += -DC_IPX
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_VOODOO), 1)
|
||||
COMMONFLAGS += -DWITH_VOODOO
|
||||
endif
|
||||
|
||||
CORE_DIR := ..
|
||||
INCFLAGS :=
|
||||
SOURCES_C :=
|
||||
SOURCES_CXX :=
|
||||
|
||||
DEPS_BIN_DIR = $(CURDIR)/deps_bin
|
||||
ifeq ($(BUNDLED_SDL), 1)
|
||||
include deps/sdl.makefile
|
||||
include deps/sdl_net.makefile
|
||||
endif
|
||||
ifeq ($(WITH_FLUIDSYNTH), 1)
|
||||
ifeq ($(BUNDLED_AUDIO_CODECS), 1)
|
||||
include deps/ogg.makefile
|
||||
include deps/vorbis.makefile
|
||||
include deps/opus.makefile
|
||||
include deps/flac.makefile
|
||||
endif
|
||||
ifeq ($(BUNDLED_LIBSNDFILE), 1)
|
||||
include deps/libsndfile.makefile
|
||||
endif
|
||||
include deps/fluidsynth.makefile
|
||||
endif
|
||||
include deps/munt.makefile
|
||||
ifeq ($(WITH_SDL_SOUND_WRAPPER), 1)
|
||||
ifeq ($(BUNDLED_AUDIO_CODECS), 1)
|
||||
include deps/mpg123.makefile
|
||||
include deps/ogg.makefile
|
||||
include deps/opus.makefile
|
||||
include deps/opusfile.makefile
|
||||
include deps/vorbis.makefile
|
||||
else
|
||||
EXTRA_PACKAGES += libmpg123 opusfile vorbisfile
|
||||
endif
|
||||
COMMONFLAGS += \
|
||||
-DC_SDL_SOUND \
|
||||
`$(PKGCONFIG) --cflags libmpg123 opusfile vorbisfile`
|
||||
endif
|
||||
export PKG_CONFIG_PATH := $(DEPS_BIN_DIR)/lib/pkgconfig:$(PKG_CONFIG_PATH)
|
||||
export PATH := $(DEPS_BIN_DIR)/bin:$(PATH)
|
||||
# When cross compiling with MXE, we need PKG_CONFIG_PATH_<TARGET_TRIPLET> but with all dashes and
|
||||
# dots converted to underscores.
|
||||
ifdef TARGET_TRIPLET
|
||||
export PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET_TRIPLET))) = $(PKG_CONFIG_PATH)
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
OBJECTS = $(SOURCES_CXX:.cpp=.o) $(SOURCES_C:.c=.o)
|
||||
OBJECT_DEPS = $(OBJECTS:.o=.d)
|
||||
INCFLAGS += -Ideps/fmt/include
|
||||
ifeq ($(WITH_BASSMIDI), 1)
|
||||
COMMONFLAGS += -DWITH_BASSMIDI
|
||||
LDFLAGS += -ldl
|
||||
endif
|
||||
ifeq ($(WITH_PINHACK), 1)
|
||||
COMMONFLAGS += -DWITH_PINHACK
|
||||
endif
|
||||
CXXFLAGS += -D__LIBRETRO__ -MMD $(fpic) $(INCFLAGS) $(COMMONFLAGS)
|
||||
CFLAGS += -D__LIBRETRO__ -MMD $(fpic) $(INCFLAGS) $(COMMONFLAGS)
|
||||
LDFLAGS += -lm $(fpic)
|
||||
ifeq ($(STATIC_PACKAGES), 1)
|
||||
LDFLAGS += -Wl,-Bstatic
|
||||
PKG_CONFIG_FLAGS += --static
|
||||
endif
|
||||
ifeq ($(BUNDLED_AUDIO_CODECS), 1)
|
||||
LDFLAGS += \
|
||||
$(DEPS_BIN_DIR)/lib/libFLAC.a \
|
||||
$(DEPS_BIN_DIR)/lib/libmpg123.a \
|
||||
$(DEPS_BIN_DIR)/lib/libopusfile.a \
|
||||
$(DEPS_BIN_DIR)/lib/libopus.a \
|
||||
$(DEPS_BIN_DIR)/lib/libvorbisfile.a \
|
||||
$(DEPS_BIN_DIR)/lib/libvorbis.a \
|
||||
$(DEPS_BIN_DIR)/lib/libogg.a
|
||||
|
||||
ifeq ($(platform), win)
|
||||
LDFLAGS += -lshlwapi
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef EXTRA_PACKAGES
|
||||
LDFLAGS += `$(PKGCONFIG) $(PKG_CONFIG_FLAGS) --libs $(EXTRA_PACKAGES)`
|
||||
INCFLAGS += `$(PKGCONFIG) $(PKG_CONFIG_FLAGS) --cflags-only-I $(EXTRA_PACKAGES)`
|
||||
endif
|
||||
export CMAKE_GENERATOR
|
||||
export CMAKE_POLICY_VERSION_MINIMUM
|
||||
|
||||
# We append these flags here so they appear after all other flags, otherwise they might not work
|
||||
# correctly.
|
||||
ifeq ($(STATIC_LIBCXX), 1)
|
||||
LDFLAGS += -static-libgcc -static-libstdc++
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: $(TARGET)
|
||||
|
||||
.PHONY: deps
|
||||
deps:
|
||||
|
||||
$(OBJECTS): $(FLUIDSYNTH) $(MUNT) $(SDLNET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
ifeq ($(STATIC_LINKING), 1)
|
||||
$(AR) rcs $@ $(OBJECTS)
|
||||
else
|
||||
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
-include $(OBJECT_DEPS)
|
||||
|
||||
.PHONY: targetclean
|
||||
targetclean:
|
||||
rm -f $(OBJECTS) $(OBJECT_DEPS) $(TARGET)
|
||||
|
||||
.PHONY: depsclean
|
||||
depsclean:
|
||||
rm -rf "$(DEPS_BIN_DIR)"
|
||||
|
||||
.PHONY: clean
|
||||
clean: depsclean targetclean
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
@@ -0,0 +1,108 @@
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: false
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: true
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
SplitEmptyNamespace: false
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeInheritanceComma: false
|
||||
BreakInheritanceList: AfterColon
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IncludeBlocks: Preserve
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 4
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
...
|
||||
@@ -0,0 +1 @@
|
||||
/resampler/* linguist-vendored
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {os: ubuntu-latest, bass_os: linux, CC: gcc-9, CXX: g++-9}
|
||||
- {os: macos-10.15, bass_os: osx, CC: clang, CXX: clang++}
|
||||
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
env:
|
||||
CC: ${{ matrix.config.CC }}
|
||||
CXX: ${{ matrix.config.CXX }}
|
||||
CFLAGS: -isystem /usr/local/include
|
||||
CXXFLAGS: -isystem /usr/local/include
|
||||
CMAKE_GENERATOR: Ninja
|
||||
BASS_VERSION: 24
|
||||
BASSMIDI_VERSION: 24
|
||||
FSYNTH_VERSION: 2.1.5
|
||||
ADLMIDI_VERSION: 1.5.0.1
|
||||
WILDMIDI_VERSION: 0.4.4
|
||||
|
||||
steps:
|
||||
- run: sudo apt-get update
|
||||
if: runner.os == 'Linux'
|
||||
|
||||
- name: Install Linux deps
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get install -y
|
||||
libmodplug-dev
|
||||
libmpcdec-dev
|
||||
libmpg123-dev
|
||||
libopenmpt-dev
|
||||
libopusfile-dev
|
||||
libsamplerate0-dev
|
||||
libsdl-dev
|
||||
libsdl2-dev
|
||||
libsndfile1-dev
|
||||
libsoxr-dev
|
||||
libvorbis-dev
|
||||
libwildmidi-dev
|
||||
libxmp-dev
|
||||
ninja-build
|
||||
|
||||
- name: Install macOS deps
|
||||
if: runner.os == 'macOS'
|
||||
run: brew install
|
||||
fluidsynth
|
||||
glib
|
||||
libmodplug
|
||||
libopenmpt
|
||||
libsamplerate
|
||||
libsndfile
|
||||
libsoxr
|
||||
libvorbis
|
||||
libxmp
|
||||
mpg123
|
||||
musepack
|
||||
ninja
|
||||
opusfile
|
||||
pkg-config
|
||||
sdl
|
||||
sdl2
|
||||
|
||||
- name: Install FluidSynth
|
||||
if: runner.os == 'Linux'
|
||||
working-directory: /tmp
|
||||
run: |
|
||||
wget -nv "https://github.com/FluidSynth/fluidsynth/archive/v$FSYNTH_VERSION.tar.gz" -O- | tar xz
|
||||
mkdir "fluidsynth-$FSYNTH_VERSION"/build
|
||||
cd "fluidsynth-$FSYNTH_VERSION"/build
|
||||
cmake \
|
||||
-DLIB_INSTALL_DIR=lib \
|
||||
..
|
||||
sudo cmake --build . --target install -v
|
||||
|
||||
- name: Install BASSMIDI
|
||||
working-directory: /tmp
|
||||
run: |
|
||||
wget -nv "http://uk.un4seen.com/files/bass$BASS_VERSION-${{ matrix.config.bass_os }}.zip"
|
||||
mkdir bass
|
||||
cd bass
|
||||
unzip "../bass$BASS_VERSION-${{ matrix.config.bass_os }}.zip"
|
||||
sudo cp bass.h /usr/local/include/
|
||||
if [[ ${{ runner.os }} == "Linux" ]]; then
|
||||
sudo cp x64/libbass.so /usr/local/lib/
|
||||
else
|
||||
sudo cp libbass.dylib /usr/local/lib/
|
||||
fi
|
||||
cd ..
|
||||
wget -nv "http://uk.un4seen.com/files/bassmidi$BASSMIDI_VERSION-${{ matrix.config.bass_os }}.zip"
|
||||
mkdir bassmidi
|
||||
cd bassmidi
|
||||
unzip "../bassmidi$BASSMIDI_VERSION-${{ matrix.config.bass_os }}.zip"
|
||||
sudo cp bassmidi.h /usr/local/include/
|
||||
if [[ ${{ runner.os }} == "Linux" ]]; then
|
||||
sudo cp x64/libbassmidi.so /usr/local/lib/
|
||||
else
|
||||
sudo cp libbassmidi.dylib /usr/local/lib/
|
||||
fi
|
||||
|
||||
- name: Install libADLMIDI
|
||||
working-directory: /tmp
|
||||
run: |
|
||||
wget -nv "https://github.com/Wohlstand/libADLMIDI/archive/v$ADLMIDI_VERSION.tar.gz" -O- | tar xz
|
||||
cd "libADLMIDI-$ADLMIDI_VERSION"
|
||||
mkdir build
|
||||
cd build
|
||||
cmake \
|
||||
-DlibADLMIDI_SHARED=on \
|
||||
-DlibADLMIDI_STATIC=off \
|
||||
-DEXAMPLE_SDL2_AUDIO=off \
|
||||
..
|
||||
sudo cmake --build . --target install -v
|
||||
|
||||
- name: Install WildMIDI
|
||||
if: runner.os == 'macOS'
|
||||
working-directory: /tmp
|
||||
run: |
|
||||
wget -nv "https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-$WILDMIDI_VERSION/wildmidi-$WILDMIDI_VERSION-macosx.tar.gz" -O- | tar xz
|
||||
cd "wildmidi-$WILDMIDI_VERSION-macosx"
|
||||
sudo cp -a *.dylib /usr/local/lib/
|
||||
sudo cp wildmidi_lib.h /usr/local/include/
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build (SDL 1)
|
||||
run: |
|
||||
mkdir build_sdl1
|
||||
cd build_sdl1
|
||||
if [[ ${{ runner.os }} == "Linux" ]]; then
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
|
||||
fi
|
||||
cmake \
|
||||
-DUSE_SDL1=ON \
|
||||
-DUSE_RESAMP_SRC=ON \
|
||||
-DUSE_RESAMP_SOXR=ON \
|
||||
-DUSE_DEC_OPENMPT=ON \
|
||||
-DUSE_DEC_XMP=ON \
|
||||
-DUSE_DEC_MODPLUG=ON \
|
||||
-DUSE_DEC_MPG123=ON \
|
||||
-DUSE_DEC_SNDFILE=ON \
|
||||
-DUSE_DEC_LIBVORBIS=ON \
|
||||
-DUSE_DEC_LIBOPUSFILE=ON \
|
||||
-DUSE_DEC_MUSEPACK=ON \
|
||||
-DUSE_DEC_FLUIDSYNTH=ON \
|
||||
-DUSE_DEC_BASSMIDI=ON \
|
||||
-DUSE_DEC_WILDMIDI=ON \
|
||||
-DUSE_DEC_ADLMIDI=ON \
|
||||
-DENABLE_SDLMIXER_EMU=OFF \
|
||||
-DBUILD_EXAMPLE=ON \
|
||||
..
|
||||
sudo cmake --build . --target install -v
|
||||
|
||||
- name: Build (SDL 2)
|
||||
run: |
|
||||
mkdir build_sdl2
|
||||
cd build_sdl2
|
||||
if [[ ${{ runner.os }} == "Linux" ]]; then
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
|
||||
fi
|
||||
cmake \
|
||||
-DUSE_SDL1=OFF \
|
||||
-DUSE_RESAMP_SRC=ON \
|
||||
-DUSE_RESAMP_SOXR=ON \
|
||||
-DUSE_DEC_OPENMPT=ON \
|
||||
-DUSE_DEC_XMP=ON \
|
||||
-DUSE_DEC_MODPLUG=ON \
|
||||
-DUSE_DEC_MPG123=ON \
|
||||
-DUSE_DEC_SNDFILE=ON \
|
||||
-DUSE_DEC_LIBVORBIS=ON \
|
||||
-DUSE_DEC_LIBOPUSFILE=ON \
|
||||
-DUSE_DEC_MUSEPACK=ON \
|
||||
-DUSE_DEC_FLUIDSYNTH=ON \
|
||||
-DUSE_DEC_BASSMIDI=ON \
|
||||
-DUSE_DEC_WILDMIDI=ON \
|
||||
-DUSE_DEC_ADLMIDI=ON \
|
||||
-DENABLE_SDLMIXER_EMU=OFF \
|
||||
-DBUILD_EXAMPLE=ON \
|
||||
..
|
||||
sudo cmake --build . --target install -v
|
||||
@@ -0,0 +1,12 @@
|
||||
*.[oa]
|
||||
*.so
|
||||
*.so.*
|
||||
/doc
|
||||
/gh-pages
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake_install.cmake
|
||||
SDL_audiolib.pc
|
||||
aulib_config.h
|
||||
aulib_export.h
|
||||
Makefile
|
||||
@@ -0,0 +1,12 @@
|
||||
; DO NOT EDIT (unless you know what you are doing)
|
||||
;
|
||||
; This subdirectory is a git "subrepo", and this file is maintained by the
|
||||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
|
||||
;
|
||||
[subrepo]
|
||||
remote = https://github.com/realnc/SDL_audiolib.git
|
||||
branch = 32d7821bbc84dd49014fddb447b0c1b67937e37b
|
||||
commit = 5a700ba556d3a5b5c531c2fa1f45fc0c3214a16b
|
||||
parent = 991ad55b5516c5ad68d76ab5b70f4e9c0d8ffd65
|
||||
method = merge
|
||||
cmdver = 0.4.3
|
||||
+12263
File diff suppressed because it is too large.
Load diff
+4750
File diff suppressed because it is too large.
Load diff
+6407
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,39 @@
|
||||
This directory contains the resampler code that comes with the opus-tools
|
||||
package from the Opus codec distribution:
|
||||
|
||||
http://www.opus-codec.org
|
||||
|
||||
Version of opus-tools: 0.2
|
||||
|
||||
The Opus resampler is a modified version of the resampler that comes with the
|
||||
Speex codec. Although you can substitute this resampler with the one from Speex,
|
||||
the results will be less than satisfactory, since the version provided by Opus
|
||||
contains bugfixes for audio quality problems in the original Speex code.
|
||||
Therefore, it is not recommended to "unbundle" the code provided here and link
|
||||
against the Speex resampler, as this will result in very audible distortion when
|
||||
resampling audio from/to specific sample rates (44.1kHz to 96kHz, for example.)
|
||||
|
||||
The resampler code is subject to the following license:
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER
|
||||
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.
|
||||
@@ -0,0 +1,216 @@
|
||||
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||
/**
|
||||
@file arch.h
|
||||
@brief Various architecture definitions Speex
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- 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.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation 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 COPYRIGHT HOLDERS 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 FOUNDATION 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.
|
||||
*/
|
||||
|
||||
#ifndef ARCH_H
|
||||
#define ARCH_H
|
||||
|
||||
/* A couple test to catch stupid option combinations */
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
#if defined(ARM4_ASM) + defined(ARM5E_ASM) + defined(BFIN_ASM) > 1
|
||||
#error Make up your mind. What CPU do you have?
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if defined(ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
|
||||
#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef OUTSIDE_SPEEX
|
||||
#include "speex/speexdsp_types.h"
|
||||
#endif
|
||||
|
||||
#define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */
|
||||
#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */
|
||||
#define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 16-bit value. */
|
||||
#define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */
|
||||
#define ABS32(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 32-bit value. */
|
||||
#define MIN32(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 32-bit value. */
|
||||
#define MAX32(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 32-bit value. */
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
typedef spx_int16_t spx_word16_t;
|
||||
typedef spx_int32_t spx_word32_t;
|
||||
typedef spx_word32_t spx_mem_t;
|
||||
typedef spx_word16_t spx_coef_t;
|
||||
typedef spx_word16_t spx_lsp_t;
|
||||
typedef spx_word32_t spx_sig_t;
|
||||
|
||||
#define Q15ONE 32767
|
||||
|
||||
#define LPC_SCALING 8192
|
||||
#define SIG_SCALING 16384
|
||||
#define LSP_SCALING 8192.
|
||||
#define GAMMA_SCALING 32768.
|
||||
#define GAIN_SCALING 64
|
||||
#define GAIN_SCALING_1 0.015625
|
||||
|
||||
#define LPC_SHIFT 13
|
||||
#define LSP_SHIFT 13
|
||||
#define SIG_SHIFT 14
|
||||
#define GAIN_SHIFT 6
|
||||
|
||||
#define WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x)))
|
||||
|
||||
#define VERY_SMALL 0
|
||||
#define VERY_LARGE32 ((spx_word32_t)2147483647)
|
||||
#define VERY_LARGE16 ((spx_word16_t)32767)
|
||||
#define Q15_ONE ((spx_word16_t)32767)
|
||||
|
||||
|
||||
#ifdef FIXED_DEBUG
|
||||
#include "fixed_debug.h"
|
||||
#else
|
||||
|
||||
#include "fixed_generic.h"
|
||||
|
||||
#ifdef ARM5E_ASM
|
||||
#include "fixed_arm5e.h"
|
||||
#elif defined(ARM4_ASM)
|
||||
#include "fixed_arm4.h"
|
||||
#elif defined(BFIN_ASM)
|
||||
#include "fixed_bfin.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
|
||||
typedef float spx_mem_t;
|
||||
typedef float spx_coef_t;
|
||||
typedef float spx_lsp_t;
|
||||
typedef float spx_sig_t;
|
||||
typedef float spx_word16_t;
|
||||
typedef float spx_word32_t;
|
||||
|
||||
#define Q15ONE 1.0f
|
||||
#define LPC_SCALING 1.f
|
||||
#define SIG_SCALING 1.f
|
||||
#define LSP_SCALING 1.f
|
||||
#define GAMMA_SCALING 1.f
|
||||
#define GAIN_SCALING 1.f
|
||||
#define GAIN_SCALING_1 1.f
|
||||
|
||||
|
||||
#define VERY_SMALL 1e-15f
|
||||
#define VERY_LARGE32 1e15f
|
||||
#define VERY_LARGE16 1e15f
|
||||
#define Q15_ONE ((spx_word16_t)1.f)
|
||||
|
||||
#define QCONST16(x,bits) (x)
|
||||
#define QCONST32(x,bits) (x)
|
||||
|
||||
#define NEG16(x) (-(x))
|
||||
#define NEG32(x) (-(x))
|
||||
#define EXTRACT16(x) (x)
|
||||
#define EXTEND32(x) (x)
|
||||
#define SHR16(a,shift) (a)
|
||||
#define SHL16(a,shift) (a)
|
||||
#define SHR32(a,shift) (a)
|
||||
#define SHL32(a,shift) (a)
|
||||
#define PSHR16(a,shift) (a)
|
||||
#define PSHR32(a,shift) (a)
|
||||
#define VSHR32(a,shift) (a)
|
||||
#define SATURATE16(x,a) (x)
|
||||
#define SATURATE32(x,a) (x)
|
||||
#define SATURATE32PSHR(x,shift,a) (x)
|
||||
|
||||
#define PSHR(a,shift) (a)
|
||||
#define SHR(a,shift) (a)
|
||||
#define SHL(a,shift) (a)
|
||||
#define SATURATE(x,a) (x)
|
||||
|
||||
#define ADD16(a,b) ((a)+(b))
|
||||
#define SUB16(a,b) ((a)-(b))
|
||||
#define ADD32(a,b) ((a)+(b))
|
||||
#define SUB32(a,b) ((a)-(b))
|
||||
#define MULT16_16_16(a,b) ((a)*(b))
|
||||
#define MULT16_32_32(a,b) ((a)*(b))
|
||||
#define MULT16_16(a,b) ((spx_word32_t)(a)*(spx_word32_t)(b))
|
||||
#define MAC16_16(c,a,b) ((c)+(spx_word32_t)(a)*(spx_word32_t)(b))
|
||||
|
||||
#define MULT16_32_Q15(a,b) ((a)*(b))
|
||||
#define MULT16_32_P15(a,b) ((a)*(b))
|
||||
|
||||
#define MAC16_32_Q15(c,a,b) ((c)+(a)*(b))
|
||||
|
||||
#define MAC16_16_Q11(c,a,b) ((c)+(a)*(b))
|
||||
#define MAC16_16_Q13(c,a,b) ((c)+(a)*(b))
|
||||
#define MAC16_16_P13(c,a,b) ((c)+(a)*(b))
|
||||
#define MULT16_16_Q11_32(a,b) ((a)*(b))
|
||||
#define MULT16_16_Q13(a,b) ((a)*(b))
|
||||
#define MULT16_16_Q14(a,b) ((a)*(b))
|
||||
#define MULT16_16_Q15(a,b) ((a)*(b))
|
||||
#define MULT16_16_P15(a,b) ((a)*(b))
|
||||
#define MULT16_16_P13(a,b) ((a)*(b))
|
||||
#define MULT16_16_P14(a,b) ((a)*(b))
|
||||
|
||||
#define DIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
|
||||
#define PDIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
|
||||
#define DIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
|
||||
#define PDIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
|
||||
|
||||
#define WORD2INT(x) ((x) < -32767.5f ? -32768 : \
|
||||
((x) > 32766.5f ? 32767 : (spx_int16_t)floor(.5 + (x))))
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_TI_C54X) || defined(CONFIG_TI_C55X)
|
||||
|
||||
/* 2 on TI C5x DSP */
|
||||
#define BYTES_PER_CHAR 2
|
||||
#define BITS_PER_CHAR 16
|
||||
#define LOG2_BITS_PER_CHAR 4
|
||||
|
||||
#else
|
||||
|
||||
#define BYTES_PER_CHAR 1
|
||||
#define BITS_PER_CHAR 8
|
||||
#define LOG2_BITS_PER_CHAR 3
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef FIXED_DEBUG
|
||||
extern long long spx_mips;
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
Loaded 100 of 6438 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user