mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 08:10:30 -10:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fca7bc52ed | ||
|
|
159190cc14 | ||
|
|
984c3a22a3 | ||
|
|
1e11cbf6b4 | ||
|
|
ecebcf8215 | ||
|
|
8f7646ded8 | ||
|
|
b96fd5933c | ||
|
|
03676061b4 | ||
|
|
777ba7c5c3 | ||
|
|
bfb5f58b90 |
No files matched your search
+1
-6
@@ -1,4 +1,4 @@
|
||||
# EditorConfig: https://EditorConfig.org
|
||||
# EditorConfig: http://EditorConfig.org
|
||||
|
||||
# Top-most EditorConfig file
|
||||
root = true
|
||||
@@ -15,11 +15,6 @@ charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
|
||||
# 2 space indentation
|
||||
[*.{json,xml,yaml,yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Tab indentation
|
||||
[Makefile*]
|
||||
indent_style = tab
|
||||
@@ -1,38 +0,0 @@
|
||||
name: CI PS2
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-ps2:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.ps2.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ps2.salamander -j$(getconf _NPROCESSORS_ONLN) release
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.ps2 -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ps2 -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 release
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: RA-PS2-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
raboot.elf
|
||||
retroarchps2.elf
|
||||
@@ -1,44 +0,0 @@
|
||||
name: CI PSP
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-psp:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Compile bootstrap
|
||||
run: |
|
||||
cd bootstrap/psp1/kernel_functions_prx
|
||||
make -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.psp1.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psp1.salamander -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.psp1 -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psp1 -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: RA-PSP-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
kernel_functions.prx
|
||||
EBOOT.PBP
|
||||
@@ -1,33 +0,0 @@
|
||||
# Download translations from Crowdin and push to GitHub
|
||||
|
||||
name: Crowdin Daily Workflow
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # every day at midnight
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Crowdin Sync
|
||||
shell: bash
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: |
|
||||
cd intl
|
||||
python3 -m pip install requests PyYAML
|
||||
python3 crowdin_sync.py "$CROWDIN_API_KEY"
|
||||
git config user.name github-actions
|
||||
git config user.email [email protected]
|
||||
git add .
|
||||
git commit -m "Fetch translations from Crowdin"
|
||||
git push
|
||||
@@ -1,31 +0,0 @@
|
||||
# Upload sources to Crowdin for translation
|
||||
|
||||
name: Crowdin Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'intl/*_us.h'
|
||||
- 'intl/*_us.json'
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Crowdin Sync
|
||||
shell: bash
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: |
|
||||
cd intl
|
||||
python3 crowdin_sync.py "$CROWDIN_API_KEY"
|
||||
@@ -1,26 +0,0 @@
|
||||
# Validates compilation of RetroArch binary
|
||||
|
||||
name: RetroArch CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
linux-c89: # Smoketest build using most restrictive compiler and default options
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install build-essential libxkbcommon-dev libx11-xcb-dev zlib1g-dev libfreetype6-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev nvidia-cg-toolkit nvidia-cg-dev libavcodec-dev libsdl2-dev libsdl-image1.2-dev libxml2-dev yasm
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Configure
|
||||
run: ./configure
|
||||
- name: Build
|
||||
run: make C89_BUILD=1
|
||||
+2
-44
@@ -8,9 +8,6 @@
|
||||
*.dol
|
||||
*.map
|
||||
*.swp
|
||||
*.cache
|
||||
*.gcda
|
||||
*.gcno
|
||||
.tmp
|
||||
.tmp.c
|
||||
.tmp.cxx
|
||||
@@ -36,7 +33,6 @@ Release
|
||||
ipch
|
||||
*.user
|
||||
/bootstrap/gx/wii/app_booter/app_booter.bin
|
||||
/wii/app_booter/app_booter.bin
|
||||
*.zip
|
||||
RetroArch-w32/
|
||||
RetroArch-w64/
|
||||
@@ -71,7 +67,6 @@ apple/RetroArch_iOS.xcodeproj/project.xcworkspace/*
|
||||
/rsound.h
|
||||
.pc
|
||||
/media/shaders_glsl/
|
||||
/media/shaders_slang/
|
||||
/obj-w32/
|
||||
.cproject
|
||||
.settings
|
||||
@@ -81,30 +76,10 @@ convert_rumble.awk
|
||||
*~
|
||||
assets
|
||||
info
|
||||
content_favorites.lpl
|
||||
content_history.lpl
|
||||
content_image_history.lpl
|
||||
content_music_history.lpl
|
||||
content_video_history.lpl
|
||||
saves
|
||||
screenshots
|
||||
autoconfig
|
||||
config
|
||||
database
|
||||
overlays
|
||||
playlists
|
||||
states
|
||||
shaders/shaders_cg
|
||||
shaders/shaders_glsl
|
||||
shaders/shaders_slang
|
||||
|
||||
# Qt Creator
|
||||
*.cflags
|
||||
*.cxxflags
|
||||
*.creator*
|
||||
*.config
|
||||
*.files
|
||||
*.includes
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
@@ -198,7 +173,8 @@ retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
|
||||
# PS2
|
||||
*_irx.c
|
||||
ps2/irx/*.c
|
||||
ps2/libcdvd/lib/
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
@@ -209,21 +185,3 @@ gfx/common/wayland/xdg-decoration-unstable-v1.h
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.c
|
||||
gfx/common/wayland/xdg-shell.c
|
||||
gfx/common/wayland/xdg-shell.h
|
||||
|
||||
# libretro-common samples
|
||||
libretro-common/samples/streams/rzip/rzip
|
||||
|
||||
# DINGUX
|
||||
*.opk
|
||||
|
||||
#VITA
|
||||
param.sfo
|
||||
*.wo
|
||||
*.elf
|
||||
*.self
|
||||
*.vpk
|
||||
/.vs
|
||||
/deps/SPIRV-Cross/out/build/x64-Debug
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
+6
-1074
File diff suppressed because it is too large.
Load diff
+25
-14
@@ -40,16 +40,12 @@ matrix:
|
||||
env: CXX_BUILD=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_MENU=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_NETWORKING=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_OVERLAY=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_CDROM=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_VIDEO_LAYOUT=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_THREADS=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_AUDIOMIXER=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
@@ -70,14 +66,37 @@ matrix:
|
||||
script:
|
||||
- ./configure --enable-opengl --disable-metal
|
||||
- make
|
||||
- os: osx
|
||||
osx_image: xcode8
|
||||
script:
|
||||
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
|
||||
- os: osx
|
||||
osx_image: xcode11.2
|
||||
script:
|
||||
- brew update-reset
|
||||
- brew install --force-bottle qt5
|
||||
- security create-keychain -p travis build.keychain
|
||||
- security default-keychain -s build.keychain
|
||||
- security unlock-keychain -p travis build.keychain
|
||||
- echo $OSX_CERT | base64 --decode > dev.p12
|
||||
- security import dev.p12 -k build.keychain -P $OSX_CERT_PASS -T /usr/bin/codesign
|
||||
- rm dev.p12
|
||||
- security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k travis build.keychain
|
||||
- xcodebuild -target RetroArchQt -configuration Release -project pkg/apple/RetroArch_Metal.xcodeproj
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
provider: script
|
||||
script: bash travis_metal_deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
- language: android
|
||||
# Android builds are only supported on Trusty
|
||||
dist: trusty
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- build-tools-29.0.3
|
||||
- android-29
|
||||
- build-tools-28.0.3
|
||||
- android-28
|
||||
install:
|
||||
- echo y | sdkmanager "ndk-bundle"
|
||||
before_script:
|
||||
@@ -117,10 +136,6 @@ before_script:
|
||||
if [ -n "$DISABLE_OVERLAY" ]; then
|
||||
ARGS="$ARGS --disable-overlay"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_NETWORKING" ]; then
|
||||
ARGS="$ARGS --disable-networking"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_CDROM" ]; then
|
||||
ARGS="$ARGS --disable-cdrom"
|
||||
@@ -129,10 +144,6 @@ before_script:
|
||||
if [ -n "$DISABLE_VIDEO_LAYOUT" ]; then
|
||||
ARGS="$ARGS --disable-video_layout"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_THREADS" ]; then
|
||||
ARGS="$ARGS --disable-threads --disable-glslang"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_AUDIOMIXER" ]; then
|
||||
ARGS="$ARGS --disable-audiomixer"
|
||||
|
||||
Vendored
+148
-184
@@ -1,191 +1,155 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Switch",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
|
||||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
|
||||
"/opt/devkitpro/libnx/include",
|
||||
"/opt/devkitpro/portlibs/switch/include",
|
||||
"/opt/devkitpro/portlibs/switch/include/freetype2",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"__aarch64__",
|
||||
"__SWITCH__",
|
||||
"HAVE_LIBNX"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
},
|
||||
{
|
||||
"name": "WiiU",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitPPC/powerpc-eabi/include",
|
||||
"/opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/include",
|
||||
"/opt/devkitpro/portlibs/ppc/include",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"WIIU",
|
||||
"WIIU_HID"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
},
|
||||
{
|
||||
"name": "ps2sdk-ee",
|
||||
"includePath": [
|
||||
"${env:PS2DEV}/ps2sdk/common/include",
|
||||
"${env:PS2DEV}/ps2sdk/ee/include",
|
||||
"${env:PS2DEV}/gsKit/include",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"PS2",
|
||||
"_EE"
|
||||
],
|
||||
"compilerPath": "${env:PS2DEV}/ee/bin/mips64r5900el-ps2-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Switch",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
|
||||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
|
||||
"/opt/devkitpro/libnx/include",
|
||||
"/opt/devkitpro/portlibs/switch/include",
|
||||
"/opt/devkitpro/portlibs/switch/include/freetype2",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"__aarch64__",
|
||||
"__SWITCH__",
|
||||
"HAVE_LIBNX"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+35
-6
@@ -1,26 +1,30 @@
|
||||
{
|
||||
/*"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"terminal.integrated.env.windows": {
|
||||
"PATH": "/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:$PATH",
|
||||
"MSYSTEM": "MINGW64",
|
||||
},*/
|
||||
},
|
||||
"terminal.integrated.cursorBlinking": true,
|
||||
|
||||
"editor.tabSize": 3,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": true,
|
||||
"editor.formatOnSave": false,
|
||||
"editor.ruler": [80],
|
||||
"files.associations": {
|
||||
"*.h": "c",
|
||||
"frontend_driver.h": "c",
|
||||
"*.in": "c",
|
||||
"*.rh": "c",
|
||||
"array": "c",
|
||||
"file_stream.h": "c",
|
||||
"driver.h": "c",
|
||||
"iosfwd": "c",
|
||||
"xlocbuf": "c",
|
||||
"xmemory0": "c",
|
||||
"ios": "c",
|
||||
"list": "c",
|
||||
"input_driver.h": "c",
|
||||
"menu_driver.h": "c",
|
||||
"file_path.h": "c",
|
||||
"unordered_map": "c",
|
||||
"unordered_set": "c",
|
||||
"sstream": "cpp",
|
||||
@@ -29,15 +33,40 @@
|
||||
"initializer_list": "c",
|
||||
"string_view": "c",
|
||||
"utility": "c",
|
||||
"menu_input.h": "c",
|
||||
"tasks_internal.h": "c",
|
||||
"ozone.h": "c",
|
||||
"ozone_theme.h": "c",
|
||||
"ozone_texture.h": "c",
|
||||
"string_list.h": "c",
|
||||
"core_info.h": "c",
|
||||
"thread": "c",
|
||||
"xlocale": "c",
|
||||
"gfx_widgets.h": "c",
|
||||
"message_queue.h": "c",
|
||||
"task_queue.h": "c",
|
||||
"fifo_queue.h": "c",
|
||||
"file_list.h": "c",
|
||||
"strl.h": "c",
|
||||
"configuration.h": "c",
|
||||
"ozone_display.h": "c",
|
||||
"verbosity.h": "c",
|
||||
"retroarch.h": "c",
|
||||
"gfx_animation.h": "c",
|
||||
"netplay.h": "c",
|
||||
"scaler.h": "c",
|
||||
"deque": "c",
|
||||
"vector": "c",
|
||||
"xhash": "c",
|
||||
"xiosbase": "c",
|
||||
"xstring": "c",
|
||||
"xtree": "c",
|
||||
"xutility": "c"
|
||||
"xutility": "c",
|
||||
"menu_input_dialog.h": "c",
|
||||
"menu_filebrowser.h": "c",
|
||||
"ozone_sidebar.h": "c",
|
||||
"menu_thumbnail_path.h": "c",
|
||||
"badges.h": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
@@ -3,26 +3,18 @@ RetroArch and the libretro team would like to
|
||||
acknowledge the following contributors:
|
||||
|
||||
1ch (L0sted)
|
||||
51eating (dnjstlr555)
|
||||
6lackmag3
|
||||
A Schain (aschain)
|
||||
Aaahh Ahh (Aaahh)
|
||||
Aaron Oneal (aarononeal)
|
||||
Adam Londero (alondero)
|
||||
Adam Mechtley (amechtley)
|
||||
AdrianoML
|
||||
Adrien Moulin (elyosh)
|
||||
Aethyrion
|
||||
ajefr
|
||||
AKuHAK
|
||||
Alberto Alonso Ruibal (albertoruibal)
|
||||
Alberto Simon (asimonf)
|
||||
Alcaro
|
||||
Aleksey Samoilov (Sunderland93)
|
||||
Alessandro Mangone (Vektor) (zevektor)
|
||||
Alessio Tosto (Rinnegatamante)
|
||||
Alex Eckhart (alex34567)
|
||||
Alex Folland (AlexFolland)
|
||||
Alex Kornitzer (alexkornitzer)
|
||||
Alexander Spady (alkaseltzerspadt)
|
||||
Alexandre Garcia (Alexandre-Garcia)
|
||||
Alfredo Monclus (alfrix)
|
||||
@@ -31,151 +23,99 @@ alphanu1
|
||||
altiereslima
|
||||
Alwin Garside (Yogarine)
|
||||
Amiga1200Gamer (amigagamer)
|
||||
amtz
|
||||
Andre Leiradella (leiradel)
|
||||
Andrés (fr500)
|
||||
Andy Nguyen (TheOfficialFloW)
|
||||
Anthony J. Bentley (bentley)
|
||||
Antonio Jose Ramos Marquez (psxdev)
|
||||
AridRayne
|
||||
ArnaudFaucher
|
||||
arstn
|
||||
Arto Vainiolehto (arakerlu)
|
||||
asavah
|
||||
Ash (QuarkTheAwesome)
|
||||
Ashura (CoalaJoe)
|
||||
Autechre (twinaphex)
|
||||
Autechre64
|
||||
Avton1
|
||||
ayssia
|
||||
barbudreadmon
|
||||
Barry Rowe (BarryJRowe)
|
||||
Bartłomiej Burdukiewicz (dev-0x7C6)
|
||||
bearoso
|
||||
benklop
|
||||
benutzer193
|
||||
Bernhard Schelling (schellingb)
|
||||
blackgur
|
||||
bmaupin
|
||||
Bobby Smith (bslenul)
|
||||
Boris Timofeev (btimofeev)
|
||||
Brad (SpiralBrad)
|
||||
Braden Farmer (farmerbb)
|
||||
Brandon Johnson (BinaryFissionGames)
|
||||
Breno Dantas Mendonça (brenodantas10)
|
||||
Brian Hoem (ZornTaov)
|
||||
bparker06
|
||||
Brandon Johnson (Denu8thell)
|
||||
Brian Koropoff (bkoropoff)
|
||||
Brian S. Stephan (bsstephan)
|
||||
BringerethOfLight
|
||||
Brunnis
|
||||
bsmith (DogParty)
|
||||
bubuleur
|
||||
bulzipke
|
||||
C.W. Betts (MaddTheSane)
|
||||
Casey Borders (CaseyB)
|
||||
CatGreen90
|
||||
ceb33
|
||||
celerizer
|
||||
Charlène (julianaito)
|
||||
CheezeCake
|
||||
Chris Merrett (chrisfu)
|
||||
Christian Murphy (grimpunch)
|
||||
christianhaitian
|
||||
Christoffer Tibell (Brottweiler)
|
||||
chu (9chu)
|
||||
Chuck Smith (chucksmith)
|
||||
CidVonHighwind
|
||||
clienthax
|
||||
cold-brewed
|
||||
CompCom
|
||||
ComradeEcho
|
||||
confusedguy9
|
||||
Conn O'Griofa (psyke83)
|
||||
Connor McLaughlin (stenzek)
|
||||
Conrad Kreyling (konistehrad)
|
||||
CozmoP
|
||||
Cpasjuste
|
||||
cpsw
|
||||
Cray Elliott (MP2E)
|
||||
Crestwave
|
||||
CrewMdk
|
||||
Cristi Mitrana (cmitu)
|
||||
Cristian Sandu (crazyquark)
|
||||
crystalct
|
||||
CTCaer
|
||||
ctult
|
||||
cucholix
|
||||
cudencuden
|
||||
Cyan (44100hertz)
|
||||
Daehan Kim (iAmGhost)
|
||||
cxd4
|
||||
dalter
|
||||
Dan Weiss (Dwedit)
|
||||
danieljg
|
||||
Daniil Zhilin (LaserMoai)
|
||||
dankcushions
|
||||
Darren Thompson (DiscoStarslayer)
|
||||
Dave (freakdave)
|
||||
Dave Leaver (danzel)
|
||||
David CARLIER (devnexen)
|
||||
David Demelier (markand)
|
||||
David Erickson (daviderickson)
|
||||
David G. F. (davidgfnet)
|
||||
David Lawson (dmrlawson)
|
||||
David Shah (daveshah1)
|
||||
David Walters (hiddenasbestos)
|
||||
DEX357
|
||||
diablodiab
|
||||
dibas
|
||||
Diego A. (SuperrSonic)
|
||||
Diego Viola (diegoviola)
|
||||
digitalisland-nino
|
||||
Diogo Barros (BlueKore)
|
||||
Dmitry Sergeenkov (DuMOHsmol)
|
||||
DogParty
|
||||
dor3k
|
||||
Doug Christman (dobyrch)
|
||||
driver1998
|
||||
Dudu Akiva (duduke)
|
||||
duganchen
|
||||
dukemiller
|
||||
duskgao
|
||||
Dylan Scott (dyscott)
|
||||
eadmaster
|
||||
Eduard Strehlau (Herdinger)
|
||||
ekipan
|
||||
Elvira Khabirova (parport0)
|
||||
embercold
|
||||
Emmanuel Martin (daliaetnano)
|
||||
endrift
|
||||
erbridge
|
||||
esoptron
|
||||
Ethan Lee (flibitijibibo)
|
||||
extrowerk
|
||||
Exvat
|
||||
Ezio-PS
|
||||
F (erbridge)
|
||||
Fabio (Oibaf66)
|
||||
Fabio Ritrovato (Sephiroth87)
|
||||
Fayne Aldan (FayneAldan)
|
||||
fff (felinben)
|
||||
FIX94
|
||||
Flame Sage (chris062689)
|
||||
flyinghead
|
||||
FmT0
|
||||
francescotintori
|
||||
Francisco Javier Trujillo Mata (fjtrujy)
|
||||
Francisco José García García (frangarcj)
|
||||
FreeShippingParty
|
||||
fuzzydunlops732 (JKoppel93)
|
||||
Gabriel (Ghabry)
|
||||
GameDragon2k
|
||||
Garrett Brown (garbear)
|
||||
gatecat (daveshah1)
|
||||
GavinDarkglider
|
||||
gblues
|
||||
Geoffrey Plitt (GeoffreyPlitt)
|
||||
Glenn Hevey (hevey)
|
||||
Googer
|
||||
gordon-fish
|
||||
gouchi
|
||||
grant2258
|
||||
Gregor Richards (GregorR)
|
||||
Grzegorz Raciborski (graciborski)
|
||||
Gui Andrade (archshift)
|
||||
Guillaume Thiolliere (thiolliere)
|
||||
Guo Yunhe (guoyunhe)
|
||||
Gustavo Maciel Dias Vieira (gmdvieira)
|
||||
gvbr
|
||||
H. İbrahim Güngör (igungor)
|
||||
@@ -183,61 +123,44 @@ hadess
|
||||
Hans-Kristian Arntzen (Themaister)
|
||||
Henri Gomez (hgomez)
|
||||
Henri Gomez (hgomez-sonarsource)
|
||||
Henry Castro (hcvcastro)
|
||||
Higor E. (heuripedes)
|
||||
Higor Eurípedes (heuripedes)
|
||||
Hisman Yosika (dnjstlr555)
|
||||
hizzlekizzle
|
||||
Hugo B. (hug0b)
|
||||
Hugo Hromic (hhromic)
|
||||
hunterk
|
||||
hyarsan
|
||||
Hyllian
|
||||
HyperspaceMadness
|
||||
i30817
|
||||
im4potato
|
||||
ImJezze
|
||||
iAmGhost
|
||||
Jack (jakcron)
|
||||
Jacob (cubtekki)
|
||||
Jacob Patterson (jacobpa)
|
||||
jacobsson (Roet-Ivar)
|
||||
Jake Stine (jstine35)
|
||||
James Le Cuirot (chewi)
|
||||
James Sexton (Bezier89)
|
||||
Jamiras
|
||||
Jan Holthuis (Holzhaus)
|
||||
Jason Tomsic (plaidman)
|
||||
Javier Martinez Canillas (martinezjavier)
|
||||
Jay McCarthy (jeapostrophe)
|
||||
jdgleaver
|
||||
Jean-André Santoni (kivutar)
|
||||
Jean-Paul Mari (djipi)
|
||||
Jean-Sébastien Guay (Skylark13)
|
||||
Jeff (jeffbdavenport)
|
||||
Jeff Sousa (LordeIlluminati)
|
||||
jess (winneon)
|
||||
Joan Coll Cerdán (johanbcn)
|
||||
Job Adrian Salinas Gonzalez (efylan)
|
||||
Joe Osborn (JoeOsborn)
|
||||
Jesse Bryan (winneon)
|
||||
Joel (joel16)
|
||||
Joerg Sonnenberger (jsonn)
|
||||
Johannes Schickel (lordhoto)
|
||||
John Parton (john-parton)
|
||||
John Regan (jprjr)
|
||||
Jon Maddox (maddox)
|
||||
Jonathan (JonnyMe)
|
||||
Jonathan Relf (jonathanrelf)
|
||||
Joohan Lee (losernator)
|
||||
Jools Wills (joolswills)
|
||||
Jose Lage Miguez (Joselagem)
|
||||
Joseph Carter (iKarith)
|
||||
Joseph Conan Montgomery (Grotke)
|
||||
jsd1982 (JamesDunne)
|
||||
Josh Palmer (ShiftyAxel)
|
||||
JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
JustMeDaFaq
|
||||
Karl Forshaw (karlforshaw)
|
||||
Keith Bowes (keithbowes)
|
||||
Ken Rossato (rossato)
|
||||
Kopert
|
||||
krzys_h (krzys-h)
|
||||
kurumushi
|
||||
kwyxz
|
||||
@@ -245,12 +168,10 @@ l3iggs
|
||||
lambolighting
|
||||
lasers
|
||||
Lawrence Kesteloot (lkesteloot)
|
||||
LazyBumHorse
|
||||
LazyFunker
|
||||
Lennard Kittner (Lennard599)
|
||||
lifajucejo
|
||||
liffy (lifning)
|
||||
Lionel Flandrin (simias)
|
||||
littleguy77
|
||||
liushuyu
|
||||
Logan (loganmc10)
|
||||
lordashram
|
||||
Lothar Serra Mari (lotharsm)
|
||||
@@ -258,63 +179,50 @@ Lubosz Sarnecki (lubosz)
|
||||
lucianposton
|
||||
lxerandrew
|
||||
m4xw
|
||||
mahoneyt944
|
||||
Mahyar Koshkouei (deltabeard)
|
||||
Mai M. (lioncash)
|
||||
maksun
|
||||
Manuel Alfayate Corchete (vanfanel)
|
||||
Marcelo Munhoz Pélos (mpelos)
|
||||
Marcus Crisostomo (mcrisostomo)
|
||||
markwkidd
|
||||
Maschell
|
||||
Mats (m4tsa)
|
||||
Mat M. (lioncash)
|
||||
Mats A. (Datamats)
|
||||
Matt Sephton (gingerbeardman)
|
||||
Matthew Bauer (matthewbauer)
|
||||
Matthew Wang (asakous)
|
||||
Max K. (langerhans)
|
||||
Maxime Gauduin (alucryd)
|
||||
mcrisostomo
|
||||
meancoot
|
||||
meepingsnesroms
|
||||
meleu
|
||||
Merry Mello (merryMellody)
|
||||
micechal
|
||||
Michael Burgardt (DisasterMo)
|
||||
Michael K. (kuxii2016)
|
||||
Michael Lelli (ToadKing)
|
||||
Michał Durak (micechal)
|
||||
mickski56
|
||||
Mico Chopitea (micochops)
|
||||
miguelpinheiro
|
||||
Mike Swanson (chungy)
|
||||
mikeOSX
|
||||
minucce
|
||||
miqlas (extrowerk)
|
||||
misson20000
|
||||
Monroe88
|
||||
Morgane (Niouby)
|
||||
mprobinson
|
||||
MrHuu
|
||||
MrJs (mrjschulte)
|
||||
mudlord
|
||||
Muhamed Hobi (mmhobi7)
|
||||
muzuiget
|
||||
Nargash
|
||||
mwtremblay
|
||||
myfreeweb
|
||||
Nathan S. (natinusala)
|
||||
NathanStrong-Tripwire
|
||||
nattycleopatra
|
||||
nayslayer
|
||||
negativeExponent
|
||||
Neil Barkhina (nbarkhina)
|
||||
Nephilim (Nephil1m)
|
||||
netux79
|
||||
nfnty
|
||||
nia (alarixnia)
|
||||
nia (ensra)
|
||||
Nicolas Adenis-Lamarre (nadenislamarre)
|
||||
Nicolas Guillaumin (nguillaumin)
|
||||
Nicolas Roehm (NicolasRoehm)
|
||||
Nikita Vakhrushev (XF10C)
|
||||
Nicolas Lopez Fernandez (pyroesp)
|
||||
Nikita Vakhrushev (SwooodGa)
|
||||
Nikola Kocić (nikola-kocic)
|
||||
Nikos Chantziaras (realnc)
|
||||
Nils Hasenbanck (hasenbanck)
|
||||
njordan64
|
||||
Niouby
|
||||
nosh01
|
||||
not6 (r-type)
|
||||
notaz
|
||||
@@ -323,78 +231,51 @@ nurupo
|
||||
Oggom
|
||||
Oleg Shevchenko (olsh)
|
||||
opendata26
|
||||
Ophidon
|
||||
orbea
|
||||
Oschowa
|
||||
OsirizX
|
||||
OV2
|
||||
Palmic (mpalomas)
|
||||
pamapa
|
||||
Paolo Bonzini (bonzini)
|
||||
Paul McCarty (notabeatle)
|
||||
pcjco
|
||||
Pedro Ferraz (ferrazpedro)
|
||||
Pedro Ribeiro (pedrib)
|
||||
pinumbernumber
|
||||
pjft
|
||||
pponso1
|
||||
pyroesp
|
||||
R-YaTian
|
||||
Ramiro Morales (ramiro)
|
||||
Raphaël Zumer (rzumer)
|
||||
Reid Kleckner (rnk)
|
||||
repojohnray
|
||||
retro-wertz
|
||||
retrotails
|
||||
revvv
|
||||
reztek
|
||||
Richard Howell (rmaz)
|
||||
rlnilsen
|
||||
Rob Loach (RobLoach)
|
||||
Roberto V. Rampim (Cthulhu)
|
||||
Robin de Rooij (rrooij)
|
||||
Romain Gay (vikbez)
|
||||
Romain Graillot (notnotme)
|
||||
Romain TISSERAND (rtissera)
|
||||
Roman Fomin (rfomin)
|
||||
Roman Kalashnikov (lunixoid)
|
||||
Royerson
|
||||
rrooij
|
||||
rsn8887
|
||||
Ryan C. Gordon (icculus)
|
||||
Ryunam
|
||||
rz5
|
||||
Saggi Mizrahi (ficoos)
|
||||
SAKUJ0
|
||||
Sam Lantinga (slouken)
|
||||
Sam Pagenkopf (44100hertz)
|
||||
Sam Stenvall (Jalle19)
|
||||
Samuel P. (p-sam)
|
||||
Sanaki
|
||||
Scheiker
|
||||
Sebastien Ronsse (sronsse)
|
||||
SecularSteve
|
||||
Sefa Eyeoglu (Scrumplex)
|
||||
Sergei Nikitin (Kert)
|
||||
Sergi Granell (xerpi)
|
||||
Sergio Padrino (sergiou87)
|
||||
sergio-br2 (sergiobenrocha2)
|
||||
Seth Kingsley (sethk)
|
||||
Shadow (ShadowOne333)
|
||||
Shane Mouton (ismouton)
|
||||
shantigilbert
|
||||
Shfty
|
||||
Shizeeg Unadequatov (shizeeg)
|
||||
SimpleTease
|
||||
SindenLightgun
|
||||
Sirrempat
|
||||
slotek
|
||||
Soar Qin (soarqin)
|
||||
sparklewind
|
||||
spec-chum
|
||||
Stefan (gizmo98)
|
||||
stefan-gr
|
||||
stellarporter
|
||||
Stephanie Gawroriski (XerTheSquirrel)
|
||||
Stevoisiak
|
||||
stoofin
|
||||
Steven M. Vascellaro (stevoisiak)
|
||||
Stuart Carnie (stuartcarnie)
|
||||
Sunguk Lee (d3m3vilurr)
|
||||
Supernature2k
|
||||
@@ -402,56 +283,39 @@ Sven (RetroSven)
|
||||
Swingflip
|
||||
Swizzy
|
||||
Sylvain Colinet (Skarsnik)
|
||||
Szunti
|
||||
Tadek Kijkowski (monkeyman79)
|
||||
Tatsuya79
|
||||
Terry Lewis (terry-au)
|
||||
thedax
|
||||
theheroGAC
|
||||
TheMrIron2
|
||||
ThePhxRises
|
||||
TheOfficialFloW
|
||||
thiolliere
|
||||
Thomas Lorblanchès (Zlika)
|
||||
Tim Van den Langenbergh (tmtvl)
|
||||
Tobias Gruetzmacher (TobiX)
|
||||
Tobias Jakobi (tobiasjakobi)
|
||||
Todd Laney (ToddLa)
|
||||
Tomáš Kelemen (ToKe79)
|
||||
Tony (sonninnos)
|
||||
Tor Arne Vestbø (torarnv)
|
||||
Torsten Paul (t-paul)
|
||||
toshixm
|
||||
TotalCaesar659
|
||||
TroggleMonkey
|
||||
tunip3
|
||||
Tyler Loch (TylerLoch)
|
||||
unrelentingtech
|
||||
Twinaphex
|
||||
URBANsUNITED
|
||||
Valerio Proietti (kamicane)
|
||||
vgmoose
|
||||
Vicki Pfau (endrift)
|
||||
Vicky C Lau (vickychenglau)
|
||||
vin (suseme)
|
||||
Vladimir Panteleev (CyberShadow)
|
||||
Vladimir Serbinenko (phcoder)
|
||||
Víctor "IlDucci" (IlDucci)
|
||||
waitingmoon
|
||||
Wang Vincent (susemm)
|
||||
webgeek1234
|
||||
Weedy Weed Smoker (WeedyWeedSmoker)
|
||||
WerWolv
|
||||
whorsemaster
|
||||
Wiimpathy
|
||||
Wiktor Strzębała (wiktorek140)
|
||||
Woohyun Shin (sinusinu)
|
||||
xenomorph-us
|
||||
xhp-creations
|
||||
Yari (hyarsan)
|
||||
yesfish (huwpascoe)
|
||||
Yongwoon Cho (ssangkong)
|
||||
yoshisuga
|
||||
Zer0xFF
|
||||
zeromus
|
||||
zlice
|
||||
Érico Nogueira Rolim (ericonr)
|
||||
Zoran Vuckovic (casdevel)
|
||||
Ömercan Kömür (fpscan)
|
||||
シーはディー四を取る (cxd4)
|
||||
)";
|
||||
+1
-952
@@ -1,969 +1,18 @@
|
||||
# Future
|
||||
|
||||
# 1.10.1
|
||||
|
||||
|
||||
# 1.10.0
|
||||
- 3DS: Add Jaxe, A5200 and WASM4 cores
|
||||
- 3DS: Fix rotation
|
||||
- ARCHIVE: Allow loading files from archive subdirectory
|
||||
- AUDIO: Remove frame limit from audio batch callback. Before, if a core used the audio batch callback, there would be a hidden cap of 1024 on the number of audio frames that could be sent. If a core exceeded this value, any excess samples were silently discarded. While this is sufficient for 'normal' samplerates/framerates, it means that e.g. a core using the batch callback to send 44100 Hz audio at 30 fps with would have entirely broken sound. This has been fixed by removing the audio batch frame limit.
|
||||
- AUDIO/RESAMPLER/NEON: Implement sinc kaiser NEON function
|
||||
- CHEEVOS: Reset hardcore default to enabled; show message when trying to load state in hardcore
|
||||
- CHEEVOS: Fix memory map conversion
|
||||
- CHEEVOS: Check netplay status when unlocking achievements
|
||||
- CHEEVOS: Support for hashing buffered NDS ROMs
|
||||
- CHEEVOS: Fix hung task whe badge doesn't exist
|
||||
- CLI: Load save states from command-line or playlist
|
||||
- CORE INFO CACHE/SETTINGS: Restore missing 'Cache Core Info Files' menu entry
|
||||
- DATABASE: Serial scanning for Gamecube/MegaCD/SegaCD/Saturn/PSX/PSP/Dreamcast/Wii
|
||||
- D3D10/D3D11: Add Vsync swap interval
|
||||
- EMSCRIPTEN: Add Jaxe, WASM4 cores
|
||||
- FILE IO: Fix incorrect file names for remap files when the content path doesn't have a preceding slash
|
||||
- INPUT/OVERLAY: Added support for showing the overlay behind the menu instead of in front. This is currently only supported on the GL, Vulkan, D3D 9/10/11/12 and 3DS drivers.
|
||||
- INPUT/UDEV: Convert abs mouse from screen to viewport coordinates; fix relative mouse coords
|
||||
- INPUT/WAYLAND: Ignore mouse clicks on window decoration
|
||||
- INPUT/WAYLAND: Add scroll wheel support
|
||||
- LINUX: Added support for Linux GameMode (https://github.com/FeralInteractive/gamemode), which can be toggled on/off in the Power Management or Latency settings menus.
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- LOCALIZATION: Add Indonesian, Swedish and Ukrainian language options
|
||||
- LOCALIZATION/MENU/RGUI: Enable Indonesian and Swedish localisations for RGUI
|
||||
- LOGGING: Logging cleanups
|
||||
- LOGGING: Stop logging FPS statistics twice on quit
|
||||
- LOGGING: Log font rendering backend only once
|
||||
- HOTKEYS: Added a hotkey toggle for the on-screen technical statistics.
|
||||
- HOTKEYS: Add delay + acceleration to volume hotkeys
|
||||
- MENU: Add option for showing notifications only in menu
|
||||
- MENU/RGUI: Add Finnish to supported languages
|
||||
- MENU/XMB: Optional vertical list item fade
|
||||
- MENU/XMB/OZONE: Category + History/Favorites icons
|
||||
- NETWORK: Fix dummy notification - no longer shows a netplay initialization failed notification when netplay is not enabled
|
||||
- NETWORK: LAN addresses only for UPnP - Some router devices might accept non-LAN addresses without raising an error.
|
||||
- NETWORK: Filter out non-connectable rooms. Add an option for filtering out non-connectable netplay rooms.
|
||||
- NETWORK: Netplay spectator notification fix. Fix double notification when the host switches to spectator.
|
||||
- NETWORK: Prevents long-term pausing from clients dishonoring allow pausing
|
||||
- NETWORK/LOBBY: Lobby Viewer: Filter out rooms that are not running RetroArch
|
||||
- NETWORK/LOBBY: Lobby Viewer: Display a non-connectable tag to non-connectable rooms
|
||||
- NETWORK/LOBBY: Host: Display warning if we are announcing to the internet but our room isn't connectable from there
|
||||
- NETWORK/RELAY: Custom relay server support - Add support for custom user-ran relay servers
|
||||
- NETWORK/RELAY: Replace Canadian relay server with Singapore relay server. Current relays: New York/USA, Madrid/Spain, Sao Paulo/Brazil, Singapore
|
||||
- NETWORK/UPNP: Various refactors/improvements, no more dependent on miniupnpc
|
||||
- NETWORK/UPNP: Various UPnP binding fixes for specific routers
|
||||
- NETWORK/UPNP: Accept IGD v2 service types
|
||||
- NETWORK/UPNP: Delay lobby server announcing - delay the announcing in order to give UPnP's port forwarding more time. Fix the remaining truncation warnings.
|
||||
- NETWORK/UPNP: Smart interface selection - Find the most suitable address for UPnP by scoring interfaces on how close their address is to the device's address
|
||||
- OPENGL1: Fix buffer overflow - RetroArch would sometimes crashes at startup when loading asset textures with GL1 driver
|
||||
- PS3: PSL1GHT port added to Gitlab CI
|
||||
- VULKAN: Double combined image sampler descriptor pool size - fix segfaults with AMD GPUs using RADV
|
||||
- VULKAN: Emulate mailbox only with Vsync enabled - otherwise have it disabled - useful for VRR/G-Sync/FreeSync
|
||||
- VULKAN/SWAPCHAIN: Vulkan max swapchain images option adjustments: removed value 1, since it won't be used - Video reinit on change, so that there is no need to restart or toggle fullscreen
|
||||
- VULKAN/HDR: HDR support - tested on Windows
|
||||
- WAYLAND: Add libdecor for client side decoration
|
||||
- WAYLAND: Use any display for initial metrics
|
||||
- WAYLAND: Fix the window closing, if RetroArch is build without libdecor
|
||||
- WAYLAND: Use checked sizes in EGL resize
|
||||
- WAYLAND: Fix window title update
|
||||
- WEBOS: Fix webOS build and run
|
||||
- WIIU: Fix rotation
|
||||
- UWP/XBOX: Fix content over 4GB (approx) failing to load, improve/speed up copy/load times
|
||||
- UWP/XBOX: Fix scanning for playlists
|
||||
- UWP/XBOX: Move content copied to LocalState to a dedicated dir and clear on startup
|
||||
- UWP/XBOX: Make content copy to a specific cache directory in the LocalState folder when it's copied
|
||||
- UWP/XBOX: Auto delete VFS cache dir on startup
|
||||
- UWP/XBOX: Make resolution switching automatic and fix angle output issues
|
||||
- UWP/XBOX: Force ANGLE to render at 1080p regardless of screensize as the output is 1080p regardless of screensize. This fixes an issue where at 4k any angle output would be zoomed into a corner.
|
||||
- UWP/XBOX: Set resolution based on display resolution (auto 4k)
|
||||
- UWP/XBOX: Set driver to D3D11 if booting with opengl
|
||||
- UWP/XBOX: Reset width and height of output on boot to match display
|
||||
- UWP/XBOX: Mitigate need for VFS cores on NTFS drives
|
||||
- UWP/XBOX: Make check for standard I/O by access rather than the just assuming based on path string
|
||||
- UWP/XBOX: Add code to auto permissions so files can be accessed by non VFS cores (no exFAT or FAT32 support yet)
|
||||
|
||||
# 1.9.14
|
||||
- ANDROID/PLAYSTORE: Implement MANAGE_EXTERNAL_STORAGE permission
|
||||
- ANDROID/PLAYSTORE: Bump up SDK level to 30 to comply with Play Store policies
|
||||
- AUDIO/MIXER: Increase sample buffer padding
|
||||
- CHEEVOS: Disallow achievements when spectating netplay
|
||||
- CHEEVOS: Fix need-to-activate achievement logic for non-hardcore
|
||||
- CHEEVOS: Don't queue rewind re-init if already on main thread
|
||||
- CHEEVOS: Ignore unofficial achievements unless setting is enabled
|
||||
- CHEEVOS: Use SSL host when available
|
||||
- CHEEVOS: Validate hashes for secondary discs in multi-disc games
|
||||
- CHEEVOS: Ensure placard is initialized on main thread when game has no achievements
|
||||
- CHEEVOS: Audit achievement settings defaults and visibility
|
||||
- CHEEVOS: Show error message when no password provided
|
||||
- CHEEVOS: Use widget for game loaded achievement progress
|
||||
- CONFIG: Honor config_save_on_exit when Reboot/Shutdown is called
|
||||
- DISK CONTROL: Focus on current content entry in Disk Control append/insert
|
||||
- FRAMEDELAY: Auto Frame Delay Improvements - swap interval handling, D3DX handling, and delay target resets also on core restart. It should now work with high refresh rates and also with Direct3D 10/11/12 drivers
|
||||
- INPUT/GYRO/ACCELEROMETER/ANDROID: Re-enable Gyroscope & Accelerometer when RetroArch resumes or regains focus
|
||||
- INPUT/HID: Fix gamepad disconnect on unrecognized HID device
|
||||
- LAKKA: Patch to fix keyboard typing
|
||||
- LAKKA: CD-ROM eject menu item
|
||||
- LAKKA/BLUETOOTH: Add option to remove pairing
|
||||
- LAKKA/SWITCH: Disable rumble gain
|
||||
- LAKKA/SWITCH: Disable cpu scaling, uses its own CPU governor
|
||||
- LOGGING: Logging cleanups. A bunch of unifications and reformattings (capitalizations, dots, quotes, prefixes etc). Also added a few missing things, such as Run-Ahead error logging and LED interface init logging when it is enabled.
|
||||
- NETPLAY: Networking - should not print country for a local lobby
|
||||
- NETPLAY: Added setting to allow/disallow players other than the host from pausing the game.
|
||||
- NETPLAY: Added a sublabel for netplay max connections.
|
||||
- NETPLAY: Fixed port override macro from not being set immediately after the port setting.
|
||||
- NETPLAY: Show passworded rooms on lobby
|
||||
- NETWORK: Make HTTP header parsing case insensitive
|
||||
- NETWORK/UPNP: Fixed memory leaks
|
||||
- NETWORK/UPNP: Added a task_queue_wait to prevent executing two nat tasks at once, so it's also thread safe now
|
||||
- NETWORK/UPNP: Switch to a permanent lease time, but request it to be removed when we do netplay_free. Switch to a permanent lease time, but request it to be removed when we do netplay_free.
|
||||
- NETWORK/UPNP: Only use a single interface for UPnP, return on the first one found instead of iterating over all of them and opening them one by one
|
||||
- OVERLAYS: Revert changes
|
||||
- RETROFW: Add OSS audio
|
||||
- VIDEO/ROTATION: Always return false if rotation can't occur. RETRO_ENVIRONMENT_SET_ROTATION should return false when rotation has been forcefully disabled in frontend, that way the core can decide if aspect ratio should be rotated or not for vertical games. Useful for FBNeo for instance.
|
||||
- VULKAN: Avoid hard crash when capturing screenshot in emulating mailbox.
|
||||
- WIIU: Make wiiu_gfx_load_texture code safer
|
||||
- WIIU: Fix keyboard support.
|
||||
|
||||
# 1.9.13
|
||||
- CHEEVOS/MSVC2010: Add Cheevos support
|
||||
- CRT/SWITCHRES: Fixes some issue where scaling is incorrect in some video modes for CRT output.
|
||||
- FRAMEDELAY: Add 'Automatic Frame Delay' option
|
||||
- INPUT: Add 'All users control the menu' setting - any gamepad can control the menu when this is enabled. Only limitation right now is that only player 1 can toggle the menu, but any set Menu Toggle Controller Combo will work fine for all users, so this should be acceptable for now
|
||||
- INPUT/UDEV: Fix Dolphin bar and safeguard against not adding devices with no mouse or touch buttons detected
|
||||
- NETPLAY/CLI: -C/--connect commandline fix
|
||||
- NETPLAY: Other improvements
|
||||
- NETPLAY: Remove forced disconnection on unknown netplay command -
|
||||
will be backwards compatible with any version that removed this
|
||||
disconnect. instead of disconnecting, we just read the data and
|
||||
ignore, like most network implementations do
|
||||
- TASKS/CHEEVOS: Replace coroutines with tasks/thread
|
||||
- TASKS/DATABASE/EXPLORE: Initialise 'Explore' menu on a background thread - no more stall when hovering over the Explore tab
|
||||
|
||||
# 1.9.12
|
||||
- 3DS: Ensure parallax barrier is disabled when '3DS Display Mode' is '2D'
|
||||
- COMMAND: Command interface should work again
|
||||
- INPUT/HID: Rewrote the HID deregistration algorithm; it should no longer cause issues when dealing with multiple pads of the same HID/VID combo
|
||||
- INPUT/HID: Fix initialization bug that caused wiimotes to fail to register without an accessory attached
|
||||
- INPUT/HID: Fix Wiimote regression
|
||||
- INPUT/HID/MAC: Get Sony Sixaxis (DualShock 3) working on MacOS
|
||||
- INPUT/UDEV: Add extra abs check for dolphinbar
|
||||
- INPUT/UDEV: Add relative left mouse button when pointer device is not abs
|
||||
- INPUT/WAYLAND: Fix keyboard input on Wayland - fixes 'Certain cores ignore user input'
|
||||
- NETPLAY: Improvements from Cthulhu
|
||||
- OPENDINGUX: Fix HAS_ANALOG/HAS_MENU_TOGGLE defines in sdl_dingux joypad driver
|
||||
- LIBRETRO: Enable SRAM for contentless cores
|
||||
- LIBRETRO: Add environment callback to get the rate retro_run is called - GET_THROTTLE_STATE and RETRO_THROTTLE_UNBLOCKED environment callback
|
||||
- LINUX: Update metadata manifest
|
||||
- MENU/OZONE: New themes - Solarized Light, Solarized Dark
|
||||
- WINDOWS/WIN9X: Fix non-ASCII text display in window title
|
||||
|
||||
# 1.9.11
|
||||
- ANDROID: New launcher logo - will fill the corners on the homescreen
|
||||
- D3D9: Driver works again (RGUI only and software rendered cores work, no shader support yet)
|
||||
- HID/MAC: WiiU GameCube Adapter now works
|
||||
- HID/WIIU: WiiU and general HID subsystem unified/merged
|
||||
- INPUT: Refactor menu toggle combo button logic to allow quit combo button
|
||||
- INPUT/UDEV: Add mouse relative check and set appropriately to fix issue
|
||||
- LIBNX/SWITCH: Splitted Joycon button mapping
|
||||
- LIBRETRO: Add environment callback to enable cores to notify the frontend that a core otion value has changed
|
||||
- MIYOO: Add initial port
|
||||
- OPENDINGUX/RG350: Enable tinyalsa for the RG350
|
||||
- PS2: Add 'Change Resolution' option
|
||||
- PS2: Add option to change video windows offsets
|
||||
- STEAM/LINUX: Move to new 'soldier' runtime
|
||||
- WAYLAND: Remove xdg-shell-v6 protocol
|
||||
- WINDOWS: Fix non-ASCII text display in window title
|
||||
- WINDOWS 11: Shows Windows 11 version name now (Information -> System Information)
|
||||
- UWP: Further improvements to WinRT VFS layer
|
||||
|
||||
# 1.9.10
|
||||
- 3DS: Add bottom screen idle state
|
||||
- 3DS: Add unique IDs for Gearboy/Gearcoleco/Gearsystem, correct CAP32 code
|
||||
- 3DS/SAVESTATES: Fix RAM states to file when core deinits
|
||||
- AUDIO/MIXER: Pad sample buffers to prevent potential heap-buffer-overflows when resampling (fixes crash when using 30 kHz menu audio files)
|
||||
- AUDIO/LINUX/SNAP: Add JACK support
|
||||
- CHEEVOS: Don't write achievement credentials to overrides
|
||||
- CHEEVOS: Disable slowmotion when enabling hardcore mode
|
||||
- D3D9: Fixed MVP matrix issue for RGUI texture (main game frame still won't show up though)
|
||||
- D3D11/D3D12/HDR: Fixed contrast to be more correct - now scales from 0-10 linearly and behaves more the way you'd expect it to - changed name to ditch legacy settings users may have
|
||||
- D3D11/HDR: Fixed D3D11's blend, rasterizer and topology states not being set to the sames when using HDR and leaving the menu - caused issues with PCSX2's Shadow of the Colossus
|
||||
- D3D11/D3D12/HDR: Added ability to skip inverse tonemapper to the shader via the constant buffer using 'inverse_tonemap' - set to 0.0f to skip
|
||||
- D3D11/D3D12/HDR: Fixed potential bug when swapping between hdr and sdr and the bit depth not being set correctly
|
||||
- D3D11/D3D12/HDR: Added numerous helper functions to help create the correct values to colour the UI - normally the white UI elements should be rendered at paper white not max brightness for various reasons
|
||||
- BUGFIX/ANDROID: Fix crash that could happen on Android with Sameboy core - would crash on rumble function
|
||||
- GFX/WIDGETS: New regular widget message appearance
|
||||
- INPUT/MOUSE: Add distinct mouse zero index label for drivers that do not support multimouse
|
||||
- INPUT/RUMBLE: Add generic rumble gain to input settings
|
||||
- INPUT/UDEV/X11: Add workaround to fix keyboard input when using X11 + Udev
|
||||
- LIBNX/SWITCH: Add Video Filters support
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- OPENDINGUX/BETA: Disable OpenAL
|
||||
- PLAYLISTS: Add 'Refresh Playlist' option
|
||||
- STEAM: Initial release on Steam
|
||||
- UWP/VFS/XBOX: Improvements and bugfixes to UWP VFS driver
|
||||
- VIDEO/REFRESH RATE: Automatic PAL/NTSC refresh rate switch where available - as long as the platform display server allows changing refresh rates and the display has the desired refresh rate
|
||||
- VIDEO FILTERS: Add 'Picoscale_256x-320x240' video filter
|
||||
- WIIU/HID: Fix analog inputs on HID devices
|
||||
|
||||
# 1.9.9
|
||||
- 3DS: Add bottom touchscreen menu
|
||||
- 3DS/SAVESTATES: Save and load save states to and from RAM
|
||||
- AUDIO/MIXER: Ensure than menu sounds are re-enabled when calling CMD_EVENT_AUDIO_REINIT
|
||||
- AUDIO/RESAMPLER/MIXER: Fix menu sounds (audio mixing) when using the 'sinc' resampler with quality lower than 'normal'
|
||||
- AUDIO/CONVERSION/ARM NEON: Add intrinsic NEON versions for float_to_s16/s16_to_float - should lead to optimized codepaths for AArch64/ARMv7 architectures without being dependent on ASM codepaths.
|
||||
- AUDIO/RESAMPLER/ARM NEON: Add intrinsic NEON version for lanczos sinc function - should lead to optimized codepaths for AArch64/ARMv7 architectures without being dependent on ASM codepaths.
|
||||
- CHEEVOS: Upgrade to rcheevos 10.2
|
||||
- CHEATS: Add enhanced search functionality to the 'Cheats' menu
|
||||
- CHEATS/RUNAHEAD: Fix cheats when using second instance runahead
|
||||
- CONFIG: Add option to (force-)write current core options to disk (Quick Menu)
|
||||
- CORE INFO CACHE: Remove core path from core info cache. Should make core info caches portable now (for example: you can move RetroArch to a separate dir and they would still work).
|
||||
- D3D11: Use Shader Model 5.0 for frontend shaders if D3D11 Feature level is at least 11.0 or higher. Should fix some new shaders that require SM 5.0 (like AMD FSR)
|
||||
- D3D11: Add HDR support (disabled for UWP for now)
|
||||
- D3D12: Add HDR support (disabled for UWP for now)
|
||||
- EMSCRIPTEN: Fixed web player bug with filesystem and runtime
|
||||
- INPUT/OVERLAY: Fix overlay input when analog to digital mapping is enabled
|
||||
- INPUT/UDEV: Look for "ID_INPUT_KEY", not "ID_INPUT_KEYBOARD"
|
||||
- INPUT/WINRAW: Fix crash when overlay is enabled
|
||||
- MAC/METAL: Add Discord RPC support
|
||||
- MENU: Allow 'Custom Aspect Ratio (X Position)/(Y Position)/(Width)/(Height)' to be entered manually via keyboard
|
||||
- MENU: Allow 'Vertical Refresh Rate' to be entered manually via keyboard
|
||||
- MENU/SHADERS: Highlight currently selected value in Shader Parameter drop-down lists
|
||||
- STABILITY: Safer way of avoiding the race condition in
|
||||
audio_driver_sample/audio_driver_sample_batch - we can check
|
||||
audio-suspended to see if we're doing a fs/windowed toggle - enhances stability when fullscreen toggling/tearing down context
|
||||
- STABILITY: When audio driver write callback function fails, don't
|
||||
turn audio off completely - look if audio_driver_output_samples_conv_buf
|
||||
is non-NULL first before we attempt to write audio - enhances stability when fullscreen toggling/tearing down context
|
||||
- STABILITY: Input robustness for cores that use internal threading
|
||||
(full teardown/setup), no audio should be processed at this point in
|
||||
time
|
||||
- VIDEO: Screen resolution list sanitizing
|
||||
- VULKAN: Fix some Vulkan validation layer errors
|
||||
- UWP: Updated icons courtesy of Danp142
|
||||
- UWP/XBOX: Disable CPU model check on Xbox as it doesn't work and can even crash
|
||||
- UWP/VFS/XBOX: Code cleanup and simplification of UWP VFS driver
|
||||
|
||||
|
||||
# 1.9.8
|
||||
- AUDIO/WINDOWS/WASAPI: Stop deactivating audio on fast forward
|
||||
- CHEEVOS: Hide challenge indicators when resetting
|
||||
- CHEEVOS: Support for more than 64 memory regions
|
||||
- CHEEVOS: Automatically retry 'http error code -1'
|
||||
- CONTENT INFORMATION: Show content info label+path rows always
|
||||
- CORE OPTIONS: Core option categories implemented
|
||||
- CORE OPTIONS: Add option to disable core option categories
|
||||
- D3D10/11/12: Fix gfx_display_draw_texture - fixes OSK (On-Screen Keyboard) issues
|
||||
- DATABASE: Fix heap-buffer-overflow when fetching CRC values
|
||||
- DATABASE/EXPLORE: Fix CRC32 reading in explore menu
|
||||
- DATABASE/LIBRETRODB: Fix writing of numerical values
|
||||
- DATABASE/LIBRETRODB: Fix libretro-db loading on big endian platforms
|
||||
- DUMMY CORE: Skip state_manager_event_{deinit/init} when core type is dummy, should skip warning spam 'Implementation uses threaded audio. Cannot use rewind..' when using rewind
|
||||
- INPUT/UDEV: Limit udev device scan to subsystem 'input'
|
||||
- INPUT/SDL2/WINDOWS: Fix keyboard event keycodes
|
||||
- INPUT/WAYLAND: Fixes a bug where the first player's mouse, pointer, and lightgun are echoed to the other ports. Now, those other ports correctly report zero. In the future support for multiple mouselike devices will need to be added, which is a bigger project
|
||||
- INPUT/WAYLAND: The driver now respects keyboard_mapping_blocked
|
||||
- INPUT/WAYLAND: When possible, deprecated lightgun defines are replaced with the new ones. The coordinates are still using the old relative callbacks
|
||||
- INPUT/WINRAW: Trigger joypad driver reinit on DEVICECHANGE - avoids fullscreen toggle
|
||||
- INPUT/WINRAW: Alt sticky fix
|
||||
- INPUT/WINRAW: Prevent Alt getting stuck when Alt-Tabbing
|
||||
- INPUT/WINRAW: Add pointer status
|
||||
- INPUT/WINRAW: Add missing analog keybinds
|
||||
- LIBNX/SWITCH: Fix poll missing for controller 2-8
|
||||
- LIBNX/SWITCH: Fix layout not applied correctly and hangs when splitting joycons
|
||||
- LIBRETRO: Core options category API implemented
|
||||
- LIBRETRO: Fix RETRO_ENVIRONMENT_SET_FASTFORWARDING_OVERRIDE callback when runahead is enabled
|
||||
- LIBRETRO: Add environment callback for enabling core option menu visibility updates without toggling Quick Menu
|
||||
- LOGGING: Starting logging and verbose mode before first config load
|
||||
- LINUX: In some Linux Desktop Environments, like Budgie, task bar feature is unable to pin applications. With StartupWMClass= present in .desktop file, it is possible to pin the application
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- MENU: Relocate 'Manage Playlists' to top
|
||||
- MENU: Fullscreen resolution width/height settings no longer require 'advanced settings'
|
||||
- MENU/REFRESH RATE: Fix double notifications with refresh rate settings
|
||||
- MENU/OZONE: Ensure the existence of values used in selection calculation
|
||||
- MENU/OZONE/VULKAN: Casting to unsigned caused an integer overflow and after float promotion would lead to 'x' being a garbage value, leading to problems when this value was passed to vkCmdSetViewport. This stops Vulkan validation layers from complaining about it
|
||||
- METAL: Fixed font driver memory leaks
|
||||
- MOUSE: Change default mouse index to port index
|
||||
- MOUSE: Friendly names for mice where available
|
||||
- OSX: Fix some memory leaks
|
||||
- OSX: Fix controller duplication bug
|
||||
- PS2: Implement alpha for the video driver
|
||||
- PS2: Aspect ratio handling
|
||||
- RETROFW: Initial port
|
||||
- UWP/XBOX: Enable Explore tab by default - seems to work fine
|
||||
- UWP/XBOX: Fix startup issues with latest Xbox Dashboard updates - ANGLE cores still show up wrong
|
||||
- UWP/XBOX: fix issue where files where opened as OPENALWAYS instead of OPENEXISTING this fixes beetle cores
|
||||
- UWP/XBOX: fix issue where filesizes where not returned properly, this fixes loading arcade dat files
|
||||
- UWP/TRANSLATION: Enabled translation services for both UWP MSVC2017 and 2019. No TTS speech yet.
|
||||
- VIDEO: Fix refresh rate 59Hz rounding
|
||||
- WINDOWS: Remember original refresh rate
|
||||
- WINDOWS/VULKAN: Refresh rate fixes + cleanups
|
||||
- WIIU: Fix L3/R3 buttons
|
||||
- WIIU: Compress RPX libretro cores
|
||||
- WIIU: Add ICInvalidateRange (necessary for JITs)
|
||||
- WIIU: Slight filesystem optimisation
|
||||
- WIIU: Add option for running without core info (emscripten-style)
|
||||
|
||||
# 1.9.7
|
||||
- 3DS: Add unique ID's
|
||||
- CRT/SWITCHRES: Fixed some Monitor index bugs ad updated to the latest SR2
|
||||
- CRT/SWITCHRES: Fixed monitor index corruption on Windows and added correct fractal scaling. Only used when required
|
||||
- CRT/SWITCHRES: Updated log defines to match SR upstream.
|
||||
- CRT/SWITCHRES: Added new SR_CONFIG_PATHS for non Windows and Linux systems.
|
||||
Not that SR works on them but to fix RA compile issues
|
||||
- CRT/SWITCHRES: Updated SR2 code base to latest. Added supprt for windows monitor indexing. Fixed monitor index bug where index 1 was not being used correctly and "auto" was not being sent.
|
||||
- CRT/SWITCHRES: Updated swithres for x86 windows fix
|
||||
- CRT/SWITCHRES: fixed SR2 auto issue
|
||||
- CRT/SWITCHRES: Fixed auto monitor bug
|
||||
- CRT/SWITCHRES: Fixed monitor index corruption on Windows
|
||||
- CRT/SWITCHRES: Fixed buffer size bug
|
||||
- CRT/SWITCHRES: Added correct fractal scalling. only used when required.
|
||||
- CORE INFO: Automatically disable core info cache when core info directory is read-only
|
||||
- EMSCRIPTEN: add MAME2003 / MAME2003-plus to web.libretro
|
||||
- INPUT/UDEV: udev fixes add pointer pressed to pointer device to allow udev users to access this device
|
||||
- LIBNX/SWITCH: Enable 7zip support
|
||||
- LINUX/XDG: Prevent xdg-screensaver's "Protocol error" messages
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- LOCALIZATION: Add missing languages for the first startup
|
||||
- MENU/XMB/WIDGETS: Add workaround for FPU bug that breaks scale factor comparisons on certain platforms (fixes XMB thumbnails on 32bit Linux/Windows)
|
||||
- MENU/RGUI: Enable fullscreen thumbnail toggle using RetroPad 'start' button
|
||||
- MENU/RGUI: Fix sublabel length when menu clock is disabled
|
||||
- NETWORK/HTTP: Fix HTTP progress indication for large files on 32-bit systems
|
||||
- NETWORK/NATT: implement natt fix from void()
|
||||
- OPENDINGUX: Fix display when cores 'drop' frames
|
||||
- OPENDINGUX BETA: Use ALSA audio driver by default
|
||||
- OPENDINGUX BETA: Fix IPU scaling when running 256x224 (SNES/Genesis) content
|
||||
- PATHS: Fix garbled path string
|
||||
- PS2: Implement proper ps2_font driver instead of using the font driver from gskit
|
||||
- PS2: Use BDM for increasing up USB stability
|
||||
- PS3: First basic RSX driver for PSL1GHT
|
||||
- RS90: Initial port
|
||||
- RS90: Fix offset of OSD text
|
||||
- RS90: Disable menu clock by default
|
||||
- RS90: Hide 'Bilinear Filtering' video option
|
||||
- RS90: Move appdata (retroarch) base directory to external microsd card
|
||||
- RS90: Add optional approximate 'semi-linear' scaling filter
|
||||
- SHADERS: Max Shader Parameters increased to 1024
|
||||
- VIDEO: Add 'Integer Scale Overlay' - Force integer scaling to round up to the next larger integer instead of rounding down
|
||||
- VIDEO: New 'Full' aspect ratio added. This aspect ratio is useful when used with a shader which has a border in it. The aspect ratio is set to the full window area, so that the viewport spans the whole viewport. When using a border type shader like the Mega Bezel this allows the graphics to span the whole window regardless of the user's monitor aspect ratio
|
||||
- VITA: Wrong flags for not piglet version
|
||||
- UNIX: Correct backlight max_brightness path
|
||||
- UWP/XBOX: Default to Direct3D11 driver on UWP builds
|
||||
- UWP/XBOX: Do not use windowed mode on UWP/Xbox by default, set default resolution to 1920x1080 by default. Should fix display issues with Dolphin/PCSX2 on Xbox
|
||||
- WIIU: Fix inputs breaking when connecting/disconnecting remotes
|
||||
- WIIU: Input - ignore some bogus KPAD results
|
||||
- WIIU: Font rendering fixes - render font lines with correct spacing, and only sample alpha channel when rendering fonts
|
||||
- WIIU/NETWORK: Network speed optimisations - WINSCALE, TCP sACK, large buffers
|
||||
- WIIU/LIBFAT: Increase cache size on WiiU
|
||||
- WIIU/FILE IO: Filesystem optimisations - add fast path for already aligned buffers
|
||||
- WIIU/FILE IO: Use 128K vbufs for WiiU - we have loads of RAM and large vbufs are very beneficial
|
||||
- WIIU/MENU/OZONE: Fix Ozone rendering error (scissor fix)
|
||||
- WIIU/MENU/OZONE: Use Ozone icons instead of XMB Monochrome
|
||||
|
||||
# 1.9.6
|
||||
- ARCHIVE: Fix archive delimiter detection when file path contains no slashes
|
||||
- ANDROID: Do not duplicate port 0 mouse and gun inputs to other ports
|
||||
- AUDIO/XAUDIO2: Fail instead of crashing when disconnecting an audio device
|
||||
- CHEEVOS: Reset cached progress each time menu is opened
|
||||
- CRT/SWITCHRES: Add support for switchres.ini core and directory overrides
|
||||
- D3D11: Don't use allow tearing flag with blit swap chains. Also disables the flip model if the allow tearing flag is not supported.
|
||||
- D3D11: Disable DXGI's ALT+ENTER handling
|
||||
- D3D11: Don't pass ALLOW_TEARING when unsupported
|
||||
- D3D11: Fix non-vsynced output without flip, black screens in fullscreen
|
||||
- D3D12: Relocated 'd3d12_gfx_sync'
|
||||
- D3D12: Fixed swap interval option
|
||||
- GFX: Fix uninitialized variables in gfx_display_draw_cursor
|
||||
- HISTORY: Hide 'Add to Favorites' when viewing an entry of the favorites playlist
|
||||
- INPUT: 'Analog to Digital Type' usability improvements
|
||||
- INPUT: Add support for mapping multiple controllers to a single input device
|
||||
- INPUT/REMAPPING: Add support for mapping multiple controllers to a single input device
|
||||
- INPUT/LIGHTGUN: Bind lightgun trigger to first mouse button by default
|
||||
- INPUT/WINDOWS/RAWINPUT: Mouse access violation fix
|
||||
- INPUT/UDEV: Only add mouse if it has buttons and add vebose device friendly names
|
||||
- INPUT/UDEV: Skip mouse with no button errors and keep the rest
|
||||
- INPUT/UDEV: Fix Game Focus mode
|
||||
- INPUT/UDEV/X11: Change udev driver for dual lightgun support in X11
|
||||
- LIBNX/SWITCH: Update to libnx 4.0.0
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- LOCALIZATION: Fix Switchres menu texts
|
||||
- MENU/OZONE: Ensure sidebar display status is updated correctly when performing rapid menu navigation
|
||||
- MENU/XMB: Dynamic wallpaper fix
|
||||
- MENU/XMB: Icon opacity fix
|
||||
- MENU/QT/WIMP: Fix default core detection when playlist file name does not match 'db_name'
|
||||
- PLAYLISTS: Optimise scanning of large rom sets
|
||||
- SECURITY: Plug so-called high-risk vulnerability related to Powershell - avoid injection - don't send speech input as commandline argument
|
||||
- UWP/XBOX: Add expanded resources Rescap to increase performance of UWP version in app mode on Xbox
|
||||
- WINDOWS/INSTALLER: Add smarter isEmptyDir reference implementation that looks for subdirectories from NSIS documentation
|
||||
- WINDOWS/INSTALLER: Register new function DirectorySet that is called when pressing the "Next" button on the MUI_PAGE_DIRECTORY, aka the install folder selection GUI. DirectorySet contains the criteria for an acceptable folder, which are:
|
||||
- `IfFileExists "$INSTDIR\retroarch.exe"` returns 1
|
||||
- `IfFileExists "$INSTDIR\*.*` returns 0, there is no existing folder
|
||||
- `IfFileExists "$INSTDIR\*.*"` returns 1, there is a folder, and `isEmptyDir` returns 1, therefore the folder is empty, including of subdirectories
|
||||
- X11: Fix threaded video segfault
|
||||
|
||||
# 1.9.5
|
||||
- ALSATHREAD: Make alsathread default for all ALSA devices with threads
|
||||
- ARCHIVE: Fix loading of archived content with file names containing '#' characters
|
||||
- CHEEVOS: Upgrade to rcheevos 10.1
|
||||
- CHEEVOS: Challenge indicators
|
||||
- CHEEVOS: Group achievements by category in quick menu
|
||||
- CHEEVOS: Relabel 'Start Active' with 'Encore Mode'
|
||||
- D3D10: Window title should now update
|
||||
- D3D11: Window title should now update
|
||||
- D3D11: Allow fastforward in fullscreen
|
||||
- D3D12: Window title should now update
|
||||
- D3D12: Allow fastforward in fullscreen
|
||||
- CRT/SWITCHRES: New implementation
|
||||
- FONTS: Improve message wrapping with CJK languages
|
||||
- FONTS: Fix garbled characters when converting encodings
|
||||
- INPUT: Allow the 8 analog stick directions to be used as keys for core keyboard mappings
|
||||
- LIBRETRO: Add API extension for setting 'need_fullpath' based on content file extension and to request persistent frontend content data buffers
|
||||
- MENU/SEARCH: Add enhanced search functionality to the 'Manage Cores' menu
|
||||
- OPENDINGUX: Fix black screens when triggering gfx driver initialisation via menu actions
|
||||
- UNIX: Get better battery stats on sysfs nodes
|
||||
- VIDEO: Extend Frame Delay range to 19 to accommodate PAL land too
|
||||
- WIFI/LAKKA: Add nmcli to wifi drivers
|
||||
- WIFI/LAKKA: Add wifi configuration menu
|
||||
- X11: fix fullscreen when swapping monitors/resolution
|
||||
|
||||
# 1.9.4
|
||||
- CHEEVOS: update rcheevos to v10.0.0
|
||||
- CONTENT LOADING/FILE IO: Prevent unnecessary extraction (to disk) of compressed content files when need_fullpath is false
|
||||
- CORE INFO/FILE IO: Enable core info cache by default now for all platforms
|
||||
- CORE INFO/REGRESSION FIX: Fix regression caused by core info file caching - Downloads was no longer showing up in Load Content
|
||||
- FILE IO/COMPRESSED: Ability to load content inside ZIP files directly into RAM
|
||||
- INPUT/OVERLAYS: Add option to select between 'touched' elements and physical controller inputs when showing inputs on overlays
|
||||
- INPUT REMAPPING/OVERLAYS: Prevent duplicate inputs when using remaps with input overlays
|
||||
- LAKKA: Add brightness restore hook
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- MENU/OZONE: Added simple playlist entry enumeration
|
||||
- MENU/XMB: Fix display of 'Maximum Users' menu entry dropdown list
|
||||
- PS3/PSL1GHT: Joypad driver works again
|
||||
- PSTV: Fix Vita input driver for PSTV
|
||||
- PSTV: Support for 720p on PSTV when using 'Unlock framebuffer' in Sharpscale plugin
|
||||
- PSTV: Fix scaling on PSTV when not using 720p
|
||||
- RPNG: Fix some memory corruption if processing broken input PNG file
|
||||
- SECURITY: Fix CVE-2021-28927
|
||||
|
||||
# 1.9.3
|
||||
- 3DS: Disable menu screensaver animations in XMB/GLUI
|
||||
- COMMAND: Initialize netcmd->cmd_source_len before recvfrom()
|
||||
- CONTENT LOADING/STATICALLY LINKED: Ensure 'Always Reload Core on Run Content' setting is applied when loading content via the file browser
|
||||
- CONTENT LOADING/EMSCRIPTEN: Fix content loading via file browser on platforms with 'broken' core handling (i.e. emscripten)
|
||||
- CORE INFO: Skip whitespace when writing compressed core info cache files
|
||||
- CORE INFO/FILE IO: Core Info cache; significant file I/O performance improvements on systems with slow disk file I/O
|
||||
- CORE INFO/FILE IO: Enable core info cache by default on all 'console' platforms
|
||||
- FREEBSD: FreeBSD build fix
|
||||
- LAKKA: Support for tweaking CPU governors/scaling policies
|
||||
- LAKKA: This adds managed policies and settings to store them and reload them at startup
|
||||
- LIBRETRO API: Add API extension for cores to override frontend fast-forward state
|
||||
- MENU/RGUI: Fix saving of config files/overrides when 'Lock Menu Aspect Ratio' is enabled
|
||||
- SHADERS: Fix 'Auto-Shader Delay' functionality
|
||||
- UWP/D3D11: Disable mipmap generation
|
||||
- UWP/XBOX: Add 'Force 4K resolution' option (Force the resolution to the fullscreen size on Xbox, if set to 0, a fixed value of 3840 x 2160 will be used)
|
||||
|
||||
# 1.9.2
|
||||
- 3DS: Enable graphics widgets / overlays
|
||||
- 3DS: Load texture images as BGR colors
|
||||
- 3DS: Change default asset directory
|
||||
- CHEEVOS: Allow rcheevos_patch_address to be called on game without achievements
|
||||
- CHEEVOS: Update achievement memory maps (add Supervision)
|
||||
- CONFIG/FILE: Use hash map to optimise key/value lookups
|
||||
- CORE INFO: Performance optimisations + code clean-ups/refactors
|
||||
- CRT/SWITCHRES: Fixed CRTSwitchRes framebuffer bug
|
||||
- DISCORD/RP: Fix regression
|
||||
- DRM: set the correct video mode
|
||||
- FASTFORWARD: Enforce minimum fastforward_ratio of 1.0
|
||||
- FONTS/FREETYPE/STB_UNICODE/BITMAPFONT: Prevent texture bleed when rendering text at non-integer scales
|
||||
- INPUT: Ensure that 'retro_set_controller_port_device' is called when updating 'Max Users'
|
||||
- INPUT/XEGL/MOUSE: Fix xegl_ctx.c mouse activation
|
||||
- INPUT/SDL: Fix crash in SDL input driver when analogs are bound.
|
||||
- INPUT/POINTER: Add scaling to pointer input.
|
||||
- INPUT REMAPPING: Fix regression on loading file
|
||||
- INPUT REMAPPING: Fix regression where disabling input remapping would disable input
|
||||
- IOS: Disable system button gestures on iOS 14
|
||||
- IOS: Prevent potential crash on controller connect - randomly would get a crash when connecting a game controller while RA was running
|
||||
- LAKKA: Add menu for time zone setting
|
||||
- LOGGING: RARCH_LOG_V checking for verbosity level is not necessary and can cause issues; removed said check.
|
||||
- LOGGING: Silence inappropriate cheatfile logging
|
||||
- IOS/MAC: Add CPU VFP unit detection for Darwin
|
||||
- MAC: Swallow 'escape' key being pressed - would previously make the game toggle between fullscreen and windowed
|
||||
- MAC: Intel and ARM64 timer change proposal.
|
||||
- MAC/ARM64: run_fast_mode disabled for 64 bits invalid instructions.
|
||||
- MAC/OPENGL: Fix codesigning issue
|
||||
- MAC/UNIVERSAL: Add TTS translation service support.
|
||||
- MENU: Add optional menu screensaver
|
||||
- MENU: Add search filter support to cheats and overlays file browser menus
|
||||
- MENU/FILEBROWSER: Enhanced 'Load Content' file browser search functionality
|
||||
- MENU/INPUT: Block accidental diagonals in menu navigation
|
||||
- MENU/RGUI: Add option to disable menu transparency
|
||||
- MENU/RGUI: Fix display of 'Video > Scaling' menu when 'Lock Menu Aspect Ratio' is enabled
|
||||
- MENU/MATERIALUI: Add icon to 'Turbo Fire' menu entry
|
||||
- MENU/OZONE: Ozone Dracula theme
|
||||
- OPENDINGUX/BETA: Fix IPU scaling when running GBA-resolution content
|
||||
- OPENDINGUX/BETA: Add 50Hz support
|
||||
- OPENDINGUX: Enable 'SaveRAM Autosave Interval' by default
|
||||
- PATCHES: Added multi-softpatching support + OSD messages for patches
|
||||
- RHMAP: Track the complete string in rhmap
|
||||
- VITA: Align VM block size to 1MB - should fix one of the issues with gpSP
|
||||
- WINDOWS/GDI: Fix non-ASCII text rendering
|
||||
- XEGL: Fix mouse not working when using OpenGLES with X11
|
||||
|
||||
# 1.9.1
|
||||
- 3DS: Graphics widgets support
|
||||
- 3DS: On error, only init gfx on salamander build. This prevents graphical issues if the gfx is already initialized.
|
||||
Which should always be the case if called from a running core
|
||||
- 3DS: Update error applet
|
||||
- 3DS: Enable online Core Updater
|
||||
- 3DS: Guard threading
|
||||
- 3DS: Allow sideways screen rotation
|
||||
- 3DS: Enable threading and add a threaded audio driver
|
||||
- ANDROID: Implementation of fullscreen over notch function (for Android 9.0 and up)
|
||||
- ANDROID: Add Play Store module support.
|
||||
- ANDROID: Add option to switch all installed cores to Play Store versions
|
||||
- AUDIO: Memalign audio buffers to 64 bytes. This is the most common cache line size, helps with performance. Also fixes issues with platforms like PSP that wrongly assume that malloc returns aligned buffers (to 16bytes). This recently broke the PSP builds
|
||||
- AUDIO/ALSA: Fix float format detection
|
||||
- AUDIO/JACK: Deinterleave in the process callback. This allows us to avoid the extra copy to the deinterleave buffer and lets us use only a single jack ringbuffer.
|
||||
- AUDIO/JACK: (Audio/JACK) Fix non-blocking write. Previously we would wait on the condition variable even in the non-blocking case. This improves fast-forward performance massively and brings JACK in line with other backends in that regard.
|
||||
- AUDIO/XAUDIO2: Fix threaded audio bugs with cores like Dinothawr
|
||||
- CONFIG: Add support for saving per-directory core options and deleting core option overrides
|
||||
- CONFIG: Enable saving of changed parameters when '#include' directives are used
|
||||
- CONFIG/DIRS: Enable configuration of the directories used for Favorites, History, Images, Music and Video playlists
|
||||
- CONFIG/REMAPS: Allow loading core remaps without content
|
||||
- CONFIG/OVERRIDES: Fix empty override paths when launching without content
|
||||
- CHEATS: Maximum search value corrections
|
||||
- CHEEVOS: Generic memory mapping using rcheevos
|
||||
- CHEEVOS: Ensure badge textures are released before video driver is deinitialized. Should fix crashes with slang shaders.
|
||||
- CHEEVOS: Include achievement runtime state in save states
|
||||
- CHEEVOS: Prevent hardcore toggle when emu-handled cheats are active
|
||||
- CHEEVOS: Add confirmation submenu to achievements hardcore toggle
|
||||
- CHEEVOS: Calculate leaderboard widget spacing based on video resolution
|
||||
- CHEEVOS: Show unsupported core message when viewing achievement list for unsupported core
|
||||
- CHEEVOS: Allow disabling leaderboard notifications and trackers separately
|
||||
- CHEEVOS: Add display widget for active leaderboards
|
||||
- CHEEVOS/CORE OPTIONS: Core options blacklist. Disables hardcore mode when certain core options are set.
|
||||
- CLI: Add option for quitting on close content
|
||||
- CONTEXT/DRIVER SWITCHING: Allow context switching from gl to glcore
|
||||
- CORE OPTIONS: Add option to reset all core options for current core/content
|
||||
- CORE OPTIONS: Add per-folder core options
|
||||
- CRT/SWITCHRES: Improvements
|
||||
- CRT/SWITCHRES: Low resolution switch bug fix - This allows resolutions lower that 32x224 like 256x224 to work
|
||||
- CORE DOWNLOADER: Enhanced core downloader search functionality
|
||||
- D3D10: Should now be able to use shaders with hardware-accelerated libretro cores
|
||||
- D3D11: Should now be able to use shaders with hardware-accelerated libretro cores
|
||||
- D3D11: Skip shader/stock blend when we don't have a texture. This happens if the core calls video_cb with the frame set to null on
|
||||
the first frame, and was causing black screens/driver resets. The ffmpeg core seems to do this.
|
||||
- D3D11: Fix shaders with scaled framebuffers
|
||||
- D3D11: Add flip model support - fallback to blit model for OSes where flip model is not supported (windows 7 and earlier). Will add a menu option later allowing the user to switch inbetween the two
|
||||
- D3D12: Should now be able to use shaders with hardware-accelerated libretro cores
|
||||
- D3D10/11/12: Increase sprite capacity, we need this so that the hardware rendered menu drivers doesn't glitch out
|
||||
- DRM: Fix race condition in drm_surface_set_aspect
|
||||
- DRM/KMS: add support for custom hdmi_timings / modes
|
||||
- DATABASE: Fix crash that could happen when selecting cursor
|
||||
- DATABASE/EXPLORE: Fix - Prevent segfault when accessing 'Explore' menu
|
||||
- EMSCRIPTEN: Only report back one screen pointer for rwebinput, fixes lockup when clicking on an overlay
|
||||
- FILEIO/PERFORMANCE: Only attempt to call dir_check_defaults once per runtime session
|
||||
- FILEIO/PERFORMANCE/3DS: Increase file buffer size and savestate chunk size. This seems to help with saving large savestates.
|
||||
- FONTS: Improve handling of Arabic and Persian text
|
||||
- FONTS/FREETYPE: Use fontconfig to select fonts if available
|
||||
- INPUT: Add hold mode for turbo fire 'Single Button'
|
||||
- INPUT MAPPING: Refresh bind list on device type change
|
||||
- INPUT MAPPING/REMAPPING: Minor bugfix - Remap file browsing starts navigation at input_remapping_directory even if the core-subdir (where saved files go) exists
|
||||
Having remaps for many different cores makes finding the active core files cumbersome, especially because remaps are not compatible between different cores (but maybe for cores emulating the same hardware)
|
||||
- IOS: Take out 'Core Downloader' from iOS 9/iOS 11 builds
|
||||
- IOS: IOSApp doesn't crash anymore when a file is shared to it
|
||||
- INPUT: Keyboard device mapper rework
|
||||
- INPUT: New input bind order scan/clear fix
|
||||
- INPUT: Duplicate key event blocking additions
|
||||
- INPUT: Prevent duplicate key events with hotkeys + keyboard device type
|
||||
- INPUT: Keyboard LED driver
|
||||
- INPUT/AUTOCONFIG: Allow controllers with no/empty names to work.
|
||||
- INPUT/GAME FOCUS: Add option to automatically enable 'game focus' mode when running/resuming content
|
||||
- INPUT/HOTKEYS: Hotkey for Close Content / Unload Core
|
||||
- INPUT/LIBCEC: Map libcec-daemon keys to RETROK
|
||||
- INPUT/X11: Enable keyboard input when mouse cursor is not inside the RetroArch window but window still has focus
|
||||
- INPUT/X11: Fix mouse input when mouse is grabbed
|
||||
- INPUT/UDEV/RUMBLE: Fix rumble.
|
||||
- INPUT/WINDOWS/DINPUT: Simultaneous shift sticky fix
|
||||
- INPUT/WINDOWS/DINPUT: Prevent Win-key from opening Start Menu
|
||||
- INPUT/WINDOWS/DINPUT: Option for disabling Windows hotkeys
|
||||
- INPUT/WINDOWS/DINPUT: Mouse grabbing/clipping with Alt-Tab
|
||||
- INPUT/WINDOWS/DINPUT: Mouse grab fixes
|
||||
- INPUT/WINDOWS/RAWINPUT: Key position fixes
|
||||
- INPUT/WINDOWS/RAWINPUT: Mouse grab fixes
|
||||
- INPUT/WINDOWS/RAWINPUT: Prevent outside window mouse clicks when grabbed
|
||||
- INPUT/WINDOWS/RAWINPUT: Option for disabling Windows hotkeys
|
||||
- INPUT MAPPING/REMAPPING: Major bugfix - Remap file having a different device type requires manual intervention after loading for the core to register the type properly
|
||||
- JSON: New faster json parser/writer library rjson
|
||||
- JSON/RJSON: Replace rapidjson parser/writer in discord-rpc with rjson
|
||||
- LIBRETRO: Add API extension for cores to query the number of active inputs provided by the frontend
|
||||
- LIBRETRO: Ensure RARCH_CTL_CORE_OPTIONS_LIST_GET returns false if no core options are available
|
||||
- LIBRETRO: Add API extension for overriding frontend audio latency
|
||||
- LIBRETRO: Add API extension for cores to monitor frontend audio buffer occupancy
|
||||
- LINUX: Also show /run/media or /run/media/$USER in drives list
|
||||
- LINUX: Adjust brightness according to the limit. Seems like some platforms feature non-standard maximums, but the variable is correclty exported for us to use
|
||||
- LOCALIZATION: Add Finnish language
|
||||
- LOGS/SHADER: Shader log spam reduction
|
||||
- LOGS/CONFIG: Config logging cleanup
|
||||
- LOGS/SAVESTATE: Config logging cleanup
|
||||
- MAC: Apple Silicon/Mac M1 support
|
||||
- MAC: Code signing/notarization
|
||||
- MAC: Fix a leak with NSTemporaryDirectory() on ARC (Automatic Reference Counting) code
|
||||
- MAC: Support bundle assets extraction on macOS
|
||||
- MAC: Universal Metal build for both ARM and Intel Macs
|
||||
- MAC/UNIVERSAL: Add CoreAudio3 audio driver for Metal Universal build
|
||||
- MAC/IOS: Only extract assets once on first install
|
||||
- MENU: Add 'L2 + R2' menu toggle gamepad combo
|
||||
- MENU: Menu text improvements; clarifications, consistency, text mistakes,
|
||||
- MENU: Tweak menu scroll initial hold delays
|
||||
- MENU: Restrict menu acceleration to navigation buttons
|
||||
- MENU: Add 'Menu Driver' setting to 'User Interface'
|
||||
- MENU: Relocate 'Menu Scroll' settings.
|
||||
- MENU: Separate 'Turbo Fire' menu.
|
||||
- MENU: Dropdown menu for 'Custom Aspect Ratio' setting.
|
||||
- MENU: Reorder Mouse Index next to Device Index
|
||||
- MENU: Submenu for Device Index/Mouse Index
|
||||
- MENU: Reorganize User Interface menu
|
||||
- MENU: Add 'Remove DSP Plugin' menu entry
|
||||
- MENU: Hide 'Auto-Shader Delay' menu setting when shaders are unavailable
|
||||
- MENU/ANIMATIONS: Fix non-smooth text ticker + reduce line ticker code duplication
|
||||
- MENU/ANIMATIONS/OZONE: Add cursor wiggle animation
|
||||
- MENU/ANIMATIONS/OZONE: Implement wiggling for main menu when wrap-around is disabled
|
||||
- MENU/NOTIFICATIONS: On-Screen Notifications' menu clean-ups
|
||||
- MENU/NOTIFICATIONS: Add option to show/hide Refresh Rate notification
|
||||
- MENU/FILEBROWSER: Start auto-selecting last used path for more file browser menu entries
|
||||
- MENU/INPUT: Input port label adjustments
|
||||
- MENU/INPUT/XMB: Proper control port icons
|
||||
- MENU/INPUT/OZONE: Proper control port icons
|
||||
- MENU/QUICK MENU: Add remap clearing ability under Quick Menu controls
|
||||
- MENU/QUICK MENU: Cap 'State Slot' drop-down list to a maximum of 1000 (+Auto) entries
|
||||
- MENU: Customizable menu scroll hold delay.
|
||||
- MENU/DESKTOP: Fix mouse cursor limited by window range on F5 press
|
||||
- MENU/DESKTOP: Add simple shader option
|
||||
- MENU/DESKTOP/WINDOWS: Remove broken 'Update RetroArch' functionality for Windows. We want this to not only be system agnostic if we bring it back, but also work outside of the Qt desktop interface
|
||||
- MENU/OZONE: New Theme - Twilight Zone
|
||||
- MENU/RGUI: Add 3:2, 5:3 and 3:2/5:3 (centered) aspects
|
||||
- MENU/RGUI/TEXT RENDERING: Add Russian language text support
|
||||
- MENU/RGUI/TEXT RENDERING: Add support for CJK punctuation glyphs
|
||||
- MIDI/WINMM: Recover from MIDI messages not handled by the device
|
||||
- MIDI/WINMM: Fix winmm midi driver hanging on content closing
|
||||
- NETWORK: Add READ/WRITE_CORE_MEMORY network commands
|
||||
- NETWORK: Fix backwards condition in socket blocking behavior
|
||||
- NETWORK/NETPLAY: Attempt IPv4 when IPv6 fails
|
||||
- OGA/VIDEO: support for OGS
|
||||
- OGA: This keeps the tradition DRM driver along with the OGA one. The probe
|
||||
function skips the driver if the screen is non rotated to fall back to
|
||||
the regular DRM driver.
|
||||
- OGA: Fix messages from not disappearing
|
||||
- OGA: Implement RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER. This is a faster rendering codepath for software rendered libretro cores that some libretro cores use right now. Video drivers in RetroArch have to explicitly implement this for this codepath to work at runtime.
|
||||
- OPENDINGUX: Add/Optimise rumble interface
|
||||
- OPENDINGUX: Fix frozen video when enabling fast forward
|
||||
- OPENDINGUX/SDL: OSD font clean-up
|
||||
- OPENDINGUX/SDL: Enable selection of image interpolation method when using 'sdl_dingux' gfx driver
|
||||
- OPENDINGUX/SDL: Enable integer scaling when using the 'sdl_dingux' gfx driver
|
||||
- OVERLAYS: Add option to scale overlays automatically (with aspect ratio correction)
|
||||
- OVERLAYS: Hide Overlay When Gamepad is Connected. Overlays will be hidden automatically when a gamepad is connected in port 1, and shown again when the gamepad is disconnected.
|
||||
- OVERLAYS: New default overlays for mobile (neo-retropad)
|
||||
- OVERLAYS: In addition to overlay scale, the user can now set an Overlay Aspect Adjustment factor. Most overlays are designed for 16:9 displays, which means they become stretched/ugly on modern wide aspect phones and suchlike. By changing the Overlay Aspect Adjustment factor, a user can scale the overlay width/height to achieve a uniform appearance regardless of display resolution.
|
||||
- OVERLAYS: Since scaling a gamepad overlay can result in buttons being squished too close together (or being pulled too far apart), the user can now adjust the effective spacing of the different 'halves' of an overlay via Overlay Horizontal Separation and Overlay Vertical Separation factors. Overlay Horizontal Separation divides the overlay in two vertically (left/right, at the centre point), and applies a spacing offset (positive or negative) between the UI elements on each side; Overlay Vertical Separation does the same, but the split is horizontal (top/bottom)
|
||||
- OVERLAYS/FIX: The Overlay X Offset and Overlay Y Offset options have been fixed, and now work correctly
|
||||
- OVERLAYS/FIX: All of the above options (and Overlay Scale) are configured and saved independently for landscape and portrait display orientations - so adjusting everything for a nice landscape layout won't break the portrait display
|
||||
- OVERLAYS/FIX: When using the Vulkan gfx driver, memory is leaked every time an overlay is freed
|
||||
- OVERLAYS/FIX: When threaded video is enabled, loading overlays with no images (i.e. utility-type overlays, where everything is hidden until the screen is touched) can generate segfaults due to improper usage of realloc()
|
||||
- OVERLAYS/FIX: When Show Inputs on Overlay is enabled, ASAN reports bit shift errors due to an incorrect range check when handling turbo inputs - essentially, there is no upper limit to the considered input id range, which means overlay hotkeys (menu toggle, etc.) are incorrectly treated as having turbo support, causing bit shifts using wildly inappropriate id indices
|
||||
- PLAYLISTS/PORTABLE: Fixed first load initialization
|
||||
- PS2: Added Multitap support (up to 8 players)
|
||||
- PS2: Fix for not recognized digital and other non-standard controllers
|
||||
- PS2: Fix Quitting from RA
|
||||
- PS2: Add Audio mixer
|
||||
- REWIND: Prevent 'Rewind Frames' from being set to '1' incorrectly on load content
|
||||
- RUNAHEAD: Add Run-Ahead Toggle hotkey with notifications
|
||||
- RBUF/ANIMATIONS: Simplify gfx_animation by switching from dynarray to rbuf
|
||||
- RBUF/CORE UPDATER: Replace static entries array with dynamic array via RBUF library
|
||||
- RBUF/M3U: Replace static entries array with dynamic array via RBUF library
|
||||
- SENSORS: Android (crash-)fixes/improvements + add option to disable sensor input
|
||||
- SDL2/VIDEO: Get the SDL2 video driver to work in Wayland/KMS
|
||||
- SAVESTATES: Adding savestate garbage collector for autoincrement stavestates. As some issues indicate, there's an issue with
|
||||
the autoincrement save slot feature: slot index will increase and very old saves won't be deleted. This adds support to delete old save states with a user defined
|
||||
save state limit (global). Instead of wrapping around the slot counter it will simply delete the oldest save, since it is simpler. For now there's a limit of one deletion per save, which ensures a user cannot delete many saves by accident if they set the limit too low.
|
||||
- SAVESTATES/SAVEFILES: Ensure save file and playlist compression is disabled by default
|
||||
- SHADERS: Add option to remember last selected shader preset/shader pass directories
|
||||
- SHADERS: Use last selected shader preset directory when changing shaders via previous/next hotkeys
|
||||
- SHADERS: Remove Parameters line
|
||||
- SHADERS: Shaders fix for duplicate parameters loading bug
|
||||
- SHADERS: Fix Crash change num shader passes in UI
|
||||
- SHADERS/SLANG: Fix slang shaders with rotation
|
||||
- STREAMING/FFMPEG: Add Facebook Game Stream option (for embedded ffmpeg core-enabled RetroArch builds)
|
||||
- SWITCH: Fix input bind icons being off by one line
|
||||
- SWITCH: Fix audio issues
|
||||
- TLS/SSL: Add BearSSL support, as alternative to mbedTLS
|
||||
- VIDEO: AddVariable BFI (Black Frame Insertion)
|
||||
- VIDEO/DRM GO2: Dynamic resolution support
|
||||
- VIDEO FILTERS: Video filter optimisations
|
||||
- VIDEO FILTERS: Add several LCD-effect video filters
|
||||
- VIDEO FILTERS: Gameboy/Dot_Matrix video filters: Add XRGB8888 support
|
||||
- VIDEO FILTERS: Add Normal4x video filter
|
||||
- VIDEO FILTERS: Add 'Upscale_256x-320x240' video filter
|
||||
- VIDEO FILTERS: Add 'Upscale1.5x' video filter
|
||||
- VITA: Disable temporarily VitaGL
|
||||
- VITA: Fix bubble name
|
||||
- VITA: proper handling of boot params
|
||||
- VITA: Default menu scale 1.5x to improve readability
|
||||
- WIFI/LAKKA: Add a proper WiFi menu, with Enable/Disable & Disconnect options. This also allows WiFi passwords to be remembered. The underlying tool (connman) allows to store passswords (that's why it auto connects whenever you boot a Lakka device), so we expose this so that the user does not have to re-input the pass when connecting to a saved wifi.
|
||||
- WII/HID: Added HID support for HORI mini wired ps4 gamepad
|
||||
- WINDOWS: Add support for accelerators to main win32 message loop
|
||||
- WINDOWS: Add accelerators for Open (Ctrl+O) and Fullscreen (Alt+Enter)
|
||||
- WINDOWS: Fixes some file I/O failures on Windows when paths are longer than 260 characters.
|
||||
- WINDOWS: Fix crashing on startup on Windows when using Chinese Simplified language.
|
||||
- WINDOWS/XP: The OpenGL 1 video driver is now the default for maximum backwards compatibility upon first startup. It's of course always possible for the user to change this.
|
||||
- WINDOWS/MENUBAR: Load accelerators, Localize Win32 menu items to current language, and display shortcut keys
|
||||
- WINDOWS/MENUBAR: Add 'Reinit' to Menubar
|
||||
- WINDOWS/MSVC: Fix rewind crash on MSVC build when using SSE2
|
||||
- UWP: Don't default to XMB menu by default, default to Ozone instead
|
||||
- UWP/VFS: Use Win32 file APIs when possible - better file I/O performance
|
||||
- WIIU/FILEIO/PERFORMANCE: Faster startup times - remove the path_is_valid() call when loading textures
|
||||
- WIIU: Fix touchscreen mouse emulation
|
||||
|
||||
# 1.9.0
|
||||
- 3DS: Fix sound crackling when paused
|
||||
- ANDROID/VIBRATION: Fixes "Vibrate on Key Press" having no effect on Android devices, which occurred because only the off time/strength was defined in what should have been a pair of off/on values
|
||||
- AUTOCONFIG: Ensure correct directory is used when saving autoconfig profiles
|
||||
- BLUETOOTH: Add a Bluetooth driver (Lakka-only for now)
|
||||
- CHEATS: Fix for wrong number of remaining cheat search matches on some machines
|
||||
- CHEEVOS: Option to play sound on achievement unlock.
|
||||
- CHEEVOS: Upgrade to rcheevos 9.1
|
||||
- CHEEVOS: Restore display of unlocked achievements across hardcore modes
|
||||
- CHEEVOS: Hash buffered data when available
|
||||
- CHEEVOS: Fix 'Auto Save State freezes RetroArch while Cheevos is enabled'
|
||||
- CORE OPTIONS: Pressing OK (or clicking/tapping) on a 'boolean toggle' core option no longer opens a drop-down list. The value now toggles directly, just like boolean options everywhere else in the menu
|
||||
- CORE OPTIONS: Toggling an option that changes the number of core options being displayed (i.e. things like `Show Advanced Audio/Video Settings) no longer resets the navigation pointer to the start of the list
|
||||
- CORE OPTIONS: Before, RetroArch would identify core option values as being 'boolean' if they had labels matching the specific strings enabled or disabled. Most core devs would abide by this, but not always... As a result, we sometimes would end up with misidentified values, with all kinds of Enabled, Off, True, etc. strings littering the menu, in place of proper toggle switches. All boolean-type value labels are now detected, and replaced with standard ON/OFF strings.
|
||||
- CLI: A new command line option --load-menu-on-error has been added
|
||||
- CRT: On the fly CRT porch adjuments - these changes allow a user to adjust how the porch algorithm generates the 15khz/31khz output. Giving the ability to change over/under scan.
|
||||
- CONFIG FILE: Optimise parsing of configuration files
|
||||
- D3D9/D3D11: Fix core-initiated D3D9/D3D11 driver switches
|
||||
- DRIVERS: Implemented protection to avoid setting critical drivers to nothing thus preventing the user from locking him/herself out of the program
|
||||
- EMSCRIPTEN: Fix input code to ignore unknown keys
|
||||
- FFMPEG CORE: Prevent seeking past the end of files (hang fix)
|
||||
- FILE I/O: VFS and NBIO interfaces will now use 64-bit fseek/ftell where possible, should allow for reading/writing to files bigger than 2GB
|
||||
- INPUT MAPPING/REMAPPING: Add input remap drop-down lists
|
||||
- IOS: Fixed iOS 6 version
|
||||
- IOS: Hide the home indicator as it obscures the content too frequently
|
||||
- IOS/METAL: Metal video driver now works on RetroArch iOS
|
||||
- IOS/METAL: Support getting video metrics to support proper touchscreen interactions
|
||||
- LOCALIZATION: Updates for several languages (synchronized from Crowdin)
|
||||
- MEMORY/LINUX/ANDROID: Fix reporting of free memory
|
||||
- MEMORY/WINDOWS: Fix reporting of free memory
|
||||
- MENU: Enlarged INT/UINT selection limit from 999 to 9999
|
||||
- MENU: Fix cursor forced to first entry after displaying lists
|
||||
- MENU: Make Notification Font option visible when Graphics Widgets are enabled
|
||||
- MENU/RGUI: Add optional 'toggle switch' icons
|
||||
- MENU/WIDGETS: Add optional widget-based 'load content' launch feedback animation
|
||||
- MENU/WIDGETS: Make notification font size option visible when graphics widgets are enabled
|
||||
- ODROID GO ADVANCE: Video driver - fix race condition with RGUI callback
|
||||
- PLAYLISTS: Change playlists to use dynamic arrays. Instead of a fixed initial 12MB memory allocation (99999 * 128 byte (on 64bit arch)), use a dynamically growing array
|
||||
- PLAYLISTS: Playlist base content directory paths - portable playlists
|
||||
- PLAYLISTS/SEARCH: Enhanced playlist search functionality
|
||||
- PLAYLISTS/DATABASE: Add 'Explore' view
|
||||
- PLAYLISTS/DATABASE/EXPLORE: Show system icons in explore view
|
||||
- PS2: Improve FPS Limiter
|
||||
- RUNAHEAD: Prevent runahead from being disabled *permanently* when an error occurs
|
||||
- SCANNER: Add more region codes for GameCube/Wii game detection
|
||||
- SHADERS/SLANG: Increased Slang max Parameters, Textures & Passes
|
||||
- VIDEO FILTERS/BLARGG: Make Blargg_snes filter customizable
|
||||
- WINDOWS/RAWINPUT: Fix invalid calls to dinput_handle_message when input driver is not set to dinput
|
||||
- X11: Add lightgun support
|
||||
|
||||
# 1.8.9
|
||||
- AUTO SAVESTATES: Ensure save states are correctly flushed to disk when quitting RetroArch (fixes broken save states when exiting RetroArch - without first closing content - with 'Auto Save State' enabled)
|
||||
- BUILTIN CORES: Builtin cores like ffmpeg and imageviewer would previously try to erroneously load a dynamic core named 'builtin' - this would fail and would just be a wasteful operation - this now skips dylib loading in libretro_get_system_info for builtin cores
|
||||
- CHEEVOS: Report API errors when unlocking achievements or submitting leaderboards
|
||||
- CHEEVOS: Support less common file extensions
|
||||
- CHEEVOS: Disable hardcore mode when playing BSV file
|
||||
- CHEEVOS: Correctly report unlocked non-hardcore achievements when hardcore is paused
|
||||
- CHEEVOS/M3U: Bugfix - did not handle absolute/relative paths in M3U files correctly before
|
||||
- CHEEVOS/M3U: Bugfix - it didn't handle comments/directives
|
||||
- CHEEVOS/M3U: Bugfix - it doesn't handle trailing whitespace
|
||||
- CHEEVOS/M3U: Bugfix - failed when loading M3U files with certain line endings
|
||||
- CORE MANAGEMENT: Add 'core management' menu (Settings -> Core)
|
||||
- CORE MANAGEMENT: Add option to backup/restore installed cores
|
||||
- CORE MANAGEMENT: Improved core selection logic
|
||||
- CORE INFO: Search search optimisations
|
||||
- CORE DOWNLOADER: Rename 'Core Updater' to 'Core Downloader'
|
||||
- CORE DOWNLOADER: Add 'Show Experimental Cores' setting under Settings > Network > Updater
|
||||
- CORE DOWNLOADER: Core licenses are now shown for all entries in the Core Updater menu
|
||||
- CORE DOWNLOADER: Pressing RetroPad select on a Core Updater entry will now display any text in the description field of its info file
|
||||
- CORE DOWNLOADER: Installed cores are now highlighted via a [#] symbol
|
||||
- CORE DOWNLOADER: Pressing RetroPad start on a selected, installed entry opens the Core Information menu (when using Material UI, swiping left or right triggers the same action). This means we can now view bios info etc. - and more importantly delete cores - without jumping through all the hoops of loading a core first and navigating all over the place
|
||||
- CORE DOWNLOADER/UPDATER: Add option to automatically backup cores when updating
|
||||
- DISK CONTROL: Enable 'Load New Disc' while disk tray is open
|
||||
- INPUT: Added a hotkey delay option to allow hotkey input to work properly when it is assigned to another action
|
||||
- INPUT: Remove 'All Users Control Menu' setting, was buggy and will be properly reintroduced after input overhaul
|
||||
- LINUX: Set default saves/save states/system paths
|
||||
- LOCALIZATION: Add Persian language
|
||||
- LOCALIZATION: Add Hebrew language
|
||||
- LOCALIZATION: Add Asturian language
|
||||
- MENU: Proper line wrapping for message dialog boxes
|
||||
- MENU/HOTKEYS: Add sublabels to all hotkey bind entries
|
||||
- MENU/QUICK MENU: Suppress the display of 'empty' quick menu listings when closing content
|
||||
- MENU/OZONE: Performance improvements
|
||||
- MENU/SDL: Add mouse controls
|
||||
- OPENGL1/VITA: Initial changes for HW context without FBO
|
||||
- OVERLAYS: Add options for moving the on-screen overlay
|
||||
- PLAYLISTS/WINDOWS: Fix core path entries in image/video/music history playlists
|
||||
- PS2: Add back CDFS support
|
||||
- SDL/GL: Advertise GLSL support
|
||||
- VIDEO/WIDGETS: Fix heap-use-after-free errors, leading to memory corruption
|
||||
- VITA: Added custom bubbles support
|
||||
- VITA: VitaGL update
|
||||
- VULKAN/WSI: Better frame pacing
|
||||
- VULKAN/WSI: Fix Intel Mesa being broken when using Fences, we have to use Semaphores to acquire the swapchain or the entire GPU stalls
|
||||
- VULKAN/WSI: Add support for either using fences or semaphores when syncing
|
||||
- VULKAN/WSI: Prefer using semaphores for integrated GPUs as it promotes better throughput over fences
|
||||
- VULKAN/WSI/ANDROID: Do not use mailbox emulation on Android
|
||||
- UWP/XBOX: Potentially improve performance by enabling 'Game Mode'
|
||||
|
||||
# 1.8.8
|
||||
- AUDIO/JACK: Fix regression introduced after 1.8.4 - would hang at startup
|
||||
- CHEEVOS: Disable hardcore when cheats are enabled
|
||||
- CHD: Return false when special track cannot be found
|
||||
- DISCORD/MATCHMAKING: Fix Discord 'Ask To Join' functionality
|
||||
- FILE PATH: Various file path handling optimisations
|
||||
- FONT: Fix Arabic, Chinese and Korean font rendering
|
||||
- INPUT MAPPING/REMAPPING: Restore broken 'reset to default' functionality with RetroPad 'start' button
|
||||
- INPUT MAPPING/REMAPPING: Fix 'reset to default' action for analog sticks and undefined core inputs
|
||||
- LOCALIZATION: Update Arabic translation
|
||||
- LOCALIZATION: Update Chinese (Simplified) translation
|
||||
- LOCALIZATION: Update Chinese (Traditional) translation
|
||||
- LOCALIZATION: Update German translation
|
||||
- LOCALIZATION: Update Greek translation
|
||||
- LOCALIZATION: Update Spanish translation
|
||||
- LOCALIZATION: Update French translation
|
||||
- LOCALIZATION: Update Italian translation
|
||||
- LOCALIZATION: Update Japanese translation
|
||||
- LOCALIZATION: Update Korean translation
|
||||
- LOCALIZATION: Update Dutch translation
|
||||
- LOCALIZATION: Update Polish translation
|
||||
- LOCALIZATION: Update Portuguese Brazilian translation
|
||||
- LOCALIZATION: Update Russian translation
|
||||
- LOCALIZATION: Update Turkish translation
|
||||
- LOCALIZATION: Update Vietnamese translation
|
||||
- LOCALIZATION: Add Slovak translation
|
||||
- MENU: Small buffer optimizations
|
||||
- MENU/THUMBNAILS/BUGFIX: Fix heap-use-after-free error
|
||||
- MENU/OZONE: Add option to sort playlists after name truncation
|
||||
- MENU/OZONE/ANDROIDTV: Default to Ozone menu driver
|
||||
- MENU/OZONE/ANDROID: Gamepad-like devices default to Ozone now (Shield Portable)
|
||||
- NETPLAY: Lower announcement rate
|
||||
- OVERLAYS: Fix memory leak when loading overlays
|
||||
- SHADER PRESETS: Improved shader preset dirs
|
||||
- TIME/DATE: Enable configuration of date seperator in clock and runtime 'last played' displays
|
||||
- VITA: Fix upside-down vertical games
|
||||
- UWP: Enable playlist and savefile compression by default (because of slow file I/O)
|
||||
- WIIU: Gamepad hotplugging support
|
||||
- WIIU: Theoretical multi-gamepad support
|
||||
- VIDEO/WIDGETS: Fix overlapping text when simultaneous pop-up notifications and core/shader messages are being displayed
|
||||
- X11: Fix crash in x11_display_server_get_screen_orientation
|
||||
- X11/XSHM: Allow X11/XHSM video driver to operate without SHM extension
|
||||
- X11/XSHM: Fix compatibility with X11 input driver
|
||||
- XVIDEO: Fix keyboard input initialization
|
||||
- XVIDEO/XWAYLAND: Fix XVideo support on xwayland (by supporting I420 and YZ12)
|
||||
|
||||
# 1.8.7
|
||||
- 3DS: Add IDs for Frodo
|
||||
- 3DS: Enable basic networking / cheevos
|
||||
- CHEEVOS/BUGFIX: Opening achievements list would crash RetroArch with badges enabled (on new games)
|
||||
- CHEEVOS: Option to start a session with all achievements active
|
||||
- CHEEVOS: Don't perform unnecessary cheevos initialisation when cheevos are disabled. Should reduce startup times when loading content.
|
||||
- CORE OPTIONS: Disable 'Use Global Core Options File' by default
|
||||
- DOS/DJGPP: Add 32bit color support for cores
|
||||
- GLCORE: Switch to glcore video driver when requested by a core
|
||||
- LINUX/XDG: Use GenericName correctly in desktop entry
|
||||
- MAC/COCOA: Fix mouse cursor tracking
|
||||
- MENU/MATERIALUI: Add desktop-style playlist view mode
|
||||
- MENU/MATERIALUI/DESKTOPVIEW: When scrolling playlists, show last selected thumbnails while waiting for next entry to load
|
||||
- MENU/MATERIALUI: Limit tab switch rate when input repeat is active
|
||||
- MENU/OZONE: Fix sidebar playlist sort order when 'Truncate Playlist Names' is enabled
|
||||
- MENU/RGUI: Adjusted menu defaults, adjusted default scrolling speed
|
||||
- MENU/RGUI: Enable custom wallpaper when menu size is reduced at low resolutions
|
||||
- MENU/XMB: Limit tab switch rate when input repeat is active
|
||||
- NETPLAY: Fix regressions introduced in 1.8.5
|
||||
- RGUI: Add option to always stretch menu to fill the screen
|
||||
- WIIU: Enable graphics widgets
|
||||
|
||||
# 1.8.6
|
||||
- 3DS: Add IDs for UZEM, TGB Dual, and NeoCD
|
||||
- 3DS: Fix font driver horizontal text alignment
|
||||
- 3DS: Allow button presses up to INPUT_MAX_USERS - this enables the 3DS to bind and use buttons and axis for users up to the maximum set by 'Max Users' in the input settings menu.
|
||||
- 3DS: Disable video filter if upscaled resolution exceeds hardware limits. The 3DS has a maximum video buffer size of 2048x2048. This is sufficient for every core that it supports, but when using software video filters the core output resolution is doubled. This is made worse by the fact that the video filter upscaling buffer size is dependent upon the maximum output resolution of the core - which in some cases is very large indeed (e.g. pcsx-rearmed sets a maximum width of 1024, for enhanced resolution support). The 3DS has very limited 'linear memory' for graphics buffer purposes, and a large base core buffer + video filter buffer can easily exceed this - which may also disable video output, or cause a crash. This PR very simply adds a 3DS-specific check to the video filter initialisation: if the resultant upscaling buffer exceeds the hardware limitation, then the filter is automatically disabled.
|
||||
- 3DS/FONT/BUGFIX: Text colour was wrong: the RGBA channels were muddled, and R was always set to 255
|
||||
- 3DS/FONT/BUGFIX: When drawing multiline strings, the line spacing was completely incorrect
|
||||
- 3DS/FONT: Improves the appearance of the drop shadow effect on notification text.
|
||||
- 3DS/ARCHIVE/7Z: Re-enable 7zip support.
|
||||
- ARCHIVE/ZIP: Expand functionality of 'rzip_stream' interface. This PR expands the functionality of the new rzip_stream archived stream interface such that it now has almost complete feature parity with the standard file_stream interface, and can therefore be used as a drop-in replacement in most situations
|
||||
- AI SERVICE: Hide redundant entries when service is disabled
|
||||
- AI SERVICE: Added in auto-translate support
|
||||
- AI SERVICE: support for NVDA and SAPI narration
|
||||
- AUTOCONFIG: Use correct port index in input device configured/disconnected notifications
|
||||
- BUGFIX: Fix race condition where task could momentarily not be in the queue when reordering
|
||||
- CHEEVOS/BUGFIX: Prevent null reference rendering achievement list while closing application
|
||||
- CHEEVOS/BUGFIX: Report non-memorymap GBA cores as unsupported
|
||||
- COMMANDLINE: Advise against using -s and -S variables on the command line. …
|
||||
- CONFIG FILE: Only write config files to disk when parameters change
|
||||
- CONFIG FILE/BUGFIX: RetroArch no longer crashes when attempting to save a config file after 'unsetting' a parameter (currently, this can be triggered quite easily by manipulating input remaps)
|
||||
- CONFIG FILE/BUGFIX: When using Material UI, RetroArch no longer modifies the wrong setting (or segfaults...) when tapping entries in the Quick Menu > Controls input remapping submenu
|
||||
- CONFIG FILE/BUGFIX: Quite a few real and potential memory leaks have been fixed.
|
||||
- CHD: Fixes a crash caused by ignoring the return value from one of the CHD library functions
|
||||
- FASTFORWARDING: A new Mute When Fast-Forwarding option has been added under Settings > Audio. When enabled, users can fast forward without having to listen to distorted audio.
|
||||
- GLCORE/SLANG: Set filter and wrap mode correctly when intialising shader textures. Before, the glcore shader driver did not correctly initialise loaded textures. The texture filtering and wrap mode were forced on texture creation, but these settings were not recorded - subsequent updates would set garbage values, that would resolve to linear filtering OFF and wrap mode = CLAMP_TO_EDGE.
|
||||
- LOCALIZATION: Update Japanese translation
|
||||
- LOCALIZATION: Update Spanish translation
|
||||
- LOCALIZATION: Update Portuguese Brazilian translation
|
||||
- IOS: Set audio session category to ambient so sound does not get cut off on interruption (phone call/playing back audio)
|
||||
- MAC/IOHIDMANAGER/BUGFIX: Fix for Mayflash N64 adapter. In case last hatswitch does not match cookie. For the mayflash N64 adapter, I was getting a BAD EXC ADDRESS (in mac OS 10.13) for this line (tmp was NULL). Retroarch would crash in the gui if I pressed a button from the DPAD on controller 2. With this change, it no longer crashes in the gui and still registers the button push.
|
||||
- MAC/COCOA: Fix mouse input - this brings back two lines of code that have been removed over time but
|
||||
appear to be required in order for mouse input to work on macOS
|
||||
- METAL/BUGFIX: GPU capture on Metal/OSX/NVidia could crash
|
||||
- METAL/BUGFIX: Taking screenshots could capture black frames. Resulting PNG screenshots were black.
|
||||
- METAL/BUGFIX: Corrupted image due to incorrect viewport copy when taking screenshot
|
||||
- CHD: Fixes a crash caused by ignoring the return value from one of the CHD library functions.
|
||||
- MENU: Prevent font-related segfaults when using extremely small scales/window sizes
|
||||
- MENU: Fix 'gfx_display_draw_texture_slice()'
|
||||
- MENU/FONT: Enable correct vertical alignment of text (+ font rendering fixes)
|
||||
- MENU/RGUI: Enable automatic menu size reduction when running at low resolutions (down to 256x192)
|
||||
- MENU/OZONE: Update timedate style options for Last Played sublabel metadata
|
||||
- MENU/OZONE: Hide 'Menu Color Theme' setting when 'Use preferred system color theme' is enabled
|
||||
- MENU/OZONE: Fix thumbnail switching via 'scan' button functionality
|
||||
- MENU/OZONE: Prevent glitches when rendering Ozone's selection cursor
|
||||
- MENU/OZONE: Enable proper vertical text alignment + thumbnail display improvements
|
||||
- MENU/OZONE: Enable second thumbnail/content metadata toggle using RetroPad 'select'
|
||||
- MENU/OZONE: Refactor footer display
|
||||
- MENU/OZONE: Hide thumbnail button hints when viewing file browser lists
|
||||
- MENU/OZONE/INPUT/BUGFIX: Fix undefined behaviour when using touch screen to change input remaps
|
||||
- MENU/OZONE/INPUT/BUGFIX: It turns out that Windows reports negative pointer coordinates when the mouse cursor goes beyond the left hand edge of the RetroArch window (this doesn't happen on Linux, so I never encountered this issue before!). As a result, if Ozone is currently not showing the sidebar (menu depth > 1), moving the cursor off the left edge of the window generates a false positive 'cursor in sidebar' event - which breaks menu navigation, as described in #10419. With this PR, we now handle 'cursor in sidebar' status correctly in all cases
|
||||
- MENU/OZONE/INPUT/BUGFIX: Pointer input is now correctly disabled when message boxes are displayed
|
||||
- MENU/XMB: Fix thumbnail switching via 'scan' button functionality
|
||||
- ODROID GO ADVANCE: Add DRM HW context driver
|
||||
- PSL1GHT: Initial port
|
||||
- PSL1GHT/KEYBOARD: Implement PSL1GHT keyboard
|
||||
- PLAYLIST/BUGFIX: Improve handling of 'broken' playlists - RetroArch will no longer segfault when attempting to run content via a playlist entry with missing path or core path fields.
|
||||
- PLAYLIST/BUGFIX: Improve handling of 'broken' playlists - when a playlist entry has either core path and/or core name set to NULL, DETECT or an empty string, attempting to load content will fallback to the normal 'core selection' code (currently this happens only if both core path and core name are DETECT - this is wholly inadequate!)
|
||||
- PLAYLIST/BUGFIX: RetroArch will no longer segfault when attempting to fetch content runtime information when core path is NULL
|
||||
- PLAYLIST/BUGFIX: Core name + runtime info will only be displayed on playlists and in the Information submenu if both the core path and core name fields are 'valid' (i.e. not NULL or DETECT)
|
||||
- PLAYLIST/BUGFIX: When handling entries with missing path fields, the menu sorting order now matches that of the playlist sorting order (at present, everything goes out of sync when paths are empty). Moreover, entries with missing path fields can now be 'selected', so users can remove them (currently, hitting A on such an entry immediately tries - and fails - to load the content, so the only way to remove the broken entry is via the Playlist Management > Clean Playlist feature)
|
||||
- PLAYLIST: Add optional per-playlist alphabetical sorting
|
||||
- PLAYLIST: Omit whitespace when writing compressed JSON format playlists
|
||||
- PLAYLIST: Add optional playlist compression
|
||||
- QNX: Support analog sticks
|
||||
- SAVESTATES: Add optional save state compression (enabled by default now)
|
||||
- SRAM: Add optional save (SRAM) file compression
|
||||
- SCANNER: Prevent redundant playlist entries when handling M3U content
|
||||
- SCANNER/ANDROID: Fix content scanner being unable to identify certain games from CHD images (raw data sector/subcode)
|
||||
- TASKS/BUGFIX: Fix task deadlocks
|
||||
- TASKS/SCREENSHOT/BUGFIX: Fix heap-use-after-free error when widgets are disabled
|
||||
- TVOS: Disable overlays for tvOS, fix app icon
|
||||
- VIDEO/WIDGETS/BUGFIX: The font ascender/descender metrics added in #10375 are now used to achieve 'pixel perfect' vertical text alignment
|
||||
- VIDEO/WIDGETS/BUGFIX: Message queue text now uses its own dedicated font. Previously, a single (larger) font was used for all active widgets, and this was scaled down for message queue items. This 'squished' the text a little; more importantly, when using the stb font renderers (on Android. etc.) it caused ugly artefacts around the edges of glyphs due to pixel interpolation errors. Now that a correctly sized font is used, the message queue is always rendered cleanly.
|
||||
- VIDEO/WIDGETS/BUGFIX: Previously, each widget font was 'flushed' (font_driver_flush()) at least once a frame. This is quite a slow operation. Now we only flush fonts if they have actually been used.
|
||||
- VULKAN/BUGFIX: Fix display of statistics text
|
||||
- UNIX/BUGFIX: Fix overflow when computing total memory on i386
|
||||
- WIIU/BUGFIX: Fix font driver horizontal text alignment
|
||||
- WIIU/BUGFIX: Fix non-vertex coordinates in draws using tex shader
|
||||
- WIIU/BUGFIX: Update and fix meta.xml file for the WiiU release. This change makes it so the information from the meta.xml file parsed for the WiiU's Homebrew Launcher is displayed properly.
|
||||
|
||||
# 1.8.5
|
||||
- 3DS: Keep the bottom screen hidden on sleep/wakeup. When the 3DS wakes back up after being closed, the bottom screen needs to be reinitialized. Adding the condition here will cause the screen to be turned on or off based on the state of ctr_bottom_screen_enabled, as you'd expect
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at:
|
||||
|
||||
* Via E-Mail to <libretro@gmail.com>, please include in the subject line
|
||||
`RETROARCH COC` so that your e-mail may reach the correct party.
|
||||
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
||||
at [https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
@@ -1,109 +0,0 @@
|
||||
Struct ordering
|
||||
---------------
|
||||
|
||||
For POD-types, try to order structs as follows (first to last):
|
||||
|
||||
* long double (8 bytes, 16 bytes [64bit x86], 12 bytes [32bit x86])
|
||||
* double (8 bytes)
|
||||
* int64_t (8 bytes, 8 bytes [32bit ARM],
|
||||
4 bytes [32bit x86])
|
||||
* uint64_t (4 bytes [32bit], 8 bytes [32bit ARM], 8 bytes [64bit])
|
||||
* pointer (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* intptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* uintptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ptrdiff_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ssize_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* size_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* jmp_buf (4 bytes)
|
||||
* long (4 bytes [64bit Win], 8 bytes [64bit non-Win],
|
||||
4 bytes [32bit])
|
||||
* int32_t (4 bytes)
|
||||
* unsigned (4 bytes)
|
||||
* float (4 bytes)
|
||||
* int (4 bytes)
|
||||
* enum (4 bytes)
|
||||
* int16_t (2 bytes)
|
||||
* char (1 byte)
|
||||
* bool (1 byte)
|
||||
|
||||
[1] PS3 uses 4 byte pointers despite having a 64bit processor
|
||||
|
||||
Struct members should be sorted by alignment. Therefore, structs
|
||||
should be sorted by the largest type inside them.
|
||||
|
||||
For example, take a struct like this:
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t capacity;
|
||||
bool old_format;
|
||||
bool compress;
|
||||
bool fuzzy_archive_match;
|
||||
bool autofix_paths;
|
||||
char path[PATH_MAX_LENGTH];
|
||||
char base_content_directory[PATH_MAX_LENGTH];
|
||||
} playlist_config_t;
|
||||
|
||||
size_t has the biggest alignment here, so 'struct playlist_config_t'
|
||||
inside a struct should come before or after size_t.
|
||||
|
||||
*** BEST PRACTICES ***
|
||||
|
||||
* If we have pointers and size variable pairs, it's best to
|
||||
interleave them to increase the probability they go in the
|
||||
same cacheline. It also makes the code more readable, that
|
||||
these two variables are connected.
|
||||
|
||||
Example:
|
||||
|
||||
struct a
|
||||
{
|
||||
char* b;
|
||||
size_t b_len;
|
||||
char* c;
|
||||
size_t c_len;
|
||||
};
|
||||
|
||||
Stack size
|
||||
----------
|
||||
|
||||
You have to assume that stack size is going to be limited in
|
||||
RetroArch. Some game consoles (and other embedded systems)
|
||||
might have a default stack size as low as 128Kb or less.
|
||||
Be conservative with stack size but don't try to put very
|
||||
small structs on heap either [to avoid memory fragmentation
|
||||
among other things]. A balancing act here is necessary.
|
||||
|
||||
Be mindful that heap allocations are slow compared to stack.
|
||||
|
||||
Functions
|
||||
---------
|
||||
- Avoid doing small getter/setter functions. We want a function
|
||||
to justify its function call overhead by doing a significant
|
||||
body of work. Small one-line getter/setter functions for what
|
||||
is predominantly C-style structs is not useful, plus it leads
|
||||
to people thinking this function is more complex than it
|
||||
actually is, thus obfuscating the sourcecode instead of it
|
||||
being easier to read.
|
||||
|
||||
If you can find examples in the codebase that violate this
|
||||
guideline, do not hesitate to point them out to us.
|
||||
|
||||
Variable declaration
|
||||
--------------------
|
||||
For C source files, we have to insist you stick to the following:
|
||||
|
||||
- Declare variables either at the start of a function or the start
|
||||
of a code block, depending on the scope they need.
|
||||
- Do not do initial for loop declarations. Refer to the bulletpoint above:
|
||||
either declare them at the start of the function, or at the start
|
||||
of the code block.
|
||||
|
||||
Not doing this would break compilation on platforms where we are compiling
|
||||
these C source files in C89 compatibility mode. If such issues occur in pull
|
||||
requests, we have to request that it be fixed.
|
||||
|
||||
VLA (Variable Length Array)
|
||||
---------------------------
|
||||
Do not use VLAs (Variable Length Array) in C source files. These are not
|
||||
C89-compliant.
|
||||
+44
-79
@@ -1,93 +1,58 @@
|
||||
# Contributing to RetroArch
|
||||
|
||||
If you are a developer who wishes to contribute to the development of _RetroArch_; or if you have
|
||||
found a bug and wish to submit a minor patch and/or bug report, please read this document.
|
||||
If you are a developer and want to contribute to the development of RetroArch, please read this.
|
||||
If you have found a bug and want to submit a minor patch or a bug report, please read this as well.
|
||||
|
||||
Active discussions happen on our [Discord](https://discordapp.com/invite/27Xxm2h), mostly within
|
||||
the _Programming_ channel category. We value discussions that happen in real time around
|
||||
these contributions.
|
||||
# Submitting a bug report
|
||||
When submitting a bug report, make sure that the bug is local to RetroArch.
|
||||
A bug in a libretro core or something deemed to be external is likely to be closed very fast.
|
||||
If you still suspect a bug in RetroArch, make sure to test with several cores to make sure.
|
||||
|
||||
Please do note that contributors to _RetroArch_ do such contributions within their spare time.
|
||||
We do prefer to keep a professional and non-aggressive atmosphere around the project, along
|
||||
with any disagreements to be settled professionally without insults, name calling, or otherwise.
|
||||
If there are any issues, we are willing to have discussions about it.
|
||||
If you have troubles building RetroArch on Linux/BSD/OSX, make sure to paste shell output of ./configure,
|
||||
as well as config.log and shell output of make. If building on Windows, just paste shell output of make.
|
||||
|
||||
## Submitting Bug Reports
|
||||
If the issue occurs during runtime, make sure to paste RetroArch's verbose log.
|
||||
If using Phoenix frontend, you can find log in (File -> Show Log) after running.
|
||||
In console, make sure to run with verbose (-v) flag.
|
||||
|
||||
Bug reports in _RetroArch_ may fall into one of two categories:
|
||||
# Pull Requests
|
||||
Outside contributions are generally only accepted in the form of a pull request. The process is very simple.
|
||||
Fork RetroArch, make your changes, and issue a pull request on GitHub. This can all be done within the browser.
|
||||
The changes are reviewed, and might be merged in. If the pull request isn't acceptable at the time,
|
||||
note that it's possible to continue pushing up commits to your branch.
|
||||
|
||||
* _RetroArch_ itself, the user interface and API around all of the various cores.
|
||||
* Individual _Core_, of which interact with _RetroArch_.
|
||||
|
||||
When submitting a bug report, ensure that the report is submitted to the correct repository.
|
||||
For _RetroArch_ itself, it is done by reporting a bug within the
|
||||
[RetroArch](https://github.com/libretro/RetroArch) repository. For other cores, please use
|
||||
the search function within the [libretro Organization](https://github.com/libretro) on
|
||||
GitHub. Issues that are specific to a core and not _RetroArch_ are likely to be closed very
|
||||
quickly. If an issue is suspected with _RetroArch_, please make sure to test with multiple
|
||||
cores to be sure that is is not isolated.
|
||||
|
||||
If the issue occurs during runtime, please paste the verbose log output:
|
||||
|
||||
* If using the _Pheonix_ interface, the log will be in _File_ -> _Show Log_.
|
||||
* If using the main interface, enable verbose logging with _Settings_ -> _Logging_ ->
|
||||
_Logging Verbosity_. Ensure both _Log to File_ and _Timestamp log Files_ is enabled.
|
||||
* Otherwise, run _RetroArch_ with the verbose (`-v`) flag.
|
||||
|
||||
If the error happens during compilation and/or building, paste the output of `./configure`
|
||||
and `make` accordingly. If using an IDE, please paste any of the errors and log output.
|
||||
|
||||
## Submitting Pull Requests
|
||||
|
||||
Any and all contributions should be submitted through Pull Requests on
|
||||
[GitHub](https://github.com/libretro/RetroArch/pulls). The process requires that you fork the
|
||||
repository, make the appropriate changes, and then open a pull request on _GitHub_. If your
|
||||
pull request is for a proof-of-concept then please indicate as such.
|
||||
|
||||
Your pull request will then be reviewed. There may be comments and requests for additional
|
||||
changes to be made. It may also be possible that the changes will not be accepted. Otherwise, it
|
||||
may be merged in when it is fully approved. The final approval of merge requests is at the
|
||||
discretion of the project.
|
||||
|
||||
If you want to develop a larger feature or make broad changes, please do join our
|
||||
[Discord](https://discordapp.com/invite/27Xxm2h) server to discuss. The discussion is
|
||||
necessary to prevent the possibility of major work being done which will not be accepted at all.
|
||||
If you want to develop a larger feature,
|
||||
we'd like to discuss this first (ideally on IRC) so that you don't risk developing something
|
||||
that won't be merged. A pull request with a proof-of-concept is fine, but please indicate so.
|
||||
|
||||
## libretro API
|
||||
If you wish to add functionality to libretro's API, it can take some time to merge in, because changes
|
||||
to libretro API will affect other projects as well, and we highly value API/ABI stability.
|
||||
Features will only be added when deemed *necessary* for a concrete libretro core to function properly.
|
||||
Features will not be added on basis of hypothetical libretro implementations.
|
||||
|
||||
If you wish to contribute additional functionality to _libretro_'s API, there are considerations
|
||||
that must be accepted. Please note that because this API affects multiple different projects, we
|
||||
highly value and require API and ABI stability and backwards-compatibility. Due to this
|
||||
requirement, there will be additional scrutiny in reviews for this added functionality.
|
||||
# Coding style
|
||||
Having a consistent code style throughout the code base is highly valued.
|
||||
Please look through the code to get a feel for the coding style.
|
||||
A pull request may be asked to fix the coding style before submission.
|
||||
In other cases, a pull request may be followed up with a "style nit commit".
|
||||
|
||||
Any and all features will be added only when **necessary** for an existing _libretro_ core to
|
||||
properly function. Hypothetical implementations of _libretro_ are not considered.
|
||||
## Non-obvious things:
|
||||
- Code should be both C89 and ISO C++ compatible. This dual requirement is for XBox360 and MSVC in general. Think of it as a C++ compatible subset of C99.
|
||||
- Warnings are not allowed (-Wall). Make sure your code is warning-free. Note that warning sensitivity differs a bit across compiler versions.
|
||||
- Using deprecated APIs is discouraged.
|
||||
|
||||
## Coding style
|
||||
# Copyright Headers and AUTHORS
|
||||
If you have contributed to a part of a source file (a chunk of code that's written by you),
|
||||
you should add yourself to the copyright header in that file.
|
||||
If you have contributed significantly
|
||||
(a feature, a contribution you can "name", e.g. "Added audio driver foo"), you should add yourself to AUTHORS file.
|
||||
We'd like your full name and email, and which features you have been part of.
|
||||
|
||||
We highly value a consistent code style throughout the entire code base, please make sure you look
|
||||
through the existing code to get a feel for the coding style. When submitting a pull request, it may
|
||||
be asked to fix any coding style issues before submission. In other cases, there may be a follow-up
|
||||
pull request making the code style consistent.
|
||||
# IRC
|
||||
Active development happens on IRC. (#retroarch @ irc.freenode.org)
|
||||
We value discussing things in "real-time".
|
||||
|
||||
For full guidelines please see the [Coding Standards](https://docs.libretro.com/development/coding-standards/).
|
||||
|
||||
Some non-obvious things to be aware of:
|
||||
|
||||
- Code should be both C89 and ISO C++ compatible. This is a requirement for XBox 360 and MSVC to
|
||||
properly build. Think of it as a C++ compatible subset of C99.
|
||||
- There must be no warnings in your code (enabled by `-Wall` for GCC compilers), do also note that
|
||||
different compilers may produce different warnings.
|
||||
- Avoid using deprecated APIs, these will be removed in the future at some point.
|
||||
|
||||
## Copyright Headers and AUTHORS
|
||||
|
||||
If you have contributed a chunk of source code that is written to you, you should add yourself to
|
||||
the copyright header in the file. If you have made a significant contribution you should add
|
||||
yourself to the `AUTHORS` file, adding your full name, e-mail, and the feature you worked on.
|
||||
|
||||
## Commit Access
|
||||
|
||||
Contributors who show a good track record of pull requests over time may eventually
|
||||
get commit access to the repository. This may happen when looking through pull requests
|
||||
over long amounts of time becomes a burden.
|
||||
# Commit Access
|
||||
Contributors who show a track record of making good pull requests over time will eventually get commit access to the repo.
|
||||
This typically happens when the "overhead" of looking through pull requests over time becomes a burden.
|
||||
@@ -22,7 +22,7 @@ endif
|
||||
|
||||
OBJ :=
|
||||
LIBS :=
|
||||
DEF_FLAGS := -I.
|
||||
DEF_FLAGS :=
|
||||
ASFLAGS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
@@ -110,7 +110,7 @@ endif
|
||||
|
||||
ifneq ($(CXX_BUILD), 1)
|
||||
ifneq ($(C89_BUILD),)
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long -Werror=declaration-after-statement
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long
|
||||
else ifeq ($(HAVE_C99), 1)
|
||||
CFLAGS += $(C99_CFLAGS)
|
||||
endif
|
||||
@@ -118,7 +118,7 @@ ifneq ($(CXX_BUILD), 1)
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
endif
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS) -Ideps -Ideps/stb
|
||||
DEF_FLAGS += $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
|
||||
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS) -D__STDC_CONSTANT_MACROS
|
||||
@@ -215,6 +215,13 @@ $(OBJDIR)/%.o: %.m
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S config.h config.mk $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
@@ -226,17 +233,16 @@ $(OBJDIR)/%.o: %.rc $(HEADERS)
|
||||
$(Q)$(WINDRES) -o $@ $<
|
||||
|
||||
install: $(TARGET)
|
||||
rm -f $(OBJDIR)/git_version.o
|
||||
mkdir -p $(DESTDIR)$(BIN_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/applications 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/metainfo 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DOC_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(MAN_DIR)/man6 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps 2>/dev/null || /bin/true
|
||||
cp $(TARGET) $(DESTDIR)$(BIN_DIR)
|
||||
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
|
||||
cp com.libretro.RetroArch.appdata.xml $(DESTDIR)$(DATA_DIR)/metainfo
|
||||
cp retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
@@ -247,7 +253,6 @@ install: $(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
@@ -272,7 +277,6 @@ uninstall:
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING.assets
|
||||
|
||||
+277
-648
File diff suppressed because it is too large.
Load diff
+15
-66
@@ -2,15 +2,12 @@ TARGET := retroarch_3ds
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
GRIFFIN_BUILD = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
LIBCTRU_NO_DEPRECATION = 1
|
||||
USE_CTRULIB_2 ?= 0
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
@@ -38,7 +35,8 @@ OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
APP_USE_SVCHAX = 1
|
||||
@@ -53,17 +51,8 @@ DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES
|
||||
#DEFINES += -DHAVE_UPDATE_ASSETS
|
||||
DEFINES += -DHAVE_PATCH -DHAVE_RWAV
|
||||
DEFINES += -DHAVE_SCREENSHOTS
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_THREADS
|
||||
DEFINES += -DHAVE_GFX_WIDGETS
|
||||
DEFINES += -DHAVE_OVERLAY
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
#DEFINES += -DHAVE_SOCKET_LEGACY
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
#DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
else
|
||||
@@ -83,18 +72,12 @@ else
|
||||
HAVE_XMB = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
#HAVE_NETWORKING = 1
|
||||
#HAVE_CHEEVOS = 1
|
||||
#HAVE_SOCKET_LEGACY = 1
|
||||
HAVE_THREADS = 1
|
||||
#HAVE_THREADS = 1
|
||||
#HAVE_SSL = 1
|
||||
#HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
@@ -107,44 +90,18 @@ endif
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
endif
|
||||
ifeq ($(strip $(DEVKITARM)),)
|
||||
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitarm")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -DUSE_CTRULIB_2
|
||||
endif
|
||||
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
CFLAGS += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITTOOLS)),)
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
DEVKITTOOLS = $(DEVKITPRO)/tools
|
||||
else
|
||||
DEVKITTOOLS = $(DEVKITARM)
|
||||
endif
|
||||
endif
|
||||
|
||||
APP_TITLE := $(shell echo "$(APP_TITLE)" | cut -c1-128)
|
||||
APP_DESCRIPTION := $(shell echo "$(APP_DESCRIPTION)" | cut -c1-256)
|
||||
APP_AUTHOR := $(shell echo "$(APP_AUTHOR)" | cut -c1-128)
|
||||
APP_PRODUCT_CODE := $(shell echo $(APP_PRODUCT_CODE) | cut -c1-16)
|
||||
APP_UNIQUE_ID := $(shell echo $(APP_UNIQUE_ID) | cut -c1-7)
|
||||
|
||||
APP_VERSION_MAJOR := $(shell shuf -i 0-63 -n 1)
|
||||
APP_VERSION_MINOR := $(shell shuf -i 0-63 -n 1)
|
||||
APP_VERSION_MICRO := $(shell shuf -i 0-15 -n 1)
|
||||
|
||||
MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARGET).icn -banner $(TARGET).bnr \
|
||||
-DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID=$(APP_UNIQUE_ID) \
|
||||
-DAPP_SYSTEM_MODE=$(APP_SYSTEM_MODE) -DAPP_SYSTEM_MODE_EXT=$(APP_SYSTEM_MODE_EXT) \
|
||||
-major "$(APP_VERSION_MAJOR)" -minor "$(APP_VERSION_MINOR)" -micro "$(APP_VERSION_MICRO)"
|
||||
MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARGET).icn -banner $(TARGET).bnr -DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID=$(APP_UNIQUE_ID) -DAPP_SYSTEM_MODE=$(APP_SYSTEM_MODE) -DAPP_SYSTEM_MODE_EXT=$(APP_SYSTEM_MODE_EXT)
|
||||
|
||||
INCDIRS := -I$(CTRULIB)/include
|
||||
LIBDIRS := -L. -L$(CTRULIB)/lib
|
||||
@@ -165,10 +122,6 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
endif
|
||||
|
||||
ifeq ($(LIBCTRU_NO_DEPRECATION), 1)
|
||||
CFLAGS += -DLIBCTRU_NO_DEPRECATION
|
||||
endif
|
||||
@@ -182,15 +135,11 @@ CFLAGS += -I. \
|
||||
-Ideps \
|
||||
-Ideps/7zip \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib
|
||||
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_DSP_FILTER
|
||||
CFLAGS += -DHAVE_VIDEO_FILTER
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
CFLAGS += -DHAVE_CHEATS
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
@@ -263,13 +212,13 @@ else
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -289,8 +238,8 @@ endif
|
||||
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(TARGET).elf $(APP_ICON)
|
||||
$(DEVKITTOOLS)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
@@ -298,16 +247,16 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
$(DEVKITTOOLS)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
$(NM) -CSn $@ > $(notdir $*.lst)
|
||||
|
||||
$(TARGET).bnr: $(TARGET).elf $(APP_BANNER) $(APP_AUDIO)
|
||||
$(TARGET).bnr: $(APP_BANNER) $(APP_AUDIO)
|
||||
$(BANNERTOOL) makebanner -i "$(APP_BANNER)" -a "$(APP_AUDIO)" -o $@
|
||||
|
||||
$(TARGET).icn: $(TARGET).elf $(APP_ICON)
|
||||
$(TARGET).icn: $(APP_ICON)
|
||||
$(BANNERTOOL) makesmdh -s "$(APP_TITLE)" -l "$(APP_TITLE)" -p "$(APP_AUTHOR)" -i $(APP_ICON) -o $@
|
||||
|
||||
$(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
|
||||
+10
-27
@@ -2,11 +2,9 @@ TARGET := retroarch_3ds_salamander
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
USE_CTRULIB_2 ?= 0
|
||||
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
@@ -39,32 +37,21 @@ OBJ := ctr/ctr_system.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -DUSE_CTRULIB_2
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITTOOLS)),)
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
DEVKITTOOLS = $(DEVKITPRO)/tools
|
||||
else
|
||||
DEVKITTOOLS = $(DEVKITARM)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
endif
|
||||
@@ -96,10 +83,6 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ideps/7zip -Ideps/stb -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
|
||||
#CFLAGS += -DRARCH_INTERNAL
|
||||
@@ -170,13 +153,13 @@ else
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -197,7 +180,7 @@ endif
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITTOOLS)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
@@ -205,7 +188,7 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
$(DEVKITTOOLS)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
+27
-60
@@ -1,47 +1,13 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/gcw0-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
CC = /opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
CXX = /opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 1
|
||||
# this freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
@@ -49,7 +15,7 @@ HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
@@ -87,7 +53,7 @@ HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_TRANSLATE = 1
|
||||
@@ -96,10 +62,6 @@ HAVE_VIDEO_LAYOUT = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
@@ -107,9 +69,7 @@ OPK_NAME = retroarch.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -ffast-math -fomit-frame-pointer -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
@@ -117,9 +77,9 @@ LIBS := -ldl -lz -lrt -lcrypto -lssl -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -flto -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
LDFLAGS := -flto
|
||||
INCLUDE_DIRS = -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
LIBRARY_DIRS = -L/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1 -DHAVE_OPENDINGUX_FBDEV=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
@@ -128,10 +88,10 @@ DEFINES += -DHAVE_ONLINE_UPDATER=1
|
||||
DEFINES += -DHAVE_UPDATE_ASSETS=1
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
SDL_DINGUX_CFLAGS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --libs)
|
||||
FREETYPE_CFLAGS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config --cflags)
|
||||
FREETYPE_LIBS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config --libs)
|
||||
AL_LIBS := -lopenal
|
||||
OPENGLES_CFLAGS := -DMESA_EGL_NO_X11_HEADERS
|
||||
OPENGLES_LIBS := -lGLESv2 -lEGL
|
||||
@@ -161,8 +121,8 @@ RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Name=retroarch
|
||||
Comment=Retroarch
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
@@ -181,27 +141,34 @@ SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
@@ -213,7 +180,7 @@ opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.gcw0.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
mksquashfs retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.gcw0.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
+1
-25
@@ -1,10 +1,4 @@
|
||||
ifeq ($(TARGET),)
|
||||
ifeq ($(LIBRETRO),)
|
||||
TARGET := retroarch.js
|
||||
else
|
||||
TARGET := $(LIBRETRO)_libretro.js
|
||||
endif
|
||||
endif
|
||||
|
||||
EOPT = USE_ZLIB=1 # Emscripten specific options
|
||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||
@@ -15,12 +9,8 @@ OBJ :=
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_GLSL = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
@@ -40,22 +30,8 @@ HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_7ZIP = 1
|
||||
|
||||
ASYNC ?= 0
|
||||
ifeq ($(LIBRETRO), mupen64plus)
|
||||
ASYNC = 1
|
||||
endif
|
||||
|
||||
LTO ?= 0
|
||||
ifeq ($(LIBRETRO), tyrquake)
|
||||
LTO = 0
|
||||
endif
|
||||
|
||||
MEMORY ?= 134217728
|
||||
MEMORY = 134217728
|
||||
|
||||
PRECISE_F32 = 1
|
||||
|
||||
|
||||
+29
-227
@@ -66,6 +66,7 @@ SHADER_CG_DIR := media/shaders_cg
|
||||
OVERLAY_DIR := media/overlays
|
||||
SHADER_GLSL_DIR := media/shaders_glsl
|
||||
|
||||
PYTHON2 := python2$(EXE_EXT)
|
||||
PYTHON3 := python3$(EXE_EXT)
|
||||
GIT := git$(EXE_EXT)
|
||||
|
||||
@@ -115,26 +116,19 @@ else ifeq ($(platform), ps3-cobra)
|
||||
|
||||
# NGC/Wii - libogc
|
||||
else ifeq ($(libogc_platform), 1)
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
EXTERNAL_LIBOGC=0
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
EXT_TARGET := $(TARGET_NAME)_$(platform).dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
|
||||
INCLUDE += -I.
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Iwii/libogc/include
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
@@ -145,7 +139,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LIBDIRS += -Lwii/libogc/libs/cube
|
||||
@@ -155,11 +148,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
MACHDEP := -DHW_DOL -mogc
|
||||
else ifeq ($(platform), wii)
|
||||
@@ -167,7 +155,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
endif
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float -DMSB_FIRST
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
||||
@@ -203,9 +191,8 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -217,17 +204,11 @@ else ifeq ($(libogc_platform), 1)
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(platform), wii)
|
||||
HAVE_AUDIOMIXER := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
@@ -263,9 +244,7 @@ else ifeq ($(platform), xenon360)
|
||||
HAVE_THREADS := 1
|
||||
HAVE_GETOPT_LONG := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
# PSP
|
||||
else ifeq ($(platform), psp1)
|
||||
@@ -290,10 +269,7 @@ else ifeq ($(platform), psp1)
|
||||
HAVE_KERNEL_PRX := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
ifeq ($(BUILD_PRX), 1)
|
||||
LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
|
||||
@@ -333,8 +309,6 @@ else ifeq ($(platform), vita)
|
||||
LIBDIRS += -L.
|
||||
LDFLAGS += -Wl,-q
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -353,10 +327,7 @@ else ifeq ($(platform), vita)
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
@@ -380,10 +351,7 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -427,11 +395,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -440,7 +404,6 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
|
||||
PLATCFLAGS += -DHAVE_GFX_WIDGETS
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
|
||||
@@ -459,7 +422,6 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
endif
|
||||
else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_GDI := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -473,7 +435,6 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
@@ -483,18 +444,8 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -502,32 +453,16 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_OZONE -DHAVE_GFX_WIDGETS -DHAVE_CC_RESAMPLER
|
||||
PLATCFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_CDROM
|
||||
PLATCFLAGS += -bigobj
|
||||
|
||||
LDFLAGS += -MANIFEST shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib")
|
||||
|
||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3" -v "Install Dir" | grep -o '[A-Z]:\\.*')
|
||||
|
||||
WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include")
|
||||
WindowsSDKAtlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\atl")
|
||||
WindowsSDKCrtIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\crt")
|
||||
WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl")
|
||||
WindowsSDKMfcIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\mfc")
|
||||
WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib")
|
||||
|
||||
INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKAtlIncludeDir);$(WindowsSDKCrtIncludeDir);$(WindowsSDKGlIncludeDir);$(WindowsSDKMfcIncludeDir);libretro/msvc/msvc-2005
|
||||
LIB := $(LIB);$(WindowsSDKLibDir)
|
||||
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D8
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(INETSDK)\Lib;$(DXSDK_DIR)\Lib\x86
|
||||
@@ -537,11 +472,7 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -555,7 +486,6 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
@@ -567,16 +497,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -585,14 +506,8 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS
|
||||
PLATCFLAGS += -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA
|
||||
PLATCFLAGS += -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_OZONE
|
||||
PLATCFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
PLATCFLAGS += -DHAVE_GFX_WIDGETS
|
||||
PLATCFLAGS += -bigobj
|
||||
|
||||
LDFLAGS += -MANIFEST shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib msimg32.lib
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib msimg32.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2010_,,$(platform))
|
||||
|
||||
@@ -617,12 +532,12 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/include")
|
||||
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir := $(WindowsSdkDir:\=)
|
||||
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D8 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D9 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib);$(DXSDK_DIR)\Lib\$(WinArch)
|
||||
@@ -632,10 +547,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -660,10 +572,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -717,10 +626,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -745,10 +651,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -802,10 +705,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -830,10 +730,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -902,10 +799,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
export LIB := $(LIB)
|
||||
endif
|
||||
else ifeq (qnx,$(platform))
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -929,11 +823,7 @@ else ifeq (qnx,$(platform))
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 0
|
||||
WANT_GLSLANG := 0
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
HAVE_CONFIGFILE := 1
|
||||
CC=qcc -Vgcc_ntoarmv7le
|
||||
CXX=QCC -Vgcc_ntoarmv7le
|
||||
|
||||
@@ -941,16 +831,13 @@ else ifeq (qnx,$(platform))
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DHAVE_BSV_MOVIE -DRARCH_MOBILE
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DRARCH_MOBILE
|
||||
EXT_TARGET := $(TARGET_NAME)
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
LIBS += -lEGL -lbps -lscreen -lsocket -lm -lGLESv2 -lOpenAL
|
||||
else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -974,58 +861,13 @@ else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
WANT_GLSLANG := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_BSV_MOVIE -DHAVE_PULSE
|
||||
PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_PULSE
|
||||
EXT_TARGET := $(TARGET_NAME)
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
LIBS += -ldl -lm -lpthread -lGL -ludev -lpulse -lX11 -lX11-xcb -lXxf86vm
|
||||
else ifeq (dos,$(platform))
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_NETWORK_CMD := 0
|
||||
HAVE_NETPLAYDISCOVERY := 0
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_XMB := 0
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 0
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
HAVE_STDIN_CMD := 1
|
||||
HAVE_CMD := 1
|
||||
HAVE_DYLIB := 0
|
||||
HAVE_DYNAMIC := 0
|
||||
HAVE_GRIFFIN_CPP := 0
|
||||
WANT_GLSLANG := 0
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 0
|
||||
HAVE_CHEATS := 0
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
CC=i586-pc-msdosdjgpp-gcc
|
||||
CXX=i586-pc-msdosdjgpp-g++
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_CC_RESAMPLER -DRC_DISABLE_LUA -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DRARCH_INTERNAL -DHAVE_XCB
|
||||
TARGET_NAME := retrodos
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
LIBS += -lm
|
||||
LIBDIRS += -L.
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
@@ -1113,34 +955,18 @@ ifeq ($(HAVE_IMAGEVIEWER), 1)
|
||||
CFLAGS += -DHAVE_IMAGEVIEWER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_BSV_MOVIE), 1)
|
||||
CFLAGS += -DHAVE_BSV_MOVIE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
CFLAGS += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
CFLAGS += -DHAVE_7ZIP -D_7ZIP_ST
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SCREENSHOTS), 1)
|
||||
CFLAGS += -DHAVE_SCREENSHOTS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_REWIND), 1)
|
||||
CFLAGS += -DHAVE_REWIND
|
||||
CFLAGS += -DHAVE_7ZIP
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_AUDIOMIXER), 1)
|
||||
CFLAGS += -DHAVE_AUDIOMIXER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RWAV), 1)
|
||||
CFLAGS += -DHAVE_RWAV
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OVERLAY), 1)
|
||||
CFLAGS += -DHAVE_OVERLAY
|
||||
endif
|
||||
@@ -1161,10 +987,6 @@ ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORE_INFO_CACHE), 1)
|
||||
CFLAGS += -DHAVE_CORE_INFO_CACHE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
@@ -1191,22 +1013,10 @@ ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
CFLAGS += -DHAVE_LANGEXTRA
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DSP_FILTER), 1)
|
||||
CFLAGS += -DHAVE_DSP_FILTER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VIDEO_FILTER), 1)
|
||||
CFLAGS += -DHAVE_VIDEO_FILTER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WINDOW_OFFSET), 1)
|
||||
CFLAGS += -DHAVE_WINDOW_OFFSET
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
CFLAGS += -DHAVE_THREADS
|
||||
|
||||
@@ -1223,14 +1033,6 @@ ifeq ($(HAVE_CONFIGFILE), 1)
|
||||
CFLAGS += -DHAVE_CONFIGFILE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PATCH), 1)
|
||||
CFLAGS += -DHAVE_PATCH
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CHEATS), 1)
|
||||
CFLAGS += -DHAVE_CHEATS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
+2
-15
@@ -23,8 +23,6 @@ DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSO
|
||||
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_TRANSLATE = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
@@ -32,19 +30,13 @@ HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
@@ -52,8 +44,6 @@ HAVE_STB_FONT = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_CHD = 0 # disabled due to static libretro-common and libchdr conflicts between different cores
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
# RetroArch libnx useful flags
|
||||
HAVE_THREADS = 1
|
||||
@@ -80,6 +70,7 @@ else
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -125,15 +116,11 @@ APP_ICON := pkg/libnx/retroarch.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -mcpu=cortex-a57+crc+fp+simd
|
||||
|
||||
CFLAGS := -g -Wall -O3 -fcommon -ffast-math -ffunction-sections \
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS) -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h #$(shell $(PORTLIBS)/bin/freetype-config --cflags)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
endif
|
||||
|
||||
-209
@@ -1,209 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/miyoo
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/freetype-config
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
MIYOO = 1
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 0
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_STB_VORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
#HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=armv5te -mtune=arm926ej-s -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DMIYOO=1 -DDINGUX -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lz -lrt -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded $(TARGET)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+3
-9
@@ -11,10 +11,6 @@ WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
|
||||
WindowsSDKVersion := 10.0.14393.0\$(NOTHING)
|
||||
VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING)
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_D3DX := 1
|
||||
HAVE_D3D8 := 0
|
||||
@@ -36,7 +32,6 @@ HAVE_WINMM := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -65,9 +60,6 @@ HAVE_LANGEXTRA := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
HAVE_BSV_MOVIE := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
D3D8_LIBS := -ld3d8
|
||||
@@ -200,9 +192,11 @@ else
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_DYNAMIC -DJSON_STATIC
|
||||
DEFINES += -DRARCH_INTERNAL -DHAVE_DYNAMIC -DJSON_STATIC
|
||||
INCLUDE_DIRS += -I. -Igfx/include
|
||||
|
||||
#OBJ := version_git.o
|
||||
|
||||
OBJ := $(patsubst %rarch.o,%rarch.res,$(OBJ))
|
||||
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
OBJ := $(OBJ:.o=.obj)
|
||||
|
||||
-263
@@ -1,263 +0,0 @@
|
||||
ROOT_DIR := .
|
||||
DEPS_DIR := $(ROOT_DIR)/deps
|
||||
DEBUG ?= 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BIG_STACK = 1
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
RARCH_CONSOLE = 0
|
||||
USBGECKO = 0
|
||||
|
||||
SPACE :=
|
||||
SPACE := $(SPACE) $(SPACE)
|
||||
BACKSLASH :=
|
||||
BACKSLASH := \$(BACKSLASH)
|
||||
filter_out1 = $(filter-out $(firstword $1),$1)
|
||||
filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -s),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -s)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
TARGET_NAME := retroarch
|
||||
|
||||
INCLUDE :=
|
||||
LDFLAGS :=
|
||||
LIBDIRS :=
|
||||
|
||||
ifeq ($(LIBRETRO), nxengine)
|
||||
WHOLE_ARCHIVE_LINK = 1
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_ngc $(WHOLE_END)
|
||||
|
||||
libogc_platform := 1
|
||||
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
EXT_TARGET := $(TARGET_NAME)_ngc.dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_ngc.elf
|
||||
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
|
||||
INCLUDE += -I.
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
LIBDIRS += -Lwii/libogc/libs/cube
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
MACHDEP := -DHW_DOL -mogc
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
LDFLAGS += -T bootstrap/gx/ogc.ld
|
||||
endif
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
LIBS += -lbba
|
||||
endif
|
||||
|
||||
LIBS += -logc
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_IBXM := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_STATIC_AUDIO_FILTERS := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS := 1
|
||||
HAVE_XMB := 0
|
||||
HAVE_OZONE := 0
|
||||
HAVE_RGUI := 1
|
||||
HAVE_MATERIALUI := 0
|
||||
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps \
|
||||
-Ideps/stb
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
|
||||
OBJ = $(PLATOBJS) audio/drivers/gx_audio.o gfx/drivers/gx_gfx.o input/drivers/gx_input.o frontend/drivers/platform_gx.o input/drivers_joypad/gx_joypad.o
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 0)
|
||||
OBJ += wii/libogc/libfat/libfat.o wii/libogc/libfat/fatfile.o wii/libogc/libfat/file_allocation_table.o wii/libogc/libfat/cache.o wii/libogc/libfat/fatdir.o wii/libogc/libfat/partition.o wii/libogc/libfat/directory.o wii/libogc/libfat/filetime.o wii/libogc/libfat/disc.o
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += $(DEFINES)
|
||||
|
||||
ifeq ($(WANT_GLSLANG), 1)
|
||||
OBJ += griffin/griffin_glslang.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WIIUSB_HID), 1)
|
||||
CFLAGS += -DHAVE_WIIUSB_HID -DHAVE_HID
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK),1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RARCH_EXEC), 1)
|
||||
CFLAGS += -DHAVE_RARCH_EXEC
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
CFLAGS += -DHAVE_ZLIB
|
||||
CFLAGS += -I./libretro-common/include/compat/zlib
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RWAV), 1)
|
||||
CFLAGS += -DHAVE_RWAV
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
|
||||
CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_CMD), 1)
|
||||
CFLAGS += -DHAVE_NETWORK_CMD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DYNAMIC), 1)
|
||||
CFLAGS += -DHAVE_DYNAMIC
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
LINK = $(CXX)
|
||||
|
||||
all: $(EXT_TARGET)
|
||||
|
||||
%.dol: %.elf
|
||||
$(ELF2DOL) $< $@
|
||||
|
||||
$(EXT_INTER_TARGET): $(OBJ)
|
||||
$(LINK) $(LINKOUT)$@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.binobj: %.bin
|
||||
$(LD) -r -b binary $(OBJOUT)$@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(EXT_TARGET)
|
||||
rm -f $(EXT_INTER_TARGET)
|
||||
rm -f $(OBJ)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+12
-35
@@ -1,46 +1,23 @@
|
||||
include version.all
|
||||
|
||||
DEBUG = 0
|
||||
DEBUG = 0
|
||||
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
|
||||
TARGET := retroarch-pandora
|
||||
TARGET := retroarch-pandora
|
||||
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99
|
||||
DEFINES += -DHAVE_THREADS \
|
||||
-DHAVE_GETOPT_LONG=1 \
|
||||
-DHAVE_GRIFFIN \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-D__ARM_ARCH_6__ \
|
||||
-DHAVE_OPENGL \
|
||||
-DHAVE_OPENGLES \
|
||||
-DHAVE_OPENGLES2 \
|
||||
-DHAVE_GLSL \
|
||||
-DHAVE_DYNAMIC \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_OVERLAY \
|
||||
-DHAVE_VIDEO_LAYOUT \
|
||||
-DHAVE_ALSA \
|
||||
-DHAVE_ZLIB \
|
||||
-D__linux__ \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-D__OPENPANDORA__ \
|
||||
-DPANDORA
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
|
||||
DEFINES += -DHAVE_CONFIGFILE -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += $(INCDIRS)
|
||||
DEFINES += -D__OPENPANDORA__ -DPANDORA
|
||||
DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
+1
-10
@@ -16,17 +16,13 @@ DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SCREENSHOTS -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
else
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 0
|
||||
HAVE_RPNG := 1
|
||||
@@ -46,10 +42,6 @@ else
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_RGUI := 0
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_XMB := 1
|
||||
@@ -60,7 +52,6 @@ else
|
||||
RARCH_CONSOLE := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ pnd: retroarch.pnd
|
||||
install: all $(BINDIR)/retroarch-joyconfig $(BINDIR)/retroarch-zip $(PNDDIR)/readme.html
|
||||
|
||||
retroarch:
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-pulse --disable-jack --enable-opengles
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-python --disable-libpng --disable-pulse --disable-jack --enable-gles --enable-xml
|
||||
make -f Makefile
|
||||
|
||||
$(BINDIR)/retroarch: retroarch
|
||||
|
||||
+67
-89
@@ -1,110 +1,84 @@
|
||||
TARGET := retroarch_ps2
|
||||
TARGET_RELEASE = retroarchps2.elf
|
||||
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
SCREEN_DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
BIG_STACK = 0
|
||||
MUTE_WARNINGS = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
PS2_IP = 192.168.1.10
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = retroarchps2.elf
|
||||
TARGET_RELEASE = retroarchps2-release.elf
|
||||
|
||||
# Lib CDVD
|
||||
CDVD_DIR = ps2/libcdvd
|
||||
|
||||
# Compile the IRXs first
|
||||
IRX_DIR = ps2/irx
|
||||
IRX_FILES = $(wildcard ps2/irx/*.c)
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
DEFINES += -DDEBUG
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
# LDFLAGS := -s
|
||||
OPTIMIZE_LV := -O2
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation
|
||||
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIBS += -lretro_ps2
|
||||
endif
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include -I$(CDVD_DIR)/ee
|
||||
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
INCDIR += -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
||||
GPVAL = -G0
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
ifeq ($(SCREEN_DEBUG), 1)
|
||||
LIBS += -ldebug
|
||||
RARCH_DEFINES += -DSCREEN_DEBUG
|
||||
endif
|
||||
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG
|
||||
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(CDVD_DIR)/lib -L.
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio -lz
|
||||
LIBS += -lcdvdfs -lpatches -lpoweroff
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_CC_RESAMPLER -DHAVE_AUDIOMIXER
|
||||
DEFINES += -DHAVE_VIDEO_FILTER -DHAVE_RGUI -DHAVE_WINDOW_OFFSET
|
||||
DEFINES += -DHAVE_DSP_FILTER
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_NO_BUILTINZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_WINDOW_OFFSET = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PS2SDK)),)
|
||||
$(error "Please set PS2SDK in your environment. export PS2SDK=<path to>ps2sdk")
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
||||
INCDIR += -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
||||
# Lib cdvd is needed to get proper time
|
||||
LIBS += -lpatches -lgskit -ldmakit -laudsrv -lmtap -lpadx -lz -lcdvd -lelf-loader -lfileXio -lpoweroff
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) $(DEFINES) -DPS2 -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
# IRX libs
|
||||
IRX_FILES += sio2man.irx iomanX.irx fileXio.irx
|
||||
IRX_FILES += mcman.irx mcserv.irx
|
||||
IRX_FILES += usbd.irx bdm.irx bdmfs_vfat.irx usbmass_bd.irx
|
||||
IRX_FILES += libsd.irx audsrv.irx
|
||||
IRX_FILES += cdfs.irx
|
||||
IRX_FILES += ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx poweroff.irx
|
||||
IRX_FILES += mtapman.irx padman.irx
|
||||
EE_OBJS += $(IRX_FILES:.irx=_irx.o)
|
||||
# All the IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/freemtap_irx.o $(IRX_DIR)/freepad_irx.o $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/audsrv_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdvd_irx.o
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
EE_OBJS += ps2/compat_files/ps2_devices.o
|
||||
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o ps2/compat_files/ps2_devices.o
|
||||
EE_OBJS += ps2/compat_files/fileXio_cdvd.o ps2/compat_files/ps2_descriptor.o
|
||||
|
||||
EE_OBJS += $(OBJ)
|
||||
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
|
||||
EE_OBJS += griffin/griffin.o
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
EE_CXXFLAGS = $(CFLAGS)
|
||||
@@ -112,14 +86,18 @@ EE_LDFLAGS = $(LDFLAGS)
|
||||
EE_LIBS = $(LIBS)
|
||||
EE_ASFLAGS = $(ASFLAGS)
|
||||
EE_INCS = $(INCDIR)
|
||||
EE_BIN = $(TARGET).elf
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
|
||||
all: $(EE_BIN)
|
||||
all: irxdir $(EE_BIN)
|
||||
|
||||
irxdir:
|
||||
$(MAKE) -C $(IRX_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
$(MAKE) -C $(IRX_DIR) clean
|
||||
|
||||
prepare:
|
||||
ps2client -h $(PS2_IP) reset
|
||||
@@ -128,18 +106,18 @@ prepare:
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
sim:
|
||||
PCSX2 --elf=$(PWD)/$(EE_BIN) --nogui
|
||||
debug: clean prepare all run
|
||||
|
||||
debug: clean all run
|
||||
|
||||
release: all
|
||||
package:
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
# IRX files
|
||||
%_irx.c:
|
||||
$(PS2SDK)/bin/bin2c $(PS2SDK)/iop/irx/$*.irx $@ $*_irx
|
||||
release: clean all package
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
|
||||
#Linking with C++
|
||||
$(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
|
||||
$(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \
|
||||
-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
@@ -1,101 +0,0 @@
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
SCREEN_DEBUG = 0
|
||||
MUTE_WARNINGS = 1
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = raboot-debug.elf
|
||||
TARGET_RELEASE = raboot.elf
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation
|
||||
endif
|
||||
|
||||
INCDIR = -Ilibretro-common/include
|
||||
INCDIR += -Ips2/include
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lelf-loader -lpatches -lfileXio -lpoweroff
|
||||
|
||||
ifeq ($(SCREEN_DEBUG), 1)
|
||||
LIBS += -ldebug
|
||||
RARCH_DEFINES += -DSCREEN_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
EE_OBJS = frontend/frontend_salamander.o \
|
||||
frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_ps2.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o \
|
||||
ps2/compat_files/ps2_devices.o
|
||||
|
||||
# IRX libs
|
||||
IRX_FILES += sio2man.irx iomanX.irx fileXio.irx
|
||||
IRX_FILES += mcman.irx mcserv.irx
|
||||
IRX_FILES += usbd.irx bdm.irx bdmfs_vfat.irx usbmass_bd.irx
|
||||
IRX_FILES += cdfs.irx
|
||||
IRX_FILES += ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx poweroff.irx
|
||||
EE_OBJS += $(IRX_FILES:.irx=_irx.o)
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
EE_CXXFLAGS = $(CFLAGS)
|
||||
EE_LDFLAGS = $(LDFLAGS)
|
||||
EE_LIBS = $(LIBS)
|
||||
EE_ASFLAGS = $(ASFLAGS)
|
||||
EE_INCS = $(INCDIR)
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
all: $(EE_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
|
||||
debug: clean all run
|
||||
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
release: all
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
# IRX files
|
||||
%_irx.c:
|
||||
$(PS2SDK)/bin/bin2c $(PS2SDK)/iop/irx/$*.irx $@ $*_irx
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = opt
|
||||
|
||||
ASSETS_DIR := media/assets
|
||||
|
||||
# options
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
DEBUG = 0
|
||||
HAVE_GCMGL = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
CONTENT_ID = SSNE10000
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
PPU_TARGET = retroarch_ps3.elf
|
||||
SALAMANDER_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. \
|
||||
-Idefines \
|
||||
-Ideps \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
||||
ifeq ($(shell uname), Linux)
|
||||
PKG_FINALIZE = package_finalize
|
||||
MAKE_SELF_WC = make_self_wc
|
||||
MAKE_SELF = make_self_npdrm
|
||||
PYTHON2 = python2
|
||||
GIT = git
|
||||
else
|
||||
PKG_FINALIZE = package_finalize.exe
|
||||
MAKE_SELF_WC = make_self_wc.exe
|
||||
MAKE_SELF = make_self_npdrm.exe
|
||||
PYTHON2 = python2.exe
|
||||
GIT = git.exe
|
||||
endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
DEFINES += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_GFX_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_OZONE -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
|
||||
DEFINES += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
DEFINES += -DHAVE_GCMGL
|
||||
GL_LIBS := -L. -lrgl_ps3
|
||||
else
|
||||
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FREETYPE), 1)
|
||||
DEFINES += -DHAVE_FREETYPE
|
||||
FONT_LIBS := -lfontFT_stub -lfreetype_stub
|
||||
endif
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else ifneq ($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl, --whole-archive
|
||||
WHOLE_END := -Wl, --no-whole-archive
|
||||
endif
|
||||
|
||||
PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -lcgc -lgcm_cmdasm -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA
|
||||
|
||||
#DEFINES += -DHAVE_IMAGEVIEWER
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O2 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
|
||||
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
|
||||
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
|
||||
|
||||
EBOOT_EXISTS = 1
|
||||
CORE_EXISTS = 1
|
||||
|
||||
ifneq ($(strip $(EXIST_EBOOT_WILDCARD)),)
|
||||
EBOOT_EXISTS = 0
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(EXIST_CORE_WILDCARD)),)
|
||||
CORE_EXISTS = 0
|
||||
endif
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
||||
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
||||
|
||||
.PHONY: create-npdrm-core create-core create-npdrm-salamander create-shaders clean-selfs create-salamander
|
||||
|
||||
create-npdrm-core:
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-core:
|
||||
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
copy-media-files:
|
||||
@cp -r $(ASSETS_DIR)/glui pkg/ps3/USRDIR/cores/assets
|
||||
@cp -r $(ASSETS_DIR)/xmb pkg/ps3/USRDIR/cores/assets
|
||||
|
||||
create-shaders:
|
||||
make -f Makefile.griffin platform=ps3 shaders-deploy
|
||||
|
||||
pkg: $(PPU_TARGET) create-shaders copy-media-files create-npdrm-salamander create-npdrm-core
|
||||
$(MAKE_PACKAGE_NPDRM) pkg/ps3/package.conf pkg/ps3
|
||||
|
||||
pkg-signed: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-cfw: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
clean-selfs:
|
||||
ifeq ($(EBOOT_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(EBOOT_PATH)], skipping this step."
|
||||
else
|
||||
rm $(EBOOT_PATH)
|
||||
endif
|
||||
ifeq ($(CORE_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(CORE_PATH)], skipping this step."
|
||||
else
|
||||
rm $(CORE_PATH)
|
||||
endif
|
||||
@@ -0,0 +1,196 @@
|
||||
include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = ultra-opt
|
||||
|
||||
# options
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
DEBUG = 0
|
||||
HAVE_GCMGL = 1
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
CONTENT_ID = SSNE10000
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
PPU_TARGET = retroarch_ps3.elf
|
||||
SALAMANDER_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. -Idefines -Ideps -Ideps/stb
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
||||
ifeq ($(shell uname), Linux)
|
||||
PKG_FINALIZE = package_finalize
|
||||
MAKE_SELF_WC = make_self_wc
|
||||
MAKE_SELF = make_self_npdrm
|
||||
PYTHON2 = python2
|
||||
GIT = git
|
||||
else
|
||||
PKG_FINALIZE = package_finalize.exe
|
||||
MAKE_SELF_WC = make_self_wc.exe
|
||||
MAKE_SELF = make_self_npdrm.exe
|
||||
PYTHON2 = python2.exe
|
||||
GIT = git.exe
|
||||
endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_RGUI -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_MENU -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
DEFINES += -DHAVE_GCMGL
|
||||
GL_LIBS := -L. -lrgl_ps3
|
||||
else
|
||||
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FREETYPE), 1)
|
||||
DEFINES += -DHAVE_FREETYPE
|
||||
FONT_LIBS := -lfontFT_stub -lfreetype_stub
|
||||
endif
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else ifneq($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl, --whole-archive
|
||||
WHOLE_END := -Wl, --no-whole-archive
|
||||
endif
|
||||
|
||||
PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -lcgc -lgcm_cmdasm -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
#DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O3 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
|
||||
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
|
||||
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
|
||||
|
||||
EBOOT_EXISTS = 1
|
||||
CORE_EXISTS = 1
|
||||
|
||||
ifneq ($(strip $(EXIST_EBOOT_WILDCARD)),)
|
||||
EBOOT_EXISTS = 0
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(EXIST_CORE_WILDCARD)),)
|
||||
CORE_EXISTS = 0
|
||||
endif
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
||||
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
||||
|
||||
.PHONY: create-npdrm-core create-core create-npdrm-salamander create-shaders clean-selfs create-salamander
|
||||
|
||||
create-npdrm-core:
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-core:
|
||||
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
copy-media-files:
|
||||
@cp -r $(ASSETS_DIR)/glui pkg/ps3/USRDIR/cores/assets
|
||||
@cp -r $(ASSETS_DIR)/xmb pkg/ps3/USRDIR/cores/assets
|
||||
|
||||
create-shaders:
|
||||
make -f Makefile.shaders deploy-ps3
|
||||
|
||||
pkg: $(PPU_TARGET) create-shaders copy-media-files create-npdrm-salamander create-npdrm-core
|
||||
$(MAKE_PACKAGE_NPDRM) pkg/ps3/package.conf pkg/ps3
|
||||
|
||||
pkg-signed: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-cfw: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
clean-selfs:
|
||||
ifeq ($(EBOOT_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(EBOOT_PATH)], skipping this step."
|
||||
else
|
||||
rm $(EBOOT_PATH)
|
||||
endif
|
||||
ifeq ($(CORE_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(CORE_PATH)], skipping this step."
|
||||
else
|
||||
rm $(CORE_PATH)
|
||||
endif
|
||||
@@ -0,0 +1,91 @@
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_SDK ?= /usr/local/cell
|
||||
HAVE_LOGGER = 0
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
|
||||
|
||||
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
|
||||
PPU_SRCS = frontend/frontend_salamander.c \
|
||||
frontend/frontend_driver.c \
|
||||
frontend/drivers/platform_ps3.c \
|
||||
libretro-common/file/file_path.c \
|
||||
libretro-common/file/file_path_io.c \
|
||||
libretro-common/lists/dir_list.c \
|
||||
libretro-common/lists/string_list.c \
|
||||
libretro-common/file/retro_dirent.c \
|
||||
libretro-common/hash/rhash.c \
|
||||
libretro-common/string/stdstring.c \
|
||||
libretro-common/encodings/encoding_utf.c \
|
||||
libretro-common/compat/compat_strl.c \
|
||||
libretro-common/compat/compat_strcasestr.c \
|
||||
libretro-common/compat/fopen_utf8.c \
|
||||
libretro-common/streams/file_stream.c \
|
||||
libretro-common/vfs/vfs_implementation.c \
|
||||
libretro-common/file/config_file.c \
|
||||
file_path_str.c \
|
||||
verbosity.c
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
PPU_CFLAGS += -DHAVE_LOGGER
|
||||
PPU_SRCS += network/net_logger.c \
|
||||
libretro-common/net/net_compat.c \
|
||||
libretro-common/net/net_socket.c
|
||||
endif
|
||||
|
||||
PPU_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS),SNC)
|
||||
PPU_CFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else
|
||||
PPU_CFLAGS += -std=gnu99
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
endif
|
||||
|
||||
PPU_LDLIBS += -lm -lnet_stub -lnetctl_stub -lio_stub -lsysmodule_stub -lsysutil_stub -lsysutil_game_stub -lfs_stub -lsysutil_np_stub
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
+4
-31
@@ -27,13 +27,13 @@ ELF_TARGET := retroarch_psl1ght.elf
|
||||
SELF_TARGET := $(ELF_TARGET:.elf=.self)
|
||||
CORE_PATH = pkg/psl1ght/pkg/USRDIR/cores/CORE.SELF
|
||||
|
||||
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines
|
||||
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude
|
||||
LIBDIRS += -L.
|
||||
|
||||
MACHDEP := -D__PSL1GHT__ -D__PS3__ -mcpu=cell
|
||||
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell
|
||||
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP)
|
||||
LIBS := -lretro_psl1ght -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl -lsysfs
|
||||
LIBS := -lretro_psl1ght -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -66,34 +66,7 @@ endif
|
||||
SHARED_FLAGS :=
|
||||
|
||||
SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
SHARED_FLAGS += -DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DRARCH_CONSOLE \
|
||||
-DHAVE_OVERLAY \
|
||||
-DHAVE_HEADSET \
|
||||
-DHAVE_CG \
|
||||
-DHAVE_CG_RUNTIME_COMPILER \
|
||||
-DHAVE_SYSMODULES \
|
||||
-DHAVE_SYSUTILS \
|
||||
-DHAVE_RARCH_EXEC \
|
||||
-DHAVE_MOUSE \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_GRIFFIN=1 \
|
||||
-DHAVE_NETWORKING=1 \
|
||||
-DHAVE_SOCKET_LEGACY=1 \
|
||||
-DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" \
|
||||
-DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) \
|
||||
-Wno-char-subscripts \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-DHAVE_MULTIMAN \
|
||||
-DHAVE_RGUI \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DRARCH_INTERNAL -DHAVE_MULTIMAN -DHAVE_RGUI
|
||||
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
||||
CXXFLAGS += $(SHARED_FLAGS)
|
||||
|
||||
|
||||
@@ -27,14 +27,13 @@ ELF_TARGET := retroarch_psl1ght_salamander.elf
|
||||
ELF_TARGET_NONSTRIPPED := retroarch_psl1ght_salamander_nonstripped.elf
|
||||
EBOOT_PATH = pkg/psl1ght/pkg/USRDIR/EBOOT.BIN
|
||||
|
||||
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib \
|
||||
-Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines
|
||||
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude
|
||||
LIBDIRS += -L.
|
||||
|
||||
MACHDEP := -D__PS3__ -D__PSL1GHT__ -mcpu=cell -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections
|
||||
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections
|
||||
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP)
|
||||
LIBS := -lgcm_sys -lrsx -lsysutil -lio -lnet -lsysmodule -lrt -llv2 -lm -lsysfs
|
||||
LIBS := -lgcm_sys -lrsx -lsysutil -lio -lnet -lsysmodule -lrt -llv2 -lm
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -62,7 +61,7 @@ OBJ = frontend/frontend_salamander.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
@@ -71,8 +70,8 @@ OBJ = frontend/frontend_salamander.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
|
||||
+26
-52
@@ -1,11 +1,12 @@
|
||||
BUILD_PRX ?= 0
|
||||
PSP_LARGE_MEMORY ?= 1
|
||||
DEBUG ?= 0
|
||||
HAVE_KERNEL_PRX ?= 1
|
||||
HAVE_THREADS ?= 1
|
||||
BIG_STACK ?= 0
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
BUILD_PRX = 0
|
||||
PSP_LARGE_MEMORY = 1
|
||||
DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 1
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 1
|
||||
BIG_STACK = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
TARGET = retroarchpsp
|
||||
|
||||
@@ -15,52 +16,30 @@ else
|
||||
OPTIMIZE_LV := -O3
|
||||
endif
|
||||
|
||||
INCDIR = deps deps/stb deps/7zip libretro-common/include libretro-common/include/compat/zlib
|
||||
CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
INCDIR = deps deps/stb deps/7zip deps/pthreads deps/pthreads/platform/psp deps/pthreads/platform/helper libretro-common/include libretro-common/include/compat/zlib
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP \
|
||||
-D_MIPS_ARCH_ALLEGREX \
|
||||
-DHAVE_LANGEXTRA \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_AUDIOMIXER \
|
||||
-DHAVE_RWAV \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_GRIFFIN=1 \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-DRARCH_CONSOLE \
|
||||
-DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DHAVE_RGUI \
|
||||
-DHAVE_FILTERS_BUILTIN \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-DHAVE_7ZIP \
|
||||
-D_7ZIP_ST \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_AUDIOMIXER -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS = -L$(shell psp-config --psp-prefix)
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
RARCH_DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIBS += -lretro_psp1
|
||||
endif
|
||||
LIBS += -lstdc++ -lpspgu -lpspgum -lpspaudio -lpspfpu -lpsppower -lpsprtc -lpthread
|
||||
LDFLAGS =
|
||||
LIBS = $(WHOLE_START) -lretro_psp1 $(WHOLE_END) -lstdc++ -lpspgu -lpspgum -lm -lpspaudio -lpspfpu -lpsppower -lpsprtc
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
OBJS += bootstrap/psp1/kernel_functions.o
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
@@ -68,16 +47,14 @@ ifeq ($(BIG_STACK), 1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
RARCH_DEFINES += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
EXTRA_TARGETS = EBOOT.PBP
|
||||
PSP_EBOOT_TITLE = RetroArch PSP1
|
||||
|
||||
OBJS += griffin/griffin.o
|
||||
PSP_OBJECTS = griffin/griffin.o bootstrap/psp1/kernel_functions.o
|
||||
|
||||
OBJS = $(PSP_OBJECTS)
|
||||
|
||||
PSPSDK=$(shell psp-config --pspsdk-path)
|
||||
include $(PSPSDK)/lib/build.mak
|
||||
@@ -96,6 +73,3 @@ pspsh-run:
|
||||
debug: clean all pspsh-debug
|
||||
|
||||
run: clean all pspsh-run
|
||||
|
||||
sim:
|
||||
/Applications/PPSSPPSDL.app/Contents/MacOS/PPSSPPSDL $(shell pwd)/EBOOT.PBP
|
||||
+12
-12
@@ -1,6 +1,6 @@
|
||||
BUILD_PRX = 0
|
||||
PSP_LARGE_MEMORY = 1
|
||||
HAVE_KERNEL_PRX = 1
|
||||
HAVE_FILE_LOGGER = 0
|
||||
DEBUG = 0
|
||||
|
||||
TARGET = retroarchpsp_salamander
|
||||
@@ -8,18 +8,22 @@ TARGET = retroarchpsp_salamander
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
OPTIMIZE_LV := -O2
|
||||
endif
|
||||
|
||||
INCDIR = $(PSPPATH)/include libretro-common/include
|
||||
CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lstdc++ -lpsppower
|
||||
LIBS = -lstdc++ -lm -lpsppower
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
@@ -44,14 +48,10 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
OBJS += bootstrap/psp1/kernel_functions.o
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o \
|
||||
bootstrap/psp1/kernel_functions.o
|
||||
|
||||
PSPSDK=$(shell psp-config --pspsdk-path)
|
||||
include $(PSPSDK)/lib/build.mak
|
||||
@@ -1,236 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/retrofw-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef RETROFW_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef RETROFW_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-linux-g++
|
||||
endif
|
||||
|
||||
ifdef RETROFW_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-linux-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
#GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
GCW0_MK_SQUASH_FS ?= mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
RETROFW = 1
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 1
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_OSS =1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_retrofw.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32 -mhard-float -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -DRETROFW=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lz -lrt -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_OSS=1
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.retrofw.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
chmod +x retroarch
|
||||
chmod 777 retroarch
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.retrofw.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.retrofw.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
-232
@@ -1,232 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/gcw0-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 1
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 1
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_rg350.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE -flto
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_AL=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
AL_LIBS := -lopenal
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.gcw0.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.gcw0.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
@@ -1,234 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/gcw0-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
DINGUX_BETA = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 1
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_rg350_odbeta.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -ffast-math
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -DDINGUX_BETA=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE -flto
|
||||
DEF_FLAGS += -lasound
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
DEFINES += -DHAVE_ALSA
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
AL_LIBS := -lopenal
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.gcw0.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.gcw0.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
-235
@@ -1,235 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Alpha toolchain
|
||||
TOOLCHAIN_DIR=/opt/rs90-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
RS90 = 1
|
||||
DINGUX = 1
|
||||
DINGUX_BETA = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 0
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
|
||||
HAVE_CHD = 0
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 0
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 0
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_IBXM = 0
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_STB_VORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_rs90_odbeta.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DRS90=1 -DDINGUX=1 -DDINGUX_BETA=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURopendinguxCE -flto -lasound
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
DEFINES += -DHAVE_ALSA
|
||||
DEFINES += -DCC_RESAMPLER_PRECISION=0
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -Ofast -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.rs90.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
ifeq ($STRIP_BIN, 1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.rs90.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.rs90.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+2
-10
@@ -6,18 +6,16 @@ WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_DYNAMIC -DHAVE_REWIND
|
||||
DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_DYNAMIC
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_NEON -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
DEFINES += -DHAVE_RUNAHEAD -DHAVE_DYNAMIC
|
||||
DEFINES += -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_CONFIGFILE
|
||||
else
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
@@ -26,8 +24,6 @@ else
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MATERIALUI = 0 # enable later?
|
||||
@@ -38,10 +34,6 @@ else
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
+26
-92
@@ -1,6 +1,5 @@
|
||||
TARGET := retroarch_vita
|
||||
DEBUG ?= 0
|
||||
HAVE_FILE_LOGGER = 1
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
@@ -12,46 +11,24 @@ PC_DEVELOPMENT_UDP_PORT =
|
||||
|
||||
OBJ :=
|
||||
|
||||
SCE_LIBC_SIZE := 4194304
|
||||
DEFINES := -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_STB_VORBIS
|
||||
DEFINES := -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS
|
||||
INCDIRS :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 \
|
||||
-DHAVE_REWIND \
|
||||
-DHAVE_NEON \
|
||||
-DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DHAVE_XMB \
|
||||
-DHAVE_MATERIALUI \
|
||||
-DHAVE_LIBRETRODB \
|
||||
-DHAVE_KEYMAPPER \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_RBMP \
|
||||
-DHAVE_RTGA \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
INCDIRS += -I. \
|
||||
-Ideps/7zip \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib \
|
||||
-Ideps/stb
|
||||
INCDIRS += -I. -Ideps/7zip -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb
|
||||
else
|
||||
HAVE_REWIND := 1
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
HAVE_NEON := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_MATH_NEON := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -60,30 +37,16 @@ else
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
HAVE_VITA2D := 0
|
||||
HAVE_VITAGL := 0
|
||||
HAVE_VITAGLES := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_OPENGLES2 := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
else
|
||||
HAVE_VITA2D := 1
|
||||
HAVE_VITAGL := 0
|
||||
endif
|
||||
HAVE_VITAGL := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_SOCKET_LEGACY := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_RGUI := 1
|
||||
@@ -97,18 +60,16 @@ else
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
HAVE_NETLOGGER = 1
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VITASDK)),)
|
||||
@@ -131,25 +92,17 @@ LD := $(CXX)
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
ARCHFLAGS += -DSCE_LIBC_SIZE=$(SCE_LIBC_SIZE)
|
||||
endif
|
||||
|
||||
CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls
|
||||
CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls -O2
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -g -Og
|
||||
else
|
||||
CFLAGS += -O2
|
||||
CFLAGS += -g
|
||||
endif
|
||||
|
||||
ASFLAGS := $(CFLAGS)
|
||||
LDFLAGS := -Wl,-q
|
||||
|
||||
CFLAGS += -Wall -ffast-math
|
||||
CFLAGS += -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_DSP_FILTER
|
||||
CFLAGS += -DHAVE_VIDEO_FILTER
|
||||
CFLAGS += -Wall -ffast-math -g
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
@@ -169,15 +122,7 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub -lSceAppUtil_stub \
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub \
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub -lSceMotion_stub \
|
||||
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz -lSceShaccCg_stub
|
||||
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
VITA_LIBS += -llibScePiglet_stub -ltaihen_stub
|
||||
FSELF_FLAGS := -ss
|
||||
else
|
||||
VITA_LIBS += -lvitaGL -lvitashark
|
||||
FSELF_FLAGS := -s
|
||||
endif
|
||||
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_vita $(WHOLE_END) $(VITA_LIBS) -lm -lc
|
||||
|
||||
@@ -210,13 +155,7 @@ all: $(TARGETS)
|
||||
|
||||
%.depend: ;
|
||||
|
||||
liblibScePiglet_stub.a:
|
||||
mkdir -p deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet
|
||||
vita-libs-gen deps/Pigs-In-A-Blanket/piglet_stub/nids.yml deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet
|
||||
make -C deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet ARCH=arm-vita-eabi
|
||||
cp deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet/liblibScePiglet_stub.a .
|
||||
|
||||
$(TARGET).elf: $(OBJ) libretro_vita.a liblibScePiglet_stub.a
|
||||
$(TARGET).elf: $(OBJ) libretro_vita.a
|
||||
$(LD) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
%.velf: %.elf
|
||||
@@ -225,15 +164,14 @@ $(TARGET).elf: $(OBJ) libretro_vita.a liblibScePiglet_stub.a
|
||||
vita-elf-create $< $@
|
||||
|
||||
%.self: %.velf
|
||||
vita-make-fself -c $(FSELF_FLAGS) $< $@
|
||||
vita-make-fself -c -s $< $@
|
||||
|
||||
%.vpk: %.self
|
||||
vita-mksfoex -s TITLE_ID=$(VITA_TITLE_ID) "$(VITA_TITLE_NAME)" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-pack-vpk -s param.sfo -b $< $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).elf.unstripped.elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk
|
||||
rm -rf deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).elf.unstripped.elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk
|
||||
rm -f $(OBJ:.o=.depend)
|
||||
|
||||
# Useful for developers
|
||||
@@ -243,10 +181,6 @@ vpksend: $(TARGET).vpk
|
||||
send: $(TARGET).self
|
||||
curl -T $< ftp://$(PSVITAIP):1337/ux0:/app/$(VITA_TITLE_ID)/eboot.bin
|
||||
|
||||
launch: $(TARGET).self
|
||||
curl -T $< ftp://$(PSVITAIP):1337/ux0:/app/$(VITA_TITLE_ID)/eboot.bin
|
||||
echo "launch $(VITA_TITLE_ID)" | nc ${PSVITAIP} 1338
|
||||
|
||||
.PHONY: clean all send vpksend
|
||||
.PRECIOUS: %.depend
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
all: $(TARGET).vpk
|
||||
|
||||
%.vpk: eboot.bin
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "RetroArch" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "$(TARGET)" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-pack-vpk -s param.sfo -b eboot.bin $@
|
||||
|
||||
eboot.bin: $(TARGET).velf
|
||||
|
||||
-243
@@ -1,243 +0,0 @@
|
||||
include version.all
|
||||
|
||||
$(call assert,$(call seq,$(TARGET_PREFIX),arm-webos-linux-gnueabi-),webOS SDK isn't setup properly. See https://github.com/webosbrew/meta-lg-webos-ndk#compile-program-by-command-line)
|
||||
|
||||
WEBOS_FREETYPE_CONFIG ?= $(SDKTARGETSYSROOT)/usr/bin/freetype-config
|
||||
|
||||
WEBOS_INC_DIR ?= $(SDKTARGETSYSROOT)/usr/include
|
||||
WEBOS_LIB_DIR ?= $(SDKTARGETSYSROOT)/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = com.retroarch
|
||||
PACKAGE_VERSION := $(patsubst "%",%,$(RARCH_VERSION))
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_ACCESSIBILITY = 1
|
||||
HAVE_AL = 0
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_ANGLE = 0
|
||||
HAVE_AUDIOIO = 0
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_BLISSBOX = 0
|
||||
HAVE_BSV_MOVIE = 1
|
||||
HAVE_BUILTINBEARSSL = 0
|
||||
HAVE_BUILTINFLAC = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_DYLIB = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 1
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 1
|
||||
HAVE_GLSLANG = 0
|
||||
HAVE_GLSLANG_HLSL = 0
|
||||
HAVE_GLSLANG_OGLCOMPILER = 0
|
||||
HAVE_GLSLANG_OSDEPENDENT = 0
|
||||
HAVE_GLSLANG_SPIRV = 0
|
||||
HAVE_GLSLANG_SPIRV_TOOLS = 0
|
||||
HAVE_GLSLANG_SPIRV_TOOLS_OPT = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_NEON = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_NETWORK_CMD = 1
|
||||
HAVE_NETWORKGAMEPAD = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_MMAP = 1
|
||||
HAVE_ONLINE_UPDATER = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENGLES = 1
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGLES3_1 = 0
|
||||
HAVE_OPENGLES3_2 = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_PULSE = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_SDL = 0
|
||||
HAVE_SDL2 = 1
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 1
|
||||
HAVE_OZONE = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_UPDATE_ASSETS = 1
|
||||
HAVE_UPDATE_CORES = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DWEBOS=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
LIBS := -ldl -lz -lrt -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(WEBOS_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(WEBOS_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1 -D_GNU_SOURCE
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_SDL2
|
||||
DEFINES += -DHAVE_PULSE
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
|
||||
SDL2_CFLAGS := $(shell pkg-config --cflags sdl2)
|
||||
SDL2_LIBS := $(shell pkg-config --libs sdl2)
|
||||
OPENGLES_LIBS = -lGLESv2
|
||||
PULSE_LIBS = $(shell pkg-config --libs libpulse)
|
||||
MMAP_LIBS = -lc
|
||||
NEON_CFLAGS = -mfpu=neon
|
||||
NEON_ASFLAGS = -mfpu=neon
|
||||
NETWORKING_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define APPINFO
|
||||
{
|
||||
"id": "$(PACKAGE_NAME)",
|
||||
"version": "$(PACKAGE_VERSION)",
|
||||
"vendor": "webosbrew.org",
|
||||
"title": "RetroArch",
|
||||
"icon": "icon160.png",
|
||||
"main": "retroarch",
|
||||
"iconColor": "#333333",
|
||||
"type": "native",
|
||||
"appDescription": "Emulation frontend"
|
||||
}
|
||||
endef
|
||||
export APPINFO
|
||||
|
||||
all: $(TARGET) ipk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf webos/*.ipk
|
||||
rm -rf webos/dist
|
||||
|
||||
ipk: $(TARGET)
|
||||
rm -rf webos/dist
|
||||
mkdir -p webos/dist/lib
|
||||
echo "$$APPINFO" > webos/dist/appinfo.json
|
||||
cp -t webos/dist -vf $(TARGET) webos/icon160.png
|
||||
cp -t webos/dist/lib -vf $(WEBOS_LIB_DIR)/libstdc++.so.6
|
||||
$(STRIP) webos/dist/$(TARGET)
|
||||
cd webos && ares-package dist
|
||||
|
||||
install: ipk
|
||||
ares-install webos/$(PACKAGE_NAME)_$(PACKAGE_VERSION)_$(ARCH).ipk
|
||||
|
||||
launch: install
|
||||
ares-launch com.retroarch
|
||||
|
||||
.PHONY: all clean ipk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
-292
@@ -1,292 +0,0 @@
|
||||
ROOT_DIR := .
|
||||
DEPS_DIR := $(ROOT_DIR)/deps
|
||||
DEBUG ?= 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BIG_STACK = 1
|
||||
HAVE_NETWORKING = 1
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
RARCH_CONSOLE = 0
|
||||
USBGECKO = 0
|
||||
|
||||
SPACE :=
|
||||
SPACE := $(SPACE) $(SPACE)
|
||||
BACKSLASH :=
|
||||
BACKSLASH := \$(BACKSLASH)
|
||||
filter_out1 = $(filter-out $(firstword $1),$1)
|
||||
filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -s),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -s)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
TARGET_NAME := retroarch
|
||||
|
||||
INCLUDE :=
|
||||
LDFLAGS :=
|
||||
LIBDIRS :=
|
||||
|
||||
ifeq ($(LIBRETRO), nxengine)
|
||||
WHOLE_ARCHIVE_LINK = 1
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_wii $(WHOLE_END)
|
||||
|
||||
libogc_platform := 1
|
||||
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
EXT_TARGET := $(TARGET_NAME)_wii.dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_wii.elf
|
||||
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
|
||||
INCLUDE += -I.
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/wii
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
LIBDIRS += -Lwii/libogc/libs/wii
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
MACHDEP := -DHW_RVL -mrvl
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
LDFLAGS += -T bootstrap/gx/rvl.ld
|
||||
endif
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
endif
|
||||
|
||||
LIBS += -lwiiuse -lbte
|
||||
|
||||
ifeq ($(USBGECKO), 1)
|
||||
LIBS += -ldb
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
LIBS += -lbba
|
||||
endif
|
||||
|
||||
LIBS += -logc
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_IBXM := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_STATIC_AUDIO_FILTERS := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS := 1
|
||||
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
HAVE_RSOUND := 0
|
||||
HAVE_XMB := 0
|
||||
HAVE_OZONE := 0
|
||||
HAVE_RGUI := 1
|
||||
HAVE_MATERIALUI := 0
|
||||
|
||||
CFLAGS += -DHAVE_SOCKET_LEGACY
|
||||
|
||||
APP_BOOTER_DIR = wii/app_booter
|
||||
PLATOBJS := $(APP_BOOTER_DIR)/app_booter.binobj
|
||||
|
||||
ifeq ($(USBGECKO), 1)
|
||||
CFLAGS += -DUSBGECKO
|
||||
endif
|
||||
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps \
|
||||
-Ideps/stb
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
|
||||
OBJ = $(PLATOBJS) audio/drivers/gx_audio.o gfx/drivers/gx_gfx.o input/drivers/gx_input.o frontend/drivers/platform_gx.o input/drivers_joypad/gx_joypad.o memory/wii/mem2_manager.o gfx/drivers/gx_gfx_vi_encoder.o frontend/drivers/platform_wii.o input/drivers_hid/wiiusb_hid.o
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 0)
|
||||
OBJ += wii/libogc/libfat/libfat.o wii/libogc/libfat/fatfile.o wii/libogc/libfat/file_allocation_table.o wii/libogc/libfat/cache.o wii/libogc/libfat/fatdir.o wii/libogc/libfat/partition.o wii/libogc/libfat/directory.o wii/libogc/libfat/filetime.o wii/libogc/libfat/disc.o
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += $(DEFINES) -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" \
|
||||
-DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) \
|
||||
|
||||
|
||||
ifeq ($(WANT_GLSLANG), 1)
|
||||
OBJ += griffin/griffin_glslang.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WIIUSB_HID), 1)
|
||||
CFLAGS += -DHAVE_WIIUSB_HID
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK),1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RARCH_EXEC), 1)
|
||||
CFLAGS += -DHAVE_RARCH_EXEC
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
CFLAGS += -DHAVE_ZLIB
|
||||
CFLAGS += -I./libretro-common/include/compat/zlib
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RWAV), 1)
|
||||
CFLAGS += -DHAVE_RWAV
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
|
||||
CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_CMD), 1)
|
||||
CFLAGS += -DHAVE_NETWORK_CMD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DYNAMIC), 1)
|
||||
CFLAGS += -DHAVE_DYNAMIC
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
LINK = $(CXX)
|
||||
|
||||
all: $(EXT_TARGET)
|
||||
|
||||
%.dol: %.elf
|
||||
$(ELF2DOL) $< $@
|
||||
|
||||
$(EXT_INTER_TARGET): $(OBJ)
|
||||
$(LINK) $(LINKOUT)$@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.binobj: %.bin
|
||||
$(LD) -r -b binary $(OBJOUT)$@ $<
|
||||
|
||||
$(APP_BOOTER_DIR)/app_booter.bin:
|
||||
export EXTERNAL_LIBOGC
|
||||
$(MAKE) -C $(APP_BOOTER_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(EXT_TARGET)
|
||||
rm -f $(EXT_INTER_TARGET)
|
||||
rm -f $(OBJ)
|
||||
$(MAKE) -C $(APP_BOOTER_DIR) clean
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+6
-19
@@ -3,11 +3,10 @@
|
||||
# Makefile for RetroArch Wii.
|
||||
##
|
||||
|
||||
DEBUG = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
DEBUG = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
EXTERNAL_LIBOGC = 0
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -28,12 +27,6 @@ CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
|
||||
DOL_TARGET := retroarch-salamander_wii.dol
|
||||
ELF_TARGET := retroarch-salamander_wii.elf
|
||||
|
||||
@@ -46,11 +39,6 @@ INCLUDE += -Iwii/libogc/include
|
||||
LIBDIRS := -Lwii/libogc/libs/wii -L.
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map
|
||||
@@ -69,7 +57,7 @@ OBJ = frontend/frontend_salamander.o \
|
||||
frontend/drivers/platform_wii.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
@@ -81,7 +69,7 @@ OBJ = frontend/frontend_salamander.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/time/rtime.o \
|
||||
file_path_str.o \
|
||||
verbosity.o \
|
||||
$(APP_BOOTER_DIR)/app_booter.binobj
|
||||
|
||||
@@ -139,7 +127,6 @@ $(ELF_TARGET): $(OBJ)
|
||||
$(LD) -r -b binary -o $@ $<
|
||||
|
||||
$(APP_BOOTER_DIR)/app_booter.bin:
|
||||
export EXTERNAL_LIBOGC
|
||||
$(MAKE) -C $(APP_BOOTER_DIR)
|
||||
|
||||
pkg: all
|
||||
|
||||
+11
-35
@@ -7,12 +7,10 @@ GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
WIIU_HID = 1
|
||||
HAVE_HID = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
WIIU_LOG_RPX = 0
|
||||
BUILD_DIR = objs/wiiu
|
||||
PC_DEVELOPMENT_TCP_PORT ?=
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
|
||||
ifeq ($(SALAMANDER_BUILD),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-salamander
|
||||
@@ -68,14 +66,13 @@ ifeq ($(SALAMANDER_BUILD),1)
|
||||
OBJ += libretro-common/file/config_file.o
|
||||
OBJ += libretro-common/streams/file_stream.o
|
||||
OBJ += libretro-common/vfs/vfs_implementation.o
|
||||
OBJ += libretro-common/hash/lrc_hash.o
|
||||
OBJ += libretro-common/time/rtime.o
|
||||
OBJ += libretro-common/hash/rhash.o
|
||||
OBJ += file_path_str.o
|
||||
OBJ += verbosity.o
|
||||
|
||||
# $(SALAMANDER_BUILD),0
|
||||
else
|
||||
DEFINES += -DRARCH_INTERNAL
|
||||
DEFINES += -DHAVE_SCREENSHOTS
|
||||
DEFINES += -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ONLINE_UPDATER
|
||||
DEFINES += -DHAVE_UPDATE_ASSETS
|
||||
@@ -87,9 +84,6 @@ else
|
||||
ifeq ($(HAVE_RUNAHEAD),1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
DEFINES += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
OBJ += wiiu/shader_utils.o
|
||||
OBJ += gfx/drivers/gx2_shaders/tex.o
|
||||
@@ -103,19 +97,17 @@ endif
|
||||
OBJ += gfx/drivers/gx2_shaders/snowflake.o
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o griffin/griffin_cpp.o
|
||||
OBJ += griffin/griffin.o
|
||||
|
||||
INCDIRS += -Ilibretro-common/include/compat/zlib
|
||||
# for stb, libfat, iosuhax
|
||||
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax/include
|
||||
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax
|
||||
# pad_functions uses wiiu/input.h
|
||||
INCDIRS += -Iinput/include
|
||||
INCDIRS += -Ideps/SPIRV-Cross
|
||||
|
||||
DEFINES += -DHAVE_AUDIOMIXER
|
||||
DEFINES += -DHAVE_RWAV
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_SPIRV_CROSS -DHAVE_SLANG
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -DHAVE_NETPLAYDISCOVERY
|
||||
@@ -124,24 +116,17 @@ endif
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
DEFINES += -DHAVE_HID
|
||||
DEFINES += -DWANT_LIBFAT -DHAVE_LIBFAT -DWANT_IOSUHAX -DHAVE_IOSUHAX
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
DEFINES += -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
|
||||
|
||||
# $(GRIFFIN_BUILD),0
|
||||
else
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_7ZIP = 1
|
||||
@@ -162,13 +147,10 @@ endif
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
HAVE_SLANG = 1
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
WANT_LIBFAT = 1
|
||||
WANT_IOSUHAX = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
DEFINES += $(DEF_FLAGS)
|
||||
@@ -181,7 +163,7 @@ OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
#-----------------------------
|
||||
# Compile flags
|
||||
|
||||
DEFINES += -DWIIU -D__WUT__ -DHW_WUP -D__wiiu__
|
||||
DEFINES += -DWIIU -DMSB_FIRST -D__WUT__ -DHW_WUP -D__wiiu__
|
||||
DEFINES += -DHAVE_MAIN
|
||||
DEFINES += -DRARCH_CONSOLE
|
||||
|
||||
@@ -202,7 +184,7 @@ CFLAGS := -mcpu=750 -meabi -mhard-float
|
||||
CFLAGS += -ffast-math -Werror=implicit-function-declaration
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
#CFLAGS += -fomit-frame-pointer -mword-relocations
|
||||
CFLAGS += -Wall
|
||||
#CFLAGS += -Wall
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
@@ -334,23 +316,17 @@ $(BUILD_DIR)/$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.
|
||||
@$(if $(Q), echo LD $@,)
|
||||
$(Q)$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).large.rpx: $(BUILD_DIR)/$(TARGET).rpx.elf $(ELF2RPL) .$(TARGET).rpx.large.last
|
||||
$(BUILD_DIR)/$(TARGET).rpx: $(BUILD_DIR)/$(TARGET).rpx.elf $(ELF2RPL) .$(TARGET).rpx.last
|
||||
@$(if $(Q), echo ELF2RPL $@,)
|
||||
@touch .$(TARGET).rpx.large.last
|
||||
@touch .$(TARGET).rpx.last
|
||||
$(Q)-$(ELF2RPL) $< $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).rpx: $(BUILD_DIR)/$(TARGET).large.rpx .$(TARGET).rpx.last
|
||||
@$(if $(Q), echo COMPRESS $@,)
|
||||
@touch .$(TARGET).rpx.large.last
|
||||
$(Q)wiiurpxtool -c $< $@
|
||||
|
||||
clean:
|
||||
@$(if $(Q), echo $@,)
|
||||
$(Q)rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx
|
||||
$(Q)rm -f $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).rpx.elf $(BUILD_DIR)/$(TARGET).large.rpx $(BUILD_DIR)/$(TARGET).rpx
|
||||
$(Q)rm -f .$(TARGET).elf.last .$(TARGET).rpx.elf.last .$(TARGET).rpx.large.last .$(TARGET).rpx.last
|
||||
$(Q)rm -f $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).rpx.elf $(BUILD_DIR)/$(TARGET).rpx
|
||||
$(Q)rm -f .$(TARGET).elf.last .$(TARGET).rpx.elf.last .$(TARGET).rpx.last
|
||||
$(Q)rm -f $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|
||||
$(Q)$(MAKE) -C wiiu/wut/elf2rpl/ clean
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend %.last
|
||||
|
||||
+15
-9
@@ -1,8 +1,6 @@
|
||||
TARGET = retroarch.exe
|
||||
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_DINPUT = 1
|
||||
HAVE_XAUDIO = 1
|
||||
HAVE_DSOUND = 1
|
||||
@@ -17,16 +15,11 @@ HAVE_COMMAND = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_PYTHON = 0
|
||||
DYNAMIC = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
HAVE_XINPUT = 1
|
||||
HAVE_WINMM = 1
|
||||
@@ -34,6 +27,7 @@ HAVE_WINMM = 1
|
||||
HAVE_SDL := 0
|
||||
HAVE_SDL2 := 0
|
||||
HAVE_RSOUND := 0
|
||||
HAVE_PYTHON := 0
|
||||
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_FREETYPE := 1
|
||||
@@ -82,6 +76,11 @@ RSOUND_CFLAGS := -DHAVE_RSOUND
|
||||
RSOUND_LIBS := -lrsound
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PYTHON), 1)
|
||||
PYTHON_LIBS := -lpython32
|
||||
PYTHON_CFLAGS := -DHAVE_PYTHON -Ipython
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FFMPEG), 1)
|
||||
AVCODEC_LIBS := -lavcodec
|
||||
AVUTIL_LIBS := -lavutil
|
||||
@@ -97,7 +96,7 @@ OS := Win32
|
||||
OBJ :=
|
||||
LIBS := -lm
|
||||
DEFINES :=
|
||||
DEFINES += -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_OVERLAY
|
||||
DEFINES += -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -DRARCH_INTERNAL -DHAVE_OVERLAY
|
||||
#DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
LDFLAGS := -L. -static-libgcc
|
||||
|
||||
@@ -161,6 +160,13 @@ $(OBJDIR)/%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@-mkdir -p $(dir $@) || mkdir $(subst /,\,$(dir $@)) || echo .
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp | $(dir $@)
|
||||
@-mkdir -p $(dir $@) || mkdir $(subst /,\,$(dir $@)) || echo .
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
|
||||
@@ -76,11 +76,11 @@ In the end you should have this on your system:
|
||||
gl3.h
|
||||
gl3platform.h
|
||||
|
||||
To enable mali_fbdev you must configure RetroArch with --enable-opengles and --enable-mali_fbdev.
|
||||
To enable mali_fbdev you must configure RetroArch with --enable-gles and --enable-mali_fbdev.
|
||||
|
||||
This is an example of what you would use on a CubieBoard2 for a lightweight RetroArch:
|
||||
|
||||
./configure --enable-opengles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip
|
||||
./configure --enable-gles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip
|
||||
|
||||
NOTE: A TTY hack is used to auto-clean the console on exit, and the fbdev ioctls are used to retrieve
|
||||
current video mode. Both things work good, but they are not exactly ideal solutions.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[](https://travis-ci.org/libretro/RetroArch)
|
||||
[](https://scan.coverity.com/projects/retroarch)
|
||||
[](https://crowdin.com/project/retroarch)
|
||||
|
||||
# RetroArch
|
||||
|
||||
|
||||
+4
-54
@@ -30,63 +30,13 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int ai_service_auto;
|
||||
/* Is text-to-speech accessibility turned on? */
|
||||
bool enabled;
|
||||
} access_state_t;
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
bool is_accessibility_enabled(bool accessibility_enable, bool accessibility_enabled);
|
||||
bool is_accessibility_enabled(void);
|
||||
|
||||
#ifdef HAVE_TRANSLATE
|
||||
bool is_narrator_running(bool accessibility_enable);
|
||||
#endif
|
||||
bool accessibility_speak_priority(const char* speak_text, int priority);
|
||||
|
||||
/*
|
||||
This function does all the stuff needed to translate the game screen,
|
||||
using the URL given in the settings. Once the image from the frame
|
||||
buffer is sent to the server, the callback will write the translated
|
||||
image to the screen.
|
||||
|
||||
Supported client/services (thus far)
|
||||
-VGTranslate client ( www.gitlab.com/spherebeaker/vg_translate )
|
||||
-Ztranslate client/service ( www.ztranslate.net/docs/service )
|
||||
|
||||
To use a client, download the relevant code/release, configure
|
||||
them, and run them on your local machine, or network. Set the
|
||||
retroarch configuration to point to your local client (usually
|
||||
listening on localhost:4404 ) and enable translation service.
|
||||
|
||||
If you don't want to run a client, you can also use a service,
|
||||
which is basically like someone running a client for you. The
|
||||
downside here is that your retroarch device will have to have
|
||||
an internet connection, and you may have to sign up for it.
|
||||
|
||||
To make your own server, it must listen for a POST request, which
|
||||
will consist of a JSON body, with the "image" field as a base64
|
||||
encoded string of a 24bit-BMP/PNG that the will be translated.
|
||||
The server must output the translated image in the form of a
|
||||
JSON body, with the "image" field also as a base64 encoded
|
||||
24bit-BMP, or as an alpha channel png.
|
||||
|
||||
"paused" boolean is passed in to indicate if the current call
|
||||
was made during a paused frame. Due to how the menu widgets work,
|
||||
if the ai service is called in "auto" mode, then this call will
|
||||
be made while the menu widgets unpause the core for a frame to update
|
||||
the on-screen widgets. To tell the ai service what the pause
|
||||
mode is honestly, we store the runloop_paused variable from before
|
||||
the handle_translation_cb wipes the widgets, and pass that in here.
|
||||
*/
|
||||
bool run_translation_service(settings_t *settings, bool paused);
|
||||
|
||||
bool accessibility_speak_priority(
|
||||
bool accessibility_enable,
|
||||
unsigned accessibility_narrator_speech_speed,
|
||||
const char* speak_text, int priority);
|
||||
|
||||
access_state_t *access_state_get_ptr(void);
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -30,7 +30,7 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 16
|
||||
|
||||
#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 5)
|
||||
#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 4)
|
||||
|
||||
/* do not define more than (MAX_SYSTEM_STREAMS - MAX_STREAMS) */
|
||||
enum audio_mixer_system_slot
|
||||
@@ -38,8 +38,7 @@ enum audio_mixer_system_slot
|
||||
AUDIO_MIXER_SYSTEM_SLOT_OK = AUDIO_MIXER_MAX_STREAMS,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_CANCEL,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_NOTICE,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_BGM,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_ACHIEVEMENT_UNLOCK
|
||||
AUDIO_MIXER_SYSTEM_SLOT_BGM
|
||||
};
|
||||
|
||||
enum audio_action
|
||||
@@ -77,11 +76,11 @@ enum audio_mixer_state
|
||||
|
||||
typedef struct audio_statistics
|
||||
{
|
||||
unsigned samples;
|
||||
float average_buffer_saturation;
|
||||
float std_deviation_percentage;
|
||||
float close_to_underrun;
|
||||
float close_to_blocking;
|
||||
unsigned samples;
|
||||
} audio_statistics_t;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,415 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch 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 Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch 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 RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __AUDIO_DRIVER__H
|
||||
#define __AUDIO_DRIVER__H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
#include <libretro.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#ifdef HAVE_DSP_FILTER
|
||||
#include <audio/dsp_filter.h>
|
||||
#endif
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
#include <audio/audio_mixer.h>
|
||||
#endif
|
||||
#include <audio/audio_resampler.h>
|
||||
|
||||
#include "audio_defines.h"
|
||||
|
||||
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
typedef struct audio_mixer_stream
|
||||
{
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
void *buf;
|
||||
char *name;
|
||||
size_t bufsize;
|
||||
float volume;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
} audio_mixer_stream_t;
|
||||
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
void *buf;
|
||||
char *basename;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
size_t bufsize;
|
||||
unsigned slot_selection_idx;
|
||||
float volume;
|
||||
enum audio_mixer_slot_selection_type slot_selection_type;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
} audio_mixer_stream_params_t;
|
||||
#endif
|
||||
|
||||
typedef struct audio_driver
|
||||
{
|
||||
/* Creates and initializes handle to audio driver.
|
||||
*
|
||||
* Returns: audio driver handle on success, otherwise NULL.
|
||||
**/
|
||||
void *(*init)(const char *device, unsigned rate,
|
||||
unsigned latency, unsigned block_frames, unsigned *new_rate);
|
||||
|
||||
/*
|
||||
* @data : Pointer to audio data handle.
|
||||
* @buf : Audio buffer data.
|
||||
* @size : Size of audio buffer.
|
||||
*
|
||||
* Write samples to audio driver.
|
||||
*
|
||||
* Write data in buffer to audio driver.
|
||||
* A frame here is defined as one combined sample of left and right
|
||||
* channels. (I.e. 44.1kHz, 16-bit stereo has 88.2k samples/s, and
|
||||
* 44.1k frames/s.)
|
||||
*
|
||||
* Samples are interleaved in format LRLRLRLRLR ...
|
||||
* If the driver returns true in use_float(), a floating point
|
||||
* format will be used, with range [-1.0, 1.0].
|
||||
* If not, signed 16-bit samples in native byte ordering will be used.
|
||||
*
|
||||
* This function returns the number of frames successfully written.
|
||||
* If an error occurs, -1 should be returned.
|
||||
* Note that non-blocking behavior that cannot write at this time
|
||||
* should return 0 as returning -1 will terminate the driver.
|
||||
*
|
||||
* Unless said otherwise with set_nonblock_state(), all writes
|
||||
* are blocking, and it should block till it has written all frames.
|
||||
*/
|
||||
ssize_t (*write)(void *data, const void *buf, size_t size);
|
||||
|
||||
/* Temporarily pauses the audio driver. */
|
||||
bool (*stop)(void *data);
|
||||
|
||||
/* Resumes audio driver from the paused state. */
|
||||
bool (*start)(void *data, bool is_shutdown);
|
||||
|
||||
/* Is the audio driver currently running? */
|
||||
bool (*alive)(void *data);
|
||||
|
||||
/* Should we care about blocking in audio thread? Fast forwarding.
|
||||
*
|
||||
* If state is true, nonblocking operation is assumed.
|
||||
* This is typically used for fast-forwarding. If driver cannot
|
||||
* implement nonblocking writes, this can be disregarded, but should
|
||||
* log a message to stderr.
|
||||
* */
|
||||
void (*set_nonblock_state)(void *data, bool toggle);
|
||||
|
||||
/* Stops and frees driver data. */
|
||||
void (*free)(void *data);
|
||||
|
||||
/* Defines if driver will take standard floating point samples,
|
||||
* or int16_t samples.
|
||||
*
|
||||
* If true is returned, the audio driver is capable of using
|
||||
* floating point data. This will likely increase performance as the
|
||||
* resampler unit uses floating point. The sample range is
|
||||
* [-1.0, 1.0].
|
||||
* */
|
||||
bool (*use_float)(void *data);
|
||||
|
||||
/* Human-readable identifier. */
|
||||
const char *ident;
|
||||
|
||||
/* Optional. Get audio device list (allocates, caller has to free this) */
|
||||
void *(*device_list_new)(void *data);
|
||||
|
||||
/* Optional. Frees audio device list */
|
||||
void (*device_list_free)(void *data, void *data2);
|
||||
|
||||
/* Optional. */
|
||||
size_t (*write_avail)(void *data);
|
||||
|
||||
size_t (*buffer_size)(void *data);
|
||||
} audio_driver_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double source_ratio_original;
|
||||
double source_ratio_current;
|
||||
|
||||
uint64_t free_samples_count;
|
||||
|
||||
struct string_list *devices_list;
|
||||
float *output_samples_buf;
|
||||
#ifdef HAVE_REWIND
|
||||
int16_t *rewind_buf;
|
||||
#endif
|
||||
int16_t *output_samples_conv_buf;
|
||||
#ifdef HAVE_DSP_FILTER
|
||||
retro_dsp_filter_t *dsp;
|
||||
#endif
|
||||
const retro_resampler_t *resampler;
|
||||
|
||||
void *resampler_data;
|
||||
const audio_driver_t *current_audio;
|
||||
void *context_audio_data;
|
||||
float *input_data;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
struct audio_mixer_stream
|
||||
mixer_streams[AUDIO_MIXER_MAX_SYSTEM_STREAMS];
|
||||
#endif
|
||||
struct retro_audio_callback callback; /* ptr alignment */
|
||||
/* ptr alignment */
|
||||
size_t chunk_size;
|
||||
size_t chunk_nonblock_size;
|
||||
size_t chunk_block_size;
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
size_t rewind_ptr;
|
||||
size_t rewind_size;
|
||||
#endif
|
||||
size_t buffer_size;
|
||||
size_t data_ptr;
|
||||
|
||||
unsigned free_samples_buf[
|
||||
AUDIO_BUFFER_FREE_SAMPLES_COUNT];
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
float mixer_volume_gain;
|
||||
#endif
|
||||
|
||||
float rate_control_delta;
|
||||
float input;
|
||||
float volume_gain;
|
||||
|
||||
enum resampler_quality resampler_quality;
|
||||
|
||||
char resampler_ident[64];
|
||||
|
||||
bool active;
|
||||
bool control;
|
||||
bool mute_enable;
|
||||
bool use_float;
|
||||
bool suspended;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
bool mixer_mute_enable;
|
||||
bool mixer_active;
|
||||
#endif
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
bool hard_disable;
|
||||
#endif
|
||||
} audio_driver_state_t;
|
||||
|
||||
bool audio_driver_enable_callback(void);
|
||||
|
||||
bool audio_driver_disable_callback(void);
|
||||
|
||||
bool audio_driver_mixer_extension_supported(const char *ext);
|
||||
|
||||
void audio_driver_dsp_filter_free(void);
|
||||
|
||||
bool audio_driver_dsp_filter_init(const char *device);
|
||||
|
||||
void audio_driver_set_buffer_size(size_t bufsize);
|
||||
|
||||
bool audio_driver_get_devices_list(void **ptr);
|
||||
|
||||
void audio_driver_setup_rewind(void);
|
||||
|
||||
bool audio_driver_callback(void);
|
||||
|
||||
bool audio_driver_has_callback(void);
|
||||
|
||||
void audio_driver_frame_is_reverse(void);
|
||||
|
||||
void audio_set_float(enum audio_action action, float val);
|
||||
|
||||
float *audio_get_float_ptr(enum audio_action action);
|
||||
|
||||
bool *audio_get_bool_ptr(enum audio_action action);
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i);
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
void audio_driver_mixer_play_stream(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_sequential(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_stop_stream(unsigned i);
|
||||
|
||||
float audio_driver_mixer_get_stream_volume(unsigned i);
|
||||
|
||||
void audio_driver_mixer_set_stream_volume(unsigned i, float vol);
|
||||
|
||||
void audio_driver_mixer_remove_stream(unsigned i);
|
||||
|
||||
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i);
|
||||
|
||||
const char *audio_driver_mixer_get_stream_name(unsigned i);
|
||||
|
||||
void audio_driver_load_system_sounds(void);
|
||||
|
||||
#endif
|
||||
|
||||
bool audio_driver_start(bool is_shutdown);
|
||||
|
||||
bool audio_driver_stop(void);
|
||||
|
||||
#ifdef HAVE_TRANSLATE
|
||||
/* TODO/FIXME - Doesn't currently work. Fix this. */
|
||||
bool audio_driver_is_ai_service_speech_running(void);
|
||||
#endif
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_audioio;
|
||||
extern audio_driver_t audio_oss;
|
||||
extern audio_driver_t audio_alsa;
|
||||
extern audio_driver_t audio_alsathread;
|
||||
extern audio_driver_t audio_tinyalsa;
|
||||
extern audio_driver_t audio_roar;
|
||||
extern audio_driver_t audio_openal;
|
||||
extern audio_driver_t audio_opensl;
|
||||
extern audio_driver_t audio_jack;
|
||||
extern audio_driver_t audio_sdl;
|
||||
extern audio_driver_t audio_xa;
|
||||
extern audio_driver_t audio_pulse;
|
||||
extern audio_driver_t audio_dsound;
|
||||
extern audio_driver_t audio_wasapi;
|
||||
extern audio_driver_t audio_coreaudio;
|
||||
extern audio_driver_t audio_coreaudio3;
|
||||
extern audio_driver_t audio_xenon360;
|
||||
extern audio_driver_t audio_ps3;
|
||||
extern audio_driver_t audio_gx;
|
||||
extern audio_driver_t audio_ax;
|
||||
extern audio_driver_t audio_psp;
|
||||
extern audio_driver_t audio_ps2;
|
||||
extern audio_driver_t audio_ctr_csnd;
|
||||
extern audio_driver_t audio_ctr_dsp;
|
||||
#ifdef HAVE_THREADS
|
||||
extern audio_driver_t audio_ctr_dsp_thread;
|
||||
#endif
|
||||
extern audio_driver_t audio_switch;
|
||||
extern audio_driver_t audio_switch_thread;
|
||||
extern audio_driver_t audio_switch_libnx_audren;
|
||||
extern audio_driver_t audio_switch_libnx_audren_thread;
|
||||
extern audio_driver_t audio_rwebaudio;
|
||||
|
||||
audio_driver_state_t *audio_state_get_ptr(void);
|
||||
|
||||
extern audio_driver_t *audio_drivers[];
|
||||
|
||||
/**
|
||||
* audio_compute_buffer_statistics:
|
||||
*
|
||||
* Computes audio buffer statistics.
|
||||
*
|
||||
**/
|
||||
bool audio_compute_buffer_statistics(audio_statistics_t *stats);
|
||||
|
||||
float audio_driver_monitor_adjust_system_rates(
|
||||
double input_sample_rate,
|
||||
double input_fps,
|
||||
float video_refresh_rate,
|
||||
unsigned video_swap_interval,
|
||||
float audio_max_timing_skew);
|
||||
|
||||
bool audio_driver_init_internal(
|
||||
void *settings_data,
|
||||
bool audio_cb_inited);
|
||||
|
||||
bool audio_driver_deinit(void);
|
||||
|
||||
bool audio_driver_find_driver(
|
||||
void *settings_data,
|
||||
const char *prefix,
|
||||
bool verbosity_enabled);
|
||||
|
||||
/**
|
||||
* audio_driver_sample:
|
||||
* @left : value of the left audio channel.
|
||||
* @right : value of the right audio channel.
|
||||
*
|
||||
* Audio sample render callback function.
|
||||
**/
|
||||
void audio_driver_sample(int16_t left, int16_t right);
|
||||
|
||||
/**
|
||||
* audio_driver_sample_batch:
|
||||
* @data : pointer to audio buffer.
|
||||
* @frames : amount of audio frames to push.
|
||||
*
|
||||
* Batched audio sample render callback function.
|
||||
*
|
||||
* Returns: amount of frames sampled.
|
||||
**/
|
||||
size_t audio_driver_sample_batch(const int16_t *data, size_t frames);
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
/**
|
||||
* audio_driver_sample_rewind:
|
||||
* @left : value of the left audio channel.
|
||||
* @right : value of the right audio channel.
|
||||
*
|
||||
* Audio sample render callback function (rewind version).
|
||||
* This callback function will be used instead of
|
||||
* audio_driver_sample when rewinding is activated.
|
||||
**/
|
||||
void audio_driver_sample_rewind(int16_t left, int16_t right);
|
||||
|
||||
/**
|
||||
* audio_driver_sample_batch_rewind:
|
||||
* @data : pointer to audio buffer.
|
||||
* @frames : amount of audio frames to push.
|
||||
*
|
||||
* Batched audio sample render callback function (rewind version).
|
||||
*
|
||||
* This callback function will be used instead of
|
||||
* audio_driver_sample_batch when rewinding is activated.
|
||||
*
|
||||
* Returns: amount of frames sampled.
|
||||
**/
|
||||
size_t audio_driver_sample_batch_rewind(
|
||||
const int16_t *data, size_t frames);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void audio_driver_menu_sample(void);
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __AUDIO_DRIVER__H */
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "audio_thread_wrapper.h"
|
||||
#include "audio_driver.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
typedef struct audio_thread
|
||||
@@ -32,16 +31,6 @@ typedef struct audio_thread
|
||||
sthread_t *thread;
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
const char *device;
|
||||
unsigned *new_rate;
|
||||
|
||||
int inited;
|
||||
|
||||
/* Initialization options. */
|
||||
unsigned out_rate;
|
||||
unsigned latency;
|
||||
unsigned block_frames;
|
||||
|
||||
bool alive;
|
||||
bool stopped;
|
||||
bool stopped_ack;
|
||||
@@ -49,6 +38,14 @@ typedef struct audio_thread
|
||||
bool is_shutdown;
|
||||
bool use_float;
|
||||
|
||||
int inited;
|
||||
|
||||
/* Initialization options. */
|
||||
const char *device;
|
||||
unsigned *new_rate;
|
||||
unsigned out_rate;
|
||||
unsigned latency;
|
||||
unsigned block_frames;
|
||||
} audio_thread_t;
|
||||
|
||||
static void audio_thread_loop(void *data)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "audio_driver.h"
|
||||
#include "../retroarch.h"
|
||||
|
||||
/**
|
||||
* audio_init_thread:
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct alsa
|
||||
{
|
||||
snd_pcm_t *pcm;
|
||||
size_t buffer_size;
|
||||
unsigned int frame_bits;
|
||||
bool nonblock;
|
||||
unsigned int frame_bits;
|
||||
bool has_float;
|
||||
bool can_pause;
|
||||
bool is_paused;
|
||||
@@ -83,12 +83,12 @@ static void *alsa_init(const char *device, unsigned rate, unsigned latency,
|
||||
if (snd_pcm_hw_params_malloc(¶ms) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_hw_params_any(alsa->pcm, params) < 0)
|
||||
goto error;
|
||||
|
||||
alsa->has_float = find_float_format(alsa->pcm, params);
|
||||
format = alsa->has_float ? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;
|
||||
|
||||
if (snd_pcm_hw_params_any(alsa->pcm, params) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_hw_params_set_access(
|
||||
alsa->pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED) < 0)
|
||||
goto error;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <sys/asoundlib.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#define MAX_FRAG_SIZE 3072
|
||||
#define DEFAULT_RATE 48000
|
||||
@@ -29,18 +29,18 @@
|
||||
typedef struct alsa
|
||||
{
|
||||
uint8_t **buffer;
|
||||
snd_pcm_t *pcm;
|
||||
uint8_t *buffer_chunk;
|
||||
unsigned buffer_index;
|
||||
unsigned buffer_ptr;
|
||||
volatile unsigned buffered_blocks;
|
||||
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
snd_pcm_t *pcm;
|
||||
bool nonblock;
|
||||
bool has_float;
|
||||
bool can_pause;
|
||||
bool is_paused;
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
} alsa_qsa_t;
|
||||
|
||||
typedef long snd_pcm_sframes_t;
|
||||
|
||||
+15
-14
@@ -24,7 +24,7 @@
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define TRY_ALSA(x) if (x < 0) \
|
||||
@@ -33,18 +33,20 @@
|
||||
typedef struct alsa_thread
|
||||
{
|
||||
snd_pcm_t *pcm;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
bool has_float;
|
||||
volatile bool thread_dead;
|
||||
|
||||
size_t buffer_size;
|
||||
size_t period_size;
|
||||
snd_pcm_uframes_t period_frames;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
sthread_t *worker_thread;
|
||||
slock_t *fifo_lock;
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
size_t buffer_size;
|
||||
size_t period_size;
|
||||
snd_pcm_uframes_t period_frames;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
bool has_float;
|
||||
volatile bool thread_dead;
|
||||
} alsa_thread_t;
|
||||
|
||||
static void alsa_worker_thread(void *data)
|
||||
@@ -64,7 +66,7 @@ static void alsa_worker_thread(void *data)
|
||||
size_t fifo_size;
|
||||
snd_pcm_sframes_t frames;
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = FIFO_READ_AVAIL(alsa->buffer);
|
||||
avail = fifo_read_avail(alsa->buffer);
|
||||
fifo_size = MIN(alsa->period_size, avail);
|
||||
fifo_read(alsa->buffer, buf, fifo_size);
|
||||
scond_signal(alsa->cond);
|
||||
@@ -173,11 +175,10 @@ static void *alsa_thread_init(const char *device,
|
||||
TRY_ALSA(snd_pcm_open(&alsa->pcm, alsa_dev, SND_PCM_STREAM_PLAYBACK, 0));
|
||||
|
||||
TRY_ALSA(snd_pcm_hw_params_malloc(¶ms));
|
||||
TRY_ALSA(snd_pcm_hw_params_any(alsa->pcm, params));
|
||||
|
||||
alsa->has_float = alsathread_find_float_format(alsa->pcm, params);
|
||||
format = alsa->has_float ? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;
|
||||
|
||||
TRY_ALSA(snd_pcm_hw_params_any(alsa->pcm, params));
|
||||
TRY_ALSA(snd_pcm_hw_params_set_access(
|
||||
alsa->pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED));
|
||||
TRY_ALSA(snd_pcm_hw_params_set_format(alsa->pcm, params, format));
|
||||
@@ -255,7 +256,7 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size)
|
||||
size_t write_amt;
|
||||
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(alsa->buffer);
|
||||
avail = fifo_write_avail(alsa->buffer);
|
||||
write_amt = MIN(avail, size);
|
||||
|
||||
fifo_write(alsa->buffer, buf, write_amt);
|
||||
@@ -270,7 +271,7 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t avail;
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(alsa->buffer);
|
||||
avail = fifo_write_avail(alsa->buffer);
|
||||
|
||||
if (avail == 0)
|
||||
{
|
||||
@@ -333,7 +334,7 @@ static size_t alsa_thread_write_avail(void *data)
|
||||
if (alsa->thread_dead)
|
||||
return 0;
|
||||
slock_lock(alsa->fifo_lock);
|
||||
val = FIFO_WRITE_AVAIL(alsa->buffer);
|
||||
val = fifo_write_avail(alsa->buffer);
|
||||
slock_unlock(alsa->fifo_lock);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
#include <sys/audioio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define DEFAULT_DEV "/dev/audio"
|
||||
@@ -36,9 +36,9 @@ static void *audioio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_out_rate)
|
||||
{
|
||||
struct audio_info info;
|
||||
int *fd = (int*)calloc(1, sizeof(int));
|
||||
const char *audiodev = device ? device : DEFAULT_DEV;
|
||||
int *fd = (int*)calloc(1, sizeof(int));
|
||||
struct audio_info info;
|
||||
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
+18
-17
@@ -31,24 +31,25 @@
|
||||
#include <retro_endianness.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "defines/cocoa_defines.h"
|
||||
|
||||
typedef struct coreaudio
|
||||
{
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
#if !HAS_MACOSX_10_12
|
||||
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
ComponentInstance dev;
|
||||
#else
|
||||
AudioComponentInstance dev;
|
||||
#endif
|
||||
fifo_buffer_t *buffer;
|
||||
size_t buffer_size;
|
||||
bool dev_alive;
|
||||
bool is_paused;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
bool nonblock;
|
||||
size_t buffer_size;
|
||||
} coreaudio_t;
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
@@ -65,7 +66,7 @@ static void coreaudio_free(void *data)
|
||||
if (dev->dev_alive)
|
||||
{
|
||||
AudioOutputUnitStop(dev->dev);
|
||||
#if !HAS_MACOSX_10_12
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
CloseComponent(dev->dev);
|
||||
#else
|
||||
AudioComponentInstanceDispose(dev->dev);
|
||||
@@ -102,7 +103,7 @@ static OSStatus audio_write_cb(void *userdata,
|
||||
|
||||
slock_lock(dev->lock);
|
||||
|
||||
if (FIFO_READ_AVAIL(dev->buffer) < write_avail)
|
||||
if (fifo_read_avail(dev->buffer) < write_avail)
|
||||
{
|
||||
*action_flags = kAudioUnitRenderAction_OutputIsSilence;
|
||||
|
||||
@@ -140,7 +141,7 @@ static void choose_output_device(coreaudio_t *dev, const char* device)
|
||||
UInt32 size = 0;
|
||||
|
||||
propaddr.mSelector = kAudioHardwarePropertyDevices;
|
||||
#if HAS_MACOSX_10_12
|
||||
#if MAC_OS_X_VERSION_10_12
|
||||
propaddr.mScope = kAudioObjectPropertyScopeOutput;
|
||||
#else
|
||||
propaddr.mScope = kAudioObjectPropertyScopeGlobal;
|
||||
@@ -158,7 +159,7 @@ static void choose_output_device(coreaudio_t *dev, const char* device)
|
||||
&propaddr, 0, 0, &size, devices) != noErr)
|
||||
goto done;
|
||||
|
||||
#if HAS_MACOSX_10_12
|
||||
#if MAC_OS_X_VERSION_10_12
|
||||
#else
|
||||
propaddr.mScope = kAudioDevicePropertyScopeOutput;
|
||||
#endif
|
||||
@@ -193,7 +194,7 @@ static void *coreaudio_init(const char *device,
|
||||
size_t fifo_size;
|
||||
UInt32 i_size;
|
||||
AudioStreamBasicDescription real_desc;
|
||||
#if !HAS_MACOSX_10_12
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
Component comp;
|
||||
#else
|
||||
AudioComponent comp;
|
||||
@@ -205,7 +206,7 @@ static void *coreaudio_init(const char *device,
|
||||
AudioStreamBasicDescription stream_desc = {0};
|
||||
bool component_unavailable = false;
|
||||
static bool session_initialized = false;
|
||||
#if !HAS_MACOSX_10_12
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
ComponentDescription desc = {0};
|
||||
#else
|
||||
AudioComponentDescription desc = {0};
|
||||
@@ -239,7 +240,7 @@ static void *coreaudio_init(const char *device,
|
||||
#endif
|
||||
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
||||
|
||||
#if !HAS_MACOSX_10_12
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
comp = FindNextComponent(NULL, &desc);
|
||||
#else
|
||||
comp = AudioComponentFindNext(NULL, &desc);
|
||||
@@ -247,7 +248,7 @@ static void *coreaudio_init(const char *device,
|
||||
if (!comp)
|
||||
goto error;
|
||||
|
||||
#if !HAS_MACOSX_10_12
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
component_unavailable = (OpenAComponent(comp, &dev->dev) != noErr);
|
||||
#else
|
||||
component_unavailable = (AudioComponentInstanceNew(comp, &dev->dev) != noErr);
|
||||
@@ -355,14 +356,14 @@ static ssize_t coreaudio_write(void *data, const void *buf_, size_t size)
|
||||
|
||||
slock_lock(dev->lock);
|
||||
|
||||
write_avail = FIFO_WRITE_AVAIL(dev->buffer);
|
||||
write_avail = fifo_write_avail(dev->buffer);
|
||||
if (write_avail > size)
|
||||
write_avail = size;
|
||||
|
||||
fifo_write(dev->buffer, buf, write_avail);
|
||||
buf += write_avail;
|
||||
buf += write_avail;
|
||||
written += write_avail;
|
||||
size -= write_avail;
|
||||
size -= write_avail;
|
||||
|
||||
if (dev->nonblock)
|
||||
{
|
||||
@@ -429,7 +430,7 @@ static size_t coreaudio_write_avail(void *data)
|
||||
coreaudio_t *dev = (coreaudio_t*)data;
|
||||
|
||||
slock_lock(dev->lock);
|
||||
avail = FIFO_WRITE_AVAIL(dev->buffer);
|
||||
avail = fifo_write_avail(dev->buffer);
|
||||
slock_unlock(dev->lock);
|
||||
|
||||
return avail;
|
||||
|
||||
+17
-18
@@ -22,8 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#pragma mark - ringbuffer
|
||||
|
||||
@@ -31,9 +30,9 @@ typedef struct ringbuffer
|
||||
{
|
||||
float *buffer;
|
||||
size_t cap;
|
||||
size_t write_ptr;
|
||||
size_t read_ptr;
|
||||
atomic_int len;
|
||||
size_t writePtr;
|
||||
size_t readPtr;
|
||||
} ringbuffer_t;
|
||||
|
||||
typedef ringbuffer_t * ringbuffer_h;
|
||||
@@ -45,7 +44,7 @@ static inline size_t rb_len(ringbuffer_h r)
|
||||
|
||||
static inline size_t rb_cap(ringbuffer_h r)
|
||||
{
|
||||
return (r->read_ptr + r->cap - r->write_ptr) % r->cap;
|
||||
return (r->readPtr + r->cap - r->writePtr) % r->cap;
|
||||
}
|
||||
|
||||
static inline size_t rb_avail(ringbuffer_h r)
|
||||
@@ -55,17 +54,17 @@ static inline size_t rb_avail(ringbuffer_h r)
|
||||
|
||||
static inline void rb_advance_write(ringbuffer_h r)
|
||||
{
|
||||
r->write_ptr = (r->write_ptr + 1) % r->cap;
|
||||
r->writePtr = (r->writePtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_write_n(ringbuffer_h r, size_t n)
|
||||
{
|
||||
r->write_ptr = (r->write_ptr + n) % r->cap;
|
||||
r->writePtr = (r->writePtr + n) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_read(ringbuffer_h r)
|
||||
{
|
||||
r->read_ptr = (r->read_ptr + 1) % r->cap;
|
||||
r->readPtr = (r->readPtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_len_add(ringbuffer_h r, int n)
|
||||
@@ -80,11 +79,11 @@ static inline void rb_len_sub(ringbuffer_h r, int n)
|
||||
|
||||
static void rb_init(ringbuffer_h r, size_t cap)
|
||||
{
|
||||
r->buffer = malloc(cap * sizeof(float));
|
||||
r->cap = cap;
|
||||
r->buffer = malloc(cap * sizeof(float));
|
||||
r->cap = cap;
|
||||
atomic_init(&r->len, 0);
|
||||
r->write_ptr = 0;
|
||||
r->read_ptr = 0;
|
||||
r->writePtr = 0;
|
||||
r->readPtr = 0;
|
||||
}
|
||||
|
||||
static void rb_free(ringbuffer_h r)
|
||||
@@ -103,13 +102,13 @@ static void rb_write_data(ringbuffer_h r, const float *data, size_t len)
|
||||
size_t first_write = n;
|
||||
size_t rest_write = 0;
|
||||
|
||||
if (r->write_ptr + n > r->cap)
|
||||
if (r->writePtr + n > r->cap)
|
||||
{
|
||||
first_write = r->cap - r->write_ptr;
|
||||
rest_write = n - first_write;
|
||||
first_write = r->cap - r->writePtr;
|
||||
rest_write = n - first_write;
|
||||
}
|
||||
|
||||
memcpy(r->buffer + r->write_ptr, data, first_write*sizeof(float));
|
||||
memcpy(r->buffer + r->writePtr, data, first_write*sizeof(float));
|
||||
memcpy(r->buffer, data + first_write, rest_write*sizeof(float));
|
||||
|
||||
rb_advance_write_n(r, n);
|
||||
@@ -127,9 +126,9 @@ static void rb_read_data(ringbuffer_h r,
|
||||
int i = 0;
|
||||
for (; i < n/2; i++)
|
||||
{
|
||||
d0[i] = r->buffer[r->read_ptr];
|
||||
d0[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
d1[i] = r->buffer[r->read_ptr];
|
||||
d1[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint64_t cpu_ticks_last;
|
||||
|
||||
bool nonblock;
|
||||
bool playing;
|
||||
int16_t* l;
|
||||
int16_t* r;
|
||||
|
||||
@@ -34,8 +34,7 @@ typedef struct
|
||||
uint32_t pos;
|
||||
|
||||
uint32_t playpos;
|
||||
bool nonblock;
|
||||
bool playing;
|
||||
uint64_t cpu_ticks_last;
|
||||
} ctr_csnd_audio_t;
|
||||
|
||||
#define CTR_CSND_AUDIO_COUNT (1u << 11u)
|
||||
|
||||
@@ -17,16 +17,17 @@
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../ctr/ctr_debug.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ndspWaveBuf dsp_buf; /* TODO/FIXME - find out alignment */
|
||||
int channel;
|
||||
uint32_t pos;
|
||||
bool nonblock;
|
||||
bool playing;
|
||||
int channel;
|
||||
ndspWaveBuf dsp_buf;
|
||||
|
||||
uint32_t pos;
|
||||
} ctr_dsp_audio_t;
|
||||
|
||||
#define CTR_DSP_AUDIO_COUNT (1u << 11u)
|
||||
@@ -107,15 +108,6 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
do{
|
||||
svcSleepThread(100000);
|
||||
|
||||
/* Run aptMainLoop to update APT state if DSP state
|
||||
* changed, this prevents a hang on sleep. */
|
||||
if(!aptMainLoop())
|
||||
{
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
sample_pos = ndspChnGetSamplePos(ctr->channel);
|
||||
}while (((sample_pos - (ctr->pos + (size >>2))) & CTR_DSP_AUDIO_COUNT_MASK) > (CTR_DSP_AUDIO_COUNT >> 1)
|
||||
|| (((ctr->pos - (CTR_DSP_AUDIO_COUNT >> 4) - sample_pos) & CTR_DSP_AUDIO_COUNT_MASK) > (CTR_DSP_AUDIO_COUNT >> 1)));
|
||||
|
||||
@@ -1,339 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2020 - Justin Weiss
|
||||
*
|
||||
* RetroArch 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 Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch 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 RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <3ds.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../ctr/ctr_debug.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fifo_buffer_t* fifo;
|
||||
size_t fifo_size;
|
||||
|
||||
slock_t* fifo_lock;
|
||||
scond_t* fifo_avail;
|
||||
scond_t* fifo_done;
|
||||
sthread_t* thread;
|
||||
|
||||
volatile bool running;
|
||||
|
||||
bool nonblocking;
|
||||
bool playing;
|
||||
retro_time_t frame_time;
|
||||
int channel;
|
||||
ndspWaveBuf dsp_buf;
|
||||
|
||||
uint32_t pos;
|
||||
} ctr_dsp_thread_audio_t;
|
||||
|
||||
// PCM16 stereo
|
||||
#define DSP_BYTES_TO_SAMPLES(bytes) (bytes / (2 * sizeof(uint16_t)))
|
||||
#define DSP_SAMPLES_TO_BYTES(samples) (samples * 2 * sizeof(uint16_t))
|
||||
|
||||
static void ctr_dsp_audio_loop(void* data)
|
||||
{
|
||||
uint32_t pos, buf_pos;
|
||||
ctr_dsp_thread_audio_t *ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return;
|
||||
|
||||
while (1)
|
||||
{
|
||||
size_t buf_avail, avail, to_write;
|
||||
slock_lock(ctr->fifo_lock);
|
||||
|
||||
do {
|
||||
avail = FIFO_READ_AVAIL(ctr->fifo);
|
||||
|
||||
if (!avail) {
|
||||
scond_wait(ctr->fifo_avail, ctr->fifo_lock);
|
||||
}
|
||||
} while (!avail && ctr->running);
|
||||
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
|
||||
if (!ctr->running)
|
||||
break;
|
||||
|
||||
pos = ctr->pos;
|
||||
buf_pos = DSP_SAMPLES_TO_BYTES(ndspChnGetSamplePos(ctr->channel));
|
||||
|
||||
buf_avail = buf_pos >= pos ? buf_pos - pos : ctr->fifo_size - pos;
|
||||
to_write = MIN(avail, buf_avail);
|
||||
|
||||
slock_lock(ctr->fifo_lock);
|
||||
|
||||
if (to_write > 0) {
|
||||
fifo_read(ctr->fifo, ctr->dsp_buf.data_pcm8 + pos, to_write);
|
||||
DSP_FlushDataCache(ctr->dsp_buf.data_pcm8 + pos, to_write);
|
||||
scond_signal(ctr->fifo_done);
|
||||
}
|
||||
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
|
||||
if (buf_pos == pos) {
|
||||
svcSleepThread(100000);
|
||||
}
|
||||
|
||||
ctr->pos = (pos + to_write) % ctr->fifo_size;
|
||||
}
|
||||
}
|
||||
|
||||
static void ctr_dsp_thread_audio_free(void *data);
|
||||
|
||||
static void *ctr_dsp_thread_audio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
ctr_dsp_thread_audio_t *ctr = NULL;
|
||||
|
||||
(void)device;
|
||||
(void)rate;
|
||||
|
||||
if (ndspInit() < 0)
|
||||
return NULL;
|
||||
|
||||
ctr = (ctr_dsp_thread_audio_t*)calloc(1, sizeof(ctr_dsp_thread_audio_t));
|
||||
|
||||
if (!ctr)
|
||||
return NULL;
|
||||
|
||||
*new_rate = 32728;
|
||||
|
||||
ctr->running = true;
|
||||
ctr->channel = 0;
|
||||
|
||||
ndspSetOutputMode(NDSP_OUTPUT_STEREO);
|
||||
ndspSetClippingMode(NDSP_CLIP_SOFT); /* ?? */
|
||||
ndspSetOutputCount(2);
|
||||
ndspChnReset(ctr->channel);
|
||||
ndspChnSetFormat(ctr->channel, NDSP_FORMAT_STEREO_PCM16);
|
||||
ndspChnSetInterp(ctr->channel, NDSP_INTERP_NONE);
|
||||
ndspChnSetRate(ctr->channel, 32728.0f);
|
||||
ndspChnWaveBufClear(ctr->channel);
|
||||
|
||||
ctr->fifo_size = DSP_SAMPLES_TO_BYTES((*new_rate * MAX(latency, 8)) / 1000);
|
||||
|
||||
ctr->dsp_buf.data_pcm16 = linearAlloc(ctr->fifo_size);
|
||||
memset(ctr->dsp_buf.data_pcm16, 0, ctr->fifo_size);
|
||||
DSP_FlushDataCache(ctr->dsp_buf.data_pcm16, ctr->fifo_size);
|
||||
|
||||
ctr->dsp_buf.looping = true;
|
||||
ctr->dsp_buf.nsamples = DSP_BYTES_TO_SAMPLES(ctr->fifo_size);
|
||||
ndspChnWaveBufAdd(ctr->channel, &ctr->dsp_buf);
|
||||
|
||||
ctr->fifo = fifo_new(ctr->fifo_size);
|
||||
|
||||
if (!(ctr->fifo_lock = slock_new()) ||
|
||||
!(ctr->fifo_avail = scond_new()) ||
|
||||
!(ctr->fifo_done = scond_new()) ||
|
||||
!(ctr->thread = sthread_create(ctr_dsp_audio_loop, ctr)))
|
||||
{
|
||||
RARCH_LOG("[Audio]: thread creation failed.\n");
|
||||
ctr->running = false;
|
||||
ctr_dsp_thread_audio_free(ctr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ctr->pos = 0;
|
||||
ctr->playing = true;
|
||||
|
||||
ctr->frame_time = (retro_time_t)roundf(1000000 * 4481134.0 / (*new_rate * 8192.0));
|
||||
|
||||
ndspSetMasterVol(1.0);
|
||||
|
||||
return ctr;
|
||||
}
|
||||
|
||||
static void ctr_dsp_thread_audio_free(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
if (!ctr)
|
||||
return;
|
||||
|
||||
if (ctr->running)
|
||||
{
|
||||
ctr->running = false;
|
||||
scond_signal(ctr->fifo_avail);
|
||||
}
|
||||
|
||||
if (ctr->thread)
|
||||
sthread_join(ctr->thread);
|
||||
|
||||
scond_free(ctr->fifo_avail);
|
||||
scond_free(ctr->fifo_done);
|
||||
slock_free(ctr->fifo_lock);
|
||||
|
||||
if (ctr->fifo)
|
||||
{
|
||||
fifo_free(ctr->fifo);
|
||||
ctr->fifo = NULL;
|
||||
}
|
||||
|
||||
ndspChnWaveBufClear(ctr->channel);
|
||||
|
||||
linearFree(ctr->dsp_buf.data_pcm16);
|
||||
|
||||
free(ctr);
|
||||
ndspExit();
|
||||
ctr = NULL;
|
||||
}
|
||||
|
||||
static ssize_t ctr_dsp_thread_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t avail, written;
|
||||
ctr_dsp_thread_audio_t * ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr || !ctr->running)
|
||||
return 0;
|
||||
|
||||
if (ctr->nonblocking)
|
||||
{
|
||||
slock_lock(ctr->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(ctr->fifo);
|
||||
written = MIN(avail, size);
|
||||
if (written > 0)
|
||||
{
|
||||
fifo_write(ctr->fifo, buf, written);
|
||||
scond_signal(ctr->fifo_avail);
|
||||
}
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
}
|
||||
else
|
||||
{
|
||||
written = 0;
|
||||
while (written < size && ctr->running)
|
||||
{
|
||||
slock_lock(ctr->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(ctr->fifo);
|
||||
if (avail == 0)
|
||||
{
|
||||
if (ctr->running)
|
||||
{
|
||||
/* Wait a maximum of one frame, skip the write if the thread is still busy */
|
||||
if (!scond_wait_timeout(ctr->fifo_done, ctr->fifo_lock, ctr->frame_time)) {
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t write_amt = MIN(size - written, avail);
|
||||
fifo_write(ctr->fifo, (const char*)buf + written, write_amt);
|
||||
scond_signal(ctr->fifo_avail);
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
written += write_amt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return written;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_stop(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return false;
|
||||
|
||||
ndspSetMasterVol(0.0);
|
||||
ctr->playing = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_alive(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return false;
|
||||
|
||||
return ctr->playing;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return false;
|
||||
|
||||
/* Prevents restarting audio when the menu
|
||||
* is toggled off on shutdown */
|
||||
if (is_shutdown)
|
||||
return true;
|
||||
|
||||
ndspSetMasterVol(1.0);
|
||||
ctr->playing = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ctr_dsp_thread_audio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
if (ctr)
|
||||
ctr->nonblocking = state;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static size_t ctr_dsp_thread_audio_write_avail(void *data)
|
||||
{
|
||||
size_t val;
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
slock_lock(ctr->fifo_lock);
|
||||
val = FIFO_WRITE_AVAIL(ctr->fifo);
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static size_t ctr_dsp_thread_audio_buffer_size(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
return ctr->fifo_size;
|
||||
}
|
||||
|
||||
audio_driver_t audio_ctr_dsp_thread = {
|
||||
ctr_dsp_thread_audio_init,
|
||||
ctr_dsp_thread_audio_write,
|
||||
ctr_dsp_thread_audio_stop,
|
||||
ctr_dsp_thread_audio_start,
|
||||
ctr_dsp_thread_audio_alive,
|
||||
ctr_dsp_thread_audio_set_nonblock_state,
|
||||
ctr_dsp_thread_audio_free,
|
||||
ctr_dsp_thread_audio_use_float,
|
||||
"dsp_thread",
|
||||
NULL,
|
||||
NULL,
|
||||
ctr_dsp_thread_audio_write_avail,
|
||||
ctr_dsp_thread_audio_buffer_size
|
||||
};
|
||||
+17
-11
@@ -39,7 +39,7 @@
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef _XBOX
|
||||
@@ -155,7 +155,7 @@ static DWORD CALLBACK dsound_thread(PVOID data)
|
||||
avail = write_avail(read_ptr, write_ptr, ds->buffer_size);
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
fifo_avail = FIFO_READ_AVAIL(ds->buffer);
|
||||
fifo_avail = fifo_read_avail(ds->buffer);
|
||||
LeaveCriticalSection(&ds->crit);
|
||||
|
||||
if (avail < CHUNK_SIZE || ((fifo_avail < CHUNK_SIZE) && (avail < ds->buffer_size / 2)))
|
||||
@@ -303,8 +303,7 @@ static void dsound_free(void *data)
|
||||
free(ds);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK enumerate_cb(LPGUID guid,
|
||||
LPCSTR desc, LPCSTR module, LPVOID context)
|
||||
static BOOL CALLBACK enumerate_cb(LPGUID guid, LPCSTR desc, LPCSTR module, LPVOID context)
|
||||
{
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *list = (struct string_list*)context;
|
||||
@@ -512,7 +511,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size)
|
||||
size_t avail;
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
avail = FIFO_WRITE_AVAIL(ds->buffer);
|
||||
avail = fifo_write_avail(ds->buffer);
|
||||
if (avail > size)
|
||||
avail = size;
|
||||
|
||||
@@ -531,7 +530,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size)
|
||||
size_t avail;
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
avail = FIFO_WRITE_AVAIL(ds->buffer);
|
||||
avail = fifo_write_avail(ds->buffer);
|
||||
if (avail > size)
|
||||
avail = size;
|
||||
|
||||
@@ -546,8 +545,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size)
|
||||
break;
|
||||
|
||||
if (avail == 0)
|
||||
if (!(WaitForSingleObject(ds->event, 50) == WAIT_OBJECT_0))
|
||||
return -1;
|
||||
WaitForSingleObject(ds->event, INFINITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,13 +558,21 @@ static size_t dsound_write_avail(void *data)
|
||||
dsound_t *ds = (dsound_t*)data;
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
avail = FIFO_WRITE_AVAIL(ds->buffer);
|
||||
avail = fifo_write_avail(ds->buffer);
|
||||
LeaveCriticalSection(&ds->crit);
|
||||
return avail;
|
||||
}
|
||||
|
||||
static size_t dsound_buffer_size(void *data) { return 4 * 1024; }
|
||||
static bool dsound_use_float(void *data) { return false; }
|
||||
static size_t dsound_buffer_size(void *data)
|
||||
{
|
||||
return 4 * 1024;
|
||||
}
|
||||
|
||||
static bool dsound_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void *dsound_list_new(void *u)
|
||||
{
|
||||
|
||||
@@ -27,17 +27,18 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include <defines/gx_defines.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../defines/gx_defines.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t write_ptr;
|
||||
uint32_t data[BLOCKS][CHUNK_FRAMES];
|
||||
|
||||
volatile unsigned dma_busy;
|
||||
volatile unsigned dma_next;
|
||||
volatile unsigned dma_write;
|
||||
size_t write_ptr;
|
||||
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} gx_audio_t;
|
||||
@@ -108,7 +109,7 @@ static INLINE void copy_swapped(uint32_t * restrict dst,
|
||||
{
|
||||
uint32_t s = *src++;
|
||||
*dst++ = (s >> 16) | (s << 16);
|
||||
} while (--size);
|
||||
}while(--size);
|
||||
}
|
||||
|
||||
static ssize_t gx_audio_write(void *data, const void *buf_, size_t size)
|
||||
|
||||
+75
-72
@@ -25,8 +25,7 @@
|
||||
#include <boolean.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define FRAMES(x) (x / (sizeof(float) * 2))
|
||||
@@ -35,44 +34,23 @@ typedef struct jack
|
||||
{
|
||||
jack_client_t *client;
|
||||
jack_port_t *ports[2];
|
||||
jack_ringbuffer_t *buffer;
|
||||
jack_ringbuffer_t *buffer[2];
|
||||
volatile bool shutdown;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
#endif
|
||||
size_t buffer_size;
|
||||
volatile bool shutdown;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} jack_t;
|
||||
|
||||
static size_t read_deinterleaved(float *dst[2], jack_nframes_t dst_offset,
|
||||
jack_ringbuffer_data_t buf, jack_nframes_t nframes)
|
||||
{
|
||||
int i;
|
||||
jack_nframes_t j, frames_avail;
|
||||
const float *src = (const float *)buf.buf;
|
||||
|
||||
if (nframes <= 0)
|
||||
return 0;
|
||||
|
||||
frames_avail = FRAMES(buf.len);
|
||||
nframes = nframes < frames_avail ? nframes : frames_avail;
|
||||
|
||||
for (j = 0; j < nframes; j++)
|
||||
for (i = 0; i < 2; i++)
|
||||
dst[i][dst_offset + j] = *src++;
|
||||
|
||||
return nframes;
|
||||
}
|
||||
|
||||
static int process_cb(jack_nframes_t nframes, void *data)
|
||||
{
|
||||
int i;
|
||||
jack_nframes_t read = 0;
|
||||
jack_nframes_t avail[2], min_avail;
|
||||
jack_t *jd = (jack_t*)data;
|
||||
jack_ringbuffer_data_t buf[2];
|
||||
float *dst[2];
|
||||
|
||||
if (nframes <= 0)
|
||||
{
|
||||
@@ -82,20 +60,23 @@ static int process_cb(jack_nframes_t nframes, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
dst[i] = (float *)jack_port_get_buffer(jd->ports[i], nframes);
|
||||
avail[0] = jack_ringbuffer_read_space(jd->buffer[0]);
|
||||
avail[1] = jack_ringbuffer_read_space(jd->buffer[1]);
|
||||
min_avail = ((avail[0] < avail[1]) ? avail[0] : avail[1]) / sizeof(jack_default_audio_sample_t);
|
||||
|
||||
jack_ringbuffer_get_read_vector(jd->buffer, buf);
|
||||
if (min_avail > nframes)
|
||||
min_avail = nframes;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
read += read_deinterleaved(dst, read, buf[i], nframes - read);
|
||||
{
|
||||
jack_nframes_t f;
|
||||
jack_default_audio_sample_t *out = (jack_default_audio_sample_t*)jack_port_get_buffer(jd->ports[i], nframes);
|
||||
|
||||
jack_ringbuffer_read_advance(jd->buffer, read * sizeof(float) * 2);
|
||||
|
||||
for (; read < nframes; read++)
|
||||
for (i = 0; i < 2; i++)
|
||||
dst[i][read] = 0.0f;
|
||||
jack_ringbuffer_read(jd->buffer[i], (char*)out, min_avail * sizeof(jack_default_audio_sample_t));
|
||||
|
||||
for (f = min_avail; f < nframes; f++)
|
||||
out[f] = 0.0f;
|
||||
}
|
||||
#ifdef HAVE_THREADS
|
||||
scond_signal(jd->cond);
|
||||
#endif
|
||||
@@ -115,13 +96,13 @@ static void shutdown_cb(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int parse_ports(char **dest_ports, const char **jports)
|
||||
static int parse_ports(const char *audio_device,
|
||||
char **dest_ports, const char **jports)
|
||||
{
|
||||
int i;
|
||||
char *save = NULL;
|
||||
int parsed = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *audio_device_cpy = strdup(settings->arrays.audio_device);
|
||||
char *audio_device_cpy = strdup(audio_device);
|
||||
const char *con = strtok_r(audio_device_cpy, ",", &save);
|
||||
|
||||
if (con)
|
||||
@@ -212,15 +193,17 @@ static void *ja_init(const char *device,
|
||||
jd->buffer_size = bufsize;
|
||||
|
||||
RARCH_LOG("[JACK]: Internal buffer size: %d frames.\n", (int)(bufsize / sizeof(jack_default_audio_sample_t)));
|
||||
|
||||
jd->buffer = jack_ringbuffer_create(bufsize);
|
||||
if (!jd->buffer)
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
RARCH_ERR("[JACK]: Failed to create buffers.\n");
|
||||
goto error;
|
||||
jd->buffer[i] = jack_ringbuffer_create(bufsize);
|
||||
if (!jd->buffer[i])
|
||||
{
|
||||
RARCH_ERR("[JACK]: Failed to create buffers.\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
parsed = parse_ports(dest_ports, jports);
|
||||
parsed = parse_ports(device, dest_ports, jports);
|
||||
|
||||
if (jack_activate(jd->client) < 0)
|
||||
{
|
||||
@@ -252,46 +235,65 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t ja_write(void *data, const void *buf_, size_t size)
|
||||
static size_t write_buffer(jack_t *jd, const float *buf, size_t size)
|
||||
{
|
||||
jack_t *jd = (jack_t*)data;
|
||||
const char *buf = (const char *)buf_;
|
||||
size_t written = 0;
|
||||
int i;
|
||||
size_t j, written = 0;
|
||||
jack_default_audio_sample_t out_deinterleaved_buffer[2][AUDIO_CHUNK_SIZE_NONBLOCKING * AUDIO_MAX_RATIO];
|
||||
size_t frames = FRAMES(size);
|
||||
|
||||
while (size > 0)
|
||||
/* Avoid buffer overflow if a DSP plugin generated a huge number of frames. */
|
||||
if (frames > AUDIO_CHUNK_SIZE_NONBLOCKING * AUDIO_MAX_RATIO)
|
||||
frames = AUDIO_CHUNK_SIZE_NONBLOCKING * AUDIO_MAX_RATIO;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
for (j = 0; j < frames; j++)
|
||||
out_deinterleaved_buffer[i][j] = buf[j * 2 + i];
|
||||
|
||||
while (written < frames)
|
||||
{
|
||||
size_t avail, to_write;
|
||||
|
||||
size_t avail[2], min_avail, write_frames;
|
||||
if (jd->shutdown)
|
||||
return 0;
|
||||
|
||||
avail = jack_ringbuffer_write_space(jd->buffer);
|
||||
avail[0] = jack_ringbuffer_write_space(jd->buffer[0]);
|
||||
avail[1] = jack_ringbuffer_write_space(jd->buffer[1]);
|
||||
|
||||
to_write = size < avail ? size : avail;
|
||||
/* make sure to only write multiples of the sample size */
|
||||
to_write = (to_write / sizeof(float)) * sizeof(float);
|
||||
min_avail = avail[0] < avail[1] ? avail[0] : avail[1];
|
||||
min_avail /= sizeof(float);
|
||||
|
||||
if (to_write > 0)
|
||||
write_frames = frames - written > min_avail ? min_avail : frames - written;
|
||||
|
||||
if (write_frames > 0)
|
||||
{
|
||||
jack_ringbuffer_write(jd->buffer, buf, to_write);
|
||||
buf += to_write;
|
||||
size -= to_write;
|
||||
written += to_write;
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
jack_ringbuffer_write(jd->buffer[i], (const char*)&out_deinterleaved_buffer[i][written],
|
||||
write_frames * sizeof(jack_default_audio_sample_t));
|
||||
}
|
||||
written += write_frames;
|
||||
}
|
||||
else if (!jd->nonblock)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
else
|
||||
{
|
||||
slock_lock(jd->cond_lock);
|
||||
scond_wait(jd->cond, jd->cond_lock);
|
||||
slock_unlock(jd->cond_lock);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
if (jd->nonblock)
|
||||
break;
|
||||
}
|
||||
|
||||
return written;
|
||||
return written * sizeof(float) * 2;
|
||||
}
|
||||
|
||||
static ssize_t ja_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
jack_t *jd = (jack_t*)data;
|
||||
|
||||
return write_buffer(jd, (const float*)buf, size);
|
||||
}
|
||||
|
||||
static bool ja_stop(void *data)
|
||||
@@ -338,8 +340,9 @@ static void ja_free(void *data)
|
||||
jack_client_close(jd->client);
|
||||
}
|
||||
|
||||
if (jd->buffer)
|
||||
jack_ringbuffer_free(jd->buffer);
|
||||
for (i = 0; i < 2; i++)
|
||||
if (jd->buffer[i])
|
||||
jack_ringbuffer_free(jd->buffer[i]);
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (jd->cond_lock)
|
||||
@@ -359,7 +362,7 @@ static bool ja_use_float(void *data)
|
||||
static size_t ja_write_avail(void *data)
|
||||
{
|
||||
jack_t *jd = (jack_t*)data;
|
||||
return jack_ringbuffer_write_space(jd->buffer);
|
||||
return jack_ringbuffer_write_space(jd->buffer[0]);
|
||||
}
|
||||
|
||||
static size_t ja_buffer_size(void *data)
|
||||
|
||||
+10
-7
@@ -33,7 +33,7 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define BUFSIZE 1024
|
||||
@@ -43,14 +43,17 @@ typedef struct al
|
||||
ALuint source;
|
||||
ALuint *buffers;
|
||||
ALuint *res_buf;
|
||||
size_t res_ptr;
|
||||
ALenum format;
|
||||
size_t num_buffers;
|
||||
int rate;
|
||||
|
||||
uint8_t tmpbuf[BUFSIZE];
|
||||
size_t tmpbuf_ptr;
|
||||
|
||||
ALCdevice *handle;
|
||||
ALCcontext *ctx;
|
||||
size_t res_ptr;
|
||||
size_t num_buffers;
|
||||
size_t tmpbuf_ptr;
|
||||
int rate;
|
||||
ALenum format;
|
||||
uint8_t tmpbuf[BUFSIZE];
|
||||
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} al_t;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
/* Helper macros, COM-style. */
|
||||
#define SLObjectItf_Realize(a, ...) ((*(a))->Realize(a, __VA_ARGS__))
|
||||
@@ -37,6 +37,9 @@ typedef struct sl
|
||||
{
|
||||
uint8_t **buffer;
|
||||
uint8_t *buffer_chunk;
|
||||
unsigned buffer_index;
|
||||
unsigned buffer_ptr;
|
||||
volatile unsigned buffered_blocks;
|
||||
|
||||
SLObjectItf engine_object;
|
||||
SLEngineItf engine;
|
||||
@@ -48,13 +51,10 @@ typedef struct sl
|
||||
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
unsigned buffer_index;
|
||||
unsigned buffer_ptr;
|
||||
volatile unsigned buffered_blocks;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
} sl_t;
|
||||
|
||||
static void opensl_callback(SLAndroidSimpleBufferQueueItf bq, void *ctx)
|
||||
@@ -67,7 +67,7 @@ static void opensl_callback(SLAndroidSimpleBufferQueueItf bq, void *ctx)
|
||||
#define GOTO_IF_FAIL(x) do { \
|
||||
if ((res = (x)) != SL_RESULT_SUCCESS) \
|
||||
goto error; \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
static void sl_free(void *data)
|
||||
{
|
||||
@@ -116,7 +116,7 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
if (!sl)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("[OpenSL]: Requested audio latency: %u ms.\n", latency);
|
||||
RARCH_LOG("[OpenSL]: Requested audio latency: %u ms.", latency);
|
||||
|
||||
GOTO_IF_FAIL(slCreateEngine(&sl->engine_object, 0, NULL, 0, NULL, NULL));
|
||||
GOTO_IF_FAIL(SLObjectItf_Realize(sl->engine_object, SL_BOOLEAN_FALSE));
|
||||
|
||||
+36
-51
@@ -30,10 +30,10 @@
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef HAVE_OSS_BSD
|
||||
@@ -42,27 +42,22 @@
|
||||
#define DEFAULT_OSS_DEV "/dev/dsp"
|
||||
#endif
|
||||
|
||||
typedef struct oss_audio
|
||||
{
|
||||
int fd;
|
||||
bool is_paused;
|
||||
} oss_audio_t;
|
||||
static bool oss_is_paused = false;
|
||||
|
||||
static void *oss_init(const char *device,
|
||||
unsigned rate, unsigned latency,
|
||||
static void *oss_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_out_rate)
|
||||
{
|
||||
int frags, frag, channels, format, new_rate;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)calloc(1, sizeof(oss_audio_t));
|
||||
int *fd = (int*)calloc(1, sizeof(int));
|
||||
const char *oss_device = device ? device : DEFAULT_OSS_DEV;
|
||||
|
||||
if (!ossaudio)
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
if ((ossaudio->fd = open(oss_device, O_WRONLY)) < 0)
|
||||
if ((*fd = open(oss_device, O_WRONLY)) < 0)
|
||||
{
|
||||
free(ossaudio);
|
||||
free(fd);
|
||||
perror("open");
|
||||
return NULL;
|
||||
}
|
||||
@@ -70,21 +65,21 @@ static void *oss_init(const char *device,
|
||||
frags = (latency * rate * 4) / (1000 * (1 << 10));
|
||||
frag = (frags << 16) | 10;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_SETFRAGMENT, &frag) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_SETFRAGMENT, &frag) < 0)
|
||||
RARCH_WARN("Cannot set fragment sizes. Latency might not be as expected ...\n");
|
||||
|
||||
channels = 2;
|
||||
format = is_little_endian() ? AFMT_S16_LE : AFMT_S16_BE;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_CHANNELS, &channels) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_CHANNELS, &channels) < 0)
|
||||
goto error;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_SETFMT, &format) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_SETFMT, &format) < 0)
|
||||
goto error;
|
||||
|
||||
new_rate = rate;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_SPEED, &new_rate) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_SPEED, &new_rate) < 0)
|
||||
goto error;
|
||||
|
||||
if (new_rate != (int)rate)
|
||||
@@ -93,12 +88,11 @@ static void *oss_init(const char *device,
|
||||
*new_out_rate = new_rate;
|
||||
}
|
||||
|
||||
return ossaudio;
|
||||
return fd;
|
||||
|
||||
error:
|
||||
close(ossaudio->fd);
|
||||
if (ossaudio)
|
||||
free(ossaudio);
|
||||
close(*fd);
|
||||
free(fd);
|
||||
perror("ioctl");
|
||||
return NULL;
|
||||
}
|
||||
@@ -106,14 +100,14 @@ error:
|
||||
static ssize_t oss_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
ssize_t ret;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (size == 0)
|
||||
return 0;
|
||||
|
||||
if ((ret = write(ossaudio->fd, buf, size)) < 0)
|
||||
if ((ret = write(*fd, buf, size)) < 0)
|
||||
{
|
||||
if (errno == EAGAIN && (fcntl(ossaudio->fd, F_GETFL) & O_NONBLOCK))
|
||||
if (errno == EAGAIN && (fcntl(*fd, F_GETFL) & O_NONBLOCK))
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
@@ -124,67 +118,58 @@ static ssize_t oss_write(void *data, const void *buf, size_t size)
|
||||
|
||||
static bool oss_stop(void *data)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
#if !defined(RETROFW)
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
ossaudio->is_paused = true;
|
||||
oss_is_paused = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool oss_start(void *data, bool is_shutdown)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
if (!ossaudio)
|
||||
return false;
|
||||
ossaudio->is_paused = false;
|
||||
(void)data;
|
||||
oss_is_paused = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool oss_alive(void *data)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
return !ossaudio->is_paused;
|
||||
(void)data;
|
||||
return !oss_is_paused;
|
||||
}
|
||||
|
||||
static void oss_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
int rc;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (state)
|
||||
rc = fcntl(ossaudio->fd, F_SETFL,
|
||||
fcntl(ossaudio->fd, F_GETFL) | O_NONBLOCK);
|
||||
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) | O_NONBLOCK);
|
||||
else
|
||||
rc = fcntl(ossaudio->fd, F_SETFL,
|
||||
fcntl(ossaudio->fd, F_GETFL) & (~O_NONBLOCK));
|
||||
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) & (~O_NONBLOCK));
|
||||
if (rc != 0)
|
||||
RARCH_WARN("Could not set nonblocking on OSS file descriptor. Will not be able to fast-forward.\n");
|
||||
}
|
||||
|
||||
static void oss_free(void *data)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
/*RETROFW IOCTL always returns EINVAL*/
|
||||
#if !defined(RETROFW)
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
return;
|
||||
#endif
|
||||
|
||||
close(ossaudio->fd);
|
||||
free(data);
|
||||
close(*fd);
|
||||
free(fd);
|
||||
}
|
||||
|
||||
static size_t oss_write_avail(void *data)
|
||||
{
|
||||
audio_buf_info info;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
{
|
||||
RARCH_ERR("[OSS]: SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
return 0;
|
||||
@@ -196,9 +181,9 @@ static size_t oss_write_avail(void *data)
|
||||
static size_t oss_buffer_size(void *data)
|
||||
{
|
||||
audio_buf_info info;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
{
|
||||
RARCH_ERR("[OSS]: SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
return 1; /* Return something non-zero to avoid SIGFPE. */
|
||||
|
||||
@@ -15,12 +15,13 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <kernel.h>
|
||||
#include <audsrv.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#define AUDIO_BUFFER 128 * 1024
|
||||
#define AUDIO_CHANNELS 2
|
||||
@@ -31,17 +32,26 @@ typedef struct ps2_audio
|
||||
/* TODO/FIXME - nonblock is not implemented */
|
||||
bool nonblock;
|
||||
bool running;
|
||||
|
||||
} ps2_audio_t;
|
||||
|
||||
static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
|
||||
{
|
||||
int err;
|
||||
struct audsrv_fmt_t format;
|
||||
|
||||
format.bits = AUDIO_BITS;
|
||||
format.freq = rate;
|
||||
format.channels = AUDIO_CHANNELS;
|
||||
|
||||
audsrv_set_format(&format);
|
||||
err = audsrv_set_format(&format);
|
||||
|
||||
if (err)
|
||||
{
|
||||
printf("set format returned %d\n", err);
|
||||
printf("audsrv returned error string: %s\n", audsrv_get_error_string());
|
||||
}
|
||||
|
||||
audsrv_set_volume(MAX_VOLUME);
|
||||
}
|
||||
|
||||
|
||||
+78
-73
@@ -19,26 +19,26 @@
|
||||
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#include <defines/ps3_defines.h>
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../defines/ps3_defines.h"
|
||||
|
||||
#define AUDIO_BLOCKS 8
|
||||
#define AUDIO_CHANNELS 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fifo_buffer_t *buffer;
|
||||
sys_ppu_thread_t thread;
|
||||
sys_lwmutex_t lock;
|
||||
sys_lwmutex_t cond_lock;
|
||||
sys_lwcond_t cond;
|
||||
uint32_t audio_port;
|
||||
bool nonblock;
|
||||
bool started;
|
||||
volatile bool quit_thread;
|
||||
} ps3_audio_t;
|
||||
fifo_buffer_t *buffer;
|
||||
|
||||
sys_ppu_thread_t thread;
|
||||
sys_lwmutex_t lock;
|
||||
sys_lwmutex_t cond_lock;
|
||||
sys_lwcond_t cond;
|
||||
} ps3_audio_t;
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
static void event_loop(void *data)
|
||||
@@ -46,34 +46,34 @@ static void event_loop(void *data)
|
||||
static void event_loop(uint64_t data)
|
||||
#endif
|
||||
{
|
||||
float out_tmp[AUDIO_BLOCK_SAMPLES * AUDIO_CHANNELS]
|
||||
float out_tmp[CELL_AUDIO_BLOCK_SAMPLES * AUDIO_CHANNELS]
|
||||
__attribute__((aligned(16)));
|
||||
sys_event_queue_t id;
|
||||
sys_ipc_key_t key;
|
||||
sys_event_t event;
|
||||
ps3_audio_t *aud = (ps3_audio_t*)(uintptr_t)data;
|
||||
|
||||
audioCreateNotifyEventQueue(&id, &key);
|
||||
audioSetNotifyEventQueue(key);
|
||||
cellAudioCreateNotifyEventQueue(&id, &key);
|
||||
cellAudioSetNotifyEventQueue(key);
|
||||
|
||||
while (!aud->quit_thread)
|
||||
{
|
||||
sysEventQueueReceive(id, &event, PS3_SYS_NO_TIMEOUT);
|
||||
sys_event_queue_receive(id, &event, SYS_NO_TIMEOUT);
|
||||
|
||||
sysLwMutexLock(&aud->lock, PS3_SYS_NO_TIMEOUT);
|
||||
if (FIFO_READ_AVAIL(aud->buffer) >= sizeof(out_tmp))
|
||||
sys_lwmutex_lock(&aud->lock, SYS_NO_TIMEOUT);
|
||||
if (fifo_read_avail(aud->buffer) >= sizeof(out_tmp))
|
||||
fifo_read(aud->buffer, out_tmp, sizeof(out_tmp));
|
||||
else
|
||||
memset(out_tmp, 0, sizeof(out_tmp));
|
||||
sysLwMutexUnlock(&aud->lock);
|
||||
sysLwCondSignal(&aud->cond);
|
||||
sys_lwmutex_unlock(&aud->lock);
|
||||
sys_lwcond_signal(&aud->cond);
|
||||
|
||||
audioAddData(aud->audio_port, out_tmp,
|
||||
AUDIO_BLOCK_SAMPLES, 1.0);
|
||||
cellAudioAddData(aud->audio_port, out_tmp,
|
||||
CELL_AUDIO_BLOCK_SAMPLES, 1.0);
|
||||
}
|
||||
|
||||
audioRemoveNotifyEventQueue(key);
|
||||
sysThreadExit(0);
|
||||
cellAudioRemoveNotifyEventQueue(key);
|
||||
sys_ppu_thread_exit(0);
|
||||
}
|
||||
|
||||
static void *ps3_audio_init(const char *device,
|
||||
@@ -81,63 +81,67 @@ static void *ps3_audio_init(const char *device,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
audioPortParam params;
|
||||
ps3_audio_t *data = NULL;
|
||||
CellAudioPortParam params;
|
||||
ps3_audio_t *data = calloc(1, sizeof(*data));
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
(void)latency;
|
||||
(void)device;
|
||||
(void)rate;
|
||||
|
||||
cellAudioInit();
|
||||
|
||||
params.numChannels = AUDIO_CHANNELS;
|
||||
params.numBlocks = AUDIO_BLOCKS;
|
||||
#if 0
|
||||
#ifdef HAVE_HEADSET
|
||||
if(global->console.sound.mode == SOUND_MODE_HEADSET)
|
||||
params.param_attrib = CELL_AUDIO_PORTATTR_OUT_SECONDARY;
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
params.param_attrib = 0;
|
||||
|
||||
if (cellAudioPortOpen(¶ms, &data->audio_port) != CELL_OK)
|
||||
{
|
||||
cellAudioQuit();
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->buffer = fifo_new(CELL_AUDIO_BLOCK_SAMPLES *
|
||||
AUDIO_CHANNELS * AUDIO_BLOCKS * sizeof(float));
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
sys_lwmutex_attr_t lock_attr =
|
||||
sys_lwmutex_attr_t lock_attr =
|
||||
{SYS_LWMUTEX_ATTR_PROTOCOL, SYS_LWMUTEX_ATTR_RECURSIVE, "\0"};
|
||||
sys_lwmutex_attr_t cond_lock_attr =
|
||||
{SYS_LWMUTEX_ATTR_PROTOCOL, SYS_LWMUTEX_ATTR_RECURSIVE, "\0"};
|
||||
sys_lwcond_attr_t cond_attr = {"\0"};
|
||||
sys_lwcond_attribute_t cond_attr = {"\0"};
|
||||
#else
|
||||
sys_lwmutex_attr_t lock_attr;
|
||||
sys_lwmutex_attr_t cond_lock_attr;
|
||||
sys_lwcond_attr_t cond_attr;
|
||||
sys_lwmutex_attribute_t lock_attr;
|
||||
sys_lwmutex_attribute_t cond_lock_attr;
|
||||
sys_lwcond_attribute_t cond_attr;
|
||||
|
||||
sys_lwmutex_attribute_initialize(lock_attr);
|
||||
sys_lwmutex_attribute_initialize(cond_lock_attr);
|
||||
sys_lwcond_attribute_initialize(cond_attr);
|
||||
#endif
|
||||
|
||||
data = calloc(1, sizeof(*data));
|
||||
if (!data)
|
||||
return NULL;
|
||||
sys_lwmutex_create(&data->lock, &lock_attr);
|
||||
sys_lwmutex_create(&data->cond_lock, &cond_lock_attr);
|
||||
sys_lwcond_create(&data->cond, &data->cond_lock, &cond_attr);
|
||||
|
||||
audioInit();
|
||||
|
||||
params.numChannels = AUDIO_CHANNELS;
|
||||
params.numBlocks = AUDIO_BLOCKS;
|
||||
params.param_attrib = 0;
|
||||
#if 0
|
||||
#ifdef HAVE_HEADSET
|
||||
if(global->console.sound.mode == SOUND_MODE_HEADSET)
|
||||
params.param_attrib = CELL_AUDIO_PORTATTR_OUT_SECONDARY;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (audioPortOpen(¶ms, &data->audio_port) != CELL_OK)
|
||||
{
|
||||
audioQuit();
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->buffer = fifo_new(AUDIO_BLOCK_SAMPLES *
|
||||
AUDIO_CHANNELS * AUDIO_BLOCKS * sizeof(float));
|
||||
|
||||
sysLwMutexCreate(&data->lock, &lock_attr);
|
||||
sysLwMutexCreate(&data->cond_lock, &cond_lock_attr);
|
||||
sysLwCondCreate(&data->cond, &data->cond_lock, &cond_attr);
|
||||
|
||||
audioPortStart(data->audio_port);
|
||||
cellAudioPortStart(data->audio_port);
|
||||
data->started = true;
|
||||
sysThreadCreate(&data->thread, event_loop,
|
||||
sys_ppu_thread_create(&data->thread, event_loop,
|
||||
#ifdef __PSL1GHT__
|
||||
data,
|
||||
#else
|
||||
(uint64_t)data,
|
||||
#endif
|
||||
1500, 0x1000, SYS_THREAD_CREATE_JOINABLE, (char*)"sound");
|
||||
1500, 0x1000, SYS_PPU_THREAD_CREATE_JOINABLE, (char*)"sound");
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -148,16 +152,16 @@ static ssize_t ps3_audio_write(void *data, const void *buf, size_t size)
|
||||
|
||||
if (aud->nonblock)
|
||||
{
|
||||
if (FIFO_WRITE_AVAIL(aud->buffer) < size)
|
||||
if (fifo_write_avail(aud->buffer) < size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (FIFO_WRITE_AVAIL(aud->buffer) < size)
|
||||
sysLwCondWait(&aud->cond, 0);
|
||||
while (fifo_write_avail(aud->buffer) < size)
|
||||
sys_lwcond_wait(&aud->cond, 0);
|
||||
|
||||
sysLwMutexLock(&aud->lock, PS3_SYS_NO_TIMEOUT);
|
||||
sys_lwmutex_lock(&aud->lock, SYS_NO_TIMEOUT);
|
||||
fifo_write(aud->buffer, buf, size);
|
||||
sysLwMutexUnlock(&aud->lock);
|
||||
sys_lwmutex_unlock(&aud->lock);
|
||||
|
||||
return size;
|
||||
}
|
||||
@@ -167,7 +171,7 @@ static bool ps3_audio_stop(void *data)
|
||||
ps3_audio_t *aud = data;
|
||||
if (aud->started)
|
||||
{
|
||||
audioPortStop(aud->audio_port);
|
||||
cellAudioPortStop(aud->audio_port);
|
||||
aud->started = false;
|
||||
}
|
||||
return true;
|
||||
@@ -178,7 +182,7 @@ static bool ps3_audio_start(void *data, bool is_shutdown)
|
||||
ps3_audio_t *aud = data;
|
||||
if (!aud->started)
|
||||
{
|
||||
audioPortStart(aud->audio_port);
|
||||
cellAudioPortStart(aud->audio_port);
|
||||
aud->started = true;
|
||||
}
|
||||
return true;
|
||||
@@ -206,28 +210,29 @@ static void ps3_audio_free(void *data)
|
||||
|
||||
aud->quit_thread = true;
|
||||
ps3_audio_start(aud, false);
|
||||
sysThreadJoin(aud->thread, &val);
|
||||
sys_ppu_thread_join(aud->thread, &val);
|
||||
|
||||
ps3_audio_stop(aud);
|
||||
audioPortClose(aud->audio_port);
|
||||
audioQuit();
|
||||
cellAudioPortClose(aud->audio_port);
|
||||
cellAudioQuit();
|
||||
fifo_free(aud->buffer);
|
||||
|
||||
sysLwMutexDestroy(&aud->lock);
|
||||
sysLwMutexDestroy(&aud->cond_lock);
|
||||
sysLwCondDestroy(&aud->cond);
|
||||
sys_lwmutex_destroy(&aud->lock);
|
||||
sys_lwmutex_destroy(&aud->cond_lock);
|
||||
sys_lwcond_destroy(&aud->cond);
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
||||
static bool ps3_audio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static size_t ps3_audio_write_avail(void *data)
|
||||
{
|
||||
/* TODO/FIXME - implement? */
|
||||
(void)data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+34
-42
@@ -40,54 +40,49 @@
|
||||
#define SceUID uint32_t
|
||||
#endif
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct psp_audio
|
||||
{
|
||||
bool nonblock;
|
||||
|
||||
uint32_t* buffer;
|
||||
uint32_t* zeroBuffer;
|
||||
|
||||
SceUID thread;
|
||||
int rate;
|
||||
|
||||
volatile bool running;
|
||||
volatile uint16_t read_pos;
|
||||
volatile uint16_t write_pos;
|
||||
|
||||
sthread_t *worker_thread;
|
||||
slock_t *fifo_lock;
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
|
||||
SceUID thread;
|
||||
|
||||
int port;
|
||||
|
||||
volatile uint16_t read_pos;
|
||||
volatile uint16_t write_pos;
|
||||
|
||||
volatile bool running;
|
||||
bool nonblock;
|
||||
} psp_audio_t;
|
||||
|
||||
#define AUDIO_OUT_COUNT 512u
|
||||
#define AUDIO_BUFFER_SIZE (1u<<13u)
|
||||
#define AUDIO_BUFFER_SIZE_MASK (AUDIO_BUFFER_SIZE-1)
|
||||
|
||||
/* Return port used */
|
||||
static int configureAudio(unsigned rate) {
|
||||
int port;
|
||||
#if defined(VITA)
|
||||
port = sceAudioOutOpenPort(
|
||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
|
||||
rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||
#elif defined(ORBIS)
|
||||
port = sceAudioOutOpen(0xff,
|
||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, 0, AUDIO_OUT_COUNT,
|
||||
rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||
#else
|
||||
port = sceAudioSRCChReserve(AUDIO_OUT_COUNT, rate, 2);
|
||||
#endif
|
||||
return port;
|
||||
}
|
||||
|
||||
static void audioMainLoop(void *data)
|
||||
{
|
||||
psp_audio_t* psp = (psp_audio_t*)data;
|
||||
|
||||
#if defined(VITA)
|
||||
int port = sceAudioOutOpenPort(
|
||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
|
||||
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||
#elif defined(ORBIS)
|
||||
int port = sceAudioOutOpen(0xff,
|
||||
SCE_AUDIO_OUT_PORT_TYPE_MAIN, 0, AUDIO_OUT_COUNT,
|
||||
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
|
||||
#else
|
||||
sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2);
|
||||
#endif
|
||||
|
||||
while (psp->running)
|
||||
{
|
||||
bool cond = false;
|
||||
@@ -112,7 +107,7 @@ static void audioMainLoop(void *data)
|
||||
slock_unlock(psp->cond_lock);
|
||||
|
||||
#if defined(VITA) || defined(ORBIS)
|
||||
sceAudioOutOutput(psp->port,
|
||||
sceAudioOutOutput(port,
|
||||
cond ? (psp->zeroBuffer)
|
||||
: (psp->buffer + read_pos_2));
|
||||
#else
|
||||
@@ -121,6 +116,14 @@ static void audioMainLoop(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(VITA)
|
||||
sceAudioOutReleasePort(port);
|
||||
#elif defined(ORBIS)
|
||||
sceAudioOutClose(port);
|
||||
#else
|
||||
sceAudioSRCChRelease();
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -134,9 +137,8 @@ static void *psp_audio_init(const char *device,
|
||||
if (!psp)
|
||||
return NULL;
|
||||
|
||||
int port = configureAudio(rate);
|
||||
if (port < 0)
|
||||
return NULL;
|
||||
(void)device;
|
||||
(void)latency;
|
||||
|
||||
#ifdef ORBIS
|
||||
psp->buffer = (uint32_t*)
|
||||
@@ -159,7 +161,7 @@ static void *psp_audio_init(const char *device,
|
||||
|
||||
psp->read_pos = 0;
|
||||
psp->write_pos = 0;
|
||||
psp->port = port;
|
||||
psp->rate = rate;
|
||||
|
||||
psp->fifo_lock = slock_new();
|
||||
psp->cond_lock = slock_new();
|
||||
@@ -195,17 +197,7 @@ static void psp_audio_free(void *data)
|
||||
free(psp->buffer);
|
||||
psp->worker_thread = NULL;
|
||||
free(psp->zeroBuffer);
|
||||
|
||||
#if defined(VITA)
|
||||
sceAudioOutReleasePort(psp->port);
|
||||
#elif defined(ORBIS)
|
||||
sceAudioOutClose(psp->port);
|
||||
#else
|
||||
sceAudioSRCChRelease();
|
||||
#endif
|
||||
|
||||
free(psp);
|
||||
|
||||
}
|
||||
|
||||
static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct
|
||||
@@ -105,11 +105,8 @@ static bool ra_alive(void *data)
|
||||
static void ra_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
roar_t *roar = (roar_t*)data;
|
||||
|
||||
if (roar_vs_blocking(roar->vss, (state) ? ROAR_VS_FALSE : ROAR_VS_TRUE, NULL) < 0)
|
||||
{
|
||||
RARCH_ERR("Can't set nonblocking. Will not be able to fast-forward.\n");
|
||||
}
|
||||
fprintf(stderr, "RetroArch [ERROR]: Can't set nonblocking. Will not be able to fast-forward.\n");
|
||||
roar->nonblocking = state;
|
||||
}
|
||||
|
||||
|
||||
+12
-11
@@ -21,26 +21,27 @@
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "rsound.h"
|
||||
|
||||
typedef struct rsd
|
||||
{
|
||||
rsound_t *rd;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
slock_t *cond_lock;
|
||||
scond_t *cond;
|
||||
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
volatile bool has_error;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
|
||||
slock_t *cond_lock;
|
||||
scond_t *cond;
|
||||
} rsd_t;
|
||||
|
||||
static ssize_t rsound_audio_cb(void *data, size_t bytes, void *userdata)
|
||||
{
|
||||
rsd_t *rsd = (rsd_t*)userdata;
|
||||
size_t avail = FIFO_READ_AVAIL(rsd->buffer);
|
||||
rsd_t *rsd = (rsd_t*)userdata;
|
||||
|
||||
size_t avail = fifo_read_avail(rsd->buffer);
|
||||
size_t write_size = bytes > avail ? avail : bytes;
|
||||
fifo_read(rsd->buffer, data, write_size);
|
||||
scond_signal(rsd->cond);
|
||||
@@ -114,7 +115,7 @@ static ssize_t rs_write(void *data, const void *buf, size_t size)
|
||||
|
||||
rsd_callback_lock(rsd->rd);
|
||||
|
||||
avail = FIFO_WRITE_AVAIL(rsd->buffer);
|
||||
avail = fifo_write_avail(rsd->buffer);
|
||||
write_amt = avail > size ? size : avail;
|
||||
|
||||
fifo_write(rsd->buffer, buf, write_amt);
|
||||
@@ -129,7 +130,7 @@ static ssize_t rs_write(void *data, const void *buf, size_t size)
|
||||
size_t avail;
|
||||
rsd_callback_lock(rsd->rd);
|
||||
|
||||
avail = FIFO_WRITE_AVAIL(rsd->buffer);
|
||||
avail = fifo_write_avail(rsd->buffer);
|
||||
|
||||
if (avail == 0)
|
||||
{
|
||||
@@ -208,7 +209,7 @@ static size_t rs_write_avail(void *data)
|
||||
if (rsd->has_error)
|
||||
return 0;
|
||||
rsd_callback_lock(rsd->rd);
|
||||
val = FIFO_WRITE_AVAIL(rsd->buffer);
|
||||
val = fifo_write_avail(rsd->buffer);
|
||||
rsd_callback_unlock(rsd->rd);
|
||||
return val;
|
||||
}
|
||||
|
||||
+34
-27
@@ -18,7 +18,7 @@
|
||||
#include <unistd.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
/* forward declarations */
|
||||
unsigned RWebAudioSampleRate(void);
|
||||
@@ -30,69 +30,76 @@ void RWebAudioSetNonblockState(bool state);
|
||||
void RWebAudioFree(void);
|
||||
size_t RWebAudioWriteAvail(void);
|
||||
size_t RWebAudioBufferSize(void);
|
||||
|
||||
typedef struct rweb_audio
|
||||
{
|
||||
bool is_paused;
|
||||
} rweb_audio_t;
|
||||
static bool rwebaudio_is_paused;
|
||||
|
||||
static void rwebaudio_free(void *data)
|
||||
{
|
||||
RWebAudioFree();
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void *rwebaudio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)calloc(1, sizeof(rweb_audio_t));
|
||||
if (!rwebaudio)
|
||||
return NULL;
|
||||
if (RWebAudioInit(latency))
|
||||
void *data = RWebAudioInit(latency);
|
||||
|
||||
(void)device;
|
||||
(void)rate;
|
||||
|
||||
if (data)
|
||||
*new_rate = RWebAudioSampleRate();
|
||||
return rwebaudio;
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t rwebaudio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
return RWebAudioWrite(buf, size);
|
||||
}
|
||||
|
||||
static bool rwebaudio_stop(void *data)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)data;
|
||||
if (!rwebaudio)
|
||||
return false;
|
||||
rwebaudio->is_paused = true;
|
||||
(void)data;
|
||||
rwebaudio_is_paused = true;
|
||||
return RWebAudioStop();
|
||||
}
|
||||
|
||||
static void rwebaudio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
RWebAudioSetNonblockState(state);
|
||||
}
|
||||
|
||||
static bool rwebaudio_alive(void *data)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)data;
|
||||
if (!rwebaudio)
|
||||
return false;
|
||||
return !rwebaudio->is_paused;
|
||||
(void)data;
|
||||
return !rwebaudio_is_paused;
|
||||
}
|
||||
|
||||
static bool rwebaudio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)data;
|
||||
if (!rwebaudio)
|
||||
return false;
|
||||
rwebaudio->is_paused = false;
|
||||
(void)data;
|
||||
rwebaudio_is_paused = false;
|
||||
return RWebAudioStart();
|
||||
}
|
||||
|
||||
static size_t rwebaudio_write_avail(void *data) {return RWebAudioWriteAvail();}
|
||||
static size_t rwebaudio_buffer_size(void *data) {return RWebAudioBufferSize();}
|
||||
static bool rwebaudio_use_float(void *data) { return true; }
|
||||
static size_t rwebaudio_write_avail(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return RWebAudioWriteAvail();
|
||||
}
|
||||
|
||||
static size_t rwebaudio_buffer_size(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return RWebAudioBufferSize();
|
||||
}
|
||||
|
||||
static bool rwebaudio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
audio_driver_t audio_rwebaudio = {
|
||||
rwebaudio_init,
|
||||
|
||||
+16
-19
@@ -25,27 +25,28 @@
|
||||
#include <retro_inline.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_audio.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct sdl_audio
|
||||
{
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
#endif
|
||||
fifo_buffer_t *buffer;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} sdl_audio_t;
|
||||
|
||||
static void sdl_audio_cb(void *data, Uint8 *stream, int len)
|
||||
{
|
||||
sdl_audio_t *sdl = (sdl_audio_t*)data;
|
||||
size_t avail = FIFO_READ_AVAIL(sdl->buffer);
|
||||
size_t avail = fifo_read_avail(sdl->buffer);
|
||||
size_t write_size = len > (int)avail ? avail : len;
|
||||
|
||||
fifo_read(sdl->buffer, stream, write_size);
|
||||
@@ -74,24 +75,19 @@ static void *sdl_audio_init(const char *device,
|
||||
int frames;
|
||||
size_t bufsize;
|
||||
SDL_AudioSpec out;
|
||||
SDL_AudioSpec spec = {0};
|
||||
void *tmp = NULL;
|
||||
sdl_audio_t *sdl = NULL;
|
||||
uint32_t sdl_subsystem_flags = SDL_WasInit(0);
|
||||
SDL_AudioSpec spec = {0};
|
||||
void *tmp = NULL;
|
||||
sdl_audio_t *sdl = NULL;
|
||||
|
||||
(void)device;
|
||||
|
||||
/* Initialise audio subsystem, if required */
|
||||
if (sdl_subsystem_flags == 0)
|
||||
if (SDL_WasInit(0) == 0)
|
||||
{
|
||||
if (SDL_Init(SDL_INIT_AUDIO) < 0)
|
||||
return NULL;
|
||||
}
|
||||
else if ((sdl_subsystem_flags & SDL_INIT_AUDIO) == 0)
|
||||
{
|
||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||
return NULL;
|
||||
}
|
||||
else if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||
return NULL;
|
||||
|
||||
sdl = (sdl_audio_t*)calloc(1, sizeof(*sdl));
|
||||
if (!sdl)
|
||||
@@ -155,7 +151,7 @@ static ssize_t sdl_audio_write(void *data, const void *buf, size_t size)
|
||||
size_t avail, write_amt;
|
||||
|
||||
SDL_LockAudio();
|
||||
avail = FIFO_WRITE_AVAIL(sdl->buffer);
|
||||
avail = fifo_write_avail(sdl->buffer);
|
||||
write_amt = avail > size ? size : avail;
|
||||
fifo_write(sdl->buffer, buf, write_amt);
|
||||
SDL_UnlockAudio();
|
||||
@@ -170,7 +166,7 @@ static ssize_t sdl_audio_write(void *data, const void *buf, size_t size)
|
||||
size_t avail;
|
||||
|
||||
SDL_LockAudio();
|
||||
avail = FIFO_WRITE_AVAIL(sdl->buffer);
|
||||
avail = fifo_write_avail(sdl->buffer);
|
||||
|
||||
if (avail == 0)
|
||||
{
|
||||
@@ -232,6 +228,7 @@ static void sdl_audio_free(void *data)
|
||||
sdl_audio_t *sdl = (sdl_audio_t*)data;
|
||||
|
||||
SDL_CloseAudio();
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
|
||||
if (sdl)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "switch_audio_compat.h"
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
@@ -29,11 +29,12 @@
|
||||
#define BUFFER_COUNT 3
|
||||
#endif
|
||||
|
||||
|
||||
#define SAMPLE_RATE 48000
|
||||
#define NUM_CHANNELS 2
|
||||
|
||||
#define SAMPLE_BUFFER_SIZE (((SAMPLE_RATE * NUM_CHANNELS * sizeof(uint16_t)) + 0xfff) & ~0xfff)
|
||||
static const int sample_rate = 48000;
|
||||
static const int max_num_samples = sample_rate;
|
||||
static const int num_channels = 2;
|
||||
#ifndef HAVE_LIBNX
|
||||
static const size_t sample_buffer_size = ((max_num_samples * num_channels * sizeof(uint16_t)) + 0xfff) & ~0xfff;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -50,26 +51,24 @@ typedef struct
|
||||
#endif
|
||||
} switch_audio_t;
|
||||
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
static const int framerate = 1000 / 30;
|
||||
static const int sample_count = (SAMPLE_RATE / framerate);
|
||||
return (sample_count * NUM_CHANNELS * sizeof(uint16_t));
|
||||
}
|
||||
static const int framerate = 1000 / 30;
|
||||
static const int samplecount = (sample_rate / framerate);
|
||||
return (samplecount * num_channels * sizeof(uint16_t));
|
||||
#else
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
return SAMPLE_BUFFER_SIZE;
|
||||
}
|
||||
return sample_buffer_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
static size_t switch_audio_buffer_size(void *data)
|
||||
{
|
||||
(void) data;
|
||||
#ifdef HAVE_LIBNX
|
||||
return (switch_audio_data_size() + 0xfff) & ~0xfff;
|
||||
#else
|
||||
return SAMPLE_BUFFER_SIZE;
|
||||
return sample_buffer_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -86,7 +85,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
uint32_t num;
|
||||
if (switch_audio_ipc_output_get_released_buffer(swa, num) != 0)
|
||||
{
|
||||
RARCH_ERR("[Audio]: Failed to get released buffer?\n");
|
||||
RARCH_LOG("Failed to get released buffer?\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -107,7 +106,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
num = 0;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
if (audoutWaitPlayFinish(&swa->current_buffer, &num, UINT64_MAX) != 0) { }
|
||||
if (audoutWaitPlayFinish(&swa->current_buffer, &num, U64_MAX) != 0) { }
|
||||
#else
|
||||
svcWaitSynchronization(&handle_idx, &swa->event, 1, 33333333);
|
||||
svcResetSignal(swa->event);
|
||||
@@ -124,11 +123,11 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
if (to_write > switch_audio_buffer_size(NULL) - swa->current_buffer->data_size)
|
||||
to_write = switch_audio_buffer_size(NULL) - swa->current_buffer->data_size;
|
||||
|
||||
#ifndef HAVE_LIBNX
|
||||
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
|
||||
#else
|
||||
memcpy(((uint8_t*) swa->current_buffer->buffer) + swa->current_buffer->data_size, buf, to_write);
|
||||
#endif
|
||||
#ifndef HAVE_LIBNX
|
||||
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
|
||||
#else
|
||||
memcpy(((uint8_t*) swa->current_buffer->buffer) + swa->current_buffer->data_size, buf, to_write);
|
||||
#endif
|
||||
swa->current_buffer->data_size += to_write;
|
||||
swa->current_buffer->buffer_size = switch_audio_buffer_size(NULL);
|
||||
|
||||
@@ -152,6 +151,7 @@ static bool switch_audio_stop(void *data)
|
||||
|
||||
/* TODO/FIXME - fix libnx codepath */
|
||||
#ifndef HAVE_LIBNX
|
||||
|
||||
if (!swa->is_paused)
|
||||
if (switch_audio_ipc_output_stop(swa) != 0)
|
||||
return false;
|
||||
@@ -211,7 +211,8 @@ static void switch_audio_free(void *data)
|
||||
|
||||
static bool switch_audio_use_float(void *data)
|
||||
{
|
||||
return false; /* force INT16 */
|
||||
(void) data;
|
||||
return false; /* force INT16 */
|
||||
}
|
||||
|
||||
static size_t switch_audio_write_avail(void *data)
|
||||
@@ -238,8 +239,8 @@ static void *switch_audio_init(const char *device,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
unsigned i;
|
||||
#ifndef HAVE_LIBNX
|
||||
char names[8][0x20];
|
||||
#ifndef HAVE_LIBNX
|
||||
uint32_t num_names = 0;
|
||||
#endif
|
||||
switch_audio_t *swa = (switch_audio_t*) calloc(1, sizeof(*swa));
|
||||
@@ -266,16 +267,16 @@ static void *switch_audio_init(const char *device,
|
||||
if (audio_ipc_open_output(names[0], &swa->output) != 0)
|
||||
goto fail_audio_ipc;
|
||||
|
||||
if (swa->output.sample_rate != SAMPLE_RATE)
|
||||
if (swa->output.sample_rate != sample_rate)
|
||||
{
|
||||
RARCH_ERR("expected sample rate of %d, got sample rate of %d\n",
|
||||
SAMPLE_RATE, swa->output.sample_rate);
|
||||
sample_rate, swa->output.sample_rate);
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
if (swa->output.num_channels != NUM_CHANNELS)
|
||||
if (swa->output.num_channels != num_channels)
|
||||
{
|
||||
RARCH_ERR("expected %d channels, got %d\n", NUM_CHANNELS,
|
||||
RARCH_ERR("expected %d channels, got %d\n", num_channels,
|
||||
swa->output.num_channels);
|
||||
goto fail_audio_output;
|
||||
}
|
||||
@@ -307,8 +308,7 @@ static void *switch_audio_init(const char *device,
|
||||
#else
|
||||
swa->buffers[i].ptr = &swa->buffers[i].sample_data;
|
||||
swa->buffers[i].unknown = 0;
|
||||
swa->buffers[i].sample_data = alloc_pages(SAMPLE_BUFFER_SIZE,
|
||||
switch_audio_buffer_size(NULL), NULL);
|
||||
swa->buffers[i].sample_data = alloc_pages(sample_buffer_size, switch_audio_buffer_size(NULL), NULL);
|
||||
|
||||
if (!swa->buffers[i].sample_data)
|
||||
goto fail_audio_output;
|
||||
|
||||
@@ -46,10 +46,6 @@ typedef AudioOutBuffer compat_audio_out_buffer;
|
||||
#define switch_audio_ipc_output_stop(a) audoutStopAudioOut()
|
||||
#define switch_audio_ipc_output_start(a) audoutStartAudioOut()
|
||||
|
||||
#ifndef UINT64_MAX
|
||||
#define UINT64_MAX U64_MAX
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/* libtransistor definitions */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define BUFFER_COUNT 5
|
||||
@@ -241,7 +241,7 @@ static ssize_t libnx_audren_audio_write(void *data,
|
||||
|
||||
if (aud->nonblock)
|
||||
{
|
||||
while (written < size)
|
||||
while(written < size)
|
||||
{
|
||||
written += libnx_audren_audio_append(
|
||||
aud, buf + written, size - written);
|
||||
@@ -251,7 +251,7 @@ static ssize_t libnx_audren_audio_write(void *data,
|
||||
}
|
||||
else
|
||||
{
|
||||
while (written < size)
|
||||
while(written < size)
|
||||
{
|
||||
written += libnx_audren_audio_append(
|
||||
aud, buf + written, size - written);
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
#include <switch.h>
|
||||
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
@@ -97,7 +96,7 @@ static void thread_job(void* data)
|
||||
if (current_wavebuf)
|
||||
{
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = aud->paused ? 0 : FIFO_READ_AVAIL(aud->fifo);
|
||||
available = aud->paused ? 0 : fifo_read_avail(aud->fifo);
|
||||
written_tmp = MIN(available, aud->buffer_size - current_size);
|
||||
dstbuf = current_pool_ptr + current_size;
|
||||
if (written_tmp > 0)
|
||||
@@ -145,7 +144,7 @@ static void *libnx_audren_thread_audio_init(const char *device, unsigned rate, u
|
||||
int mpid;
|
||||
size_t mempool_size;
|
||||
unsigned real_latency;
|
||||
int32_t thread_priority;
|
||||
uint32_t thread_priority;
|
||||
|
||||
RARCH_LOG("[Audio]: Using libnx_audren_thread driver\n");
|
||||
|
||||
@@ -296,7 +295,7 @@ static ssize_t libnx_audren_thread_audio_write(void *data,
|
||||
if (aud->nonblock)
|
||||
{
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = FIFO_WRITE_AVAIL(aud->fifo);
|
||||
available = fifo_write_avail(aud->fifo);
|
||||
written = MIN(available, size);
|
||||
if (written > 0)
|
||||
fifo_write(aud->fifo, buf, written);
|
||||
@@ -308,7 +307,7 @@ static ssize_t libnx_audren_thread_audio_write(void *data,
|
||||
while (written < size && aud->running)
|
||||
{
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = FIFO_WRITE_AVAIL(aud->fifo);
|
||||
available = fifo_write_avail(aud->fifo);
|
||||
if (available)
|
||||
{
|
||||
written_tmp = MIN(size - written, available);
|
||||
@@ -408,7 +407,7 @@ static size_t libnx_audren_thread_audio_write_avail(void *data)
|
||||
return 0;
|
||||
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = FIFO_WRITE_AVAIL(aud->fifo);
|
||||
available = fifo_write_avail(aud->fifo);
|
||||
mutexUnlock(&aud->fifo_lock);
|
||||
|
||||
return available;
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
#endif
|
||||
|
||||
#include <queues/fifo_queue.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#include "switch_audio_compat.h"
|
||||
|
||||
#define THREAD_STACK_SIZE (1024 * 8)
|
||||
#define THREAD_PREFERRED_CPU 2
|
||||
#define SAMPLE_SIZE sizeof(uint16_t)
|
||||
static const size_t thread_stack_size = 1024 * 8;
|
||||
static const int thread_preferred_cpu = 2;
|
||||
static const int channel_count = 2;
|
||||
static const size_t sample_size = sizeof(uint16_t);
|
||||
|
||||
#define AUDIO_BUFFER_COUNT 2
|
||||
|
||||
@@ -86,7 +86,7 @@ static void mainLoop(void* data)
|
||||
if (!released_out_buffer)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
rc = audoutWaitPlayFinish(&released_out_buffer, &released_out_count, UINT64_MAX);
|
||||
rc = audoutWaitPlayFinish(&released_out_buffer, &released_out_count, U64_MAX);
|
||||
#else
|
||||
uint32_t handle_idx = 0;
|
||||
svcWaitSynchronization(&handle_idx, &swa->event, 1, 33333333);
|
||||
@@ -107,7 +107,7 @@ static void mainLoop(void* data)
|
||||
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
|
||||
avail = FIFO_READ_AVAIL(swa->fifo);
|
||||
avail = fifo_read_avail(swa->fifo);
|
||||
to_write = MIN(avail, buf_avail);
|
||||
if (to_write > 0)
|
||||
{
|
||||
@@ -142,7 +142,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
{
|
||||
Result rc;
|
||||
unsigned i;
|
||||
int32_t prio;
|
||||
uint32_t prio;
|
||||
#ifndef HAVE_LIBNX
|
||||
char names[8][0x20];
|
||||
uint32_t num_names = 0;
|
||||
@@ -207,7 +207,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
#endif
|
||||
|
||||
*new_rate = swa->sampleRate;
|
||||
swa->fifoSize = (swa->sampleRate * SAMPLE_SIZE * swa->latency) / 1000;
|
||||
swa->fifoSize = (swa->sampleRate * sample_size * swa->latency) / 1000;
|
||||
|
||||
for (i = 0; i < AUDIO_BUFFER_COUNT; i++)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
device, rate, swa->sampleRate, swa->latency, block_frames, swa->fifoSize);
|
||||
|
||||
svcGetThreadPriority(&prio, 0xffff8000);
|
||||
rc = compat_thread_create(&swa->thread, &mainLoop, (void*)swa, THREAD_STACK_SIZE, prio - 1, THREAD_PREFERRED_CPU);
|
||||
rc = compat_thread_create(&swa->thread, &mainLoop, (void*)swa, thread_stack_size, prio - 1, thread_preferred_cpu);
|
||||
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
@@ -349,7 +349,7 @@ static ssize_t switch_thread_audio_write(void *data, const void *buf, size_t siz
|
||||
if (swa->nonblock)
|
||||
{
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
avail = FIFO_WRITE_AVAIL(swa->fifo);
|
||||
avail = fifo_write_avail(swa->fifo);
|
||||
written = MIN(avail, size);
|
||||
if (written > 0)
|
||||
fifo_write(swa->fifo, buf, written);
|
||||
@@ -361,7 +361,7 @@ static ssize_t switch_thread_audio_write(void *data, const void *buf, size_t siz
|
||||
while (written < size && swa->running)
|
||||
{
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
avail = FIFO_WRITE_AVAIL(swa->fifo);
|
||||
avail = fifo_write_avail(swa->fifo);
|
||||
if (avail == 0)
|
||||
{
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
@@ -413,7 +413,7 @@ static size_t switch_thread_audio_write_avail(void *data)
|
||||
switch_thread_audio_t* swa = (switch_thread_audio_t*)data;
|
||||
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
val = FIFO_WRITE_AVAIL(swa->fifo);
|
||||
val = fifo_write_avail(swa->fifo);
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
|
||||
return val;
|
||||
|
||||
+19
-16
@@ -64,7 +64,7 @@
|
||||
#include <retro_inline.h>
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
/* Implementation tinyalsa pcm */
|
||||
@@ -1208,18 +1208,21 @@ static int pcm_mmap_begin(struct pcm *pcm, void **areas, unsigned int *offset,
|
||||
|
||||
static int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames)
|
||||
{
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
/* not used */
|
||||
(void) offset;
|
||||
/* not used */
|
||||
(void) offset;
|
||||
|
||||
/* update the application pointer in userspace and kernel */
|
||||
pcm_mmap_appl_forward(pcm, frames);
|
||||
ret = pcm_sync_ptr(pcm, 0);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
/* update the application pointer in userspace and kernel */
|
||||
pcm_mmap_appl_forward(pcm, frames);
|
||||
ret = pcm_sync_ptr(pcm, 0);
|
||||
if (ret != 0)
|
||||
{
|
||||
printf("%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return frames;
|
||||
return frames;
|
||||
}
|
||||
|
||||
static void pcm_mmap_appl_forward(struct pcm *pcm, int frames)
|
||||
@@ -1522,7 +1525,7 @@ static struct pcm_params *pcm_params_get(unsigned int card, unsigned int device,
|
||||
fd = open(fn, O_RDWR|O_NONBLOCK);
|
||||
if (fd < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Cannot open device '%s'\n", fn);
|
||||
fprintf(stderr, "cannot open device '%s'\n", fn);
|
||||
goto err_open;
|
||||
}
|
||||
|
||||
@@ -1535,7 +1538,7 @@ static struct pcm_params *pcm_params_get(unsigned int card, unsigned int device,
|
||||
param_init(params);
|
||||
if (ioctl(fd, SNDRV_PCM_IOCTL_HW_REFINE, params))
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] SNDRV_PCM_IOCTL_HW_REFINE error (%d)\n", errno);
|
||||
fprintf(stderr, "SNDRV_PCM_IOCTL_HW_REFINE error (%d)\n", errno);
|
||||
goto err_hw_refine;
|
||||
}
|
||||
|
||||
@@ -2016,7 +2019,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
avail = pcm_avail_update(pcm);
|
||||
if (avail < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Cannot determine available mmap frames");
|
||||
fprintf(stderr, "cannot determine available mmap frames");
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -2026,7 +2029,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
{
|
||||
if (pcm_start(pcm) < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Start error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
fprintf(stderr, "start error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
(unsigned int)pcm->mmap_status->hw_ptr,
|
||||
(unsigned int)pcm->mmap_control->appl_ptr,
|
||||
avail);
|
||||
@@ -2049,7 +2052,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
{
|
||||
pcm->prepared = 0;
|
||||
pcm->running = 0;
|
||||
RARCH_ERR("[TINYALSA] Wait error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
fprintf(stderr, "wait error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
(unsigned int)pcm->mmap_status->hw_ptr,
|
||||
(unsigned int)pcm->mmap_control->appl_ptr,
|
||||
avail);
|
||||
@@ -2070,7 +2073,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
frames = pcm_mmap_transfer_areas(pcm, (void *)buffer, offset, frames);
|
||||
if (frames < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Write error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
fprintf(stderr, "write error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
(unsigned int)pcm->mmap_status->hw_ptr,
|
||||
(unsigned int)pcm->mmap_control->appl_ptr,
|
||||
avail);
|
||||
|
||||
+18
-18
@@ -22,22 +22,22 @@
|
||||
#include "../common/mmdevice_common.h"
|
||||
#include "../common/mmdevice_common_inline.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool exclusive;
|
||||
bool nonblock;
|
||||
bool running;
|
||||
size_t frame_size; /* 4 or 8 only */
|
||||
size_t engine_buffer_size;
|
||||
HANDLE write_event;
|
||||
IMMDevice *device;
|
||||
IAudioClient *client;
|
||||
IAudioRenderClient *renderer;
|
||||
fifo_buffer_t *buffer; /* NULL in unbuffered shared mode */
|
||||
size_t frame_size; /* 4 or 8 only */
|
||||
size_t engine_buffer_size;
|
||||
bool exclusive;
|
||||
bool nonblock;
|
||||
bool running;
|
||||
} wasapi_t;
|
||||
|
||||
static IMMDevice *wasapi_init_device(const char *id)
|
||||
@@ -632,7 +632,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz
|
||||
{
|
||||
ssize_t written = -1;
|
||||
UINT32 padding = 0;
|
||||
size_t write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
size_t write_avail = fifo_write_avail(w->buffer);
|
||||
|
||||
if (!write_avail)
|
||||
{
|
||||
@@ -643,7 +643,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz
|
||||
if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
|
||||
return -1;
|
||||
|
||||
read_avail = FIFO_READ_AVAIL(w->buffer);
|
||||
read_avail = fifo_read_avail(w->buffer);
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
written = read_avail < write_avail ? read_avail : write_avail;
|
||||
if (written)
|
||||
@@ -651,7 +651,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz
|
||||
return -1;
|
||||
}
|
||||
|
||||
write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
written = size < write_avail ? size : write_avail;
|
||||
if (written)
|
||||
fifo_write(w->buffer, data, written);
|
||||
@@ -685,20 +685,20 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size)
|
||||
|
||||
static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t size)
|
||||
{
|
||||
size_t write_avail = 0;
|
||||
ssize_t written = -1;
|
||||
UINT32 padding = 0;
|
||||
size_t write_avail = 0;
|
||||
ssize_t written = -1;
|
||||
UINT32 padding = 0;
|
||||
|
||||
if (w->buffer)
|
||||
{
|
||||
write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
if (!write_avail)
|
||||
{
|
||||
size_t read_avail = 0;
|
||||
if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
|
||||
return -1;
|
||||
|
||||
read_avail = FIFO_READ_AVAIL(w->buffer);
|
||||
read_avail = fifo_read_avail(w->buffer);
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
written = read_avail < write_avail ? read_avail : write_avail;
|
||||
if (written)
|
||||
@@ -706,7 +706,7 @@ static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t s
|
||||
return -1;
|
||||
}
|
||||
|
||||
write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
written = size < write_avail ? size : write_avail;
|
||||
if (written)
|
||||
fifo_write(w->buffer, data, written);
|
||||
@@ -731,12 +731,12 @@ static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t s
|
||||
static ssize_t wasapi_write_ex(wasapi_t *w, const void * data, size_t size, DWORD ms)
|
||||
{
|
||||
ssize_t written = 0;
|
||||
size_t write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
size_t write_avail = fifo_write_avail(w->buffer);
|
||||
|
||||
if (!write_avail)
|
||||
{
|
||||
if (WaitForSingleObject(w->write_event, ms) != WAIT_OBJECT_0)
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
if (!wasapi_flush_buffer(w, w->engine_buffer_size))
|
||||
return -1;
|
||||
@@ -890,7 +890,7 @@ static size_t wasapi_write_avail(void *wh)
|
||||
UINT32 padding = 0;
|
||||
|
||||
if (w->buffer)
|
||||
return FIFO_WRITE_AVAIL(w->buffer);
|
||||
return fifo_write_avail(w->buffer);
|
||||
|
||||
if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
|
||||
return 0;
|
||||
|
||||
+18
-14
@@ -24,17 +24,18 @@
|
||||
#include "../../wiiu/wiiu_dbg.h"
|
||||
#include "../../wiiu/system/memory.h"
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AXMVoice* mvoice;
|
||||
uint16_t* buffer_l;
|
||||
uint16_t* buffer_r;
|
||||
OSSpinLock spinlock;
|
||||
bool nonblock;
|
||||
|
||||
uint32_t pos;
|
||||
uint32_t written;
|
||||
bool nonblock;
|
||||
OSSpinLock spinlock;
|
||||
} ax_audio_t;
|
||||
|
||||
/* 3072 samples main buffer, 64ms total */
|
||||
@@ -186,8 +187,7 @@ static bool ax_audio_start(void* data, bool is_shutdown)
|
||||
/* Set back to playing on enough buffered data */
|
||||
if (ax->written > AX_AUDIO_SAMPLE_LOAD)
|
||||
{
|
||||
AXSetMultiVoiceCurrentOffset(ax->mvoice,
|
||||
ax_audio_limit(ax->pos - ax->written));
|
||||
AXSetMultiVoiceCurrentOffset(ax->mvoice, ax_audio_limit(ax->pos - ax->written));
|
||||
AXSetMultiVoiceState(ax->mvoice, AX_VOICE_STATE_PLAYING);
|
||||
}
|
||||
|
||||
@@ -206,12 +206,9 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size)
|
||||
return 0;
|
||||
|
||||
if (count > AX_AUDIO_MAX_FREE)
|
||||
count = AX_AUDIO_MAX_FREE;
|
||||
count = AX_AUDIO_MAX_FREE;
|
||||
|
||||
count_avail = (
|
||||
(ax->written > AX_AUDIO_MAX_FREE)
|
||||
? 0
|
||||
: (AX_AUDIO_MAX_FREE - ax->written));
|
||||
count_avail = ((ax->written > AX_AUDIO_MAX_FREE) ? 0 : (AX_AUDIO_MAX_FREE - ax->written));
|
||||
|
||||
if (ax->nonblock)
|
||||
{
|
||||
@@ -222,7 +219,7 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size)
|
||||
else if (count_avail < count)
|
||||
{
|
||||
/* Sync, wait for free memory */
|
||||
while (AXIsMultiVoiceRunning(ax->mvoice) && (count_avail < count))
|
||||
while(AXIsMultiVoiceRunning(ax->mvoice) && (count_avail < count))
|
||||
{
|
||||
OSYieldThread(); /* Gives threads with same priority time to run */
|
||||
count_avail = (ax->written > AX_AUDIO_MAX_FREE ? 0 : (AX_AUDIO_MAX_FREE - ax->written));
|
||||
@@ -304,17 +301,24 @@ static void ax_audio_set_nonblock_state(void* data, bool state)
|
||||
ax->nonblock = state;
|
||||
}
|
||||
|
||||
static bool ax_audio_use_float(void* data) { return false; }
|
||||
static bool ax_audio_use_float(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static size_t ax_audio_write_avail(void* data)
|
||||
{
|
||||
ax_audio_t* ax = (ax_audio_t*)data;
|
||||
|
||||
size_t ret = AX_AUDIO_COUNT - ax->written;
|
||||
|
||||
return (ret < AX_AUDIO_SAMPLE_COUNT ? 0 : ret);
|
||||
}
|
||||
|
||||
static size_t ax_audio_buffer_size(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return AX_AUDIO_COUNT;
|
||||
}
|
||||
|
||||
@@ -331,6 +335,6 @@ audio_driver_t audio_ax =
|
||||
"AX",
|
||||
NULL, /* device_list_new */
|
||||
NULL, /* device_list_free */
|
||||
ax_audio_write_avail,
|
||||
ax_audio_buffer_size,
|
||||
NULL, /* write_avail */
|
||||
NULL, /* buffer_size */
|
||||
};
|
||||
+24
-35
@@ -42,7 +42,7 @@
|
||||
#include "../common/mmdevice_common.h"
|
||||
#endif
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct xaudio2 xaudio2_t;
|
||||
@@ -60,9 +60,9 @@ typedef struct xaudio2 xaudio2_t;
|
||||
typedef struct
|
||||
{
|
||||
xaudio2_t *xa;
|
||||
size_t bufsize;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
size_t bufsize;
|
||||
} xa_t;
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -180,10 +180,6 @@ static void xaudio2_free(xaudio2_t *handle)
|
||||
#else
|
||||
free(handle);
|
||||
#endif
|
||||
|
||||
#if !defined(_XBOX) && !defined(__WINRT__)
|
||||
CoUninitialize();
|
||||
#endif
|
||||
}
|
||||
|
||||
static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
@@ -192,28 +188,16 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
int32_t idx_found = -1;
|
||||
WAVEFORMATEX wfx = {0};
|
||||
struct string_list *list = NULL;
|
||||
xaudio2_t *handle = NULL;
|
||||
|
||||
#if !defined(_XBOX) && !defined(__WINRT__)
|
||||
if (FAILED(CoInitialize(NULL)))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
handle = new xaudio2;
|
||||
xaudio2_t *handle = new xaudio2;
|
||||
#else
|
||||
handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||
xaudio2_t *handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||
#endif
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
#if !defined(_XBOX) && !defined(__WINRT__)
|
||||
CoUninitialize();
|
||||
#endif
|
||||
goto error;
|
||||
}
|
||||
|
||||
list = (struct string_list*)xa_list_new(NULL);
|
||||
list = (struct string_list*)xa_list_new(NULL);
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
handle->lpVtbl = &voice_vtable;
|
||||
@@ -312,34 +296,34 @@ static void *xa_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
size_t bufsize;
|
||||
xa_t *xa = (xa_t*)calloc(1, sizeof(*xa));
|
||||
|
||||
xa_t *xa = (xa_t*)calloc(1, sizeof(*xa));
|
||||
if (!xa)
|
||||
return NULL;
|
||||
|
||||
if (latency < 8)
|
||||
latency = 8; /* Do not allow shenanigans. */
|
||||
latency = 8; /* Do not allow shenanigans. */
|
||||
|
||||
bufsize = latency * rate / 1000;
|
||||
|
||||
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
bufsize = latency * rate / 1000;
|
||||
xa->bufsize = bufsize * 2 * sizeof(float);
|
||||
|
||||
xa->xa = xaudio2_new(rate, 2, xa->bufsize, device);
|
||||
if (!xa->xa)
|
||||
{
|
||||
RARCH_ERR("[XAudio2] Failed to init driver.\n");
|
||||
RARCH_ERR("Failed to init XAudio2.\n");
|
||||
free(xa);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
return xa;
|
||||
}
|
||||
|
||||
static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
unsigned bytes = size;
|
||||
unsigned bytes;
|
||||
xa_t *xa = (xa_t*)data;
|
||||
xaudio2_t *handle = xa->xa;
|
||||
const uint8_t *buffer = (const uint8_t*)buf;
|
||||
@@ -351,9 +335,11 @@ static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
if (avail == 0)
|
||||
return 0;
|
||||
if (avail < size)
|
||||
bytes = size = avail;
|
||||
size = avail;
|
||||
}
|
||||
|
||||
bytes = size;
|
||||
|
||||
while (bytes)
|
||||
{
|
||||
unsigned need = MIN(bytes, handle->bufsize - handle->bufptr);
|
||||
@@ -371,8 +357,7 @@ static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
XAUDIO2_BUFFER xa2buffer;
|
||||
|
||||
while (handle->buffers == MAX_BUFFERS - 1)
|
||||
if (!(WaitForSingleObject(handle->hEvent, 50) == WAIT_OBJECT_0))
|
||||
return -1;
|
||||
WaitForSingleObject(handle->hEvent, INFINITE);
|
||||
|
||||
xa2buffer.Flags = 0;
|
||||
xa2buffer.AudioBytes = handle->bufsize;
|
||||
@@ -425,12 +410,16 @@ static void xa_set_nonblock_state(void *data, bool state)
|
||||
|
||||
static bool xa_start(void *data, bool is_shutdown)
|
||||
{
|
||||
xa_t *xa = (xa_t*)data;
|
||||
xa_t *xa = (xa_t*)data;
|
||||
xa->is_paused = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool xa_use_float(void *data) { return true; }
|
||||
static bool xa_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void xa_free(void *data)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#define SOUND_FREQUENCY 48000
|
||||
#define MAX_BUFFER 2048
|
||||
|
||||
@@ -49,9 +49,10 @@
|
||||
|
||||
typedef struct rarch_CC_resampler
|
||||
{
|
||||
void (*process)(void *re, struct resampler_data *data);
|
||||
audio_frame_float_t buffer[4];
|
||||
|
||||
float distance;
|
||||
void (*process)(void *re, struct resampler_data *data);
|
||||
} rarch_CC_resampler_t;
|
||||
|
||||
#ifdef _MIPS_ARCH_ALLEGREX
|
||||
@@ -344,7 +345,7 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
|
||||
data->output_frames = outp - (audio_frame_float_t*)data->data_out;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_ARM_NEON_ASM_OPTIMIZATIONS)
|
||||
#elif defined (__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
|
||||
|
||||
#define CC_RESAMPLER_IDENT "NEON"
|
||||
|
||||
@@ -356,13 +357,13 @@ size_t resampler_CC_upsample_neon (float *outp, const float *inp,
|
||||
static void resampler_CC_downsample(void *re_, struct resampler_data *data)
|
||||
{
|
||||
data->output_frames = resampler_CC_downsample_neon(
|
||||
data->data_out, data->data_in, (struct rarch_CC_resampler*)re_, data->input_frames, data->ratio);
|
||||
data->data_out, data->data_in, re_, data->input_frames, data->ratio);
|
||||
}
|
||||
|
||||
static void resampler_CC_upsample(void *re_, struct resampler_data *data)
|
||||
{
|
||||
data->output_frames = resampler_CC_upsample_neon(
|
||||
data->data_out, data->data_in, (struct rarch_CC_resampler*)re_, data->input_frames, data->ratio);
|
||||
data->data_out, data->data_in, re_, data->input_frames, data->ratio);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
+32
-40
@@ -31,21 +31,16 @@
|
||||
|
||||
#include "drivers/rsound.h"
|
||||
|
||||
#ifdef __PS3__
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sysmodule/sysmodule.h>
|
||||
#include <sys/systime.h>
|
||||
#include <net/net.h>
|
||||
#else
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include <cell/sysmodule.h>
|
||||
#include <sys/timer.h>
|
||||
#include <sys/sys_time.h>
|
||||
|
||||
/* Network headers */
|
||||
#include <netex/net.h>
|
||||
#include <netex/errno.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(GEKKO)
|
||||
#define NETWORK_COMPAT_HEADERS 1
|
||||
#elif defined(GEKKO)
|
||||
#include <network.h>
|
||||
#else
|
||||
#define NETWORK_COMPAT_HEADERS 1
|
||||
@@ -57,12 +52,8 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#ifdef __PS3__
|
||||
#ifdef __PSL1GHT__
|
||||
#include <net/poll.h>
|
||||
#else
|
||||
#ifdef __CELLOS_LV2__
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
#else
|
||||
#include <poll.h>
|
||||
#endif
|
||||
@@ -116,7 +107,7 @@ enum rsd_conn_type
|
||||
#define RSD_ERR(fmt, args...)
|
||||
#define RSD_DEBUG(fmt, args...)
|
||||
|
||||
#if defined(__PS3__)
|
||||
#if defined(__CELLOS_LV2__)
|
||||
static int init_count = 0;
|
||||
#define pollfd_fd(x) x.fd
|
||||
#define net_send(a,b,c,d) send(a,b,c,d)
|
||||
@@ -263,7 +254,7 @@ static int rsnd_connect_server( rsound_t *rd )
|
||||
|
||||
/* Uses non-blocking IO since it performed more deterministic with poll()/send() */
|
||||
|
||||
#ifdef __PS3__
|
||||
#ifdef __CELLOS_LV2__
|
||||
setsockopt(rd->conn.socket, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
|
||||
setsockopt(rd->conn.ctl_socket, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
|
||||
#else
|
||||
@@ -709,11 +700,11 @@ static ssize_t rsnd_recv_chunk(int socket, void *buf, size_t size, int blocking)
|
||||
|
||||
static int rsnd_poll(struct pollfd *fd, int numfd, int timeout)
|
||||
{
|
||||
for (;;)
|
||||
for(;;)
|
||||
{
|
||||
if (socketpoll(fd, numfd, timeout) < 0)
|
||||
if ( socketpoll(fd, numfd, timeout) < 0 )
|
||||
{
|
||||
if (errno == EINTR)
|
||||
if ( errno == EINTR )
|
||||
continue;
|
||||
|
||||
perror("poll");
|
||||
@@ -734,8 +725,8 @@ static int64_t rsnd_get_time_usec(void)
|
||||
if (!QueryPerformanceCounter(&count))
|
||||
return 0;
|
||||
return count.QuadPart * 1000000 / freq.QuadPart;
|
||||
#elif defined(__PS3__)
|
||||
return sysGetSystemTime();
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
return sys_time_get_system_time();
|
||||
#elif defined(GEKKO)
|
||||
return ticks_to_microsecs(gettime());
|
||||
#elif defined(__MACH__) // OSX doesn't have clock_gettime ...
|
||||
@@ -774,13 +765,13 @@ static void rsnd_drain(rsound_t *rd)
|
||||
delta /= 1000000;
|
||||
/* Calculates the amount of data we have in our virtual buffer. Only used to calculate delay. */
|
||||
slock_lock(rd->thread.mutex);
|
||||
rd->bytes_in_buffer = (int)((int64_t)rd->total_written + (int64_t)FIFO_READ_AVAIL(rd->fifo_buffer) - delta);
|
||||
rd->bytes_in_buffer = (int)((int64_t)rd->total_written + (int64_t)fifo_read_avail(rd->fifo_buffer) - delta);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
}
|
||||
else
|
||||
{
|
||||
slock_lock(rd->thread.mutex);
|
||||
rd->bytes_in_buffer = FIFO_READ_AVAIL(rd->fifo_buffer);
|
||||
rd->bytes_in_buffer = fifo_read_avail(rd->fifo_buffer);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
}
|
||||
}
|
||||
@@ -798,7 +789,7 @@ static size_t rsnd_fill_buffer(rsound_t *rd, const char *buf, size_t size)
|
||||
return 0;
|
||||
|
||||
slock_lock(rd->thread.mutex);
|
||||
if (FIFO_WRITE_AVAIL(rd->fifo_buffer) >= size)
|
||||
if ( fifo_write_avail(rd->fifo_buffer) >= size )
|
||||
{
|
||||
slock_unlock(rd->thread.mutex);
|
||||
break;
|
||||
@@ -895,7 +886,7 @@ static size_t rsnd_get_ptr(rsound_t *rd)
|
||||
{
|
||||
int ptr;
|
||||
slock_lock(rd->thread.mutex);
|
||||
ptr = FIFO_READ_AVAIL(rd->fifo_buffer);
|
||||
ptr = fifo_read_avail(rd->fifo_buffer);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
|
||||
return ptr;
|
||||
@@ -947,15 +938,15 @@ static int rsnd_close_ctl(rsound_t *rd)
|
||||
int index = 0;
|
||||
char buf[RSD_PROTO_MAXSIZE*2] = {0};
|
||||
|
||||
for (;;)
|
||||
for(;;)
|
||||
{
|
||||
if (rsnd_poll(&fd, 1, 2000) < 0)
|
||||
if ( rsnd_poll(&fd, 1, 2000) < 0 )
|
||||
return -1;
|
||||
|
||||
if (fd.revents & POLLHUP)
|
||||
if ( fd.revents & POLLHUP )
|
||||
break;
|
||||
|
||||
if (fd.revents & POLLIN)
|
||||
else if ( fd.revents & POLLIN )
|
||||
{
|
||||
const char *subchar;
|
||||
|
||||
@@ -1069,7 +1060,7 @@ static int rsnd_update_server_info(rsound_t *rd)
|
||||
int delay = rsd_delay(rd);
|
||||
int delta = (int)(client_ptr - serv_ptr);
|
||||
slock_lock(rd->thread.mutex);
|
||||
delta += FIFO_READ_AVAIL(rd->fifo_buffer);
|
||||
delta += fifo_read_avail(rd->fifo_buffer);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
|
||||
RSD_DEBUG("[RSound] Delay: %d, Delta: %d.\n", delay, delta);
|
||||
@@ -1111,7 +1102,7 @@ static void rsnd_thread ( void * thread_data )
|
||||
/* Two (;;) for loops! :3 Beware! */
|
||||
for (;;)
|
||||
{
|
||||
for (;;)
|
||||
for(;;)
|
||||
{
|
||||
_TEST_CANCEL();
|
||||
|
||||
@@ -1125,7 +1116,7 @@ static void rsnd_thread ( void * thread_data )
|
||||
|
||||
/* If the buffer is empty or we've stopped the stream, jump out of this for loop */
|
||||
slock_lock(rd->thread.mutex);
|
||||
if (FIFO_READ_AVAIL(rd->fifo_buffer) < rd->backend_info.chunk_size || !rd->thread_active)
|
||||
if ( fifo_read_avail(rd->fifo_buffer) < rd->backend_info.chunk_size || !rd->thread_active )
|
||||
{
|
||||
slock_unlock(rd->thread.mutex);
|
||||
break;
|
||||
@@ -1384,17 +1375,18 @@ int rsd_exec(rsound_t *rsound)
|
||||
|
||||
rsnd_stop_thread(rsound);
|
||||
|
||||
#ifdef __PS3__
|
||||
#if defined(__CELLOS_LV2__)
|
||||
int i = 0;
|
||||
setsockopt(rsound->conn.socket, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
|
||||
#else
|
||||
fcntl(rsound->conn.socket, F_SETFL, O_NONBLOCK);
|
||||
#endif
|
||||
|
||||
/* Flush the buffer */
|
||||
if (FIFO_READ_AVAIL(rsound->fifo_buffer) > 0 )
|
||||
// Flush the buffer
|
||||
|
||||
if ( fifo_read_avail(rsound->fifo_buffer) > 0 )
|
||||
{
|
||||
char buffer[FIFO_READ_AVAIL(rsound->fifo_buffer)];
|
||||
char buffer[fifo_read_avail(rsound->fifo_buffer)];
|
||||
fifo_read(rsound->fifo_buffer, buffer, sizeof(buffer));
|
||||
if ( rsnd_send_chunk(fd, buffer, sizeof(buffer), 1) != (ssize_t)sizeof(buffer) )
|
||||
{
|
||||
@@ -1576,11 +1568,11 @@ int rsd_init(rsound_t** rsound)
|
||||
rsd_set_param(*rsound, RSD_HOST, RSD_DEFAULT_HOST);
|
||||
rsd_set_param(*rsound, RSD_PORT, RSD_DEFAULT_PORT);
|
||||
|
||||
#ifdef __PS3__
|
||||
#ifdef __CELLOS_LV2__
|
||||
if (init_count == 0)
|
||||
{
|
||||
sysModuleLoad(SYSMODULE_NET);
|
||||
netInitialize();
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_NET);
|
||||
sys_net_initialize_network();
|
||||
init_count++;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2021 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch 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 Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch 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 RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "../driver.h"
|
||||
#include "../list_special.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
#include "bluetooth_driver.h"
|
||||
|
||||
static bluetooth_driver_t bluetooth_null = {
|
||||
NULL, /* init */
|
||||
NULL, /* free */
|
||||
NULL, /* scan */
|
||||
NULL, /* get_devices */
|
||||
NULL, /* device_is_connected */
|
||||
NULL, /* device_get_sublabel */
|
||||
NULL, /* connect_device */
|
||||
NULL, /* remove_device */
|
||||
"null",
|
||||
};
|
||||
|
||||
const bluetooth_driver_t *bluetooth_drivers[] = {
|
||||
#ifdef HAVE_BLUETOOTH
|
||||
&bluetooth_bluetoothctl,
|
||||
#ifdef HAVE_DBUS
|
||||
&bluetooth_bluez,
|
||||
#endif
|
||||
#endif
|
||||
&bluetooth_null,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static bluetooth_driver_state_t bluetooth_driver_st = {0};
|
||||
|
||||
bluetooth_driver_state_t *bluetooth_state_get_ptr(void)
|
||||
{
|
||||
return &bluetooth_driver_st;
|
||||
}
|
||||
|
||||
/**
|
||||
* config_get_bluetooth_driver_options:
|
||||
*
|
||||
* Get an enumerated list of all bluetooth driver names,
|
||||
* separated by '|'.
|
||||
*
|
||||
* Returns: string listing of all bluetooth driver names,
|
||||
* separated by '|'.
|
||||
**/
|
||||
const char* config_get_bluetooth_driver_options(void)
|
||||
{
|
||||
return char_list_new_special(STRING_LIST_BLUETOOTH_DRIVERS, NULL);
|
||||
}
|
||||
|
||||
void driver_bluetooth_scan(void)
|
||||
{
|
||||
bluetooth_driver_state_t *bt_st = &bluetooth_driver_st;
|
||||
if ( bt_st
|
||||
&& bt_st->active
|
||||
&& bt_st->drv->scan )
|
||||
bt_st->drv->scan(bt_st->data);
|
||||
}
|
||||
|
||||
void driver_bluetooth_get_devices(struct string_list* devices)
|
||||
{
|
||||
bluetooth_driver_state_t *bt_st = &bluetooth_driver_st;
|
||||
if ( bt_st
|
||||
&& bt_st->active
|
||||
&& bt_st->drv->get_devices )
|
||||
bt_st->drv->get_devices(bt_st->data, devices);
|
||||
}
|
||||
|
||||
bool driver_bluetooth_device_is_connected(unsigned i)
|
||||
{
|
||||
bluetooth_driver_state_t *bt_st = &bluetooth_driver_st;
|
||||
if ( bt_st
|
||||
&& bt_st->active
|
||||
&& bt_st->drv->device_is_connected )
|
||||
return bt_st->drv->device_is_connected(bt_st->data, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
void driver_bluetooth_device_get_sublabel(char *s, unsigned i, size_t len)
|
||||
{
|
||||
bluetooth_driver_state_t *bt_st = &bluetooth_driver_st;
|
||||
if ( bt_st
|
||||
&& bt_st->active
|
||||
&& bt_st->drv->device_get_sublabel )
|
||||
bt_st->drv->device_get_sublabel(bt_st->data, s, i, len);
|
||||
}
|
||||
|
||||
bool driver_bluetooth_connect_device(unsigned i)
|
||||
{
|
||||
bluetooth_driver_state_t *bt_st = &bluetooth_driver_st;
|
||||
if (bt_st->active)
|
||||
return bt_st->drv->connect_device(bt_st->data, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool driver_bluetooth_remove_device(unsigned i)
|
||||
{
|
||||
bluetooth_driver_state_t *bt_st = &bluetooth_driver_st;
|
||||
if (bt_st->active)
|
||||
return bt_st->drv->remove_device(bt_st->data, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bluetooth_driver_ctl(enum rarch_bluetooth_ctl_state state, void *data)
|
||||
{
|
||||
bluetooth_driver_state_t *bt_st = &bluetooth_driver_st;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case RARCH_BLUETOOTH_CTL_DESTROY:
|
||||
bt_st->drv = NULL;
|
||||
bt_st->data = NULL;
|
||||
bt_st->active = false;
|
||||
break;
|
||||
case RARCH_BLUETOOTH_CTL_FIND_DRIVER:
|
||||
{
|
||||
const char *prefix = "bluetooth driver";
|
||||
int i = (int)driver_find_index(
|
||||
"bluetooth_driver",
|
||||
settings->arrays.bluetooth_driver);
|
||||
|
||||
if (i >= 0)
|
||||
bt_st->drv = (const bluetooth_driver_t*)bluetooth_drivers[i];
|
||||
else
|
||||
{
|
||||
if (verbosity_is_enabled())
|
||||
{
|
||||
unsigned d;
|
||||
RARCH_ERR("Couldn't find any %s named \"%s\"\n", prefix,
|
||||
settings->arrays.bluetooth_driver);
|
||||
RARCH_LOG_OUTPUT("Available %ss are:\n", prefix);
|
||||
for (d = 0; bluetooth_drivers[d]; d++)
|
||||
RARCH_LOG_OUTPUT("\t%s\n", bluetooth_drivers[d]->ident);
|
||||
|
||||
RARCH_WARN("Going to default to first %s...\n", prefix);
|
||||
}
|
||||
|
||||
bt_st->drv = (const bluetooth_driver_t*)bluetooth_drivers[0];
|
||||
|
||||
if (!bt_st->drv)
|
||||
retroarch_fail(1, "find_bluetooth_driver()");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RARCH_BLUETOOTH_CTL_DEINIT:
|
||||
if (bt_st->data && bt_st->drv)
|
||||
{
|
||||
if (bt_st->drv->free)
|
||||
bt_st->drv->free(bt_st->data);
|
||||
}
|
||||
|
||||
bt_st->data = NULL;
|
||||
bt_st->active = false;
|
||||
break;
|
||||
case RARCH_BLUETOOTH_CTL_INIT:
|
||||
/* Resource leaks will follow if bluetooth is initialized twice. */
|
||||
if (bt_st->data)
|
||||
return false;
|
||||
|
||||
bluetooth_driver_ctl(RARCH_BLUETOOTH_CTL_FIND_DRIVER, NULL);
|
||||
|
||||
if (bt_st->drv && bt_st->drv->init)
|
||||
{
|
||||
bt_st->active = true;
|
||||
bt_st->data = bt_st->drv->init();
|
||||
|
||||
if (!bt_st->data)
|
||||
{
|
||||
RARCH_ERR("Failed to initialize bluetooth driver. Will continue without bluetooth.\n");
|
||||
bt_st->active = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
bt_st->active = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
*
|
||||
* RetroArch 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 Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch 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 RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BLUETOOTH_DRIVER__H
|
||||
#define __BLUETOOTH_DRIVER__H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <lists/string_list.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum rarch_bluetooth_ctl_state
|
||||
{
|
||||
RARCH_BLUETOOTH_CTL_NONE = 0,
|
||||
RARCH_BLUETOOTH_CTL_DESTROY,
|
||||
RARCH_BLUETOOTH_CTL_DEINIT,
|
||||
RARCH_BLUETOOTH_CTL_FIND_DRIVER,
|
||||
RARCH_BLUETOOTH_CTL_INIT
|
||||
};
|
||||
|
||||
typedef struct bluetooth_driver
|
||||
{
|
||||
void *(*init)(void);
|
||||
|
||||
void (*free)(void *data);
|
||||
|
||||
void (*scan)(void *data);
|
||||
void (*get_devices)(void *data, struct string_list *list);
|
||||
bool (*device_is_connected)(void *data, unsigned i);
|
||||
void (*device_get_sublabel)(void *data, char *s, unsigned i, size_t len);
|
||||
bool (*connect_device)(void *data, unsigned i);
|
||||
bool (*remove_device)(void *data, unsigned i);
|
||||
|
||||
const char *ident;
|
||||
} bluetooth_driver_t;
|
||||
|
||||
extern bluetooth_driver_t bluetooth_bluetoothctl;
|
||||
extern bluetooth_driver_t bluetooth_bluez;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const bluetooth_driver_t *drv;
|
||||
void *data;
|
||||
bool active;
|
||||
} bluetooth_driver_state_t;
|
||||
|
||||
/**
|
||||
* config_get_bluetooth_driver_options:
|
||||
*
|
||||
* Get an enumerated list of all bluetooth driver names,
|
||||
* separated by '|'.
|
||||
*
|
||||
* Returns: string listing of all bluetooth driver names,
|
||||
* separated by '|'.
|
||||
**/
|
||||
const char* config_get_bluetooth_driver_options(void);
|
||||
|
||||
void driver_bluetooth_scan(void);
|
||||
|
||||
void driver_bluetooth_get_devices(struct string_list *list);
|
||||
|
||||
bool driver_bluetooth_device_is_connected(unsigned i);
|
||||
|
||||
void driver_bluetooth_device_get_sublabel(char *s, unsigned i, size_t len);
|
||||
|
||||
bool driver_bluetooth_connect_device(unsigned i);
|
||||
|
||||
bool driver_bluetooth_remove_device(unsigned i);
|
||||
|
||||
bool bluetooth_driver_ctl(enum rarch_bluetooth_ctl_state state, void *data);
|
||||
|
||||
bluetooth_driver_state_t *bluetooth_state_get_ptr(void);
|
||||
|
||||
extern const bluetooth_driver_t *bluetooth_drivers[];
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -1,255 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
*
|
||||
* RetroArch 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 Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch 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 RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <configuration.h>
|
||||
|
||||
#include "../bluetooth_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool bluetoothctl_cache[256];
|
||||
unsigned bluetoothctl_counter[256];
|
||||
struct string_list* lines;
|
||||
char command[256];
|
||||
} bluetoothctl_t;
|
||||
|
||||
static void *bluetoothctl_init(void)
|
||||
{
|
||||
return calloc(1, sizeof(bluetoothctl_t));
|
||||
}
|
||||
|
||||
static void bluetoothctl_free(void *data)
|
||||
{
|
||||
if (data)
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void bluetoothctl_scan(void *data)
|
||||
{
|
||||
char line[512];
|
||||
union string_list_elem_attr attr;
|
||||
FILE *dev_file = NULL;
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
|
||||
attr.i = 0;
|
||||
if (btctl->lines)
|
||||
free(btctl->lines);
|
||||
btctl->lines = string_list_new();
|
||||
|
||||
pclose(popen("bluetoothctl -- power on", "r"));
|
||||
|
||||
pclose(popen("bluetoothctl --timeout 10 scan on", "r"));
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_BLUETOOTH_SCAN_COMPLETE),
|
||||
1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT,
|
||||
MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
dev_file = popen("bluetoothctl -- devices", "r");
|
||||
|
||||
while (fgets(line, 512, dev_file))
|
||||
{
|
||||
size_t len = strlen(line);
|
||||
if (len > 0 && line[len-1] == '\n')
|
||||
line[--len] = '\0';
|
||||
|
||||
string_list_append(btctl->lines, line, attr);
|
||||
}
|
||||
|
||||
pclose(dev_file);
|
||||
}
|
||||
|
||||
static void bluetoothctl_get_devices(void *data, struct string_list* devices)
|
||||
{
|
||||
unsigned i;
|
||||
union string_list_elem_attr attr;
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (!btctl->lines)
|
||||
return;
|
||||
|
||||
for (i = 0; i < btctl->lines->size; i++)
|
||||
{
|
||||
char device[64];
|
||||
const char *line = btctl->lines->elems[i].data;
|
||||
|
||||
/* bluetoothctl devices outputs lines of the format:
|
||||
* $ bluetoothctl devices
|
||||
* 'Device (mac address) (device name)'
|
||||
*/
|
||||
strlcpy(device, line+24, sizeof(device));
|
||||
string_list_append(devices, device, attr);
|
||||
}
|
||||
}
|
||||
|
||||
static bool bluetoothctl_device_is_connected(void *data, unsigned i)
|
||||
{
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
char ln[512] = {0};
|
||||
char device[18] = {0};
|
||||
const char *line = btctl->lines->elems[i].data;
|
||||
FILE *command_file = NULL;
|
||||
|
||||
if (btctl->bluetoothctl_counter[i] == 60)
|
||||
{
|
||||
static struct string_list* list = NULL;
|
||||
btctl->bluetoothctl_counter[i] = 0;
|
||||
list = string_split(line, " ");
|
||||
if (!list)
|
||||
return false;
|
||||
|
||||
if (list->size == 0)
|
||||
{
|
||||
string_list_free(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
strlcpy(device, list->elems[1].data, sizeof(device));
|
||||
string_list_free(list);
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- info %s | grep 'Connected: yes'",
|
||||
device);
|
||||
|
||||
command_file = popen(btctl->command, "r");
|
||||
|
||||
while (fgets(ln, 512, command_file))
|
||||
{
|
||||
btctl->bluetoothctl_cache[i] = true;
|
||||
return true;
|
||||
}
|
||||
pclose(command_file);
|
||||
btctl->bluetoothctl_cache[i] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
btctl->bluetoothctl_counter[i]++;
|
||||
return btctl->bluetoothctl_cache[i];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool bluetoothctl_connect_device(void *data, unsigned idx)
|
||||
{
|
||||
unsigned i;
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
char device[18] = {0};
|
||||
const char *line = btctl->lines->elems[idx].data;
|
||||
static struct string_list* list = NULL;
|
||||
|
||||
/* bluetoothctl devices outputs lines of the format:
|
||||
* $ bluetoothctl devices
|
||||
* 'Device (mac address) (device name)'
|
||||
*/
|
||||
list = string_split(line, " ");
|
||||
if (!list)
|
||||
return false;
|
||||
|
||||
if (list->size == 0)
|
||||
{
|
||||
string_list_free(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
strlcpy(device, list->elems[1].data, sizeof(device));
|
||||
string_list_free(list);
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- trust %s",
|
||||
device);
|
||||
|
||||
pclose(popen(btctl->command, "r"));
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- pair %s",
|
||||
device);
|
||||
|
||||
pclose(popen(btctl->command, "r"));
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- connect %s",
|
||||
device);
|
||||
|
||||
pclose(popen(btctl->command, "r"));
|
||||
|
||||
btctl->bluetoothctl_counter[idx] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool bluetoothctl_remove_device(void *data, unsigned idx)
|
||||
{
|
||||
unsigned i;
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
char device[18] = {0};
|
||||
const char *line = btctl->lines->elems[idx].data;
|
||||
static struct string_list* list = NULL;
|
||||
|
||||
/* bluetoothctl devices outputs lines of the format:
|
||||
* $ bluetoothctl devices
|
||||
* 'Device (mac address) (device name)'
|
||||
*/
|
||||
list = string_split(line, " ");
|
||||
if (!list)
|
||||
return false;
|
||||
|
||||
if (list->size == 0)
|
||||
{
|
||||
string_list_free(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
strlcpy(device, list->elems[1].data, sizeof(device));
|
||||
string_list_free(list);
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
echo -e \"disconnect %s\\nremove %s\\n\" | bluetoothctl",
|
||||
device, device);
|
||||
|
||||
pclose(popen(btctl->command, "r"));
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_BLUETOOTH_PAIRING_REMOVED),
|
||||
1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT,
|
||||
MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
btctl->bluetoothctl_counter[idx] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void bluetoothctl_device_get_sublabel(
|
||||
void *data, char *s, unsigned i, size_t len)
|
||||
{
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
/* bluetoothctl devices outputs lines of the format:
|
||||
* $ bluetoothctl devices
|
||||
* 'Device (mac address) (device name)'
|
||||
*/
|
||||
const char *line = btctl->lines->elems[i].data;
|
||||
strlcpy(s, line+7, 18);
|
||||
}
|
||||
|
||||
bluetooth_driver_t bluetooth_bluetoothctl = {
|
||||
bluetoothctl_init,
|
||||
bluetoothctl_free,
|
||||
bluetoothctl_scan,
|
||||
bluetoothctl_get_devices,
|
||||
bluetoothctl_device_is_connected,
|
||||
bluetoothctl_device_get_sublabel,
|
||||
bluetoothctl_connect_device,
|
||||
bluetoothctl_remove_device,
|
||||
"bluetoothctl",
|
||||
};
|
||||
@@ -1,638 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
*
|
||||
* RetroArch 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 Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch 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 RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <dbus/dbus.h>
|
||||
#include <compat/strl.h>
|
||||
#include <configuration.h>
|
||||
#include <retro_timers.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../bluetooth_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* object path. usually looks like /org/bluez/hci0/dev_AA_BB_CC_DD_EE_FF
|
||||
* technically unlimited, but should be enough */
|
||||
char path[128];
|
||||
|
||||
/* for display purposes 64 bytes should be enough */
|
||||
char name[64];
|
||||
|
||||
/* MAC address, 17 bytes */
|
||||
char address[18];
|
||||
|
||||
/* freedesktop.org icon name
|
||||
* See bluez/src/dbus-common.c
|
||||
* Can be NULL */
|
||||
char icon[64];
|
||||
|
||||
int connected;
|
||||
int paired;
|
||||
int trusted;
|
||||
} device_info_t;
|
||||
|
||||
#define VECTOR_LIST_TYPE device_info_t
|
||||
#define VECTOR_LIST_NAME device_info
|
||||
#include "../../libretro-common/lists/vector_list.c"
|
||||
#undef VECTOR_LIST_TYPE
|
||||
#undef VECTOR_LIST_NAME
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct device_info_vector_list *devices;
|
||||
char adapter[256];
|
||||
DBusConnection* dbus_connection;
|
||||
bool bluez_cache[256];
|
||||
int bluez_cache_counter[256];
|
||||
} bluez_t;
|
||||
|
||||
static void *bluez_init (void)
|
||||
{
|
||||
return calloc(1, sizeof(bluez_t));
|
||||
}
|
||||
|
||||
static void bluez_free (void *data)
|
||||
{
|
||||
if (data)
|
||||
free(data);
|
||||
}
|
||||
|
||||
static int
|
||||
set_bool_property (
|
||||
bluez_t *bluez,
|
||||
const char *path,
|
||||
const char *arg_adapter,
|
||||
const char *arg_property,
|
||||
int value)
|
||||
{
|
||||
DBusError err;
|
||||
DBusMessage *message, *reply;
|
||||
DBusMessageIter req_iter, req_subiter;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call(
|
||||
"org.bluez",
|
||||
path,
|
||||
"org.freedesktop.DBus.Properties",
|
||||
"Set"
|
||||
);
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_init_append(message, &req_iter);
|
||||
if (!dbus_message_iter_append_basic(
|
||||
&req_iter, DBUS_TYPE_STRING, &arg_adapter))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_append_basic(
|
||||
&req_iter, DBUS_TYPE_STRING, &arg_property))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_open_container(
|
||||
&req_iter, DBUS_TYPE_VARIANT,
|
||||
DBUS_TYPE_BOOLEAN_AS_STRING, &req_subiter))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_append_basic(
|
||||
&req_subiter, DBUS_TYPE_BOOLEAN, &value))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_close_container(
|
||||
&req_iter, &req_subiter))
|
||||
goto fault;
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, 1000, &err);
|
||||
if (!reply)
|
||||
goto fault;
|
||||
dbus_message_unref(reply);
|
||||
dbus_message_unref(message);
|
||||
return 0;
|
||||
|
||||
fault:
|
||||
dbus_message_iter_abandon_container_if_open(&req_iter, &req_subiter);
|
||||
dbus_message_unref(message);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int get_bool_property(
|
||||
bluez_t *bluez,
|
||||
const char *path,
|
||||
const char *arg_adapter,
|
||||
const char *arg_property,
|
||||
int *value)
|
||||
{
|
||||
DBusMessage *message, *reply;
|
||||
DBusError err;
|
||||
DBusMessageIter root_iter, variant_iter;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call( "org.bluez", path,
|
||||
"org.freedesktop.DBus.Properties", "Get");
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
if (!dbus_message_append_args(message,
|
||||
DBUS_TYPE_STRING, &arg_adapter,
|
||||
DBUS_TYPE_STRING, &arg_property,
|
||||
DBUS_TYPE_INVALID))
|
||||
return 1;
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, 1000, &err);
|
||||
|
||||
dbus_message_unref(message);
|
||||
|
||||
if (!reply)
|
||||
return 1;
|
||||
|
||||
if (!dbus_message_iter_init(reply, &root_iter))
|
||||
return 1;
|
||||
|
||||
if (DBUS_TYPE_VARIANT != dbus_message_iter_get_arg_type(&root_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&root_iter, &variant_iter);
|
||||
dbus_message_iter_get_basic(&variant_iter, value);
|
||||
|
||||
dbus_message_unref(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int adapter_discovery (bluez_t *bluez, const char *method)
|
||||
{
|
||||
DBusMessage *message = dbus_message_new_method_call(
|
||||
"org.bluez", bluez->adapter,
|
||||
"org.bluez.Adapter1", method);
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
if (!dbus_connection_send(bluez->dbus_connection, message, NULL))
|
||||
return 1;
|
||||
|
||||
dbus_connection_flush(bluez->dbus_connection);
|
||||
dbus_message_unref(message);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_managed_objects (bluez_t *bluez, DBusMessage **reply)
|
||||
{
|
||||
DBusMessage *message;
|
||||
DBusError err;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call("org.bluez", "/",
|
||||
"org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
*reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, -1, &err);
|
||||
/* if (!reply) is done by the caller in this one */
|
||||
|
||||
dbus_message_unref(message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int device_method (bluez_t *bluez, const char *path, const char *method)
|
||||
{
|
||||
DBusMessage *message, *reply;
|
||||
DBusError err;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call( "org.bluez", path,
|
||||
"org.bluez.Device1", method);
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, 10000, &err);
|
||||
if (!reply)
|
||||
return 1;
|
||||
|
||||
dbus_connection_flush(bluez->dbus_connection);
|
||||
dbus_message_unref(message);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_default_adapter(bluez_t *bluez, DBusMessage *reply)
|
||||
{
|
||||
/* "...an application would discover the available adapters by
|
||||
* performing a ObjectManager.GetManagedObjects call and look for any
|
||||
* returned objects with an “org.bluez.Adapter1″ interface.
|
||||
* The concept of a default adapter was always a bit fuzzy and the
|
||||
* value could’t be changed, so if applications need something like it
|
||||
* they could e.g. just pick the first adapter they encounter in the
|
||||
* GetManagedObjects reply."
|
||||
* -- http://www.bluez.org/bluez-5-api-introduction-and-porting-guide/
|
||||
*/
|
||||
|
||||
DBusMessageIter root_iter;
|
||||
DBusMessageIter dict_1_iter, dict_2_iter;
|
||||
DBusMessageIter array_1_iter, array_2_iter;
|
||||
|
||||
char *obj_path, *interface_name;
|
||||
|
||||
/* a{oa{sa{sv}}} */
|
||||
if (!dbus_message_iter_init(reply, &root_iter))
|
||||
return 1;
|
||||
|
||||
/* a */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&root_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&root_iter, &array_1_iter);
|
||||
do
|
||||
{
|
||||
/* a{...} */
|
||||
if (DBUS_TYPE_DICT_ENTRY != dbus_message_iter_get_arg_type(&array_1_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_1_iter, &dict_1_iter);
|
||||
|
||||
/* a{o...} */
|
||||
if (DBUS_TYPE_OBJECT_PATH != dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
dbus_message_iter_get_basic(&dict_1_iter, &obj_path);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_1_iter))
|
||||
return 1;
|
||||
/* a{oa} */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&dict_1_iter, &array_2_iter);
|
||||
do
|
||||
{
|
||||
/* empty array? */
|
||||
if (DBUS_TYPE_INVALID ==
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
continue;
|
||||
|
||||
/* a{oa{...}} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_2_iter, &dict_2_iter);
|
||||
|
||||
/* a{oa{s...}} */
|
||||
if (DBUS_TYPE_STRING !=
|
||||
dbus_message_iter_get_arg_type(&dict_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_get_basic(&dict_2_iter, &interface_name);
|
||||
|
||||
if (string_is_equal(interface_name, "org.bluez.Adapter1"))
|
||||
{
|
||||
strlcpy(bluez->adapter, obj_path, 256);
|
||||
return 0;
|
||||
}
|
||||
} while (dbus_message_iter_next(&array_2_iter));
|
||||
} while (dbus_message_iter_next(&array_1_iter));
|
||||
|
||||
/* Couldn't find an adapter */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int read_scanned_devices (bluez_t *bluez, DBusMessage *reply)
|
||||
{
|
||||
device_info_t device;
|
||||
DBusMessageIter root_iter;
|
||||
DBusMessageIter dict_1_iter, dict_2_iter, dict_3_iter;
|
||||
DBusMessageIter array_1_iter, array_2_iter, array_3_iter;
|
||||
DBusMessageIter variant_iter;
|
||||
char *obj_path, *interface_name, *interface_property_name;
|
||||
char *found_device_address, *found_device_name, *found_device_icon;
|
||||
|
||||
/* a{oa{sa{sv}}} */
|
||||
if (!dbus_message_iter_init(reply, &root_iter))
|
||||
return 1;
|
||||
|
||||
/* a */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&root_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&root_iter, &array_1_iter);
|
||||
|
||||
do
|
||||
{
|
||||
/* a{...} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_1_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&array_1_iter, &dict_1_iter);
|
||||
|
||||
/* a{o...} */
|
||||
if (DBUS_TYPE_OBJECT_PATH !=
|
||||
dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_get_basic(&dict_1_iter, &obj_path);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_1_iter))
|
||||
return 1;
|
||||
|
||||
/* a{oa} */
|
||||
if (DBUS_TYPE_ARRAY !=
|
||||
dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&dict_1_iter, &array_2_iter);
|
||||
do
|
||||
{
|
||||
/* empty array? */
|
||||
if (DBUS_TYPE_INVALID ==
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
continue;
|
||||
|
||||
/* a{oa{...}} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_2_iter, &dict_2_iter);
|
||||
|
||||
/* a{oa{s...}} */
|
||||
if (DBUS_TYPE_STRING !=
|
||||
dbus_message_iter_get_arg_type(&dict_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_get_basic(&dict_2_iter, &interface_name);
|
||||
|
||||
if (!string_is_equal(interface_name, "org.bluez.Device1"))
|
||||
continue;
|
||||
|
||||
memset(&device, 0, sizeof(device));
|
||||
strlcpy(device.path, obj_path, 128);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_2_iter))
|
||||
return 1;
|
||||
|
||||
/* a{oa{sa}} */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&dict_2_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&dict_2_iter, &array_3_iter);
|
||||
|
||||
do {
|
||||
/* empty array? */
|
||||
if (DBUS_TYPE_INVALID ==
|
||||
dbus_message_iter_get_arg_type(&array_3_iter))
|
||||
continue;
|
||||
|
||||
/* a{oa{sa{...}}} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_3_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_3_iter, &dict_3_iter);
|
||||
|
||||
/* a{oa{sa{s...}}} */
|
||||
if (DBUS_TYPE_STRING !=
|
||||
dbus_message_iter_get_arg_type(&dict_3_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_get_basic(&dict_3_iter,
|
||||
&interface_property_name);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_3_iter))
|
||||
return 1;
|
||||
/* a{oa{sa{sv}}} */
|
||||
if (DBUS_TYPE_VARIANT !=
|
||||
dbus_message_iter_get_arg_type(&dict_3_iter))
|
||||
return 1;
|
||||
|
||||
/* Below, "Alias" property is used instead of "Name".
|
||||
* "This value ("Name") is only present for
|
||||
* completeness. It is better to always use
|
||||
* the Alias property when displaying the
|
||||
* devices name."
|
||||
* -- bluez/doc/device-api.txt
|
||||
*/
|
||||
|
||||
/* DBUS_TYPE_VARIANT is a container type */
|
||||
dbus_message_iter_recurse(&dict_3_iter, &variant_iter);
|
||||
if (string_is_equal(interface_property_name, "Address"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&found_device_address);
|
||||
strlcpy(device.address, found_device_address, 18);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Alias"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&found_device_name);
|
||||
strlcpy(device.name, found_device_name, 64);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Icon"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&found_device_icon);
|
||||
strlcpy(device.icon, found_device_icon, 64);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Connected"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&device.connected);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Paired"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&device.paired);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Trusted"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&device.trusted);
|
||||
}
|
||||
} while (dbus_message_iter_next(&array_3_iter));
|
||||
|
||||
if (!device_info_vector_list_append(bluez->devices, device))
|
||||
return 1;
|
||||
|
||||
} while (dbus_message_iter_next(&array_2_iter));
|
||||
} while (dbus_message_iter_next(&array_1_iter));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bluez_dbus_connect(bluez_t *bluez)
|
||||
{
|
||||
DBusError err;
|
||||
dbus_error_init(&err);
|
||||
bluez->dbus_connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err);
|
||||
}
|
||||
|
||||
static void bluez_dbus_disconnect(bluez_t *bluez)
|
||||
{
|
||||
if (!bluez->dbus_connection)
|
||||
return;
|
||||
|
||||
dbus_connection_close(bluez->dbus_connection);
|
||||
dbus_connection_unref(bluez->dbus_connection);
|
||||
bluez->dbus_connection = NULL;
|
||||
}
|
||||
|
||||
static void bluez_scan(void *data)
|
||||
{
|
||||
DBusError err;
|
||||
DBusMessage *reply;
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
|
||||
bluez_dbus_connect(bluez);
|
||||
|
||||
if (get_managed_objects(bluez, &reply))
|
||||
return;
|
||||
if (!reply)
|
||||
return;
|
||||
|
||||
/* Get default adapter */
|
||||
if (get_default_adapter(bluez, reply))
|
||||
return;
|
||||
dbus_message_unref(reply);
|
||||
|
||||
/* Power device on */
|
||||
if (set_bool_property(bluez, bluez->adapter,
|
||||
"org.bluez.Adapter1", "Powered", 1))
|
||||
return;
|
||||
|
||||
/* Start discovery */
|
||||
if (adapter_discovery(bluez, "StartDiscovery"))
|
||||
return;
|
||||
|
||||
retro_sleep(10000);
|
||||
|
||||
/* Stop discovery */
|
||||
if (adapter_discovery(bluez, "StopDiscovery"))
|
||||
return;
|
||||
|
||||
/* Get scanned devices */
|
||||
if (get_managed_objects(bluez, &reply))
|
||||
return;
|
||||
if (!reply)
|
||||
return;
|
||||
|
||||
if (bluez->devices)
|
||||
device_info_vector_list_free(bluez->devices);
|
||||
bluez->devices = device_info_vector_list_new();
|
||||
|
||||
read_scanned_devices(bluez, reply);
|
||||
dbus_message_unref(reply);
|
||||
bluez_dbus_disconnect(bluez);
|
||||
}
|
||||
|
||||
static void bluez_get_devices(void *data,
|
||||
struct string_list* devices_string_list)
|
||||
{
|
||||
unsigned i;
|
||||
union string_list_elem_attr attr;
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (!bluez->devices)
|
||||
return;
|
||||
|
||||
for (i = 0; i < bluez->devices->count; i++)
|
||||
{
|
||||
char device[64];
|
||||
strlcpy(device, bluez->devices->data[i].name, sizeof(device));
|
||||
string_list_append(devices_string_list, device, attr);
|
||||
}
|
||||
}
|
||||
|
||||
static bool bluez_device_is_connected(void *data, unsigned i)
|
||||
{
|
||||
int value;
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
|
||||
if (bluez->bluez_cache_counter[i] == 60)
|
||||
{
|
||||
bluez->bluez_cache_counter[i] = 0;
|
||||
bluez_dbus_connect(bluez);
|
||||
|
||||
/* Device disappeared */
|
||||
if (get_bool_property(bluez, bluez->devices->data[i].path,
|
||||
"org.bluez.Device1", "Connected", &value))
|
||||
value = false;
|
||||
|
||||
bluez_dbus_disconnect(bluez);
|
||||
|
||||
bluez->bluez_cache[i] = value;
|
||||
return value;
|
||||
}
|
||||
|
||||
bluez->bluez_cache_counter[i]++;
|
||||
return bluez->bluez_cache[i];
|
||||
}
|
||||
|
||||
static void bluez_device_get_sublabel(
|
||||
void *data, char *s, unsigned i, size_t len)
|
||||
{
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
strlcpy(s, bluez->devices->data[i].address, len);
|
||||
}
|
||||
|
||||
static bool bluez_connect_device(void *data, unsigned i)
|
||||
{
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
bluez_dbus_connect(bluez);
|
||||
|
||||
/* Trust the device */
|
||||
if (set_bool_property(bluez, bluez->devices->data[i].path,
|
||||
"org.bluez.Device1", "Trusted", 1))
|
||||
return false;
|
||||
|
||||
/* Pair the device */
|
||||
device_method(bluez, bluez->devices->data[i].path, "Pair");
|
||||
|
||||
/* Can be "Already Exists" */
|
||||
/* Connect the device */
|
||||
if (device_method(bluez, bluez->devices->data[i].path, "Connect"))
|
||||
return false;
|
||||
|
||||
bluez_dbus_disconnect(bluez);
|
||||
bluez->bluez_cache_counter[i] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool bluez_remove_device(void *data, unsigned i)
|
||||
{
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
bluez_dbus_connect(bluez);
|
||||
|
||||
/* Disconnect the device */
|
||||
device_method(bluez, bluez->devices->data[i].path, "Disconnect");
|
||||
|
||||
/* Remove the device */
|
||||
if (device_method(bluez, bluez->devices->data[i].path, "RemoveDevice"))
|
||||
return false;
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_BLUETOOTH_PAIRING_REMOVED),
|
||||
1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT,
|
||||
MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
bluez_dbus_disconnect(bluez);
|
||||
bluez->bluez_cache_counter[i] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bluetooth_driver_t bluetooth_bluez = {
|
||||
bluez_init,
|
||||
bluez_free,
|
||||
bluez_scan,
|
||||
bluez_get_devices,
|
||||
bluez_device_is_connected,
|
||||
bluez_device_get_sublabel,
|
||||
bluez_connect_device,
|
||||
bluez_remove_device,
|
||||
"bluez",
|
||||
};
|
||||
@@ -9,6 +9,7 @@ PSP_EXPORT_VAR_HASH(module_info)
|
||||
PSP_EXPORT_END
|
||||
|
||||
PSP_EXPORT_START(kernel_functions, 0, 0x4001)
|
||||
PSP_EXPORT_FUNC(read_system_buttons)
|
||||
PSP_EXPORT_FUNC(exitspawn_kernel)
|
||||
PSP_EXPORT_END
|
||||
|
||||
|
||||
@@ -1,40 +1,87 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <pspdebug.h>
|
||||
#include <pspsdk.h>
|
||||
#include <pspctrl.h>
|
||||
#include <psploadexec_kernel.h>
|
||||
#include <pspthreadman_kernel.h>
|
||||
|
||||
PSP_MODULE_INFO("kernel_functions", PSP_MODULE_KERNEL, 0, 0);
|
||||
PSP_MAIN_THREAD_ATTR(0);
|
||||
|
||||
static volatile int thread_active;
|
||||
static unsigned int buttons;
|
||||
static SceUID main_thread_id;
|
||||
|
||||
static int main_thread(SceSize args, void *argp)
|
||||
{
|
||||
SceCtrlData paddata;
|
||||
|
||||
thread_active = 1;
|
||||
|
||||
while (thread_active)
|
||||
{
|
||||
sceCtrlPeekBufferPositive(&paddata, 1);
|
||||
buttons = paddata.Buttons;
|
||||
sceKernelDelayThread(1000000/60);
|
||||
}
|
||||
|
||||
sceKernelExitThread(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int read_system_buttons(void)
|
||||
{
|
||||
return buttons;
|
||||
}
|
||||
|
||||
void exitspawn_kernel(const char *fileName, SceSize args, void *argp)
|
||||
{
|
||||
int k1;
|
||||
struct SceKernelLoadExecVSHParam game_param;
|
||||
|
||||
thread_active = 0;
|
||||
|
||||
memset(&game_param,0,sizeof(game_param));
|
||||
|
||||
game_param.size = sizeof(game_param);
|
||||
game_param.args = args;
|
||||
game_param.argp = argp;
|
||||
game_param.key = "game";
|
||||
game_param.size = sizeof(game_param);
|
||||
game_param.args = args;
|
||||
game_param.argp = argp;
|
||||
game_param.key = "game";
|
||||
game_param.vshmain_args_size = 0;
|
||||
game_param.vshmain_args = NULL;
|
||||
game_param.configfile = 0;
|
||||
game_param.unk4 = 0;
|
||||
game_param.unk5 = 0x10000;
|
||||
game_param.vshmain_args = NULL;
|
||||
game_param.configfile = 0;
|
||||
game_param.unk4 = 0;
|
||||
game_param.unk5 = 0x10000;
|
||||
|
||||
k1 = pspSdkSetK1(0);
|
||||
sceKernelLoadExecVSHMs2(fileName, &game_param);
|
||||
int k1 = pspSdkSetK1(0);
|
||||
//sceKernelSuspendAllUserThreads();
|
||||
int ret = sceKernelLoadExecVSHMs2(fileName, &game_param);
|
||||
pspSdkSetK1(k1);
|
||||
}
|
||||
|
||||
int module_start(SceSize args, void *argp)
|
||||
{
|
||||
(void)args;
|
||||
(void)argp;
|
||||
|
||||
buttons = 0;
|
||||
thread_active = 0;
|
||||
main_thread_id = sceKernelCreateThread("main Thread", main_thread, 0x11, 0x200, 0, NULL);
|
||||
|
||||
if (main_thread >= 0)
|
||||
sceKernelStartThread(main_thread_id, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int module_stop(void)
|
||||
{
|
||||
if (main_thread_id >= 0)
|
||||
{
|
||||
thread_active = 0;
|
||||
sceKernelWaitThreadEnd(main_thread_id, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loaded 100 of 2853 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user