mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-07-12 10:04:01 +02:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9cae93b9bb | |||
| 63e24586d4 | |||
| dfd0958b21 | |||
| 6e2d29dc60 | |||
| 1b45907ab2 | |||
| 53c0c3310a | |||
| 0a7c1094e7 | |||
| 8a1e4b57cd | |||
| 8fed4db258 | |||
| 9b5cc05b9f | |||
| e112e324f7 | |||
| 51fd8393d8 | |||
| 6fcff85201 | |||
| 240e8d7b39 | |||
| d67187a90a | |||
| 0f6834b196 |
@@ -4,7 +4,7 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Linux:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -14,7 +14,8 @@ jobs:
|
||||
key: Linux
|
||||
- name: Install Packages
|
||||
run: |
|
||||
sudo apt-get -y install cmake ninja-build libhidapi-dev libsamplerate0-dev libspeex-dev libminizip-dev libsdl2-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config zlib1g-dev binutils-dev libspeexdsp-dev qt6-base-dev libqt6svg6-dev libvulkan-dev libgtk-3-dev build-essential nasm git zip appstream
|
||||
sudo add-apt-repository ppa:okirby/qt6-backports --yes
|
||||
sudo apt-get -y install cmake ninja-build libhidapi-dev libsamplerate0-dev libspeex-dev libminizip-dev libsdl2-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config zlib1g-dev binutils-dev libspeexdsp-dev qt6-base-dev libqt6svg6-dev libvulkan-dev build-essential nasm git zip appstream
|
||||
- name: Prepare Environment
|
||||
run: |
|
||||
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
|
||||
|
||||
@@ -223,9 +223,6 @@ install(FILES ${MUPEN64PLUS_PLUGIN_GFX_PARALLEL}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/GFX
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_GFX_RT64}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/GFX
|
||||
)
|
||||
|
||||
if (INSTALL_DESKTOP_FILE)
|
||||
install(FILES Package/com.github.Rosalie241.RMG.desktop
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Maintainer: Rosalie Wanders <rosalie@mailbox.org>
|
||||
pkgname=rmg
|
||||
pkgver=0.6.5
|
||||
pkgver=0.6.6
|
||||
pkgrel=1
|
||||
pkgdesc="Rosalie's Mupen GUI"
|
||||
arch=('x86_64' 'aarch64')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: RMG
|
||||
Version: 0.6.5
|
||||
Version: 0.6.6
|
||||
Release: %autorelease
|
||||
Summary: Rosalie's Mupen GUI
|
||||
|
||||
|
||||
@@ -29,6 +29,18 @@
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
<release version="v0.6.6" date="2024-09-30" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix mupen64plus-core URL in the about dialog</li>
|
||||
<li>Fix GLideN64 not showing native path seperator in the configuration dialog</li>
|
||||
<li>Add 'SDL controller mode' option to the options dialog of RMG-Input</li>
|
||||
<li>Add 'None' option to configuration file of mupen64plus-input-gca (thank you GhostlyDark)</li>
|
||||
<li>Update GLideN64, mupen64plus-core and SDL_GameControllerDB</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.6.5" date="2024-07-04" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
|
||||
@@ -44,7 +44,19 @@ Rosalie's Mupen GUI is licensed under the [GNU General Public License v3.0](http
|
||||
|
||||
* Portable Fedora
|
||||
```bash
|
||||
sudo dnf install hidapi-devel libsamplerate-devel minizip-compat-devel SDL2-devel freetype-devel mesa-libGL-devel mesa-libGLU-devel zlib-ng-devel binutils-devel speexdsp-devel qt6-qtbase-devel qt6-qtsvg-devel gcc-c++ nasm git ninja-build
|
||||
sudo dnf install hidapi-devel libsamplerate-devel minizip-compat-devel SDL2-devel freetype-devel mesa-libGL-devel mesa-libGLU-devel pkgconfig zlib-ng-devel binutils-devel speexdsp-devel qt6-qtbase-devel qt6-qtsvg-devel vulkan-devel gcc-c++ nasm git ninja-build
|
||||
./Source/Script/Build.sh Release
|
||||
```
|
||||
|
||||
* Portable Arch Linux
|
||||
```bash
|
||||
sudo pacman -S --needed make cmake gcc hidapi freetype2 libpng qt6 sdl2 libsamplerate nasm minizip pkgconf vulkan-headers git
|
||||
./Source/Script/Build.sh Release
|
||||
```
|
||||
|
||||
* Portable OpenSUSE Tumbleweed
|
||||
```bash
|
||||
sudo zypper install SDL2-devel cmake freetype2-devel gcc gcc-c++ libhidapi-devel libhidapi-hidraw0 libpng16-devel libsamplerate-devel make nasm ninja pkgconf-pkg-config speex-devel vulkan-devel zlib-devel qt6-tools-devel qt6-opengl-devel qt6-widgets-devel qt6-svg-devel minizip-devel git
|
||||
./Source/Script/Build.sh Release
|
||||
```
|
||||
|
||||
@@ -63,7 +75,7 @@ cmake --install "$build_dir" --prefix="/usr"
|
||||
#### Windows
|
||||
* Download & Install [MSYS2](https://www.msys2.org/)
|
||||
```bash
|
||||
pacman -S --needed make mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-hidapi mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-SDL2 mingw-w64-x86_64-qt6 mingw-w64-x86_64-SDL2 mingw-w64-x86_64-hidapi mingw-w64-x86_64-speexdsp mingw-w64-x86_64-libsamplerate mingw-w64-x86_64-nasm mingw-w64-x86_64-minizip git
|
||||
pacman -S --needed make mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-hidapi mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-qt6 mingw-w64-x86_64-SDL2 mingw-w64-x86_64-speexdsp mingw-w64-x86_64-libsamplerate mingw-w64-x86_64-nasm mingw-w64-x86_64-minizip mingw-w64-x86_64-vulkan-headers git
|
||||
./Source/Script/Build.sh Release
|
||||
```
|
||||
|
||||
|
||||
Vendored
+4
-19
@@ -158,10 +158,11 @@ if (BUILD_INPUT_GCA)
|
||||
CONFIGURE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
|
||||
BUILD_COMMAND cargo build --release --features "m64p_compat"
|
||||
BUILD_IN_SOURCE True
|
||||
BUILD_COMMAND cargo build --manifest-path ${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-input-gca/Cargo.toml --release --features "m64p_compat" --target-dir=${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-input-gca/target
|
||||
BUILD_IN_SOURCE False
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-input-gca/target/release
|
||||
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-input-gca/target/release/${GCA_LIB}
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-input-gca/target/release/${GCA_LIB}
|
||||
)
|
||||
endif(BUILD_INPUT_GCA)
|
||||
|
||||
@@ -230,19 +231,6 @@ ExternalProject_Add(mupen64plus-video-parallel
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-video-parallel/mupen64plus-video-parallel.${SO_EXT}
|
||||
)
|
||||
|
||||
ExternalProject_Add(mupen64plus-video-rt64
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rt64
|
||||
|
||||
INSTALL_COMMAND ""
|
||||
|
||||
BUILD_IN_SOURCE False
|
||||
BUILD_ALWAYS True
|
||||
CMAKE_ARGS ${CMAKE_CONFIGURE_ARGS} -DRT64_BUILD_PLUGIN=ON
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/rt64
|
||||
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/rt64/rt64.${SO_EXT}
|
||||
)
|
||||
|
||||
if (DISCORD_RPC)
|
||||
ExternalProject_Add(discord-rpc
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/discord-rpc
|
||||
@@ -339,9 +327,6 @@ set(MUPEN64PLUS_PLUGIN_GFX_GLIDEN64_DATA ${GLIDENUI_TRANSLATIONS} ${GLIDEN64_CUS
|
||||
ExternalProject_Get_property(mupen64plus-video-parallel BUILD_BYPRODUCTS)
|
||||
set(MUPEN64PLUS_PLUGIN_GFX_PARALLEL ${BUILD_BYPRODUCTS} PARENT_SCOPE)
|
||||
|
||||
ExternalProject_Get_property(mupen64plus-video-rt64 BUILD_BYPRODUCTS)
|
||||
set(MUPEN64PLUS_PLUGIN_GFX_RT64 ${BUILD_BYPRODUCTS} PARENT_SCOPE)
|
||||
|
||||
if (DISCORD_RPC)
|
||||
ExternalProject_Get_property(discord-rpc BUILD_BYPRODUCTS)
|
||||
set(DISCORD_RPC_LIB ${BUILD_BYPRODUCTS} PARENT_SCOPE)
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
[subrepo]
|
||||
remote = git@github.com:/gabomdq/SDL_GameControllerDB.git
|
||||
branch = master
|
||||
commit = b1759cf84028aab89caa1c395e198c340b8dfd89
|
||||
parent = 1047b1bd9ac49f8a1291ef671eae6e57c303fdd5
|
||||
commit = 0f4081f054c85b983c5464f0d0ee759b9fddaa0a
|
||||
parent = dfd0958b21741d8783e7135166fab4a2436ecc58
|
||||
method = merge
|
||||
cmdver = 0.4.6
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# SDL_GameControllerDB
|
||||
|
||||
A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality.
|
||||
A community sourced database of game controller mappings to be used with SDL2 and SDL3 Game Controller functionality.
|
||||
|
||||
# Usage
|
||||
Download gamecontrollerdb.txt, place it in your app's directory and load it.
|
||||
|
||||
+25
-9
@@ -3,6 +3,7 @@
|
||||
|
||||
# Windows
|
||||
03000000300f00000a01000000000000,3 In 1 Conversion Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b8,x:b3,y:b0,platform:Windows,
|
||||
03000000fa190000918d000000000000,3 In 1 Conversion Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b8,x:b3,y:b0,platform:Windows,
|
||||
03000000fa2d00000100000000000000,3dRudder Foot Motion Controller,leftx:a0,lefty:a1,rightx:a5,righty:a2,platform:Windows,
|
||||
03000000d0160000040d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
|
||||
03000000d0160000050d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
|
||||
@@ -72,6 +73,8 @@
|
||||
03000000c82d00000260000000000000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00000261000000000000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
|
||||
03000000c82d00001230000000000000,8BitDo Ultimate,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000c82d00001b30000000000000,8BitDo Ultimate 2C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b5,paddle2:b2,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000c82d00001d30000000000000,8BitDo Ultimate 2C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b5,paddle2:b2,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000c82d00001530000000000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000c82d00001630000000000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000c82d00001730000000000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
@@ -115,6 +118,7 @@
|
||||
03000000050b00000679000000000000,ASUS ROG Kunai 3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
|
||||
03000000503200000110000000000000,Atari VCS Classic Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,start:b3,platform:Windows,
|
||||
03000000503200000210000000000000,Atari VCS Modern Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000380800001889000000000000,AtGames Legends Gamer Pro,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b13,lefttrigger:b14,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000008a3500000102000000000000,Backbone One,a:b4,b:b5,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b10,leftstick:b17,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b18,righttrigger:b13,rightx:a3,righty:a4,start:b15,x:b7,y:b8,platform:Windows,
|
||||
030000008a3500000201000000000000,Backbone One,a:b4,b:b5,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b10,leftstick:b17,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b18,righttrigger:b13,rightx:a3,righty:a4,start:b15,x:b7,y:b8,platform:Windows,
|
||||
030000008a3500000302000000000000,Backbone One,a:b4,b:b5,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b10,leftstick:b17,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b18,righttrigger:b13,rightx:a3,righty:a4,start:b15,x:b7,y:b8,platform:Windows,
|
||||
@@ -323,6 +327,7 @@
|
||||
03000000242e0000ff0b000000000000,Hyperkin N64 Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,platform:Windows,
|
||||
03000000790000004e95000000000000,Hyperkin N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a5,righty:a2,start:b9,platform:Windows,
|
||||
03000000242e00006a48000000000000,Hyperkin RetroN Sq,a:b3,b:b7,back:b5,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b0,rightshoulder:b1,start:b4,x:b2,y:b6,platform:Windows,
|
||||
03000000242f00000a20000000000000,Hyperkin Scout,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000242e00006a38000000000000,Hyperkin Trooper 2,a:b0,b:b1,back:b4,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b3,start:b5,platform:Windows,
|
||||
03000000d81d00000e00000000000000,iBuffalo AC02 Arcade Joystick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,rightx:a2,righty:a5,start:b8,x:b4,y:b5,platform:Windows,
|
||||
03000000d81d00000f00000000000000,iBuffalo BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
@@ -405,6 +410,7 @@
|
||||
03000000242f00007300000000000000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,
|
||||
0300000079000000d218000000000000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
03000000d620000010a7000000000000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000242e0000f500000000000000,Mayflash N64 Adapter,a:b2,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a5,start:b9,platform:Windows,
|
||||
03000000242f0000f400000000000000,Mayflash N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a5,start:b9,platform:Windows,
|
||||
03000000790000007918000000000000,Mayflash N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,righttrigger:b7,rightx:a3,righty:a2,start:b8,platform:Windows,
|
||||
030000008f0e00001030000000000000,Mayflash Saturn Adapter,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,lefttrigger:b7,rightshoulder:b6,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
|
||||
@@ -476,6 +482,7 @@
|
||||
03000000790000002201000000000000,PC Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
030000006f0e00008501000000000000,PDP Fightpad Pro GameCube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
030000006f0e00000901000000000000,PDP PS3 Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006f0e00008901000000000000,PDP Realmz Nintendo Switch Controller,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows,
|
||||
030000008f0e00004100000000000000,PlaySega,a:b1,b:b0,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b4,y:b3,platform:Windows,
|
||||
03000000666600006706000000000000,PlayStation Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Windows,
|
||||
03000000e30500009605000000000000,PlayStation Adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
|
||||
@@ -484,7 +491,7 @@
|
||||
03000000f0250000c183000000000000,PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000d9040000160f000000000000,PlayStation Controller Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
|
||||
030000004c0500003713000000000000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000d620000011a7000000000000,PowerA Core Plus GameCube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000d620000011a7000000000000,PowerA Core Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000dd62000015a7000000000000,PowerA Fusion Nintendo Switch Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000d620000012a7000000000000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000dd62000016a7000000000000,PowerA Fusion Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
@@ -771,7 +778,6 @@
|
||||
03000000120c00000a88000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a2,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
03000000120c00001088000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2~,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5~,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000002a0600002000000000000000,Xbox Controller,a:b0,b:b1,back:b13,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b5,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b15,righttrigger:b7,rightx:a2,righty:a5,start:b12,x:b2,y:b3,platform:Windows,
|
||||
03000000300f00008888000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:b13,dpleft:b10,dpright:b11,dpup:b12,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
03000000380700001645000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
03000000380700002645000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000380700003645000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
@@ -780,7 +786,6 @@
|
||||
030000005e0400008502000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e0400008702000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b7,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
030000005e0400008902000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b10,leftstick:b8,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b9,righttrigger:b4,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows,
|
||||
030000000d0f00006300000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e0400000c0b000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e040000d102000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000005e040000dd02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
@@ -855,6 +860,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000c82d00000260000001000000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
|
||||
03000000c82d00000261000000010000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
|
||||
03000000c82d00001230000000010000,8BitDo Ultimate,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000c82d00001b30000001000000,8BitDo Ultimate 2C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b5,paddle2:b2,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000c82d00001d30000001000000,8BitDo Ultimate 2C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b5,paddle2:b2,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000c82d00001530000001000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000c82d00001630000001000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000c82d00001730000001000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
@@ -873,7 +880,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X,
|
||||
03000000050b00000579000000010000,ASUS ROG Kunai 3,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b42,paddle1:b9,paddle2:b11,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000050b00000679000000010000,ASUS ROG Kunai 3,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b23,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X,
|
||||
03000000503200000110000045010000,Atari VCS Classic,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b3,start:b2,platform:MacOSX
|
||||
03000000503200000110000045010000,Atari VCS Classic,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b3,start:b2,platform:Mac OS X,
|
||||
03000000503200000110000047010000,Atari VCS Classic Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b3,start:b2,platform:Mac OS X,
|
||||
03000000503200000210000047010000,Atari VCS Modern Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a2,righty:a3,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000008a3500000102000000010000,Backbone One,a:b0,b:b1,back:b16,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b17,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b15,x:b2,y:b3,platform:Mac OS X,
|
||||
@@ -1081,7 +1088,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000005e040000d102000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000dd02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000e002000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000fd02000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
@@ -1118,6 +1125,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000c82d00001590000011010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
05000000c82d00006528000000010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
05000000c82d00006928000000010000,8BitDo N64,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Linux,
|
||||
03000000c82d00006928000011010000,8BitDo N64,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Linux,
|
||||
05000000c82d00002590000001000000,8BitDo NEOGEO,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000008000000210000011010000,8BitDo NES30,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000c82d00000310000011010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux,
|
||||
@@ -1138,6 +1146,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000c82d00000331000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
03000000c82d00000431000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
03000000c82d00002867000000010000,8BitDo S30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00000060000011010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
05000000c82d00000060000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
05000000c82d00000061000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
030000003512000012ab000010010000,8BitDo SFC30,a:b2,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Linux,
|
||||
@@ -1156,6 +1165,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
05000000c82d00000261000000010000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
05000000202800000900000000010000,8BitDo SNES30,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
|
||||
05000000c82d00001230000000010000,8BitDo Ultimate,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00000a31000014010000,8BitDo Ultimate 2C,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000c82d00001d30000011010000,8BitDo Ultimate 2C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b5,paddle2:b2,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000c82d00001b30000001000000,8BitDo Ultimate 2C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b5,paddle2:b2,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00001530000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00001630000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00001730000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
@@ -1170,7 +1182,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
05000000a00500003232000001000000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000a00500003232000008010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
|
||||
050000005e040000e002000030110000,8BitDo Zero 2,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
05000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
|
||||
03000000c01100000355000011010000,Acrux Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00008801000011010000,Afterglow Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
@@ -1390,7 +1401,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
050000005e040000050b000003090000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
050000005e0400008e02000030110000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000120b00000b050000,Microsoft Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
060000005e040000120b000001050000,Microsoft Xbox Series X Controller,a:b0,b:b1,x:b2,y:b3,back:b6,start:b7,guide:b8,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,platform:Linux,
|
||||
060000005e040000120b000001050000,Microsoft Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000030000000300000002000000,Miroof,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,
|
||||
03000000790000001c18000010010000,Mobapad Chitu HD,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
050000004d4f435554452d3035335800,Mocute 053X,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
@@ -1468,7 +1479,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000004c0500003713000011010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000c62400000053000000010000,PowerA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000c62400003a54000001010000,PowerA 1428124-01,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d620000011a7000011010000,PowerA Core Plus Gamecube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
03000000d620000011a7000011010000,PowerA Core Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000dd62000015a7000011010000,PowerA Fusion Nintendo Switch Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000d620000012a7000011010000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000d62000000140000001010000,PowerA Fusion Pro 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
@@ -1485,6 +1496,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000d62000000f20000001010000,PowerA Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d62000000b20000001010000,PowerA Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006d040000d2ca000011010000,Precision Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000250900000017000010010000,PS/SS/N64 Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b5,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2~,righty:a3,start:b8,platform:Linux,
|
||||
03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000341a00003608000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000004c0500006802000010010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux,
|
||||
@@ -1524,6 +1536,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000300f00001211000011010000,Qanba Arcade Joystick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,platform:Linux,
|
||||
03000000222c00000225000011010000,Qanba Dragon Arcade Joystick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000222c00000025000011010000,Qanba Dragon Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
03000000222c00001220000011010000,Qanba Drone 2 Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000222c00001020000011010000,Qanba Drone 2 Arcade Joystick (PS5),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000222c00000020000011010000,Qanba Drone Arcade PS4 Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
03000000300f00001210000010010000,Qanba Joystick Plus,a:b0,b:b1,back:b8,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b6,start:b9,x:b2,y:b3,platform:Linux,
|
||||
03000000222c00000223000011010000,Qanba Obsidian Arcade Joystick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
@@ -1591,6 +1605,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000bc2000000055000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
03000000f025000021c1000010010000,Shanwan Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000341a00000908000010010000,SL6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
030000004b2900000430000011000000,Snakebyte Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
050000004c050000cc09000001000000,Sony DualShock 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
03000000ff000000cb01000010010000,Sony PlayStation Portable,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000250900000500000000010000,Sony PS2 pad with SmartJoy Adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,
|
||||
@@ -1673,6 +1688,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000005e040000a102000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000a102000007010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000a102000030060000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e00001503000000020000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e0400008e02000000010000,Xbox 360 EasySMX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000a102000014010000,Xbox 360 Receiver,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e0400000202000000010000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux,
|
||||
@@ -1902,7 +1918,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
32666633663735353234363064386132,PS2,a:b23,b:b22,back:b29,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a3,righty:a2,start:b30,x:b24,y:b21,platform:Android,
|
||||
050000004c05000068020000dfff3f00,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
536f6e7920504c415953544154494f4e,PS3 Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
61363034663839376638653463633865,PS3 Controller,a:b0,b:b1,back:b15,dpdown:a14,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
61363034663839376638653463633865,PS3 Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
66366539656564653432353139356536,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
66383132326164626636313737373037,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
050000004c050000c405000000783f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
[subrepo]
|
||||
remote = git@github.com:mupen64plus/mupen64plus-core.git
|
||||
branch = master
|
||||
commit = 5340dafcc0f5e8284057ab931dd5c66222d3d49e
|
||||
parent = f306caa55b20e873623e58c470b72bb94d105777
|
||||
commit = 312a5befde1b44db8beee7868b929c23d896991f
|
||||
parent = 6e2d29dc603cb221b7409d2cca646f329073dd03
|
||||
method = merge
|
||||
cmdver = 0.4.6
|
||||
|
||||
+825
-3
@@ -1,9 +1,831 @@
|
||||
Mupen64Plus-Core Emulator Library RELEASE
|
||||
-----------------------------------------
|
||||
|
||||
Mupen64Plus-core v2.5.9 - February 10, 2019
|
||||
-------------------------------------------
|
||||
- *** BETA RELEASE *** For Testing Only ***
|
||||
-----------------------------------------
|
||||
# Mupen64Plus-core v2.6.0 - July 14, 2024
|
||||
|
||||
## Merged PRs
|
||||
|
||||
* [1086](https://github.com/mupen64plus/mupen64plus-core/pull/1086): Backport mupen64plus-libretro-nx dynarec fix for OoTMM randomizer
|
||||
* [1085](https://github.com/mupen64plus/mupen64plus-core/pull/1085): savestates: Only notify SAVECOMPLETE once save is actually done.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/1031
|
||||
* [1084](https://github.com/mupen64plus/mupen64plus-core/pull/1084): Add support for new PIF ROM and reset PIF
|
||||
* [1082](https://github.com/mupen64plus/mupen64plus-core/pull/1082): Update "libmd5-rfc" code to the one used in CPython v2.7 repository
|
||||
* [1079](https://github.com/mupen64plus/mupen64plus-core/pull/1079): CI/CD: Rearranged some parts of the logic, many details and more...
|
||||
* [1077](https://github.com/mupen64plus/mupen64plus-core/pull/1077): CI/CD: Upgrade, generic scripts, independent schedule, etc
|
||||
* [1076](https://github.com/mupen64plus/mupen64plus-core/pull/1076): Correct ROM file size checks
|
||||
* [1075](https://github.com/mupen64plus/mupen64plus-core/pull/1075): ci: install vulkan-headers package in MSYS2
|
||||
(Fixes CI build failure)
|
||||
* [1074](https://github.com/mupen64plus/mupen64plus-core/pull/1074): Update minizip
|
||||
* [1061](https://github.com/mupen64plus/mupen64plus-core/pull/1061): RSP opcode fixes.
|
||||
Ported from: https://gitlab.com/parallel-launcher/parallel-n64
|
||||
* [1060](https://github.com/mupen64plus/mupen64plus-core/pull/1060): src: fix the new_dynarec with musl
|
||||
* [1059](https://github.com/mupen64plus/mupen64plus-core/pull/1059): Add missing ROM file size checks
|
||||
* [1058](https://github.com/mupen64plus/mupen64plus-core/pull/1058): Added 3 translations and a game.
|
||||
* [1057](https://github.com/mupen64plus/mupen64plus-core/pull/1057): Fix Big-Endian Incompatibilities.
|
||||
(Tested on a Wii U.)
|
||||
* [1056](https://github.com/mupen64plus/mupen64plus-core/pull/1056): Add redumps/correct bad ROM IDs and add some unlicensed releases.
|
||||
Based on the latest (2024/5/1) version of the No-Intro database.
|
||||
* [1054](https://github.com/mupen64plus/mupen64plus-core/pull/1054): Increase maximum allowed overclocking factor to 20
|
||||
* [1046](https://github.com/mupen64plus/mupen64plus-core/pull/1046): Added Italian translations.
|
||||
* [1040](https://github.com/mupen64plus/mupen64plus-core/pull/1040): Fix incorrect OSAL_DIR_SEPARATORS when compiling using mingw.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/937
|
||||
* [1039](https://github.com/mupen64plus/mupen64plus-core/pull/1039): bfd version check fix for X.XX version number format
|
||||
* [1036](https://github.com/mupen64plus/mupen64plus-core/pull/1036): use CS4 for netplay DSCP
|
||||
* [1034](https://github.com/mupen64plus/mupen64plus-core/pull/1034): Added English translation of Bomberman 64 - Arcade Edition
|
||||
* [1033](https://github.com/mupen64plus/mupen64plus-core/pull/1033): use memchr instead of strchr in is_viewer.c
|
||||
* [1032](https://github.com/mupen64plus/mupen64plus-core/pull/1032): Adding 4 more translations and updating ROM database.
|
||||
* [1030](https://github.com/mupen64plus/mupen64plus-core/pull/1030): rom: Fix closing the ROM database
|
||||
* [1029](https://github.com/mupen64plus/mupen64plus-core/pull/1029): Update README* files
|
||||
* [1027](https://github.com/mupen64plus/mupen64plus-core/pull/1027): new_dynarec: fix FPU crashes.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/1026
|
||||
* [1023](https://github.com/mupen64plus/mupen64plus-core/pull/1023): Added 3 more translations
|
||||
* [1022](https://github.com/mupen64plus/mupen64plus-core/pull/1022): Add Video Extension functions to support Vulkan
|
||||
* [1021](https://github.com/mupen64plus/mupen64plus-core/pull/1021): netplay fixes from simple64
|
||||
* [1020](https://github.com/mupen64plus/mupen64plus-core/pull/1020): Updating rom database
|
||||
* [1019](https://github.com/mupen64plus/mupen64plus-core/pull/1019): Fix IS64 Truncating Lines
|
||||
* [1018](https://github.com/mupen64plus/mupen64plus-core/pull/1018): Added French translation of Conker's Bad Fur Day
|
||||
* [1017](https://github.com/mupen64plus/mupen64plus-core/pull/1017): Update xxhash to 0.8.2
|
||||
* [1015](https://github.com/mupen64plus/mupen64plus-core/pull/1015): Fix building with libbfd >=2.39
|
||||
* [1014](https://github.com/mupen64plus/mupen64plus-core/pull/1014): Add M64CORE_SCREENSHOT_CAPTURED to m64p_core_param.
|
||||
(Allows front-ends to know when a screenshot has been captured.)
|
||||
* [1012](https://github.com/mupen64plus/mupen64plus-core/pull/1012): Change IPL3 memory detection error to a warning
|
||||
* [1011](https://github.com/mupen64plus/mupen64plus-core/pull/1011): Add Xeno Crisis to the ROM database
|
||||
* [1009](https://github.com/mupen64plus/mupen64plus-core/pull/1009): Ensure out of bounds RDRAM reads 0
|
||||
* [1008](https://github.com/mupen64plus/mupen64plus-core/pull/1008): Add some Spanish translations.
|
||||
* [1006](https://github.com/mupen64plus/mupen64plus-core/pull/1006): Implement unused RDRAM address range 0x0800000-0x03EFFFFF.
|
||||
(Fixes an in-game crash in Paper Mario when hitting a specific tree with a hammer.)
|
||||
* [1005](https://github.com/mupen64plus/mupen64plus-core/pull/1005): CI/CD: Fixes Ubuntu i386 builds, among other changes
|
||||
* [1002](https://github.com/mupen64plus/mupen64plus-core/pull/1002): vidext.c: Fix DPI scaling issues on Windows
|
||||
* [1001](https://github.com/mupen64plus/mupen64plus-core/pull/1001): Interpreter accuracy improvements
|
||||
* [998](https://github.com/mupen64plus/mupen64plus-core/pull/998): Introduce SaveFilenameFormat parameter
|
||||
* [995](https://github.com/mupen64plus/mupen64plus-core/pull/995): CI/CD: Integrate scheduled builds and other...
|
||||
* [994](https://github.com/mupen64plus/mupen64plus-core/pull/994): [64DD] Shorten extra cycles timing depending on motor state for stability
|
||||
* [993](https://github.com/mupen64plus/mupen64plus-core/pull/993): Sanitize save filename
|
||||
* [992](https://github.com/mupen64plus/mupen64plus-core/pull/992): Fix screenshots when compiling with OSD=0
|
||||
* [990](https://github.com/mupen64plus/mupen64plus-core/pull/990): Improve 64DD emulation
|
||||
* [989](https://github.com/mupen64plus/mupen64plus-core/pull/989): Update that helps diagnose and in some cases circumvent issues...
|
||||
* [986](https://github.com/mupen64plus/mupen64plus-core/pull/986): Fix incorrect DDREGION being used for development disks
|
||||
* [983](https://github.com/mupen64plus/mupen64plus-core/pull/983): Introduce M64CMD_DISK_OPEN & M64CMD_DISK_CLOSE
|
||||
* [980](https://github.com/mupen64plus/mupen64plus-core/pull/980): Have netplay just use file extension for file syncing
|
||||
* [979](https://github.com/mupen64plus/mupen64plus-core/pull/979): use MD5 for save filename
|
||||
* [977](https://github.com/mupen64plus/mupen64plus-core/pull/977): Add support for Advanced Homebrew ROM Header save type
|
||||
* [976](https://github.com/mupen64plus/mupen64plus-core/pull/976): Add ROM version to m64p_rom_header
|
||||
* [974](https://github.com/mupen64plus/mupen64plus-core/pull/974): CI/CD: Update MSVC
|
||||
* [970](https://github.com/mupen64plus/mupen64plus-core/pull/970): Fix crash due to SDL_SetVideoMode in SDL 2 compatibility code.
|
||||
* [967](https://github.com/mupen64plus/mupen64plus-core/pull/967): Proper response when eeprom absent
|
||||
* [965](https://github.com/mupen64plus/mupen64plus-core/pull/965): Add Smash Remix 1.2.0
|
||||
* [963](https://github.com/mupen64plus/mupen64plus-core/pull/963): Added GoldenEye X and Perfect Dark Plus to INI
|
||||
* [961](https://github.com/mupen64plus/mupen64plus-core/pull/961): CI/CD: Update
|
||||
* [960](https://github.com/mupen64plus/mupen64plus-core/pull/960): 3 LSBs of AI Length must be 0
|
||||
* [958](https://github.com/mupen64plus/mupen64plus-core/pull/958): Initialize dd_rom_size to 0 if load_dd_disk fails to fix possible runtime errors during initialization
|
||||
* [954](https://github.com/mupen64plus/mupen64plus-core/pull/954): Add support for clang/mingw targets
|
||||
* [946](https://github.com/mupen64plus/mupen64plus-core/pull/946): Use a predictable seed when using netplay
|
||||
* [929](https://github.com/mupen64plus/mupen64plus-core/pull/929): CountPerOp=1 for Bottom of the 9th.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/927
|
||||
* [926](https://github.com/mupen64plus/mupen64plus-core/pull/926): Add ROM entries for SM64 splitscreen hack
|
||||
* [925](https://github.com/mupen64plus/mupen64plus-core/pull/925): Entry for SmashRemix1.1.0
|
||||
* [922](https://github.com/mupen64plus/mupen64plus-core/pull/922): Update xxhash to 0.8.1
|
||||
* [920](https://github.com/mupen64plus/mupen64plus-core/pull/920): Allow frontends to know what DD ROM region they should use
|
||||
* [919](https://github.com/mupen64plus/mupen64plus-core/pull/919): Generate unique mempaks ID when formatting them
|
||||
* [912](https://github.com/mupen64plus/mupen64plus-core/pull/912): CI/CD: Implement GitHub Actions and public nightly builds
|
||||
* [911](https://github.com/mupen64plus/mupen64plus-core/pull/911): Add Donkey Kong 64 - Tag Anywhere V5 (U)
|
||||
* [910](https://github.com/mupen64plus/mupen64plus-core/pull/910): Native Apple Silicon (darwin-arm64) Support
|
||||
* [909](https://github.com/mupen64plus/mupen64plus-core/pull/909): Fix IS Viewer crash.
|
||||
Fixes a segfault in [The Missing Link](https://www.romhacking.net/hacks/5334/) when entering a door.
|
||||
* [901](https://github.com/mupen64plus/mupen64plus-core/pull/901): Add SmashRemix1.0.0/1.0.1
|
||||
* [899](https://github.com/mupen64plus/mupen64plus-core/pull/899): Add NO_KEYBINDINGS for joy mappings
|
||||
* [898](https://github.com/mupen64plus/mupen64plus-core/pull/898): Add RISC-V Support
|
||||
* [893](https://github.com/mupen64plus/mupen64plus-core/pull/893): Add KEYBINDINGS=0 option to Makefile
|
||||
* [890](https://github.com/mupen64plus/mupen64plus-core/pull/890): Fix https://github.com/mupen64plus/mupen64plus-core/issues/889
|
||||
* [887](https://github.com/mupen64plus/mupen64plus-core/pull/887): Fix https://github.com/mupen64plus/mupen64plus-core/issues/886
|
||||
* [884](https://github.com/mupen64plus/mupen64plus-core/pull/884): Fix https://github.com/mupen64plus/mupen64plus-core/issues/883
|
||||
* [881](https://github.com/mupen64plus/mupen64plus-core/pull/881): Fix for compiler warning
|
||||
* [880](https://github.com/mupen64plus/mupen64plus-core/pull/880): Fix 64DD Write Address Check Regression
|
||||
* [878](https://github.com/mupen64plus/mupen64plus-core/pull/878): Make 4K EEPROM default save type; support carts with no EEPROM
|
||||
* [876](https://github.com/mupen64plus/mupen64plus-core/pull/876): IS Viewer support.
|
||||
IS-Viewer 64 was a physical debugging tool (https://n64squid.com/homebrew/n64-sdk/development-hardware/).
|
||||
* [873](https://github.com/mupen64plus/mupen64plus-core/pull/873): VRU support and Hey You Pikachu audio fix
|
||||
* [872](https://github.com/mupen64plus/mupen64plus-core/pull/872): Fix address check for DD DMA Interrupt.
|
||||
Fixes the issue identified in https://github.com/mupen64plus/mupen64plus-core/pull/868#issuecomment-861760293
|
||||
* [871](https://github.com/mupen64plus/mupen64plus-core/pull/871): Misc fixes
|
||||
* [869](https://github.com/mupen64plus/mupen64plus-core/pull/869): Update RSP alignment code as per CEN64
|
||||
* [868](https://github.com/mupen64plus/mupen64plus-core/pull/868): Update PI DMA alignment as per CEN64
|
||||
* [867](https://github.com/mupen64plus/mupen64plus-core/pull/867): Rearranged order of Core settings in the config file
|
||||
* [866](https://github.com/mupen64plus/mupen64plus-core/pull/866): invalidate alternate address on write.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/738
|
||||
* [865](https://github.com/mupen64plus/mupen64plus-core/pull/865): Fix Pokemon Puzzle League saving
|
||||
* [863](https://github.com/mupen64plus/mupen64plus-core/pull/863): Get Xena (E) to boot
|
||||
* [860](https://github.com/mupen64plus/mupen64plus-core/pull/860): Support Unicode on Windows
|
||||
* [858](https://github.com/mupen64plus/mupen64plus-core/pull/858): Add SmashRemix0.9.7
|
||||
* [854](https://github.com/mupen64plus/mupen64plus-core/pull/854): Revert "Prevents game freezing unrelated to dynarecs"
|
||||
* [853](https://github.com/mupen64plus/mupen64plus-core/pull/853): Prevents game freezing unrelated to dynarecs
|
||||
* [848](https://github.com/mupen64plus/mupen64plus-core/pull/848): Fix https://github.com/mupen64plus/mupen64plus-core/issues/842
|
||||
* [847](https://github.com/mupen64plus/mupen64plus-core/pull/847): Netplay fixes from Android port
|
||||
* [843](https://github.com/mupen64plus/mupen64plus-core/pull/843): [new_dynarec] Trivial perf improvement on initial recompilation
|
||||
* [841](https://github.com/mupen64plus/mupen64plus-core/pull/841): Remove CountPerOp=1 for Dino Planet
|
||||
* [840](https://github.com/mupen64plus/mupen64plus-core/pull/840): Add Dinosaur Planet to ini
|
||||
* [836](https://github.com/mupen64plus/mupen64plus-core/pull/836): Fix some warnings about wrong pointer format "%p" needs a void*
|
||||
* [835](https://github.com/mupen64plus/mupen64plus-core/pull/835): Change mempak formatting
|
||||
* [834](https://github.com/mupen64plus/mupen64plus-core/pull/834): refactor lba_end computation to better convey intent
|
||||
* [832](https://github.com/mupen64plus/mupen64plus-core/pull/832): 64dd save rebased
|
||||
* [830](https://github.com/mupen64plus/mupen64plus-core/pull/830): Fix some unsigned/signed comparison warnings
|
||||
* [828](https://github.com/mupen64plus/mupen64plus-core/pull/828): Mention save slot keybindings in docs
|
||||
* [827](https://github.com/mupen64plus/mupen64plus-core/pull/827): Add prefix to m64p_rom_save_type members
|
||||
* [825](https://github.com/mupen64plus/mupen64plus-core/pull/825): Ai fixes
|
||||
* [820](https://github.com/mupen64plus/mupen64plus-core/pull/820): Add correct MD5 for SmashRemix0.9.5b to INI
|
||||
* [817](https://github.com/mupen64plus/mupen64plus-core/pull/817): Failing to explain the asm scripts in a better way...
|
||||
* [816](https://github.com/mupen64plus/mupen64plus-core/pull/816): [Disk] Make sure the wrong System Data is checked upon read of the System Area
|
||||
* [815](https://github.com/mupen64plus/mupen64plus-core/pull/815): Simplify and make the asm script more robust to 3rd party scripts
|
||||
* [814](https://github.com/mupen64plus/mupen64plus-core/pull/814): Add SmashRemix0.9.5b to INI
|
||||
* [811](https://github.com/mupen64plus/mupen64plus-core/pull/811): build: Allow out of tree builds.
|
||||
* [809](https://github.com/mupen64plus/mupen64plus-core/pull/809): docs: fix simple typo, unconditonal -> unconditional
|
||||
* [808](https://github.com/mupen64plus/mupen64plus-core/pull/808): Fix to MacOSX building
|
||||
* [803](https://github.com/mupen64plus/mupen64plus-core/pull/803): storage backend save method nows know about modified byte range
|
||||
* [801](https://github.com/mupen64plus/mupen64plus-core/pull/801): Fixes
|
||||
* [798](https://github.com/mupen64plus/mupen64plus-core/pull/798): Allow customizable save slot keybindings
|
||||
* [796](https://github.com/mupen64plus/mupen64plus-core/pull/796): Align memory for parallel-rdp
|
||||
* [794](https://github.com/mupen64plus/mupen64plus-core/pull/794): Clean up netplay linked list
|
||||
* [793](https://github.com/mupen64plus/mupen64plus-core/pull/793): Just stop frontend from enabling cheats during netplay
|
||||
* [791](https://github.com/mupen64plus/mupen64plus-core/pull/791): Allow front-ends to override user paths
|
||||
* [789](https://github.com/mupen64plus/mupen64plus-core/pull/789): Add count factor overclock
|
||||
* [788](https://github.com/mupen64plus/mupen64plus-core/pull/788): Add M64CMD_ROM_SET_SETTINGS
|
||||
* [785](https://github.com/mupen64plus/mupen64plus-core/pull/785): Tag outgoing UDP packets with EF DSCP
|
||||
* [784](https://github.com/mupen64plus/mupen64plus-core/pull/784): CountPerOp=1 for Smash
|
||||
* [782](https://github.com/mupen64plus/mupen64plus-core/pull/782): Update xxHash to 0.8.0
|
||||
* [779](https://github.com/mupen64plus/mupen64plus-core/pull/779): Fix typo in M64CMD_NETPLAY_INIT docs
|
||||
* [775](https://github.com/mupen64plus/mupen64plus-core/pull/775): Improve compatibility on restrictive platforms and other minor changes
|
||||
* [771](https://github.com/mupen64plus/mupen64plus-core/pull/771): Makefile: add missing quotation mark.
|
||||
* [768](https://github.com/mupen64plus/mupen64plus-core/pull/768): CountPerOp=3 for Wave Race 64 - Shindou Edition
|
||||
* [766](https://github.com/mupen64plus/mupen64plus-core/pull/766): Allow to set custom platform toolset from commands
|
||||
* [764](https://github.com/mupen64plus/mupen64plus-core/pull/764): Get/Set Refresh Rate
|
||||
* [762](https://github.com/mupen64plus/mupen64plus-core/pull/762): [Disk] Major Disk Support Changes
|
||||
* [758](https://github.com/mupen64plus/mupen64plus-core/pull/758): Allow frontends to manage SDL's lifetime
|
||||
* [756](https://github.com/mupen64plus/mupen64plus-core/pull/756): NOT mempak checksum when pak is not present
|
||||
* [753](https://github.com/mupen64plus/mupen64plus-core/pull/753): Netplay
|
||||
* [752](https://github.com/mupen64plus/mupen64plus-core/pull/752): Mask DRAM address in PI DMA
|
||||
* [751](https://github.com/mupen64plus/mupen64plus-core/pull/751): Enable FBInfo for CPU-RDP rendering
|
||||
* [750](https://github.com/mupen64plus/mupen64plus-core/pull/750): Removed "not officially supported" for ARM
|
||||
* [748](https://github.com/mupen64plus/mupen64plus-core/pull/748): CountPerOp=1 for Top Gear Overdrive/Hyperbike
|
||||
* [747](https://github.com/mupen64plus/mupen64plus-core/pull/747): fix compilation on x86
|
||||
* [746](https://github.com/mupen64plus/mupen64plus-core/pull/746): Fix hard reset crash
|
||||
* [745](https://github.com/mupen64plus/mupen64plus-core/pull/745): Implement trap instructions
|
||||
* [744](https://github.com/mupen64plus/mupen64plus-core/pull/744): CountPerOp=1 for Battle for Naboo
|
||||
* [743](https://github.com/mupen64plus/mupen64plus-core/pull/743): Rework flashram implementation
|
||||
* [741](https://github.com/mupen64plus/mupen64plus-core/pull/741): Fix path expansion when building with VisualStudio so directories with spaces will not cause the build to fail.
|
||||
* [740](https://github.com/mupen64plus/mupen64plus-core/pull/740): Use XXH3 hashing (v0.7.3)
|
||||
* [739](https://github.com/mupen64plus/mupen64plus-core/pull/739): IP0 and IP1 CAUSE bits are writeable
|
||||
* [737](https://github.com/mupen64plus/mupen64plus-core/pull/737): BattleTanx (U) games need CountPerOp=3 to boot
|
||||
* [736](https://github.com/mupen64plus/mupen64plus-core/pull/736): Fix multiple definition errors
|
||||
* [735](https://github.com/mupen64plus/mupen64plus-core/pull/735): PIF binary boot rom support
|
||||
* [734](https://github.com/mupen64plus/mupen64plus-core/pull/734): Support FBWrites with a size of 3
|
||||
* [731](https://github.com/mupen64plus/mupen64plus-core/pull/731): Disable FTZ (flush to zero) mode for SSE when FS bit is set
|
||||
* [729](https://github.com/mupen64plus/mupen64plus-core/pull/729): Improve glue code generation
|
||||
* [727](https://github.com/mupen64plus/mupen64plus-core/pull/727): CountPerOp=1 for Elmo's Letter Adventure
|
||||
* [725](https://github.com/mupen64plus/mupen64plus-core/pull/725): Implement PIF write flags properly
|
||||
* [721](https://github.com/mupen64plus/mupen64plus-core/pull/721): Emulate RSP DMA FIFO queue
|
||||
* [718](https://github.com/mupen64plus/mupen64plus-core/pull/718): Adjust DD DMA timing
|
||||
* [717](https://github.com/mupen64plus/mupen64plus-core/pull/717): Don't check event count to test if event is pending
|
||||
* [716](https://github.com/mupen64plus/mupen64plus-core/pull/716): Change some DD logging to only happen in verbose mode
|
||||
* [714](https://github.com/mupen64plus/mupen64plus-core/pull/714): Use cheat code to allow Rat Attack to boot
|
||||
* [710](https://github.com/mupen64plus/mupen64plus-core/pull/710): Disable FBInfo support for dynarecs
|
||||
* [709](https://github.com/mupen64plus/mupen64plus-core/pull/709): Proper handling of divide by zero
|
||||
* [708](https://github.com/mupen64plus/mupen64plus-core/pull/708): Rework interrupt scheduling
|
||||
* [707](https://github.com/mupen64plus/mupen64plus-core/pull/707): Implement cart ROM writes as described by Jan Goldacker.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/609
|
||||
* [706](https://github.com/mupen64plus/mupen64plus-core/pull/706): Enable transferpak write
|
||||
* [705](https://github.com/mupen64plus/mupen64plus-core/pull/705): Only align cart address in PI DMA.
|
||||
This PR fixes https://github.com/mupen64plus/mupen64plus-core/issues/600
|
||||
* [702](https://github.com/mupen64plus/mupen64plus-core/pull/702): Remove next_vi.
|
||||
Should fix https://github.com/mupen64plus/mupen64plus-core/issues/554
|
||||
* [699](https://github.com/mupen64plus/mupen64plus-core/pull/699): Revert "Don't call SDL_PumpEvents() in core"
|
||||
* [698](https://github.com/mupen64plus/mupen64plus-core/pull/698): Don't set DPC_STATUS_START/END_VALID bits
|
||||
* [697](https://github.com/mupen64plus/mupen64plus-core/pull/697): Update xxHash to 0.7.2
|
||||
* [696](https://github.com/mupen64plus/mupen64plus-core/pull/696): if config parameter already exists, add help text if missing, before returning successfully
|
||||
* [694](https://github.com/mupen64plus/mupen64plus-core/pull/694): Let MSBuild do its job and implement a proper AppVeyor with artifact packaging
|
||||
* [692](https://github.com/mupen64plus/mupen64plus-core/pull/692): Fix VI interrupt not being called in certain cases
|
||||
* [687](https://github.com/mupen64plus/mupen64plus-core/pull/687): Database updates
|
||||
* [682](https://github.com/mupen64plus/mupen64plus-core/pull/682): MPAL's refresh rate is 60 Hz
|
||||
* [670](https://github.com/mupen64plus/mupen64plus-core/pull/670): Set VSync (SDL_GL_SetSwapInterval) after GL context is available.
|
||||
This fixes https://github.com/mupen64plus/mupen64plus-core/issues/663
|
||||
* [666](https://github.com/mupen64plus/mupen64plus-core/pull/666): Add speed limiter toggle, reintroduce SDL_PumpEvents for non-android platforms
|
||||
* [632](https://github.com/mupen64plus/mupen64plus-core/pull/632): Add ppc64le support
|
||||
|
||||
|
||||
## Closed Issues
|
||||
|
||||
* [1031](https://github.com/mupen64plus/mupen64plus-core/issues/1031): M64CORE_STATE_SAVECOMPLETE callback happens too early with M64P_PARALLEL
|
||||
* [1081](https://github.com/mupen64plus/mupen64plus-core/issues/1081): Fix buffer overflow in RSP DMA - SECURITY CONCERN
|
||||
* [1065](https://github.com/mupen64plus/mupen64plus-core/issues/1065): [Proposal] Features for tool-assisted speedrunning
|
||||
* [622](https://github.com/mupen64plus/mupen64plus-core/issues/622): Kirby 64 texture stretching
|
||||
* [849](https://github.com/mupen64plus/mupen64plus-core/issues/849): Random Game Crash/Freeze in Ocarina of Time with Dynamic Recompiler
|
||||
* [551](https://github.com/mupen64plus/mupen64plus-core/issues/551): perfect dark flickers quite a bit.
|
||||
* [915](https://github.com/mupen64plus/mupen64plus-core/issues/915): South Park - Chef's Luv Shack Not working
|
||||
* [1049](https://github.com/mupen64plus/mupen64plus-core/issues/1049): Missing ROM file size validation
|
||||
* [1042](https://github.com/mupen64plus/mupen64plus-core/issues/1042): mupen64plus-core no longer builds on Apple Silicon
|
||||
* [1041](https://github.com/mupen64plus/mupen64plus-core/issues/1041): Help, unplayable stuttering
|
||||
* [937](https://github.com/mupen64plus/mupen64plus-core/issues/937): 64DD: Wrong path to save file [Windows]
|
||||
* [1037](https://github.com/mupen64plus/mupen64plus-core/issues/1037): Control Stick in Pokemon Snap not working
|
||||
* [1028](https://github.com/mupen64plus/mupen64plus-core/issues/1028): mupen64plus-core.svg missing in Readme.md
|
||||
* [1026](https://github.com/mupen64plus/mupen64plus-core/issues/1026): Crash (Segfault) on 32bit ARM & DynaRec enabled
|
||||
* [493](https://github.com/mupen64plus/mupen64plus-core/issues/493): FBInfo missing some data with dynarec
|
||||
* [1003](https://github.com/mupen64plus/mupen64plus-core/issues/1003): How To Correctly Install Mupen64Plus in Ubuntu
|
||||
* [1000](https://github.com/mupen64plus/mupen64plus-core/issues/1000): Mupen64Plus has own Screen Resolution on 1.15.0
|
||||
* [999](https://github.com/mupen64plus/mupen64plus-core/issues/999): Error: dlopen('/usr/local/lib/libmupen64plus.so.2') failed: libminizip.so.1: cannot open shared object file: No such file or directory
|
||||
* [157](https://github.com/mupen64plus/mupen64plus-core/issues/157): Hey You, Pikachu! VRU Emulation Support
|
||||
* [646](https://github.com/mupen64plus/mupen64plus-core/issues/646): Pausing causes the emulator to lock up
|
||||
* [988](https://github.com/mupen64plus/mupen64plus-core/issues/988): asm_defines_nasm.h is not generated on Windows
|
||||
* [978](https://github.com/mupen64plus/mupen64plus-core/issues/978): With `AutoStateSlotIncrement = True` `CurrentStateSlot` is not updated
|
||||
* [875](https://github.com/mupen64plus/mupen64plus-core/issues/875): [Feature Request] Overclocking support
|
||||
* [823](https://github.com/mupen64plus/mupen64plus-core/issues/823): Various input-related bugs in Paper Mario
|
||||
* [971](https://github.com/mupen64plus/mupen64plus-core/issues/971): Crash from Core Error: SDL_SetVIdeoMode failure due to invalid 'pitch'
|
||||
* [975](https://github.com/mupen64plus/mupen64plus-core/issues/975): Coverity scan defects founds
|
||||
* [972](https://github.com/mupen64plus/mupen64plus-core/issues/972): Audio crackling problem with ParaLLEl-RDP
|
||||
* [969](https://github.com/mupen64plus/mupen64plus-core/issues/969): Crash with Core Error: SDL_SetVideoMode failed and multiple Core Warnings
|
||||
* [966](https://github.com/mupen64plus/mupen64plus-core/issues/966): Document Vidext_GL_GetDefaultFramebuffer
|
||||
* [956](https://github.com/mupen64plus/mupen64plus-core/issues/956): Add CMake project
|
||||
* [957](https://github.com/mupen64plus/mupen64plus-core/issues/957): "print_insn_i386 undeclared" when building with DEBUGGER=1
|
||||
* [931](https://github.com/mupen64plus/mupen64plus-core/issues/931): Fix FBInfo implementation (for Jet Force Gemini)
|
||||
* [948](https://github.com/mupen64plus/mupen64plus-core/issues/948): Per-Rom configuration C# interop broken
|
||||
* [945](https://github.com/mupen64plus/mupen64plus-core/issues/945): Diddy Kong Racing freezes at 2nd Wizpig race cut scene
|
||||
* [877](https://github.com/mupen64plus/mupen64plus-core/issues/877): Travis CI not working
|
||||
* [159](https://github.com/mupen64plus/mupen64plus-core/issues/159): Mario Story (JPN) freeze
|
||||
* [933](https://github.com/mupen64plus/mupen64plus-core/issues/933): Buck Bumble hangs on the ending cutscene of Mission 3
|
||||
* [927](https://github.com/mupen64plus/mupen64plus-core/issues/927): Bottom of the 9th sluggish when loading match
|
||||
* [928](https://github.com/mupen64plus/mupen64plus-core/issues/928): Bottom of the 9th - some images are Blue tinted
|
||||
* [885](https://github.com/mupen64plus/mupen64plus-core/issues/885): Legend of Zelda, The - Ocarina of Time (U) (V1.0) [T+Por1.5BetaFinal] can crash with new dynarec
|
||||
* [917](https://github.com/mupen64plus/mupen64plus-core/issues/917): San Francisco Rush - No Sound
|
||||
* [822](https://github.com/mupen64plus/mupen64plus-core/issues/822): Illegal instruction (core dumped)
|
||||
* [245](https://github.com/mupen64plus/mupen64plus-core/issues/245): Mario Kart 64 item not usable bug
|
||||
* [761](https://github.com/mupen64plus/mupen64plus-core/issues/761): [Audio Sync] Super Smash Bros. (Europe) Intro speed issues
|
||||
* [861](https://github.com/mupen64plus/mupen64plus-core/issues/861): New Release
|
||||
* [902](https://github.com/mupen64plus/mupen64plus-core/issues/902): 2.5.9 Linux 64 binary bundle - Illegal instruction
|
||||
* [900](https://github.com/mupen64plus/mupen64plus-core/issues/900): [BUG] Zelda OOT, EnableFBEmulation = true
|
||||
* [897](https://github.com/mupen64plus/mupen64plus-core/issues/897): CPU type "riscv64" not supported.
|
||||
* [657](https://github.com/mupen64plus/mupen64plus-core/issues/657): Issue with the mupen64plus dynarec in Indiana Jones and the Infernal Machine
|
||||
* [894](https://github.com/mupen64plus/mupen64plus-core/issues/894): unzip.h not found
|
||||
* [889](https://github.com/mupen64plus/mupen64plus-core/issues/889): Dinosaur Planet crashes with new dynarec
|
||||
* [888](https://github.com/mupen64plus/mupen64plus-core/issues/888): MINGW32 -> x86 compilation
|
||||
* [886](https://github.com/mupen64plus/mupen64plus-core/issues/886): Road rush 64 black screen on new game with new dynarec
|
||||
* [441](https://github.com/mupen64plus/mupen64plus-core/issues/441): Banjo-Tooie freeze
|
||||
* [883](https://github.com/mupen64plus/mupen64plus-core/issues/883): NBA Jam '99/2000 crash on startup with dynarec (aarch64)
|
||||
* [610](https://github.com/mupen64plus/mupen64plus-core/issues/610): Jet force gimini (U) locks up
|
||||
* [372](https://github.com/mupen64plus/mupen64plus-core/issues/372): Top Gear Rally freezing frames
|
||||
* [704](https://github.com/mupen64plus/mupen64plus-core/issues/704): Random crashes when loading save states
|
||||
* [520](https://github.com/mupen64plus/mupen64plus-core/issues/520): Still some crashes, probably when loading save states
|
||||
* [600](https://github.com/mupen64plus/mupen64plus-core/issues/600): Command and conquer in-game save corruption
|
||||
* [171](https://github.com/mupen64plus/mupen64plus-core/issues/171): Glover crash
|
||||
* [174](https://github.com/mupen64plus/mupen64plus-core/issues/174): Audio cuts off in Army Men: Sarge's Heroes with new dynarec
|
||||
* [433](https://github.com/mupen64plus/mupen64plus-core/issues/433): MRC - Multi Racing Championship missing ground with new dynarec
|
||||
* [631](https://github.com/mupen64plus/mupen64plus-core/issues/631): arm dynarec crash with stop_after_jal=0
|
||||
* [806](https://github.com/mupen64plus/mupen64plus-core/issues/806): World Driving Championship doesn't boot with new dynarec
|
||||
* [856](https://github.com/mupen64plus/mupen64plus-core/issues/856): Forcing ROM-side High VSync Mode Gets Ignored By ALL Mupen Forks
|
||||
* [679](https://github.com/mupen64plus/mupen64plus-core/issues/679): Cannot exit fullscreen with ALT+ENTER when launched with Glide64mk2 video plugin
|
||||
* [608](https://github.com/mupen64plus/mupen64plus-core/issues/608): Minizip header build failure
|
||||
* [633](https://github.com/mupen64plus/mupen64plus-core/issues/633): Display Issues when ResY > 1000
|
||||
* [639](https://github.com/mupen64plus/mupen64plus-core/issues/639): Crash on hard reset using Pure Interpreter/Dynarec
|
||||
* [712](https://github.com/mupen64plus/mupen64plus-core/issues/712): fails to build with -fno-common or gcc-10
|
||||
* [755](https://github.com/mupen64plus/mupen64plus-core/issues/755): Black bar in many games when framebuffer emulation is ticked
|
||||
* [821](https://github.com/mupen64plus/mupen64plus-core/issues/821): [mupen64plus:15] Failed to load library file
|
||||
* [845](https://github.com/mupen64plus/mupen64plus-core/issues/845): video-glide64mk2 won't start game
|
||||
* [594](https://github.com/mupen64plus/mupen64plus-core/issues/594): Compiling for ARM?
|
||||
* [517](https://github.com/mupen64plus/mupen64plus-core/issues/517): Unable to build on Raspberry Pi 3 / Raspbian - error: ‘EAX’ undeclared
|
||||
* [408](https://github.com/mupen64plus/mupen64plus-core/issues/408): Cant use emulation?
|
||||
* [378](https://github.com/mupen64plus/mupen64plus-core/issues/378): Can't compile on Linux ARM (64 bit kernel, 32 bit user land)
|
||||
* [292](https://github.com/mupen64plus/mupen64plus-core/issues/292): Mupen64plus.cfg changes being overwritten automatically after game launch.
|
||||
* [252](https://github.com/mupen64plus/mupen64plus-core/issues/252): Compile fails on src Linux Armv7l
|
||||
* [224](https://github.com/mupen64plus/mupen64plus-core/issues/224): Compilation not producing executable
|
||||
* [305](https://github.com/mupen64plus/mupen64plus-core/issues/305): Worms Armageddon new dynarec crash
|
||||
* [286](https://github.com/mupen64plus/mupen64plus-core/issues/286): FIFA 99: Players are floating (x64 Dynarec)
|
||||
* [738](https://github.com/mupen64plus/mupen64plus-core/issues/738): libdragon games only work with Pure Interpreter
|
||||
* [870](https://github.com/mupen64plus/mupen64plus-core/issues/870): Smash Remix 0.9.7 locked at 30fps on Retroarch Mupen64Plus-Next core
|
||||
* [864](https://github.com/mupen64plus/mupen64plus-core/issues/864): Core won't compile.
|
||||
* [862](https://github.com/mupen64plus/mupen64plus-core/issues/862): Error LNK1181 cannot open input file 'Win32\Release\dyna_start.obj'
|
||||
* [838](https://github.com/mupen64plus/mupen64plus-core/issues/838): Input doesn't work in Wolfenstein 3d N64 port
|
||||
* [850](https://github.com/mupen64plus/mupen64plus-core/issues/850): Mupen64Plus Core Configuring gamepad buggy
|
||||
* [842](https://github.com/mupen64plus/mupen64plus-core/issues/842): Dinosaur planet beta TLB exceptions in new dynarec
|
||||
* [846](https://github.com/mupen64plus/mupen64plus-core/issues/846): Virtual N64 controller Notches
|
||||
* [812](https://github.com/mupen64plus/mupen64plus-core/issues/812): Unknown "no name" ROMs passes as known without even checking the MD5/CRC
|
||||
* [640](https://github.com/mupen64plus/mupen64plus-core/issues/640): New dynarec crashing when opening 2nd ROM
|
||||
* [837](https://github.com/mupen64plus/mupen64plus-core/issues/837): Input
|
||||
* [673](https://github.com/mupen64plus/mupen64plus-core/issues/673): Uncached memory code execution support
|
||||
* [826](https://github.com/mupen64plus/mupen64plus-core/issues/826): PR #788 breaks build of mupen64plus-video-rice
|
||||
* [576](https://github.com/mupen64plus/mupen64plus-core/issues/576): banjo tooie tip-toe using keyboard (move banjo analog 5% to 10% range)
|
||||
* [786](https://github.com/mupen64plus/mupen64plus-core/issues/786): Undefined behaviour in rsp-hle
|
||||
* [813](https://github.com/mupen64plus/mupen64plus-core/issues/813): Video displays at the lower left corner, no full screen
|
||||
* [797](https://github.com/mupen64plus/mupen64plus-core/issues/797): Unable to start Mupen64Plus on Slackware Linux (2.5.0)
|
||||
* [800](https://github.com/mupen64plus/mupen64plus-core/issues/800): m64p_rom_header struct outdated?
|
||||
* [787](https://github.com/mupen64plus/mupen64plus-core/issues/787): Rat Attack Not Booting
|
||||
* [790](https://github.com/mupen64plus/mupen64plus-core/issues/790): Nuclear Escape button
|
||||
* [350](https://github.com/mupen64plus/mupen64plus-core/issues/350): RSP DMA double buffering not implemented
|
||||
* [732](https://github.com/mupen64plus/mupen64plus-core/issues/732): Donkey Kong 64 (U) [f2] does not boot
|
||||
* [730](https://github.com/mupen64plus/mupen64plus-core/issues/730): Binary PIF ROM support
|
||||
* [777](https://github.com/mupen64plus/mupen64plus-core/issues/777): Is there any way to add Gameshark Codes?
|
||||
* [780](https://github.com/mupen64plus/mupen64plus-core/issues/780): Illegal instruction (core dumped)
|
||||
* [778](https://github.com/mupen64plus/mupen64plus-core/issues/778): Every time I open mupen64plus-ui-console it crashes very quickly.
|
||||
* [776](https://github.com/mupen64plus/mupen64plus-core/issues/776): mupen64plus-gui DK64 - Severe Slowdown
|
||||
* [773](https://github.com/mupen64plus/mupen64plus-core/issues/773): Account creation on the wiki (or just answer to my question... 😅)
|
||||
* [763](https://github.com/mupen64plus/mupen64plus-core/issues/763): Dynamically switch output resolution to that of console
|
||||
* [760](https://github.com/mupen64plus/mupen64plus-core/issues/760): Fails to build under MSYS Windows 2004
|
||||
* [686](https://github.com/mupen64plus/mupen64plus-core/issues/686): New dynarec and F-Zero X Expansion Kit hacked rom
|
||||
* [599](https://github.com/mupen64plus/mupen64plus-core/issues/599): N64 database errors?
|
||||
* [722](https://github.com/mupen64plus/mupen64plus-core/issues/722): AppVeyor is broken
|
||||
* [719](https://github.com/mupen64plus/mupen64plus-core/issues/719): Incorrect Folder Name In Source Code
|
||||
* [703](https://github.com/mupen64plus/mupen64plus-core/issues/703): Can't build core
|
||||
* [676](https://github.com/mupen64plus/mupen64plus-core/issues/676): CheckInterrupts is not implemented for Audio/Gfx/RSP plugins
|
||||
* [674](https://github.com/mupen64plus/mupen64plus-core/issues/674): Mupen32.exe, more like
|
||||
* [650](https://github.com/mupen64plus/mupen64plus-core/issues/650): Kaillera integration/support
|
||||
* [689](https://github.com/mupen64plus/mupen64plus-core/issues/689): Aero Fighters Assault - Startup Error
|
||||
* [749](https://github.com/mupen64plus/mupen64plus-core/issues/749): Missing "mupen64plus.dll" when compiling on windows
|
||||
* [570](https://github.com/mupen64plus/mupen64plus-core/issues/570): Battle of Naboo: wrong gfx in level selection (core bug)
|
||||
* [742](https://github.com/mupen64plus/mupen64plus-core/issues/742): Super Mario 64 not responding
|
||||
* [720](https://github.com/mupen64plus/mupen64plus-core/issues/720): Mupen64Plus Compiled With Visual Studio Solution File Has No Sound
|
||||
* [609](https://github.com/mupen64plus/mupen64plus-core/issues/609): WCW Backstage Assault locks up
|
||||
* [669](https://github.com/mupen64plus/mupen64plus-core/issues/669): Test ROM hangs emulator
|
||||
* [636](https://github.com/mupen64plus/mupen64plus-core/issues/636): Elmo's Letter Adventure - keys are not responsive
|
||||
* [723](https://github.com/mupen64plus/mupen64plus-core/issues/723): Audio stops in Army Men Sarges Heroes
|
||||
* [660](https://github.com/mupen64plus/mupen64plus-core/issues/660): Custom roms won't boot
|
||||
* [711](https://github.com/mupen64plus/mupen64plus-core/issues/711): Memory leak when playing Indiana Jones (musyx_v1/v2_task)
|
||||
* [713](https://github.com/mupen64plus/mupen64plus-core/issues/713): Adding webhook to Discord64
|
||||
* [554](https://github.com/mupen64plus/mupen64plus-core/issues/554): VI_CURRENT_REG not calculated properly if CP0_COUNT_REG changed by software
|
||||
* [634](https://github.com/mupen64plus/mupen64plus-core/issues/634): screenshots can't be saved correctly when ROM had an invalid header.
|
||||
* [546](https://github.com/mupen64plus/mupen64plus-core/issues/546): Pokemon Puzzle League FMV not dealt with by RSP-HLE
|
||||
* [563](https://github.com/mupen64plus/mupen64plus-core/issues/563): Compiling for AARCH64/ARM64?
|
||||
* [663](https://github.com/mupen64plus/mupen64plus-core/issues/663): VidExt_GL_SetAttribute sets SDL_GL_SetSwapInterval prematurely
|
||||
* [675](https://github.com/mupen64plus/mupen64plus-core/issues/675): any way to take advantage of GLES 3.0 ES on rpi4?
|
||||
* [656](https://github.com/mupen64plus/mupen64plus-core/issues/656): Failed to create GL context on RPI3 under mesa with GLideN64
|
||||
* [678](https://github.com/mupen64plus/mupen64plus-core/issues/678): segfault while loading World Driver Championship
|
||||
* [661](https://github.com/mupen64plus/mupen64plus-core/issues/661): Does Mupen64 work with Windows 10 64-Bit? Or Does 64-Bit Windows not work with the 32-Bit?
|
||||
* [658](https://github.com/mupen64plus/mupen64plus-core/issues/658): SetVideoMode returns NULL pointer to Screen
|
||||
* [265](https://github.com/mupen64plus/mupen64plus-core/issues/265): Banjo-Kazooie intro puzzle effect not displaying correctly with Rice
|
||||
* [655](https://github.com/mupen64plus/mupen64plus-core/issues/655): [Glide64] Compilation error on char signedness
|
||||
* [653](https://github.com/mupen64plus/mupen64plus-core/issues/653): Opening game crashes on Mac
|
||||
* [648](https://github.com/mupen64plus/mupen64plus-core/issues/648): How compile "mupen64plus-video-z64" on debian 9
|
||||
* [645](https://github.com/mupen64plus/mupen64plus-core/issues/645): Retrolinc Controller not found - Arch Linux mupen64plus
|
||||
* [637](https://github.com/mupen64plus/mupen64plus-core/issues/637): LoS: Majoras Mask unable to move marker to items in inventory.
|
||||
* [638](https://github.com/mupen64plus/mupen64plus-core/issues/638): Command Line Ends Process After Starting And Request A More Detailed Install Readme File
|
||||
* [628](https://github.com/mupen64plus/mupen64plus-core/issues/628): 2.5.9: Print of size_t has to use z modifier
|
||||
* [630](https://github.com/mupen64plus/mupen64plus-core/issues/630): 2.5.9: Missing INPUT_API_VERSION change (2.5 Input plugin not working with 2.5.9 core)
|
||||
|
||||
|
||||
## Top Contributors (2 or more commits)
|
||||
1. Rosalie241
|
||||
2. loganmc10
|
||||
3. LuigiBlood
|
||||
4. bsmiles32
|
||||
5. Gillou68310
|
||||
6. Jj0YzL5nvJ
|
||||
7. richard42
|
||||
8. Pcgaming575
|
||||
9. meeq
|
||||
10. GhostlyDark
|
||||
11. mpharoah
|
||||
12. Clownacy
|
||||
13. obrea
|
||||
14. m4xw
|
||||
15. alice-mkh
|
||||
16. flagrama
|
||||
17. dankcushions
|
||||
|
||||
---------------------------------------------
|
||||
# Mupen64Plus-core v2.5.9 - February 10, 2019
|
||||
|
||||
## Merged PRs
|
||||
|
||||
* [619](https://github.com/mupen64plus/mupen64plus-core/pull/619): do not force saving config when file not present
|
||||
(Front-ends now ensure that configuration is saved (when desired) before starting the game.)
|
||||
* [618](https://github.com/mupen64plus/mupen64plus-core/pull/618): __clear_cache fix for ARM 64 devices plus ANDROID cleanup
|
||||
* [615](https://github.com/mupen64plus/mupen64plus-core/pull/615): Fixes for last save state update
|
||||
* [614](https://github.com/mupen64plus/mupen64plus-core/pull/614): Make stop_after_jal a save state parameter instead of configuration.
|
||||
* [612](https://github.com/mupen64plus/mupen64plus-core/pull/612): Allow valid interpretations of strings as non-strings
|
||||
* [611](https://github.com/mupen64plus/mupen64plus-core/pull/611): Remove DelaySI from wiki
|
||||
(This parameter was removed from the core in 0bcfd3cc7.)
|
||||
* [607](https://github.com/mupen64plus/mupen64plus-core/pull/607): Fix joy_max for initialize loop
|
||||
* [606](https://github.com/mupen64plus/mupen64plus-core/pull/606): new_dynarec fixes
|
||||
* [605](https://github.com/mupen64plus/mupen64plus-core/pull/605): Preserve floating-point configuration values.
|
||||
* [604](https://github.com/mupen64plus/mupen64plus-core/pull/604): Fix mingw build
|
||||
* [602](https://github.com/mupen64plus/mupen64plus-core/pull/602): new_dynarec: Initial support for x64 and arm64
|
||||
* [598](https://github.com/mupen64plus/mupen64plus-core/pull/598): Fix errors introduced in #444
|
||||
(These changes allow Rugrats and Xena to boot.)
|
||||
* [597](https://github.com/mupen64plus/mupen64plus-core/pull/597): Avoid nameless union in r4300_core.h (this is a non standard extension)
|
||||
* [596](https://github.com/mupen64plus/mupen64plus-core/pull/596): Fix access to DD_ROM memory pointer.
|
||||
* [593](https://github.com/mupen64plus/mupen64plus-core/pull/593): Two new debugger APIs: 'DebugBreakpointTriggeredBy' and 'DebugVirtualToPhysical'
|
||||
* [590](https://github.com/mupen64plus/mupen64plus-core/pull/590): Fix missing header in biopak.c
|
||||
* [589](https://github.com/mupen64plus/mupen64plus-core/pull/589): Cleanings
|
||||
* [588](https://github.com/mupen64plus/mupen64plus-core/pull/588): added support for aarch64
|
||||
* [585](https://github.com/mupen64plus/mupen64plus-core/pull/585): Cleanings
|
||||
* [583](https://github.com/mupen64plus/mupen64plus-core/pull/583): Update nasm path to use latest stable release 2.13.03
|
||||
* [582](https://github.com/mupen64plus/mupen64plus-core/pull/582): Move third-party code into subprojects directory.
|
||||
* [581](https://github.com/mupen64plus/mupen64plus-core/pull/581): Bugfixes
|
||||
(Various compilation fixes found while working on meson porting.)
|
||||
* [579](https://github.com/mupen64plus/mupen64plus-core/pull/579): Make --nosaveoptions not ever save options.
|
||||
* [578](https://github.com/mupen64plus/mupen64plus-core/pull/578): Update readme
|
||||
* [573](https://github.com/mupen64plus/mupen64plus-core/pull/573): Rework Video Capture backend to allow better isolation.
|
||||
* [569](https://github.com/mupen64plus/mupen64plus-core/pull/569): Cleanup tpak savestate loading.
|
||||
* [566](https://github.com/mupen64plus/mupen64plus-core/pull/566): Initial bio pak support.
|
||||
* [565](https://github.com/mupen64plus/mupen64plus-core/pull/565): Fix homepage link in dd_controller files.
|
||||
* [564](https://github.com/mupen64plus/mupen64plus-core/pull/564): GB Camera support
|
||||
* [561](https://github.com/mupen64plus/mupen64plus-core/pull/561): Update xxHash to 0.6.5
|
||||
* [557](https://github.com/mupen64plus/mupen64plus-core/pull/557): Increase DebugMessage buffer size to prevent overflows
|
||||
* [556](https://github.com/mupen64plus/mupen64plus-core/pull/556): Add VidExt_GL_GetDefaultFramebuffer
|
||||
* [553](https://github.com/mupen64plus/mupen64plus-core/pull/553): Fix write_memory_8
|
||||
(This was overflowing a u8, causing zeroes to be written most of the time instead of the intended value.)
|
||||
* [550](https://github.com/mupen64plus/mupen64plus-core/pull/550): Don't call SDL_PumpEvents() in core
|
||||
* [549](https://github.com/mupen64plus/mupen64plus-core/pull/549): Clear CLOCK_REG when requested
|
||||
* [548](https://github.com/mupen64plus/mupen64plus-core/pull/548): Added missing Joy Mappings
|
||||
(Added the 4 missing Joystick counterparts of the Keyboard Mappings: Reset, Speed Down, Speed Up, Frame Advance)
|
||||
* [547](https://github.com/mupen64plus/mupen64plus-core/pull/547): R4300 refactorings
|
||||
* [545](https://github.com/mupen64plus/mupen64plus-core/pull/545): Fix: try to keep savestates offsets aligned.
|
||||
* [544](https://github.com/mupen64plus/mupen64plus-core/pull/544): Fix DSLLV in x86 dynarec
|
||||
* [541](https://github.com/mupen64plus/mupen64plus-core/pull/541): Force alignment of PI DMA
|
||||
* [538](https://github.com/mupen64plus/mupen64plus-core/pull/538): Alternative implementation of "Don't deal with save states when RSP task is locked"
|
||||
* [537](https://github.com/mupen64plus/mupen64plus-core/pull/537): new_dynarec: Fix DMULT/DMULTU recompiled code
|
||||
* [535](https://github.com/mupen64plus/mupen64plus-core/pull/535): Allow game controllers to be unplugged and plugged in on the fly
|
||||
* [533](https://github.com/mupen64plus/mupen64plus-core/pull/533): Remove CountPerOp=1 for Vigilante games
|
||||
* [532](https://github.com/mupen64plus/mupen64plus-core/pull/532): If a ROM is not in the database, use 4 players, enable mempak, and enable rumble pak
|
||||
* [529](https://github.com/mupen64plus/mupen64plus-core/pull/529): Fix compile on MinGW
|
||||
* [526](https://github.com/mupen64plus/mupen64plus-core/pull/526): Fix undefined reference to print_insn_i386 with libopcode >= 2.29
|
||||
* [521](https://github.com/mupen64plus/mupen64plus-core/pull/521): Fix empty dynarec
|
||||
* [519](https://github.com/mupen64plus/mupen64plus-core/pull/519): Less g dev
|
||||
(Reduce usage of global variable g_dev (and other derived variables) in emulation modules.)
|
||||
* [515](https://github.com/mupen64plus/mupen64plus-core/pull/515): Fix compilation of new dynarec.
|
||||
* [514](https://github.com/mupen64plus/mupen64plus-core/pull/514): Fix potential crash with FBInfo and save states
|
||||
* [513](https://github.com/mupen64plus/mupen64plus-core/pull/513): Add SiDmaDuration option.
|
||||
* [510](https://github.com/mupen64plus/mupen64plus-core/pull/510): Cleanings
|
||||
(This is just some more internal source cleanings such as reindentation, forward declaration, header inclusion or just moving some code around.)
|
||||
* [507](https://github.com/mupen64plus/mupen64plus-core/pull/507): Update homepage links
|
||||
* [505](https://github.com/mupen64plus/mupen64plus-core/pull/505): Update xxHash to 0.6.4
|
||||
* [503](https://github.com/mupen64plus/mupen64plus-core/pull/503): Device: RDRAM: Use the R4300 helpers to get the R4300 registers
|
||||
* [502](https://github.com/mupen64plus/mupen64plus-core/pull/502): Bugfixes
|
||||
(Some small bugfixes found while looking around.)
|
||||
* [501](https://github.com/mupen64plus/mupen64plus-core/pull/501): Implement enough of RDRAM subsystem to remove rdram detection hack.
|
||||
* [500](https://github.com/mupen64plus/mupen64plus-core/pull/500): Fix reset bug introduced in commit 1c01c233.
|
||||
* [499](https://github.com/mupen64plus/mupen64plus-core/pull/499): Fix copy pasting error in MBC2 messages.
|
||||
* [498](https://github.com/mupen64plus/mupen64plus-core/pull/498): Fix crash when loading save state
|
||||
* [496](https://github.com/mupen64plus/mupen64plus-core/pull/496): Various GB cart enhancements.
|
||||
* [495](https://github.com/mupen64plus/mupen64plus-core/pull/495): Create files_macos.c
|
||||
(First try to get a proper Mupen64Plus app on macOS)
|
||||
* [494](https://github.com/mupen64plus/mupen64plus-core/pull/494): Update Makefile
|
||||
(First try to get it fixed for macOS)
|
||||
* [492](https://github.com/mupen64plus/mupen64plus-core/pull/492): If DEBUG not set, set NDEBUG
|
||||
* [491](https://github.com/mupen64plus/mupen64plus-core/pull/491): Remove orphaned line related to removed GoldenEye TLB hack
|
||||
(Needed to resolve build error on Raspberry Pi 3).
|
||||
* [490](https://github.com/mupen64plus/mupen64plus-core/pull/490): Warnings
|
||||
(With this PR all warnings except those about unused parameters should be gone. This is tested on GCC with -Wall -Wextra -pedantic.)
|
||||
* [487](https://github.com/mupen64plus/mupen64plus-core/pull/487): Remove GoldenEye TLB hack.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/447
|
||||
* [485](https://github.com/mupen64plus/mupen64plus-core/pull/485): Modify DPC_STATUS_FREEZE hack
|
||||
* [483](https://github.com/mupen64plus/mupen64plus-core/pull/483): Extract PIF, RCP and RDRAM modules
|
||||
(Just moving some files around to isolate PIF and RCP modules.)
|
||||
* [481](https://github.com/mupen64plus/mupen64plus-core/pull/481): Add more FB writes and reads
|
||||
* [480](https://github.com/mupen64plus/mupen64plus-core/pull/480): Fix 40 winks ini
|
||||
* [478](https://github.com/mupen64plus/mupen64plus-core/pull/478): Fix FbInfo 2
|
||||
* [476](https://github.com/mupen64plus/mupen64plus-core/pull/476): Preliminary refactorings
|
||||
(This PR is just a collection of preliminary refactoring commits extracted from PR #446. They are not directly related to 64DD so we can incorporate them hopefully sooner.)
|
||||
* [475](https://github.com/mupen64plus/mupen64plus-core/pull/475): Fix handlers[i].{read,write}32 comparison in dynarec.
|
||||
* [474](https://github.com/mupen64plus/mupen64plus-core/pull/474): Big alloc fallback
|
||||
(Another try at the memory allocation failure encountered in some Android devices.)
|
||||
* [473](https://github.com/mupen64plus/mupen64plus-core/pull/473): CountPerOp=1 for Bokujou Monogatari 2
|
||||
* [472](https://github.com/mupen64plus/mupen64plus-core/pull/472): If an invalid controller pak is selected, use NONE instead
|
||||
* [471](https://github.com/mupen64plus/mupen64plus-core/pull/471): Fix LWL, LWR, LDL, LDR, SWL, SWR, SDL, SDR implementations
|
||||
* [470](https://github.com/mupen64plus/mupen64plus-core/pull/470): Build MXE targets as additional tests in travis build matrix
|
||||
* [466](https://github.com/mupen64plus/mupen64plus-core/pull/466): CountPerOp=1 for Densha de Go! 64
|
||||
* [465](https://github.com/mupen64plus/mupen64plus-core/pull/465): new_dynarec: Fix Dance Dance revolution
|
||||
* [464](https://github.com/mupen64plus/mupen64plus-core/pull/464): Increase Delay DP Interrupt time
|
||||
* [461](https://github.com/mupen64plus/mupen64plus-core/pull/461): Get rid of USE_SDL flag
|
||||
* [460](https://github.com/mupen64plus/mupen64plus-core/pull/460): Add support for different flashram types.
|
||||
* [459](https://github.com/mupen64plus/mupen64plus-core/pull/459): Fix reset
|
||||
* [457](https://github.com/mupen64plus/mupen64plus-core/pull/457): Add support for SRAM cpu read/write
|
||||
* [455](https://github.com/mupen64plus/mupen64plus-core/pull/455): Complete (U) save types + Add four games
|
||||
* [454](https://github.com/mupen64plus/mupen64plus-core/pull/454): CountPerOp=1 for Gauntlet Legends
|
||||
(Allows for better performance when using GLideN64.)
|
||||
* [453](https://github.com/mupen64plus/mupen64plus-core/pull/453): Do SI DMA in 2 stages.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/452
|
||||
* [451](https://github.com/mupen64plus/mupen64plus-core/pull/451): Enable CountPerOp=1 for Battletanx 2 & Army Men
|
||||
* [450](https://github.com/mupen64plus/mupen64plus-core/pull/450): Fix issues listed in #385
|
||||
* [449](https://github.com/mupen64plus/mupen64plus-core/pull/449): Allow switching controller paks using CONTROLS.plugin API
|
||||
* [448](https://github.com/mupen64plus/mupen64plus-core/pull/448): Fix some Save Type entries
|
||||
* [446](https://github.com/mupen64plus/mupen64plus-core/pull/446): [WIP] Add support for 64 Disk Drive.
|
||||
* [444](https://github.com/mupen64plus/mupen64plus-core/pull/444): Re-work the way VI interrupts are timed
|
||||
* [443](https://github.com/mupen64plus/mupen64plus-core/pull/443): Remove CountPerOp=1 for Ep I Racer
|
||||
* [440](https://github.com/mupen64plus/mupen64plus-core/pull/440): Mempak/Rumble fixes
|
||||
* [439](https://github.com/mupen64plus/mupen64plus-core/pull/439): Fix crash when loading savestate.
|
||||
* [437](https://github.com/mupen64plus/mupen64plus-core/pull/437): ROM database update
|
||||
* [436](https://github.com/mupen64plus/mupen64plus-core/pull/436): PI refactorings
|
||||
* [430](https://github.com/mupen64plus/mupen64plus-core/pull/430): Fix a few indentation warnings
|
||||
* [428](https://github.com/mupen64plus/mupen64plus-core/pull/428): Raspberry Pi: use new vendor library names
|
||||
* [427](https://github.com/mupen64plus/mupen64plus-core/pull/427): Do a proper open bus read.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/418
|
||||
* [425](https://github.com/mupen64plus/mupen64plus-core/pull/425): Add note about SP_STATUS_REG
|
||||
* [424](https://github.com/mupen64plus/mupen64plus-core/pull/424): SDL_Delay is only called just before input polling.
|
||||
* [423](https://github.com/mupen64plus/mupen64plus-core/pull/423): Add SP_STATUS_REG and RDRAM_SIZE to gfx_info
|
||||
* [422](https://github.com/mupen64plus/mupen64plus-core/pull/422): Stubbing some 64dd conversion roms into database.
|
||||
* [421](https://github.com/mupen64plus/mupen64plus-core/pull/421): CIC and Densha de Go Translation Patch
|
||||
* [420](https://github.com/mupen64plus/mupen64plus-core/pull/420): Don't use IO_BUSY flags for DMA
|
||||
* [417](https://github.com/mupen64plus/mupen64plus-core/pull/417): Fix rounding in interpreter
|
||||
* [415](https://github.com/mupen64plus/mupen64plus-core/pull/415): Randomize PI/SI interrupt timing
|
||||
* [411](https://github.com/mupen64plus/mupen64plus-core/pull/411): More si refactorings
|
||||
* [410](https://github.com/mupen64plus/mupen64plus-core/pull/410): Fix slowdowns in Mischief Makers
|
||||
* [407](https://github.com/mupen64plus/mupen64plus-core/pull/407): Add AppVeyor config
|
||||
* [406](https://github.com/mupen64plus/mupen64plus-core/pull/406): Bump savestate format to 1.2
|
||||
* [404](https://github.com/mupen64plus/mupen64plus-core/pull/404): Add entry for 007 - Goldfinger
|
||||
* [403](https://github.com/mupen64plus/mupen64plus-core/pull/403): Fix save size for Custom Robo V2.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/402
|
||||
* [401](https://github.com/mupen64plus/mupen64plus-core/pull/401): Add travisCI and coverity badges
|
||||
* [399](https://github.com/mupen64plus/mupen64plus-core/pull/399): Fix screenshots for games with colon in the title.
|
||||
Fix for https://github.com/mupen64plus/mupen64plus-core/issues/398
|
||||
* [394](https://github.com/mupen64plus/mupen64plus-core/pull/394): CountPerOp=1 for Yakouchuu II - Satsujin Kouro
|
||||
* [393](https://github.com/mupen64plus/mupen64plus-core/pull/393): Fix description of some core config variables
|
||||
* [390](https://github.com/mupen64plus/mupen64plus-core/pull/390): Fix set_fpr_pointers
|
||||
* [388](https://github.com/mupen64plus/mupen64plus-core/pull/388): Remove DelaySI hack/option
|
||||
* [387](https://github.com/mupen64plus/mupen64plus-core/pull/387): Remove Rat Attack hack for new_dynarec
|
||||
* [386](https://github.com/mupen64plus/mupen64plus-core/pull/386): Switch from adler32 to xxHash
|
||||
* [382](https://github.com/mupen64plus/mupen64plus-core/pull/382): Use faster container based Travis CI
|
||||
* [381](https://github.com/mupen64plus/mupen64plus-core/pull/381): Let travis handle the package installation directly
|
||||
* [375](https://github.com/mupen64plus/mupen64plus-core/pull/375): Fix duplicate saving in Paper Mario.
|
||||
This fixes https://github.com/mupen64plus/mupen64plus-core/issues/154
|
||||
* [373](https://github.com/mupen64plus/mupen64plus-core/pull/373): Remove Rat Attack hack
|
||||
* [371](https://github.com/mupen64plus/mupen64plus-core/pull/371): Have emulator signal RSP interrupts again
|
||||
* [370](https://github.com/mupen64plus/mupen64plus-core/pull/370): Base count_per_scanline on N64 clockrate
|
||||
* [367](https://github.com/mupen64plus/mupen64plus-core/pull/367): Fixing some warnings
|
||||
* [365](https://github.com/mupen64plus/mupen64plus-core/pull/365): Fix order of operations for AI interrupt timing
|
||||
* [364](https://github.com/mupen64plus/mupen64plus-core/pull/364): Get x86 new dynarec compiling again (when using PIC)
|
||||
* [363](https://github.com/mupen64plus/mupen64plus-core/pull/363): Round PI_WR_LEN_REG up to nearest even number
|
||||
* [362](https://github.com/mupen64plus/mupen64plus-core/pull/362): Add setting for Mischief Makers J
|
||||
* [360](https://github.com/mupen64plus/mupen64plus-core/pull/360): Rewrite PIF emulation.
|
||||
* [358](https://github.com/mupen64plus/mupen64plus-core/pull/358): Fix RevA (U) Rogue Squadron
|
||||
* [356](https://github.com/mupen64plus/mupen64plus-core/pull/356): Get rid of "alternate VI timing"
|
||||
* [355](https://github.com/mupen64plus/mupen64plus-core/pull/355): Change tpak/gb debug message level to verbose.
|
||||
* [352](https://github.com/mupen64plus/mupen64plus-core/pull/352): CountPerOp=1 for Factor5 games
|
||||
* [351](https://github.com/mupen64plus/mupen64plus-core/pull/351): Add SI_STATUS_DMA_BUSY.
|
||||
This fixes the error:
|
||||
```
|
||||
Core Warning: two events of type 0x8 in interrupt queue
|
||||
```
|
||||
in some games.
|
||||
* [343](https://github.com/mupen64plus/mupen64plus-core/pull/343): Send audio data to plugin as the DMA drains
|
||||
* [339](https://github.com/mupen64plus/mupen64plus-core/pull/339): Use count_per_op instead of 2
|
||||
* [336](https://github.com/mupen64plus/mupen64plus-core/pull/336): Ignore TLB write if TLB entry is unmapping itself.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/221
|
||||
* [334](https://github.com/mupen64plus/mupen64plus-core/pull/334): Fix write_cart_rom/read_cart_rom.
|
||||
This fixes https://github.com/mupen64plus/mupen64plus-core/issues/311 (International Track & Field 2000 and Midway's Greatest Arcade Hits Vol. 1)
|
||||
* [333](https://github.com/mupen64plus/mupen64plus-core/pull/333): Multiplayer timing fix for Mario Kart E and J
|
||||
* [330](https://github.com/mupen64plus/mupen64plus-core/pull/330): Add hack for Rat Attack!
|
||||
* [329](https://github.com/mupen64plus/mupen64plus-core/pull/329): Print accelerator when GB cart supports it.
|
||||
* [327](https://github.com/mupen64plus/mupen64plus-core/pull/327): Implement "Audio Signal"
|
||||
* [326](https://github.com/mupen64plus/mupen64plus-core/pull/326): Updates to DisableExtraMem
|
||||
* [324](https://github.com/mupen64plus/mupen64plus-core/pull/324): Add CP0_ERROREPC_REG to MTC0.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/323
|
||||
* [322](https://github.com/mupen64plus/mupen64plus-core/pull/322): Fix asm_defines w/ mawk by setting LANG=C
|
||||
* [320](https://github.com/mupen64plus/mupen64plus-core/pull/320): Revert "Allow using compiler other than gcc"
|
||||
* [318](https://github.com/mupen64plus/mupen64plus-core/pull/318): Fix random resets in South Park 64.
|
||||
https://github.com/mupen64plus/mupen64plus-core/issues/316
|
||||
* [317](https://github.com/mupen64plus/mupen64plus-core/pull/317): Allow using compiler other than gcc
|
||||
* [313](https://github.com/mupen64plus/mupen64plus-core/pull/313): Memory refactorings
|
||||
* [312](https://github.com/mupen64plus/mupen64plus-core/pull/312): Remove memd
|
||||
* [310](https://github.com/mupen64plus/mupen64plus-core/pull/310): Fix reading CP0_RANDOM_REG.
|
||||
Fixes https://github.com/mupen64plus/mupen64plus-core/issues/309
|
||||
* [308](https://github.com/mupen64plus/mupen64plus-core/pull/308): Add note for NBA Showtime - NBA on NBC
|
||||
* [307](https://github.com/mupen64plus/mupen64plus-core/pull/307): Trust plugins to trigger SP interrupts
|
||||
* [306](https://github.com/mupen64plus/mupen64plus-core/pull/306): INI cheat cleanup
|
||||
* [301](https://github.com/mupen64plus/mupen64plus-core/pull/301): Avoid usage of global variable g_delay_si.
|
||||
(One less global variable used inside the emulation core.)
|
||||
* [300](https://github.com/mupen64plus/mupen64plus-core/pull/300): CountPerScanline=1600 for Twisted Edge
|
||||
* [298](https://github.com/mupen64plus/mupen64plus-core/pull/298): Various Mac-related build fixes
|
||||
* [297](https://github.com/mupen64plus/mupen64plus-core/pull/297): Fix M64P_GL_SWAP_CONTROL with SDL>=1.3 and no video extension
|
||||
* [296](https://github.com/mupen64plus/mupen64plus-core/pull/296): Fix undefined behavior in the interpreter
|
||||
* [295](https://github.com/mupen64plus/mupen64plus-core/pull/295): [WIP] Pass pointer to fcr31 around in fpu.h functions to avoid usage of g_dev.
|
||||
* [293](https://github.com/mupen64plus/mupen64plus-core/pull/293): Revert "Pass pointer to fcr31 around in fpu.h functions to avoid usage of g_dev."
|
||||
* [290](https://github.com/mupen64plus/mupen64plus-core/pull/290): Fix audio in RE2
|
||||
* [289](https://github.com/mupen64plus/mupen64plus-core/pull/289): Fix Twisted Edge audio.
|
||||
Fixes #285
|
||||
* [282](https://github.com/mupen64plus/mupen64plus-core/pull/282): No g dev in interrupt
|
||||
(Remove usage of g_dev in interrupt.)
|
||||
* [281](https://github.com/mupen64plus/mupen64plus-core/pull/281): Pass pointer to fcr31 around in fpu.h functions to avoid usage of g_dev.
|
||||
* [280](https://github.com/mupen64plus/mupen64plus-core/pull/280): Remove MK64 cheat for E and J
|
||||
* [278](https://github.com/mupen64plus/mupen64plus-core/pull/278): Avoid usage of g_dev in rdram_deteciton_hack.
|
||||
* [275](https://github.com/mupen64plus/mupen64plus-core/pull/275): README.md URL fix
|
||||
* [272](https://github.com/mupen64plus/mupen64plus-core/pull/272): Fix audio in Star Wars Episode I - Racer
|
||||
* [271](https://github.com/mupen64plus/mupen64plus-core/pull/271): DK64 Bone Displacement fix
|
||||
* [270](https://github.com/mupen64plus/mupen64plus-core/pull/270): Remove custom CountPerScanline values
|
||||
* [269](https://github.com/mupen64plus/mupen64plus-core/pull/269): Remove byte and hword accessors
|
||||
* [263](https://github.com/mupen64plus/mupen64plus-core/pull/263): Fix Indiana Jones
|
||||
* [258](https://github.com/mupen64plus/mupen64plus-core/pull/258): Reduce usage of g_dev
|
||||
* [257](https://github.com/mupen64plus/mupen64plus-core/pull/257): Get World Driver Championship booting
|
||||
* [256](https://github.com/mupen64plus/mupen64plus-core/pull/256): Mips instructions refactorings
|
||||
(This is just some internal reoganization of mips instructions functions.)
|
||||
* [255](https://github.com/mupen64plus/mupen64plus-core/pull/255): new_dynarec: Fix crash during shutdown
|
||||
* [253](https://github.com/mupen64plus/mupen64plus-core/pull/253): Restore old behavior when allocating memory for RDRAM
|
||||
* [250](https://github.com/mupen64plus/mupen64plus-core/pull/250): Don't reset the speed limiter when falling behind
|
||||
* [246](https://github.com/mupen64plus/mupen64plus-core/pull/246): CountPerOp=3 for CBFD
|
||||
* [243](https://github.com/mupen64plus/mupen64plus-core/pull/243): Fix compilation in msvc as per Gillou's comment.
|
||||
* [242](https://github.com/mupen64plus/mupen64plus-core/pull/242): Fix excessive warnings when compiling using clang.
|
||||
* [241](https://github.com/mupen64plus/mupen64plus-core/pull/241): Minor refac
|
||||
(Some minor refactorings to remove some magic constants and rework the si peripherals status command handling.)
|
||||
* [240](https://github.com/mupen64plus/mupen64plus-core/pull/240): Avoid g_dev in r4300 code
|
||||
(Small PR which avoids usage of the g_dev global variable inside TLB code.)
|
||||
* [239](https://github.com/mupen64plus/mupen64plus-core/pull/239): Don't use SDL directly
|
||||
* [238](https://github.com/mupen64plus/mupen64plus-core/pull/238): Dyna start
|
||||
* [237](https://github.com/mupen64plus/mupen64plus-core/pull/237): Add ConfigExternalGetParameter
|
||||
* [235](https://github.com/mupen64plus/mupen64plus-core/pull/235): new_dynarec: Code cleanup
|
||||
* [233](https://github.com/mupen64plus/mupen64plus-core/pull/233): fix include paths / fixes building on arm/neon
|
||||
* [232](https://github.com/mupen64plus/mupen64plus-core/pull/232): Disable OSD if OpenGL core context is in use
|
||||
* [227](https://github.com/mupen64plus/mupen64plus-core/pull/227): Device refactorings
|
||||
* [220](https://github.com/mupen64plus/mupen64plus-core/pull/220): Fix Kirby 64 save size
|
||||
* [216](https://github.com/mupen64plus/mupen64plus-core/pull/216): Fix new dynarec interrupt management
|
||||
(This also fixes soft reset.)
|
||||
* [215](https://github.com/mupen64plus/mupen64plus-core/pull/215): Fix assertion failure when starting Kuiki Uhabi Suigo
|
||||
* [213](https://github.com/mupen64plus/mupen64plus-core/pull/213): No globals
|
||||
* [212](https://github.com/mupen64plus/mupen64plus-core/pull/212): Allow CountPerScan and ViTiming in ROM database to be overridden
|
||||
* [211](https://github.com/mupen64plus/mupen64plus-core/pull/211): Avoid processing CIC response pif ram as commands
|
||||
* [208](https://github.com/mupen64plus/mupen64plus-core/pull/208): Various refactorings
|
||||
* [205](https://github.com/mupen64plus/mupen64plus-core/pull/205): Clean magic constants
|
||||
* [204](https://github.com/mupen64plus/mupen64plus-core/pull/204): Use custom ViRefresh for some games
|
||||
* [203](https://github.com/mupen64plus/mupen64plus-core/pull/203): Fix mario kart multiplayer timings
|
||||
* [202](https://github.com/mupen64plus/mupen64plus-core/pull/202): Make SDL usage optional in some files
|
||||
* [199](https://github.com/mupen64plus/mupen64plus-core/pull/199): Add using_tlb flag to savestates
|
||||
* [198](https://github.com/mupen64plus/mupen64plus-core/pull/198): Allow setting a loadstate job before emulator is running.
|
||||
* [196](https://github.com/mupen64plus/mupen64plus-core/pull/196): Fix Pokemon Puzzle League
|
||||
* [192](https://github.com/mupen64plus/mupen64plus-core/pull/192): new_dynarec: Allocate memory for original MIPS source code of a recompiled block before do_dirty_stub_ds is being called.
|
||||
* [182](https://github.com/mupen64plus/mupen64plus-core/pull/182): New dynarec fix
|
||||
* [180](https://github.com/mupen64plus/mupen64plus-core/pull/180): Use Ubuntu Trusty as base system for Travis CI
|
||||
* [168](https://github.com/mupen64plus/mupen64plus-core/pull/168): Documentation Update and Formatting
|
||||
* [155](https://github.com/mupen64plus/mupen64plus-core/pull/155): Fix speed limiter issue
|
||||
* [150](https://github.com/mupen64plus/mupen64plus-core/pull/150): Improve speed limiter accuracy
|
||||
* [144](https://github.com/mupen64plus/mupen64plus-core/pull/144): Framelimiter: Discard frames with excessive execution time
|
||||
* [143](https://github.com/mupen64plus/mupen64plus-core/pull/143): Fixed gfx moveScreen when SDL_VERSION > 1.2
|
||||
* [140](https://github.com/mupen64plus/mupen64plus-core/pull/140): Call gfx moveScreen when SDL window moved (Windows only)
|
||||
* [138](https://github.com/mupen64plus/mupen64plus-core/pull/138): new_dynarec: Reverted printing method when warning about a block compiled at bogus memory address
|
||||
* [137](https://github.com/mupen64plus/mupen64plus-core/pull/137): Dynamic linker
|
||||
* [135](https://github.com/mupen64plus/mupen64plus-core/pull/135): new_dynarec: Fixed bomberman 64
|
||||
* [133](https://github.com/mupen64plus/mupen64plus-core/pull/133): new_dynarec: Fixed verifier pointer when using trampoline jump
|
||||
* [132](https://github.com/mupen64plus/mupen64plus-core/pull/132): new_dynarec: Avoid replacing an allocated temporary register.
|
||||
Fixed crash in castlevania
|
||||
* [131](https://github.com/mupen64plus/mupen64plus-core/pull/131): Allow building the old dynarec on x64 with VisualStudio2013
|
||||
* [128](https://github.com/mupen64plus/mupen64plus-core/pull/128): Rename new_dynarec.txt to new_dynarec.mediawiki
|
||||
* [125](https://github.com/mupen64plus/mupen64plus-core/pull/125): Remove Zelda OoT Subscreen Delay Fix from mupen64plus.ini
|
||||
* [124](https://github.com/mupen64plus/mupen64plus-core/pull/124): new_dynarec: Implemented recompiled DMULT instruction on x86
|
||||
(This also fix DK going through wall issue on x86)
|
||||
* [123](https://github.com/mupen64plus/mupen64plus-core/pull/123): Merge back "Avoid .text relocations in PIC shared library" fix + cleanup linkage_arm.S
|
||||
* [122](https://github.com/mupen64plus/mupen64plus-core/pull/122): Remove unnecessary OpenBSD warning.
|
||||
* [120](https://github.com/mupen64plus/mupen64plus-core/pull/120): Avoid .text relocations in PIC shared library
|
||||
* [117](https://github.com/mupen64plus/mupen64plus-core/pull/117): Squelch sscanf warning in arm_cpu_features.
|
||||
* [98](https://github.com/mupen64plus/mupen64plus-core/pull/98): [WIP/RFC] Transfer Pak emulation support
|
||||
|
||||
|
||||
## Closed Issues
|
||||
|
||||
* [245](https://github.com/mupen64plus/mupen64plus-core/issues/245): Mario Kart 64 item not usable bug
|
||||
* [350](https://github.com/mupen64plus/mupen64plus-core/issues/350): RSP DMA double buffering not implemented
|
||||
* [438](https://github.com/mupen64plus/mupen64plus-core/issues/438): Mario 64 Star Revenge New dynarec game freezes
|
||||
* [616](https://github.com/mupen64plus/mupen64plus-core/issues/616): Please add 4K access to resolution in Android.
|
||||
* [552](https://github.com/mupen64plus/mupen64plus-core/issues/552): Tonic trouble (u) new dynarec crash
|
||||
* [338](https://github.com/mupen64plus/mupen64plus-core/issues/338): Turok 3 freezes after intro
|
||||
* [304](https://github.com/mupen64plus/mupen64plus-core/issues/304): Pokemon Puzzle League New Dynarec assert
|
||||
* [613](https://github.com/mupen64plus/mupen64plus-core/issues/613): Selecting a save state slot sends M64CORE_SAVESTATE_SLOT command twice
|
||||
* [558](https://github.com/mupen64plus/mupen64plus-core/issues/558): Donkey Kong 64 back to level beginning on vines
|
||||
* [587](https://github.com/mupen64plus/mupen64plus-core/issues/587): New dynarec CBFD is freezing
|
||||
* [504](https://github.com/mupen64plus/mupen64plus-core/issues/504): No 64 bit ARM library support with new dynarec
|
||||
* [603](https://github.com/mupen64plus/mupen64plus-core/issues/603): New dynarec not working on x64
|
||||
* [540](https://github.com/mupen64plus/mupen64plus-core/issues/540): Translucent textures in Zelda OOT
|
||||
* [584](https://github.com/mupen64plus/mupen64plus-core/issues/584): Regression caused by #444
|
||||
* [601](https://github.com/mupen64plus/mupen64plus-core/issues/601): Combined joystick actions not working on Windows 10
|
||||
* [592](https://github.com/mupen64plus/mupen64plus-core/issues/592): Support for non-SDL mouse injection
|
||||
* [595](https://github.com/mupen64plus/mupen64plus-core/issues/595): Debugger is broken
|
||||
* [591](https://github.com/mupen64plus/mupen64plus-core/issues/591): Troubles extracting rom MD5 from save state
|
||||
* [580](https://github.com/mupen64plus/mupen64plus-core/issues/580): SM64 Last Impact: Game Crashes When jumping inside basket or entering warpipe in hub world
|
||||
* [539](https://github.com/mupen64plus/mupen64plus-core/issues/539): Is not longer possible to play using the keyboard
|
||||
* [568](https://github.com/mupen64plus/mupen64plus-core/issues/568): Is "frame advance" working?
|
||||
* [567](https://github.com/mupen64plus/mupen64plus-core/issues/567): Unable to enter and edit config
|
||||
* [555](https://github.com/mupen64plus/mupen64plus-core/issues/555): Audio is not working in Windows
|
||||
* [560](https://github.com/mupen64plus/mupen64plus-core/issues/560): D-pad on iOS
|
||||
* [536](https://github.com/mupen64plus/mupen64plus-core/issues/536): Bus error when loading savestate on odroid c2 (armhf)
|
||||
* [261](https://github.com/mupen64plus/mupen64plus-core/issues/261): ARM New dynarec crash
|
||||
* [522](https://github.com/mupen64plus/mupen64plus-core/issues/522): Building with LTO enabled makes loading save states crash
|
||||
* [543](https://github.com/mupen64plus/mupen64plus-core/issues/543): Speed limiter is slowing down way too much
|
||||
* [542](https://github.com/mupen64plus/mupen64plus-core/issues/542): Indiana Jones have bugs in dynarec
|
||||
* [531](https://github.com/mupen64plus/mupen64plus-core/issues/531): Unplugging controllers using CONTROL_INFO doesn't work
|
||||
* [528](https://github.com/mupen64plus/mupen64plus-core/issues/528): Log spam when loading save states: Unexpected command format 01 c4 01
|
||||
* [222](https://github.com/mupen64plus/mupen64plus-core/issues/222): World Driver Championship | Video Error: Error: Unsupported uCode! crc: 844b55b5
|
||||
* [530](https://github.com/mupen64plus/mupen64plus-core/issues/530): Major League Baseball with Ken Griffey Jr. (Messed Up Splash Screens and Start Screen)
|
||||
* [181](https://github.com/mupen64plus/mupen64plus-core/issues/181): Top Gear Really 2 freezes
|
||||
* [294](https://github.com/mupen64plus/mupen64plus-core/issues/294): Save states are locking up the emulator
|
||||
* [321](https://github.com/mupen64plus/mupen64plus-core/issues/321): Crash report
|
||||
* [527](https://github.com/mupen64plus/mupen64plus-core/issues/527): GLP license text has outdated address
|
||||
* [484](https://github.com/mupen64plus/mupen64plus-core/issues/484): mupen64plus save/screenshot/config folder change on macOS
|
||||
* [512](https://github.com/mupen64plus/mupen64plus-core/issues/512): Tetris 64 (J) freezes on boot.
|
||||
* [489](https://github.com/mupen64plus/mupen64plus-core/issues/489): Reported crashes
|
||||
* [497](https://github.com/mupen64plus/mupen64plus-core/issues/497): Crash when loading save state
|
||||
* [344](https://github.com/mupen64plus/mupen64plus-core/issues/344): Possibility of idle loop detection on cached interpreter.
|
||||
* [447](https://github.com/mupen64plus/mupen64plus-core/issues/447): Removing the GoldenEye TLB hack (Pure Interpreter)
|
||||
* [486](https://github.com/mupen64plus/mupen64plus-core/issues/486): International super star soccer 2000 keeps stalling
|
||||
* [482](https://github.com/mupen64plus/mupen64plus-core/issues/482): Compiler log seldomness
|
||||
* [479](https://github.com/mupen64plus/mupen64plus-core/issues/479): MacOS makefile changes
|
||||
* [463](https://github.com/mupen64plus/mupen64plus-core/issues/463): Audio cracks in Banjo Kazooie
|
||||
* [458](https://github.com/mupen64plus/mupen64plus-core/issues/458): FlashRam saving fails in Derby Stallion 64
|
||||
* [467](https://github.com/mupen64plus/mupen64plus-core/issues/467): Some devices are failing CoreStartup with M64ERR_NO_MEMORY
|
||||
* [445](https://github.com/mupen64plus/mupen64plus-core/issues/445): Can't change pak type after game has started using CONTROL.plugin API
|
||||
* [469](https://github.com/mupen64plus/mupen64plus-core/issues/469): Hey You Pikachu corrupt graphics
|
||||
* [462](https://github.com/mupen64plus/mupen64plus-core/issues/462): Ide Yousuke no Mahjong Juku - black screen
|
||||
* [456](https://github.com/mupen64plus/mupen64plus-core/issues/456): Waialae Country Club won't save
|
||||
* [452](https://github.com/mupen64plus/mupen64plus-core/issues/452): Turok: Dinosaur Hunter not responding to inputs.
|
||||
* [385](https://github.com/mupen64plus/mupen64plus-core/issues/385): Bomberman 64: black screen using arm/x86 new dynarec
|
||||
* [283](https://github.com/mupen64plus/mupen64plus-core/issues/283): BattleTanx - Global Assault (U) - Game restarts
|
||||
* [442](https://github.com/mupen64plus/mupen64plus-core/issues/442): No longer supporting Raspberry Pi?
|
||||
* [434](https://github.com/mupen64plus/mupen64plus-core/issues/434): Should mupen64plus switch to big-endian format for raw saves?
|
||||
* [432](https://github.com/mupen64plus/mupen64plus-core/issues/432): Bomberman 64 is freezing as of latest
|
||||
* [426](https://github.com/mupen64plus/mupen64plus-core/issues/426): x86 new dynarec games are freezing
|
||||
* [429](https://github.com/mupen64plus/mupen64plus-core/issues/429): UI-Console Error: LoadLibrary('mupen64plus.dll') error: The specified module could not be found.
|
||||
* [418](https://github.com/mupen64plus/mupen64plus-core/issues/418): Castlevania gets stuck in the intro demo
|
||||
* [145](https://github.com/mupen64plus/mupen64plus-core/issues/145): Donkey Kong 64 - Bone Displacement
|
||||
* [288](https://github.com/mupen64plus/mupen64plus-core/issues/288): Indiana Jones x86 new dynarec crash
|
||||
* [274](https://github.com/mupen64plus/mupen64plus-core/issues/274): New Dynarec: WDC not working
|
||||
* [416](https://github.com/mupen64plus/mupen64plus-core/issues/416): Interpreter fails CP1ROUND test
|
||||
* [384](https://github.com/mupen64plus/mupen64plus-core/issues/384): Better COUNT emulation idea/enhancement
|
||||
* [405](https://github.com/mupen64plus/mupen64plus-core/issues/405): PIF rewrite broke loading save states at startup
|
||||
* [409](https://github.com/mupen64plus/mupen64plus-core/issues/409): Mischief Makers - Framerate halved
|
||||
* [402](https://github.com/mupen64plus/mupen64plus-core/issues/402): Custom Robo V2 freeze
|
||||
* [374](https://github.com/mupen64plus/mupen64plus-core/issues/374): Save paths not correct.
|
||||
* [398](https://github.com/mupen64plus/mupen64plus-core/issues/398): Vigilante 8: Second Offense Screenshots/Save States don't work.
|
||||
* [349](https://github.com/mupen64plus/mupen64plus-core/issues/349): Crash GLXBadFBConfig
|
||||
* [315](https://github.com/mupen64plus/mupen64plus-core/issues/315): SM64 won't launch (several issues I believe)
|
||||
* [392](https://github.com/mupen64plus/mupen64plus-core/issues/392): Yakouchuu II - Satsujin Kouro does not go to menu
|
||||
* [154](https://github.com/mupen64plus/mupen64plus-core/issues/154): Paper Mario (U) flash written incorrectly
|
||||
* [389](https://github.com/mupen64plus/mupen64plus-core/issues/389): OSD=0 causes game to hang after one has been played
|
||||
* [391](https://github.com/mupen64plus/mupen64plus-core/issues/391): Hydro thunder broke with recent commits
|
||||
* [127](https://github.com/mupen64plus/mupen64plus-core/issues/127): Several Rare games locking up while using LLE video plugins
|
||||
* [379](https://github.com/mupen64plus/mupen64plus-core/issues/379): Perfect Dark (Europe) is hanging/freezing at the Perfect Dark logo
|
||||
* [130](https://github.com/mupen64plus/mupen64plus-core/issues/130): Remove processDList() from code and API
|
||||
* [335](https://github.com/mupen64plus/mupen64plus-core/issues/335): Compressed ROM support
|
||||
* [303](https://github.com/mupen64plus/mupen64plus-core/issues/303): No RPS available in Mupen64 0.51
|
||||
* [377](https://github.com/mupen64plus/mupen64plus-core/issues/377): Travis CI broken
|
||||
* [314](https://github.com/mupen64plus/mupen64plus-core/issues/314): New Dynarec: NFL Quarterback Club 2001 corrupt graphics
|
||||
* [186](https://github.com/mupen64plus/mupen64plus-core/issues/186): Perfect Dark freezes occasionally when attempting to start next level
|
||||
* [346](https://github.com/mupen64plus/mupen64plus-core/issues/346): Anisotropic Filtering Missing
|
||||
* [200](https://github.com/mupen64plus/mupen64plus-core/issues/200): Top Gear Rally bad audio
|
||||
* [316](https://github.com/mupen64plus/mupen64plus-core/issues/316): South park restarts (x86 fix not PIC complaint)
|
||||
* [366](https://github.com/mupen64plus/mupen64plus-core/issues/366): Doom 64 Mempak saving issue
|
||||
* [354](https://github.com/mupen64plus/mupen64plus-core/issues/354): [Website] HTTPS does not work
|
||||
* [345](https://github.com/mupen64plus/mupen64plus-core/issues/345): XbrZ is Broken
|
||||
* [221](https://github.com/mupen64plus/mupen64plus-core/issues/221): All Star Baseball 2001 not starting (TLB Exception)
|
||||
* [311](https://github.com/mupen64plus/mupen64plus-core/issues/311): International Track & Field 2000 won't start (TLB Exception)
|
||||
* [340](https://github.com/mupen64plus/mupen64plus-core/issues/340): Unable to map C buttons
|
||||
* [331](https://github.com/mupen64plus/mupen64plus-core/issues/331): Indiana Jones freeze at end of level
|
||||
* [319](https://github.com/mupen64plus/mupen64plus-core/issues/319): Issue with compile-time generation of asm defines
|
||||
* [328](https://github.com/mupen64plus/mupen64plus-core/issues/328): x86 new dynarec crashing
|
||||
* [325](https://github.com/mupen64plus/mupen64plus-core/issues/325): DisableExtraMem no longer working?
|
||||
* [323](https://github.com/mupen64plus/mupen64plus-core/issues/323): NHL Breakaway 98 won't start
|
||||
* [309](https://github.com/mupen64plus/mupen64plus-core/issues/309): Space Invaders won't start
|
||||
* [87](https://github.com/mupen64plus/mupen64plus-core/issues/87): Signed integer overflow in core interpreter
|
||||
* [217](https://github.com/mupen64plus/mupen64plus-core/issues/217): Add custom ini support
|
||||
* [284](https://github.com/mupen64plus/mupen64plus-core/issues/284): CBFD freezes when entering other stages using a saved state
|
||||
* [299](https://github.com/mupen64plus/mupen64plus-core/issues/299): RE2 video distorted on ARM dynarec and x64 Windows dynarec
|
||||
* [287](https://github.com/mupen64plus/mupen64plus-core/issues/287): Banjo tooie crash after latest refactors
|
||||
* [219](https://github.com/mupen64plus/mupen64plus-core/issues/219): RSP HLE Crash
|
||||
* [268](https://github.com/mupen64plus/mupen64plus-core/issues/268): new dynarec ARM crash
|
||||
* [291](https://github.com/mupen64plus/mupen64plus-core/issues/291): macho64 output format not recognized on El Capitan
|
||||
* [285](https://github.com/mupen64plus/mupen64plus-core/issues/285): Twisted Edge Extreme Snowboarding no audio
|
||||
* [266](https://github.com/mupen64plus/mupen64plus-core/issues/266): Constant audio buffer underflows and GFX flickering in Pokemon Puzzle League FMV's
|
||||
* [267](https://github.com/mupen64plus/mupen64plus-core/issues/267): Question: RSP specific instructions and their interpretation
|
||||
* [226](https://github.com/mupen64plus/mupen64plus-core/issues/226): Input Lag with GFX plugins that have framebuffer emulation (Mario 64)
|
||||
* [262](https://github.com/mupen64plus/mupen64plus-core/issues/262): Pilot Wings 64 Shadows Graphics Glitch
|
||||
* [254](https://github.com/mupen64plus/mupen64plus-core/issues/254): Mupen 0.5 Save States (Discussion)
|
||||
* [251](https://github.com/mupen64plus/mupen64plus-core/issues/251): Compilation fix for SDL2 from homebrew on Mac for plugins
|
||||
* [247](https://github.com/mupen64plus/mupen64plus-core/issues/247): How to run in Fedora?
|
||||
* [158](https://github.com/mupen64plus/mupen64plus-core/issues/158): Crash during Mario Party (Coin Block Bash)
|
||||
* [248](https://github.com/mupen64plus/mupen64plus-core/issues/248): Missing textures and incorrect placement in Star Wars: Shadows of the Empire
|
||||
* [244](https://github.com/mupen64plus/mupen64plus-core/issues/244): Saving sate cause retroarch to crash
|
||||
* [193](https://github.com/mupen64plus/mupen64plus-core/issues/193): OSD should support OpenGL core profile
|
||||
* [195](https://github.com/mupen64plus/mupen64plus-core/issues/195): arm new dynarec doesn't build with clang
|
||||
* [234](https://github.com/mupen64plus/mupen64plus-core/issues/234): Segfault when closing games
|
||||
* [225](https://github.com/mupen64plus/mupen64plus-core/issues/225): Ability to set custom RDRAM size
|
||||
* [230](https://github.com/mupen64plus/mupen64plus-core/issues/230): fails to build since 5aebce38204de4fe3671f78e3cee66838f9a1d87
|
||||
* [139](https://github.com/mupen64plus/mupen64plus-core/issues/139): Configurable VI Refresh Rate
|
||||
* [187](https://github.com/mupen64plus/mupen64plus-core/issues/187): Gamepads are comfortable
|
||||
* [194](https://github.com/mupen64plus/mupen64plus-core/issues/194): Compiling to custom paths
|
||||
* [191](https://github.com/mupen64plus/mupen64plus-core/issues/191): Wonder Project J2: Cutoff / misaligned textures
|
||||
* [183](https://github.com/mupen64plus/mupen64plus-core/issues/183): Building on Windows
|
||||
* [179](https://github.com/mupen64plus/mupen64plus-core/issues/179): NBA live 2000 crash
|
||||
* [170](https://github.com/mupen64plus/mupen64plus-core/issues/170): Banjo-Tooie crash
|
||||
* [160](https://github.com/mupen64plus/mupen64plus-core/issues/160): Vidext SDL2 compatibility overrides context profile mask, making attribute useless
|
||||
* [119](https://github.com/mupen64plus/mupen64plus-core/issues/119): ARM build creates broken PIC with TEXTREL
|
||||
* [172](https://github.com/mupen64plus/mupen64plus-core/issues/172): Screenshots broken on raspberry pi
|
||||
* [166](https://github.com/mupen64plus/mupen64plus-core/issues/166): glide64mk2 requires libboost 1.46.1
|
||||
* [173](https://github.com/mupen64plus/mupen64plus-core/issues/173): Core build fails in VS2013
|
||||
* [169](https://github.com/mupen64plus/mupen64plus-core/issues/169): With mouse input disabled, mouse still gets captured and ctrl alt does nothing
|
||||
* [167](https://github.com/mupen64plus/mupen64plus-core/issues/167): N64 from open emu suddenly stopped working.
|
||||
* [163](https://github.com/mupen64plus/mupen64plus-core/issues/163): Does not work on Windows XP (but works if binaries are patched)
|
||||
* [161](https://github.com/mupen64plus/mupen64plus-core/issues/161): Disney's Tarzan freezes
|
||||
* [153](https://github.com/mupen64plus/mupen64plus-core/issues/153): Triggering [CoreEvents] using simultaneous button presses doesn't work
|
||||
* [152](https://github.com/mupen64plus/mupen64plus-core/issues/152): Matching code for input neglects spaces in controller names
|
||||
* [149](https://github.com/mupen64plus/mupen64plus-core/issues/149): Bomberman 64: transition and effets are not rightly emulated
|
||||
* [146](https://github.com/mupen64plus/mupen64plus-core/issues/146): RSP SETTINGS VANISHED
|
||||
* [141](https://github.com/mupen64plus/mupen64plus-core/issues/141): Fails to build on windows (mingw64)
|
||||
* [136](https://github.com/mupen64plus/mupen64plus-core/issues/136): si/eeprom.o (symbol from plugin): memset used with constant zero length parameter;
|
||||
* [102](https://github.com/mupen64plus/mupen64plus-core/issues/102): Google Code shutting down: More organization needed
|
||||
* [126](https://github.com/mupen64plus/mupen64plus-core/issues/126): Can map buttons with controller, game play doesnt work. Sixaxis
|
||||
* [107](https://github.com/mupen64plus/mupen64plus-core/issues/107): Next release discussion
|
||||
|
||||
|
||||
Mupen64Plus-core v2.5 - April 26, 2015
|
||||
--------------------------------------
|
||||
|
||||
+2
-2
@@ -236,9 +236,9 @@ ifeq ($(OS), OSX)
|
||||
CXXFLAGS += '-stdlib=libc++'
|
||||
ifeq ($(CPU), X86)
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=10.7 -isysroot $(OSX_SDK_PATH)
|
||||
CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=10.9 -isysroot $(OSX_SDK_PATH)
|
||||
else
|
||||
CFLAGS += -pipe -mmmx -msse -arch i686 -mmacosx-version-min=10.7 -isysroot $(OSX_SDK_PATH)
|
||||
CFLAGS += -pipe -mmmx -msse -arch i686 -mmacosx-version-min=10.9 -isysroot $(OSX_SDK_PATH)
|
||||
ifneq ($(PROFILE), 1)
|
||||
CFLAGS += -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
@@ -169,8 +169,6 @@ EXPORT m64p_error CALL CoreDoCommand(m64p_command Command, int ParamInt, void *P
|
||||
{
|
||||
m64p_error rval;
|
||||
int keysym, keymod;
|
||||
int x, y;
|
||||
int left, right;
|
||||
|
||||
if (!l_CoreInit)
|
||||
return M64ERR_NOT_INIT;
|
||||
@@ -317,20 +315,6 @@ EXPORT m64p_error CALL CoreDoCommand(m64p_command Command, int ParamInt, void *P
|
||||
keymod = (ParamInt >> 16) & 0xffff;
|
||||
event_sdl_keyup(keysym, keymod);
|
||||
return M64ERR_SUCCESS;
|
||||
case M64CMD_SET_MOUSE_MOVE:
|
||||
if (!g_EmulatorRunning)
|
||||
return M64ERR_INVALID_STATE;
|
||||
x = ParamInt & 0xffff;
|
||||
y = (ParamInt >> 16) & 0xffff;
|
||||
event_mouse_move(x, y);
|
||||
return M64ERR_SUCCESS;
|
||||
case M64CMD_SET_MOUSE_BUTTON:
|
||||
if (!g_EmulatorRunning)
|
||||
return M64ERR_INVALID_STATE;
|
||||
left = ParamInt & 0xffff;
|
||||
right = (ParamInt >> 16) & 0xffff;
|
||||
event_mouse_button(left, right);
|
||||
return M64ERR_SUCCESS;
|
||||
case M64CMD_SET_FRAME_CALLBACK:
|
||||
*(void**)&g_FrameCallback = ParamPtr;
|
||||
return M64ERR_SUCCESS;
|
||||
|
||||
@@ -199,8 +199,6 @@ typedef void (*ptr_ViWidthChanged)(void);
|
||||
typedef void (*ptr_ReadScreen2)(void *dest, int *width, int *height, int front);
|
||||
typedef void (*ptr_SetRenderingCallback)(void (*callback)(int));
|
||||
typedef void (*ptr_ResizeVideoOutput)(int width, int height);
|
||||
typedef void (*ptr_MouseMove)(int x, int y);
|
||||
typedef void (*ptr_MouseButton)(int left, int right);
|
||||
#if defined(M64P_PLUGIN_PROTOTYPES)
|
||||
EXPORT void CALL ChangeWindow(void);
|
||||
EXPORT int CALL InitiateGFX(GFX_INFO Gfx_Info);
|
||||
@@ -214,8 +212,6 @@ EXPORT void CALL ViWidthChanged(void);
|
||||
EXPORT void CALL ReadScreen2(void *dest, int *width, int *height, int front);
|
||||
EXPORT void CALL SetRenderingCallback(void (*callback)(int));
|
||||
EXPORT void CALL ResizeVideoOutput(int width, int height);
|
||||
EXPORT void CALL MouseMove(int x, int y);
|
||||
EXPORT void CALL MouseButton(int left, int right);
|
||||
#endif
|
||||
|
||||
/* frame buffer plugin spec extension */
|
||||
|
||||
+1
-3
@@ -171,9 +171,7 @@ typedef enum {
|
||||
M64CMD_PIF_OPEN,
|
||||
M64CMD_ROM_SET_SETTINGS,
|
||||
M64CMD_DISK_OPEN,
|
||||
M64CMD_DISK_CLOSE,
|
||||
M64CMD_SET_MOUSE_MOVE,
|
||||
M64CMD_SET_MOUSE_BUTTON,
|
||||
M64CMD_DISK_CLOSE
|
||||
} m64p_command;
|
||||
|
||||
typedef struct {
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ void set_fpr_pointers(struct cp1* cp1, uint32_t newStatus)
|
||||
{
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
(r4300_cp1_regs_simple(cp1))[i] = &cp1->regs[i & ~1].float32[i & 1 ^ DOUBLE_HALF_XOR];
|
||||
(r4300_cp1_regs_simple(cp1))[i] = &cp1->regs[i & ~1].float32[(i & 1) ^ DOUBLE_HALF_XOR];
|
||||
(r4300_cp1_regs_double(cp1))[i] = &cp1->regs[i & ~1].float64;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-2
@@ -2338,7 +2338,9 @@ static void tlb_speed_hacks()
|
||||
u_int verify_dirty(struct ll_entry * head)
|
||||
{
|
||||
void *source;
|
||||
if((int)head->start>=0xa4000000&&(int)head->start<0xa4001000) {
|
||||
if((int)head->start>=0xa0000000&&(int)head->start<0xa07fffff) {
|
||||
source=(void *)((uintptr_t)g_dev.rdram.dram+head->start-0xa0000000);
|
||||
}else if((int)head->start>=0xa4000000&&(int)head->start<0xa4001000) {
|
||||
source=(void *)((uintptr_t)g_dev.sp.mem+head->start-0xa4000000);
|
||||
}else if((int)head->start>=0x80000000&&(int)head->start<0x80800000) {
|
||||
source=(void *)((uintptr_t)g_dev.rdram.dram+head->start-(uintptr_t)0x80000000);
|
||||
@@ -8769,7 +8771,11 @@ int new_recompile_block(int addr)
|
||||
#endif
|
||||
start = (u_int)addr&~3;
|
||||
//assert(((u_int)addr&1)==0);
|
||||
if ((int)addr >= 0xa4000000 && (int)addr < 0xa4001000) {
|
||||
if ((int)addr >= 0xa0000000 && (int)addr < 0xa07fffff) {
|
||||
source = (u_int *)((uintptr_t)g_dev.rdram.dram+start-0xa0000000);
|
||||
pagelimit = 0xa07fffff;
|
||||
}
|
||||
else if ((int)addr >= 0xa4000000 && (int)addr < 0xa4001000) {
|
||||
source = (u_int *)((uintptr_t)g_dev.sp.mem+start-0xa4000000);
|
||||
pagelimit = 0xa4001000;
|
||||
}
|
||||
|
||||
+1
-19
@@ -676,9 +676,8 @@ void event_sdl_keydown(int keysym, int keymod)
|
||||
else
|
||||
#endif /* NO_KEYBINDINGS */
|
||||
{
|
||||
/* pass all other keypresses to the input and graphics plugin */
|
||||
/* pass all other keypresses to the input plugin */
|
||||
input.keyDown(keymod, keysym);
|
||||
gfx.keyDown(keymod, keysym);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -702,23 +701,6 @@ void event_sdl_keyup(int keysym, int keymod)
|
||||
#endif /* NO_KEYBINDINGS */
|
||||
{
|
||||
input.keyUp(keymod, keysym);
|
||||
gfx.keyUp(keymod, keysym);
|
||||
}
|
||||
}
|
||||
|
||||
void event_mouse_move(int x, int y)
|
||||
{
|
||||
if (gfx.mouseMove != NULL)
|
||||
{
|
||||
gfx.mouseMove(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
void event_mouse_button(int left, int right)
|
||||
{
|
||||
if (gfx.mouseButton != NULL)
|
||||
{
|
||||
gfx.mouseButton(left, right);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@ extern int event_set_core_defaults(void);
|
||||
extern void event_initialize(void);
|
||||
extern void event_sdl_keydown(int keysym, int keymod);
|
||||
extern void event_sdl_keyup(int keysym, int keymod);
|
||||
extern void event_mouse_move(int x, int y);
|
||||
extern void event_mouse_button(int left, int right);
|
||||
extern int event_gameshark_active(void);
|
||||
extern void event_set_gameshark(int active);
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
#define __VERSION_H__
|
||||
|
||||
#define MUPEN_CORE_NAME "Mupen64Plus Core"
|
||||
#define MUPEN_CORE_VERSION 0x020509
|
||||
#define MUPEN_CORE_VERSION 0x020600
|
||||
|
||||
#define FRONTEND_API_VERSION 0x020106
|
||||
#define CONFIG_API_VERSION 0x020302
|
||||
|
||||
@@ -62,10 +62,6 @@ static const gfx_plugin_functions dummy_gfx = {
|
||||
dummyvideo_ProcessRDPList,
|
||||
dummyvideo_RomClosed,
|
||||
dummyvideo_RomOpen,
|
||||
dummyinput_SDL_KeyDown,
|
||||
dummyinput_SDL_KeyUp,
|
||||
NULL,
|
||||
NULL,
|
||||
dummyvideo_ShowCFB,
|
||||
dummyvideo_UpdateScreen,
|
||||
dummyvideo_ViStatusChanged,
|
||||
@@ -195,20 +191,6 @@ static m64p_error plugin_connect_gfx(m64p_dynlib_handle plugin_handle)
|
||||
return M64ERR_INPUT_INVALID;
|
||||
}
|
||||
|
||||
if (!GET_FUNC(ptr_SDL_KeyDown, gfx.keyDown, "SDL_KeyDown") ||
|
||||
!GET_FUNC(ptr_SDL_KeyUp, gfx.keyUp, "SDL_KeyUp"))
|
||||
{
|
||||
gfx.keyDown = dummyinput_SDL_KeyDown;
|
||||
gfx.keyUp = dummyinput_SDL_KeyUp;
|
||||
DebugMessage(M64MSG_WARNING, "abc");
|
||||
}
|
||||
|
||||
if (!GET_FUNC(ptr_MouseMove, gfx.mouseMove, "MouseMove") ||
|
||||
!GET_FUNC(ptr_MouseButton, gfx.mouseButton, "MouseButton"))
|
||||
{
|
||||
DebugMessage(M64MSG_WARNING, "gfx plugin does not contain n64 mouse support.");
|
||||
}
|
||||
|
||||
/* set function pointers for optional functions */
|
||||
gfx.resizeVideoOutput = (ptr_ResizeVideoOutput)osal_dynlib_getproc(plugin_handle, "ResizeVideoOutput");
|
||||
|
||||
|
||||
@@ -51,10 +51,6 @@ typedef struct _gfx_plugin_functions
|
||||
ptr_ProcessRDPList processRDPList;
|
||||
ptr_RomClosed romClosed;
|
||||
ptr_RomOpen romOpen;
|
||||
ptr_SDL_KeyDown keyDown;
|
||||
ptr_SDL_KeyUp keyUp;
|
||||
ptr_MouseMove mouseMove;
|
||||
ptr_MouseButton mouseButton;
|
||||
ptr_ShowCFB showCFB;
|
||||
ptr_UpdateScreen updateScreen;
|
||||
ptr_ViStatusChanged viStatusChanged;
|
||||
|
||||
@@ -78,6 +78,7 @@ pub enum N64Button {
|
||||
CRight,
|
||||
CDown,
|
||||
CUp,
|
||||
None,
|
||||
}
|
||||
|
||||
impl N64Button {
|
||||
@@ -97,6 +98,7 @@ impl N64Button {
|
||||
N64Button::CRight => 0x0100,
|
||||
N64Button::CDown => 0x0400,
|
||||
N64Button::CUp => 0x0800,
|
||||
N64Button::None => 0x0000,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
[subrepo]
|
||||
remote = git@github.com:/gonetz/GLideN64.git
|
||||
branch = master
|
||||
commit = b36c4409ebe6d30e02c33a7bb3e2255fdc59b5c5
|
||||
parent = b785f93a4ed519af6d7dce1b87d1dd857c762e14
|
||||
commit = f4b0755e2722d59fe1c20d7e470f7b8929dcae85
|
||||
parent = 1b45907ab26a5e8532bfc3c41d70c4611fb61028
|
||||
method = merge
|
||||
cmdver = 0.4.6
|
||||
|
||||
@@ -181,6 +181,7 @@ frameBufferEmulation\copyDepthToRDRAM=0
|
||||
Good_Name=Mario Kart 64 (E)(J)(U)
|
||||
graphics2D\enableNativeResTexrects=1
|
||||
graphics2D\enableTexCoordBounds=1
|
||||
frameBufferEmulation\copyToRDRAM=2
|
||||
|
||||
[MARIO%20STORY]
|
||||
Good_Name=Mario Story (J)
|
||||
|
||||
@@ -391,6 +391,7 @@ copy /Y "$(OutDir)$(TargetName).*" "$(Mupen64PluginsDir_x64)")</Command>
|
||||
<ClCompile Include="..\..\src\uCodes\F3DBETA.cpp" />
|
||||
<ClCompile Include="..\..\src\uCodes\F3DDKR.cpp" />
|
||||
<ClCompile Include="..\..\src\uCodes\F3DEX.cpp" />
|
||||
<ClCompile Include="..\..\src\uCodes\F3DEX095.cpp" />
|
||||
<ClCompile Include="..\..\src\uCodes\F3DEX2.cpp" />
|
||||
<ClCompile Include="..\..\src\uCodes\F3DEX2ACCLAIM.cpp" />
|
||||
<ClCompile Include="..\..\src\uCodes\F3DEX2CBFD.cpp" />
|
||||
@@ -540,6 +541,7 @@ copy /Y "$(OutDir)$(TargetName).*" "$(Mupen64PluginsDir_x64)")</Command>
|
||||
<ClInclude Include="..\..\src\uCodes\F3DBETA.h" />
|
||||
<ClInclude Include="..\..\src\uCodes\F3DDKR.h" />
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX.h" />
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX095.h" />
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX2.h" />
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX2ACCLAIM.h" />
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX2CBFD.h" />
|
||||
|
||||
+9
-3
@@ -443,6 +443,9 @@
|
||||
<ClCompile Include="..\..\src\uCodes\F3DEX3.cpp">
|
||||
<Filter>Source Files\uCodes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\uCodes\F3DEX095.cpp">
|
||||
<Filter>Source Files\uCodes</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\3DMath.h">
|
||||
@@ -700,9 +703,15 @@
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX.h">
|
||||
<Filter>Header Files\uCodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX095.h">
|
||||
<Filter>Header Files\uCodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX2.h">
|
||||
<Filter>Header Files\uCodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX3.h">
|
||||
<Filter>Header Files\uCodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX2ACCLAIM.h">
|
||||
<Filter>Header Files\uCodes</Filter>
|
||||
</ClInclude>
|
||||
@@ -820,9 +829,6 @@
|
||||
<ClInclude Include="..\..\src\GLideNHQ\TxFilterExport.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\uCodes\F3DEX3.h">
|
||||
<Filter>Header Files\uCodes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\GLideN64.rc">
|
||||
|
||||
@@ -120,6 +120,7 @@ set(GLideN64_SOURCES
|
||||
uCodes/F3DBETA.cpp
|
||||
uCodes/F3DDKR.cpp
|
||||
uCodes/F3DEX.cpp
|
||||
uCodes/F3DEX095.cpp
|
||||
uCodes/F3DAM.cpp
|
||||
uCodes/F3DEX2.cpp
|
||||
uCodes/F3DEX3.cpp
|
||||
|
||||
+8
-2
@@ -12,6 +12,7 @@
|
||||
#include "RSP.h"
|
||||
#include "uCodes/F3D.h"
|
||||
#include "uCodes/F3DEX.h"
|
||||
#include "uCodes/F3DEX095.h"
|
||||
#include "uCodes/F3DEX2.h"
|
||||
#include "uCodes/F3DEX3.h"
|
||||
#include "uCodes/L3D.h"
|
||||
@@ -58,7 +59,7 @@ static const
|
||||
std::vector<SpecialMicrocodeInfo> specialMicrocodes =
|
||||
{
|
||||
{ S2DEX2, false, true, false, 0x02c399dd }, // Animal Forest
|
||||
{ F3DEX, false, false, true, 0x0ace4c3f }, // Mario Kart 64
|
||||
{ F3DEX095, false, false, true, 0x0ace4c3f }, // Mario Kart 64
|
||||
{ F3D, true, false, false, 0x16c3a775 }, // AeroFighters
|
||||
{ F3DEX2CBFD, true, true, false, 0x1b4ace88 }, // Conker's Bad Fur Day
|
||||
{ F3DPD, true, true, false, 0x1c4f7869 }, // Perfect Dark
|
||||
@@ -151,7 +152,7 @@ GBIInfo GBI;
|
||||
|
||||
void GBI_Unknown( u32 w0, u32 w1 )
|
||||
{
|
||||
DebugMsg(DEBUG_NORMAL, "UNKNOWN GBI COMMAND 0x%02X", _SHIFTR(w0, 24, 8));
|
||||
DebugMsg(DEBUG_NORMAL, "UNKNOWN GBI COMMAND 0x%02X\n", _SHIFTR(w0, 24, 8));
|
||||
LOG(LOG_ERROR, "UNKNOWN GBI COMMAND 0x%02X", _SHIFTR(w0, 24, 8));
|
||||
}
|
||||
|
||||
@@ -209,6 +210,11 @@ void GBIInfo::_makeCurrent(MicrocodeInfo * _pCurrent)
|
||||
F3D_Init();
|
||||
m_hwlSupported = true;
|
||||
break;
|
||||
case F3DEX095:
|
||||
F3DEX095_Init();
|
||||
m_hwlSupported = true;
|
||||
gSP.clipRatio = m_pCurrent->Rej ? 2U : 1U;
|
||||
break;
|
||||
case F3DEX:
|
||||
F3DEX_Init();
|
||||
m_hwlSupported = true;
|
||||
|
||||
+2
-1
@@ -36,7 +36,8 @@
|
||||
#define S2DEX_1_03 27
|
||||
#define S2DEX_1_05 28
|
||||
#define F3DEX3 29
|
||||
#define NONE 30
|
||||
#define F3DEX095 30
|
||||
#define NONE 31
|
||||
|
||||
// Fixed point conversion factors
|
||||
#define FIXED2FLOATRECIP1 0.5f
|
||||
|
||||
@@ -383,9 +383,9 @@ void ConfigDialog::_init(bool reInit, bool blockCustomSettings)
|
||||
ui->hiresTexFileStorageCheckBox->setChecked(config.textureFilter.txHiresTextureFileStorage != 0);
|
||||
ui->noTexFileStorageCheckBox->setChecked(config.textureFilter.txNoTextureFileStorage != 0);
|
||||
|
||||
ui->texPackPathLineEdit->setText(QString::fromWCharArray(config.textureFilter.txPath));
|
||||
ui->texCachePathLineEdit->setText(QString::fromWCharArray(config.textureFilter.txCachePath));
|
||||
ui->texDumpPathLineEdit->setText(QString::fromWCharArray(config.textureFilter.txDumpPath));
|
||||
ui->texPackPathLineEdit->setText(QDir::toNativeSeparators(QString::fromWCharArray(config.textureFilter.txPath)));
|
||||
ui->texCachePathLineEdit->setText(QDir::toNativeSeparators(QString::fromWCharArray(config.textureFilter.txCachePath)));
|
||||
ui->texDumpPathLineEdit->setText(QDir::toNativeSeparators(QString::fromWCharArray(config.textureFilter.txDumpPath)));
|
||||
|
||||
ui->textureFilterLimitSpinBox->setValue(config.textureFilter.txHiresVramLimit);
|
||||
|
||||
@@ -886,7 +886,7 @@ void ConfigDialog::on_texPackPathButton_clicked()
|
||||
ui->texPackPathLineEdit->text(),
|
||||
options);
|
||||
if (!directory.isEmpty())
|
||||
ui->texPackPathLineEdit->setText(directory);
|
||||
ui->texPackPathLineEdit->setText(QDir::toNativeSeparators(directory));
|
||||
}
|
||||
|
||||
void ConfigDialog::on_texCachePathButton_clicked()
|
||||
@@ -897,7 +897,7 @@ void ConfigDialog::on_texCachePathButton_clicked()
|
||||
ui->texCachePathLineEdit->text(),
|
||||
options);
|
||||
if (!directory.isEmpty())
|
||||
ui->texCachePathLineEdit->setText(directory);
|
||||
ui->texCachePathLineEdit->setText(QDir::toNativeSeparators(directory));
|
||||
}
|
||||
|
||||
void ConfigDialog::on_texDumpPathButton_clicked()
|
||||
@@ -908,7 +908,7 @@ void ConfigDialog::on_texDumpPathButton_clicked()
|
||||
ui->texDumpPathLineEdit->text(),
|
||||
options);
|
||||
if (!directory.isEmpty())
|
||||
ui->texDumpPathLineEdit->setText(directory);
|
||||
ui->texDumpPathLineEdit->setText(QDir::toNativeSeparators(directory));
|
||||
}
|
||||
|
||||
void ConfigDialog::on_noTexFileStorageCheckBox_toggled(bool checked)
|
||||
|
||||
+6
-6
@@ -1007,8 +1007,8 @@ public:
|
||||
"uniform mediump float uNoiseSeed; \n"
|
||||
"lowp float snoise() \n"
|
||||
"{ \n"
|
||||
" highp vec2 coord = floor(gl_FragCoord.xy/uScreenScale); \n"
|
||||
" highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
|
||||
" highp vec2 coord = floor(gl_FragCoord.xy/uScreenScale);\n"
|
||||
" highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
|
||||
// hash13 from https://www.shadertoy.com/view/4djSRW
|
||||
" p3 = fract(p3 * .1031); \n"
|
||||
" p3 += dot(p3, p3.zyx + 31.32); \n"
|
||||
@@ -1068,8 +1068,8 @@ public:
|
||||
m_part +=
|
||||
" lowp float mult = 1.0; \n";
|
||||
m_part +=
|
||||
" highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
|
||||
" highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
|
||||
" highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale));\n"
|
||||
" highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
|
||||
// hash33 from https://www.shadertoy.com/view/4djSRW
|
||||
" p3 = fract(p3 * vec3(.1031, .1030, .0973)); \n"
|
||||
" p3 += dot(p3, p3.yxz+33.33); \n"
|
||||
@@ -1087,8 +1087,8 @@ public:
|
||||
" lowp float mult = 1.0; \n";
|
||||
m_part +=
|
||||
" \n"
|
||||
" highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
|
||||
" highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
|
||||
" highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale));\n"
|
||||
" highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
|
||||
// hash13 from https://www.shadertoy.com/view/4djSRW
|
||||
" p3 = fract(p3 * .1031); \n"
|
||||
" p3 += dot(p3, p3.zyx + 31.32); \n"
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public:
|
||||
void update(bool _force) override
|
||||
{
|
||||
u32 counter = dwnd().getBuffersSwapCount();
|
||||
uNoiseSeed.set(counter & 0xff, _force);
|
||||
uNoiseSeed.set(static_cast<f32>(counter & 0xff), _force);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
+6
-7
@@ -252,11 +252,6 @@ void DisplayWindowMupen64plus::_readScreen2(void * _dest, int * _width, int * _h
|
||||
if (_dest == nullptr)
|
||||
return;
|
||||
|
||||
u8 *pBufferData = (u8*)malloc((*_width)*(*_height) * 4);
|
||||
if (pBufferData == nullptr)
|
||||
return;
|
||||
u8 *pDest = (u8*)_dest;
|
||||
|
||||
#if !defined(OS_ANDROID) && !defined(OS_IOS)
|
||||
GLint oldMode;
|
||||
glGetIntegerv(GL_READ_BUFFER, &oldMode);
|
||||
@@ -264,11 +259,14 @@ void DisplayWindowMupen64plus::_readScreen2(void * _dest, int * _width, int * _h
|
||||
glReadBuffer(GL_FRONT);
|
||||
else
|
||||
glReadBuffer(GL_BACK);
|
||||
glReadPixels(0, m_heightOffset, m_screenWidth, m_screenHeight, GL_RGBA, GL_UNSIGNED_BYTE, pBufferData);
|
||||
glReadPixels(0, m_heightOffset, m_screenWidth, m_screenHeight, GL_RGB, GL_UNSIGNED_BYTE, _dest);
|
||||
glReadBuffer(oldMode);
|
||||
#else
|
||||
u8 *pBufferData = (u8*)malloc((*_width)*(*_height) * 4);
|
||||
if (pBufferData == nullptr)
|
||||
return;
|
||||
u8 *pDest = (u8*)_dest;
|
||||
glReadPixels(0, m_heightOffset, m_screenWidth, m_screenHeight, GL_RGBA, GL_UNSIGNED_BYTE, pBufferData);
|
||||
#endif
|
||||
|
||||
//Convert RGBA to RGB
|
||||
for (s32 y = 0; y < *_height; ++y) {
|
||||
@@ -283,6 +281,7 @@ void DisplayWindowMupen64plus::_readScreen2(void * _dest, int * _width, int * _h
|
||||
}
|
||||
|
||||
free(pBufferData);
|
||||
#endif
|
||||
}
|
||||
|
||||
graphics::ObjectHandle DisplayWindowMupen64plus::_getDefaultFramebuffer()
|
||||
|
||||
Vendored
+2
-1
@@ -15,7 +15,8 @@ bool WindowsWGL::start()
|
||||
1, // version number
|
||||
PFD_DRAW_TO_WINDOW | // support window
|
||||
PFD_SUPPORT_OPENGL | // support OpenGL
|
||||
PFD_DOUBLEBUFFER, // double buffered
|
||||
PFD_DOUBLEBUFFER | // double buffered
|
||||
PFD_SUPPORT_COMPOSITION, // composition support, see https://www.opengl.org/pipeline/article/vol003_7/
|
||||
PFD_TYPE_RGBA, // RGBA type
|
||||
32, // color depth
|
||||
0, 0, 0, 0, 0, 0, // color bits ignored
|
||||
|
||||
+2
-2
@@ -198,7 +198,7 @@ bool DisplayWindowWindows::_borderlessDevice()
|
||||
m_screenHeight = static_cast<u32>(deviceMode.dmPelsHeight);
|
||||
m_heightOffset = 0;
|
||||
_setBufferSize();
|
||||
return (SetWindowPos(hWnd, NULL, 0, 0, m_screenWidth, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
|
||||
return (SetWindowPos(hWnd, NULL, 0, 0, m_screenWidth + 1, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ bool DisplayWindowWindows::_borderlessDevice()
|
||||
m_screenHeight = std::abs(monitors.rcMonitors[i].top - monitors.rcMonitors[i].bottom);
|
||||
m_heightOffset = 0;
|
||||
_setBufferSize();
|
||||
return (SetWindowPos(hWnd, NULL, X, Y, m_screenWidth, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
|
||||
return (SetWindowPos(hWnd, NULL, X, Y, m_screenWidth + 1, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -238,8 +238,8 @@ void GraphicsDrawer::_updateViewport(const FrameBuffer* _pBuffer, const f32 scal
|
||||
scaleX = scaleY = scale;
|
||||
}
|
||||
if (pCurrentBuffer != nullptr) {
|
||||
X = roundup(pCurrentBuffer->m_originX, scaleX);
|
||||
Y = roundup(pCurrentBuffer->m_originY, scaleY);
|
||||
X = roundup(static_cast<f32>(pCurrentBuffer->m_originX), scaleX);
|
||||
Y = roundup(static_cast<f32>(pCurrentBuffer->m_originY), scaleY);
|
||||
}
|
||||
WIDTH = roundup(SCREEN_SIZE_DIM, scaleX);
|
||||
HEIGHT = roundup(SCREEN_SIZE_DIM, scaleY);
|
||||
@@ -984,47 +984,59 @@ void GraphicsDrawer::drawDMATriangles(u32 _numVtx)
|
||||
dropRenderState();
|
||||
}
|
||||
|
||||
void GraphicsDrawer::_drawThickLine(u32 _v0, u32 _v1, float _width)
|
||||
static void correctLineVerticesColor(SPVertex _vertexBuf[2], SPVertex& _v0)
|
||||
{
|
||||
auto copyColors = [](f32 const* src, f32* dst1, f32* dst2)
|
||||
{
|
||||
for (u32 i = 0; i < 4; ++i)
|
||||
dst1[i] = dst2[i] = src[i];
|
||||
};
|
||||
|
||||
auto convertNormalsToColors = [](f32 const* normals, f32* dst)
|
||||
{
|
||||
// Line3D* microcodes have no lighting code
|
||||
// Original colors are stored in vertex normals, which need to be converted back to colors.
|
||||
for (u32 i = 0; i < 3; ++i) {
|
||||
f32 color = normals[i] * 0.5f;
|
||||
if (color < 0.0f)
|
||||
color += 1.0f;
|
||||
dst[i] = color;
|
||||
}
|
||||
};
|
||||
|
||||
SPVertex & vtx1 = _vertexBuf[0];
|
||||
SPVertex & vtx2 = _vertexBuf[1];
|
||||
if ((gSP.geometryMode & G_LIGHTING) == 0) {
|
||||
if ((gSP.geometryMode & G_SHADE) == 0) {
|
||||
SPVertex & vtx1 = triangles.vertices[_v0];
|
||||
vtx1.flat_r = gDP.primColor.r;
|
||||
vtx1.flat_g = gDP.primColor.g;
|
||||
vtx1.flat_b = gDP.primColor.b;
|
||||
vtx1.flat_a = gDP.primColor.a;
|
||||
SPVertex & vtx2 = triangles.vertices[_v1];
|
||||
vtx2.flat_r = gDP.primColor.r;
|
||||
vtx2.flat_g = gDP.primColor.g;
|
||||
vtx2.flat_b = gDP.primColor.b;
|
||||
vtx2.flat_a = gDP.primColor.a;
|
||||
}
|
||||
else if ((gSP.geometryMode & G_SHADING_SMOOTH) == 0) {
|
||||
copyColors(&gDP.primColor.r, &vtx1.r, &vtx1.flat_r);
|
||||
copyColors(&gDP.primColor.r, &vtx2.r, &vtx2.flat_r);
|
||||
} else if ((gSP.geometryMode & G_SHADING_SMOOTH) == 0) {
|
||||
// Flat shading
|
||||
SPVertex & vtx0 = triangles.vertices[_v0 + ((RSP.w1 >> 24) & 3)];
|
||||
SPVertex & vtx1 = triangles.vertices[_v0];
|
||||
vtx1.r = vtx1.flat_r = vtx0.r;
|
||||
vtx1.g = vtx1.flat_g = vtx0.g;
|
||||
vtx1.b = vtx1.flat_b = vtx0.b;
|
||||
vtx1.a = vtx1.flat_a = vtx0.a;
|
||||
SPVertex & vtx2 = triangles.vertices[_v1];
|
||||
vtx2.r = vtx2.flat_r = vtx0.r;
|
||||
vtx2.g = vtx2.flat_g = vtx0.g;
|
||||
vtx2.b = vtx2.flat_b = vtx0.b;
|
||||
vtx2.a = vtx2.flat_a = vtx0.a;
|
||||
copyColors(&_v0.r, &vtx1.r, &vtx1.flat_r);
|
||||
copyColors(&_v0.r, &vtx2.r, &vtx2.flat_r);
|
||||
}
|
||||
}
|
||||
else {
|
||||
convertNormalsToColors(&vtx1.nx, &vtx1.r);
|
||||
convertNormalsToColors(&vtx2.nx, &vtx2.r);
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsDrawer::_drawThickLine(u32 _v0, u32 _v1, float _width, u32 _flag)
|
||||
{
|
||||
SPVertex vertexBuf[2] = { triangles.vertices[_v0], triangles.vertices[_v1] };
|
||||
correctLineVerticesColor(vertexBuf, triangles.vertices[_flag]);
|
||||
|
||||
setDMAVerticesSize(4);
|
||||
SPVertex * pVtx = getDMAVerticesData();
|
||||
const f32 ySign = GBI.isNegativeY() ? -1.0f : 1.0f;
|
||||
pVtx[0] = triangles.vertices[_v0];
|
||||
pVtx[0] = vertexBuf[0];
|
||||
pVtx[0].x = pVtx[0].x / pVtx[0].w * gSP.viewport.vscale[0] + gSP.viewport.vtrans[0];
|
||||
pVtx[0].y = ySign * pVtx[0].y / pVtx[0].w * gSP.viewport.vscale[1] + gSP.viewport.vtrans[1];
|
||||
pVtx[0].z = pVtx[0].z / pVtx[0].w;
|
||||
pVtx[1] = pVtx[0];
|
||||
|
||||
pVtx[2] = triangles.vertices[_v1];
|
||||
pVtx[2] = vertexBuf[1];
|
||||
pVtx[2].x = pVtx[2].x / pVtx[2].w * gSP.viewport.vscale[0] + gSP.viewport.vtrans[0];
|
||||
pVtx[2].y = ySign * pVtx[2].y / pVtx[2].w * gSP.viewport.vscale[1] + gSP.viewport.vtrans[1];
|
||||
pVtx[2].z = pVtx[2].z / pVtx[2].w;
|
||||
@@ -1060,12 +1072,12 @@ void GraphicsDrawer::_drawThickLine(u32 _v0, u32 _v1, float _width)
|
||||
drawScreenSpaceTriangle(4);
|
||||
}
|
||||
|
||||
void GraphicsDrawer::drawLine(u32 _v0, u32 _v1, float _width)
|
||||
void GraphicsDrawer::drawLine(u32 _v0, u32 _v1, float _width, u32 _flag)
|
||||
{
|
||||
m_texrectDrawer.draw();
|
||||
m_statistics.lines++;
|
||||
|
||||
if (!_canDraw())
|
||||
if (!_canDraw() || _width <= 0.0f)
|
||||
return;
|
||||
|
||||
f32 lineWidth = _width;
|
||||
@@ -1073,8 +1085,9 @@ void GraphicsDrawer::drawLine(u32 _v0, u32 _v1, float _width)
|
||||
lineWidth *= dwnd().getScaleX();
|
||||
else
|
||||
lineWidth *= config.frameBufferEmulation.nativeResFactor;
|
||||
|
||||
if (lineWidth > m_maxLineWidth) {
|
||||
_drawThickLine(_v0, _v1, _width * 0.5f);
|
||||
_drawThickLine(_v0, _v1, _width * 0.5f, _flag);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1089,6 +1102,8 @@ void GraphicsDrawer::drawLine(u32 _v0, u32 _v1, float _width)
|
||||
_updateViewport();
|
||||
|
||||
SPVertex vertexBuf[2] = { triangles.vertices[_v0], triangles.vertices[_v1] };
|
||||
correctLineVerticesColor(vertexBuf, triangles.vertices[_flag]);
|
||||
|
||||
gfxContext.drawLine(lineWidth, vertexBuf);
|
||||
dropRenderState();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
void drawDMATriangles(u32 _numVtx);
|
||||
|
||||
void drawLine(u32 _v0, u32 _v1, float _width);
|
||||
void drawLine(u32 _v0, u32 _v1, float _width, u32 _flag);
|
||||
|
||||
void drawRect(int _ulx, int _uly, int _lrx, int _lry);
|
||||
|
||||
@@ -210,7 +210,7 @@ private:
|
||||
void _updateStates(DrawingState _drawingState) const;
|
||||
void _prepareDrawTriangle(DrawingState _drawingState);
|
||||
bool _canDraw() const;
|
||||
void _drawThickLine(u32 _v0, u32 _v1, float _width);
|
||||
void _drawThickLine(u32 _v0, u32 _v1, float _width, u32 _flag);
|
||||
|
||||
void _drawOSD(const char *_pText, float _x, float & _y);
|
||||
|
||||
|
||||
@@ -31,12 +31,24 @@ txfilter_checksum(uint8 *src, int width, int height, int size, int rowStride, ui
|
||||
return 0U;
|
||||
}
|
||||
|
||||
TAPI uint64 TAPIENTRY
|
||||
txfilter_checksum_strong(uint8 *src, int width, int height, int size, int rowStride, uint8 *palette)
|
||||
{
|
||||
return 0U;
|
||||
}
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter_dmptx(uint8 *src, int width, int height, int rowStridePixel, uint16 gfmt, N64FormatSize n64FmtSz, Checksum r_crc64)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter_dmptx_strong(uint8 *src, int width, int height, int rowStridePixel, uint16 gfmt, N64FormatSize n64FmtSz, Checksum r_crc64)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter_reloadhirestex()
|
||||
{
|
||||
|
||||
+1
-1
@@ -441,7 +441,7 @@ bool CheckForFrameBufferTexture(u32 _address, u32 _width, u32 _bytes)
|
||||
break;
|
||||
}
|
||||
|
||||
for (u32 nTile = gSP.texture.tile; nTile < 6; ++nTile) {
|
||||
for (u32 nTile = 0; nTile < 6; ++nTile) {
|
||||
if (gDP.tiles[nTile].tmem == gDP.loadTile->tmem) {
|
||||
gDPTile & curTile = gDP.tiles[nTile];
|
||||
curTile.textureMode = gDP.loadTile->textureMode;
|
||||
|
||||
+3
-10
@@ -1972,18 +1972,11 @@ void gSPSetOtherMode_L(u32 _length, u32 _shift, u32 _data)
|
||||
DebugMsg(DEBUG_NORMAL, " result: %08x\n", gDP.otherMode.l);
|
||||
}
|
||||
|
||||
void gSPLine3D(u32 v0, u32 v1, u32 flag )
|
||||
void gSPLine3D(u32 v0, u32 v1, s32 wd, u32 flag )
|
||||
{
|
||||
dwnd().getDrawer().drawLine(v0, v1, 1.5f);
|
||||
dwnd().getDrawer().drawLine(v0, v1, 1.5f + wd * 0.5f, flag);
|
||||
|
||||
DebugMsg(DEBUG_NORMAL, "gSPLine3D( %i, %i, %i )\n", v0, v1, flag);
|
||||
}
|
||||
|
||||
void gSPLineW3D(u32 v0, u32 v1, u32 wd, u32 flag )
|
||||
{
|
||||
dwnd().getDrawer().drawLine(v0, v1, 1.5f + wd * 0.5f);
|
||||
|
||||
DebugMsg(DEBUG_NORMAL, "gSPLineW3D( %i, %i, %i, %i )\n", v0, v1, wd, flag);
|
||||
DebugMsg(DEBUG_NORMAL, "gSPLine3D( %i, %i, %i, %i )\n", v0, v1, wd, flag);
|
||||
}
|
||||
|
||||
void gSPSetStatus(u32 sid, u32 val)
|
||||
|
||||
+1
-2
@@ -195,8 +195,7 @@ void gSPSetGeometryMode( u32 mode );
|
||||
void gSPClearGeometryMode( u32 mode );
|
||||
void gSPSetOtherMode_H(u32 _length, u32 _shift, u32 _data);
|
||||
void gSPSetOtherMode_L(u32 _length, u32 _shift, u32 _data);
|
||||
void gSPLine3D(u32 v0, u32 v1, u32 flag);
|
||||
void gSPLineW3D( u32 v0, u32 v1, u32 wd, u32 flag );
|
||||
void gSPLine3D( u32 v0, u32 v1, s32 wd, u32 flag );
|
||||
void gSPSetStatus(u32 sid, u32 val);
|
||||
void gSPSetDMAOffsets( u32 mtxoffset, u32 vtxoffset );
|
||||
void gSPSetDMATexOffset(u32 _addr);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "F3D.h"
|
||||
#include "F3DEX.h"
|
||||
#include "F3DEX095.h"
|
||||
#include "gSP.h"
|
||||
#include "GBI.h"
|
||||
|
||||
// See #2774 for details
|
||||
void F3DEX095_Init()
|
||||
{
|
||||
F3DEX_Init();
|
||||
GBI_SetGBI(G_CULLDL, F3D_CULLDL, F3D_CullDL);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef F3DEX095_H
|
||||
#define F3DEX095_H
|
||||
|
||||
void F3DEX095_Init();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -83,7 +83,7 @@ static void writeLight(int off, u32 w)
|
||||
gSPLookAt(w - (sizeof(F3DEX3_LookAtOld) - sizeof(F3DEX3_LookAt)) + sizeof(F3DEX3_LookAt), 1);
|
||||
}
|
||||
|
||||
for (int i = 1; i <= gSP.numLights; i++)
|
||||
for (u32 i = 1; i <= gSP.numLights; i++)
|
||||
{
|
||||
if (_LIGHT_TO_OFFSET(i) == off)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ void F3DEX3_MoveMem(u32 w0, u32 w1)
|
||||
{
|
||||
const u32 ofs = _SHIFTR(w0, 8, 8) * 8;
|
||||
const u32 len = (1 + _SHIFTR(w0, 19, 5)) * 8;
|
||||
for (int i = 0; i < len; i += 4)
|
||||
for (u32 i = 0; i < len; i += 4)
|
||||
{
|
||||
writeLight(ofs + i, w1 + i);
|
||||
}
|
||||
|
||||
@@ -11,12 +11,34 @@
|
||||
|
||||
void L3D_Line3D( u32 w0, u32 w1 )
|
||||
{
|
||||
u32 wd = _SHIFTR( w1, 0, 8 );
|
||||
s32 wd = static_cast<s8>(_SHIFTR( w1, 0, 8 ));
|
||||
u32 v0 = _SHIFTR(w1, 16, 8) / 10;
|
||||
u32 v1 = _SHIFTR(w1, 8, 8) / 10;
|
||||
u32 flag = _SHIFTR(w1, 24, 8);
|
||||
gSPLine3D( v0, v1, wd, flag == 0 ? v0 : v1 );
|
||||
}
|
||||
|
||||
if (wd == 0)
|
||||
gSPLine3D( _SHIFTR( w1, 16, 8 ) / 10, _SHIFTR( w1, 8, 8 ) / 10, _SHIFTR( w1, 24, 8 ) );
|
||||
else
|
||||
gSPLineW3D( _SHIFTR( w1, 16, 8 ) / 10, _SHIFTR( w1, 8, 8 ) / 10, wd, _SHIFTR( w1, 24, 8 ) );
|
||||
void L3D_Tri1(u32 w0, u32 w1)
|
||||
{
|
||||
u32 v0 = _SHIFTR(w1, 16, 8) / 10;
|
||||
u32 v1 = _SHIFTR(w1, 8, 8) / 10;
|
||||
u32 v2 = _SHIFTR(w0, 0, 8) / 10;
|
||||
u32 flag = _SHIFTR(w1, 24, 8);
|
||||
u32 flatShadeVtx = v0;
|
||||
switch (flag) {
|
||||
case 0x01:
|
||||
flatShadeVtx = v1;
|
||||
break;
|
||||
case 0x02:
|
||||
flatShadeVtx = v2;
|
||||
break;
|
||||
}
|
||||
if (v0 != v1)
|
||||
gSPLine3D(v0, v1, 0, flatShadeVtx);
|
||||
if (v1 != v2)
|
||||
gSPLine3D(v1, v2, 0, flatShadeVtx);
|
||||
if (v2 != v0)
|
||||
gSPLine3D(v2, v0, 0, flatShadeVtx);
|
||||
}
|
||||
|
||||
void L3D_Init()
|
||||
@@ -39,7 +61,7 @@ void L3D_Init()
|
||||
GBI_SetGBI( G_RESERVED3, F3D_RESERVED3, F3D_Reserved3 );
|
||||
GBI_SetGBI( G_SPRITE2D_BASE, F3D_SPRITE2D_BASE, F3D_Sprite2D_Base );
|
||||
|
||||
// GBI_SetGBI( G_TRI1, F3D_TRI1, F3D_Tri1 );
|
||||
GBI_SetGBI( G_TRI1, L3D_TRI1, L3D_Tri1 );
|
||||
GBI_SetGBI( G_CULLDL, F3D_CULLDL, F3D_CullDL );
|
||||
GBI_SetGBI( G_POPMTX, F3D_POPMTX, F3D_PopMtx );
|
||||
GBI_SetGBI( G_MOVEWORD, F3D_MOVEWORD, F3D_MoveWord );
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Types.h"
|
||||
|
||||
#define L3D_LINE3D 0xB5
|
||||
#define L3D_TRI1 0xBF
|
||||
|
||||
void L3D_Line3D( u32 w0, u32 w1 );
|
||||
void L3D_Init();
|
||||
|
||||
@@ -13,12 +13,49 @@
|
||||
|
||||
void L3DEX_Line3D( u32 w0, u32 w1 )
|
||||
{
|
||||
u32 wd = _SHIFTR( w1, 0, 8 );
|
||||
u32 v0 = _SHIFTR(w1, 17, 7);
|
||||
u32 v1 = _SHIFTR(w1, 9, 7);
|
||||
s32 wd = static_cast<s8>(_SHIFTR( w1, 0, 8 ));
|
||||
gSPLine3D( v0, v1, wd, v0 );
|
||||
}
|
||||
|
||||
if (wd == 0)
|
||||
gSPLine3D( _SHIFTR( w1, 17, 7 ), _SHIFTR( w1, 9, 7 ), 0 );
|
||||
else
|
||||
gSPLineW3D( _SHIFTR( w1, 17, 7 ), _SHIFTR( w1, 9, 7 ), wd, 0 );
|
||||
void L3DEX_Tri1(u32 w0, u32 w1)
|
||||
{
|
||||
u32 v0 = _SHIFTR(w1, 17, 7);
|
||||
u32 v1 = _SHIFTR(w1, 9, 7);
|
||||
u32 v2 = _SHIFTR(w1, 1, 7);
|
||||
|
||||
if (v0 != v1)
|
||||
gSPLine3D(v0, v1, 0, v0);
|
||||
if (v1 != v2)
|
||||
gSPLine3D(v1, v2, 0, v0);
|
||||
if (v2 != v0)
|
||||
gSPLine3D(v2, v0, 0, v0);
|
||||
}
|
||||
|
||||
void L3DEX_Tri2(u32 w0, u32 w1)
|
||||
{
|
||||
u32 v00 = _SHIFTR(w0, 17, 7);
|
||||
u32 v01 = _SHIFTR(w0, 9, 7);
|
||||
u32 v02 = _SHIFTR(w0, 1, 7);
|
||||
|
||||
u32 v10 = _SHIFTR(w1, 17, 7);
|
||||
u32 v11 = _SHIFTR(w1, 9, 7);
|
||||
u32 v12 = _SHIFTR(w1, 1, 7);
|
||||
|
||||
if (v00 != v01)
|
||||
gSPLine3D(v00, v01, 0, v00);
|
||||
if (v01 != v02)
|
||||
gSPLine3D(v01, v02, 0, v00);
|
||||
if (v02 != v00)
|
||||
gSPLine3D(v02, v00, 0, v00);
|
||||
|
||||
if (v10 != v11)
|
||||
gSPLine3D(v10, v11, 0, v10);
|
||||
if (v11 != v12)
|
||||
gSPLine3D(v11, v12, 0, v10);
|
||||
if (v12 != v10)
|
||||
gSPLine3D(v12, v10, 0, v10);
|
||||
}
|
||||
|
||||
void L3DEX_Init()
|
||||
@@ -41,7 +78,7 @@ void L3DEX_Init()
|
||||
GBI_SetGBI( G_RESERVED3, F3D_RESERVED3, F3D_Reserved3 );
|
||||
GBI_SetGBI( G_SPRITE2D_BASE, F3D_SPRITE2D_BASE, F3D_Sprite2D_Base );
|
||||
|
||||
// GBI_SetGBI( G_TRI1, F3D_TRI1, F3DEX_Tri1 );
|
||||
GBI_SetGBI( G_TRI1, L3DEX_TRI1, L3DEX_Tri1 );
|
||||
GBI_SetGBI( G_CULLDL, F3D_CULLDL, F3DEX_CullDL );
|
||||
GBI_SetGBI( G_POPMTX, F3D_POPMTX, F3D_PopMtx );
|
||||
GBI_SetGBI( G_MOVEWORD, F3D_MOVEWORD, F3D_MoveWord );
|
||||
@@ -51,11 +88,11 @@ void L3DEX_Init()
|
||||
GBI_SetGBI( G_ENDDL, F3D_ENDDL, F3D_EndDL );
|
||||
GBI_SetGBI( G_SETGEOMETRYMODE, F3D_SETGEOMETRYMODE, F3D_SetGeometryMode );
|
||||
GBI_SetGBI( G_CLEARGEOMETRYMODE, F3D_CLEARGEOMETRYMODE, F3D_ClearGeometryMode );
|
||||
GBI_SetGBI( G_LINE3D, L3D_LINE3D, L3DEX_Line3D );
|
||||
GBI_SetGBI( G_LINE3D, L3DEX_LINE3D, L3DEX_Line3D );
|
||||
GBI_SetGBI( G_RDPHALF_1, F3D_RDPHALF_1, F3D_RDPHalf_1 );
|
||||
GBI_SetGBI( G_RDPHALF_2, F3D_RDPHALF_2, F3D_RDPHalf_2 );
|
||||
GBI_SetGBI( G_MODIFYVTX, F3DEX_MODIFYVTX, F3DEX_ModifyVtx );
|
||||
// GBI_SetGBI( G_TRI2, F3DEX_TRI2, F3DEX_Tri2 );
|
||||
GBI_SetGBI( G_TRI2, L3DEX_TRI2, L3DEX_Tri2 );
|
||||
GBI_SetGBI( G_BRANCH_Z, F3DEX_BRANCH_Z, F3DEX_Branch_Z );
|
||||
GBI_SetGBI( G_LOAD_UCODE, F3DEX_LOAD_UCODE, F3DEX_Load_uCode );
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
#define L3DEX_H
|
||||
#include "Types.h"
|
||||
|
||||
#define L3DEX_TRI1 0xBF
|
||||
#define L3DEX_TRI2 0xB1
|
||||
#define L3DEX_LINE3D 0xB5
|
||||
|
||||
void L3DEX_Line3D( u32 w0, u32 w1 );
|
||||
void L3DEX_Init();
|
||||
#endif
|
||||
|
||||
@@ -13,12 +13,50 @@
|
||||
|
||||
void L3DEX2_Line3D( u32 w0, u32 w1 )
|
||||
{
|
||||
u32 wd = _SHIFTR( (w0 + 1), 0, 8 );
|
||||
s32 wd = static_cast<s8>(_SHIFTR( w0, 0, 8 ));
|
||||
u32 v0 = _SHIFTR(w0, 17, 7);
|
||||
u32 v1 = _SHIFTR(w0, 9, 7);
|
||||
gSPLine3D( v0, v1, wd, v0 );
|
||||
}
|
||||
|
||||
if (wd == 0)
|
||||
gSPLine3D( _SHIFTR( w0, 17, 7 ), _SHIFTR( w0, 9, 7 ), 0 );
|
||||
else
|
||||
gSPLineW3D( _SHIFTR( w0, 17, 7 ), _SHIFTR( w0, 9, 7 ), wd, 0 );
|
||||
void L3DEX2_Tri1(u32 w0, u32 w1)
|
||||
{
|
||||
s32 wd = static_cast<s8>(_SHIFTR(w1, 24, 8));
|
||||
u32 v0 = _SHIFTR(w0, 17, 7);
|
||||
u32 v1 = _SHIFTR(w0, 9, 7);
|
||||
u32 v2 = _SHIFTR(w0, 1, 7);
|
||||
|
||||
if (v0 != v1)
|
||||
gSPLine3D(v0, v1, wd, v0);
|
||||
if (v1 != v2)
|
||||
gSPLine3D(v1, v2, wd, v0);
|
||||
if (v2 != v0)
|
||||
gSPLine3D(v2, v0, wd, v0);
|
||||
}
|
||||
|
||||
void L3DEX2_Tri2(u32 w0, u32 w1)
|
||||
{
|
||||
s32 wd = static_cast<s8>(_SHIFTR(w1, 24, 8));
|
||||
u32 v0 = _SHIFTR(w0, 17, 7);
|
||||
u32 v1 = _SHIFTR(w0, 9, 7);
|
||||
u32 v2 = _SHIFTR(w0, 1, 7);
|
||||
u32 v3 = _SHIFTR(w1, 17, 7);
|
||||
u32 v4 = _SHIFTR(w1, 9, 7);
|
||||
u32 v5 = _SHIFTR(w1, 1, 7);
|
||||
|
||||
if (v0 != v1)
|
||||
gSPLine3D(v0, v1, wd, v0);
|
||||
if (v1 != v2)
|
||||
gSPLine3D(v1, v2, wd, v0);
|
||||
if (v2 != v0)
|
||||
gSPLine3D(v2, v0, wd, v0);
|
||||
|
||||
if (v3 != v4)
|
||||
gSPLine3D(v3, v4, wd, v3);
|
||||
if (v4 != v5)
|
||||
gSPLine3D(v4, v5, wd, v3);
|
||||
if (v5 != v3)
|
||||
gSPLine3D(v5, v3, wd, v3);
|
||||
}
|
||||
|
||||
void L3DEX2_Init()
|
||||
@@ -54,8 +92,8 @@ void L3DEX2_Init()
|
||||
GBI_SetGBI( G_MODIFYVTX, F3DEX2_MODIFYVTX, F3DEX_ModifyVtx );
|
||||
GBI_SetGBI( G_CULLDL, F3DEX2_CULLDL, F3DEX_CullDL );
|
||||
GBI_SetGBI( G_BRANCH_Z, F3DEX2_BRANCH_Z, F3DEX_Branch_Z );
|
||||
// GBI_SetGBI( G_TRI1, F3DEX2_TRI1, F3DEX2_Tri1 );
|
||||
// GBI_SetGBI( G_TRI2, F3DEX2_TRI2, F3DEX_Tri2 );
|
||||
GBI_SetGBI( G_TRI1, L3DEX2_TRI1, L3DEX2_Tri1 );
|
||||
GBI_SetGBI( G_TRI2, L3DEX2_TRI2, L3DEX2_Tri2 );
|
||||
// GBI_SetGBI( G_QUAD, F3DEX2_QUAD, F3DEX2_Quad );
|
||||
GBI_SetGBI( G_LINE3D, L3DEX2_LINE3D, L3DEX2_Line3D );
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
#define L3DEX2_H
|
||||
#include "Types.h"
|
||||
|
||||
#define L3DEX2_LINE3D 0x08
|
||||
#define L3DEX2_TRI1 0x05
|
||||
#define L3DEX2_TRI2 0x06
|
||||
#define L3DEX2_LINE3D 0x08
|
||||
|
||||
void L3DEX2_Line3D( u32 w0, u32 w1 );
|
||||
void L3DEX2_Init();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -81,7 +81,8 @@ void SaveScreenshot(const wchar_t * _folder, const char * _name, int _width, int
|
||||
const wchar_t * fileExt = L"png";
|
||||
|
||||
std::wstring folder = _folder;
|
||||
if (folder.size() > 1 && folder[folder.size() - 1] == L'\\') folder.resize(folder.size() - 1);
|
||||
if (folder.size() > 1 && (folder[folder.size() - 1] == L'\\' || folder[folder.size() - 1] == L'/'))
|
||||
folder.resize(folder.size() - 1);
|
||||
|
||||
WIN32_FIND_DATA FindData = { 0 };
|
||||
HANDLE hFindFile = FindFirstFile(folder.c_str(), &FindData); // Find anything
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
name: validate
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
type: [ Debug, Release ]
|
||||
os: [ ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ runner.os }}-rt64-ccache-${{ matrix.type }}
|
||||
- name: Install Windows Dependencies
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
choco install ninja
|
||||
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
|
||||
- name: Install Linux Dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ninja-build libsdl2-dev libgtk-3-dev
|
||||
|
||||
# Install SDL2
|
||||
echo ::group::install SDL2
|
||||
|
||||
# Enable ccache
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
|
||||
wget https://www.libsdl.org/release/SDL2-2.26.1.tar.gz
|
||||
tar -xzf SDL2-2.26.1.tar.gz
|
||||
cd SDL2-2.26.1
|
||||
./configure
|
||||
make -j 10
|
||||
sudo make install
|
||||
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
|
||||
echo ::endgroup::
|
||||
- name: Configure Developer Command Prompt
|
||||
if: runner.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
- name: Build RT64 (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
run: |-
|
||||
# enable ccache
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
||||
cmake --build cmake-build --config ${{ matrix.type }} --target rt64 -j $(nproc)
|
||||
- name: Build RT64 (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |-
|
||||
# enable ccache
|
||||
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
|
||||
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
|
||||
cmake --build cmake-build --config ${{ matrix.type }} --target rt64 -j $cpuCores
|
||||
@@ -1,25 +0,0 @@
|
||||
*.vs
|
||||
*.db
|
||||
*.log
|
||||
*.dll
|
||||
*.exe
|
||||
*.lib
|
||||
*.exp
|
||||
*.ipdb
|
||||
*.iobj
|
||||
*.tlog
|
||||
*.recipe
|
||||
*.FileListAbsolute.txt
|
||||
*.idb
|
||||
*.hlsl.h
|
||||
*.dxil.h
|
||||
*.spirv.h
|
||||
*.bat
|
||||
*.rw
|
||||
*.rw.h
|
||||
*.obj
|
||||
*.pdb
|
||||
build/
|
||||
.vscode/
|
||||
.idea
|
||||
cmake-build-debug*
|
||||
@@ -1,48 +0,0 @@
|
||||
[submodule "src/contrib/DLSS"]
|
||||
path = src/contrib/DLSS
|
||||
url = https://github.com/NVIDIA/DLSS
|
||||
[submodule "src/contrib/implot"]
|
||||
path = src/contrib/implot
|
||||
url = https://github.com/epezent/implot
|
||||
[submodule "src/contrib/hlslpp"]
|
||||
path = src/contrib/hlslpp
|
||||
url = https://github.com/redorav/hlslpp
|
||||
[submodule "src/contrib/xess"]
|
||||
path = src/contrib/xess
|
||||
url = https://github.com/intel/xess
|
||||
[submodule "src/contrib/mupen64plus-win32-deps"]
|
||||
path = src/contrib/mupen64plus-win32-deps
|
||||
url = https://github.com/mupen64plus/mupen64plus-win32-deps
|
||||
[submodule "src/contrib/mupen64plus-core"]
|
||||
path = src/contrib/mupen64plus-core
|
||||
url = https://github.com/mupen64plus/mupen64plus-core
|
||||
[submodule "src/contrib/xxHash"]
|
||||
path = src/contrib/xxHash
|
||||
url = https://github.com/Cyan4973/xxHash
|
||||
[submodule "src/contrib/volk"]
|
||||
path = src/contrib/volk
|
||||
url = https://github.com/zeux/volk
|
||||
[submodule "src/contrib/Vulkan-Headers"]
|
||||
path = src/contrib/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers
|
||||
[submodule "src/contrib/VulkanMemoryAllocator"]
|
||||
path = src/contrib/VulkanMemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
|
||||
[submodule "src/contrib/imgui"]
|
||||
path = src/contrib/imgui
|
||||
url = https://github.com/ocornut/imgui
|
||||
[submodule "src/contrib/im3d"]
|
||||
path = src/contrib/im3d
|
||||
url = https://github.com/john-chapman/im3d
|
||||
[submodule "src/contrib/D3D12MemoryAllocator"]
|
||||
path = src/contrib/D3D12MemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator
|
||||
[submodule "src/contrib/dxc"]
|
||||
path = src/contrib/dxc
|
||||
url = https://github.com/rt64/dxc-bin
|
||||
[submodule "src/contrib/stb"]
|
||||
path = src/contrib/stb
|
||||
url = https://github.com/nothings/stb
|
||||
[submodule "src/contrib/nativefiledialog-extended"]
|
||||
path = src/contrib/nativefiledialog-extended
|
||||
url = https://github.com/btzy/nativefiledialog-extended
|
||||
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
; DO NOT EDIT (unless you know what you are doing)
|
||||
;
|
||||
; This subdirectory is a git "subrepo", and this file is maintained by the
|
||||
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
|
||||
;
|
||||
[subrepo]
|
||||
remote = git@github.com:rt64/rt64.git
|
||||
branch = main
|
||||
commit = 1adcbea31a04f2403da729eb5dfed3950dd7ec52
|
||||
parent = e75381242a6e5020e6cf3f8c2ab0185e952b5a56
|
||||
method = merge
|
||||
cmdver = 0.4.6
|
||||
Vendored
-450
@@ -1,450 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(rt64)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
option(RT64_BUILD_PLUGIN "Build plugin version of RT64" OFF)
|
||||
|
||||
option(RT64_BUILD_EXAMPLES "Build examples for RT64" OFF)
|
||||
if (${RT64_BUILD_EXAMPLES})
|
||||
set(RT64_STATIC ON)
|
||||
endif()
|
||||
|
||||
function(preprocess INFILE OUTFILE OPTIONS)
|
||||
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_custom_command(OUTPUT ${OUTFILE}
|
||||
COMMAND clang -x c -E -P ${INFILE} -o ${OUTFILE} ${OPTIONS}
|
||||
DEPENDS ${INFILE})
|
||||
else()
|
||||
add_custom_command(OUTPUT ${OUTFILE}
|
||||
COMMAND ${CMAKE_CXX_COMPILER} /Zs /EP ${INFILE} ${OPTIONS} > ${OUTFILE}
|
||||
DEPENDS ${INFILE})
|
||||
endif()
|
||||
else()
|
||||
add_custom_command(OUTPUT ${OUTFILE}
|
||||
COMMAND ${CMAKE_CXX_COMPILER} -x c -E -P ${INFILE} -o ${OUTFILE} ${OPTIONS}
|
||||
DEPENDS ${INFILE})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (WIN32)
|
||||
set (DXC "${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/x64/dxc.exe")
|
||||
add_compile_definitions(NOMINMAX)
|
||||
|
||||
# Dependencies that must be next to the DLL.
|
||||
configure_file("${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/x64/dxcompiler.dll" "dxcompiler.dll" COPYONLY)
|
||||
configure_file("${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/x64/dxil.dll" "dxil.dll" COPYONLY)
|
||||
else()
|
||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
if (APPLE)
|
||||
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/x64/dxc")
|
||||
else()
|
||||
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/x64/dxc")
|
||||
endif()
|
||||
else()
|
||||
if (APPLE)
|
||||
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/arm64/dxc-macos")
|
||||
else()
|
||||
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/src/contrib/dxc/bin/arm64/dxc-linux")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "DXC: ${DXC}")
|
||||
endif()
|
||||
|
||||
# Build the file_to_c utility for converting binary files into a .c and .h file pair
|
||||
add_executable(file_to_c src/tools/file_to_c.cpp)
|
||||
|
||||
add_subdirectory(src/contrib/nativefiledialog-extended)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(-Wno-nullability-completeness)
|
||||
endif()
|
||||
|
||||
set(ANDROID_PLATFORM android-24)
|
||||
set(ANDROID_ABI arm64-v8a)
|
||||
|
||||
# For DXC
|
||||
set (DXC_COMMON_OPTS "-I${PROJECT_SOURCE_DIR}/src")
|
||||
set (DXC_DXIL_OPTS "-Wno-ignored-attributes")
|
||||
set (DXC_SPV_OPTS "-spirv" "-fspv-target-env=vulkan1.0" "-fvk-use-dx-layout")
|
||||
set (DXC_PS_OPTS "${DXC_COMMON_OPTS}" "-E" "PSMain" "-T ps_6_0")
|
||||
set (DXC_VS_OPTS "${DXC_COMMON_OPTS}" "-E" "VSMain" "-T vs_6_0" "-fvk-invert-y")
|
||||
set (DXC_CS_OPTS "${DXC_COMMON_OPTS}" "-E" "CSMain" "-T cs_6_0")
|
||||
set (DXC_GS_OPTS "${DXC_COMMON_OPTS}" "-E" "GSMain" "-T gs_6_0")
|
||||
set (DXC_RT_OPTS "${DXC_COMMON_OPTS}" "-D" "RT_SHADER" "-T" "lib_6_3" "-fspv-target-env=vulkan1.1spirv1.4" "-fspv-extension=SPV_KHR_ray_tracing" "-fspv-extension=SPV_EXT_descriptor_indexing")
|
||||
|
||||
function(build_shader_spirv_impl TARGETOBJ FILENAME TARGET_NAME OUTNAME)
|
||||
add_custom_command(OUTPUT ${OUTNAME}.spv
|
||||
COMMAND ${DXC} ${DXC_SPV_OPTS} ${ARGN} ${FILENAME} /Fo ${OUTNAME}.spv
|
||||
DEPENDS ${FILENAME})
|
||||
add_custom_command(OUTPUT ${OUTNAME}.spirv.c
|
||||
COMMAND file_to_c ${OUTNAME}.spv ${TARGET_NAME}BlobSPIRV ${OUTNAME}.spirv.c ${OUTNAME}.spirv.h
|
||||
DEPENDS ${OUTNAME}.spv file_to_c
|
||||
BYPRODUCTS ${OUTNAME}.spirv.h)
|
||||
target_sources(${TARGETOBJ} PRIVATE ${OUTNAME}.spirv.c)
|
||||
endfunction()
|
||||
|
||||
function(build_shader_dxil_impl TARGETOBJ FILENAME TARGET_NAME OUTNAME)
|
||||
add_custom_command(OUTPUT ${OUTNAME}.dxil
|
||||
COMMAND ${DXC} ${DXC_DXIL_OPTS} ${ARGN} ${FILENAME} /Fo ${OUTNAME}.dxil
|
||||
DEPENDS ${FILENAME})
|
||||
add_custom_command(OUTPUT ${OUTNAME}.dxil.c
|
||||
COMMAND file_to_c ${OUTNAME}.dxil ${TARGET_NAME}BlobDXIL ${OUTNAME}.dxil.c ${OUTNAME}.dxil.h
|
||||
DEPENDS ${OUTNAME}.dxil file_to_c
|
||||
BYPRODUCTS ${OUTNAME}.dxil.h)
|
||||
target_sources(${TARGETOBJ} PRIVATE ${OUTNAME}.dxil.c)
|
||||
endfunction()
|
||||
|
||||
function(build_shader TARGETOBJ SHADERNAME OPTIONS)
|
||||
set(FILENAME "${PROJECT_SOURCE_DIR}/${SHADERNAME}")
|
||||
if (${ARGC} GREATER 3)
|
||||
set(OUTNAME "${CMAKE_BINARY_DIR}/${ARGV3}")
|
||||
else()
|
||||
set(OUTNAME "${CMAKE_BINARY_DIR}/${SHADERNAME}")
|
||||
endif()
|
||||
# Get any optional compiler args passed to this function
|
||||
if (${ARGC} GREATER 4)
|
||||
set(EXTRA_ARGS "${ARGN}")
|
||||
list(REMOVE_AT EXTRA_ARGS 0)
|
||||
endif()
|
||||
cmake_path(GET OUTNAME STEM TARGET_NAME)
|
||||
cmake_path(GET OUTNAME PARENT_PATH OUTPUT_DIR)
|
||||
file(MAKE_DIRECTORY ${OUTPUT_DIR})
|
||||
# Compile DXIL shader binaries if building on Windows
|
||||
if (WIN32)
|
||||
build_shader_dxil_impl(${TARGETOBJ} ${FILENAME} ${TARGET_NAME} ${OUTNAME} ${OPTIONS} ${EXTRA_ARGS})
|
||||
endif()
|
||||
build_shader_spirv_impl(${TARGETOBJ} ${FILENAME} ${TARGET_NAME} ${OUTNAME} ${OPTIONS} ${EXTRA_ARGS})
|
||||
endfunction()
|
||||
|
||||
function(build_shader_spirv TARGETOBJ SHADERNAME OPTIONS)
|
||||
set(FILENAME "${PROJECT_SOURCE_DIR}/${SHADERNAME}")
|
||||
if (${ARGC} GREATER 3)
|
||||
set(OUTNAME "${CMAKE_BINARY_DIR}/${ARGV3}")
|
||||
else()
|
||||
set(OUTNAME "${CMAKE_BINARY_DIR}/${SHADERNAME}")
|
||||
endif()
|
||||
# Get any optional compiler args passed to this function
|
||||
if (${ARGC} GREATER 4)
|
||||
set(EXTRA_ARGS "${ARGN}")
|
||||
list(REMOVE_AT EXTRA_ARGS 0)
|
||||
endif()
|
||||
cmake_path(GET OUTNAME STEM TARGET_NAME)
|
||||
cmake_path(GET OUTNAME PARENT_PATH OUTPUT_DIR)
|
||||
file(MAKE_DIRECTORY ${OUTPUT_DIR})
|
||||
build_shader_spirv_impl(${TARGETOBJ} ${FILENAME} ${TARGET_NAME} ${OUTNAME} ${OPTIONS} ${EXTRA_ARGS})
|
||||
endfunction()
|
||||
|
||||
function(preprocess_shader TARGETOBJ SHADERNAME)
|
||||
set(FILENAME "${PROJECT_SOURCE_DIR}/${SHADERNAME}")
|
||||
set(OUTNAME "${CMAKE_BINARY_DIR}/${SHADERNAME}")
|
||||
cmake_path(GET SHADERNAME STEM TARGET_NAME)
|
||||
cmake_path(GET OUTNAME PARENT_PATH OUTPUT_DIR)
|
||||
preprocess(${FILENAME} ${OUTNAME}.rw ${DXC_COMMON_OPTS})
|
||||
add_custom_command(OUTPUT ${OUTNAME}.rw.c
|
||||
COMMAND file_to_c ${OUTNAME}.rw ${TARGET_NAME}Text ${OUTNAME}.rw.c ${OUTNAME}.rw.h
|
||||
DEPENDS ${OUTNAME}.rw file_to_c
|
||||
BYPRODUCTS ${OUTNAME}.rw.h)
|
||||
file(MAKE_DIRECTORY ${OUTPUT_DIR})
|
||||
target_sources(${TARGETOBJ} PRIVATE ${OUTNAME}.rw.c)
|
||||
endfunction()
|
||||
|
||||
function(build_pixel_shader TARGETOBJ SHADERNAME)
|
||||
build_shader(${TARGETOBJ} ${SHADERNAME} "${DXC_PS_OPTS}" ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(build_vertex_shader TARGETOBJ SHADERNAME)
|
||||
build_shader(${TARGETOBJ} ${SHADERNAME} "${DXC_VS_OPTS}" ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(build_pixel_shader_spirv TARGETOBJ SHADERNAME)
|
||||
build_shader_spirv(${TARGETOBJ} ${SHADERNAME} "${DXC_PS_OPTS}" ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(build_vertex_shader_spirv TARGETOBJ SHADERNAME)
|
||||
build_shader_spirv(${TARGETOBJ} ${SHADERNAME} "${DXC_VS_OPTS}" ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(build_compute_shader TARGETOBJ SHADERNAME)
|
||||
build_shader(${TARGETOBJ} ${SHADERNAME} "${DXC_CS_OPTS}" ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(build_geo_shader TARGETOBJ SHADERNAME)
|
||||
build_shader(${TARGETOBJ} ${SHADERNAME} "${DXC_GS_OPTS}" ${ARGN})
|
||||
endfunction()
|
||||
|
||||
function(build_ray_shader TARGETOBJ SHADERNAME)
|
||||
build_shader(${TARGETOBJ} ${SHADERNAME} "${DXC_RT_OPTS}" ${ARGN})
|
||||
endfunction()
|
||||
|
||||
# Point cmake at src/contrib/mupen64plus-win32-deps/SDL2-2.26.3 for SDL2 on windows, look for an installed package on other systems
|
||||
if (WIN32)
|
||||
set(SDL2_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src/contrib/mupen64plus-win32-deps/SDL2-2.26.3/include")
|
||||
set(SDL2_LIBRARIES "SDL2" "SDL2main")
|
||||
link_directories("${PROJECT_SOURCE_DIR}/src/contrib/mupen64plus-win32-deps/SDL2-2.26.3/lib/x64")
|
||||
else()
|
||||
find_package(SDL2 REQUIRED)
|
||||
endif()
|
||||
|
||||
message(STATUS "${SDL2_INCLUDE_DIRS} ${SDL2_LIBRARIES}")
|
||||
|
||||
add_compile_definitions(
|
||||
HLSL_CPU
|
||||
FFX_GCC
|
||||
IMGUI_IMPL_VULKAN_NO_PROTOTYPES
|
||||
)
|
||||
|
||||
set (SOURCES
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_common.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_dynamic_libraries.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_elapsed_timer.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_emulator_configuration.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_enhancement_configuration.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_math.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_profiling_timer.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_thread.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_timer.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_user_configuration.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/common/rt64_user_paths.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_f3d.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_f3dex.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_f3dex2.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_f3dgolden.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_f3dpd.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_f3dwave.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_f3dzex2.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_l3dex2.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_rdp.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_s2dex.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_s2dex2.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gbi/rt64_gbi_extended.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/gui/rt64_camera_controller.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gui/rt64_debugger_inspector.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gui/rt64_file_dialog.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/gui/rt64_inspector.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_application.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_application_window.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_color_converter.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_command_warning.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_draw_call.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_framebuffer.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_framebuffer_changes.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_framebuffer_manager.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_framebuffer_pair.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_framebuffer_storage.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_game_frame.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_interpreter.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_light_manager.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_present_queue.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_projection.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_rdp.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_rdp_tmem.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_rigid_body.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_rsp.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_state.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_vi.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_workload.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/hle/rt64_workload_queue.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_buffer_uploader.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_framebuffer_renderer.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_geometry_mode.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_native_target.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_optimus.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_projection_processor.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_raster_shader.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_raster_shader_cache.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_render_target.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_render_target_manager.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_render_worker.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_rsp_processor.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_shader_common.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_shader_compiler.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_shader_library.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_texture_cache.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_tile_processor.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_transform_processor.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_upscaler.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_vertex_processor.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/render/rt64_vi_renderer.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/preset/rt64_preset.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/preset/rt64_preset_draw_call.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/preset/rt64_preset_light.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/preset/rt64_preset_material.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/preset/rt64_preset_scene.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/shared/rt64_hlsl_json.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/rhi/rt64_render_hooks.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/vulkan/rt64_vulkan.cpp"
|
||||
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/imgui.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/imgui_demo.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/imgui_draw.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/imgui_tables.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/imgui_widgets.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/backends/imgui_impl_vulkan.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/im3d/im3d.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/implot/implot.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/implot/implot_demo.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/implot/implot_items.cpp"
|
||||
)
|
||||
|
||||
include_directories(
|
||||
"${SDL2_INCLUDE_DIRS}"
|
||||
"${PROJECT_SOURCE_DIR}/src"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/D3D12MemoryAllocator/include"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/D3D12MemoryAllocator/src"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/hlslpp/include"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/Vulkan-Headers/include"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/VulkanMemoryAllocator/include"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/mupen64plus-core/src/api"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/nativefiledialog-extended/src/include"
|
||||
)
|
||||
|
||||
if (NOT RT64_BUILD_PLUGIN AND WIN32)
|
||||
# DXC only needs to be included during runtime for Windows.
|
||||
include_directories("${PROJECT_SOURCE_DIR}/src/contrib/dxc/inc")
|
||||
endif()
|
||||
|
||||
option(RT64_STATIC "Build RT64 as a static library" OFF)
|
||||
if (${RT64_STATIC})
|
||||
add_library(rt64 STATIC ${SOURCES})
|
||||
else()
|
||||
add_library(rt64 SHARED ${SOURCES})
|
||||
endif()
|
||||
|
||||
set_target_properties(rt64 PROPERTIES OUTPUT_NAME "rt64")
|
||||
set_target_properties(rt64 PROPERTIES PREFIX "")
|
||||
|
||||
# Add common libraries.
|
||||
target_link_libraries(rt64 nfd)
|
||||
|
||||
# Add any Windows-specific source files and libraries
|
||||
if (NOT RT64_BUILD_PLUGIN AND WIN32)
|
||||
target_sources(rt64 PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/src/d3d12/rt64_d3d12.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/backends/imgui_impl_dx12.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/backends/imgui_impl_win32.cpp"
|
||||
)
|
||||
target_link_libraries(rt64
|
||||
delayimp.lib
|
||||
D3D12
|
||||
DXGI
|
||||
Shcore.lib
|
||||
${PROJECT_SOURCE_DIR}/src/contrib/dxc/lib/x64/dxcompiler.lib)
|
||||
endif()
|
||||
|
||||
if (RT64_BUILD_PLUGIN)
|
||||
target_compile_definitions(rt64 PRIVATE RT64_BUILD_PLUGIN)
|
||||
target_sources(rt64 PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/src/api/rt64_api_common.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/api/rt64_api_plugin.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/backends/imgui_impl_sdl2.cpp"
|
||||
)
|
||||
if (WIN32)
|
||||
target_sources(rt64 PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/src/contrib/imgui/backends/imgui_impl_win32.cpp"
|
||||
)
|
||||
target_link_libraries(rt64
|
||||
delayimp.lib
|
||||
Shcore.lib
|
||||
Dwmapi.lib
|
||||
)
|
||||
endif()
|
||||
endif(RT64_BUILD_PLUGIN)
|
||||
|
||||
target_link_directories(rt64 PRIVATE ${PROJECT_SOURCE_DIR}/src/contrib/dxc)
|
||||
|
||||
if (NOT ANDROID)
|
||||
target_link_libraries(rt64 ${SDL2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (NOT RT64_BUILD_PLUGIN AND CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_package(X11 REQUIRED)
|
||||
target_include_directories(rt64 PUBLIC ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH})
|
||||
target_link_libraries(rt64 ${X11_LIBRARIES} ${X11_Xrandr_LIB})
|
||||
endif()
|
||||
|
||||
preprocess_shader(rt64 "src/shaders/RasterPS.hlsl")
|
||||
preprocess_shader(rt64 "src/shaders/RasterVS.hlsl")
|
||||
|
||||
build_pixel_shader( rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSDynamic.hlsl" "-D DYNAMIC_RENDER_PARAMS")
|
||||
build_pixel_shader( rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSDynamicMS.hlsl" "-D DYNAMIC_RENDER_PARAMS" "-D MULTISAMPLING")
|
||||
build_pixel_shader_spirv(rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSSpecConstant.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS")
|
||||
build_pixel_shader_spirv(rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSSpecConstantFlat.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS" "-D VERTEX_FLAT_COLOR")
|
||||
build_pixel_shader_spirv(rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSSpecConstantDepth.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS" "-D OUTPUT_DEPTH")
|
||||
build_pixel_shader_spirv(rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSSpecConstantDepthMS.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS" "-D OUTPUT_DEPTH" "-D MULTISAMPLING")
|
||||
build_pixel_shader_spirv(rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSSpecConstantFlatDepth.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS" "-D VERTEX_FLAT_COLOR" "-D OUTPUT_DEPTH")
|
||||
build_pixel_shader_spirv(rt64 "src/shaders/RasterPS.hlsl" "src/shaders/RasterPSSpecConstantFlatDepthMS.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS" "-D VERTEX_FLAT_COLOR" "-D OUTPUT_DEPTH" "-D MULTISAMPLING")
|
||||
build_vertex_shader( rt64 "src/shaders/RasterVS.hlsl" "src/shaders/RasterVSDynamic.hlsl" "-D DYNAMIC_RENDER_PARAMS")
|
||||
build_vertex_shader_spirv( rt64 "src/shaders/RasterVS.hlsl" "src/shaders/RasterVSSpecConstant.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS")
|
||||
build_vertex_shader_spirv( rt64 "src/shaders/RasterVS.hlsl" "src/shaders/RasterVSSpecConstantFlat.hlsl" "-D SPEC_CONSTANT_RENDER_PARAMS" "-D VERTEX_FLAT_COLOR")
|
||||
build_compute_shader(rt64 "src/shaders/FbChangesClearCS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/FbChangesDrawColorPS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/FbChangesDrawDepthPS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/FbReadAnyChangesCS.hlsl" "src/shaders/FbReadAnyChangesCS.hlsl" "-O0")
|
||||
build_compute_shader(rt64 "src/shaders/FbReinterpretCS.hlsl" "src/shaders/FbReinterpretCS.hlsl" "-O0")
|
||||
build_compute_shader(rt64 "src/shaders/FbReadAnyFullCS.hlsl" "src/shaders/FbReadAnyFullCS.hlsl" "-O0")
|
||||
build_compute_shader(rt64 "src/shaders/FbWriteColorCS.hlsl" "src/shaders/FbWriteColorCS.hlsl" "-O0")
|
||||
build_compute_shader(rt64 "src/shaders/FbWriteDepthCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/FbWriteDepthCS.hlsl" "src/shaders/FbWriteDepthCSMS.hlsl" "-D MULTISAMPLING")
|
||||
build_compute_shader(rt64 "src/shaders/GaussianFilterRGB3x3CS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/BoxFilterCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/BicubicScalingCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/HistogramAverageCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/HistogramClearCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/HistogramSetCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/IdleCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/LuminanceHistogramCS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/PostBlendDitherNoisePS.hlsl" "src/shaders/PostBlendDitherNoiseAddPS.hlsl" "-D ADD_MODE")
|
||||
build_pixel_shader( rt64 "src/shaders/PostBlendDitherNoisePS.hlsl" "src/shaders/PostBlendDitherNoiseSubPS.hlsl" "-D SUB_MODE")
|
||||
build_compute_shader(rt64 "src/shaders/RSPModifyCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/RSPProcessCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/RSPWorldCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/RSPSmoothNormalCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/RSPVertexTestZCS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/RSPVertexTestZCS.hlsl" "src/shaders/RSPVertexTestZCSMS.hlsl" "-D MULTISAMPLING")
|
||||
build_pixel_shader( rt64 "src/shaders/RtCopyColorToDepthPS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/RtCopyColorToDepthPS.hlsl" "src/shaders/RtCopyColorToDepthPSMS.hlsl" "-D MULTISAMPLING")
|
||||
build_pixel_shader( rt64 "src/shaders/RtCopyDepthToColorPS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/RtCopyDepthToColorPS.hlsl" "src/shaders/RtCopyDepthToColorPSMS.hlsl" "-D MULTISAMPLING")
|
||||
build_pixel_shader( rt64 "src/shaders/TextureCopyPS.hlsl")
|
||||
build_compute_shader(rt64 "src/shaders/TextureDecodeCS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/VideoInterfacePS.hlsl" "src/shaders/VideoInterfacePSRegular.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/VideoInterfacePS.hlsl" "src/shaders/VideoInterfacePSPixel.hlsl" "-D PIXEL_ANTIALIASING")
|
||||
build_vertex_shader( rt64 "src/shaders/FullScreenVS.hlsl")
|
||||
build_vertex_shader( rt64 "src/shaders/Im3DVS.hlsl")
|
||||
build_geo_shader( rt64 "src/shaders/Im3DGSPoints.hlsl")
|
||||
build_geo_shader( rt64 "src/shaders/Im3DGSLines.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/ComposePS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/DebugPS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/Im3DPS.hlsl")
|
||||
build_pixel_shader( rt64 "src/shaders/PostProcessPS.hlsl")
|
||||
|
||||
target_include_directories(rt64 PRIVATE ${CMAKE_BINARY_DIR}/src)
|
||||
|
||||
if (RT64_BUILD_EXAMPLES)
|
||||
add_executable(rhi_test "examples/rt64_render_interface.cpp" "examples/rhi_test.cpp")
|
||||
target_link_libraries(rhi_test rt64)
|
||||
|
||||
build_pixel_shader( rhi_test "examples/shaders/RenderInterfaceTestPS.hlsl")
|
||||
build_vertex_shader( rhi_test "examples/shaders/RenderInterfaceTestVS.hlsl")
|
||||
build_compute_shader(rhi_test "examples/shaders/RenderInterfaceTestCS.hlsl")
|
||||
build_ray_shader( rhi_test "examples/shaders/RenderInterfaceTestRT.hlsl")
|
||||
build_pixel_shader( rhi_test "examples/shaders/RenderInterfaceTestPostPS.hlsl")
|
||||
build_vertex_shader( rhi_test "examples/shaders/RenderInterfaceTestPostVS.hlsl")
|
||||
|
||||
target_include_directories(rhi_test PRIVATE ${CMAKE_BINARY_DIR}/examples)
|
||||
endif()
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": ""
|
||||
},
|
||||
{
|
||||
"name": "Release",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "RelWithDebInfo",
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 RT64 Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Vendored
-103
@@ -1,103 +0,0 @@
|
||||
# RT64
|
||||
RT64 is an N64 graphics renderer for playing games with enhancements in emulators and native ports.
|
||||
|
||||
# Work in Progress
|
||||
|
||||
### **Emulator Support (Plugin) and Ray Tracing (RT) are not available in this repository yet.**
|
||||
|
||||
This repository has been made public to provide a working implementation to native ports that wish to use RT64 as their renderer.
|
||||
|
||||
**Development of these features is still ongoing and will be added to this repository when they're ready.** Thank you for your patience!
|
||||
|
||||
# Features available
|
||||
* Modern N64 renderer built on the latest APIs (D3D12 and Vulkan).
|
||||
* Uses ubershaders to guarantee no stutters due to pipeline compilation.
|
||||
* Brand new architecture designed around offering novel enhancements.
|
||||
* High level of accuracy and no tolerance for game-specific workarounds to achieve correct rendering.
|
||||
* Input latency reduction options to either skip the game's native buffering or draw as early as possible.
|
||||
* Render with a higher resolution and downsample to a resolution closer to the original game.
|
||||
* Support for Widescreen with arbitrary aspect ratios, including Ultrawide support (limited game support).
|
||||
* Interpolate the game's visuals to 60 FPS or above (HFR) by generating new frames and modifying them in 3D space (limited game support).
|
||||
* Extended command set for better integration of widescreen, interpolation and path tracing features (for use with rom patches, rom hacks, and ports).
|
||||
* Supports Windows 10, Windows 11 and Linux.
|
||||
|
||||
# Features in development (in priority order)
|
||||
* HD texture packs.
|
||||
* Compatibility with texture packs that use the Rice texture format.
|
||||
* Brand new texture pack configuration format for higher levels of control.
|
||||
* Supports both DDS (with mipmaps) and PNG.
|
||||
* Asynchronous streaming.
|
||||
* Game script interpreter.
|
||||
* Support a runtime language for configuring the path traced renderer based on the contents of the game's memory.
|
||||
* Support patching the game's memory to provide various enhancements automatically integrated with the game script.
|
||||
* Fully path traced renderer (RT).
|
||||
* Calculate all lighting in real time and replace the contents of the drawn scene entirely with a path traced version.
|
||||
* Provide support for extra modifications for altering the material properties of the surfaces in the game.
|
||||
* Game support will be limited to a very small selection of games initially.
|
||||
* Emulator integration.
|
||||
* Game compatibility database and feature whitelist.
|
||||
* Configuration screen.
|
||||
* List of supported emulators to be determined.
|
||||
* Model replacements.
|
||||
* Details to be determined.
|
||||
|
||||
|
||||
# Building
|
||||
|
||||
* CMake 3.20 or above.
|
||||
* C++17 compiler.
|
||||
* Known to work with Microsoft Visual C++, Clang or GCC.
|
||||
* Windows 10 or 11 SDK (Windows only).
|
||||
* Make sure to clone submodules correctly when checking out the repository.
|
||||
* Use `git submodule update --init --recursive` if you cloned without using `--recursive`.
|
||||
|
||||
# Architecture
|
||||
|
||||
## Deferred frames
|
||||
Draw calls are never sent right away to the GPU but instead stored on an auxiliary structure that logs the history of an entire frame. A frame's contents can be examined in great detail with the in-game debugger included with RT64. The renderer requires this to be able to optimize the rendering process, perform enhancements, replace assets and even generate new frames entirely.
|
||||
|
||||
## Deferred RDP
|
||||
Any operation related to reading memory and using it as texture information during rendering is completely deferred until the game requires a full synchronization of the RDP. All requests are stored in a list of operations and flushed before it is time to render. This allows RT64 to perform extra optimizations and detect when it is necessary to synchronize the output of the RDP back to memory. It also opens up the ability to detect when direct copies can be made on GPU memory and even detect patterns that can be replaced with equivalent but faster operations.
|
||||
|
||||
## Deferred RSP (Compute)
|
||||
All vertex transformations by the RSP (e.g. position, lighting, texturing, etc.) are performed by a highly parallel compute shader in the GPU. This saves a lot of CPU processing time and allows for much higher vertex and polygon counts. Since all transformations are deferred to this step, it's very easy for RT64 to patch transformations of the objects in the scene and the camera and produce a new frame very quickly. This effectively removes CPU bottlenecks that are critical for reaching very high target framerates.
|
||||
|
||||
## Texture Decoder (Compute)
|
||||
RT64 does not decode textures on the CPU and instead opts for uploading TMEM (4 KB) directly to the GPU. If possible, a RGBA32 version of the texture will be decoded and cached using a compute shader. If the sampling parameters prove to be too troublesome for that (e.g. giant texture masks with no clamp due to bad configuration), then RT64 can sample TMEM directly just like the console with a small performance sacrifice.
|
||||
|
||||
RT64 features one of the most accurate TMEM loaders to date so far which has been directly reverse engineered by observing console behavior with the aid of homebrew test ROMs developed by [Wiseguy](https://github.com/Mr-Wiseguy). All the color conversion formulas for decoding have also been sourced from [Tharo](https://github.com/Thar0)'s excellent RDP research.
|
||||
|
||||
## Dual renderers
|
||||
RT64 takes advantage of the multi-threaded capabilities of modern APIs to run two renderers at the same time with highly different goals. One renderer draws at native resolution (e.g. 240p) and synchronizes back immediately with the game running at its original rate. The other renderer replays all the draw calls detected by the main renderer at higher resolution and even at a different rate when using interpolation. This design guarantees that the game will see the correct data in RAM, which is very important for games that read from these memory regions for gameplay reasons. If it's not required by the game, this native resolution renderer can be turned off completely to save performance.
|
||||
|
||||
## Framebuffer detection
|
||||
RT64 will keep track of any memory addresses used as framebuffers, their dimensions and their matching contents that live in GPU memory. If other operations in the frame load and sample a part of memory owned by a framebuffer, then a direct copy of one of its regions is performed and stored in memory.
|
||||
|
||||
The framebuffer copy mechanic is only used when the load and sample parameters line up correctly and the final result would look no different than if it was sampled from RAM (except for preserving the high precision of the image). As framebuffer detection works at the RDP level, that means all related performance and visual enhancements can apply even in LLE mode.
|
||||
|
||||
## Framebuffer upscaling
|
||||
When framebuffer operations are detected, the renderer is able to upscale these effects by increasing the resolution of all framebuffers and any associated region copies by a scaling factor. The resolution increase is only performed in the high resolution renderer. All texture coordinates are adjusted automatically to account for this change.
|
||||
|
||||
## Framebuffer reinterpretation
|
||||
Games will sometimes draw to a framebuffer using one format and then read it as another format to perform post-processing on the screen. RT64 supports this operation natively at high resolution using per-pixel reinterpretation inside a dedicated compute shader. While this requires adding specific paths encountered on a case-by-case basis (to preserve high precision), the framework can be easily extended to support as many cases as possible. This feature is essential for emulating some of the more infamous effects in higher resolutions such as greyscale filters.
|
||||
|
||||
## Draw call matching
|
||||
Once all information for a particular game frame has been recorded, RT64 will attempt to perform automatic matching of draw calls between frames based on their rendering parameters, the textures in use, their position, orientation, their tracked velocities and much more. Matching is essential to generating interpolated frames and providing motion vector information to the path traced renderer. Draw call matching is still a highly experimental area that is prone to errors and requires a lot of processing to get right. The algorithms behind this feature will be likely to change as more research is done to accommodate as many games as possible.
|
||||
|
||||
## Frame interpolation
|
||||
New frames are generated using the information from the previous draw call matching step. For any calls that match, new 3D transformations will be created via interpolation and uploaded to the GPU for the deferred RSP to do its work again. When possible, transformations are decomposed into their constituent components. Those components are interpolated separately and recomposed into the resultant transform to prevent interpolation artifacts caused by naive transformation interpolation. This interpolation can also be applied to texture scrolling coordinates and even per vertex if vertex velocities are computed. More parameters are planned to be supported in the future as long as they're part of the recorded frame data.
|
||||
|
||||
## Extended command set
|
||||
RT64 offers an extended command set that can be used by native ports, ROM patches, and ROM hacks to provide extra information that the renderer can use to enhance the final result. Using this feature is vital to providing accurate frame interpolation and widescreen enhancements for 2D elements. If you're interested in using this feature, check out the [included header in the repository](https://github.com/rt64/rt64/blob/main/include/rt64_extended_gbi.h). The main activation method is encoded into a NOOP command so it should be safe to run it in real hardware. RT64 will recognize this command and enable the extended command set feature, allowing for an extended repertoire of functions aimed at fixing some common grievances that show up at high framerates or wide aspect ratios.
|
||||
|
||||
For example, objects that rely on pixel depth checks to draw can instead use the `gEXVertexZTest()` command to specify any triangles drawn after the command should only be drawn if the vertex is not covered by something else. This means that effects such as light halos can be replaced with this command and it'll automatically work on widescreen ratios and no longer be delayed by one frame. Instead, RT64 will just flush the depth buffer at the correct step and run a small compute shader that will invalidate the draw call's triangles if the depth test doesn't pass. Though the original effect already works as-is thanks to the native renderer, the extended GBI method can be leveraged to make the experience feel even better.
|
||||
|
||||
## Future texture and asset replacement
|
||||
Texture replacements are easily performed at runtime by using two capabilities that RT64 already supports: bindless textures and texture coordinate scaling. The entire renderer uses only one contiguous array of texture resources and replacing one of these by an HD texture replacement is straightforward. By detecting the difference in sizes between the original texture and the replacement, the texture coordinates can be scaled easily with the same logic that is used for framebuffer tiles.
|
||||
|
||||
Asset replacement, while not currently implemented and more of a long term feature, will leverage the fact that only one contiguous vertex and index array is used by RT64. This allows for highly efficient rendering as it minimizes the amount of times vertex and index buffers must be bound, but it also means the RSP can process the vertices placed in this buffer during rendering time as if they came from the game itself. Therefore, the entire process of model replacement will just consist of allocating chunks of the buffer directly for replacements in a native format, assigning it the correct transforms used by the draw call and letting the RSP compute shader do its job. This will allow the renderer to draw models that have orders of magnitude higher triangle counts with very little additional cost to the CPU.
|
||||
|
||||
## Future path tracing
|
||||
RT64 will attempt to perform scene detection by merging as many draw calls as it can as long as they're inside of the same compatible perspective view point. Since all data remains untransformed, bottom-level acceleration structures (BLAS) can be built by using a compute shader to transform vertices to world space instead of screen space. Once these BLAS are built, a top-level acceleration structure (TLAS) is constructed with all the BLAS that were detected.
|
||||
|
||||
These structures are used directly for path tracing the scene and generating all lighting in real time. Lighting information is derived from various sources (the game itself, scripts, integrated light editor) and will be detailed more in the future as this feature is closer to a final state.
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
buildType:
|
||||
default: debug
|
||||
choices:
|
||||
debug:
|
||||
short: Debug
|
||||
long: Emit debug information
|
||||
buildType: Debug
|
||||
release:
|
||||
short: Release
|
||||
long: Optimize generated code
|
||||
buildType: Release
|
||||
platform:
|
||||
default: native
|
||||
choices:
|
||||
native:
|
||||
short: Native
|
||||
long: Build for the native platform
|
||||
android:
|
||||
short: Android
|
||||
long: Build for Android using the NDK
|
||||
env:
|
||||
CMAKE_TOOLCHAIN_FILE: /opt/android-sdk/ndk/26.0.10792818/build/cmake/android.toolchain.cmake
|
||||
settings:
|
||||
ANDROID_ABI: arm64-v8a
|
||||
ANDROID_PLATFORM: android-24
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
#include "rhi/rt64_render_interface.h"
|
||||
|
||||
namespace RT64 {
|
||||
extern std::unique_ptr<RenderInterface> CreateD3D12Interface();
|
||||
extern std::unique_ptr<RenderInterface> CreateVulkanInterface();
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
std::unique_ptr<RT64::RenderInterface> renderInterface = RT64::CreateVulkanInterface();
|
||||
|
||||
#if defined(_WIN32)
|
||||
// Windows only: Can also use D3D12.
|
||||
const bool useVulkan = true;
|
||||
if (!useVulkan) {
|
||||
renderInterface = RT64::CreateD3D12Interface();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Execute a blocking test that creates a window and draws some geometry to test the render interface.
|
||||
RT64::RenderInterfaceTest(renderInterface.get());
|
||||
}
|
||||
@@ -1,796 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rhi/rt64_render_interface.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#ifdef _WIN64
|
||||
#include "shaders/RenderInterfaceTestPS.hlsl.dxil.h"
|
||||
#include "shaders/RenderInterfaceTestRT.hlsl.dxil.h"
|
||||
#include "shaders/RenderInterfaceTestVS.hlsl.dxil.h"
|
||||
#include "shaders/RenderInterfaceTestCS.hlsl.dxil.h"
|
||||
#include "shaders/RenderInterfaceTestPostPS.hlsl.dxil.h"
|
||||
#include "shaders/RenderInterfaceTestPostVS.hlsl.dxil.h"
|
||||
#endif
|
||||
#include "shaders/RenderInterfaceTestPS.hlsl.spirv.h"
|
||||
#include "shaders/RenderInterfaceTestRT.hlsl.spirv.h"
|
||||
#include "shaders/RenderInterfaceTestVS.hlsl.spirv.h"
|
||||
#include "shaders/RenderInterfaceTestCS.hlsl.spirv.h"
|
||||
#include "shaders/RenderInterfaceTestPostPS.hlsl.spirv.h"
|
||||
#include "shaders/RenderInterfaceTestPostVS.hlsl.spirv.h"
|
||||
|
||||
#define ENABLE_SWAP_CHAIN 1
|
||||
#define ENABLE_CLEAR 1
|
||||
#define ENABLE_RASTER 1
|
||||
#define ENABLE_TEXTURE 0
|
||||
#define ENABLE_COMPUTE 0
|
||||
#define ENABLE_RT 0
|
||||
|
||||
namespace RT64 {
|
||||
struct RasterDescriptorSet : RenderDescriptorSetBase {
|
||||
uint32_t gSampler;
|
||||
uint32_t gTextures;
|
||||
|
||||
std::unique_ptr<RenderSampler> linearSampler;
|
||||
|
||||
RasterDescriptorSet(RenderDevice *device, uint32_t textureArraySize) {
|
||||
linearSampler = device->createSampler(RenderSamplerDesc());
|
||||
|
||||
const uint32_t TextureArrayUpperRange = 512;
|
||||
builder.begin();
|
||||
gSampler = builder.addImmutableSampler(1, linearSampler.get());
|
||||
gTextures = builder.addTexture(2, TextureArrayUpperRange);
|
||||
builder.end(true, textureArraySize);
|
||||
|
||||
create(device);
|
||||
}
|
||||
};
|
||||
|
||||
struct ComputeDescriptorFirstSet : RenderDescriptorSetBase {
|
||||
uint32_t gBlueNoiseTexture;
|
||||
uint32_t gSampler;
|
||||
uint32_t gTarget;
|
||||
|
||||
std::unique_ptr<RenderSampler> linearSampler;
|
||||
|
||||
ComputeDescriptorFirstSet(RenderDevice *device) {
|
||||
linearSampler = device->createSampler(RenderSamplerDesc());
|
||||
|
||||
builder.begin();
|
||||
gBlueNoiseTexture = builder.addTexture(1);
|
||||
gSampler = builder.addImmutableSampler(2, linearSampler.get());
|
||||
builder.end();
|
||||
|
||||
create(device);
|
||||
}
|
||||
};
|
||||
|
||||
struct ComputeDescriptorSecondSet : RenderDescriptorSetBase {
|
||||
uint32_t gTarget;
|
||||
|
||||
ComputeDescriptorSecondSet(RenderDevice *device) {
|
||||
builder.begin();
|
||||
gTarget = builder.addReadWriteTexture(16);
|
||||
builder.end();
|
||||
|
||||
create(device);
|
||||
}
|
||||
};
|
||||
|
||||
struct RaytracingDescriptorSet : RenderDescriptorSetBase {
|
||||
uint32_t gBVH;
|
||||
uint32_t gOutput;
|
||||
uint32_t gBufferParams;
|
||||
|
||||
RaytracingDescriptorSet(RenderDevice *device) {
|
||||
builder.begin();
|
||||
gBVH = builder.addAccelerationStructure(0);
|
||||
gOutput = builder.addReadWriteTexture(1);
|
||||
gBufferParams = builder.addStructuredBuffer(2);
|
||||
builder.end();
|
||||
|
||||
create(device);
|
||||
}
|
||||
};
|
||||
|
||||
struct TestMembers {
|
||||
static const uint32_t BufferCount = 2;
|
||||
static const uint32_t MSAACount = 4;
|
||||
static const RenderFormat ColorFormat = RenderFormat::R8G8B8A8_UNORM;
|
||||
static const RenderFormat DepthFormat = RenderFormat::D32_FLOAT;
|
||||
#ifdef __ANDROID__
|
||||
static const RenderFormat SwapchainFormat = RenderFormat::R8G8B8A8_UNORM;
|
||||
#else
|
||||
static const RenderFormat SwapchainFormat = RenderFormat::B8G8R8A8_UNORM;
|
||||
#endif
|
||||
const RenderInterface *renderInterface = nullptr;
|
||||
std::unique_ptr<RenderDevice> device;
|
||||
std::unique_ptr<RenderCommandQueue> commandQueue;
|
||||
std::unique_ptr<RenderCommandList> commandList;
|
||||
std::unique_ptr<RenderCommandFence> commandFence;
|
||||
std::unique_ptr<RenderSwapChain> swapChain;
|
||||
std::unique_ptr<RenderFramebuffer> framebuffer;
|
||||
std::vector<std::unique_ptr<RenderFramebuffer>> swapFramebuffers;
|
||||
std::unique_ptr<RenderSampler> linearSampler;
|
||||
std::unique_ptr<RenderSampler> postSampler;
|
||||
std::unique_ptr<RasterDescriptorSet> rasterSet;
|
||||
std::unique_ptr<ComputeDescriptorFirstSet> computeFirstSet;
|
||||
std::unique_ptr<ComputeDescriptorSecondSet> computeSecondSet;
|
||||
std::unique_ptr<RaytracingDescriptorSet> rtSet;
|
||||
std::unique_ptr<RenderDescriptorSet> postSet;
|
||||
std::unique_ptr<RenderPipelineLayout> rasterPipelineLayout;
|
||||
std::unique_ptr<RenderPipelineLayout> computePipelineLayout;
|
||||
std::unique_ptr<RenderPipelineLayout> rtPipelineLayout;
|
||||
std::unique_ptr<RenderPipelineLayout> postPipelineLayout;
|
||||
std::unique_ptr<RenderPipeline> rasterPipeline;
|
||||
std::unique_ptr<RenderPipeline> computePipeline;
|
||||
std::unique_ptr<RenderPipeline> rtPipeline;
|
||||
std::unique_ptr<RenderPipeline> postPipeline;
|
||||
std::unique_ptr<RenderTexture> colorTargetMS;
|
||||
std::unique_ptr<RenderTexture> colorTargetResolved;
|
||||
std::unique_ptr<RenderTexture> depthTarget;
|
||||
std::unique_ptr<RenderBuffer> uploadBuffer;
|
||||
std::unique_ptr<RenderTexture> blueNoiseTexture;
|
||||
std::unique_ptr<RenderBuffer> vertexBuffer;
|
||||
std::unique_ptr<RenderBuffer> indexBuffer;
|
||||
std::unique_ptr<RenderBuffer> rtParamsBuffer;
|
||||
std::unique_ptr<RenderBuffer> rtVertexBuffer;
|
||||
std::unique_ptr<RenderBuffer> rtScratchBuffer;
|
||||
std::unique_ptr<RenderBuffer> rtInstancesBuffer;
|
||||
std::unique_ptr<RenderBuffer> rtBottomLevelASBuffer;
|
||||
std::unique_ptr<RenderAccelerationStructure> rtBottomLevelAS;
|
||||
std::unique_ptr<RenderBuffer> rtTopLevelASBuffer;
|
||||
std::unique_ptr<RenderAccelerationStructure> rtTopLevelAS;
|
||||
std::unique_ptr<RenderBuffer> rtShaderBindingTableBuffer;
|
||||
RenderShaderBindingTableInfo rtShaderBindingTableInfo;
|
||||
RenderVertexBufferView vertexBufferView;
|
||||
RenderIndexBufferView indexBufferView;
|
||||
RenderInputSlot inputSlot;
|
||||
} Test;
|
||||
|
||||
struct RasterPushConstant {
|
||||
float colorAdd[4] = {};
|
||||
uint32_t textureIndex = 0;
|
||||
};
|
||||
|
||||
struct ComputePushConstant {
|
||||
float Multiply[4] = {};
|
||||
uint32_t Resolution[2] = {};
|
||||
};
|
||||
|
||||
void TestInitialize(RenderInterface *renderInterface, RenderWindow window) {
|
||||
Test.renderInterface = renderInterface;
|
||||
Test.device = renderInterface->createDevice();
|
||||
Test.commandQueue = Test.device->createCommandQueue(RenderCommandListType::DIRECT);
|
||||
Test.commandList = Test.device->createCommandList(RenderCommandListType::DIRECT);
|
||||
Test.commandFence = Test.device->createCommandFence();
|
||||
|
||||
# if ENABLE_SWAP_CHAIN
|
||||
Test.swapChain = Test.commandQueue->createSwapChain(window, Test.BufferCount, Test.SwapchainFormat);
|
||||
# endif
|
||||
|
||||
# if ENABLE_RASTER
|
||||
const uint32_t textureArraySize = 3;
|
||||
Test.rasterSet = std::make_unique<RasterDescriptorSet>(Test.device.get(), 3);
|
||||
|
||||
RenderPipelineLayoutBuilder layoutBuilder;
|
||||
layoutBuilder.begin(false, true);
|
||||
layoutBuilder.addPushConstant(0, 0, sizeof(RasterPushConstant), RenderShaderStageFlag::PIXEL);
|
||||
layoutBuilder.addDescriptorSet(Test.rasterSet->builder);
|
||||
layoutBuilder.end();
|
||||
|
||||
Test.rasterPipelineLayout = layoutBuilder.create(Test.device.get());
|
||||
|
||||
// Pick shader format depending on the render interface's requirements.
|
||||
const RenderInterfaceCapabilities &interfaceCapabilities = Test.renderInterface->getCapabilities();
|
||||
const RenderShaderFormat shaderFormat = interfaceCapabilities.shaderFormat;
|
||||
const void *PSBlob = nullptr;
|
||||
const void *VSBlob = nullptr;
|
||||
const void *CSBlob = nullptr;
|
||||
const void *RTBlob = nullptr;
|
||||
const void *PostPSBlob = nullptr;
|
||||
const void *PostVSBlob = nullptr;
|
||||
uint64_t PSBlobSize = 0;
|
||||
uint64_t VSBlobSize = 0;
|
||||
uint64_t CSBlobSize = 0;
|
||||
uint64_t RTBlobSize = 0;
|
||||
uint64_t PostPSBlobSize = 0;
|
||||
uint64_t PostVSBlobSize = 0;
|
||||
switch (shaderFormat) {
|
||||
#ifdef _WIN64
|
||||
case RenderShaderFormat::DXIL:
|
||||
PSBlob = RenderInterfaceTestPSBlobDXIL;
|
||||
PSBlobSize = sizeof(RenderInterfaceTestPSBlobDXIL);
|
||||
VSBlob = RenderInterfaceTestVSBlobDXIL;
|
||||
VSBlobSize = sizeof(RenderInterfaceTestVSBlobDXIL);
|
||||
CSBlob = RenderInterfaceTestCSBlobDXIL;
|
||||
CSBlobSize = sizeof(RenderInterfaceTestCSBlobDXIL);
|
||||
RTBlob = RenderInterfaceTestRTBlobDXIL;
|
||||
RTBlobSize = sizeof(RenderInterfaceTestRTBlobDXIL);
|
||||
PostPSBlob = RenderInterfaceTestPostPSBlobDXIL;
|
||||
PostPSBlobSize = sizeof(RenderInterfaceTestPostPSBlobDXIL);
|
||||
PostVSBlob = RenderInterfaceTestPostVSBlobDXIL;
|
||||
PostVSBlobSize = sizeof(RenderInterfaceTestPostVSBlobDXIL);
|
||||
break;
|
||||
#endif
|
||||
case RenderShaderFormat::SPIRV:
|
||||
PSBlob = RenderInterfaceTestPSBlobSPIRV;
|
||||
PSBlobSize = sizeof(RenderInterfaceTestPSBlobSPIRV);
|
||||
VSBlob = RenderInterfaceTestVSBlobSPIRV;
|
||||
VSBlobSize = sizeof(RenderInterfaceTestVSBlobSPIRV);
|
||||
CSBlob = RenderInterfaceTestCSBlobSPIRV;
|
||||
CSBlobSize = sizeof(RenderInterfaceTestCSBlobSPIRV);
|
||||
RTBlob = RenderInterfaceTestRTBlobSPIRV;
|
||||
RTBlobSize = sizeof(RenderInterfaceTestRTBlobSPIRV);
|
||||
PostPSBlob = RenderInterfaceTestPostPSBlobSPIRV;
|
||||
PostPSBlobSize = sizeof(RenderInterfaceTestPostPSBlobSPIRV);
|
||||
PostVSBlob = RenderInterfaceTestPostVSBlobSPIRV;
|
||||
PostVSBlobSize = sizeof(RenderInterfaceTestPostVSBlobSPIRV);
|
||||
break;
|
||||
default:
|
||||
assert(false && "Unknown shader format.");
|
||||
break;
|
||||
}
|
||||
|
||||
const uint32_t VertexCount = 3;
|
||||
const uint32_t FloatsPerVertex = 4;
|
||||
const float Vertices[VertexCount * FloatsPerVertex] = {
|
||||
-0.5f, -0.25f, 0.0f, 0.0f,
|
||||
0.5f, -0.25f, 1.0f, 0.0f,
|
||||
0.25f, 0.25f, 0.0f, 1.0f
|
||||
};
|
||||
|
||||
const uint32_t Indices[3] = {
|
||||
0, 1, 2
|
||||
};
|
||||
|
||||
Test.inputSlot = RenderInputSlot(0, sizeof(float) * FloatsPerVertex);
|
||||
|
||||
std::vector<RenderInputElement> inputElements;
|
||||
inputElements.emplace_back(RenderInputElement("POSITION", 0, 0, RenderFormat::R32G32_FLOAT, 0, 0));
|
||||
inputElements.emplace_back(RenderInputElement("TEXCOORD", 0, 1, RenderFormat::R32G32_FLOAT, 0, sizeof(float) * 2));
|
||||
|
||||
std::unique_ptr<RenderShader> pixelShader = Test.device->createShader(PSBlob, PSBlobSize, "PSMain", shaderFormat);
|
||||
std::unique_ptr<RenderShader> vertexShader = Test.device->createShader(VSBlob, VSBlobSize, "VSMain", shaderFormat);
|
||||
|
||||
RenderGraphicsPipelineDesc graphicsDesc;
|
||||
graphicsDesc.inputSlots = &Test.inputSlot;
|
||||
graphicsDesc.inputSlotsCount = 1;
|
||||
graphicsDesc.inputElements = inputElements.data();
|
||||
graphicsDesc.inputElementsCount = uint32_t(inputElements.size());
|
||||
graphicsDesc.pipelineLayout = Test.rasterPipelineLayout.get();
|
||||
graphicsDesc.pixelShader = pixelShader.get();
|
||||
graphicsDesc.vertexShader = vertexShader.get();
|
||||
graphicsDesc.renderTargetFormat[0] = Test.ColorFormat;
|
||||
graphicsDesc.renderTargetBlend[0] = RenderBlendDesc::Copy();
|
||||
graphicsDesc.depthTargetFormat = Test.DepthFormat;
|
||||
graphicsDesc.renderTargetCount = 1;
|
||||
graphicsDesc.multisampling.sampleCount = Test.MSAACount;
|
||||
Test.rasterPipeline = Test.device->createGraphicsPipeline(graphicsDesc);
|
||||
|
||||
Test.postSampler = Test.device->createSampler(RenderSamplerDesc());
|
||||
const RenderSampler *postSamplerPtr = Test.postSampler.get();
|
||||
|
||||
// Create the post processing pipeline
|
||||
std::vector<RenderDescriptorRange> postDescriptorRanges = {
|
||||
RenderDescriptorRange(RenderDescriptorRangeType::TEXTURE, 1, 1),
|
||||
RenderDescriptorRange(RenderDescriptorRangeType::SAMPLER, 2, 1, &postSamplerPtr)
|
||||
};
|
||||
|
||||
RenderDescriptorSetDesc postDescriptorSetDesc(postDescriptorRanges.data(), uint32_t(postDescriptorRanges.size()));
|
||||
Test.postSet = Test.device->createDescriptorSet(postDescriptorSetDesc);
|
||||
Test.postPipelineLayout = Test.device->createPipelineLayout(RenderPipelineLayoutDesc(nullptr, 0, &postDescriptorSetDesc, 1, false, true));
|
||||
|
||||
inputElements.clear();
|
||||
inputElements.emplace_back(RenderInputElement("POSITION", 0, 0, RenderFormat::R32G32_FLOAT, 0, 0));
|
||||
|
||||
std::unique_ptr<RenderShader> postPixelShader = Test.device->createShader(PostPSBlob, PostPSBlobSize, "PSMain", shaderFormat);
|
||||
std::unique_ptr<RenderShader> postVertexShader = Test.device->createShader(PostVSBlob, PostVSBlobSize, "VSMain", shaderFormat);
|
||||
|
||||
RenderGraphicsPipelineDesc postDesc;
|
||||
postDesc.inputSlots = nullptr;
|
||||
postDesc.inputSlotsCount = 0;
|
||||
postDesc.inputElements = nullptr;
|
||||
postDesc.inputElementsCount = 0;
|
||||
postDesc.pipelineLayout = Test.postPipelineLayout.get();
|
||||
postDesc.pixelShader = postPixelShader.get();
|
||||
postDesc.vertexShader = postVertexShader.get();
|
||||
postDesc.renderTargetFormat[0] = Test.SwapchainFormat;
|
||||
postDesc.renderTargetBlend[0] = RenderBlendDesc::Copy();
|
||||
postDesc.renderTargetCount = 1;
|
||||
Test.postPipeline = Test.device->createGraphicsPipeline(postDesc);
|
||||
|
||||
# if ENABLE_TEXTURE
|
||||
// Upload a texture.
|
||||
const uint32_t Width = 512;
|
||||
const uint32_t Height = 512;
|
||||
const uint32_t RowLength = Width;
|
||||
const RenderFormat Format = RenderFormat::R8G8B8A8_UNORM;
|
||||
const uint32_t BufferSize = RowLength * Height * RenderFormatSize(Format);
|
||||
Test.uploadBuffer = Test.device->createBuffer(RenderBufferDesc::UploadBuffer(BufferSize));
|
||||
Test.blueNoiseTexture = Test.device->createTexture(RenderTextureDesc::Texture2D(Width, Height, 1, Format));
|
||||
Test.rasterSet->setTexture(Test.rasterSet->gTextures + 2, Test.blueNoiseTexture.get(), RenderTextureLayout::SHADER_READ);
|
||||
|
||||
// Copy to upload buffer.
|
||||
void *bufferData = Test.uploadBuffer->map();
|
||||
memcpy(bufferData, LDR_64_64_64_RGB1_BGRA8, BufferSize);
|
||||
Test.uploadBuffer->unmap();
|
||||
|
||||
// Run command list to copy the upload buffer to the texture.
|
||||
Test.commandList->begin();
|
||||
Test.commandList->barriers(RenderBarrierStage::COPY,
|
||||
RenderBufferBarrier(Test.uploadBuffer.get(), RenderBufferAccess::READ),
|
||||
RenderTextureBarrier(Test.blueNoiseTexture.get(), RenderTextureLayout::COPY_DEST)
|
||||
);
|
||||
|
||||
Test.commandList->copyTextureRegion(
|
||||
RenderTextureCopyLocation::Subresource(Test.blueNoiseTexture.get()),
|
||||
RenderTextureCopyLocation::PlacedFootprint(Test.uploadBuffer.get(), Format, Width, Height, 1, RowLength));
|
||||
|
||||
Test.commandList->barriers(RenderBarrierStage::GRAPHICS_AND_COMPUTE, RenderTextureBarrier(Test.blueNoiseTexture.get(), RenderTextureLayout::SHADER_READ));
|
||||
Test.commandList->end();
|
||||
Test.commandQueue->executeCommandLists(Test.commandList.get(), Test.commandFence.get());
|
||||
Test.commandQueue->waitForCommandFence(Test.commandFence.get());
|
||||
# endif
|
||||
|
||||
Test.vertexBuffer = Test.device->createBuffer(RenderBufferDesc::VertexBuffer(sizeof(Vertices), RenderHeapType::UPLOAD));
|
||||
void *dstData = Test.vertexBuffer->map();
|
||||
memcpy(dstData, Vertices, sizeof(Vertices));
|
||||
Test.vertexBuffer->unmap();
|
||||
Test.vertexBufferView = RenderVertexBufferView(Test.vertexBuffer.get(), sizeof(Vertices));
|
||||
|
||||
Test.indexBuffer = Test.device->createBuffer(RenderBufferDesc::IndexBuffer(sizeof(Indices), RenderHeapType::UPLOAD));
|
||||
dstData = Test.indexBuffer->map();
|
||||
memcpy(dstData, Indices, sizeof(Indices));
|
||||
Test.indexBuffer->unmap();
|
||||
Test.indexBufferView = RenderIndexBufferView(Test.indexBuffer.get(), sizeof(Indices), RenderFormat::R32_UINT);
|
||||
# endif
|
||||
|
||||
# if ENABLE_COMPUTE
|
||||
Test.computeFirstSet = std::make_unique<ComputeDescriptorFirstSet>(Test.device.get());
|
||||
Test.computeSecondSet = std::make_unique<ComputeDescriptorSecondSet>(Test.device.get());
|
||||
Test.computeFirstSet->setTexture(Test.computeFirstSet->gBlueNoiseTexture, Test.blueNoiseTexture.get(), RenderTextureLayout::SHADER_READ);
|
||||
|
||||
layoutBuilder.begin();
|
||||
layoutBuilder.addPushConstant(0, 0, sizeof(ComputePushConstant), RenderShaderStageFlag::COMPUTE);
|
||||
layoutBuilder.addDescriptorSet(Test.computeFirstSet->builder);
|
||||
layoutBuilder.addDescriptorSet(Test.computeSecondSet->builder);
|
||||
layoutBuilder.end();
|
||||
|
||||
Test.computePipelineLayout = layoutBuilder.create(Test.device.get());
|
||||
|
||||
std::unique_ptr<RenderShader> computeShader = Test.device->createShader(CSBlob, CSBlobSize, "CSMain", shaderFormat);
|
||||
RenderComputePipelineDesc computeDesc;
|
||||
computeDesc.computeShader = computeShader.get();
|
||||
computeDesc.pipelineLayout = Test.computePipelineLayout.get();
|
||||
Test.computePipeline = Test.device->createComputePipeline(computeDesc);
|
||||
# endif
|
||||
|
||||
# if ENABLE_RT
|
||||
Test.rtSet = std::make_unique<RaytracingDescriptorSet>(Test.device.get());
|
||||
|
||||
layoutBuilder.begin(true);
|
||||
layoutBuilder.addDescriptorSet(Test.rtSet->builder);
|
||||
layoutBuilder.end();
|
||||
|
||||
Test.rtPipelineLayout = layoutBuilder.create(Test.device.get());
|
||||
|
||||
struct BufferParams {
|
||||
float rgbMultiplier[3];
|
||||
uint32_t pad[3];
|
||||
};
|
||||
|
||||
BufferParams paramsToUpload[2];
|
||||
paramsToUpload[0].rgbMultiplier[0] = 1.0f;
|
||||
paramsToUpload[0].rgbMultiplier[1] = 0.25f;
|
||||
paramsToUpload[0].rgbMultiplier[2] = 0.25f;
|
||||
paramsToUpload[1].rgbMultiplier[0] = 0.25f;
|
||||
paramsToUpload[1].rgbMultiplier[1] = 1.0f;
|
||||
paramsToUpload[1].rgbMultiplier[2] = 0.25f;
|
||||
|
||||
RenderBufferStructuredView paramsView(sizeof(BufferParams));
|
||||
Test.rtParamsBuffer = Test.device->createBuffer(RenderBufferDesc::UploadBuffer(sizeof(paramsToUpload), RenderBufferFlag::STORAGE));
|
||||
Test.rtSet->setBuffer(Test.rtSet->gBufferParams, Test.rtParamsBuffer.get(), sizeof(paramsToUpload), ¶msView);
|
||||
dstData = Test.rtParamsBuffer->map();
|
||||
memcpy(dstData, paramsToUpload, sizeof(paramsToUpload));
|
||||
Test.rtParamsBuffer->unmap();
|
||||
|
||||
RenderRaytracingPipelineLibrarySymbol rtLibrarySymbols[] = {
|
||||
RenderRaytracingPipelineLibrarySymbol("ColorRayGen", RenderRaytracingPipelineLibrarySymbolType::RAYGEN),
|
||||
RenderRaytracingPipelineLibrarySymbol("ColorClosestHit", RenderRaytracingPipelineLibrarySymbolType::CLOSEST_HIT),
|
||||
RenderRaytracingPipelineLibrarySymbol("ColorMiss", RenderRaytracingPipelineLibrarySymbolType::MISS)
|
||||
};
|
||||
|
||||
std::unique_ptr<RenderShader> rtShader = Test.device->createShader(RTBlob, RTBlobSize, nullptr, shaderFormat);
|
||||
RenderRaytracingPipelineLibrary rtLibrary(rtShader.get(), rtLibrarySymbols, uint32_t(std::size(rtLibrarySymbols)));
|
||||
RenderRaytracingPipelineHitGroup rtHitGroup("ColorHitGroup", "ColorClosestHit");
|
||||
RenderRaytracingPipelineDesc rtPsoDesc;
|
||||
rtPsoDesc.libraries = &rtLibrary;
|
||||
rtPsoDesc.librariesCount = 1;
|
||||
rtPsoDesc.hitGroups = &rtHitGroup;
|
||||
rtPsoDesc.hitGroupsCount = 1;
|
||||
rtPsoDesc.pipelineLayout = Test.rtPipelineLayout.get();
|
||||
rtPsoDesc.maxPayloadSize = sizeof(float) * 4;
|
||||
Test.rtPipeline = Test.device->createRaytracingPipeline(rtPsoDesc);
|
||||
|
||||
// Create RT BVH.
|
||||
const float BLASVertices[] = {
|
||||
0.25f, 0.25f, 1.0f,
|
||||
0.75f, 0.25f, 1.0f,
|
||||
0.5f, 0.75f, 1.0f
|
||||
};
|
||||
|
||||
dstData = Test.uploadBuffer->map();
|
||||
memcpy(dstData, BLASVertices, sizeof(BLASVertices));
|
||||
Test.uploadBuffer->unmap();
|
||||
|
||||
Test.rtVertexBuffer = Test.device->createBuffer(RenderBufferDesc::VertexBuffer(sizeof(BLASVertices), RenderHeapType::DEFAULT, RenderBufferFlag::ACCELERATION_STRUCTURE_INPUT));
|
||||
|
||||
RenderBottomLevelASMesh blasMesh;
|
||||
blasMesh.vertexBuffer = Test.rtVertexBuffer.get();
|
||||
blasMesh.vertexFormat = RenderFormat::R32G32B32_FLOAT;
|
||||
blasMesh.vertexCount = 3;
|
||||
blasMesh.vertexStride = sizeof(float) * 3;
|
||||
blasMesh.isOpaque = true;
|
||||
|
||||
RenderBottomLevelASBuildInfo blasBuildInfo;
|
||||
Test.device->setBottomLevelASBuildInfo(blasBuildInfo, &blasMesh, 1);
|
||||
|
||||
Test.rtBottomLevelASBuffer = Test.device->createBuffer(RenderBufferDesc::AccelerationStructureBuffer(blasBuildInfo.accelerationStructureSize));
|
||||
Test.rtBottomLevelAS = Test.device->createAccelerationStructure(RenderAccelerationStructureDesc(RenderAccelerationStructureType::BOTTOM_LEVEL, Test.rtBottomLevelASBuffer.get(), blasBuildInfo.accelerationStructureSize));
|
||||
|
||||
RenderTopLevelASInstance tlasInstance;
|
||||
tlasInstance.bottomLevelAS = Test.rtBottomLevelASBuffer.get();
|
||||
tlasInstance.instanceMask = 0xFF;
|
||||
tlasInstance.cullDisable = true;
|
||||
|
||||
RenderTopLevelASBuildInfo tlasBuildInfo;
|
||||
Test.device->setTopLevelASBuildInfo(tlasBuildInfo, &tlasInstance, 1);
|
||||
|
||||
Test.rtInstancesBuffer = Test.device->createBuffer(RenderBufferDesc::UploadBuffer(tlasBuildInfo.instancesBufferData.size(), RenderBufferFlag::ACCELERATION_STRUCTURE_INPUT));
|
||||
dstData = Test.rtInstancesBuffer->map();
|
||||
memcpy(dstData, tlasBuildInfo.instancesBufferData.data(), tlasBuildInfo.instancesBufferData.size());
|
||||
Test.rtInstancesBuffer->unmap();
|
||||
|
||||
Test.rtScratchBuffer = Test.device->createBuffer(RenderBufferDesc::DefaultBuffer(std::max(blasBuildInfo.scratchSize, tlasBuildInfo.scratchSize), RenderBufferFlag::ACCELERATION_STRUCTURE_SCRATCH));
|
||||
Test.rtTopLevelASBuffer = Test.device->createBuffer(RenderBufferDesc::AccelerationStructureBuffer(tlasBuildInfo.accelerationStructureSize));
|
||||
Test.rtTopLevelAS = Test.device->createAccelerationStructure(RenderAccelerationStructureDesc(RenderAccelerationStructureType::TOP_LEVEL, Test.rtTopLevelASBuffer.get(), tlasBuildInfo.accelerationStructureSize));
|
||||
Test.rtSet->setAccelerationStructure(Test.rtSet->gBVH, Test.rtTopLevelAS.get());
|
||||
|
||||
RenderShaderBindingGroups bindingGroups;
|
||||
RenderPipelineProgram rayGenProgram = Test.rtPipeline->getProgram("ColorRayGen");
|
||||
RenderPipelineProgram missProgram = Test.rtPipeline->getProgram("ColorMiss");
|
||||
RenderPipelineProgram hitGroupProgram = Test.rtPipeline->getProgram("ColorHitGroup");
|
||||
bindingGroups.rayGen = RenderShaderBindingGroup(&rayGenProgram, 1);
|
||||
bindingGroups.miss = RenderShaderBindingGroup(&missProgram, 1);
|
||||
bindingGroups.hitGroup = RenderShaderBindingGroup(&hitGroupProgram, 1);
|
||||
|
||||
RenderDescriptorSet *rtSetPtr = Test.rtSet->get();
|
||||
Test.device->setShaderBindingTableInfo(Test.rtShaderBindingTableInfo, bindingGroups, Test.rtPipeline.get(), &rtSetPtr, 1);
|
||||
|
||||
const std::vector<uint8_t> tableData = Test.rtShaderBindingTableInfo.tableBufferData;
|
||||
Test.rtShaderBindingTableBuffer = Test.device->createBuffer(RenderBufferDesc::UploadBuffer(tableData.size(), RenderBufferFlag::SHADER_BINDING_TABLE));
|
||||
dstData = Test.rtShaderBindingTableBuffer->map();
|
||||
memcpy(dstData, tableData.data(), tableData.size());
|
||||
Test.rtShaderBindingTableBuffer->unmap();
|
||||
|
||||
// Run command list to copy the vertex buffer and build the BLAS/TLAS.
|
||||
Test.commandList->begin();
|
||||
Test.commandList->barriers(RenderBarrierStage::COPY, RenderBufferBarrier(Test.rtVertexBuffer.get(), RenderBufferAccess::WRITE));
|
||||
Test.commandList->copyBufferRegion(Test.rtVertexBuffer.get(), Test.uploadBuffer.get(), sizeof(BLASVertices));
|
||||
Test.commandList->barriers(RenderBarrierStage::COMPUTE, RenderBufferBarrier(Test.rtVertexBuffer.get(), RenderBufferAccess::READ));
|
||||
Test.commandList->buildBottomLevelAS(Test.rtBottomLevelAS.get(), Test.rtScratchBuffer.get(), blasBuildInfo);
|
||||
Test.commandList->barriers(RenderBarrierStage::NONE, RenderBufferBarrier(Test.rtBottomLevelASBuffer.get(), RenderBufferAccess::READ));
|
||||
Test.commandList->buildTopLevelAS(Test.rtTopLevelAS.get(), Test.rtScratchBuffer.get(), Test.rtInstancesBuffer.get(), tlasBuildInfo);
|
||||
Test.commandList->end();
|
||||
Test.commandQueue->executeCommandLists(Test.commandList.get(), Test.commandFence.get());
|
||||
Test.commandQueue->waitForCommandFence(Test.commandFence.get());
|
||||
# endif
|
||||
}
|
||||
|
||||
void TestResize() {
|
||||
// Resize can be called during window creation by Windows.
|
||||
if (Test.swapChain == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
# if ENABLE_SWAP_CHAIN
|
||||
Test.swapFramebuffers.clear();
|
||||
Test.swapChain->resize();
|
||||
Test.swapFramebuffers.resize(Test.swapChain->getTextureCount());
|
||||
for (uint32_t i = 0; i < Test.swapChain->getTextureCount(); i++) {
|
||||
const RenderTexture *curTex = Test.swapChain->getTexture(i);
|
||||
Test.swapFramebuffers[i] = Test.device->createFramebuffer(RenderFramebufferDesc{&curTex, 1});
|
||||
}
|
||||
# endif
|
||||
# if ENABLE_CLEAR
|
||||
Test.colorTargetMS = Test.device->createTexture(RenderTextureDesc::ColorTarget(Test.swapChain->getWidth(), Test.swapChain->getHeight(), Test.ColorFormat, RenderMultisampling(Test.MSAACount), nullptr));
|
||||
Test.colorTargetResolved = Test.device->createTexture(RenderTextureDesc::ColorTarget(Test.swapChain->getWidth(), Test.swapChain->getHeight(), Test.ColorFormat, 1, nullptr, RenderTextureFlag::STORAGE | RenderTextureFlag::UNORDERED_ACCESS));
|
||||
Test.depthTarget = Test.device->createTexture(RenderTextureDesc::DepthTarget(Test.swapChain->getWidth(), Test.swapChain->getHeight(), Test.DepthFormat, RenderMultisampling(Test.MSAACount)));
|
||||
|
||||
const RenderTexture *colorTargetPtr = Test.colorTargetMS.get();
|
||||
Test.framebuffer = Test.device->createFramebuffer(RenderFramebufferDesc(&colorTargetPtr, 1, Test.depthTarget.get()));
|
||||
# endif
|
||||
# if ENABLE_COMPUTE
|
||||
Test.computeSecondSet->setTexture(Test.computeSecondSet->gTarget, Test.colorTarget.get(), RenderTextureLayout::GENERAL);
|
||||
# endif
|
||||
# if ENABLE_RT
|
||||
Test.rtSet->setTexture(Test.rtSet->gOutput, Test.colorTarget.get(), RenderTextureLayout::GENERAL);
|
||||
# endif
|
||||
}
|
||||
|
||||
void TestDraw() {
|
||||
// Begin.
|
||||
Test.commandList->begin();
|
||||
# if ENABLE_CLEAR
|
||||
const uint32_t SyncInterval = 1;
|
||||
const uint32_t width = Test.swapChain->getWidth();
|
||||
const uint32_t height = Test.swapChain->getHeight();
|
||||
const RenderViewport viewport(0.0f, 0.0f, float(width), float(height));
|
||||
const RenderRect scissor(0, 0, width, height);
|
||||
|
||||
// Clear.
|
||||
Test.commandList->setViewports(viewport);
|
||||
Test.commandList->setScissors(scissor);
|
||||
Test.commandList->barriers(RenderBarrierStage::GRAPHICS, RenderTextureBarrier(Test.colorTargetMS.get(), RenderTextureLayout::COLOR_WRITE));
|
||||
Test.commandList->barriers(RenderBarrierStage::GRAPHICS, RenderTextureBarrier(Test.depthTarget.get(), RenderTextureLayout::DEPTH_WRITE));
|
||||
Test.commandList->setFramebuffer(Test.framebuffer.get());
|
||||
Test.commandList->clearColor(0, RenderColor(0.0f, 0.0f, 0.5f));
|
||||
Test.commandList->clearDepth();
|
||||
# endif
|
||||
# if ENABLE_RASTER
|
||||
// Raster.
|
||||
RasterPushConstant pushConstant;
|
||||
pushConstant.colorAdd[0] = 0.5f;
|
||||
pushConstant.colorAdd[1] = 0.25f;
|
||||
pushConstant.colorAdd[2] = 0.0f;
|
||||
pushConstant.colorAdd[3] = 0.0f;
|
||||
pushConstant.textureIndex = 2;
|
||||
Test.commandList->setPipeline(Test.rasterPipeline.get());
|
||||
Test.commandList->setGraphicsPipelineLayout(Test.rasterPipelineLayout.get());
|
||||
Test.commandList->setGraphicsPushConstants(0, &pushConstant);
|
||||
# if ENABLE_TEXTURE
|
||||
Test.commandList->setGraphicsDescriptorSet(Test.rasterSet->get(), 0);
|
||||
# endif
|
||||
Test.commandList->setVertexBuffers(0, &Test.vertexBufferView, 1, &Test.inputSlot);
|
||||
Test.commandList->setIndexBuffer(&Test.indexBufferView);
|
||||
Test.commandList->drawInstanced(3, 1, 0, 0);
|
||||
Test.commandList->barriers(RenderBarrierStage::COPY, RenderTextureBarrier(Test.depthTarget.get(), RenderTextureLayout::DEPTH_READ));
|
||||
# endif
|
||||
# if ENABLE_COMPUTE || ENABLE_RT || ENABLE_CLEAR
|
||||
Test.commandList->barriers(RenderBarrierStage::COPY, RenderTextureBarrier(Test.colorTargetMS.get(), RenderTextureLayout::RESOLVE_SOURCE));
|
||||
Test.commandList->barriers(RenderBarrierStage::COPY, RenderTextureBarrier(Test.colorTargetResolved.get(), RenderTextureLayout::RESOLVE_DEST));
|
||||
Test.commandList->resolveTexture(Test.colorTargetResolved.get(), Test.colorTargetMS.get());
|
||||
# endif
|
||||
# if ENABLE_COMPUTE || ENABLE_RT
|
||||
Test.commandList->barriers(RenderBarrierStage::COMPUTE, RenderTextureBarrier(Test.colorTargetResolved.get(), RenderTextureLayout::GENERAL));
|
||||
# endif
|
||||
# if ENABLE_COMPUTE
|
||||
const uint32_t GroupCount = 8;
|
||||
ComputePushConstant pushCostant;
|
||||
pushCostant.Resolution[0] = width;
|
||||
pushCostant.Resolution[1] = height;
|
||||
pushCostant.Multiply[0] = 0.5f;
|
||||
pushCostant.Multiply[1] = 0.5f;
|
||||
pushCostant.Multiply[2] = 1.0f;
|
||||
pushCostant.Multiply[3] = 1.0f;
|
||||
Test.commandList->setPipeline(Test.computePipeline.get());
|
||||
Test.commandList->setComputePipelineLayout(Test.computePipelineLayout.get());
|
||||
Test.commandList->setComputePushConstants(0, &pushCostant);
|
||||
Test.commandList->setComputeDescriptorSet(Test.computeFirstSet->get(), 0);
|
||||
Test.commandList->setComputeDescriptorSet(Test.computeSecondSet->get(), 1);
|
||||
Test.commandList->dispatch((width + GroupCount - 1) / GroupCount, (height + GroupCount - 1) / GroupCount, 1);
|
||||
# endif
|
||||
# if ENABLE_RT
|
||||
// RT.
|
||||
Test.commandList->barriers(RenderBarrierStage::COMPUTE, RenderTextureBarrier(Test.colorTargetResolved.get(), RenderTextureLayout::GENERAL));
|
||||
Test.commandList->setPipeline(Test.rtPipeline.get());
|
||||
Test.commandList->setRaytracingPipelineLayout(Test.rtPipelineLayout.get());
|
||||
Test.commandList->setRaytracingDescriptorSet(Test.rtSet->get(), 0);
|
||||
Test.commandList->traceRays(width, height, 1, Test.rtShaderBindingTableBuffer.get(), Test.rtShaderBindingTableInfo.groups);
|
||||
# endif
|
||||
# if ENABLE_SWAP_CHAIN
|
||||
const uint32_t swapChainTextureIndex = Test.swapChain->getTextureIndex();
|
||||
RenderTexture *swapChainTexture = Test.swapChain->getTexture(swapChainTextureIndex);
|
||||
RenderFramebuffer *swapFramebuffer = Test.swapFramebuffers[swapChainTextureIndex].get();
|
||||
Test.commandList->setViewports(viewport);
|
||||
Test.commandList->setScissors(scissor);
|
||||
Test.commandList->barriers(RenderBarrierStage::GRAPHICS, RenderTextureBarrier(swapChainTexture, RenderTextureLayout::COLOR_WRITE));
|
||||
Test.commandList->setFramebuffer(swapFramebuffer);
|
||||
# endif
|
||||
# if ENABLE_CLEAR
|
||||
Test.commandList->barriers(RenderBarrierStage::GRAPHICS, RenderTextureBarrier(Test.colorTargetResolved.get(), RenderTextureLayout::SHADER_READ));
|
||||
Test.commandList->clearColor(0, RenderColor(0.0f, 0.0f, 0.0f));
|
||||
Test.commandList->setPipeline(Test.postPipeline.get());
|
||||
Test.commandList->setGraphicsPipelineLayout(Test.postPipelineLayout.get());
|
||||
Test.postSet->setTexture(0, Test.colorTargetResolved.get(), RenderTextureLayout::SHADER_READ);
|
||||
Test.commandList->setGraphicsDescriptorSet(Test.postSet.get(), 0);
|
||||
Test.commandList->drawInstanced(3, 1, 0, 0);
|
||||
# endif
|
||||
# if ENABLE_SWAP_CHAIN
|
||||
Test.commandList->barriers(RenderBarrierStage::NONE, RenderTextureBarrier(swapChainTexture, RenderTextureLayout::PRESENT));
|
||||
# endif
|
||||
// End.
|
||||
Test.commandList->end();
|
||||
Test.commandQueue->executeCommandLists(Test.commandList.get(), Test.commandFence.get());
|
||||
# if ENABLE_SWAP_CHAIN
|
||||
Test.swapChain->present();
|
||||
# endif
|
||||
Test.commandQueue->waitForCommandFence(Test.commandFence.get());
|
||||
}
|
||||
|
||||
void TestShutdown() {
|
||||
Test.rtParamsBuffer.reset(nullptr);
|
||||
Test.rtVertexBuffer.reset(nullptr);
|
||||
Test.rtScratchBuffer.reset(nullptr);
|
||||
Test.rtInstancesBuffer.reset(nullptr);
|
||||
Test.rtBottomLevelASBuffer.reset(nullptr);
|
||||
Test.rtTopLevelASBuffer.reset(nullptr);
|
||||
Test.rtShaderBindingTableBuffer.reset(nullptr);
|
||||
Test.uploadBuffer.reset(nullptr);
|
||||
Test.blueNoiseTexture.reset(nullptr);
|
||||
Test.vertexBuffer.reset(nullptr);
|
||||
Test.indexBuffer.reset(nullptr);
|
||||
Test.rasterPipeline.reset(nullptr);
|
||||
Test.computePipeline.reset(nullptr);
|
||||
Test.rtPipeline.reset(nullptr);
|
||||
Test.postPipeline.reset(nullptr);
|
||||
Test.rasterPipelineLayout.reset(nullptr);
|
||||
Test.computePipelineLayout.reset(nullptr);
|
||||
Test.rtPipelineLayout.reset(nullptr);
|
||||
Test.postPipelineLayout.reset(nullptr);
|
||||
Test.rtSet.reset(nullptr);
|
||||
Test.rasterSet.reset(nullptr);
|
||||
Test.computeFirstSet.reset(nullptr);
|
||||
Test.computeSecondSet.reset(nullptr);
|
||||
Test.postSet.reset(nullptr);
|
||||
Test.linearSampler.reset(nullptr);
|
||||
Test.postSampler.reset(nullptr);
|
||||
Test.colorTargetMS.reset(nullptr);
|
||||
Test.colorTargetResolved.reset(nullptr);
|
||||
Test.framebuffer.reset(nullptr);
|
||||
Test.swapFramebuffers.clear();
|
||||
Test.commandList.reset(nullptr);
|
||||
Test.commandFence.reset(nullptr);
|
||||
Test.swapChain.reset(nullptr);
|
||||
Test.commandQueue.reset(nullptr);
|
||||
Test.device.reset(nullptr);
|
||||
}
|
||||
|
||||
#if defined(_WIN64)
|
||||
static LRESULT CALLBACK TestWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
switch (message) {
|
||||
case WM_CLOSE:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
case WM_SIZE:
|
||||
TestResize();
|
||||
return 0;
|
||||
case WM_PAINT:
|
||||
TestDraw();
|
||||
return 0;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static HWND TestCreateWindow() {
|
||||
// Register window class.
|
||||
WNDCLASS wc;
|
||||
memset(&wc, 0, sizeof(WNDCLASS));
|
||||
wc.lpfnWndProc = TestWndProc;
|
||||
wc.hInstance = GetModuleHandle(0);
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND);
|
||||
wc.lpszClassName = "RenderInterfaceTest";
|
||||
RegisterClass(&wc);
|
||||
|
||||
// Create window.
|
||||
const int Width = 1280;
|
||||
const int Height = 720;
|
||||
RECT rect;
|
||||
UINT dwStyle = WS_OVERLAPPEDWINDOW | WS_VISIBLE;
|
||||
rect.left = (GetSystemMetrics(SM_CXSCREEN) - Width) / 2;
|
||||
rect.top = (GetSystemMetrics(SM_CYSCREEN) - Height) / 2;
|
||||
rect.right = rect.left + Width;
|
||||
rect.bottom = rect.top + Height;
|
||||
AdjustWindowRectEx(&rect, dwStyle, 0, 0);
|
||||
|
||||
return CreateWindow(wc.lpszClassName, "Render Interface Test", dwStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 0, 0, wc.hInstance, NULL);
|
||||
}
|
||||
|
||||
void RenderInterfaceTest(RenderInterface *renderInterface) {
|
||||
HWND hwnd = TestCreateWindow();
|
||||
TestInitialize(renderInterface, hwnd);
|
||||
TestResize();
|
||||
|
||||
// Message loop.
|
||||
MSG msg = {};
|
||||
while (msg.message != WM_QUIT) {
|
||||
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
TestShutdown();
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
#elif defined(__ANDROID__)
|
||||
void RenderInterfaceTest(RenderInterface* renderInterface) {
|
||||
assert(false);
|
||||
}
|
||||
#elif defined(__linux__)
|
||||
void RenderInterfaceTest(RenderInterface* renderInterface) {
|
||||
Display* display = XOpenDisplay(nullptr);
|
||||
int blackColor = BlackPixel(display, DefaultScreen(display));
|
||||
Window window = XCreateSimpleWindow(display, DefaultRootWindow(display),
|
||||
0, 0, 1280, 720, 0, blackColor, blackColor);
|
||||
|
||||
|
||||
XSelectInput(display, window, StructureNotifyMask);
|
||||
// Map the window and wait for the notify event to come in.
|
||||
XMapWindow(display, window);
|
||||
while (true) {
|
||||
XEvent event;
|
||||
XNextEvent(display, &event);
|
||||
if (event.type == MapNotify) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Set up the delete window protocol.
|
||||
Atom wmDeleteMessage = XInternAtom(display, "WM_DELETE_WINDOW", False);
|
||||
XSetWMProtocols(display, window, &wmDeleteMessage, 1);
|
||||
|
||||
TestInitialize(renderInterface, {display, window});
|
||||
TestResize();
|
||||
TestDraw();
|
||||
|
||||
// Loop until the window is closed.
|
||||
std::chrono::system_clock::time_point prev_frame = std::chrono::system_clock::now();
|
||||
bool running = true;
|
||||
while (running) {
|
||||
if (XPending(display) > 0) {
|
||||
XEvent event;
|
||||
XNextEvent(display, &event);
|
||||
|
||||
switch (event.type) {
|
||||
case Expose:
|
||||
TestDraw();
|
||||
break;
|
||||
|
||||
case ClientMessage:
|
||||
if (event.xclient.data.l[0] == wmDeleteMessage)
|
||||
running = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
std::this_thread::sleep_for(1ms);
|
||||
auto now_time = std::chrono::system_clock::now();
|
||||
if (now_time - prev_frame > 16666us) {
|
||||
prev_frame = now_time;
|
||||
TestDraw();
|
||||
}
|
||||
}
|
||||
|
||||
TestShutdown();
|
||||
XDestroyWindow(display, window);
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
void RenderInterfaceTest(RenderInterface* renderInterface) {
|
||||
assert(false);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
struct Constants {
|
||||
float4 Multiply;
|
||||
uint2 Resolution;
|
||||
};
|
||||
|
||||
[[vk::push_constant]] ConstantBuffer<Constants> gConstants : register(b0);
|
||||
|
||||
Texture2D<float4> gBlueNoiseTexture : register(t1);
|
||||
SamplerState gSampler : register(s2);
|
||||
[[vk::image_format("rgba8")]]
|
||||
RWTexture2D<float4> gTarget : register(u16, space1);
|
||||
|
||||
[numthreads(8, 8, 1)]
|
||||
void CSMain(uint2 coord : SV_DispatchThreadID) {
|
||||
if (any(coord >= gConstants.Resolution)) {
|
||||
return;
|
||||
}
|
||||
|
||||
float2 blueNoiseUV = float2(coord) / float2(gConstants.Resolution);
|
||||
float4 blueNoise = float4(gBlueNoiseTexture.SampleLevel(gSampler, blueNoiseUV, 0).rgb, 1.0f);
|
||||
gTarget[coord] *= (blueNoise * gConstants.Multiply);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
struct Constants {
|
||||
float4 colorAdd;
|
||||
uint textureIndex;
|
||||
};
|
||||
|
||||
[[vk::push_constant]] ConstantBuffer<Constants> gConstants : register(b0);
|
||||
|
||||
SamplerState gSampler : register(s1);
|
||||
Texture2D<float4> gTexture[] : register(t2);
|
||||
|
||||
float4 PSMain(in float4 pos : SV_Position, in float2 uv : TEXCOORD) : SV_TARGET {
|
||||
float4 result = float4(gTexture[NonUniformResourceIndex(gConstants.textureIndex)].SampleLevel(gSampler, uv, 0).rgb, 1.0f);
|
||||
result += gConstants.colorAdd;
|
||||
return result;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
Texture2D<float4> gTexture : register(t1);
|
||||
SamplerState gSampler : register(s2);
|
||||
|
||||
float4 PSMain(in float4 pos : SV_Position, in float2 uv : TEXCOORD) : SV_TARGET {
|
||||
float4 result = float4(gTexture.SampleLevel(gSampler, uv, 0).rgb, 1.0f);
|
||||
return result;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
void VSMain(in uint id : SV_VertexID, out float4 pos : SV_Position, out float2 uv : TEXCOORD0) {
|
||||
uv.x = (id == 2) ? 2.0f : 0.0f;
|
||||
uv.y = (id == 1) ? 2.0f : 0.0f;
|
||||
pos = float4(uv * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f), 1.0f, 1.0f);
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
struct Attributes {
|
||||
float2 bary;
|
||||
};
|
||||
|
||||
struct Payload {
|
||||
float4 color;
|
||||
};
|
||||
|
||||
struct BufferParams {
|
||||
float3 rgbMultiplier;
|
||||
uint3 pad;
|
||||
};
|
||||
|
||||
RaytracingAccelerationStructure gBVH : register(t0);
|
||||
RWTexture2D<float4> gOutput : register(u1);
|
||||
StructuredBuffer<BufferParams> gBufferParams : register(t2);
|
||||
|
||||
[shader("raygeneration")]
|
||||
void ColorRayGen() {
|
||||
RayDesc ray;
|
||||
ray.Origin = float3(float2(DispatchRaysIndex().xy) / float2(DispatchRaysDimensions().xy), 0.0f);
|
||||
ray.Direction = float3(0.0f, 0.0f, 1.0f);
|
||||
ray.TMin = 1e-6f;
|
||||
ray.TMax = 1e6f;
|
||||
|
||||
Payload payload;
|
||||
payload.color = float4(0.0f, 0.5f, 0.0f, 1.0f);
|
||||
TraceRay(gBVH, RAY_FLAG_NONE, 0xFF, 0, 0, 0, ray, payload);
|
||||
gOutput[DispatchRaysIndex().xy] = payload.color;
|
||||
}
|
||||
|
||||
[shader("closesthit")]
|
||||
void ColorClosestHit(inout Payload payload, in Attributes attr) {
|
||||
payload.color = float4(1.0f, attr.bary.xy, 1.0f) * float4(gBufferParams[0].rgbMultiplier, 1.0f);
|
||||
}
|
||||
|
||||
[shader("miss")]
|
||||
void ColorMiss(inout Payload payload) {
|
||||
payload.color = float4(0.25f, 0.25f, 0.5f, 1.0f) * float4(gBufferParams[1].rgbMultiplier, 1.0f);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
void VSMain(in float2 vertexPos : POSITION, in float2 vertexUV : TEXCOORD, out float4 pos : SV_POSITION, out float2 uv : TEXCOORD) {
|
||||
pos = float4(vertexPos, 1.0f, 1.0f);
|
||||
uv = vertexUV;
|
||||
}
|
||||
-518
@@ -1,518 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#ifndef RT64_EXTENDED_GBI
|
||||
#define RT64_EXTENDED_GBI
|
||||
|
||||
// G_SPNOOP on F3D and F3DEX2.
|
||||
#ifdef F3DEX_GBI_2
|
||||
# define RT64_HOOK_OPCODE 0xE0
|
||||
#else
|
||||
# define RT64_HOOK_OPCODE 0x00
|
||||
#endif
|
||||
|
||||
#define RT64_HOOK_OP_GETVERSION 0x0
|
||||
#define RT64_HOOK_OP_ENABLE 0x1
|
||||
#define RT64_HOOK_OP_DISABLE 0x2
|
||||
#define RT64_HOOK_OP_DL 0x3
|
||||
#define RT64_HOOK_OP_BRANCH 0x4
|
||||
|
||||
// 0x5254 for ASCII "RT" followed by 0x64.
|
||||
#define RT64_HOOK_MAGIC_NUMBER 0x525464
|
||||
|
||||
#ifndef RT64_EXTENDED_OPCODE
|
||||
// TODO: Define defaults here based on the GBI.
|
||||
# define RT64_EXTENDED_OPCODE 0x64
|
||||
#endif
|
||||
|
||||
#define G_EX_VERSION 0x1
|
||||
|
||||
#define G_EX_NOOP 0x000000
|
||||
#define G_EX_PRINT 0x000001
|
||||
#define G_EX_TEXRECT_V1 0x000002
|
||||
#define G_EX_FILLRECT_V1 0x000003
|
||||
#define G_EX_SETVIEWPORT_V1 0x000004
|
||||
#define G_EX_SETSCISSOR_V1 0x000005
|
||||
#define G_EX_SETRECTALIGN_V1 0x000006
|
||||
#define G_EX_SETVIEWPORTALIGN_V1 0x000007
|
||||
#define G_EX_SETSCISSORALIGN_V1 0x000008
|
||||
#define G_EX_SETREFRESHRATE_V1 0x000009
|
||||
#define G_EX_VERTEXZTEST_V1 0x00000A
|
||||
#define G_EX_ENDVERTEXZTEST_V1 0x00000B
|
||||
#define G_EX_MATRIXGROUP_V1 0x00000C
|
||||
#define G_EX_POPMATRIXGROUP_V1 0x00000D
|
||||
#define G_EX_FORCEUPSCALE2D_V1 0x00000E
|
||||
#define G_EX_FORCETRUEBILERP_V1 0x00000F
|
||||
#define G_EX_FORCESCALELOD_V1 0x000010
|
||||
#define G_EX_FORCEBRANCH_V1 0x000011
|
||||
#define G_EX_SETRENDERTORAM_V1 0x000012
|
||||
#define G_EX_EDITGROUPBYADDRESS_V1 0x000013
|
||||
#define G_EX_VERTEX_V1 0x000014
|
||||
#define G_EX_PUSHVIEWPORT_V1 0x000015
|
||||
#define G_EX_POPVIEWPORT_V1 0x000016
|
||||
#define G_EX_PUSHSCISSOR_V1 0x000017
|
||||
#define G_EX_POPSCISSOR_V1 0x000018
|
||||
#define G_EX_PUSHOTHERMODE_V1 0x000019
|
||||
#define G_EX_POPOTHERMODE_V1 0x00001A
|
||||
#define G_EX_PUSHCOMBINE_V1 0x00001B
|
||||
#define G_EX_POPCOMBINE_V1 0x00001C
|
||||
#define G_EX_PUSHPROJMATRIX_V1 0x00001D
|
||||
#define G_EX_POPPROJMATRIX_V1 0x00001E
|
||||
#define G_EX_PUSHENVCOLOR_V1 0x00001F
|
||||
#define G_EX_POPENVCOLOR_V1 0x000020
|
||||
#define G_EX_PUSHBLENDCOLOR_V1 0x000021
|
||||
#define G_EX_POPBLENDCOLOR_V1 0x000022
|
||||
#define G_EX_PUSHFOGCOLOR_V1 0x000023
|
||||
#define G_EX_POPFOGCOLOR_V1 0x000024
|
||||
#define G_EX_PUSHFILLCOLOR_V1 0x000025
|
||||
#define G_EX_POPFILLCOLOR_V1 0x000026
|
||||
#define G_EX_PUSHPRIMCOLOR_V1 0x000027
|
||||
#define G_EX_POPPRIMCOLOR_V1 0x000028
|
||||
#define G_EX_PUSHGEOMETRYMODE_V1 0x000029
|
||||
#define G_EX_POPGEOMETRYMODE_V1 0x00002A
|
||||
#define G_EX_SETDITHERNOISESTRENGTH_V1 0x00002B
|
||||
#define G_EX_SETRDRAMEXTENDED_V1 0x00002C
|
||||
#define G_EX_MAX 0x00002D
|
||||
|
||||
#define G_EX_ORIGIN_NONE 0x800
|
||||
#define G_EX_ORIGIN_LEFT 0x0
|
||||
#define G_EX_ORIGIN_CENTER 0x200
|
||||
#define G_EX_ORIGIN_RIGHT 0x400
|
||||
|
||||
#define G_EX_NOPUSH 0x0
|
||||
#define G_EX_PUSH 0x1
|
||||
|
||||
#define G_EX_ID_IGNORE 0x0
|
||||
#define G_EX_ID_AUTO 0xFFFFFFFF
|
||||
|
||||
#define G_EX_COMPONENT_SKIP 0x0
|
||||
#define G_EX_COMPONENT_INTERPOLATE 0x1
|
||||
#define G_EX_COMPONENT_AUTO 0x2
|
||||
|
||||
#define G_EX_INTERPOLATE_SIMPLE 0x0
|
||||
#define G_EX_INTERPOLATE_DECOMPOSE 0x1
|
||||
|
||||
#define G_EX_ORDER_LINEAR 0x0
|
||||
#define G_EX_ORDER_AUTO 0x1
|
||||
|
||||
#define G_EX_EDIT_NONE 0x0
|
||||
#define G_EX_EDIT_ALLOW 0x1
|
||||
|
||||
#define G_EX_BILERP_NONE 0x0
|
||||
#define G_EX_BILERP_ONLY 0x1
|
||||
#define G_EX_BILERP_ALL 0x2
|
||||
|
||||
// Represents the 8-byte commands in the F3D microcode family
|
||||
typedef union {
|
||||
struct {
|
||||
unsigned word0;
|
||||
unsigned word1;
|
||||
} values;
|
||||
unsigned long long dummy; // Force to 8-byte alignment
|
||||
} GfxCommand;
|
||||
|
||||
typedef struct {
|
||||
short ob[3];
|
||||
unsigned short flag;
|
||||
short tc[2];
|
||||
unsigned char cn[4];
|
||||
short obp[3];
|
||||
} VertexEXColor;
|
||||
|
||||
typedef struct {
|
||||
short ob[3];
|
||||
unsigned short flag;
|
||||
short tc[2];
|
||||
signed char n[3];
|
||||
unsigned char a;
|
||||
short obp[3];
|
||||
} VertexEXNormal;
|
||||
|
||||
typedef union {
|
||||
VertexEXColor v;
|
||||
VertexEXNormal n;
|
||||
long long alignment[3];
|
||||
} VertexEX;
|
||||
|
||||
#define PARAM(value, bits, shift) \
|
||||
((unsigned) (((unsigned)(value) & ((1U << (bits)) - 1U)) << (shift)))
|
||||
|
||||
#define DOWHILE(code) \
|
||||
do { code } while (0)
|
||||
|
||||
#define G_EX_WRITECOMMAND(cmd, _word0, _word1) \
|
||||
{ \
|
||||
cmd->values.word0 = _word0; \
|
||||
cmd->values.word1 = _word1; \
|
||||
}
|
||||
|
||||
#define G_EX_COMMAND1(cmd, _word0, _word1) \
|
||||
DOWHILE( \
|
||||
GfxCommand *_cmd = (GfxCommand*)(cmd); \
|
||||
G_EX_WRITECOMMAND((_cmd + 0), _word0, _word1) \
|
||||
)
|
||||
|
||||
#define G_EX_COMMAND2(cmd, _word0, _word1, _word2, _word3) \
|
||||
DOWHILE( \
|
||||
GfxCommand *_cmd = (GfxCommand*)(cmd); \
|
||||
(void)(cmd); \
|
||||
G_EX_WRITECOMMAND((_cmd + 0), _word0, _word1) \
|
||||
G_EX_WRITECOMMAND((_cmd + 1), _word2, _word3) \
|
||||
)
|
||||
|
||||
#define G_EX_COMMAND3(cmd, _word0, _word1, _word2, _word3, _word4, _word5) \
|
||||
DOWHILE( \
|
||||
GfxCommand *_cmd = (GfxCommand*)(cmd); \
|
||||
(void)(cmd); \
|
||||
(void)(cmd); \
|
||||
G_EX_WRITECOMMAND((_cmd + 0), _word0, _word1) \
|
||||
G_EX_WRITECOMMAND((_cmd + 1), _word2, _word3) \
|
||||
G_EX_WRITECOMMAND((_cmd + 2), _word4, _word5) \
|
||||
)
|
||||
|
||||
#define G_EX_COMMAND4(cmd, _word0, _word1, _word2, _word3, _word4, _word5, _word6, _word7) \
|
||||
DOWHILE( \
|
||||
GfxCommand *_cmd = (GfxCommand*)(cmd); \
|
||||
(void)(cmd); \
|
||||
(void)(cmd); \
|
||||
(void)(cmd); \
|
||||
G_EX_WRITECOMMAND(cmd_, _word0, _word1) \
|
||||
G_EX_WRITECOMMAND(cmd_, _word2, _word3) \
|
||||
G_EX_WRITECOMMAND(cmd_, _word4, _word5) \
|
||||
G_EX_WRITECOMMAND(cmd_, _word6, _word7) \
|
||||
)
|
||||
|
||||
#define gEXGetVersion(cmd, ret) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_HOOK_OPCODE, 8, 24) | PARAM(RT64_HOOK_MAGIC_NUMBER, 24, 0), \
|
||||
PARAM(RT64_HOOK_OP_GETVERSION, 4, 28) | PARAM(ret, 28, 0))
|
||||
|
||||
#define gEXEnable(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_HOOK_OPCODE, 8, 24) | PARAM(RT64_HOOK_MAGIC_NUMBER, 24, 0), \
|
||||
PARAM(RT64_HOOK_OP_ENABLE, 4, 28) | PARAM(RT64_EXTENDED_OPCODE, 8, 0))
|
||||
|
||||
#define gEXDisable(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_HOOK_OPCODE, 8, 24) | PARAM(RT64_HOOK_MAGIC_NUMBER, 24, 0), \
|
||||
PARAM(RT64_HOOK_OP_DISABLE, 4, 28))
|
||||
|
||||
#define gEXBranchList(cmd, dlist) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_HOOK_OPCODE, 8, 24) | PARAM(RT64_HOOK_MAGIC_NUMBER, 24, 0), \
|
||||
PARAM(RT64_HOOK_OP_BRANCH, 4, 28) | PARAM(dlist, 28, 0))
|
||||
|
||||
#define gEXDisplayList(cmd, dlist) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_HOOK_OPCODE, 8, 24) | PARAM(RT64_HOOK_MAGIC_NUMBER, 24, 0), \
|
||||
PARAM(RT64_HOOK_OP_DL, 4, 28) | PARAM(dlist, 28, 0))
|
||||
|
||||
#define gEXNoOp(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_NOOP, 24, 0), \
|
||||
0)
|
||||
|
||||
#define gEXPrint(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PRINT, 24, 0), \
|
||||
0)
|
||||
|
||||
#define gEXTextureRectangle(cmd, lorigin, rorigin, ulx, uly, lrx, lry, tile, s, t, dsdx, dtdy) \
|
||||
G_EX_COMMAND3(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_TEXRECT_V1, 24, 0), \
|
||||
PARAM(tile, 3, 0) | PARAM(lorigin, 12, 3) | PARAM(rorigin, 12, 15) | PARAM(0, 5, 27), \
|
||||
\
|
||||
PARAM(ulx, 16, 16) | PARAM(uly, 16, 0), \
|
||||
PARAM(lrx, 16, 16) | PARAM(lry, 16, 0), \
|
||||
\
|
||||
PARAM(s, 16, 16) | PARAM(t, 16, 0), \
|
||||
PARAM(dsdx, 16, 16) | PARAM(dtdy, 16, 0) \
|
||||
)
|
||||
|
||||
#define gEXViewport(cmd, origin, vp) \
|
||||
G_EX_COMMAND2(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETVIEWPORT_V1, 24, 0), \
|
||||
PARAM(origin, 12, 0), \
|
||||
\
|
||||
0, \
|
||||
(unsigned)vp \
|
||||
)
|
||||
|
||||
#define gEXSetScissor(cmd, mode, lorigin, rorigin, ulx, uly, lrx, lry) \
|
||||
G_EX_COMMAND2(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETSCISSOR_V1, 24, 0), \
|
||||
PARAM(mode, 2, 0) | PARAM(lorigin, 12, 2) | PARAM(rorigin, 12, 14), \
|
||||
\
|
||||
PARAM((ulx) * 4, 16, 16) | PARAM((uly) * 4, 16, 0), \
|
||||
PARAM((lrx) * 4, 16, 16) | PARAM((lry) * 4, 16, 0) \
|
||||
)
|
||||
|
||||
#define gEXSetRectAlign(cmd, lorigin, rorigin, ulxOffset, ulyOffset, lrxOffset, lryOffset) \
|
||||
G_EX_COMMAND2(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETRECTALIGN_V1, 24, 0), \
|
||||
PARAM(lorigin, 12, 0) | PARAM(rorigin, 12, 12), \
|
||||
\
|
||||
PARAM((ulxOffset), 16, 16) | PARAM((ulyOffset), 16, 0), \
|
||||
PARAM((lrxOffset), 16, 16) | PARAM((lryOffset), 16, 0) \
|
||||
)
|
||||
|
||||
#define gEXSetViewportAlign(cmd, origin, xOffset, yOffset) \
|
||||
G_EX_COMMAND2(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETVIEWPORTALIGN_V1, 24, 0), \
|
||||
PARAM(origin, 12, 0), \
|
||||
\
|
||||
PARAM((xOffset), 16, 16) | PARAM((yOffset), 16, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXSetScissorAlign(cmd, lorigin, rorigin, ulxOffset, ulyOffset, lrxOffset, lryOffset, ulxBound, ulyBound, lrxBound, lryBound) \
|
||||
G_EX_COMMAND3(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETSCISSORALIGN_V1, 24, 0), \
|
||||
PARAM(lorigin, 12, 0) | PARAM(rorigin, 12, 12), \
|
||||
\
|
||||
PARAM((ulxOffset) * 4, 16, 16) | PARAM((ulyOffset) * 4, 16, 0), \
|
||||
PARAM((lrxOffset) * 4, 16, 16) | PARAM((lryOffset) * 4, 16, 0), \
|
||||
\
|
||||
PARAM((ulxBound) * 4, 16, 16) | PARAM((ulyBound) * 4, 16, 0), \
|
||||
PARAM((lrxBound) * 4, 16, 16) | PARAM((lryBound) * 4, 16, 0) \
|
||||
)
|
||||
|
||||
#define gEXSetRefreshRate(cmd, refresh_rate) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETREFRESHRATE_V1, 24, 0), \
|
||||
PARAM(refresh_rate, 16, 0) \
|
||||
)
|
||||
|
||||
#define gEXVertexZTest(cmd, vertex_index) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_VERTEXZTEST_V1, 24, 0), \
|
||||
PARAM(vertex_index, 8, 0) \
|
||||
)
|
||||
|
||||
#define gEXEndVertexZTest(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_ENDVERTEXZTEST_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXMatrixGroup(cmd, id, mode, push, proj, pos, rot, scale, skew, persp, vert, tile, order, edit) \
|
||||
G_EX_COMMAND2(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_MATRIXGROUP_V1, 24, 0), \
|
||||
id, \
|
||||
PARAM(push, 1, 0) | PARAM((proj) != 0, 1, 1) | PARAM(mode, 1, 2) | PARAM(pos, 2, 3) | PARAM(rot, 2, 5) | PARAM(scale, 2, 7) | PARAM(skew, 2, 9) | PARAM(persp, 2, 11) | PARAM(vert, 2, 13) | PARAM(tile, 2, 15) | PARAM(order, 2, 17) | PARAM(edit, 1, 19), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXMatrixGroupSimple(cmd, id, push, proj, pos, rot, persp, vert, tile, order, edit) \
|
||||
gEXMatrixGroup(cmd, id, G_EX_INTERPOLATE_SIMPLE, push, proj, pos, rot, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, persp, vert, tile, order, edit)
|
||||
|
||||
#define gEXMatrixGroupDecomposed(cmd, id, push, proj, pos, rot, scale, skew, persp, vert, tile, order, edit) \
|
||||
gEXMatrixGroup(cmd, id, G_EX_INTERPOLATE_DECOMPOSE, push, proj, pos, rot, scale, skew, persp, vert, tile, order, edit)
|
||||
|
||||
#define gEXMatrixGroupNoInterpolate(cmd, push, proj, edit) \
|
||||
gEXMatrixGroup(cmd, G_EX_ID_IGNORE, G_EX_INTERPOLATE_SIMPLE, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_ORDER_LINEAR, edit)
|
||||
|
||||
#define gEXPopMatrixGroup(cmd, proj) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPMATRIXGROUP_V1, 24, 0), \
|
||||
PARAM(1, 8, 0) | PARAM(proj, 1, 8) \
|
||||
)
|
||||
|
||||
#define gEXPopMatrixGroupN(cmd, proj, count) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPMATRIXGROUP_V1, 24, 0), \
|
||||
PARAM(count, 8, 0) | PARAM(proj, 1, 8) \
|
||||
)
|
||||
|
||||
#define gEXForceUpscale2D(cmd, force) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_FORCEUPSCALE2D_V1, 24, 0), \
|
||||
PARAM(force, 1, 0) \
|
||||
)
|
||||
|
||||
#define gEXForceTrueBilerp(cmd, mode) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_FORCETRUEBILERP_V1, 24, 0), \
|
||||
PARAM(mode, 2, 0) \
|
||||
)
|
||||
|
||||
#define gEXForceScaleLOD(cmd, force) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_FORCESCALELOD_V1, 24, 0), \
|
||||
PARAM(force, 1, 0) \
|
||||
)
|
||||
|
||||
#define gEXForceBranch(cmd, force) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_FORCEBRANCH_V1, 24, 0), \
|
||||
PARAM(force, 1, 0) \
|
||||
)
|
||||
|
||||
#define gEXSetRenderToRAM(cmd, render) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETRENDERTORAM_V1, 24, 0), \
|
||||
PARAM(render, 1, 0) \
|
||||
)
|
||||
|
||||
#define gEXEditGroupByAddress(cmd, address, mode, push, proj, pos, rot, scale, skew, persp, vert, tile, order) \
|
||||
G_EX_COMMAND2(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_EDITGROUPBYADDRESS_V1, 24, 0), \
|
||||
(unsigned)(address), \
|
||||
PARAM(push, 1, 0) | PARAM((proj) != 0, 1, 1) | PARAM(mode, 1, 2) | PARAM(pos, 2, 3) | PARAM(rot, 2, 5) | PARAM(scale, 2, 7) | PARAM(skew, 2, 9) | PARAM(persp, 2, 11) | PARAM(vert, 2, 13) | PARAM(tile, 2, 15) | PARAM(order, 2, 17) | PARAM(G_EX_EDIT_ALLOW, 1, 18), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXVertexV1(cmd, vtx, count, v0) \
|
||||
G_EX_COMMAND2(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_VERTEX_V1, 24, 0), \
|
||||
PARAM((v0)+(n), 7, 1) | PARAM(n, 8, 12), \
|
||||
0, \
|
||||
(unsigned)(vtx) \
|
||||
)
|
||||
|
||||
#define gEXPushViewport(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHVIEWPORT_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopViewport(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPVIEWPORT_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushScissor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHSCISSOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopScissor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPSCISSOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushOtherMode(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHOTHERMODE_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopOtherMode(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPOTHERMODE_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushCombineMode(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHCOMBINE_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopCombineMode(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPCOMBINE_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushProjectionMatrix(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHPROJMATRIX_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopProjectionMatrix(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPPROJMATRIX_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushEnvColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHENVCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopEnvColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPENVCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushBlendColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHBLENDCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopBlendColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPBLENDCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushFogColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHFOGCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopFogColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPFOGCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushFillColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHFILLCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopFillColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPFILLCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushPrimColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHPRIMCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopPrimColor(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPPRIMCOLOR_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPushGeometryMode(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_PUSHGEOMETRYMODE_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXPopGeometryMode(cmd) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_POPGEOMETRYMODE_V1, 24, 0), \
|
||||
0 \
|
||||
)
|
||||
|
||||
#define gEXSetDitherNoiseStrength(cmd, value) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETDITHERNOISESTRENGTH_V1, 24, 0), \
|
||||
PARAM((value) * 1024, 16, 0) \
|
||||
)
|
||||
|
||||
#define gEXSetRDRAMExtended(cmd, isExtended) \
|
||||
G_EX_COMMAND1(cmd, \
|
||||
PARAM(RT64_EXTENDED_OPCODE, 8, 24) | PARAM(G_EX_SETRDRAMEXTENDED_V1, 24, 0), \
|
||||
PARAM(isExtended, 1, 0) \
|
||||
)
|
||||
|
||||
#endif // RT64_EXTENDED_GBI
|
||||
@@ -1,65 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "m64p_common.h"
|
||||
#include "m64p_plugin.h"
|
||||
#include "m64p_types.h"
|
||||
|
||||
#include "rt64_api_common.h"
|
||||
|
||||
namespace RT64 {
|
||||
// Global container for the application.
|
||||
APIContainer API;
|
||||
};
|
||||
|
||||
DLLEXPORT void CALL ProcessRDPList(void) {
|
||||
const RT64::Application::Core &core = RT64::API.app->core;
|
||||
uint32_t &dpcStartReg = *core.DPC_START_REG;
|
||||
uint32_t &dpcCurReg = *core.DPC_CURRENT_REG;
|
||||
uint32_t &dpcEndReg = *core.DPC_END_REG;
|
||||
uint32_t &dpcStatusReg = *core.DPC_STATUS_REG;
|
||||
bool xbus = dpcStatusReg & DP_STATUS_XBUS_DMA;
|
||||
uint8_t *memory = xbus ? core.DMEM : core.RDRAM;
|
||||
|
||||
#ifdef LOG_PLUGIN_API_CALLS
|
||||
RT64_LOG_PRINTF("ProcessRDPList() 0x%08X", dpcCurReg);
|
||||
#endif
|
||||
|
||||
dpcStatusReg &= ~DP_STATUS_FREEZE;
|
||||
RT64::API.app->processDisplayLists(memory, dpcCurReg, dpcEndReg, false);
|
||||
|
||||
// Update registers to the end.
|
||||
dpcStartReg = dpcEndReg;
|
||||
dpcCurReg = dpcEndReg;
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL ProcessDList(void) {
|
||||
const RT64::Application::Core &core = RT64::API.app->core;
|
||||
const uint8_t *DMEM = core.DMEM;
|
||||
const OSTask_t *osTask = reinterpret_cast<const OSTask_t *>(&DMEM[0x0FC0]);
|
||||
#ifdef LOG_PLUGIN_API_CALLS
|
||||
RT64_LOG_PRINTF("ProcessDList() 0x%08X", osTask->data_ptr);
|
||||
#endif
|
||||
|
||||
RT64::API.app->state->rsp->reset();
|
||||
RT64::API.app->interpreter->loadUCodeGBI(osTask->ucode, osTask->ucode_data, true);
|
||||
RT64::API.app->processDisplayLists(core.RDRAM, osTask->data_ptr, 0, true);
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL UpdateScreen(void) {
|
||||
#ifdef LOG_PLUGIN_API_CALLS
|
||||
RT64_LOG_PRINTF("UpdateScreen()");
|
||||
#endif
|
||||
RT64::API.app->updateScreen();
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL ChangeWindow(void) {
|
||||
const bool isPJ64 = (RT64::API.apiType == RT64::APIType::Project64);
|
||||
if (!isPJ64) {
|
||||
CoreVideo_ToggleFullScreen();
|
||||
} else {
|
||||
RT64::ApplicationWindow *appWindow = RT64::API.app->appWindow.get();
|
||||
appWindow->setFullScreen(!appWindow->fullScreen);
|
||||
}
|
||||
}
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "m64p_common.h"
|
||||
#include "m64p_plugin.h"
|
||||
#include "m64p_types.h"
|
||||
#include "m64p_vidext.h"
|
||||
|
||||
// mupen64plus function pointers for the video extension functions
|
||||
extern ptr_VidExt_InitWithRenderMode CoreVideo_InitWithRenderMode;
|
||||
extern ptr_VidExt_Quit CoreVideo_Quit;
|
||||
extern ptr_VidExt_SetCaption CoreVideo_SetCaption;
|
||||
extern ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen;
|
||||
extern ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow;
|
||||
extern ptr_VidExt_VK_GetSurface CoreVideo_VK_GetSurface;
|
||||
extern ptr_VidExt_VK_GetInstanceExtensions CoreVideo_VK_GetInstanceExtensions;
|
||||
extern ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode;
|
||||
|
||||
// TODO: move this to applicationwindow?
|
||||
extern int window_width;
|
||||
extern int window_height;
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace pj64 {
|
||||
// Prevent PJ64's definitions from conflicting with the implementations
|
||||
# define InitiateGFX InitiateGFXPJ64
|
||||
# define RomOpen RomOpenPJ64
|
||||
# include "project64/Video.h"
|
||||
# undef InitiateGFX
|
||||
# undef RomOpen
|
||||
};
|
||||
#endif
|
||||
|
||||
#include "hle/rt64_application.h"
|
||||
|
||||
#define DP_STATUS_XBUS_DMA 0x01
|
||||
#define DP_STATUS_FREEZE 0x02
|
||||
|
||||
typedef GFX_INFO MupenGraphicsInfo;
|
||||
#ifdef _WIN32
|
||||
typedef pj64::GFX_INFO Project64GraphicsInfo;
|
||||
#endif
|
||||
|
||||
struct PluginGraphicsInfo {
|
||||
union {
|
||||
MupenGraphicsInfo mupen64plus;
|
||||
#ifdef _WIN32
|
||||
Project64GraphicsInfo project64;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
namespace RT64 {
|
||||
enum class APIType {
|
||||
Native,
|
||||
Mupen64Plus,
|
||||
Project64,
|
||||
};
|
||||
|
||||
struct APIContainer {
|
||||
std::unique_ptr<Application> app;
|
||||
APIType apiType;
|
||||
};
|
||||
|
||||
extern APIContainer API;
|
||||
|
||||
template<typename T>
|
||||
void InitiateGFXCore(Application::Core &appCore, T info) {
|
||||
appCore.HEADER = info.HEADER;
|
||||
appCore.RDRAM = info.RDRAM;
|
||||
appCore.DMEM = info.DMEM;
|
||||
appCore.IMEM = info.IMEM;
|
||||
appCore.MI_INTR_REG = info.MI_INTR_REG;
|
||||
appCore.DPC_START_REG = info.DPC_START_REG;
|
||||
appCore.DPC_END_REG = info.DPC_END_REG;
|
||||
appCore.DPC_CURRENT_REG = info.DPC_CURRENT_REG;
|
||||
appCore.DPC_STATUS_REG = info.DPC_STATUS_REG;
|
||||
appCore.DPC_CLOCK_REG = info.DPC_CLOCK_REG;
|
||||
appCore.DPC_BUFBUSY_REG = info.DPC_BUFBUSY_REG;
|
||||
appCore.DPC_PIPEBUSY_REG = info.DPC_PIPEBUSY_REG;
|
||||
appCore.DPC_TMEM_REG = info.DPC_TMEM_REG;
|
||||
appCore.VI_STATUS_REG = info.VI_STATUS_REG;
|
||||
appCore.VI_ORIGIN_REG = info.VI_ORIGIN_REG;
|
||||
appCore.VI_WIDTH_REG = info.VI_WIDTH_REG;
|
||||
appCore.VI_INTR_REG = info.VI_INTR_REG;
|
||||
appCore.VI_V_CURRENT_LINE_REG = info.VI_V_CURRENT_LINE_REG;
|
||||
appCore.VI_TIMING_REG = info.VI_TIMING_REG;
|
||||
appCore.VI_V_SYNC_REG = info.VI_V_SYNC_REG;
|
||||
appCore.VI_H_SYNC_REG = info.VI_H_SYNC_REG;
|
||||
appCore.VI_LEAP_REG = info.VI_LEAP_REG;
|
||||
appCore.VI_H_START_REG = info.VI_H_START_REG;
|
||||
appCore.VI_V_START_REG = info.VI_V_START_REG;
|
||||
appCore.VI_V_BURST_REG = info.VI_V_BURST_REG;
|
||||
appCore.VI_X_SCALE_REG = info.VI_X_SCALE_REG;
|
||||
appCore.VI_Y_SCALE_REG = info.VI_Y_SCALE_REG;
|
||||
appCore.checkInterrupts = info.CheckInterrupts;
|
||||
}
|
||||
};
|
||||
-267
@@ -1,267 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_api_common.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include "imgui/backends/imgui_impl_sdl2.h"
|
||||
|
||||
#define PLUGIN_NAME "RT64 Video Plugin"
|
||||
#define PLUGIN_VERSION 0x020509
|
||||
#define VIDEO_PLUGIN_API_VERSION 0x020200
|
||||
#define CONFIG_API_VERSION 0x020300
|
||||
|
||||
#ifndef NDEBUG
|
||||
# define LOG_PLUGIN_API_CALLS
|
||||
#endif
|
||||
|
||||
/* definitions of pointers to Core video extension functions */
|
||||
ptr_VidExt_InitWithRenderMode CoreVideo_InitWithRenderMode = NULL;
|
||||
ptr_VidExt_Quit CoreVideo_Quit = NULL;
|
||||
ptr_VidExt_SetCaption CoreVideo_SetCaption = NULL;
|
||||
ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen = NULL;
|
||||
ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow = NULL;
|
||||
ptr_VidExt_VK_GetSurface CoreVideo_VK_GetSurface = NULL;
|
||||
ptr_VidExt_VK_GetInstanceExtensions CoreVideo_VK_GetInstanceExtensions = NULL;
|
||||
ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
#define DLSYM(a, b) GetProcAddress(a, b)
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#define DLSYM(a, b) dlsym(a, b)
|
||||
#endif
|
||||
|
||||
DLLEXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle CoreLibHandle, void *Context, void (*DebugCallback)(void *, int, const char *)) {
|
||||
CoreVideo_InitWithRenderMode = (ptr_VidExt_InitWithRenderMode)DLSYM(CoreLibHandle, "VidExt_InitWithRenderMode");
|
||||
CoreVideo_Quit = (ptr_VidExt_Quit)DLSYM(CoreLibHandle, "VidExt_Quit");
|
||||
CoreVideo_SetCaption = (ptr_VidExt_SetCaption)DLSYM(CoreLibHandle, "VidExt_SetCaption");
|
||||
CoreVideo_ToggleFullScreen = (ptr_VidExt_ToggleFullScreen)DLSYM(CoreLibHandle, "VidExt_ToggleFullScreen");
|
||||
CoreVideo_ResizeWindow = (ptr_VidExt_ResizeWindow)DLSYM(CoreLibHandle, "VidExt_ResizeWindow");
|
||||
CoreVideo_VK_GetSurface = (ptr_VidExt_VK_GetSurface)DLSYM(CoreLibHandle, "VidExt_VK_GetSurface");
|
||||
CoreVideo_VK_GetInstanceExtensions = (ptr_VidExt_VK_GetInstanceExtensions)DLSYM(CoreLibHandle, "VidExt_VK_GetInstanceExtensions");
|
||||
CoreVideo_SetVideoMode = (ptr_VidExt_SetVideoMode)DLSYM(CoreLibHandle, "VidExt_SetVideoMode");
|
||||
if (CoreVideo_InitWithRenderMode == NULL ||
|
||||
CoreVideo_Quit == NULL ||
|
||||
CoreVideo_SetCaption == NULL ||
|
||||
CoreVideo_ToggleFullScreen == NULL ||
|
||||
CoreVideo_ResizeWindow == NULL ||
|
||||
CoreVideo_VK_GetSurface == NULL ||
|
||||
CoreVideo_VK_GetInstanceExtensions == NULL ||
|
||||
CoreVideo_SetVideoMode == NULL) {
|
||||
return M64ERR_SYSTEM_FAIL;
|
||||
}
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
DLLEXPORT m64p_error CALL PluginShutdown(void) {
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
DLLEXPORT m64p_error CALL PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities) {
|
||||
/* set version info */
|
||||
if (PluginType != NULL)
|
||||
*PluginType = M64PLUGIN_GFX;
|
||||
|
||||
if (PluginVersion != NULL)
|
||||
*PluginVersion = PLUGIN_VERSION;
|
||||
|
||||
if (APIVersion != NULL)
|
||||
*APIVersion = VIDEO_PLUGIN_API_VERSION;
|
||||
|
||||
if (PluginNamePtr != NULL)
|
||||
*PluginNamePtr = PLUGIN_NAME;
|
||||
|
||||
if (Capabilities != NULL)
|
||||
*Capabilities = 0;
|
||||
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
DLLEXPORT void CALL GetDllInfo(pj64::PLUGIN_INFO *PluginInfo) {
|
||||
PluginInfo->Version = 0x103;
|
||||
PluginInfo->Type = pj64::PLUGIN_TYPE_VIDEO;
|
||||
strncpy(PluginInfo->Name, PLUGIN_NAME, sizeof(PluginInfo->Name));
|
||||
}
|
||||
#endif
|
||||
|
||||
DLLEXPORT void CALL MoveScreen(int xpos, int ypos) {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL RomClosed(void) {
|
||||
if (RT64::API.app != nullptr) {
|
||||
RT64::API.app->end();
|
||||
RT64::API.app.reset();
|
||||
}
|
||||
}
|
||||
|
||||
DLLEXPORT int CALL RomOpen(void) {
|
||||
const bool isPJ64 = (RT64::API.apiType == RT64::APIType::Project64);
|
||||
if (isPJ64) {
|
||||
RT64::ApplicationWindow *appWindow = RT64::API.app->appWindow.get();
|
||||
appWindow->makeResizable();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL ViStatusChanged(void) { }
|
||||
|
||||
DLLEXPORT void CALL ViWidthChanged(void) { }
|
||||
|
||||
DLLEXPORT int CALL InitiateGFX(PluginGraphicsInfo graphicsInfo) {
|
||||
// Determine if this is a PJ64 plugin by checking if the HWND element is actually valid.
|
||||
#ifdef _WIN32
|
||||
const bool isPJ64 = IsWindow(HWND(graphicsInfo.project64.hWnd));
|
||||
#else
|
||||
const bool isPJ64 = false;
|
||||
#endif
|
||||
if (isPJ64) {
|
||||
RT64::API.apiType = RT64::APIType::Project64;
|
||||
}
|
||||
else {
|
||||
RT64::API.apiType = RT64::APIType::Mupen64Plus;
|
||||
}
|
||||
|
||||
// Store core information in application.
|
||||
RT64::Application::Core appCore;
|
||||
appCore.window = {};
|
||||
|
||||
switch (RT64::API.apiType) {
|
||||
case RT64::APIType::Mupen64Plus:
|
||||
RT64::InitiateGFXCore<MupenGraphicsInfo>(appCore, graphicsInfo.mupen64plus);
|
||||
break;
|
||||
#ifdef _WIN32
|
||||
case RT64::APIType::Project64:
|
||||
RT64::InitiateGFXCore<Project64GraphicsInfo>(appCore, graphicsInfo.project64);
|
||||
appCore.window = RT64::RenderWindow(graphicsInfo.project64.hWnd);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Make new application with core information and set it up.
|
||||
RT64::API.app = std::make_unique<RT64::Application>(appCore, RT64::ApplicationConfiguration());
|
||||
return (RT64::API.app->setup(0) == RT64::Application::SetupResult::Success);
|
||||
}
|
||||
|
||||
int window_width = 640;
|
||||
int window_height = 480;
|
||||
|
||||
DLLEXPORT void CALL ResizeVideoOutput(int width, int height) {
|
||||
window_width = width;
|
||||
window_height = height;
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL FBRead(uint32_t addr) {
|
||||
// Unused.
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL FBWrite(uint32_t addr, uint32_t size) {
|
||||
// Unused.
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL FBGetFrameBufferInfo(void *p) {
|
||||
// Unused.
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL ShowCFB(void) {
|
||||
// Unused.
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL ReadScreen2(void *dest, int *width, int *height, int bFront) {
|
||||
// Unused.
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL SetRenderingCallback(void (*callback)(int)) {
|
||||
// Unused.
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL CaptureScreen(const char *Directory) {
|
||||
// Unused.
|
||||
}
|
||||
|
||||
// TODO: PR this to mupen64plus....
|
||||
DLLEXPORT void CALL SDL_KeyDown(int keymod, int keysym)
|
||||
{
|
||||
SDL_Event event;
|
||||
event.type = SDL_KEYDOWN;
|
||||
event.key.keysym.mod = keymod;
|
||||
event.key.keysym.sym = keysym;
|
||||
if (RT64::API.app->presentQueue->inspector != nullptr) {
|
||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL SDL_KeyUp(int keymod, int keysym)
|
||||
{
|
||||
SDL_Event event;
|
||||
event.type = SDL_KEYUP;
|
||||
event.key.keysym.mod = SDL_SCANCODE_TO_KEYCODE(keymod);
|
||||
event.key.keysym.sym = SDL_SCANCODE_TO_KEYCODE(keysym);
|
||||
|
||||
if (keysym == SDL_SCANCODE_F10)
|
||||
{
|
||||
if (RT64::API.app->userConfig.developerMode) {
|
||||
fprintf(stderr, "creating inspector...\n");
|
||||
const std::lock_guard<std::mutex> lock(RT64::API.app->presentQueue->inspectorMutex);
|
||||
if (RT64::API.app->presentQueue->inspector == nullptr) {
|
||||
RT64::API.app->presentQueue->inspector = std::make_unique<RT64::Inspector>(RT64::API.app->device.get(), RT64::API.app->swapChain.get(), RT64::API.app->createdGraphicsAPI);
|
||||
if (!RT64::API.app->userPaths.isEmpty()) {
|
||||
RT64::API.app->presentQueue->inspector->setIniPath(RT64::API.app->userPaths.imguiPath);
|
||||
}
|
||||
|
||||
RT64::API.app->freeCamClearQueued = true;
|
||||
ImGui_ImplSDL2_InitForVulkan(nullptr); // TODO: move this elsewhere...
|
||||
//appWindow->blockSdlKeyboard();
|
||||
}
|
||||
else if (RT64::API.app->presentQueue->inspector != nullptr) {
|
||||
RT64::API.app->presentQueue->inspector.reset(nullptr);
|
||||
//appWindow->unblockSdlKeyboard();
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stdout, "Inspector is not available: developer mode is not enabled in the configuration.\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (RT64::API.app->presentQueue->inspector != nullptr) {
|
||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL MouseMove(int x, int y)
|
||||
{
|
||||
SDL_Event event;
|
||||
event.type = SDL_MOUSEMOTION;
|
||||
event.motion.which = 1;
|
||||
event.motion.x = x;
|
||||
event.motion.y = y;
|
||||
|
||||
if (RT64::API.app->presentQueue->inspector != nullptr) {
|
||||
//printf("MouseMove x = %i, y = %i\n", x,y);
|
||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
DLLEXPORT void CALL MouseButton(int left, int right)
|
||||
{
|
||||
if (RT64::API.app->presentQueue->inspector != nullptr) {
|
||||
printf("MouseButton left = %i\n", left);
|
||||
SDL_Event event;
|
||||
|
||||
event.type = left ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP;
|
||||
event.button.button = SDL_BUTTON_LEFT;
|
||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||
|
||||
event.type = right ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP;
|
||||
event.button.button = SDL_BUTTON_RIGHT;
|
||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-144
@@ -1,144 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_common.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
namespace RT64 {
|
||||
FILE *GlobalLogFile = nullptr;
|
||||
std::string GlobalLastError = "";
|
||||
|
||||
// FixedRect
|
||||
|
||||
FixedRect::FixedRect() {
|
||||
reset();
|
||||
}
|
||||
|
||||
FixedRect::FixedRect(int32_t ulx, int32_t uly, int32_t lrx, int32_t lry) {
|
||||
this->ulx = ulx;
|
||||
this->uly = uly;
|
||||
this->lrx = lrx;
|
||||
this->lry = lry;
|
||||
}
|
||||
|
||||
void FixedRect::reset() {
|
||||
ulx = INT32_MAX;
|
||||
uly = INT32_MAX;
|
||||
lrx = INT32_MIN;
|
||||
lry = INT32_MIN;
|
||||
}
|
||||
|
||||
bool FixedRect::isEmpty() const {
|
||||
return isNull() || (lrx == ulx) || (lry == uly);
|
||||
}
|
||||
|
||||
bool FixedRect::isNull() const {
|
||||
return (ulx > lrx) || (uly > lry);
|
||||
}
|
||||
|
||||
void FixedRect::merge(const FixedRect &rect) {
|
||||
assert(!rect.isNull());
|
||||
|
||||
ulx = std::min(ulx, rect.ulx);
|
||||
uly = std::min(uly, rect.uly);
|
||||
lrx = std::max(lrx, rect.lrx);
|
||||
lry = std::max(lry, rect.lry);
|
||||
}
|
||||
|
||||
FixedRect FixedRect::scaled(float x, float y) const {
|
||||
assert(!isNull());
|
||||
assert(x >= 0.0f);
|
||||
assert(y >= 0.0f);
|
||||
|
||||
return FixedRect(
|
||||
int32_t(floorf(left(false) * x)) << 2,
|
||||
int32_t(floorf(top(false) * y)) << 2,
|
||||
int32_t(ceilf(right(true) * x)) << 2,
|
||||
int32_t(ceilf(bottom(true) * y)) << 2
|
||||
);
|
||||
}
|
||||
|
||||
FixedRect FixedRect::intersection(const FixedRect &rect) const {
|
||||
if (!isNull() && !rect.isNull()) {
|
||||
return {
|
||||
std::max(ulx, rect.ulx),
|
||||
std::max(uly, rect.uly),
|
||||
std::min(lrx, rect.lrx),
|
||||
std::min(lry, rect.lry)
|
||||
};
|
||||
}
|
||||
else {
|
||||
return FixedRect();
|
||||
}
|
||||
}
|
||||
|
||||
bool FixedRect::fullyInside(const FixedRect &rect) const {
|
||||
assert(!isNull());
|
||||
assert(!rect.isNull());
|
||||
return (rect.ulx >= ulx) && (rect.uly >= uly) && (rect.lrx <= lrx) && (rect.lry <= lry);
|
||||
}
|
||||
|
||||
int32_t FixedRect::left(bool ceil) const {
|
||||
assert(!isNull());
|
||||
return (ulx + (ceil ? 3 : 0)) >> 2;
|
||||
}
|
||||
|
||||
int32_t FixedRect::top(bool ceil) const {
|
||||
assert(!isNull());
|
||||
return (uly + (ceil ? 3 : 0)) >> 2;
|
||||
}
|
||||
|
||||
int32_t FixedRect::right(bool ceil) const {
|
||||
assert(!isNull());
|
||||
return (lrx + (ceil ? 3 : 0)) >> 2;
|
||||
}
|
||||
|
||||
int32_t FixedRect::bottom(bool ceil) const {
|
||||
assert(!isNull());
|
||||
return (lry + (ceil ? 3 : 0)) >> 2;
|
||||
}
|
||||
|
||||
int32_t FixedRect::width(bool leftCeil, bool rightCeil) const {
|
||||
assert(!isNull());
|
||||
return right(rightCeil) - left(leftCeil);
|
||||
}
|
||||
|
||||
int32_t FixedRect::height(bool topCeil, bool bottomCeil) const {
|
||||
assert(!isNull());
|
||||
return bottom(bottomCeil) - top(topCeil);
|
||||
}
|
||||
|
||||
// FixedMatrix
|
||||
|
||||
float FixedMatrix::toFloat(uint32_t i, uint32_t j) const {
|
||||
const int xorJ = j ^ 1;
|
||||
return FixedMatrix::fixedToFloat(integer[i][xorJ], frac[i][xorJ]);
|
||||
}
|
||||
|
||||
hlslpp::float4x4 FixedMatrix::toMatrix4x4() const {
|
||||
return hlslpp::float4x4(
|
||||
toFloat(0, 0), toFloat(0, 1), toFloat(0, 2), toFloat(0, 3),
|
||||
toFloat(1, 0), toFloat(1, 1), toFloat(1, 2), toFloat(1, 3),
|
||||
toFloat(2, 0), toFloat(2, 1), toFloat(2, 2), toFloat(2, 3),
|
||||
toFloat(3, 0), toFloat(3, 1), toFloat(3, 2), toFloat(3, 3)
|
||||
);
|
||||
}
|
||||
|
||||
float FixedMatrix::fixedToFloat(int16_t integerValue, uint16_t fracValue) {
|
||||
const uint32_t fullWord = (uint32_t(integerValue) << 16) | fracValue;
|
||||
return int32_t(fullWord) / 65536.0f;
|
||||
}
|
||||
|
||||
void FixedMatrix::modifyMatrix4x4Integer(hlslpp::float4x4 &matrix, uint32_t i, uint32_t j, int16_t value) {
|
||||
const int32_t fixedValue = int32_t(matrix[i][j] * 65536.0f);
|
||||
matrix[i][j] = fixedToFloat(value, uint16_t(fixedValue & 0xFFFFU));
|
||||
}
|
||||
|
||||
void FixedMatrix::modifyMatrix4x4Fraction(hlslpp::float4x4 &matrix, uint32_t i, uint32_t j, uint16_t value) {
|
||||
const int32_t fixedValue = int32_t(matrix[i][j] * 65536.0f);
|
||||
matrix[i][j] = fixedToFloat(int16_t((fixedValue >> 16) & 0xFFFF), value);
|
||||
}
|
||||
};
|
||||
-125
@@ -1,125 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "rt64_hlslpp.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# define DLLEXPORT extern "C" __declspec(dllexport)
|
||||
#else
|
||||
# define DLLEXPORT extern "C" __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
namespace RT64 {
|
||||
enum class UpscaleMode {
|
||||
Bilinear,
|
||||
FSR,
|
||||
DLSS,
|
||||
XeSS
|
||||
};
|
||||
|
||||
static const unsigned int DepthRayQueryMask = 0x1;
|
||||
static const unsigned int NoDepthRayQueryMask = 0x2;
|
||||
static const unsigned int ShadowCatcherRayQueryMask = 0x4;
|
||||
|
||||
// Error string for last error or exception that was caught.
|
||||
extern std::string GlobalLastError;
|
||||
|
||||
#ifdef NDEBUG
|
||||
# define RT64_LOG_OPEN(x)
|
||||
# define RT64_LOG_CLOSE()
|
||||
# define RT64_LOG_PRINTF(x, ...)
|
||||
#else
|
||||
extern FILE *GlobalLogFile;
|
||||
# ifdef _WIN32
|
||||
# define RT64_LOG_OPEN(x) do { RT64::GlobalLogFile = _wfopen(x, L"wt"); } while (0)
|
||||
# else
|
||||
# define RT64_LOG_OPEN(x) do { RT64::GlobalLogFile = fopen(x, "w"); } while (0)
|
||||
# endif
|
||||
# define RT64_LOG_CLOSE() do { fclose(RT64::GlobalLogFile); } while (0)
|
||||
# define RT64_LOG_PRINTF(x, ...) do { fprintf(RT64::GlobalLogFile, x, ## __VA_ARGS__); fprintf(RT64::GlobalLogFile, "\n"); fflush(RT64::GlobalLogFile); } while (0)
|
||||
# define RT64_LOG_PRINTF_DETAILED(x, ...) do { fprintf(RT64::GlobalLogFile, x, ## __VA_ARGS__); fprintf(RT64::GlobalLogFile, " (%s in %s:%d)\n", __FUNCTION__, __FILE__, __LINE__); fflush(RT64::GlobalLogFile); } while (0)
|
||||
#endif
|
||||
|
||||
inline void CalculateTextureRowWidthPadding(uint32_t rowPitch, uint32_t &rowWidth, uint32_t &rowPadding) {
|
||||
const int RowMultiple = 256;
|
||||
rowWidth = rowPitch;
|
||||
rowPadding = (rowWidth % RowMultiple) ? RowMultiple - (rowWidth % RowMultiple) : 0;
|
||||
rowWidth += rowPadding;
|
||||
}
|
||||
|
||||
inline float HaltonSequence(int i, int b) {
|
||||
float f = 1.0;
|
||||
float r = 0.0;
|
||||
while (i > 0) {
|
||||
f = f / float(b);
|
||||
r = r + f * float(i % b);
|
||||
i = i / b;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
inline hlslpp::float2 HaltonJitter(int frame, int phases) {
|
||||
return { HaltonSequence(frame % phases + 1, 2) - 0.5f, HaltonSequence(frame % phases + 1, 3) - 0.5f };
|
||||
}
|
||||
|
||||
struct RectI {
|
||||
int x, y, w, h;
|
||||
};
|
||||
|
||||
struct FixedRect {
|
||||
int32_t ulx;
|
||||
int32_t uly;
|
||||
int32_t lrx;
|
||||
int32_t lry;
|
||||
|
||||
FixedRect();
|
||||
FixedRect(int32_t ulx, int32_t uly, int32_t lrx, int32_t lry);
|
||||
void reset();
|
||||
bool isEmpty() const;
|
||||
bool isNull() const;
|
||||
void merge(const FixedRect &rect);
|
||||
FixedRect scaled(float x, float y) const;
|
||||
|
||||
// Intersections can result in invalid rects if they don't overlap. Check if they're not null after using this.
|
||||
FixedRect intersection(const FixedRect &rect) const;
|
||||
bool fullyInside(const FixedRect &rect) const;
|
||||
int32_t left(bool ceil) const;
|
||||
int32_t top(bool ceil) const;
|
||||
int32_t right(bool ceil) const;
|
||||
int32_t bottom(bool ceil) const;
|
||||
int32_t width(bool leftCeil, bool rightCeil) const;
|
||||
int32_t height(bool topCeil, bool bottomCeil) const;
|
||||
};
|
||||
|
||||
struct FixedMatrix {
|
||||
int16_t integer[4][4];
|
||||
uint16_t frac[4][4];
|
||||
|
||||
float toFloat(uint32_t i, uint32_t j) const;
|
||||
hlslpp::float4x4 toMatrix4x4() const;
|
||||
|
||||
static float fixedToFloat(int16_t integerValue, uint16_t fracValue);
|
||||
static void modifyMatrix4x4Integer(hlslpp::float4x4 &matrix, uint32_t i, uint32_t j, int16_t integerValue);
|
||||
static void modifyMatrix4x4Fraction(hlslpp::float4x4 &matrix, uint32_t i, uint32_t j, uint16_t fracValue);
|
||||
};
|
||||
|
||||
template<class T>
|
||||
void adjustVector(std::vector<T> &vector, size_t expectedSize) {
|
||||
if (vector.capacity() < expectedSize) {
|
||||
vector.reserve(expectedSize * 2);
|
||||
}
|
||||
|
||||
if (vector.size() < expectedSize) {
|
||||
vector.resize(expectedSize);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,62 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_dynamic_libraries.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <filesystem>
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <Windows.h>
|
||||
# include "utf8conv/utf8conv.h"
|
||||
#endif
|
||||
|
||||
namespace RT64 {
|
||||
typedef std::pair<std::string, bool> NameRequiredPair;
|
||||
|
||||
const auto DynamicLibraryList = {
|
||||
NameRequiredPair("dxil.dll", true),
|
||||
NameRequiredPair("dxcompiler.dll", true),
|
||||
# if DLSS_ENABLED
|
||||
NameRequiredPair("nvngx_dlss.dll", false),
|
||||
# endif
|
||||
};
|
||||
|
||||
void LocalFunction() { }
|
||||
|
||||
// DynamicLibraries
|
||||
|
||||
bool DynamicLibraries::load() {
|
||||
# if defined(_WIN32)
|
||||
HMODULE moduleHandle = nullptr;
|
||||
if (!GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, LPCWSTR(LocalFunction), &moduleHandle)) {
|
||||
fprintf(stderr, "GetModuleHandleExW failed with error code 0x%X\n", GetLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
WCHAR modulePath[FILENAME_MAX];
|
||||
DWORD modulePathSz = GetModuleFileNameW(moduleHandle, modulePath, sizeof(modulePath));
|
||||
if ((modulePathSz == 0) || (modulePathSz >= sizeof(modulePath))) {
|
||||
fprintf(stderr, "GetModuleFileNameW failed with error code 0x%X\n", GetLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Extract the directory from the module path.
|
||||
std::filesystem::path fullPath(modulePath);
|
||||
fullPath.remove_filename();
|
||||
|
||||
const std::wstring fullPathStr = fullPath.wstring();
|
||||
for (const NameRequiredPair &pair : DynamicLibraryList) {
|
||||
const std::wstring libraryPath = fullPathStr + win32::Utf8ToUtf16(pair.first);
|
||||
HMODULE libraryModule = LoadLibraryW(libraryPath.c_str());
|
||||
if (pair.second && (libraryModule == nullptr)) {
|
||||
fprintf(stderr, "LoadLibraryW with path %ls failed with error code 0x%X\n", libraryPath.c_str(), GetLastError());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rt64_timer.h"
|
||||
|
||||
namespace RT64 {
|
||||
struct DynamicLibraries {
|
||||
static bool load();
|
||||
};
|
||||
};
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_elapsed_timer.h"
|
||||
|
||||
namespace RT64 {
|
||||
// ElapsedTimer
|
||||
|
||||
ElapsedTimer::ElapsedTimer() {
|
||||
reset();
|
||||
}
|
||||
|
||||
void ElapsedTimer::reset() {
|
||||
startTime = Timer::current();
|
||||
}
|
||||
|
||||
int64_t ElapsedTimer::elapsedMicroseconds() const {
|
||||
return Timer::deltaMicroseconds(startTime, Timer::current());
|
||||
}
|
||||
|
||||
double ElapsedTimer::elapsedMilliseconds() const {
|
||||
return static_cast<double>(elapsedMicroseconds()) / 1000.0;
|
||||
}
|
||||
|
||||
double ElapsedTimer::elapsedSeconds() const {
|
||||
return static_cast<double>(elapsedMicroseconds()) / 1000000.0;
|
||||
}
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rt64_timer.h"
|
||||
|
||||
namespace RT64 {
|
||||
struct ElapsedTimer {
|
||||
Timestamp startTime;
|
||||
|
||||
ElapsedTimer();
|
||||
void reset();
|
||||
int64_t elapsedMicroseconds() const;
|
||||
double elapsedMilliseconds() const;
|
||||
double elapsedSeconds() const;
|
||||
};
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_emulator_configuration.h"
|
||||
|
||||
namespace RT64 {
|
||||
// EmulatorConfiguration
|
||||
|
||||
EmulatorConfiguration::EmulatorConfiguration() {
|
||||
dither.postBlendNoise = true;
|
||||
framebuffer.renderToRAM = true;
|
||||
framebuffer.copyWithGPU = true;
|
||||
}
|
||||
};
|
||||
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rt64_common.h"
|
||||
|
||||
namespace RT64 {
|
||||
struct EmulatorConfiguration {
|
||||
struct Dither {
|
||||
bool postBlendNoise;
|
||||
};
|
||||
|
||||
struct Framebuffer {
|
||||
bool renderToRAM;
|
||||
bool copyWithGPU;
|
||||
};
|
||||
|
||||
Dither dither;
|
||||
Framebuffer framebuffer;
|
||||
|
||||
EmulatorConfiguration();
|
||||
};
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_enhancement_configuration.h"
|
||||
|
||||
namespace RT64 {
|
||||
// EnhancementConfiguration
|
||||
|
||||
EnhancementConfiguration::EnhancementConfiguration() {
|
||||
framebuffer.reinterpretFixULS = true;
|
||||
presentation.mode = Presentation::Mode::SkipBuffering;
|
||||
rect.fixRectLR = true;
|
||||
f3dex.forceBranch = false;
|
||||
s2dex.fixBilerpMismatch = true;
|
||||
s2dex.framebufferFastPath = true;
|
||||
textureLOD.scale = false;
|
||||
}
|
||||
};
|
||||
@@ -1,51 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rt64_common.h"
|
||||
|
||||
namespace RT64 {
|
||||
struct EnhancementConfiguration {
|
||||
struct Framebuffer {
|
||||
bool reinterpretFixULS;
|
||||
};
|
||||
|
||||
struct Presentation {
|
||||
enum class Mode {
|
||||
Console,
|
||||
SkipBuffering,
|
||||
PresentEarly
|
||||
};
|
||||
|
||||
Mode mode;
|
||||
};
|
||||
|
||||
struct Rect {
|
||||
bool fixRectLR;
|
||||
};
|
||||
|
||||
struct F3DEX {
|
||||
bool forceBranch;
|
||||
};
|
||||
|
||||
struct S2DEX {
|
||||
bool fixBilerpMismatch;
|
||||
bool framebufferFastPath;
|
||||
};
|
||||
|
||||
struct TextureLOD {
|
||||
bool scale;
|
||||
};
|
||||
|
||||
Framebuffer framebuffer;
|
||||
Presentation presentation;
|
||||
Rect rect;
|
||||
F3DEX f3dex;
|
||||
S2DEX s2dex;
|
||||
TextureLOD textureLOD;
|
||||
|
||||
EnhancementConfiguration();
|
||||
};
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
// Disable SIMD on GCC due to UB when compiling with optimizations.
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
|
||||
#define HLSLPP_SCALAR
|
||||
#endif
|
||||
|
||||
#include "hlsl++.h"
|
||||
-491
@@ -1,491 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_math.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
|
||||
namespace RT64 {
|
||||
float sqr(float x) {
|
||||
return x * x;
|
||||
}
|
||||
|
||||
bool matrixIsNaN(const hlslpp::float4x4 &m) {
|
||||
for (uint32_t i = 0; i < 4; i++) {
|
||||
if (hlslpp::any(hlslpp::isnan(m[i]))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
hlslpp::float4x4 matrixScale(float scale) {
|
||||
hlslpp::float4x4 scaleMatrix(0.0f);
|
||||
scaleMatrix[0][0] = scale;
|
||||
scaleMatrix[1][1] = scale;
|
||||
scaleMatrix[2][2] = scale;
|
||||
scaleMatrix[3][3] = 1.0f;
|
||||
return scaleMatrix;
|
||||
}
|
||||
|
||||
hlslpp::float4x4 matrixScale(const hlslpp::float3& scale) {
|
||||
hlslpp::float4x4 scaleMatrix(0.0f);
|
||||
scaleMatrix[0][0] = scale.x;
|
||||
scaleMatrix[1][1] = scale.y;
|
||||
scaleMatrix[2][2] = scale.z;
|
||||
scaleMatrix[3][3] = 1.0f;
|
||||
return scaleMatrix;
|
||||
}
|
||||
|
||||
void matrixDecomposeViewProj(const hlslpp::float4x4 &vp, hlslpp::float4x4 &v, hlslpp::float4x4 &p) {
|
||||
v = hlslpp::float4x4::identity();
|
||||
p = hlslpp::float4x4::identity();
|
||||
|
||||
p[2][3] = -1.0f;
|
||||
p[3][3] = 0.0f;
|
||||
v[0][2] = -vp[0][3];
|
||||
v[1][2] = -vp[1][3];
|
||||
v[2][2] = -vp[2][3];
|
||||
v[3][2] = -vp[3][3];
|
||||
|
||||
p[2][2] = vp[0][2] / v[0][2];
|
||||
p[3][2] = vp[3][2] - p[2][2] * v[3][2];
|
||||
|
||||
p[0][0] = sqrtf(sqr(vp[0][0]) + sqr(vp[1][0]) + sqr(vp[2][0]));
|
||||
p[1][1] = sqrtf(sqr(vp[0][1]) + sqr(vp[1][1]) + sqr(vp[2][1]));
|
||||
|
||||
v[0][0] = vp[0][0] / p[0][0];
|
||||
v[1][0] = vp[1][0] / p[0][0];
|
||||
v[2][0] = vp[2][0] / p[0][0];
|
||||
v[3][0] = vp[3][0] / p[0][0];
|
||||
|
||||
v[0][1] = vp[0][1] / p[1][1];
|
||||
v[1][1] = vp[1][1] / p[1][1];
|
||||
v[2][1] = vp[2][1] / p[1][1];
|
||||
v[3][1] = vp[3][1] / p[1][1];
|
||||
|
||||
if (matrixIsNaN(v) || matrixIsNaN(p)) {
|
||||
v = hlslpp::float4x4::identity();
|
||||
p = vp;
|
||||
}
|
||||
}
|
||||
|
||||
hlslpp::float4x4 matrixTranslation(const hlslpp::float3 &t) {
|
||||
hlslpp::float4x4 m = hlslpp::float4x4::identity();
|
||||
m[3].xyz = t;
|
||||
return m;
|
||||
}
|
||||
|
||||
hlslpp::float3x3 matrixRotationX(float rad) {
|
||||
hlslpp::float3x3 m = hlslpp::float3x3::identity();
|
||||
const float rollCos = cos(rad);
|
||||
const float rollSin = sin(rad);
|
||||
m[0][0] = rollCos;
|
||||
m[0][1] = -rollSin;
|
||||
m[1][0] = rollSin;
|
||||
m[1][1] = rollCos;
|
||||
return m;
|
||||
}
|
||||
|
||||
hlslpp::float3x3 matrixRotationY(float rad) {
|
||||
hlslpp::float3x3 m = hlslpp::float3x3::identity();
|
||||
const float pitchCos = cos(rad);
|
||||
const float pitchSin = sin(rad);
|
||||
m[0][0] = pitchCos;
|
||||
m[0][2] = pitchSin;
|
||||
m[2][0] = -pitchSin;
|
||||
m[2][2] = pitchCos;
|
||||
return m;
|
||||
}
|
||||
|
||||
hlslpp::float3x3 matrixRotationZ(float rad) {
|
||||
hlslpp::float3x3 m = hlslpp::float3x3::identity();
|
||||
const float yawCos = cos(rad);
|
||||
const float yawSin = sin(rad);
|
||||
m[1][1] = yawCos;
|
||||
m[1][2] = -yawSin;
|
||||
m[2][1] = yawSin;
|
||||
m[2][2] = yawCos;
|
||||
return m;
|
||||
}
|
||||
|
||||
hlslpp::float3x3 extract3x3(const hlslpp::float4x4 &m) {
|
||||
return hlslpp::float3x3(
|
||||
m[0][0], m[0][1], m[0][2],
|
||||
m[1][0], m[1][1], m[1][2],
|
||||
m[2][0], m[2][1], m[2][2]
|
||||
);
|
||||
}
|
||||
|
||||
hlslpp::float3x3 rotationFrom3x3(const hlslpp::float3x3 &m) {
|
||||
return hlslpp::float3x3(hlslpp::normalize(m[0]), hlslpp::normalize(m[1]), hlslpp::normalize(m[2]));
|
||||
}
|
||||
|
||||
float traceFrom3x3(const hlslpp::float3x3 &m) {
|
||||
return m[0][0] + m[1][1] + m[2][2];
|
||||
}
|
||||
|
||||
float matrixDifference(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b) {
|
||||
float difference = 0.0f;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
difference += hlslpp::dot(hlslpp::abs(a[i] - b[i]), 1.0f);
|
||||
}
|
||||
|
||||
return difference;
|
||||
}
|
||||
|
||||
bool isMatrixAffine(const hlslpp::float4x4 &m) {
|
||||
return (m[0][3] == 0.0f) && (m[1][3] == 0.0f) && (m[2][3] == 0.0f) && (m[3][3] == 1.0f);
|
||||
}
|
||||
|
||||
bool isMatrixIdentity(const hlslpp::float4x4 &m) {
|
||||
return hlslpp::all(m == hlslpp::float4x4::identity());
|
||||
}
|
||||
|
||||
bool isMatrixViewProj(const hlslpp::float4x4 &m) {
|
||||
return (abs(m[3][3]) >= 1e-6f) && (abs(1.0f - m[3][3]) >= 1e-6f);
|
||||
}
|
||||
|
||||
hlslpp::float4x4 lerpMatrix(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b, float t) {
|
||||
// Copy b into the result.
|
||||
hlslpp::float4x4 c = b;
|
||||
|
||||
// Replace with a component-wise linear interpolation between a and b.
|
||||
for (int i = 0; i < 4; i++) {
|
||||
c[i] = hlslpp::lerp(a[i], b[i], t);
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
hlslpp::float4x4 lerpMatrix3x3(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b, float t) {
|
||||
// Copy b into the result.
|
||||
hlslpp::float4x4 c = b;
|
||||
|
||||
// Replace the result's top left 3x3 with a component-wise linear interpolation between a and b.
|
||||
for (int i = 0; i < 3; i++) {
|
||||
c[i].xyz = hlslpp::lerp(a[i].xyz, b[i].xyz, t);
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
hlslpp::float4x4 lerpMatrixComponents(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b, bool linear, bool angular, bool perspective, float t) {
|
||||
hlslpp::float4x4 ret;
|
||||
// Start by either component-wise lerping the top left 3x3 if rotation is enabled or directly copying it otherwise.
|
||||
// This leaves the last row and last column as a copy of b's in either case.
|
||||
if (angular) {
|
||||
ret = lerpMatrix3x3(a, b, t);
|
||||
}
|
||||
else {
|
||||
ret = b;
|
||||
}
|
||||
// Next, lerp the translation component of the last row if enabled, otherwise leave it intact from the initial copy step.
|
||||
if (linear) {
|
||||
ret[3].xyz = lerp(a[3].xyz, b[3].xyz, t);
|
||||
}
|
||||
// Finally, do the same for the last column if perspective is enabled.
|
||||
if (perspective) {
|
||||
ret[0].w = lerp(a[0].w, b[0].w, t);
|
||||
ret[1].w = lerp(a[1].w, b[1].w, t);
|
||||
ret[2].w = lerp(a[2].w, b[2].w, t);
|
||||
ret[3].w = lerp(a[3].w, b[3].w, t);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
float nearPlaneFromProj(const hlslpp::float4x4 &m) {
|
||||
return std::max((m[3][3] + m[3][2]) / (m[2][2] + m[2][3]), 1e-5f);
|
||||
}
|
||||
|
||||
float farPlaneFromProj(const hlslpp::float4x4 &m) {
|
||||
return std::max((m[3][2] - m[3][3]) / (m[2][2] - m[2][3]), 1e-4f);
|
||||
}
|
||||
|
||||
float fovFromProj(const hlslpp::float4x4 &m) {
|
||||
return std::max(2.0f * atanf(-m[2][3] / m[1][1]), 1e-2f);
|
||||
}
|
||||
|
||||
float pseudoRandom(uint32_t &s) {
|
||||
s = 1664525u * s + 1013904223u;
|
||||
return float(s & 0x00FFFFFF) / float(0x01000000);
|
||||
}
|
||||
|
||||
inline hlslpp::float2 barycentricCoordinates(const hlslpp::float2 p, const hlslpp::float2 a, const hlslpp::float2 b, const hlslpp::float2 c) {
|
||||
float area = -b.y * c.x + a.y * (c.x - b.x) + a.x * (b.y - c.y) + b.x * c.y;
|
||||
float s = (a.y * c.x - a.x * c.y + (c.y - a.y) * p.x + (a.x - c.x) * p.y) / area;
|
||||
float t = (a.x * b.y - a.y * b.x + (a.y - b.y) * p.x + (b.x - a.x) * p.y) / area;
|
||||
return { s, t };
|
||||
}
|
||||
|
||||
bool epsilonEqual(float a, float b) {
|
||||
return abs(a - b) < std::numeric_limits<float>::epsilon();
|
||||
}
|
||||
|
||||
// Adapted from https://github.com/g-truc/glm/blob/master/glm/gtx/matrix_decompose.inl
|
||||
/// Make a linear combination of two vectors and return the result.
|
||||
// result = (a * ascl) + (b * bscl)
|
||||
hlslpp::float3 vecCombine(
|
||||
const hlslpp::float3& a,
|
||||
const hlslpp::float3& b,
|
||||
float ascl, float bscl)
|
||||
{
|
||||
return (a * ascl) + (b * bscl);
|
||||
}
|
||||
|
||||
hlslpp::float3 vecScale(const hlslpp::float3& v, float desiredLength)
|
||||
{
|
||||
return v * desiredLength / length(v);
|
||||
}
|
||||
|
||||
bool decomposeMatrix(const hlslpp::float4x4& mtx, hlslpp::quaternion& rotation, hlslpp::float3& scale, hlslpp::float3& skew,
|
||||
hlslpp::float3& translation, hlslpp::float4& perspective)
|
||||
{
|
||||
hlslpp::float4x4 LocalMatrix(mtx);
|
||||
|
||||
// Normalize the matrix.
|
||||
if(epsilonEqual(LocalMatrix[3][3], 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < 4; i++) {
|
||||
for(size_t j = 0; j < 4; j++) {
|
||||
LocalMatrix[i][j] /= LocalMatrix[3][3];
|
||||
}
|
||||
}
|
||||
|
||||
// perspectiveMatrix is used to solve for perspective, but it also provides
|
||||
// an easy way to test for singularity of the upper 3x3 component.
|
||||
hlslpp::float4x4 PerspectiveMatrix(LocalMatrix);
|
||||
|
||||
for(size_t i = 0; i < 3; i++) {
|
||||
PerspectiveMatrix[i][3] = 0.0f;
|
||||
}
|
||||
PerspectiveMatrix[3][3] = 1.0f;
|
||||
|
||||
/// TODO: Fixme!
|
||||
if(epsilonEqual(determinant(PerspectiveMatrix), 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// First, isolate perspective. This is the messiest.
|
||||
if(
|
||||
!epsilonEqual(LocalMatrix[0][3], 0.0f) ||
|
||||
!epsilonEqual(LocalMatrix[1][3], 0.0f) ||
|
||||
!epsilonEqual(LocalMatrix[2][3], 0.0f))
|
||||
{
|
||||
// rightHandSide is the right hand side of the equation.
|
||||
hlslpp::float4 RightHandSide;
|
||||
RightHandSide[0] = LocalMatrix[0][3];
|
||||
RightHandSide[1] = LocalMatrix[1][3];
|
||||
RightHandSide[2] = LocalMatrix[2][3];
|
||||
RightHandSide[3] = LocalMatrix[3][3];
|
||||
|
||||
// Solve the equation by inverting PerspectiveMatrix and multiplying
|
||||
// rightHandSide by the inverse. (This is the easiest way, not
|
||||
// necessarily the best.)
|
||||
hlslpp::float4x4 InversePerspectiveMatrix = inverse(PerspectiveMatrix);
|
||||
hlslpp::float4x4 TransposedInversePerspectiveMatrix = transpose(InversePerspectiveMatrix);
|
||||
|
||||
perspective = hlslpp::mul(TransposedInversePerspectiveMatrix, RightHandSide);
|
||||
|
||||
// Clear the perspective partition
|
||||
LocalMatrix[0][3] = LocalMatrix[1][3] = LocalMatrix[2][3] = 0.0f;
|
||||
LocalMatrix[3][3] = 1.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No perspective.
|
||||
perspective = hlslpp::float4{0, 0, 0, 1.0f};
|
||||
}
|
||||
|
||||
// Next take care of translation (easy).
|
||||
translation = hlslpp::float3(LocalMatrix[3].xyz);
|
||||
LocalMatrix[3] = hlslpp::float4(0, 0, 0, LocalMatrix[3].w);
|
||||
|
||||
hlslpp::float3 Row[3], Pdum3;
|
||||
|
||||
// Now get scale and shear.
|
||||
for(size_t i = 0; i < 3; ++i) {
|
||||
for(size_t j = 0; j < 3; ++j) {
|
||||
Row[i][j] = LocalMatrix[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
// Compute X scale factor and normalize first row.
|
||||
scale.x = length(Row[0]);// v3Length(Row[0]);
|
||||
|
||||
Row[0] = vecScale(Row[0], 1.0f);
|
||||
|
||||
// Compute XY shear factor and make 2nd row orthogonal to 1st.
|
||||
skew.z = dot(Row[0], Row[1]);
|
||||
Row[1] = vecCombine(Row[1], Row[0], 1.0f, -skew.z);
|
||||
|
||||
// Now, compute Y scale and normalize 2nd row.
|
||||
scale.y = length(Row[1]);
|
||||
Row[1] = vecScale(Row[1], 1.0f);
|
||||
skew.z /= scale.y;
|
||||
|
||||
// Compute XZ and YZ shears, orthogonalize 3rd row.
|
||||
skew.y = dot(Row[0], Row[2]);
|
||||
Row[2] = vecCombine(Row[2], Row[0], 1.0f, -skew.y);
|
||||
skew.x = dot(Row[1], Row[2]);
|
||||
Row[2] = vecCombine(Row[2], Row[1], 1.0f, -skew.x);
|
||||
|
||||
// Next, get Z scale and normalize 3rd row.
|
||||
scale.z = length(Row[2]);
|
||||
Row[2] = vecScale(Row[2], 1.0f);
|
||||
skew.y /= scale.z;
|
||||
skew.x /= scale.z;
|
||||
|
||||
// At this point, the matrix (in rows[]) is orthonormal.
|
||||
// Check for a coordinate system flip. If the determinant
|
||||
// is -1, then negate the matrix and the scaling factors.
|
||||
Pdum3 = cross(Row[1], Row[2]);
|
||||
if(dot(Row[0], Pdum3).x < 0.0f) {
|
||||
for(size_t i = 0; i < 3; i++) {
|
||||
scale[i] *= -1.0f;
|
||||
Row[i] *= -1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Now, get the rotations out, as described in the gem.
|
||||
int i, j, k = 0;
|
||||
float root, trace = Row[0].x + Row[1].y + Row[2].z;
|
||||
if(trace > 0.0f)
|
||||
{
|
||||
root = sqrt(trace + 1.0f);
|
||||
rotation.w = 0.5f * root;
|
||||
root = 0.5f / root;
|
||||
rotation.x = root * (Row[1].z - Row[2].y);
|
||||
rotation.y = root * (Row[2].x - Row[0].z);
|
||||
rotation.z = root * (Row[0].y - Row[1].x);
|
||||
} // End if > 0
|
||||
else
|
||||
{
|
||||
static int Next[3] = {1, 2, 0};
|
||||
i = 0;
|
||||
if(Row[1].y > Row[0].x) i = 1;
|
||||
if(Row[2].z > Row[i][i]) i = 2;
|
||||
j = Next[i];
|
||||
k = Next[j];
|
||||
|
||||
root = sqrt(Row[i][i] - Row[j][j] - Row[k][k] + 1.0f);
|
||||
|
||||
rotation.f32[i] = 0.5f * root;
|
||||
root = 0.5f / root;
|
||||
rotation.f32[j] = root * (Row[i][j] + Row[j][i]);
|
||||
rotation.f32[k] = root * (Row[i][k] + Row[k][i]);
|
||||
rotation.w = root * (Row[j][k] - Row[k][j]);
|
||||
} // End if <= 0
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
hlslpp::float4x4 recomposeMatrix(const hlslpp::quaternion& rotation, const hlslpp::float3& scale, const hlslpp::float3& skew,
|
||||
const hlslpp::float3& translation, const hlslpp::float4& perspective)
|
||||
{
|
||||
hlslpp::float4x4 m = hlslpp::float4x4::identity();
|
||||
|
||||
m[0][3] = perspective.x;
|
||||
m[1][3] = perspective.y;
|
||||
m[2][3] = perspective.z;
|
||||
m[3][3] = perspective.w;
|
||||
|
||||
m = mul(matrixTranslation(translation.xyz), m);
|
||||
m = mul(hlslpp::float4x4(rotation), m);
|
||||
|
||||
if (fabs(skew.x) > 0.0f) {
|
||||
hlslpp::float4x4 tmp = hlslpp::float4x4::identity();
|
||||
tmp[2][1] = skew.x;
|
||||
m = mul(tmp, m);
|
||||
}
|
||||
|
||||
if (fabs(skew.y) > 0.0f) {
|
||||
hlslpp::float4x4 tmp = hlslpp::float4x4::identity();
|
||||
tmp[2][0] = skew.y;
|
||||
m = mul(tmp, m);
|
||||
}
|
||||
|
||||
if (fabs(skew.z) > 0.0f) {
|
||||
hlslpp::float4x4 tmp = hlslpp::float4x4::identity();
|
||||
tmp[1][0] = skew.z;
|
||||
m = mul(tmp, m);
|
||||
}
|
||||
|
||||
m = mul(matrixScale(scale), m);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
DecomposedTransform::DecomposedTransform(const hlslpp::float4x4& mtx) {
|
||||
valid = decomposeMatrix(mtx, rotation, scale, skew, translation, perspective);
|
||||
}
|
||||
|
||||
DecomposedTransform lerpTransforms(const DecomposedTransform& a, const DecomposedTransform& b, float weight,
|
||||
bool lerpTranslation, bool lerpRotation, bool lerpScale, bool lerpSkew, bool lerpPerpsective, bool useSlerp)
|
||||
{
|
||||
assert(a.valid && b.valid);
|
||||
DecomposedTransform ret;
|
||||
|
||||
// Lerp the individual fields based on the provided flags.
|
||||
if (lerpTranslation) {
|
||||
ret.translation = lerp(a.translation, b.translation, weight);
|
||||
}
|
||||
else {
|
||||
ret.translation = b.translation;
|
||||
}
|
||||
|
||||
if (lerpRotation) {
|
||||
if (float(dot(a.rotation, b.rotation)) > 0.0f) {
|
||||
if (useSlerp) {
|
||||
ret.rotation = slerp(a.rotation, b.rotation, 1.0f - weight);
|
||||
}
|
||||
else {
|
||||
ret.rotation = lerp(a.rotation, b.rotation, weight);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (useSlerp) {
|
||||
ret.rotation = slerp(a.rotation, -b.rotation, 1.0f - weight);
|
||||
}
|
||||
else {
|
||||
ret.rotation = lerp(a.rotation, -b.rotation, weight);
|
||||
}
|
||||
}
|
||||
ret.rotation = normalize(ret.rotation);
|
||||
}
|
||||
else {
|
||||
ret.rotation = b.rotation;
|
||||
}
|
||||
|
||||
if (lerpScale) {
|
||||
ret.scale = lerp(a.scale, b.scale, weight);
|
||||
}
|
||||
else {
|
||||
ret.scale = b.scale;
|
||||
}
|
||||
|
||||
if (lerpSkew) {
|
||||
ret.skew = lerp(a.skew, b.skew, weight);
|
||||
}
|
||||
else {
|
||||
ret.skew = b.skew;
|
||||
}
|
||||
|
||||
if (lerpPerpsective) {
|
||||
ret.perspective = lerp(a.perspective, b.perspective, weight);
|
||||
}
|
||||
else {
|
||||
ret.perspective = b.perspective;
|
||||
}
|
||||
|
||||
// Mark the resultant transform as valid and return it.
|
||||
ret.valid = true;
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rt64_common.h"
|
||||
|
||||
namespace RT64 {
|
||||
inline constexpr uint32_t swappedOffset(uint32_t i) {
|
||||
return i ^ 3;
|
||||
}
|
||||
|
||||
float sqr(float x);
|
||||
bool matrixIsNaN(const hlslpp::float4x4 &m);
|
||||
hlslpp::float4x4 matrixScale(float scale);
|
||||
hlslpp::float4x4 matrixScale(const hlslpp::float3& scale);
|
||||
void matrixDecomposeViewProj(const hlslpp::float4x4 &vp, hlslpp::float4x4 &v, hlslpp::float4x4 &p);
|
||||
hlslpp::float4x4 matrixTranslation(const hlslpp::float3 &t);
|
||||
hlslpp::float3x3 matrixRotationX(float rad);
|
||||
hlslpp::float3x3 matrixRotationY(float rad);
|
||||
hlslpp::float3x3 matrixRotationZ(float rad);
|
||||
hlslpp::float3x3 extract3x3(const hlslpp::float4x4 &m);
|
||||
hlslpp::float3x3 rotationFrom3x3(const hlslpp::float3x3 &m);
|
||||
float traceFrom3x3(const hlslpp::float3x3 &m);
|
||||
float matrixDifference(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b);
|
||||
bool isMatrixAffine(const hlslpp::float4x4 &m);
|
||||
bool isMatrixIdentity(const hlslpp::float4x4 &m);
|
||||
bool isMatrixViewProj(const hlslpp::float4x4 &m);
|
||||
hlslpp::float4x4 lerpMatrix(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b, float t);
|
||||
hlslpp::float4x4 lerpMatrix3x3(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b, float t);
|
||||
hlslpp::float4x4 lerpMatrixComponents(const hlslpp::float4x4 &a, const hlslpp::float4x4 &b, bool linear, bool angular, bool perspective, float t);
|
||||
float nearPlaneFromProj(const hlslpp::float4x4 &m);
|
||||
float farPlaneFromProj(const hlslpp::float4x4 &m);
|
||||
float fovFromProj(const hlslpp::float4x4 &m);
|
||||
float pseudoRandom(uint32_t &s);
|
||||
hlslpp::float2 barycentricCoordinates(const hlslpp::float2 p, const hlslpp::float2 a, const hlslpp::float2 b, const hlslpp::float2 c);
|
||||
bool decomposeMatrix(const hlslpp::float4x4& mtx, hlslpp::quaternion& rotation, hlslpp::float3& scale, hlslpp::float3& skew,
|
||||
hlslpp::float3& translation, hlslpp::float4& perspective);
|
||||
hlslpp::float4x4 recomposeMatrix(const hlslpp::quaternion& rotation, const hlslpp::float3& scale, const hlslpp::float3& skew,
|
||||
const hlslpp::float3& translation, const hlslpp::float4& perspective);
|
||||
|
||||
struct DecomposedTransform {
|
||||
hlslpp::quaternion rotation;
|
||||
hlslpp::float3 scale;
|
||||
hlslpp::float3 skew;
|
||||
hlslpp::float3 translation;
|
||||
hlslpp::float4 perspective;
|
||||
bool valid = false;
|
||||
|
||||
DecomposedTransform() = default;
|
||||
DecomposedTransform(const hlslpp::float4x4& mtx);
|
||||
};
|
||||
|
||||
DecomposedTransform lerpTransforms(const DecomposedTransform& a, const DecomposedTransform& b, float weight,
|
||||
bool lerpTranslation, bool lerpRotation, bool lerpScale, bool lerpSkew, bool lerpPerpsective, bool useSlerp);
|
||||
};
|
||||
@@ -1,82 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_profiling_timer.h"
|
||||
|
||||
#include <numeric>
|
||||
|
||||
namespace RT64 {
|
||||
// ProfilingTimer
|
||||
|
||||
ProfilingTimer::ProfilingTimer() {
|
||||
historyIndex = 0;
|
||||
accumulation = 0.0;
|
||||
startedTimestamp = {};
|
||||
}
|
||||
|
||||
ProfilingTimer::ProfilingTimer(size_t historySize) : ProfilingTimer() {
|
||||
setCount(historySize);
|
||||
}
|
||||
|
||||
void ProfilingTimer::setCount(size_t historyCount) {
|
||||
history.clear();
|
||||
history.resize(historyCount, 0);
|
||||
}
|
||||
|
||||
void ProfilingTimer::clear() {
|
||||
setCount(history.size());
|
||||
historyIndex = 0;
|
||||
accumulation = 0.0;
|
||||
}
|
||||
|
||||
void ProfilingTimer::reset() {
|
||||
accumulation = 0.0;
|
||||
}
|
||||
|
||||
void ProfilingTimer::start() {
|
||||
assert(startedTimestamp == Timestamp{});
|
||||
startedTimestamp = Timer::current();
|
||||
}
|
||||
|
||||
void ProfilingTimer::end() {
|
||||
assert(startedTimestamp > Timestamp{});
|
||||
accumulation += Timer::deltaMicroseconds(startedTimestamp, Timer::current()) / 1000.0;
|
||||
startedTimestamp = {};
|
||||
}
|
||||
|
||||
void ProfilingTimer::log() {
|
||||
assert(!history.empty());
|
||||
history[historyIndex] = accumulation;
|
||||
historyIndex = (historyIndex + 1) % history.size();
|
||||
}
|
||||
|
||||
void ProfilingTimer::logAndRestart() {
|
||||
if (startedTimestamp == Timestamp{}) {
|
||||
reset();
|
||||
start();
|
||||
}
|
||||
|
||||
end();
|
||||
log();
|
||||
reset();
|
||||
start();
|
||||
}
|
||||
|
||||
uint32_t ProfilingTimer::index() const {
|
||||
return historyIndex;
|
||||
}
|
||||
|
||||
size_t ProfilingTimer::size() const {
|
||||
return history.size();
|
||||
}
|
||||
|
||||
const double *ProfilingTimer::data() const {
|
||||
return history.data();
|
||||
}
|
||||
|
||||
double ProfilingTimer::average() const {
|
||||
assert(!history.empty());
|
||||
return std::accumulate(history.begin(), history.end(), 0.0) / history.size();
|
||||
}
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "rt64_elapsed_timer.h"
|
||||
|
||||
namespace RT64 {
|
||||
struct ProfilingTimer {
|
||||
std::vector<double> history;
|
||||
uint32_t historyIndex;
|
||||
double accumulation;
|
||||
Timestamp startedTimestamp;
|
||||
|
||||
ProfilingTimer();
|
||||
ProfilingTimer(size_t historyCount);
|
||||
void setCount(size_t historyCount);
|
||||
void clear();
|
||||
void reset();
|
||||
void start();
|
||||
void end();
|
||||
void log();
|
||||
|
||||
// Convenience function for logging the time between each call to it.
|
||||
void logAndRestart();
|
||||
uint32_t index() const;
|
||||
size_t size() const;
|
||||
const double *data() const;
|
||||
double average() const;
|
||||
};
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
namespace RT64 {
|
||||
struct Sommelier {
|
||||
static bool detectWine() {
|
||||
HMODULE dllHandle = GetModuleHandle("ntdll.dll");
|
||||
if (dllHandle != NULL) {
|
||||
return GetProcAddress(dllHandle, "wine_get_version") != NULL;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_thread.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <thread>
|
||||
|
||||
#if defined(_WIN64)
|
||||
# include <Windows.h>
|
||||
# include "utf8conv/utf8conv.h"
|
||||
#elif defined(__linux__)
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
namespace RT64 {
|
||||
# if defined(_WIN32)
|
||||
static int toWindowsPriority(Thread::Priority priority) {
|
||||
switch (priority) {
|
||||
case Thread::Priority::Idle:
|
||||
return THREAD_PRIORITY_IDLE;
|
||||
case Thread::Priority::Lowest:
|
||||
return THREAD_PRIORITY_LOWEST;
|
||||
case Thread::Priority::Low:
|
||||
return THREAD_PRIORITY_BELOW_NORMAL;
|
||||
case Thread::Priority::Normal:
|
||||
return THREAD_PRIORITY_NORMAL;
|
||||
case Thread::Priority::High:
|
||||
return THREAD_PRIORITY_ABOVE_NORMAL;
|
||||
case Thread::Priority::Highest:
|
||||
return THREAD_PRIORITY_HIGHEST;
|
||||
default:
|
||||
assert(false && "Unknown thread priority.");
|
||||
return THREAD_PRIORITY_NORMAL;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
// Thread
|
||||
|
||||
void Thread::setCurrentThreadName(const std::string &str) {
|
||||
# if defined(_WIN32)
|
||||
std::wstring nameWide = win32::Utf8ToUtf16(str);
|
||||
SetThreadDescription(GetCurrentThread(), nameWide.c_str());
|
||||
# elif defined(__linux__)
|
||||
pthread_setname_np(pthread_self(), str.c_str());
|
||||
# elif defined(__APPLE__)
|
||||
pthread_setname_np(str.c_str());
|
||||
# else
|
||||
static_assert(false, "Unimplemented");
|
||||
# endif
|
||||
}
|
||||
|
||||
void Thread::setCurrentThreadPriority(Priority priority) {
|
||||
# if defined(_WIN32)
|
||||
SetThreadPriority(GetCurrentThread(), toWindowsPriority(priority));
|
||||
# elif defined(__linux__) || defined(__APPLE__)
|
||||
// On Linux, thread priorities can't be changed under the default scheduler policy (SCHED_OTHER) and the other policies
|
||||
// that are available without root privileges are lower priority. Instead you can set the thread's "nice" value, which ranges
|
||||
// from -20 to 19 (lower being higher priority). However, by strict POSIX spec "nice" is meant to be per-process instead of
|
||||
// per-thread. Therefore to avoid issues in case Linux is modified to match the spec in the future, this function does nothing.
|
||||
(void)priority;
|
||||
# else
|
||||
static_assert(false, "Unimplemented");
|
||||
# endif
|
||||
}
|
||||
|
||||
void Thread::sleepMilliseconds(uint32_t millis) {
|
||||
# if defined(_WIN32)
|
||||
// The implementations of std::chrono::sleep_until and sleep_for were affected by changing the system clock backwards in older versions
|
||||
// of Microsoft's STL. This was fixed as of Visual Studio 2022 17.9, but to be safe RT64 uses Win32 Sleep directly.
|
||||
Sleep(millis);
|
||||
# else
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(millis));
|
||||
# endif
|
||||
}
|
||||
};
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace RT64 {
|
||||
struct Thread {
|
||||
enum class Priority {
|
||||
Idle,
|
||||
Lowest,
|
||||
Low,
|
||||
Normal,
|
||||
High,
|
||||
Highest
|
||||
};
|
||||
|
||||
static void setCurrentThreadName(const std::string &str);
|
||||
static void setCurrentThreadPriority(Priority priority);
|
||||
static void sleepMilliseconds(uint32_t millis);
|
||||
};
|
||||
};
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_timer.h"
|
||||
|
||||
namespace RT64 {
|
||||
// Timer
|
||||
|
||||
void Timer::initialize() {
|
||||
}
|
||||
|
||||
Timestamp Timer::current() {
|
||||
return std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
|
||||
int64_t Timer::deltaMicroseconds(const Timestamp t1, const Timestamp t2) {
|
||||
return std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count();
|
||||
}
|
||||
};
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace RT64 {
|
||||
typedef std::chrono::high_resolution_clock::time_point Timestamp;
|
||||
|
||||
struct Timer {
|
||||
static void initialize();
|
||||
static Timestamp current();
|
||||
static int64_t deltaMicroseconds(const Timestamp t1, const Timestamp t2);
|
||||
};
|
||||
};
|
||||
@@ -1,155 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_user_configuration.h"
|
||||
|
||||
#if RT64_BUILD_PLUGIN
|
||||
# include "api/rt64_api_common.h"
|
||||
#endif
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
namespace RT64 {
|
||||
#if defined(_WIN32)
|
||||
UserConfiguration::GraphicsAPI UserConfiguration::DefaultGraphicsAPI = UserConfiguration::GraphicsAPI::D3D12;
|
||||
#else
|
||||
UserConfiguration::GraphicsAPI UserConfiguration::DefaultGraphicsAPI = UserConfiguration::GraphicsAPI::Vulkan;
|
||||
#endif
|
||||
|
||||
void to_json(json &j, const UserConfiguration &cfg) {
|
||||
j["graphicsAPI"] = cfg.graphicsAPI;
|
||||
j["resolution"] = cfg.resolution;
|
||||
j["antialiasing"] = cfg.antialiasing;
|
||||
j["resolutionMultiplier"] = cfg.resolutionMultiplier;
|
||||
j["downsampleMultiplier"] = cfg.downsampleMultiplier;
|
||||
j["filtering"] = cfg.filtering;
|
||||
j["aspectRatio"] = cfg.aspectRatio;
|
||||
j["aspectTarget"] = cfg.aspectTarget;
|
||||
j["extAspectRatio"] = cfg.extAspectRatio;
|
||||
j["extAspectTarget"] = cfg.extAspectTarget;
|
||||
j["upscale2D"] = cfg.upscale2D;
|
||||
j["threePointFiltering"] = cfg.threePointFiltering;
|
||||
j["refreshRate"] = cfg.refreshRate;
|
||||
j["refreshRateTarget"] = cfg.refreshRateTarget;
|
||||
j["internalColorFormat"] = cfg.internalColorFormat;
|
||||
j["idleWorkActive"] = cfg.idleWorkActive;
|
||||
j["developerMode"] = cfg.developerMode;
|
||||
}
|
||||
|
||||
void from_json(const json &j, UserConfiguration &cfg) {
|
||||
UserConfiguration defaultCfg;
|
||||
cfg.graphicsAPI = j.value("graphicsAPI", defaultCfg.graphicsAPI);
|
||||
cfg.resolution = j.value("resolution", defaultCfg.resolution);
|
||||
cfg.antialiasing = j.value("antialiasing", defaultCfg.antialiasing);
|
||||
cfg.resolutionMultiplier = j.value("resolutionMultiplier", defaultCfg.resolutionMultiplier);
|
||||
cfg.downsampleMultiplier = j.value("downsampleMultiplier", defaultCfg.downsampleMultiplier);
|
||||
cfg.filtering = j.value("filtering", defaultCfg.filtering);
|
||||
cfg.aspectRatio = j.value("aspectRatio", defaultCfg.aspectRatio);
|
||||
cfg.aspectTarget = j.value("aspectTarget", defaultCfg.aspectTarget);
|
||||
cfg.extAspectRatio = j.value("extAspectRatio", defaultCfg.extAspectRatio);
|
||||
cfg.extAspectTarget = j.value("extAspectTarget", defaultCfg.extAspectTarget);
|
||||
cfg.upscale2D = j.value("upscale2D", defaultCfg.upscale2D);
|
||||
cfg.threePointFiltering = j.value("threePointFiltering", defaultCfg.threePointFiltering);
|
||||
cfg.refreshRate = j.value("refreshRate", defaultCfg.refreshRate);
|
||||
cfg.refreshRateTarget = j.value("refreshRateTarget", defaultCfg.refreshRateTarget);
|
||||
cfg.internalColorFormat = j.value("internalColorFormat", defaultCfg.internalColorFormat);
|
||||
cfg.idleWorkActive = j.value("idleWorkActive", defaultCfg.idleWorkActive);
|
||||
cfg.developerMode = j.value("developerMode", defaultCfg.developerMode);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void clampEnum(T &e) {
|
||||
e = std::clamp(e, T(0), T(int(T::OptionCount) - 1));
|
||||
}
|
||||
|
||||
// Configuration
|
||||
|
||||
const int UserConfiguration::ResolutionMultiplierLimit = 32;
|
||||
|
||||
UserConfiguration::UserConfiguration() {
|
||||
# ifdef RT64_BUILD_PLUGIN
|
||||
const bool isPJ64 = (RT64::API.apiType == RT64::APIType::Project64);
|
||||
if (isPJ64) {
|
||||
graphicsAPI = DefaultGraphicsAPI;
|
||||
} else {
|
||||
graphicsAPI = UserConfiguration::GraphicsAPI::Vulkan;
|
||||
}
|
||||
# else
|
||||
graphicsAPI = DefaultGraphicsAPI;
|
||||
# endif
|
||||
resolution = Resolution::WindowIntegerScale;
|
||||
antialiasing = Antialiasing::None;
|
||||
resolutionMultiplier = 2.0f;
|
||||
downsampleMultiplier = 1;
|
||||
filtering = Filtering::AntiAliasedPixelScaling;
|
||||
aspectRatio = AspectRatio::Original;
|
||||
aspectTarget = 16.0f / 9.0f;
|
||||
extAspectRatio = AspectRatio::Original;
|
||||
extAspectTarget = 16.0f / 9.0f;
|
||||
upscale2D = Upscale2D::ScaledOnly;
|
||||
threePointFiltering = true;
|
||||
refreshRate = RefreshRate::Original;
|
||||
refreshRateTarget = 60;
|
||||
internalColorFormat = InternalColorFormat::Automatic;
|
||||
idleWorkActive = true;
|
||||
developerMode = false;
|
||||
}
|
||||
|
||||
void UserConfiguration::validate() {
|
||||
clampEnum<GraphicsAPI>(graphicsAPI);
|
||||
clampEnum<Resolution>(resolution);
|
||||
clampEnum<Antialiasing>(antialiasing);
|
||||
clampEnum<Filtering>(filtering);
|
||||
clampEnum<AspectRatio>(aspectRatio);
|
||||
clampEnum<AspectRatio>(extAspectRatio);
|
||||
clampEnum<Upscale2D>(upscale2D);
|
||||
clampEnum<RefreshRate>(refreshRate);
|
||||
clampEnum<InternalColorFormat>(internalColorFormat);
|
||||
resolutionMultiplier = std::clamp<double>(resolutionMultiplier, 0.0f, ResolutionMultiplierLimit);
|
||||
downsampleMultiplier = std::clamp<int>(downsampleMultiplier, 1, ResolutionMultiplierLimit);
|
||||
aspectTarget = std::clamp<double>(aspectTarget, 0.1f, 100.0f);
|
||||
extAspectTarget = std::clamp<double>(extAspectTarget, 0.1f, 100.0f);
|
||||
refreshRateTarget = std::clamp<int>(refreshRateTarget, 10, 1000);
|
||||
}
|
||||
|
||||
uint32_t UserConfiguration::msaaSampleCount() const {
|
||||
return UserConfiguration::msaaSampleCount(antialiasing);
|
||||
}
|
||||
|
||||
uint32_t UserConfiguration::msaaSampleCount(Antialiasing antialiasing) {
|
||||
switch (antialiasing) {
|
||||
case Antialiasing::MSAA2X:
|
||||
return 2;
|
||||
case Antialiasing::MSAA4X:
|
||||
return 4;
|
||||
case Antialiasing::MSAA8X:
|
||||
return 8;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ConfigurationJSON
|
||||
|
||||
bool ConfigurationJSON::read(UserConfiguration &cfg, std::istream &stream) {
|
||||
try {
|
||||
json jroot;
|
||||
stream >> jroot;
|
||||
cfg = jroot.value("configuration", UserConfiguration());
|
||||
return !stream.bad();
|
||||
}
|
||||
catch (const nlohmann::detail::exception &e) {
|
||||
fprintf(stderr, "JSON parsing error: %s\n", e.what());
|
||||
cfg = UserConfiguration();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ConfigurationJSON::write(const UserConfiguration &cfg, std::ostream &stream) {
|
||||
json jroot;
|
||||
jroot["configuration"] = cfg;
|
||||
stream << std::setw(4) << jroot << std::endl;
|
||||
return !stream.bad();
|
||||
}
|
||||
};
|
||||
@@ -1,152 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <json/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace RT64 {
|
||||
struct UserConfiguration {
|
||||
static const int ResolutionMultiplierLimit;
|
||||
|
||||
enum class GraphicsAPI {
|
||||
D3D12,
|
||||
Vulkan,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
static GraphicsAPI DefaultGraphicsAPI;
|
||||
|
||||
enum class Resolution {
|
||||
Original,
|
||||
WindowIntegerScale,
|
||||
Manual,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
enum class Antialiasing {
|
||||
None,
|
||||
MSAA2X,
|
||||
MSAA4X,
|
||||
MSAA8X,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
enum class Filtering {
|
||||
Nearest,
|
||||
Linear,
|
||||
AntiAliasedPixelScaling,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
enum class AspectRatio {
|
||||
Original,
|
||||
Expand,
|
||||
Manual,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
enum class Upscale2D {
|
||||
Original,
|
||||
ScaledOnly,
|
||||
All,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
enum class RefreshRate {
|
||||
Original,
|
||||
Display,
|
||||
Manual,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
enum class InternalColorFormat {
|
||||
Standard,
|
||||
High,
|
||||
Automatic,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
GraphicsAPI graphicsAPI;
|
||||
Resolution resolution;
|
||||
Antialiasing antialiasing;
|
||||
double resolutionMultiplier;
|
||||
int downsampleMultiplier;
|
||||
Filtering filtering;
|
||||
AspectRatio aspectRatio;
|
||||
double aspectTarget;
|
||||
AspectRatio extAspectRatio;
|
||||
double extAspectTarget;
|
||||
Upscale2D upscale2D;
|
||||
bool threePointFiltering;
|
||||
RefreshRate refreshRate;
|
||||
int refreshRateTarget;
|
||||
InternalColorFormat internalColorFormat;
|
||||
bool idleWorkActive;
|
||||
bool developerMode;
|
||||
|
||||
UserConfiguration();
|
||||
void validate();
|
||||
uint32_t msaaSampleCount() const;
|
||||
static uint32_t msaaSampleCount(Antialiasing antialiasing);
|
||||
};
|
||||
|
||||
extern void to_json(json &j, const UserConfiguration &cfg);
|
||||
extern void from_json(const json &j, UserConfiguration &cfg);
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::GraphicsAPI, {
|
||||
{ UserConfiguration::GraphicsAPI::D3D12, "D3D12" },
|
||||
{ UserConfiguration::GraphicsAPI::Vulkan, "Vulkan" }
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::Resolution, {
|
||||
{ UserConfiguration::Resolution::Original, "Original" },
|
||||
{ UserConfiguration::Resolution::WindowIntegerScale, "WindowIntegerScale" },
|
||||
{ UserConfiguration::Resolution::Manual, "Manual" }
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::AspectRatio, {
|
||||
{ UserConfiguration::AspectRatio::Original, "Original" },
|
||||
{ UserConfiguration::AspectRatio::Expand, "Expand" },
|
||||
{ UserConfiguration::AspectRatio::Manual, "Manual" }
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::Antialiasing, {
|
||||
{ UserConfiguration::Antialiasing::None, "None" },
|
||||
{ UserConfiguration::Antialiasing::MSAA2X, "MSAA2X" },
|
||||
{ UserConfiguration::Antialiasing::MSAA4X, "MSAA4X" },
|
||||
{ UserConfiguration::Antialiasing::MSAA8X, "MSAA8X" }
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::Filtering, {
|
||||
{ UserConfiguration::Filtering::Nearest, "Nearest" },
|
||||
{ UserConfiguration::Filtering::Linear, "Linear" },
|
||||
{ UserConfiguration::Filtering::AntiAliasedPixelScaling, "AntiAliasedPixelScaling" }
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::Upscale2D, {
|
||||
{ UserConfiguration::Upscale2D::Original, "Original" },
|
||||
{ UserConfiguration::Upscale2D::ScaledOnly, "ScaledOnly" },
|
||||
{ UserConfiguration::Upscale2D::All, "All" }
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::RefreshRate, {
|
||||
{ UserConfiguration::RefreshRate::Original, "Original" },
|
||||
{ UserConfiguration::RefreshRate::Display, "Display" },
|
||||
{ UserConfiguration::RefreshRate::Manual, "Manual" }
|
||||
});
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(UserConfiguration::InternalColorFormat, {
|
||||
{ UserConfiguration::InternalColorFormat::Standard, "Standard" },
|
||||
{ UserConfiguration::InternalColorFormat::High, "High" },
|
||||
{ UserConfiguration::InternalColorFormat::Automatic, "Automatic" }
|
||||
});
|
||||
|
||||
struct ConfigurationJSON {
|
||||
static bool read(UserConfiguration &cfg, std::istream &stream);
|
||||
static bool write(const UserConfiguration &cfg, std::ostream &stream);
|
||||
};
|
||||
};
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#include "rt64_user_paths.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
# include <unistd.h>
|
||||
# include <pwd.h>
|
||||
#elif defined(_WIN32)
|
||||
# include <Shlobj.h>
|
||||
#endif
|
||||
|
||||
namespace RT64 {
|
||||
// UserPaths
|
||||
|
||||
const std::filesystem::path GamesDirectory = "games";
|
||||
const std::filesystem::path ConfigurationFile = "rt64.json";
|
||||
const std::filesystem::path ImGuiFile = "rt64-imgui.ini";
|
||||
const std::filesystem::path LogFile = "rt64.log";
|
||||
|
||||
std::filesystem::path UserPaths::detectDataPath(const std::filesystem::path &appId) {
|
||||
std::filesystem::path resultPath;
|
||||
|
||||
# if defined(_WIN32)
|
||||
PWSTR knownPath = NULL;
|
||||
HRESULT result = SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &knownPath);
|
||||
if (result == S_OK) {
|
||||
resultPath = std::filesystem::path{ knownPath } / appId;
|
||||
}
|
||||
|
||||
CoTaskMemFree(knownPath);
|
||||
# elif defined(__linux__)
|
||||
const char *homeDir = getenv("HOME");
|
||||
if (homeDir == nullptr) {
|
||||
homeDir = getpwuid(getuid())->pw_dir;
|
||||
}
|
||||
|
||||
if (homeDir != nullptr) {
|
||||
// Prefer to store in the .config directory if it exists. Use the home directory otherwise.
|
||||
const std::string appDirName = std::string(".") + std::string(appId.c_str());
|
||||
std::filesystem::path homePath = homeDir;
|
||||
std::filesystem::path configPath = homePath / ".config";
|
||||
if (std::filesystem::exists(configPath)) {
|
||||
resultPath = configPath / appDirName;
|
||||
}
|
||||
else {
|
||||
resultPath = homePath / appDirName;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
return resultPath;
|
||||
}
|
||||
|
||||
void UserPaths::setupPaths(const std::filesystem::path &dataPath) {
|
||||
this->dataPath = dataPath;
|
||||
|
||||
if (!dataPath.empty()) {
|
||||
gamesPath = dataPath / GamesDirectory;
|
||||
configurationPath = dataPath / ConfigurationFile;
|
||||
imguiPath = dataPath / ImGuiFile;
|
||||
logPath = dataPath / LogFile;
|
||||
}
|
||||
}
|
||||
|
||||
bool UserPaths::isEmpty() const {
|
||||
return dataPath.empty();
|
||||
}
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// RT64
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
namespace RT64 {
|
||||
struct UserPaths {
|
||||
std::filesystem::path dataPath;
|
||||
std::filesystem::path gamesPath;
|
||||
std::filesystem::path configurationPath;
|
||||
std::filesystem::path imguiPath;
|
||||
std::filesystem::path logPath;
|
||||
|
||||
std::filesystem::path detectDataPath(const std::filesystem::path &appId);
|
||||
void setupPaths(const std::filesystem::path &dataPath);
|
||||
bool isEmpty() const;
|
||||
};
|
||||
};
|
||||
@@ -1,2 +0,0 @@
|
||||
build/
|
||||
bin/
|
||||
@@ -1,23 +0,0 @@
|
||||
# 2.0.1 (2022-04-05)
|
||||
|
||||
A maintenance release with some bug fixes and improvements. There are no changes in the library API.
|
||||
|
||||
- Fixed an assert failing when detailed JSON dump was made while a custom pool was present with specified string name (#36, thanks @rbertin-aso).
|
||||
- Fixed image height calculation in JSON dump visualization tool "GpuMemDumpVis.py" (#37, thanks @rbertin-aso).
|
||||
- Added JSON Schema for JSON dump format - see file "tools\GpuMemDumpVis\GpuMemDump.schema.json".
|
||||
- Added documentation section "Resource reference counting".
|
||||
|
||||
# 2.0.0 (2022-03-25)
|
||||
|
||||
So much has changed since the first release that it doesn’t make much sense to compare the differences. Here are the most important features that the library now provides:
|
||||
|
||||
- Powerful custom pools, which give an opportunity to not only keep certain resources together, reserve some minimum or limit the maximum amount of memory they can take, but also to pass additional allocation parameters unavailable to simple allocations. Among them, probably the most interesting is `POOL_DESC::HeapProperties`, which allows you to specify parameters of a custom memory type, which may be useful on UMA platforms. Committed allocations can now also be created in custom pools.
|
||||
- The API for statistics and budget has been redesigned - see structures `Statistics`, `Budget`, `DetailedStatistics`, `TotalStatistics`.
|
||||
- The library exposes its core allocation algorithm via the “virtual allocator” interface. This can be used to allocate pieces of custom memory or whatever you like, even something completely unrelated to graphics.
|
||||
- The allocation algorithm has been replaced with the new, more efficient TLSF.
|
||||
- Added support for defragmentation.
|
||||
- Objects of the library can be used with smart pointers designed for COM objects.
|
||||
|
||||
# 1.0.0 (2019-09-02)
|
||||
|
||||
First published version.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user