Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bfe3668f0 | |||
| 74a175401a | |||
| 609c25f3e4 | |||
| dc1cb2a7bc | |||
| 3cbb0262c9 | |||
| a1688e342c | |||
| dbd7c70ffd | |||
| 97c6d8407a | |||
| e66005149a | |||
| b12a2f7ea5 |
@@ -6,7 +6,7 @@ or our discord:
|
||||
https://discord.me/RPCS3
|
||||
|
||||
PLEASE READ THE GUIDELINES BEFORE OPENING AN ISSUE:
|
||||
https://github.com/RPCS3/rpcs3/blob/master/.github/CONTRIBUTING.md
|
||||
https://github.com/RPCS3/rpcs3/blob/master/CONTRIBUTING.md
|
||||
|
||||
====================================================
|
||||
|
||||
|
||||
@@ -59,8 +59,6 @@ rpcs3/git-version.h
|
||||
|
||||
# Visual Studio Files
|
||||
.vs/*
|
||||
.vscode/*
|
||||
*.ipch
|
||||
*.vspx
|
||||
*.psess
|
||||
*.VC.*
|
||||
@@ -94,10 +92,6 @@ CMakeCache.txt
|
||||
rpcs3/cotire/*
|
||||
rpcs3/rpcs3_*_cotire.cmake
|
||||
|
||||
# kdevelop
|
||||
*.kdev4
|
||||
.kdev4/*
|
||||
|
||||
# Qt
|
||||
moc_*.cpp
|
||||
qrc_resources.cpp
|
||||
|
||||
+3
-7
@@ -7,14 +7,14 @@
|
||||
ignore = dirty
|
||||
[submodule "llvm"]
|
||||
path = llvm
|
||||
url = https://github.com/llvm-mirror/llvm
|
||||
url = https://github.com/RPCS3/llvm
|
||||
branch = release_60
|
||||
[submodule "GSL"]
|
||||
path = 3rdparty/GSL
|
||||
url = https://github.com/Microsoft/GSL.git
|
||||
[submodule "libpng"]
|
||||
path = 3rdparty/libpng
|
||||
url = https://github.com/Zangetsu38/libpng
|
||||
url = https://github.com/RPCS3/libpng
|
||||
ignore = dirty
|
||||
[submodule "Vulkan/glslang"]
|
||||
path = Vulkan/glslang
|
||||
@@ -33,7 +33,7 @@
|
||||
url = https://github.com/madler/zlib
|
||||
[submodule "3rdparty/hidapi"]
|
||||
path = 3rdparty/hidapi
|
||||
url = https://github.com/Zangetsu38/hidapi
|
||||
url = https://github.com/RPCS3/hidapi
|
||||
branch = master
|
||||
ignore = dirty
|
||||
[submodule "3rdparty/Optional"]
|
||||
@@ -42,7 +42,3 @@
|
||||
[submodule "3rdparty/pugixml"]
|
||||
path = 3rdparty/pugixml
|
||||
url = https://github.com/zeux/pugixml
|
||||
[submodule "polly"]
|
||||
path = polly
|
||||
url = https://github.com/llvm-mirror/polly
|
||||
branch = release_60
|
||||
|
||||
+8
-8
@@ -52,7 +52,7 @@ before_script:
|
||||
- git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal 3rdparty/hidapi 3rdparty/Optional Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers
|
||||
- mkdir build
|
||||
- cd build
|
||||
- export CMAKE_PREFIX_PATH=~/Qt/5.10.1/gcc_64/lib/cmake
|
||||
- export CMAKE_PREFIX_PATH=~/Qt/5.10.0/gcc_64/lib/cmake
|
||||
- export CXXFLAGS="$CXXFLAGS -DTRAVIS=true";
|
||||
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
||||
export CXXFLAGS="$CXXFLAGS -DBRANCH=$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH";
|
||||
@@ -63,20 +63,20 @@ before_script:
|
||||
- ninja
|
||||
- # AppImage generation
|
||||
- if [ -n "$UPLOAD_URL" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$CC" = "clang" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
||||
export LD_LIBRARY_PATH=~/Qt/5.10.1/gcc_64/lib;
|
||||
export LD_LIBRARY_PATH=~/Qt/5.10.0/gcc_64/lib;
|
||||
DESTDIR=appdir ninja install ; find appdir/ ;
|
||||
find ../bin ;
|
||||
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" ;
|
||||
chmod a+x linuxdeployqt*.AppImage ;
|
||||
export PATH=~/Qt/5.10.1/gcc_64/bin/:${PATH} ;
|
||||
export PATH=~/Qt/5.10.0/gcc_64/bin/:${PATH} ;
|
||||
./linuxdeployqt*.AppImage --appimage-extract ;
|
||||
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs ;
|
||||
mkdir ./appdir/usr/plugins/xcbglintegrations/ ;
|
||||
mkdir ./appdir/usr/plugins/imageformats/ ;
|
||||
cp ~/Qt/5.10.1/gcc_64/lib/libQt5Svg.so.5 ./appdir/usr/lib/ ;
|
||||
cp ~/Qt/5.10.1/gcc_64/plugins/xcbglintegrations/* ./appdir/usr/plugins/xcbglintegrations/ ;
|
||||
cp ~/Qt/5.10.1/gcc_64/plugins/imageformats/* ./appdir/usr/plugins/imageformats/ ;
|
||||
cp ~/Qt/5.10.1/gcc_64/plugins/platforms/* ./appdir/usr/plugins/platforms/ ;
|
||||
cp ~/Qt/5.10.0/gcc_64/lib/libQt5Svg.so.5 ./appdir/usr/lib/ ;
|
||||
cp ~/Qt/5.10.0/gcc_64/plugins/xcbglintegrations/* ./appdir/usr/plugins/xcbglintegrations/ ;
|
||||
cp ~/Qt/5.10.0/gcc_64/plugins/imageformats/* ./appdir/usr/plugins/imageformats/ ;
|
||||
cp ~/Qt/5.10.0/gcc_64/plugins/platforms/* ./appdir/usr/plugins/platforms/ ;
|
||||
rm ./appdir/usr/lib/libfreetype.so.6 ;
|
||||
export PATH=${TRAVIS_BUILD_DIR}/build/squashfs-root/usr/bin/:${PATH} ;
|
||||
./squashfs-root/usr/bin/appimagetool ${TRAVIS_BUILD_DIR}/build/appdir ;
|
||||
@@ -117,7 +117,7 @@ addons:
|
||||
- libstdc++-5-dev
|
||||
- lib32stdc++6
|
||||
- zlib1g-dev
|
||||
# We need to install qt 5.10.1 manually because the version trusty provides is too old.
|
||||
# We need to install qt 5.10.0 manually because the version trusty provides is too old.
|
||||
#- qtbase5-dev
|
||||
- libudev-dev
|
||||
- libevdev-dev
|
||||
|
||||
Vendored
+25
-699
File diff suppressed because it is too large
Load Diff
Vendored
+2
-68
@@ -13,8 +13,8 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Or go to http://www.gnu.org/copyleft/lgpl.html
|
||||
*/
|
||||
|
||||
@@ -393,72 +393,6 @@ ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_BFORMAT
|
||||
#define AL_EXT_BFORMAT 1
|
||||
#define AL_FORMAT_BFORMAT2D_8 0x20021
|
||||
#define AL_FORMAT_BFORMAT2D_16 0x20022
|
||||
#define AL_FORMAT_BFORMAT2D_FLOAT32 0x20023
|
||||
#define AL_FORMAT_BFORMAT3D_8 0x20031
|
||||
#define AL_FORMAT_BFORMAT3D_16 0x20032
|
||||
#define AL_FORMAT_BFORMAT3D_FLOAT32 0x20033
|
||||
#endif
|
||||
|
||||
#ifndef AL_EXT_MULAW_BFORMAT
|
||||
#define AL_EXT_MULAW_BFORMAT 1
|
||||
#define AL_FORMAT_BFORMAT2D_MULAW 0x10031
|
||||
#define AL_FORMAT_BFORMAT3D_MULAW 0x10032
|
||||
#endif
|
||||
|
||||
#ifndef ALC_SOFT_HRTF
|
||||
#define ALC_SOFT_HRTF 1
|
||||
#define ALC_HRTF_SOFT 0x1992
|
||||
#define ALC_DONT_CARE_SOFT 0x0002
|
||||
#define ALC_HRTF_STATUS_SOFT 0x1993
|
||||
#define ALC_HRTF_DISABLED_SOFT 0x0000
|
||||
#define ALC_HRTF_ENABLED_SOFT 0x0001
|
||||
#define ALC_HRTF_DENIED_SOFT 0x0002
|
||||
#define ALC_HRTF_REQUIRED_SOFT 0x0003
|
||||
#define ALC_HRTF_HEADPHONES_DETECTED_SOFT 0x0004
|
||||
#define ALC_HRTF_UNSUPPORTED_FORMAT_SOFT 0x0005
|
||||
#define ALC_NUM_HRTF_SPECIFIERS_SOFT 0x1994
|
||||
#define ALC_HRTF_SPECIFIER_SOFT 0x1995
|
||||
#define ALC_HRTF_ID_SOFT 0x1996
|
||||
typedef const ALCchar* (ALC_APIENTRY*LPALCGETSTRINGISOFT)(ALCdevice *device, ALCenum paramName, ALCsizei index);
|
||||
typedef ALCboolean (ALC_APIENTRY*LPALCRESETDEVICESOFT)(ALCdevice *device, const ALCint *attribs);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
ALC_API const ALCchar* ALC_APIENTRY alcGetStringiSOFT(ALCdevice *device, ALCenum paramName, ALCsizei index);
|
||||
ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCint *attribs);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_gain_clamp_ex
|
||||
#define AL_SOFT_gain_clamp_ex 1
|
||||
#define AL_GAIN_LIMIT_SOFT 0x200E
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_source_resampler
|
||||
#define AL_SOFT_source_resampler
|
||||
#define AL_NUM_RESAMPLERS_SOFT 0x1210
|
||||
#define AL_DEFAULT_RESAMPLER_SOFT 0x1211
|
||||
#define AL_SOURCE_RESAMPLER_SOFT 0x1212
|
||||
#define AL_RESAMPLER_NAME_SOFT 0x1213
|
||||
typedef const ALchar* (AL_APIENTRY*LPALGETSTRINGISOFT)(ALenum pname, ALsizei index);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
AL_API const ALchar* AL_APIENTRY alGetStringiSOFT(ALenum pname, ALsizei index);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AL_SOFT_source_spatialize
|
||||
#define AL_SOFT_source_spatialize
|
||||
#define AL_SOURCE_SPATIALIZE_SOFT 0x1214
|
||||
#define AL_AUTO_SOFT 0x0002
|
||||
#endif
|
||||
|
||||
#ifndef ALC_SOFT_output_limiter
|
||||
#define ALC_SOFT_output_limiter
|
||||
#define ALC_OUTPUT_LIMITER_SOFT 0x199A
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -345,7 +345,7 @@ typedef struct {
|
||||
/* Driving Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_COMMENTATOR \
|
||||
{ 1.0000f, 0.0000f, 0.3162f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
{ 1.0000f, 0.0000f, 3.1623f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_PITGARAGE \
|
||||
{ 0.4287f, 0.5900f, 0.3162f, 0.7079f, 0.5623f, 1.7200f, 0.9300f, 0.8700f, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
+31
-4
@@ -18,6 +18,9 @@ EXPORTS
|
||||
alDeleteBuffers
|
||||
alDeleteEffects
|
||||
alDeleteFilters
|
||||
alDeleteFontsoundsSOFT
|
||||
alDeletePresetsSOFT
|
||||
alDeleteSoundfontsSOFT
|
||||
alDeleteSources
|
||||
alDisable
|
||||
alDistanceModel
|
||||
@@ -32,10 +35,17 @@ EXPORTS
|
||||
alFilterfv
|
||||
alFilteri
|
||||
alFilteriv
|
||||
alFontsound2iSOFT
|
||||
alFontsoundModulatoriSOFT
|
||||
alFontsoundiSOFT
|
||||
alFontsoundivSOFT
|
||||
alGenAuxiliaryEffectSlots
|
||||
alGenBuffers
|
||||
alGenEffects
|
||||
alGenFilters
|
||||
alGenFontsoundsSOFT
|
||||
alGenPresetsSOFT
|
||||
alGenSoundfontsSOFT
|
||||
alGenSources
|
||||
alGetAuxiliaryEffectSlotf
|
||||
alGetAuxiliaryEffectSlotfv
|
||||
@@ -64,6 +74,8 @@ EXPORTS
|
||||
alGetFilteriv
|
||||
alGetFloat
|
||||
alGetFloatv
|
||||
alGetFontsoundModulatorivSOFT
|
||||
alGetFontsoundivSOFT
|
||||
alGetInteger
|
||||
alGetInteger64SOFT
|
||||
alGetInteger64vSOFT
|
||||
@@ -74,7 +86,9 @@ EXPORTS
|
||||
alGetListenerfv
|
||||
alGetListeneri
|
||||
alGetListeneriv
|
||||
alGetPresetivSOFT
|
||||
alGetProcAddress
|
||||
alGetSoundfontivSOFT
|
||||
alGetSource3dSOFT
|
||||
alGetSource3f
|
||||
alGetSource3i
|
||||
@@ -88,7 +102,6 @@ EXPORTS
|
||||
alGetSourcei64vSOFT
|
||||
alGetSourceiv
|
||||
alGetString
|
||||
alGetStringiSOFT
|
||||
alIsAuxiliaryEffectSlot
|
||||
alIsBuffer
|
||||
alIsBufferFormatSupportedSOFT
|
||||
@@ -96,6 +109,9 @@ EXPORTS
|
||||
alIsEnabled
|
||||
alIsExtensionPresent
|
||||
alIsFilter
|
||||
alIsFontsoundSOFT
|
||||
alIsPresetSOFT
|
||||
alIsSoundfontSOFT
|
||||
alIsSource
|
||||
alListener3f
|
||||
alListener3i
|
||||
@@ -103,7 +119,21 @@ EXPORTS
|
||||
alListenerfv
|
||||
alListeneri
|
||||
alListeneriv
|
||||
alLoadSoundfontSOFT
|
||||
alMidiEventSOFT
|
||||
alMidiGainSOFT
|
||||
alMidiPauseSOFT
|
||||
alMidiPlaySOFT
|
||||
alMidiResetSOFT
|
||||
alMidiSoundfontSOFT
|
||||
alMidiSoundfontvSOFT
|
||||
alMidiStopSOFT
|
||||
alMidiSysExSOFT
|
||||
alPresetFontsoundsSOFT
|
||||
alPresetiSOFT
|
||||
alPresetivSOFT
|
||||
alProcessUpdatesSOFT
|
||||
alSoundfontPresetsSOFT
|
||||
alSource3dSOFT
|
||||
alSource3f
|
||||
alSource3i
|
||||
@@ -145,9 +175,7 @@ EXPORTS
|
||||
alcGetIntegerv
|
||||
alcGetProcAddress
|
||||
alcGetString
|
||||
alcGetStringiSOFT
|
||||
alcGetThreadContext
|
||||
alcIsAmbisonicFormatSupportedSOFT
|
||||
alcIsExtensionPresent
|
||||
alcIsRenderFormatSupportedSOFT
|
||||
alcLoopbackOpenDeviceSOFT
|
||||
@@ -155,6 +183,5 @@ EXPORTS
|
||||
alcOpenDevice
|
||||
alcProcessContext
|
||||
alcRenderSamplesSOFT
|
||||
alcResetDeviceSOFT
|
||||
alcSetThreadContext
|
||||
alcSuspendContext
|
||||
|
||||
BIN
Binary file not shown.
Vendored
+1
-1
Submodule 3rdparty/hidapi updated: 4c2750112e...ca39ce8939
Vendored
+1
-1
Submodule 3rdparty/libpng updated: bbbcaf1122...1dcba4d6eb
+2
-2
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
option(WITH_GDB "WITH_GDB" OFF)
|
||||
option(WITHOUT_LLVM "WITHOUT_LLVM" OFF)
|
||||
option(USE_NATIVE_INSTRUCTIONS "USE_NATIVE_INSTRUCTIONS makes rpcs3 compile with -march=native, which is useful for local builds, but not good for packages." ON)
|
||||
option(VULKAN_PREBUILT "" OFF)
|
||||
|
||||
if (WITH_GDB)
|
||||
add_definitions(-DWITH_GDB_DEBUGGER)
|
||||
@@ -37,6 +35,8 @@ if (NOT USE_SYSTEM_LIBPNG)
|
||||
add_subdirectory( 3rdparty/libpng )
|
||||
endif()
|
||||
|
||||
option(VULKAN_PREBUILT "" OFF)
|
||||
|
||||
# TODO: do real installation, including copying directory structure
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_BINARY_DIR}/bin")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_BINARY_DIR}/bin")
|
||||
|
||||
@@ -20,15 +20,15 @@ If you want to contribute please take a look at the [Coding Style](https://githu
|
||||
## Dependencies
|
||||
|
||||
### Windows
|
||||
* [Visual Studio 2017](https://www.visualstudio.com/en/downloads/)
|
||||
* [Visual C++ Redistributable Packages for Visual Studio 2017](https://go.microsoft.com/fwlink/?LinkId=746572)
|
||||
* [Visual Studio 2015](https://www.visualstudio.com/vs/older-downloads/)
|
||||
* [Visual C++ Redistributable Packages for Visual Studio 2015](http://www.microsoft.com/en-us/download/details.aspx?id=48145)
|
||||
* [Cmake 3.1.0+](https://www.cmake.org/download/) (required; add to PATH)
|
||||
* [Python 3.3+](https://www.python.org/downloads/) (required; add to PATH)
|
||||
* [Qt 5.10+](https://www.qt.io/download-open-source/) (required; add QTDIR environment variable if you do not want to use the Visual Studio Qt Plugin: e.g. `<QtInstallFolder>\5.10.1\msvc2017_64\`)
|
||||
* [Qt 5.8+](https://www.qt.io/download-open-source/) (required; add QTDIR `<QtInstallFolder>\5.8\msvc2015_64\` environment variable if you do not want to use the Visual Studio Qt Plugin)
|
||||
* [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2015) (optional; see above)
|
||||
|
||||
### Linux
|
||||
* [Qt 5.10+](https://www.qt.io/download-open-source/)
|
||||
* [Qt 5.7+](https://www.qt.io/download-open-source/)
|
||||
* GCC 5.1+ or Clang 3.5.0+ ([not GCC 6.1](https://github.com/RPCS3/rpcs3/issues/1691))
|
||||
* Debian & Ubuntu: `sudo apt-get install cmake build-essential libasound2-dev libpulse-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git qt5-default`
|
||||
* Arch: `sudo pacman -S glew openal cmake llvm qt5-base`
|
||||
@@ -48,14 +48,14 @@ To initialize the repository don't forget to execute `git submodule update --ini
|
||||
### Configuring Qt
|
||||
|
||||
*If you're using Visual Studio 2017 without Qt plugin support (or simply dont want to use it):*
|
||||
1) Add `QTDIR` environment variable and set it to e.g `<QtInstallFolder>\5.10.1\msvc2017_64\` </br>
|
||||
1) Add `QTDIR` environment variable and set it to `<QtInstallFolder>\5.8\msvc2015_64\` </br>
|
||||
|
||||
|
||||
Open `rpcs3.sln`
|
||||
|
||||
|
||||
*If you wish to use the Visual Studio plugin for Qt:* </br>
|
||||
1) Go to the Qt5 menu and edit Qt5 options. Add the path to your Qt installation with compiler e.g. `C:\Qt\5.10.1\msvc2017_64`. </br>
|
||||
1) Go to the Qt5 menu and edit Qt5 options. Add the path to your Qt installation with compiler e.g. `C:\Qt\5.8\msvc2015_64`. </br>
|
||||
2) While selecting the rpcs3qt project, go to Qt5->Project Setting and select the version you added.
|
||||
|
||||
### Building the projects
|
||||
@@ -101,9 +101,6 @@ This Builds RPCS3 with support for debugging PS3 games using gdb.
|
||||
- ```-DUSE_VULKAN=ON/OFF``` (default = *ON*)
|
||||
This builds RPCS3 with Vulkan support.
|
||||
|
||||
- ```-DUSE_NATIVE_INSTRUCTIONS=ON/OFF``` (default = *ON*)
|
||||
This builds rpcs3 with -march=native, which is useful for local builds, but not good for packages.
|
||||
|
||||
## License
|
||||
|
||||
Most files are licensed under the terms of GNU GPLv2 License, see LICENSE file for details. Some files may be licensed differently, check appropriate file headers for details.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "Emu/Cell/SPUThread.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "fcntl.h"
|
||||
#include"fcntl.h"
|
||||
#endif
|
||||
|
||||
extern void ppu_set_breakpoint(u32 addr);
|
||||
@@ -365,7 +365,7 @@ std::string GDBDebugServer::get_reg(std::shared_ptr<ppu_thread> thread, u32 rid)
|
||||
return std::string(8, 'x');
|
||||
default:
|
||||
if (rid > 70) return "";
|
||||
return (rid > 31)
|
||||
return (rid > 31)
|
||||
? u64_to_padded_hex(reinterpret_cast<u64&>(thread->fpr[rid - 32])) //fpr
|
||||
: u64_to_padded_hex(thread->gpr[rid]); //gpr
|
||||
}
|
||||
@@ -453,12 +453,13 @@ bool GDBDebugServer::cmd_thread_info(gdb_cmd & cmd)
|
||||
result += u64_to_padded_hex(static_cast<u64>(cpu.id));
|
||||
};
|
||||
idm::select<ppu_thread>(on_select);
|
||||
idm::select<ARMv7Thread>(on_select);
|
||||
idm::select<RawSPUThread>(on_select);
|
||||
idm::select<SPUThread>(on_select);
|
||||
|
||||
//todo: this may exceed max command length
|
||||
result = "m" + result + "l";
|
||||
|
||||
|
||||
return send_cmd_ack(result);;
|
||||
}
|
||||
|
||||
@@ -767,7 +768,7 @@ void GDBDebugServer::on_task()
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::runtime_error& e)
|
||||
catch (std::runtime_error& e)
|
||||
{
|
||||
if (client_socket) {
|
||||
closesocket(client_socket);
|
||||
|
||||
+3
-3
@@ -293,7 +293,7 @@ struct MemoryManager : llvm::RTDyldMemoryManager
|
||||
return RTDyldMemoryManager::registerEHFrames(addr, load_addr, size);
|
||||
}
|
||||
|
||||
virtual void deregisterEHFrames() override
|
||||
void deregisterEHFrames(u8* addr, u64 load_addr, std::size_t size) override
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -376,11 +376,11 @@ public:
|
||||
LOG_SUCCESS(GENERAL, "LLVM: Created module: %s", module->getName().data());
|
||||
}
|
||||
|
||||
static std::unique_ptr<llvm::WritableMemoryBuffer> load(const std::string& path)
|
||||
static std::unique_ptr<llvm::MemoryBuffer> load(const std::string& path)
|
||||
{
|
||||
if (fs::file cached{path, fs::read})
|
||||
{
|
||||
auto buf = llvm::WritableMemoryBuffer::getNewUninitMemBuffer(cached.size());
|
||||
auto buf = llvm::MemoryBuffer::getNewUninitMemBuffer(cached.size());
|
||||
cached.read(const_cast<char*>(buf->getBufferStart()), buf->getBufferSize());
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ namespace logs
|
||||
channel HLE("HLE");
|
||||
channel PPU("PPU");
|
||||
channel SPU("SPU");
|
||||
channel ARMv7("ARMv7");
|
||||
|
||||
// Channel registry mutex
|
||||
semaphore<> g_mutex;
|
||||
|
||||
@@ -104,6 +104,7 @@ namespace logs
|
||||
extern channel HLE;
|
||||
extern channel PPU;
|
||||
extern channel SPU;
|
||||
extern channel ARMv7;
|
||||
|
||||
// Log level control: set all channels to level::notice
|
||||
void reset();
|
||||
|
||||
+17
-19
@@ -90,7 +90,7 @@ enum x64_reg_t : u32
|
||||
X64R_XMM13,
|
||||
X64R_XMM14,
|
||||
X64R_XMM15,
|
||||
|
||||
|
||||
X64R_AL,
|
||||
X64R_CL,
|
||||
X64R_DL,
|
||||
@@ -99,7 +99,7 @@ enum x64_reg_t : u32
|
||||
X64R_CH,
|
||||
X64R_DH,
|
||||
X64R_BH,
|
||||
|
||||
|
||||
X64_NOT_SET,
|
||||
X64_IMM8,
|
||||
X64_IMM16,
|
||||
@@ -176,7 +176,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): LOCK prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
lock = true;
|
||||
continue;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): REPNE/REPNZ prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
repne = true;
|
||||
continue;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): REP/REPE/REPZ prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
repe = true;
|
||||
continue;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, siz
|
||||
{
|
||||
LOG_ERROR(MEMORY, "decode_x64_reg_op(%016llxh): operand-size override prefix found twice", (size_t)code - out_length);
|
||||
}
|
||||
|
||||
|
||||
oso = true;
|
||||
continue;
|
||||
}
|
||||
@@ -917,7 +917,7 @@ bool get_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, size_
|
||||
else if (reg == X64_IMM32)
|
||||
{
|
||||
const s32 imm_value = *(s32*)(RIP(context) + i_size - 4);
|
||||
|
||||
|
||||
switch (d_size)
|
||||
{
|
||||
case 4: out_value = (u32)imm_value; return true;
|
||||
@@ -1254,7 +1254,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
}
|
||||
if (entry.start_addr <= addr && addr <= addr + mem->size - 1)
|
||||
{
|
||||
// Place the page fault event onto table so that other functions [sys_mmapper_free_address and ppu pagefault funcs]
|
||||
// Place the page fault event onto table so that other functions [sys_mmapper_free_address and ppu pagefault funcs]
|
||||
// know that this thread is page faulted and where.
|
||||
|
||||
auto pf_entries = fxm::get_always<page_fault_event_entries>();
|
||||
@@ -1274,7 +1274,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
addr, data3 == SYS_MEMORY_PAGE_FAULT_CAUSE_READ_ONLY ? "writing read-only" : "using unmapped");
|
||||
|
||||
error_code sending_error = sys_event_port_send(entry.port_id, data1, data2, data3);
|
||||
|
||||
|
||||
// If we fail due to being busy, wait a bit and try again.
|
||||
while (sending_error == CELL_EBUSY)
|
||||
{
|
||||
@@ -1282,7 +1282,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
thread_ctrl::wait_for(1000);
|
||||
sending_error = sys_event_port_send(entry.port_id, data1, data2, data3);
|
||||
}
|
||||
|
||||
|
||||
if (sending_error)
|
||||
{
|
||||
fmt::throw_exception("Unknown error %x while trying to pass page fault.", sending_error.value);
|
||||
@@ -1707,7 +1707,7 @@ bool thread_ctrl::_wait_for(u64 usec)
|
||||
}
|
||||
}
|
||||
_lock{_this->m_mutex};
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
// Mutex is unlocked at the start and after the waiting
|
||||
@@ -1890,34 +1890,32 @@ u16 thread_ctrl::get_affinity_mask(thread_class group)
|
||||
}
|
||||
case native_core_arrangement::amd_ccx:
|
||||
{
|
||||
u16 spu_mask, ppu_mask, rsx_mask, general;
|
||||
u16 spu_mask, ppu_mask, rsx_mask;
|
||||
if (thread_count >= 16)
|
||||
{
|
||||
// Threadripper, R7
|
||||
// Assign threads 1-16
|
||||
// Assign threads 8-16
|
||||
// It appears some windows code is bound to lower core addresses, binding 8-16 is alot faster than 0-7
|
||||
ppu_mask = spu_mask = 0b1111111100000000;
|
||||
rsx_mask = 0b11110000;
|
||||
general = 0b00001111;
|
||||
rsx_mask = all_cores_mask;
|
||||
}
|
||||
else if (thread_count == 12)
|
||||
{
|
||||
// 1600/2600 (x)
|
||||
ppu_mask = spu_mask = 0b111111000000;
|
||||
rsx_mask = 0b111000;
|
||||
general = 0b000111;
|
||||
rsx_mask = all_cores_mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
// R5 & R3 don't seem to improve performance no matter how these are shuffled
|
||||
ppu_mask = spu_mask = rsx_mask = general = 0b11111111;
|
||||
ppu_mask = spu_mask = rsx_mask = 0b11111111 & all_cores_mask;
|
||||
}
|
||||
|
||||
switch (group)
|
||||
{
|
||||
default:
|
||||
case thread_class::general:
|
||||
return general = all_cores_mask;
|
||||
return all_cores_mask;
|
||||
case thread_class::rsx:
|
||||
return rsx_mask;
|
||||
case thread_class::ppu:
|
||||
|
||||
+2
-12
@@ -14,10 +14,7 @@ void shared_mutex::imp_lock_shared(s64 _old)
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (i != 0)
|
||||
{
|
||||
busy_wait();
|
||||
}
|
||||
busy_wait();
|
||||
|
||||
const s64 value = m_value.load();
|
||||
|
||||
@@ -176,10 +173,7 @@ void shared_mutex::imp_lock(s64 _old)
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (i != 0)
|
||||
{
|
||||
busy_wait();
|
||||
}
|
||||
busy_wait();
|
||||
|
||||
const s64 value = m_value.load();
|
||||
|
||||
@@ -242,10 +236,6 @@ void shared_mutex::imp_lock_degrade()
|
||||
|
||||
bool shared_mutex::try_lock_shared()
|
||||
{
|
||||
if (m_value < c_min) // Fast path
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Conditional decrement
|
||||
return m_value.fetch_op([](s64& value) { if (value >= c_min) value -= c_min; }) >= c_min;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -40,23 +40,23 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakeBuildCommandLine>start /W /B pre-build.bat
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /m</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m</NMakeCleanCommandLine>
|
||||
<NMakeReBuildCommandLine>start /W /B pre-build.bat
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m
|
||||
</NMakeReBuildCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakeBuildCommandLine>start /W /B pre-build.bat
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>start /W /B pre-build.bat
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -39,24 +39,24 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /m</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakeBuildCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
|
||||
version: '{build}'
|
||||
|
||||
image: Visual Studio 2017
|
||||
image: Visual Studio 2015
|
||||
|
||||
environment:
|
||||
QTDIR: C:\Qt\5.10.0\msvc2017_64
|
||||
QTDIR: C:\Qt\5.10.0\msvc2015_64
|
||||
LLVMLIBS: https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRY2k3Q2Yya05lcm8
|
||||
VULKAN: https://drive.google.com/uc?export=download&id=1A2eOMmCO714i0U7J0qI4aEMKnuWl8l_R
|
||||
COMPATDB: https://rpcs3.net/compatibility?api=v1&export
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
Binary file not shown.
+1
-1
Submodule llvm updated: 16ebb58ea4...4423e35117
@@ -1,7 +1,7 @@
|
||||
REM You need cmake and python to update the project files
|
||||
REM this script relies on CWD being the path that this script is in
|
||||
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXTERNAL_POLLY_SOURCE_DIR=../polly -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=ON -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
|
||||
RD /S /Q cmake
|
||||
RD /S /Q CMakeFiles
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -39,30 +39,30 @@
|
||||
<NMakePreprocessorDefinitions>
|
||||
</NMakePreprocessorDefinitions>
|
||||
<NMakeBuildCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXTERNAL_POLLY_SOURCE_DIR=../polly -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=ON -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXTERNAL_POLLY_SOURCE_DIR=../polly -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=ON -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXTERNAL_POLLY_SOURCE_DIR=../polly -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=ON -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakePreprocessorDefinitions />
|
||||
<NMakeBuildCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXTERNAL_POLLY_SOURCE_DIR=../polly -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=ON -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /m
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXTERNAL_POLLY_SOURCE_DIR=../polly -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=ON -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXTERNAL_POLLY_SOURCE_DIR=../polly -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=ON -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -62,9 +62,6 @@ vcxproj_files = ["lib\Analysis\LLVMAnalysis.vcxproj",
|
||||
"lib\Transforms\Utils\LLVMTransformUtils.vcxproj",
|
||||
"lib\Transforms\Vectorize\LLVMVectorize.vcxproj",
|
||||
"include\llvm\IR\intrinsics_gen.vcxproj",
|
||||
"tools\polly\lib\Polly.vcxproj",
|
||||
"tools\polly\lib\External\PollyISL.vcxproj",
|
||||
"tools\polly\lib\External\PollyPPCG.vcxproj",
|
||||
"utils\TableGen\llvm-tblgen.vcxproj",
|
||||
]
|
||||
|
||||
|
||||
-1
Submodule polly deleted from 7f7d8e3954
@@ -0,0 +1,65 @@
|
||||
#include "ps3emu_api.h"
|
||||
|
||||
ps3emu_api::ps3emu_api(const std::string &path)
|
||||
{
|
||||
load(path);
|
||||
}
|
||||
|
||||
bool ps3emu_api::load(const std::string &path)
|
||||
{
|
||||
if (!m_library.load(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_no_errors = true;
|
||||
|
||||
if (!m_library.get(get_api_version, "ps3emu_api_get_api_version") || get_api_version() != ps3emu_api_version)
|
||||
{
|
||||
is_no_errors = false;
|
||||
}
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(initialize, "ps3emu_api_initialize");
|
||||
is_no_errors = is_no_errors && m_library.get(destroy, "ps3emu_api_destroy");
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(get_version_string, "ps3emu_api_get_version_string");
|
||||
is_no_errors = is_no_errors && m_library.get(get_version_number, "ps3emu_api_get_version_number");
|
||||
is_no_errors = is_no_errors && m_library.get(get_name_string, "ps3emu_api_get_name_string");
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(load_elf, "ps3emu_api_load_elf");
|
||||
|
||||
is_no_errors = is_no_errors && m_library.get(set_state, "ps3emu_api_set_state");
|
||||
is_no_errors = is_no_errors && m_library.get(get_state, "ps3emu_api_get_state");
|
||||
|
||||
if (!is_no_errors)
|
||||
{
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ps3emu_api::loaded() const
|
||||
{
|
||||
return m_library.loaded();
|
||||
}
|
||||
|
||||
void ps3emu_api::close()
|
||||
{
|
||||
initialize = nullptr;
|
||||
destroy = nullptr;
|
||||
get_version_string = nullptr;
|
||||
get_version_number = nullptr;
|
||||
get_name_string = nullptr;
|
||||
load_elf = nullptr;
|
||||
set_state = nullptr;
|
||||
get_state = nullptr;
|
||||
|
||||
m_library.close();
|
||||
}
|
||||
|
||||
ps3emu_api::operator bool() const
|
||||
{
|
||||
return loaded();
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <Utilities/dynamic_library.h>
|
||||
#include <string>
|
||||
#include "ps3emu_api_enums.h"
|
||||
#include "ps3emu_api_structs.h"
|
||||
|
||||
class ps3emu_api
|
||||
{
|
||||
utils::dynamic_library m_library;
|
||||
|
||||
public:
|
||||
ps3emu_api() = default;
|
||||
ps3emu_api(const std::string &path);
|
||||
|
||||
unsigned int(*get_api_version)() = nullptr;
|
||||
ps3emu_api_error_code(*initialize)(const ps3emu_api_initialize_callbacks *callbacks) = nullptr;
|
||||
ps3emu_api_error_code(*destroy)() = nullptr;
|
||||
|
||||
ps3emu_api_error_code(*get_version_string)(char *dest_buffer, int dest_buffer_size) = nullptr;
|
||||
ps3emu_api_error_code(*get_version_number)(int *version_number) = nullptr;
|
||||
ps3emu_api_error_code(*get_name_string)(char *dest_buffer, int dest_buffer_size) = nullptr;
|
||||
|
||||
ps3emu_api_error_code(*load_elf)(const char *path) = nullptr;
|
||||
|
||||
ps3emu_api_error_code(*set_state)(ps3emu_api_state state) = nullptr;
|
||||
ps3emu_api_error_code(*get_state)(ps3emu_api_state *state) = nullptr;
|
||||
|
||||
bool load(const std::string &path);
|
||||
bool loaded() const;
|
||||
void close();
|
||||
|
||||
explicit operator bool() const;
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ Controller.prototype.ComponentSelectionPageCallback = function() {
|
||||
var widget = gui.currentPageWidget();
|
||||
|
||||
widget.deselectAll();
|
||||
widget.selectComponent("qt.qt5.5101.gcc_64");
|
||||
widget.selectComponent("qt.qt5.5100.gcc_64");
|
||||
|
||||
gui.clickButton(buttons.NextButton);
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2027
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asmjit", "asmjitsrc\asmjit.vcxproj", "{AC40FF01-426E-4838-A317-66354CEFAE88}"
|
||||
EndProject
|
||||
@@ -243,7 +243,4 @@ Global
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122} = {DDF904CA-2771-441A-8629-5DF2EB922A79}
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {FA1E6C16-CA63-45F8-8D52-E21DF396BE36}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {06CC7920-E085-4B81-9582-8DE8AAD42510}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
+13
-41
@@ -6,12 +6,12 @@ set(CMAKE_CXX_STANDARD 14)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
# Qt section
|
||||
find_package(Qt5 5.10 COMPONENTS Widgets Network)
|
||||
find_package(Qt5 5.7 COMPONENTS Widgets Network)
|
||||
if(WIN32)
|
||||
find_package(Qt5 5.10 COMPONENTS WinExtras REQUIRED)
|
||||
find_package(Qt5 5.7 COMPONENTS WinExtras REQUIRED)
|
||||
set(RPCS3_QT_LIBS Qt5::Widgets Qt5::WinExtras Qt5::Network)
|
||||
else()
|
||||
find_package(Qt5 5.10 COMPONENTS DBus Gui)
|
||||
find_package(Qt5 5.7 COMPONENTS DBus Gui)
|
||||
if(Qt5DBus_FOUND)
|
||||
set(RPCS3_QT_LIBS Qt5::Widgets Qt5::DBus Qt5::Network)
|
||||
add_definitions(-DHAVE_QTDBUS)
|
||||
@@ -23,15 +23,15 @@ endif()
|
||||
|
||||
# Let's make sure we have Qt before we continue
|
||||
if(NOT Qt5Widgets_FOUND)
|
||||
if(Qt5Widgets_VERSION VERSION_LESS 5.10.0)
|
||||
message("Minimum supported Qt5 version is 5.10.0! You have version ${Qt5Widgets_VERSION} installed, please upgrade!")
|
||||
if(Qt5Widgets_VERSION VERSION_LESS 5.7.0)
|
||||
message("Minimum supported Qt5 version is 5.7! You have version ${Qt5Widgets_VERSION} installed, please upgrade!")
|
||||
if("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
message(FATAL_ERROR "Most distros do not provide an up-to-date version of Qt.
|
||||
If you're on Ubuntu or Linux Mint, there are PPAs you can use to install an up-to-date qt5 version.
|
||||
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.10.1-xenial
|
||||
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.10.1-trusty
|
||||
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt593-xenial
|
||||
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt593-trusty
|
||||
just make sure to run
|
||||
source /opt/qt510/bin/qt510-env.sh
|
||||
source /opt/qt59/bin/qt59-env.sh
|
||||
before re-running cmake")
|
||||
elseif(WIN32)
|
||||
message(FATAL_ERROR "You can download the latest version of Qt5 here: https://www.qt.io/download-open-source/")
|
||||
@@ -42,7 +42,7 @@ before re-running cmake")
|
||||
|
||||
message("CMake was unable to find Qt5!")
|
||||
if(WIN32)
|
||||
message(FATAL_ERROR "Make sure the QTDIR env variable has been set properly. (for example C:\\Qt\\5.10.1\\msvc2017_64\\)")
|
||||
message(FATAL_ERROR "Make sure the QTDIR env variable has been set properly. (for example C:\\Qt\\5.8\\msvc2017_64\\)")
|
||||
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
message(FATAL_ERROR "Make sure to install your distro's qt5 package!")
|
||||
else()
|
||||
@@ -96,7 +96,7 @@ if(NOT MSVC)
|
||||
if(NOT APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--exclude-libs,ALL")
|
||||
endif()
|
||||
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
@@ -108,7 +108,7 @@ if(NOT MSVC)
|
||||
|
||||
add_compile_options(-msse -msse2 -mcx16 -mrtm)
|
||||
|
||||
if(NOT DEFINED ENV{TRAVIS} AND USE_NATIVE_INSTRUCTIONS)
|
||||
if(NOT DEFINED ENV{TRAVIS})
|
||||
add_compile_options(-march=native)
|
||||
endif()
|
||||
|
||||
@@ -173,7 +173,7 @@ set(CMAKE_MODULE_PATH "${RPCS3_SRC_DIR}/cmake_modules")
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(OpenAL REQUIRED)
|
||||
if(NOT WITHOUT_LLVM)
|
||||
find_package(LLVM 6.0 CONFIG)
|
||||
find_package(LLVM 4.0 CONFIG)
|
||||
if(NOT LLVM_FOUND)
|
||||
message("System LLVM was not found, LLVM will be built from the submodule.")
|
||||
|
||||
@@ -198,28 +198,6 @@ if(NOT WITHOUT_LLVM)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Now let's look for polly.
|
||||
find_package(Polly)
|
||||
if(Polly_FOUND)
|
||||
add_definitions(-DPOLLY_AVAILABLE)
|
||||
endif()
|
||||
# Polly LLVM Compiler checks
|
||||
CHECK_C_COMPILER_FLAG("-mllvm -polly" HAS_POLLY)
|
||||
CHECK_C_COMPILER_FLAG("-mllvm -polly-target=hybrid" HAS_POLLY_HYBRID)
|
||||
CHECK_C_COMPILER_FLAG("-mllvm -polly-target=cpu" HAS_POLLY_CPU)
|
||||
|
||||
if (HAS_POLLY)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -polly -mllvm -polly-parallel -lgomp -mllvm -polly-vectorizer=stripmine")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mllvm -polly -mllvm -polly-parallel -lgomp -mllvm -polly-vectorizer=stripmine")
|
||||
if(HAS_POLLY_HYBRID)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -polly-target=hybrid")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -polly-target=cpu")
|
||||
elseif(HAS_POLLY_CPU)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -polly-target=cpu")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -polly-target=cpu")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(APPLE)
|
||||
@@ -296,7 +274,6 @@ endif()
|
||||
include_directories(
|
||||
${OPENAL_INCLUDE_DIR}
|
||||
${LLVM_INCLUDE_DIRS}
|
||||
${Polly_INCLUDE_DIRS}
|
||||
"${RPCS3_SRC_DIR}/../3rdparty/pugixml/src"
|
||||
"${RPCS3_SRC_DIR}"
|
||||
"${RPCS3_SRC_DIR}/Loader"
|
||||
@@ -342,7 +319,6 @@ endif()
|
||||
link_directories(
|
||||
"${RPCS3_SRC_DIR}/../3rdparty/minidx12/"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan"
|
||||
"${Polly_LIBRARY_DIRS}"
|
||||
)
|
||||
|
||||
|
||||
@@ -417,12 +393,8 @@ if(NOT MSVC)
|
||||
target_link_libraries(rpcs3 GLEW::GLEW)
|
||||
endif()
|
||||
|
||||
if(Polly_FOUND)
|
||||
target_link_libraries(rpcs3 Polly PollyISL PollyPPCG)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib gdi32.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL setupapi.lib hidapi-hid Shlwapi.lib)
|
||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL setupapi.lib hidapi-hid Shlwapi.lib)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} opengl32.lib glu32.lib libpthread)
|
||||
else()
|
||||
|
||||
+351
-36
@@ -148,20 +148,40 @@ void WriteEhdr(const fs::file& f, Elf32_Ehdr& ehdr)
|
||||
Write8(f, ehdr.e_data);
|
||||
Write8(f, ehdr.e_curver);
|
||||
Write8(f, ehdr.e_os_abi);
|
||||
Write64(f, ehdr.e_abi_ver);
|
||||
Write16(f, ehdr.e_type);
|
||||
Write16(f, ehdr.e_machine);
|
||||
Write32(f, ehdr.e_version);
|
||||
Write32(f, ehdr.e_entry);
|
||||
Write32(f, ehdr.e_phoff);
|
||||
Write32(f, ehdr.e_shoff);
|
||||
Write32(f, ehdr.e_flags);
|
||||
Write16(f, ehdr.e_ehsize);
|
||||
Write16(f, ehdr.e_phentsize);
|
||||
Write16(f, ehdr.e_phnum);
|
||||
Write16(f, ehdr.e_shentsize);
|
||||
Write16(f, ehdr.e_shnum);
|
||||
Write16(f, ehdr.e_shstrndx);
|
||||
if (ehdr.e_data == 1)
|
||||
{
|
||||
Write64LE(f, ehdr.e_abi_ver);
|
||||
Write16LE(f, ehdr.e_type);
|
||||
Write16LE(f, ehdr.e_machine);
|
||||
Write32LE(f, ehdr.e_version);
|
||||
Write32LE(f, ehdr.e_entry);
|
||||
Write32LE(f, ehdr.e_phoff);
|
||||
Write32LE(f, ehdr.e_shoff);
|
||||
Write32LE(f, ehdr.e_flags);
|
||||
Write16LE(f, ehdr.e_ehsize);
|
||||
Write16LE(f, ehdr.e_phentsize);
|
||||
Write16LE(f, ehdr.e_phnum);
|
||||
Write16LE(f, ehdr.e_shentsize);
|
||||
Write16LE(f, ehdr.e_shnum);
|
||||
Write16LE(f, ehdr.e_shstrndx);
|
||||
}
|
||||
else
|
||||
{
|
||||
Write64(f, ehdr.e_abi_ver);
|
||||
Write16(f, ehdr.e_type);
|
||||
Write16(f, ehdr.e_machine);
|
||||
Write32(f, ehdr.e_version);
|
||||
Write32(f, ehdr.e_entry);
|
||||
Write32(f, ehdr.e_phoff);
|
||||
Write32(f, ehdr.e_shoff);
|
||||
Write32(f, ehdr.e_flags);
|
||||
Write16(f, ehdr.e_ehsize);
|
||||
Write16(f, ehdr.e_phentsize);
|
||||
Write16(f, ehdr.e_phnum);
|
||||
Write16(f, ehdr.e_shentsize);
|
||||
Write16(f, ehdr.e_shnum);
|
||||
Write16(f, ehdr.e_shstrndx);
|
||||
}
|
||||
}
|
||||
|
||||
void WritePhdr(const fs::file& f, Elf32_Phdr& phdr)
|
||||
@@ -190,6 +210,32 @@ void WriteShdr(const fs::file& f, Elf32_Shdr& shdr)
|
||||
Write32(f, shdr.sh_entsize);
|
||||
}
|
||||
|
||||
void WritePhdrLE(const fs::file& f, Elf32_Phdr& phdr)
|
||||
{
|
||||
Write32LE(f, phdr.p_type);
|
||||
Write32LE(f, phdr.p_offset);
|
||||
Write32LE(f, phdr.p_vaddr);
|
||||
Write32LE(f, phdr.p_paddr);
|
||||
Write32LE(f, phdr.p_filesz);
|
||||
Write32LE(f, phdr.p_memsz);
|
||||
Write32LE(f, phdr.p_flags);
|
||||
Write32LE(f, phdr.p_align);
|
||||
}
|
||||
|
||||
void WriteShdrLE(const fs::file& f, Elf32_Shdr& shdr)
|
||||
{
|
||||
Write32LE(f, shdr.sh_name);
|
||||
Write32LE(f, shdr.sh_type);
|
||||
Write32LE(f, shdr.sh_flags);
|
||||
Write32LE(f, shdr.sh_addr);
|
||||
Write32LE(f, shdr.sh_offset);
|
||||
Write32LE(f, shdr.sh_size);
|
||||
Write32LE(f, shdr.sh_link);
|
||||
Write32LE(f, shdr.sh_info);
|
||||
Write32LE(f, shdr.sh_addralign);
|
||||
Write32LE(f, shdr.sh_entsize);
|
||||
}
|
||||
|
||||
|
||||
void AppInfo::Load(const fs::file& f)
|
||||
{
|
||||
@@ -200,6 +246,15 @@ void AppInfo::Load(const fs::file& f)
|
||||
padding = Read64(f);
|
||||
}
|
||||
|
||||
void AppInfo::LoadLE(const fs::file& f)
|
||||
{
|
||||
authid = Read64LE(f);
|
||||
vendor_id = Read32LE(f);
|
||||
self_type = Read32LE(f);
|
||||
version = Read64(f);
|
||||
padding = Read64(f);
|
||||
}
|
||||
|
||||
void AppInfo::Show()
|
||||
{
|
||||
LOG_NOTICE(LOADER, "AuthID: 0x%llx", authid);
|
||||
@@ -218,6 +273,16 @@ void SectionInfo::Load(const fs::file& f)
|
||||
encrypted = Read32(f);
|
||||
}
|
||||
|
||||
void SectionInfo::LoadLE(const fs::file& f)
|
||||
{
|
||||
offset = Read64LE(f);
|
||||
size = Read64LE(f);
|
||||
compressed = Read32LE(f);
|
||||
unknown1 = Read32LE(f);
|
||||
unknown2 = Read32LE(f);
|
||||
encrypted = Read32LE(f);
|
||||
}
|
||||
|
||||
void SectionInfo::Show()
|
||||
{
|
||||
LOG_NOTICE(LOADER, "Offset: 0x%llx", offset);
|
||||
@@ -236,6 +301,14 @@ void SCEVersionInfo::Load(const fs::file& f)
|
||||
unknown = Read32(f);
|
||||
}
|
||||
|
||||
void SCEVersionInfo::LoadLE(const fs::file& f)
|
||||
{
|
||||
subheader_type = Read32LE(f);
|
||||
present = Read32LE(f);
|
||||
size = Read32LE(f);
|
||||
unknown = Read32LE(f);
|
||||
}
|
||||
|
||||
void SCEVersionInfo::Show()
|
||||
{
|
||||
LOG_NOTICE(LOADER, "Sub-header type: 0x%08x", subheader_type);
|
||||
@@ -290,6 +363,65 @@ void ControlInfo::Load(const fs::file& f)
|
||||
}
|
||||
}
|
||||
|
||||
void ControlInfo::LoadLE(const fs::file& f)
|
||||
{
|
||||
type = Read32LE(f);
|
||||
size = Read32LE(f);
|
||||
next = Read64LE(f);
|
||||
|
||||
if (type == 1)
|
||||
{
|
||||
control_flags.ctrl_flag1 = Read32LE(f);
|
||||
control_flags.unknown1 = Read32LE(f);
|
||||
control_flags.unknown2 = Read32LE(f);
|
||||
control_flags.unknown3 = Read32LE(f);
|
||||
control_flags.unknown4 = Read32LE(f);
|
||||
control_flags.unknown5 = Read32LE(f);
|
||||
control_flags.unknown6 = Read32LE(f);
|
||||
control_flags.unknown7 = Read32LE(f);
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
if (size == 0x30)
|
||||
{
|
||||
f.read(file_digest_30.digest, 20);
|
||||
file_digest_30.unknown = Read64LE(f);
|
||||
}
|
||||
else if (size == 0x40)
|
||||
{
|
||||
f.read(file_digest_40.digest1, 20);
|
||||
f.read(file_digest_40.digest2, 20);
|
||||
file_digest_40.unknown = Read64LE(f);
|
||||
}
|
||||
}
|
||||
else if (type == 3)
|
||||
{
|
||||
npdrm.magic = Read32LE(f);
|
||||
npdrm.unknown1 = Read32LE(f);
|
||||
npdrm.license = Read32LE(f);
|
||||
npdrm.type = Read32LE(f);
|
||||
f.read(npdrm.content_id, 48);
|
||||
f.read(npdrm.digest, 16);
|
||||
f.read(npdrm.invdigest, 16);
|
||||
f.read(npdrm.xordigest, 16);
|
||||
npdrm.unknown2 = Read64LE(f);
|
||||
npdrm.unknown3 = Read64LE(f);
|
||||
}
|
||||
else if (type == 5)
|
||||
{
|
||||
f.read(type5.unk, 0x100);
|
||||
}
|
||||
else if (type == 6)
|
||||
{
|
||||
type6.unknown1 = Read32LE(f);
|
||||
f.read(type6.unk, 0xFC);
|
||||
}
|
||||
else if (type == 7)
|
||||
{
|
||||
f.read(type7.unk, 0x40);
|
||||
}
|
||||
}
|
||||
|
||||
void ControlInfo::Show()
|
||||
{
|
||||
LOG_NOTICE(LOADER, "Type: 0x%08x", type);
|
||||
@@ -634,6 +766,19 @@ void SceHeader::Load(const fs::file& f)
|
||||
se_esize = Read64(f);
|
||||
}
|
||||
|
||||
void SceHeader::LoadLE(const fs::file& f)
|
||||
{
|
||||
se_magic = Read32(f);
|
||||
se_hver = Read32LE(f);
|
||||
se_flags = Read16LE(f);
|
||||
se_type = Read16LE(f);
|
||||
se_meta = Read32LE(f);
|
||||
se_hsize = Read64LE(f);
|
||||
se_esize = Read64LE(f);
|
||||
Read64LE(f);
|
||||
Read64LE(f);
|
||||
}
|
||||
|
||||
void SelfHeader::Load(const fs::file& f)
|
||||
{
|
||||
se_htype = Read64(f);
|
||||
@@ -648,6 +793,11 @@ void SelfHeader::Load(const fs::file& f)
|
||||
pad = Read64(f);
|
||||
}
|
||||
|
||||
void SelfHeader::LoadLE(const fs::file& f)
|
||||
{
|
||||
f.read(this, sizeof(*this));
|
||||
}
|
||||
|
||||
SCEDecrypter::SCEDecrypter(const fs::file& s)
|
||||
: sce_f(s)
|
||||
, data_buf_length(0)
|
||||
@@ -885,11 +1035,22 @@ SELFDecrypter::SELFDecrypter(const fs::file& s)
|
||||
{
|
||||
}
|
||||
|
||||
static bool isVita(const SceHeader hdr)
|
||||
{
|
||||
return (hdr.se_hver == 3);
|
||||
}
|
||||
|
||||
bool SELFDecrypter::LoadHeaders(bool isElf32)
|
||||
{
|
||||
// Read SCE header.
|
||||
self_f.seek(0);
|
||||
sce_hdr.Load(self_f);
|
||||
sce_hdr.LoadLE(self_f);
|
||||
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
self_f.seek(0);
|
||||
sce_hdr.Load(self_f);
|
||||
}
|
||||
|
||||
// Check SCE magic.
|
||||
if (!sce_hdr.CheckMagic())
|
||||
@@ -899,11 +1060,26 @@ bool SELFDecrypter::LoadHeaders(bool isElf32)
|
||||
}
|
||||
|
||||
// Read SELF header.
|
||||
self_hdr.Load(self_f);
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
self_hdr.Load(self_f);
|
||||
}
|
||||
else
|
||||
{
|
||||
self_hdr.LoadLE(self_f);
|
||||
}
|
||||
|
||||
// Read the APP INFO.
|
||||
self_f.seek(self_hdr.se_appinfooff);
|
||||
app_info.Load(self_f);
|
||||
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
app_info.Load(self_f);
|
||||
}
|
||||
else
|
||||
{
|
||||
app_info.LoadLE(self_f);
|
||||
}
|
||||
|
||||
// Read ELF header.
|
||||
self_f.seek(self_hdr.se_elfoff);
|
||||
@@ -926,7 +1102,14 @@ bool SELFDecrypter::LoadHeaders(bool isElf32)
|
||||
for(u32 i = 0; i < elf32_hdr.e_phnum; ++i)
|
||||
{
|
||||
phdr32_arr.emplace_back();
|
||||
phdr32_arr.back().Load(self_f);
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
phdr32_arr.back().Load(self_f);
|
||||
}
|
||||
else
|
||||
{
|
||||
phdr32_arr.back().LoadLE(self_f);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -956,12 +1139,26 @@ bool SELFDecrypter::LoadHeaders(bool isElf32)
|
||||
for(u32 i = 0; i < ((isElf32) ? elf32_hdr.e_phnum : elf64_hdr.e_phnum); ++i)
|
||||
{
|
||||
secinfo_arr.emplace_back();
|
||||
secinfo_arr.back().Load(self_f);
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
secinfo_arr.back().Load(self_f);
|
||||
}
|
||||
else
|
||||
{
|
||||
secinfo_arr.back().LoadLE(self_f);
|
||||
}
|
||||
}
|
||||
|
||||
// Read SCE version info.
|
||||
self_f.seek(self_hdr.se_sceveroff);
|
||||
scev_info.Load(self_f);
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
scev_info.Load(self_f);
|
||||
}
|
||||
else
|
||||
{
|
||||
scev_info.LoadLE(self_f);
|
||||
}
|
||||
|
||||
// Read control info.
|
||||
ctrlinfo_arr.clear();
|
||||
@@ -972,7 +1169,14 @@ bool SELFDecrypter::LoadHeaders(bool isElf32)
|
||||
{
|
||||
ctrlinfo_arr.emplace_back();
|
||||
ControlInfo &cinfo = ctrlinfo_arr.back();
|
||||
cinfo.Load(self_f);
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
cinfo.Load(self_f);
|
||||
}
|
||||
else
|
||||
{
|
||||
cinfo.LoadLE(self_f);
|
||||
}
|
||||
i += cinfo.size;
|
||||
}
|
||||
|
||||
@@ -992,7 +1196,14 @@ bool SELFDecrypter::LoadHeaders(bool isElf32)
|
||||
for(u32 i = 0; i < elf32_hdr.e_shnum; ++i)
|
||||
{
|
||||
shdr32_arr.emplace_back();
|
||||
shdr32_arr.back().Load(self_f);
|
||||
if (!isVita(sce_hdr))
|
||||
{
|
||||
shdr32_arr.back().Load(self_f);
|
||||
}
|
||||
else
|
||||
{
|
||||
shdr32_arr.back().LoadLE(self_f);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1157,6 +1368,8 @@ bool SELFDecrypter::LoadMetadata(u8* klic_key)
|
||||
memcpy(metadata_iv, keyset.riv, 0x10);
|
||||
|
||||
// Check DEBUG flag.
|
||||
if (sce_hdr.se_flags == 0x00c0)
|
||||
return true;
|
||||
if ((sce_hdr.se_flags & 0x8000) != 0x8000)
|
||||
{
|
||||
// Decrypt the NPDRM layer.
|
||||
@@ -1219,6 +1432,14 @@ bool SELFDecrypter::DecryptData()
|
||||
}
|
||||
}
|
||||
|
||||
if (meta_hdr.section_count == 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < secinfo_arr.size(); i++)
|
||||
{
|
||||
data_buf_length += secinfo_arr[i].size;
|
||||
}
|
||||
}
|
||||
|
||||
// Allocate a buffer to store decrypted data.
|
||||
data_buf = std::make_unique<u8[]>(data_buf_length);
|
||||
|
||||
@@ -1266,6 +1487,16 @@ bool SELFDecrypter::DecryptData()
|
||||
}
|
||||
}
|
||||
|
||||
if (meta_hdr.section_count == 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < secinfo_arr.size(); i++)
|
||||
{
|
||||
self_f.seek(secinfo_arr[i].offset);
|
||||
self_f.read(data_buf.get() + data_buf_offset, secinfo_arr[i].size);
|
||||
data_buf_offset += secinfo_arr[i].size;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1285,20 +1516,75 @@ fs::file SELFDecrypter::MakeElf(bool isElf32)
|
||||
// Write program headers.
|
||||
for (u32 i = 0; i < elf32_hdr.e_phnum; ++i)
|
||||
{
|
||||
WritePhdr(e, phdr32_arr[i]);
|
||||
if (elf32_hdr.e_data == 1)
|
||||
{
|
||||
WritePhdrLE(e, phdr32_arr[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
WritePhdr(e, phdr32_arr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < meta_hdr.section_count; i++)
|
||||
if (meta_hdr.section_count != 0)
|
||||
{
|
||||
// PHDR type.
|
||||
if (meta_shdr[i].type == 2)
|
||||
for (unsigned int i = 0; i < meta_hdr.section_count; i++)
|
||||
{
|
||||
// Seek to the program header data offset and write the data.
|
||||
e.seek(phdr32_arr[meta_shdr[i].program_idx].p_offset);
|
||||
e.write(data_buf.get() + data_buf_offset, meta_shdr[i].data_size);
|
||||
// PHDR type.
|
||||
if (meta_shdr[i].type == 2)
|
||||
{
|
||||
// Seek to the program header data offset and write the data.
|
||||
e.seek(phdr32_arr[meta_shdr[i].program_idx].p_offset);
|
||||
e.write(data_buf.get() + data_buf_offset, meta_shdr[i].data_size);
|
||||
|
||||
// Advance the data buffer offset by data size.
|
||||
data_buf_offset += meta_shdr[i].data_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int i = 0; i < phdr32_arr.size(); i++)
|
||||
{
|
||||
// Decompress if necessary.
|
||||
if (secinfo_arr[i].compressed == 2)
|
||||
{
|
||||
// Store the length in writeable memory space.
|
||||
std::unique_ptr<uLongf> decomp_buf_length(new uLongf);
|
||||
memcpy(decomp_buf_length.get(), &phdr32_arr[i].p_filesz, sizeof(uLongf));
|
||||
/// Create a pointer to a buffer for decompression.
|
||||
std::unique_ptr<u8[]> decomp_buf(new u8[phdr32_arr[i].p_filesz]);
|
||||
|
||||
// Create a buffer separate from data_buf to uncompress.
|
||||
std::unique_ptr<u8[]> zlib_buf(new u8[data_buf_length]);
|
||||
memcpy(zlib_buf.get(), data_buf.get(), data_buf_length);
|
||||
|
||||
// Use zlib uncompress on the new buffer.
|
||||
// decomp_buf_length changes inside the call to uncompress, so it must be a pointer to correct type (in writeable mem space).
|
||||
int rv = uncompress(decomp_buf.get(), decomp_buf_length.get(), zlib_buf.get() + data_buf_offset, data_buf_length);
|
||||
|
||||
// Check for errors (TODO: Probably safe to remove this once these changes have passed testing.)
|
||||
switch (rv)
|
||||
{
|
||||
case Z_MEM_ERROR: LOG_ERROR(LOADER, "MakeELF encountered a Z_MEM_ERROR!"); break;
|
||||
case Z_BUF_ERROR: LOG_ERROR(LOADER, "MakeELF encountered a Z_BUF_ERROR!"); break;
|
||||
case Z_DATA_ERROR: LOG_ERROR(LOADER, "MakeELF encountered a Z_DATA_ERROR!"); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
// Seek to the program header data offset and write the data.
|
||||
e.seek(phdr32_arr[i].p_offset);
|
||||
e.write(decomp_buf.get(), phdr32_arr[i].p_filesz);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Seek to the program header data offset and write the data.
|
||||
e.seek(phdr32_arr[i].p_offset);
|
||||
e.write(data_buf.get() + data_buf_offset, secinfo_arr[i].size);
|
||||
}
|
||||
|
||||
// Advance the data buffer offset by data size.
|
||||
data_buf_offset += meta_shdr[i].data_size;
|
||||
data_buf_offset += secinfo_arr[i].size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1309,7 +1595,14 @@ fs::file SELFDecrypter::MakeElf(bool isElf32)
|
||||
|
||||
for (u32 i = 0; i < elf32_hdr.e_shnum; ++i)
|
||||
{
|
||||
WriteShdr(e, shdr32_arr[i]);
|
||||
if (elf32_hdr.e_data == 1)
|
||||
{
|
||||
WriteShdrLE(e, shdr32_arr[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteShdr(e, shdr32_arr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1424,8 +1717,20 @@ static bool IsSelfElf32(const fs::file& f)
|
||||
|
||||
SceHeader hdr;
|
||||
SelfHeader sh;
|
||||
hdr.Load(f);
|
||||
sh.Load(f);
|
||||
|
||||
hdr.LoadLE(f);
|
||||
|
||||
if (!isVita(hdr))
|
||||
{
|
||||
f.seek(0);
|
||||
hdr.Load(f);
|
||||
sh.Load(f);
|
||||
}
|
||||
else
|
||||
{
|
||||
sh.LoadLE(f);
|
||||
}
|
||||
|
||||
|
||||
// Locate the class byte and check it.
|
||||
u8 elf_class[0x8];
|
||||
@@ -1451,13 +1756,23 @@ static bool CheckDebugSelf(fs::file& s)
|
||||
// Check for DEBUG version.
|
||||
if (key_version == 0x80 || key_version == 0xc0)
|
||||
{
|
||||
LOG_WARNING(LOADER, "Debug SELF detected! Removing fake header...");
|
||||
|
||||
s.seek(0x04);
|
||||
const u16 version = s.read<le_t<u16>>();
|
||||
|
||||
if (version == 3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG_WARNING(LOADER, "Debug SELF detected! Removing fake header...");
|
||||
|
||||
// Get the real elf offset.
|
||||
s.seek(0x10);
|
||||
|
||||
const u64 realoffset = key_version == 0x80 ? +s.read<be_t<u64>>() : +s.read<le_t<u64>>();
|
||||
// Start at the real elf offset.
|
||||
s.seek(key_version == 0x80 ? +s.read<be_t<u64>>() : +s.read<le_t<u64>>());
|
||||
s.seek(realoffset);
|
||||
|
||||
// Write the real ELF file back.
|
||||
fs::file e = fs::make_stream<std::vector<u8>>();
|
||||
@@ -1560,4 +1875,4 @@ std::array<u8, 0x10> get_default_self_klic()
|
||||
std::array<u8, 0x10> key;
|
||||
std::copy(std::begin(NP_KLIC_FREE), std::end(NP_KLIC_FREE), std::begin(key));
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ struct AppInfo
|
||||
u64 padding;
|
||||
|
||||
void Load(const fs::file& f);
|
||||
void LoadLE(const fs::file& f);
|
||||
void Show();
|
||||
};
|
||||
|
||||
@@ -24,6 +25,7 @@ struct SectionInfo
|
||||
u32 encrypted;
|
||||
|
||||
void Load(const fs::file& f);
|
||||
void LoadLE(const fs::file& f);
|
||||
void Show();
|
||||
};
|
||||
|
||||
@@ -35,6 +37,7 @@ struct SCEVersionInfo
|
||||
u32 unknown;
|
||||
|
||||
void Load(const fs::file& f);
|
||||
void LoadLE(const fs::file& f);
|
||||
void Show();
|
||||
};
|
||||
|
||||
@@ -92,9 +95,33 @@ struct ControlInfo
|
||||
u64 unknown3;
|
||||
|
||||
} npdrm;
|
||||
|
||||
// type 5 0x110 bytes
|
||||
struct
|
||||
{
|
||||
u32 pad;
|
||||
u8 unk[0x100];
|
||||
} type5;
|
||||
|
||||
// type 6 0x110 bytes
|
||||
struct
|
||||
{
|
||||
u32 pad;
|
||||
u32 unknown1;
|
||||
u8 unk[0xFC];
|
||||
} type6;
|
||||
|
||||
// type 7 0x50 bytes
|
||||
struct
|
||||
{
|
||||
u32 pad;
|
||||
u8 unk[0x40];
|
||||
} type7;
|
||||
|
||||
};
|
||||
|
||||
void Load(const fs::file& f);
|
||||
void LoadLE(const fs::file& f);
|
||||
void Show();
|
||||
};
|
||||
|
||||
@@ -317,6 +344,7 @@ struct SceHeader
|
||||
u64 se_esize;
|
||||
|
||||
void Load(const fs::file& f);
|
||||
void LoadLE(const fs::file& f);
|
||||
void Show(){}
|
||||
bool CheckMagic() const { return se_magic == 0x53434500; }
|
||||
};
|
||||
@@ -335,6 +363,7 @@ struct SelfHeader
|
||||
u64 pad;
|
||||
|
||||
void Load(const fs::file& f);
|
||||
void LoadLE(const fs::file& f);
|
||||
void Show(){}
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -158,7 +158,7 @@ void mfc_thread::cpu_task()
|
||||
|
||||
if ((cmd.cmd & ~(MFC_BARRIER_MASK | MFC_FENCE_MASK)) == MFC_PUTQLLUC_CMD)
|
||||
{
|
||||
auto& data = vm::_ref<decltype(spu.rdata)>(cmd.eal);
|
||||
auto& data = vm::ps3::_ref<decltype(spu.rdata)>(cmd.eal);
|
||||
const auto to_write = spu._ref<decltype(spu.rdata)>(cmd.lsa & 0x3ffff);
|
||||
|
||||
cmd.size = 0;
|
||||
@@ -176,16 +176,14 @@ void mfc_thread::cpu_task()
|
||||
|
||||
data = to_write;
|
||||
vm::reservation_update(cmd.eal, 128);
|
||||
_xend();
|
||||
vm::notify(cmd.eal, 128);
|
||||
_xend();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
vm::writer_lock lock(0);
|
||||
data = to_write;
|
||||
vm::reservation_update(cmd.eal, 128);
|
||||
}
|
||||
vm::writer_lock lock(0);
|
||||
data = to_write;
|
||||
vm::reservation_update(cmd.eal, 128);
|
||||
vm::notify(cmd.eal, 128);
|
||||
}
|
||||
}
|
||||
@@ -358,6 +356,7 @@ void mfc_thread::cpu_task()
|
||||
}
|
||||
else
|
||||
{
|
||||
vm::reader_lock lock;
|
||||
vm::notify_all();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
@@ -308,7 +308,7 @@ enum CellAdecChannel : s32
|
||||
CELL_ADEC_CH_3_4,
|
||||
CELL_ADEC_CH_3_4_LFE,
|
||||
CELL_ADEC_CH_RESERVED3,
|
||||
};
|
||||
};
|
||||
|
||||
// Sampling Rate
|
||||
enum CellAdecSampleRate : s32
|
||||
@@ -532,13 +532,13 @@ struct CellAdecParamM4Aac
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
struct
|
||||
{
|
||||
be_t<u32> programNumber;
|
||||
}
|
||||
adifConfig;
|
||||
|
||||
struct
|
||||
struct
|
||||
{
|
||||
be_t<s32> samplingFreqIndex; // MPEG4AAC_SamplingFreq
|
||||
be_t<u32> profile; // LC profile (1)
|
||||
@@ -683,10 +683,10 @@ struct CellAdecParamAc3
|
||||
AC3_WordSize wordSize;
|
||||
AC3_OutputMode outputMode;
|
||||
AC3_LFE outLfeOn;
|
||||
|
||||
|
||||
be_t<float> drcCutScaleFactor;
|
||||
be_t<float> drcBoostScaleFactor;
|
||||
|
||||
|
||||
AC3_CompressionMode compressionMode;
|
||||
AC3_InputChannel numberOfChannels;
|
||||
AC3_StereoMode stereoMode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "Utilities/Thread.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum CellAudioError : u32
|
||||
@@ -32,7 +32,7 @@ enum
|
||||
CELL_AUDIO_BLOCK_SAMPLES = 256,
|
||||
CELL_AUDIO_CREATEEVENTFLAG_SPU = 0x00000001,
|
||||
CELL_AUDIO_EVENT_HEADPHONE = 1,
|
||||
CELL_AUDIO_EVENT_MIX = 0,
|
||||
CELL_AUDIO_EVENT_MIX = 0,
|
||||
CELL_AUDIO_EVENTFLAG_BEFOREMIX = 0x80000000,
|
||||
CELL_AUDIO_EVENTFLAG_DECIMATE_2 = 0x08000000,
|
||||
CELL_AUDIO_EVENTFLAG_DECIMATE_4 = 0x10000000,
|
||||
@@ -40,7 +40,7 @@ enum
|
||||
CELL_AUDIO_EVENTFLAG_NOMIX = 0x40000000,
|
||||
CELL_AUDIO_MAX_PORT = 4,
|
||||
CELL_AUDIO_MAX_PORT_2 = 8,
|
||||
CELL_AUDIO_MISC_ACCVOL_ALLDEVICE = 0x0000ffffUL,
|
||||
CELL_AUDIO_MISC_ACCVOL_ALLDEVICE = 0x0000ffffUL,
|
||||
CELL_AUDIO_PERSONAL_DEVICE_PRIMARY = 0x8000,
|
||||
CELL_AUDIO_PORT_2CH = 2,
|
||||
CELL_AUDIO_PORT_8CH = 8,
|
||||
@@ -51,7 +51,7 @@ enum
|
||||
CELL_AUDIO_PORTATTR_OUT_PERSONAL_1 = 0x0000000002000000ULL,
|
||||
CELL_AUDIO_PORTATTR_OUT_PERSONAL_2 = 0x0000000004000000ULL,
|
||||
CELL_AUDIO_PORTATTR_OUT_PERSONAL_3 = 0x0000000008000000ULL,
|
||||
CELL_AUDIO_PORTATTR_OUT_SECONDARY = 0x0000000000000001ULL,
|
||||
CELL_AUDIO_PORTATTR_OUT_SECONDARY = 0x0000000000000001ULL,
|
||||
CELL_AUDIO_STATUS_CLOSE = 0x1010,
|
||||
CELL_AUDIO_STATUS_READY = 1,
|
||||
CELL_AUDIO_STATUS_RUN = 2,
|
||||
@@ -59,15 +59,15 @@ enum
|
||||
|
||||
//libaudio datatypes
|
||||
struct CellAudioPortParam
|
||||
{
|
||||
{
|
||||
be_t<u64> nChannel;
|
||||
be_t<u64> nBlock;
|
||||
be_t<u64> attr;
|
||||
be_t<float> level;
|
||||
};
|
||||
};
|
||||
|
||||
struct CellAudioPortConfig
|
||||
{
|
||||
{
|
||||
vm::bptr<u64> readIndexAddr;
|
||||
be_t<u32> status;
|
||||
be_t<u64> nChannel;
|
||||
@@ -115,7 +115,7 @@ struct audio_port
|
||||
float inc;
|
||||
};
|
||||
|
||||
float level;
|
||||
float level;
|
||||
atomic_t<level_set_t> level_set;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "cellBgdl.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellBGDL("cellBGDL");
|
||||
|
||||
|
||||
@@ -30,5 +30,5 @@ struct CellBGDLInfo
|
||||
be_t<u64> received_size;
|
||||
be_t<u64> content_size;
|
||||
be_t<s32> state; // CellBGDLState
|
||||
vm::bptr<void> reserved;
|
||||
vm::ps3::bptr<void> reserved;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// libCelp8Enc = 0x806140a1 - 0x806140bf
|
||||
|
||||
@@ -19,9 +19,9 @@ enum
|
||||
enum
|
||||
{
|
||||
CELL_CELP8ENC_FS_8kHz = 1,
|
||||
|
||||
|
||||
CELL_CELP8ENC_EXCITATION_MODE_MPE = 0,
|
||||
|
||||
|
||||
CELL_CELP8ENC_MPE_CONFIG_0 = 0,
|
||||
CELL_CELP8ENC_MPE_CONFIG_2 = 2,
|
||||
CELL_CELP8ENC_MPE_CONFIG_6 = 6,
|
||||
@@ -32,6 +32,6 @@ enum
|
||||
CELL_CELP8ENC_MPE_CONFIG_21 = 21,
|
||||
CELL_CELP8ENC_MPE_CONFIG_24 = 24,
|
||||
CELL_CELP8ENC_MPE_CONFIG_26 = 26,
|
||||
|
||||
|
||||
CELL_CELP8ENC_WORD_SZ_FLOAT,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// libCelpEnc = 0x80614001 - 0x806140ff
|
||||
|
||||
@@ -19,14 +19,14 @@ enum
|
||||
enum
|
||||
{
|
||||
CELL_CELPENC_FS_16kHz = 2,
|
||||
|
||||
|
||||
CELL_CELPENC_EXCITATION_MODE_RPE = 1,
|
||||
|
||||
|
||||
CELL_CELPENC_RPE_CONFIG_0,
|
||||
CELL_CELPENC_RPE_CONFIG_1,
|
||||
CELL_CELPENC_RPE_CONFIG_2,
|
||||
CELL_CELPENC_RPE_CONFIG_3,
|
||||
|
||||
|
||||
CELL_CELPENC_WORD_SZ_INI16_LE,
|
||||
CELL_CELPENC_WORD_SZ_FLOAT,
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellCrossController("cellCrossController");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// libDaisy = 0x80410501 - 0x804105ff
|
||||
|
||||
@@ -35,7 +35,7 @@ enum
|
||||
CELL_DAISY_MIN_ENTRY_SIZE = 16,
|
||||
CELL_DAISY_MAX_ENTRY_SIZE = (16*1024),
|
||||
CELL_DAISY_MAX_DMA_TAG = 31,
|
||||
|
||||
|
||||
// CELL_DAISY_ENTRY_SIZE(x)
|
||||
// CELL_DAISY_EA_ATOMIC(x)
|
||||
// CELL_DAISY_EA_DMA(x)
|
||||
@@ -48,35 +48,35 @@ enum
|
||||
// Queue IO
|
||||
DAISY_OUTPUT,
|
||||
DAISY_INPUT,
|
||||
|
||||
|
||||
// Block Mode
|
||||
DAISY_NOT_STALL = 0,
|
||||
DAISY_STALL = 1,
|
||||
|
||||
|
||||
// Queue Status
|
||||
DAISY_PTR_UNAVAILABLE = 0x40000001,
|
||||
DAISY_PTR_TERMINATED = 0x40000002,
|
||||
|
||||
|
||||
// Buffer Mode
|
||||
DAISY_COPY = 0,
|
||||
DAISY_REFERENCE = 1,
|
||||
|
||||
|
||||
// Constructor Mode
|
||||
DAISY_NO_PARAMETER = 0,
|
||||
DAISY_PARAMETER = 1,
|
||||
|
||||
|
||||
// Glue Mode
|
||||
DAISY_ONE_PORT = 1,
|
||||
DAISY_TWO_PORT = 2,
|
||||
|
||||
|
||||
// Queue Mode
|
||||
DAISY_IN_ORDER,
|
||||
DAISY_OUT_OF_ORDER,
|
||||
|
||||
|
||||
// Buffer Type
|
||||
DAISY_BUFFER_TYPE_REMOTE = 1,
|
||||
DAISY_BUFFER_TYPE_LOCAL = 2,
|
||||
|
||||
|
||||
// Queue Control Type
|
||||
DAISY_QCTL_TYPE_ATOMIC = 1,
|
||||
DAISY_QCTL_TYPE_LOCAL = 2,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
@@ -156,7 +156,7 @@ struct CellDmuxEsMsg
|
||||
be_t<u64> supplementalInfo;
|
||||
};
|
||||
|
||||
struct CellDmuxType
|
||||
struct CellDmuxType
|
||||
{
|
||||
be_t<s32> streamType; // CellDmuxStreamType
|
||||
be_t<u32> reserved[2];
|
||||
@@ -223,7 +223,7 @@ using CellDmuxCbMsg = u32(u32 demuxerHandle, vm::ptr<CellDmuxMsg> demuxerMsg, u3
|
||||
|
||||
struct CellDmuxCb
|
||||
{
|
||||
vm::bptr<CellDmuxCbMsg> cbMsgFunc;
|
||||
vm::bptr<CellDmuxCbMsg> cbMsgFunc;
|
||||
be_t<u32> cbArg;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum CellFiberError : u32
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
@@ -554,7 +554,7 @@ s32 cellFontExtend(u32 a1, u32 a2, u32 a3)
|
||||
//Something happens
|
||||
}
|
||||
//Something happens?
|
||||
return -1;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFontRenderCharGlyphImageVertical()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "cellFont.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
struct CellFontLibraryConfigFT
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellFs("cellFs");
|
||||
|
||||
@@ -417,7 +417,7 @@ error_code cellFsGetDirectoryEntries(u32 fd, vm::ptr<CellFsDirectoryEntry> entri
|
||||
return CellError(+op->arg._code);
|
||||
}
|
||||
|
||||
return not_an_error(rc);
|
||||
return not_an_error(rc);
|
||||
}
|
||||
|
||||
error_code cellFsReadWithOffset(u32 fd, u64 offset, vm::ptr<void> buf, u64 buffer_size, vm::ptr<u64> nread)
|
||||
@@ -433,7 +433,7 @@ error_code cellFsReadWithOffset(u32 fd, u64 offset, vm::ptr<void> buf, u64 buffe
|
||||
vm::var<lv2_file_op_rw> arg;
|
||||
|
||||
arg->_vtable = vm::cast(0xfa8a0000); // Intentionally wrong (provide correct vtable if necessary)
|
||||
|
||||
|
||||
arg->op = 0x8000000a;
|
||||
arg->fd = fd;
|
||||
arg->buf = buf;
|
||||
@@ -447,7 +447,7 @@ error_code cellFsReadWithOffset(u32 fd, u64 offset, vm::ptr<void> buf, u64 buffe
|
||||
{
|
||||
*nread = rc && rc != CELL_EFSSPECIFIC ? 0 : arg->out_size.value();
|
||||
}
|
||||
|
||||
|
||||
if (!rc && arg->out_code)
|
||||
{
|
||||
return CellError(+arg->out_code);
|
||||
@@ -475,7 +475,7 @@ error_code cellFsWriteWithOffset(u32 fd, u64 offset, vm::cptr<void> buf, u64 dat
|
||||
vm::var<lv2_file_op_rw> arg;
|
||||
|
||||
arg->_vtable = vm::cast(0xfa8b0000); // Intentionally wrong (provide correct vtable if necessary)
|
||||
|
||||
|
||||
arg->op = 0x8000000b;
|
||||
arg->fd = fd;
|
||||
arg->buf = vm::const_ptr_cast<void>(buf);
|
||||
@@ -623,7 +623,7 @@ error_code cellFsAllocateFileAreaWithoutZeroFill(vm::cptr<char> path, u64 size)
|
||||
{
|
||||
return CellError(rc);
|
||||
}
|
||||
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -670,7 +670,7 @@ s32 cellFsStReadInit(u32 fd, vm::cptr<CellFsRingBuffer> ringbuf)
|
||||
{
|
||||
return CELL_EBADF;
|
||||
}
|
||||
|
||||
|
||||
if (file->flags & CELL_FS_O_WRONLY)
|
||||
{
|
||||
return CELL_EPERM;
|
||||
@@ -780,7 +780,7 @@ s32 cellFsStReadStop(u32 fd)
|
||||
s32 cellFsStRead(u32 fd, vm::ptr<u8> buf, u64 size, vm::ptr<u64> rsize)
|
||||
{
|
||||
cellFs.todo("cellFsStRead(fd=%d, buf=*0x%x, size=0x%llx, rsize=*0x%x)", fd, buf, size, rsize);
|
||||
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
@@ -812,7 +812,7 @@ s32 cellFsStReadGetCurrentAddr(u32 fd, vm::ptr<u32> addr, vm::ptr<u64> size)
|
||||
s32 cellFsStReadPutCurrentAddr(u32 fd, vm::ptr<u8> addr, u64 size)
|
||||
{
|
||||
cellFs.todo("cellFsStReadPutCurrentAddr(fd=%d, addr=*0x%x, size=0x%llx)", fd, addr, size);
|
||||
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
@@ -828,7 +828,7 @@ s32 cellFsStReadPutCurrentAddr(u32 fd, vm::ptr<u8> addr, u64 size)
|
||||
s32 cellFsStReadWait(u32 fd, u64 size)
|
||||
{
|
||||
cellFs.todo("cellFsStReadWait(fd=%d, size=0x%llx)", fd, size);
|
||||
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
@@ -837,7 +837,7 @@ s32 cellFsStReadWait(u32 fd, u64 size)
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -853,7 +853,7 @@ s32 cellFsStReadWaitCallback(u32 fd, u64 size, vm::ptr<void(s32 xfd, u64 xsize)>
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "Emu/Cell/ErrorCodes.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "Emu/RSX/GCM.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
static const float CELL_GEM_SPHERE_RADIUS_MM = 22.5f;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// libHttp = 0x80710001 - 0x80710fff
|
||||
// libHttps = 0x80710a01 - 0x80710aff
|
||||
@@ -10,10 +10,10 @@ enum
|
||||
{
|
||||
CELL_HTTP_NET_ERROR_TYPE_MASK = 0xffffff00,
|
||||
CELL_HTTP_NET_ERROR_MASK = 0xff,
|
||||
|
||||
|
||||
// CELL_HTTP_NET_ERROR
|
||||
// CELL_HTTP_IS_NET_RESOLVER_ERROR
|
||||
|
||||
|
||||
CELL_HTTP_ERROR_ALREADY_INITIALIZED = 0x80710001,
|
||||
CELL_HTTP_ERROR_NOT_INITIALIZED = 0x80710002,
|
||||
CELL_HTTP_ERROR_NO_MEMORY = 0x80710003,
|
||||
@@ -48,7 +48,7 @@ enum
|
||||
CELL_HTTP_ERROR_CACHE_NOT_INITIALIZED = 0x80710044,
|
||||
CELL_HTTP_ERROR_LINE_EXCEEDS_MAX = 0x80710045,
|
||||
CELL_HTTP_ERROR_REQUIRES_BASIC_AUTH = 0x80710046,
|
||||
|
||||
|
||||
CELL_HTTP_ERROR_UNKNOWN = 0x80710051,
|
||||
CELL_HTTP_ERROR_INTERNAL = 0x80710052,
|
||||
CELL_HTTP_ERROR_NONREMOVABLE = 0x80710053,
|
||||
@@ -62,7 +62,7 @@ enum
|
||||
CELL_HTTP_ERROR_DECODE_SETUP = 0x8071005b,
|
||||
CELL_HTTP_ERROR_DECODE_STREAM = 0x8071005c,
|
||||
CELL_HTTP_ERROR_BROKEN_DECODE_STREAM = 0x8071005d,
|
||||
|
||||
|
||||
CELL_HTTP_ERROR_INVALID_DCACHE_PATH = 0x80710060,
|
||||
CELL_HTTP_ERROR_DCACHE_ALREADY_INITIALIZED = 0x80710061,
|
||||
CELL_HTTP_ERROR_DCACHE_NOT_INITIALIZED = 0x80710062,
|
||||
@@ -94,12 +94,12 @@ enum
|
||||
CELL_HTTP_ERROR_DCACHE_ABORTED = 0x80710082,
|
||||
CELL_HTTP_ERROR_DCACHE_INDEX_IS_CLOSING = 0x80710083,
|
||||
CELL_HTTP_ERROR_DCACHE_UNKNOWN_INDEX_STATE = 0x80710084,
|
||||
|
||||
|
||||
CELL_HTTP_ERROR_NET_FIN = 0x80710091,
|
||||
CELL_HTTP_ERROR_NET_CONNECT_TIMEOUT = 0x80710092,
|
||||
CELL_HTTP_ERROR_NET_SELECT_TIMEOUT = 0x80710093,
|
||||
CELL_HTTP_ERROR_NET_SEND_TIMEOUT = 0x80710094,
|
||||
|
||||
|
||||
CELL_HTTP_ERROR_NET_RESOLVER = 0x80710100,
|
||||
CELL_HTTP_ERROR_NET_ABORT = 0x80710200,
|
||||
CELL_HTTP_ERROR_NET_OPTION = 0x80710300,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// libHttp_Util: 0x80711001 - 0x807110ff
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
typedef vm::ptr<void> CellImeJpHandle;
|
||||
|
||||
@@ -17,9 +17,11 @@ enum {
|
||||
CELL_IMEJP_MOVE_CLAUSE_GAP = 8,
|
||||
};
|
||||
|
||||
//cellImeJpEnterChar, returning values pointed in pOutputStatus.
|
||||
//cellImeJpEnterChar, returning values pointed in pOutputStatus.
|
||||
enum {
|
||||
CELL_IMEJP_RET_NONE = 0,
|
||||
CELL_IMEJP_RET_THROUGH = 1,
|
||||
CELL_IMEJP_RET_CONFIRMED = 2,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
//Return Codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
@@ -11,7 +11,7 @@ enum
|
||||
CELL_JPGENC_ERROR_EMPTY = 0x80611194,
|
||||
CELL_JPGENC_ERROR_RESET = 0x80611195,
|
||||
CELL_JPGENC_ERROR_FATAL = 0x80611196,
|
||||
|
||||
|
||||
CELL_JPGENC_ERROR_STREAM_ABORT = 0x806111A1,
|
||||
CELL_JPGENC_ERROR_STREAM_SKIP = 0x806111A2,
|
||||
CELL_JPGENC_ERROR_STREAM_OVERFLOW = 0x806111A3,
|
||||
@@ -26,19 +26,19 @@ enum
|
||||
CELL_JPGENC_COLOR_SPACE_YCbCr = 3,
|
||||
CELL_JPGENC_COLOR_SPACE_RGBA = 10,
|
||||
CELL_JPGENC_COLOR_SPACE_ARGB = 20,
|
||||
|
||||
|
||||
CELL_JPGENC_SAMPLING_FMT_YCbCr444,
|
||||
CELL_JPGENC_SAMPLING_FMT_YCbCr422,
|
||||
CELL_JPGENC_SAMPLING_FMT_YCbCr420,
|
||||
CELL_JPGENC_SAMPLING_FMT_YCbCr411,
|
||||
CELL_JPGENC_SAMPLING_FMT_FULL,
|
||||
|
||||
|
||||
CELL_JPGENC_DCT_METHOD_QUALITY = 0,
|
||||
CELL_JPGENC_DCT_METHOD_FAST = 5,
|
||||
|
||||
|
||||
CELL_JPGENC_COMPR_MODE_CONSTANT_QUALITY,
|
||||
CELL_JPGENC_COMPR_MODE_STREAM_SIZE_LIMIT,
|
||||
|
||||
|
||||
CELL_JPGENC_LOCATION_FILE,
|
||||
CELL_JPGENC_LOCATION_BUFFER,
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "Emu/Io/KeyboardHandler.h"
|
||||
#include "cellKb.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
extern logs::channel sys_io;
|
||||
|
||||
@@ -95,8 +95,8 @@ u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode)
|
||||
// ASCII
|
||||
if (rawcode >= 0x04 && rawcode <= 0x1D) // 'A' - 'Z'
|
||||
{
|
||||
rawcode -=
|
||||
(mkey&(CELL_KB_MKEY_L_SHIFT|CELL_KB_MKEY_R_SHIFT)) ?
|
||||
rawcode -=
|
||||
(mkey&(CELL_KB_MKEY_L_SHIFT|CELL_KB_MKEY_R_SHIFT)) ?
|
||||
((led&(CELL_KB_LED_CAPS_LOCK)) ? 0 : 0x20) :
|
||||
((led&(CELL_KB_LED_CAPS_LOCK)) ? 0x20 : 0);
|
||||
return rawcode + 0x5D;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellKey2char("cellKey2char");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// L10nResult
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "Utilities/BitField.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -2,287 +2,131 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/Cell/lv2/sys_lwmutex.h"
|
||||
#include "Emu/Cell/lv2/sys_lwcond.h"
|
||||
#include "Emu/Cell/lv2/sys_spu.h"
|
||||
#include "cellSearch.h"
|
||||
#include "cellSpurs.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
#include "cellMusic.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellMusic("cellMusic");
|
||||
|
||||
struct music_t
|
||||
struct music2_t
|
||||
{
|
||||
vm::ptr<void(u32 event, vm::ptr<void> param, vm::ptr<void> userData)> func;
|
||||
vm::ptr<CellMusic2Callback> func;
|
||||
vm::ptr<void> userData;
|
||||
};
|
||||
|
||||
s32 cellMusicGetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
|
||||
s32 cellMusicGetSelectionContext()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetSelectionContext(context=*0x%x)", context);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
|
||||
s32 cellMusicSetSelectionContext2()
|
||||
{
|
||||
cellMusic.todo("cellMusicSetSelectionContext2(context=*0x%x)", context);
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC2_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC2_EVENT_SET_SELECTION_CONTEXT_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSetVolume2(f32 level)
|
||||
s32 cellMusicSetVolume2()
|
||||
{
|
||||
cellMusic.todo("cellMusicSetVolume2(level=0x%x)", level);
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC2_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC2_EVENT_SET_VOLUME_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicGetContentsId(vm::ptr<CellSearchContentId> contents_id)
|
||||
s32 cellMusicGetContentsId()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetContentsId(contents_id=*0x%x)", contents_id);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
|
||||
s32 cellMusicSetSelectionContext()
|
||||
{
|
||||
cellMusic.todo("cellMusicSetSelectionContext(context=*0x%x)", context);
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC_EVENT_SET_SELECTION_CONTEXT_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicInitialize2SystemWorkload(s32 mode, vm::ptr<CellMusic2Callback> func, vm::ptr<void> userData, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
|
||||
s32 cellMusicInitialize2SystemWorkload()
|
||||
{
|
||||
cellMusic.todo("cellMusicInitialize2SystemWorkload(mode=0x%x, func=*0x%x, userData=*0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, func, userData, spurs, priority, attr);
|
||||
|
||||
const auto music = fxm::make_always<music_t>();
|
||||
music->func = func;
|
||||
music->userData = userData;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC2_EVENT_INITIALIZE_RESULT, vm::addr_t(CELL_OK), userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicGetPlaybackStatus2(vm::ptr<s32> status)
|
||||
s32 cellMusicGetPlaybackStatus2()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetPlaybackStatus2(status=*0x%x)", status);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicGetContentsId2(vm::ptr<CellSearchContentId> contents_id)
|
||||
s32 cellMusicGetContentsId2()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetContentsId2(contents_id=*0x%x)", contents_id);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicFinalize()
|
||||
{
|
||||
cellMusic.todo("cellMusicFinalize()");
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (music->func)
|
||||
{
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC_EVENT_FINALIZE_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
}
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicInitializeSystemWorkload(s32 mode, u32 container, vm::ptr<CellMusicCallback> func, vm::ptr<void> userData, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
|
||||
s32 cellMusicInitializeSystemWorkload()
|
||||
{
|
||||
cellMusic.todo("cellMusicInitializeSystemWorkload(mode=0x%x, container=0x%x, func=*0x%x, userData=*0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, container, func, userData, spurs, priority, attr);
|
||||
|
||||
if (mode != CELL_MUSIC2_PLAYER_MODE_NORMAL)
|
||||
{
|
||||
cellMusic.todo("Unknown player mode: 0x%x", mode);
|
||||
return CELL_MUSIC_ERROR_PARAM;
|
||||
}
|
||||
|
||||
const auto music = fxm::make_always<music_t>();
|
||||
music->func = func;
|
||||
music->userData = userData;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC_EVENT_INITIALIZE_RESULT, vm::addr_t(CELL_OK), userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMusicCallback> func, vm::ptr<void> userData)
|
||||
s32 cellMusicInitialize()
|
||||
{
|
||||
cellMusic.todo("cellMusicInitialize(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x)", mode, container, spuPriority, func, userData);
|
||||
|
||||
if (mode != CELL_MUSIC2_PLAYER_MODE_NORMAL)
|
||||
{
|
||||
cellMusic.todo("Unknown player mode: 0x%x", mode);
|
||||
return CELL_MUSIC_ERROR_PARAM;
|
||||
}
|
||||
|
||||
const auto music = fxm::make_always<music_t>();
|
||||
music->func = func;
|
||||
music->userData = userData;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC_EVENT_INITIALIZE_RESULT, vm::addr_t(CELL_OK), userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicFinalize2()
|
||||
{
|
||||
cellMusic.todo("cellMusicFinalize2()");
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (music->func)
|
||||
{
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC2_EVENT_FINALIZE_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
}
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicGetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
|
||||
s32 cellMusicGetSelectionContext2()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetSelectionContext2(context=*0x%x)", context);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicGetVolume(vm::ptr<f32> level)
|
||||
s32 cellMusicGetVolume()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetVolume(level=*0x%x)", level);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicGetPlaybackStatus(vm::ptr<s32> status)
|
||||
s32 cellMusicGetPlaybackStatus()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetPlaybackStatus(status=*0x%x)", status);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSetPlaybackCommand2(s32 command, vm::ptr<void> param)
|
||||
s32 cellMusicSetPlaybackCommand2()
|
||||
{
|
||||
cellMusic.todo("cellMusicSetPlaybackCommand2(command=0x%x, param=*0x%x)", command, param);
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC2_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC2_EVENT_SET_PLAYBACK_COMMAND_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSetPlaybackCommand(s32 command, vm::ptr<void> param)
|
||||
s32 cellMusicSetPlaybackCommand()
|
||||
{
|
||||
cellMusic.todo("cellMusicSetPlaybackCommand(command=0x%x, param=*0x%x)", command, param);
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC_EVENT_SET_PLAYBACK_COMMAND_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSelectContents2()
|
||||
{
|
||||
cellMusic.todo("cellMusicSelectContents2()");
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC2_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC2_EVENT_SELECT_CONTENTS_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSelectContents(u32 container)
|
||||
s32 cellMusicSelectContents()
|
||||
{
|
||||
cellMusic.todo("cellMusicSelectContents(container=0x%x)", container);
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC_EVENT_SELECT_CONTENTS_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -296,40 +140,28 @@ s32 cellMusicInitialize2(s32 mode, s32 spuPriority, vm::ptr<CellMusic2Callback>
|
||||
return CELL_MUSIC2_ERROR_PARAM;
|
||||
}
|
||||
|
||||
const auto music = fxm::make_always<music_t>();
|
||||
const auto music = fxm::make_always<music2_t>();
|
||||
music->func = func;
|
||||
music->userData = userData;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC2_EVENT_INITIALIZE_RESULT, vm::addr_t(CELL_OK), userData);
|
||||
func(ppu, CELL_MUSIC2_EVENT_INITIALIZE_RESULT, vm::make_var<s32>(CELL_OK), userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicSetVolume(f32 level)
|
||||
s32 cellMusicSetVolume()
|
||||
{
|
||||
cellMusic.todo("cellMusicSetVolume(level=0x%x)", level);
|
||||
|
||||
const auto music = fxm::get_always<music_t>();
|
||||
|
||||
if (!music->func)
|
||||
return CELL_MUSIC_ERROR_GENERIC;
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
{
|
||||
music->func(ppu, CELL_MUSIC_EVENT_SET_VOLUME_RESULT, vm::addr_t(CELL_OK), music->userData);
|
||||
return CELL_OK;
|
||||
});
|
||||
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellMusicGetVolume2(vm::ptr<f32> level)
|
||||
s32 cellMusicGetVolume2()
|
||||
{
|
||||
cellMusic.todo("cellMusicGetVolume2(level=*0x%x)", level);
|
||||
UNIMPLEMENTED_FUNC(cellMusic);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ enum
|
||||
CELL_MUSIC_ERROR_PLAYBACK_FAILURE = 0x8002c107,
|
||||
CELL_MUSIC_ERROR_NO_MORE_CONTENT = 0x8002c108,
|
||||
CELL_MUSIC_DIALOG_OPEN = 0x8002c109,
|
||||
CELL_MUSIC_DIALOG_CLOSE = 0x8002c10a,
|
||||
CELL_MUSIC_ERROR_GENERIC = 0x8002c1ff,
|
||||
CELL_MUSIC_DIALOG_CLOSE = 0x8002c10A,
|
||||
CELL_MUSIC_ERROR_GENERIC = 0x8002c1FF,
|
||||
|
||||
CELL_MUSIC2_PLAYBACK_FINISHED = CELL_MUSIC_PLAYBACK_FINISHED,
|
||||
CELL_MUSIC2_ERROR_PARAM = CELL_MUSIC_ERROR_PARAM,
|
||||
@@ -120,8 +120,8 @@ enum
|
||||
CELL_MUSIC_SELECTION_CONTEXT_SIZE = 2048,
|
||||
};
|
||||
|
||||
using CellMusicCallback = void(u32 event, vm::ptr<void> param, vm::ptr<void> userData);
|
||||
using CellMusic2Callback = void(u32 event, vm::ptr<void> param, vm::ptr<void> userData);
|
||||
using CellMusicCallback = void(u32 event, vm::ps3::ptr<void> param, vm::ps3::ptr<void> userData);
|
||||
using CellMusic2Callback = void(u32 event, vm::ps3::ptr<void> param, vm::ps3::ptr<void> userData);
|
||||
|
||||
struct CellMusicSelectionContext
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellMusicDecode("cellMusicDecode");
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellMusicExport("cellMusicExport");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum CellNetCtlError : u32
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
//error codes
|
||||
enum
|
||||
@@ -92,7 +92,7 @@ enum CellOskDialogType
|
||||
CELL_OSKDIALOG_TYPE_SEPARATE_CANDIDATE_WINDOW = 8,
|
||||
};
|
||||
|
||||
enum
|
||||
enum
|
||||
{
|
||||
CELL_OSKDIALOG_STRING_SIZE = 512, //Theroretical maxium for osk input, games can specify a lower limit
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/Cell/lv2/sys_spu.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellOvis("cellOvis");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
@@ -38,7 +38,7 @@ enum
|
||||
CELL_PAMF_FS_48kHz = 1,
|
||||
};
|
||||
|
||||
enum
|
||||
enum
|
||||
{
|
||||
CELL_PAMF_BIT_LENGTH_16 = 1,
|
||||
CELL_PAMF_BIT_LENGTH_24 = 3,
|
||||
@@ -60,7 +60,7 @@ enum
|
||||
CELL_PAMF_AVC_LEVEL_4P2 = 42,
|
||||
};
|
||||
|
||||
enum
|
||||
enum
|
||||
{
|
||||
CELL_PAMF_AVC_FRC_24000DIV1001 = 0,
|
||||
CELL_PAMF_AVC_FRC_24 = 1,
|
||||
@@ -263,7 +263,7 @@ struct PamfStreamHeader
|
||||
u8 unknown2;
|
||||
be_t<u32> ep_offset; // offset of EP section in header
|
||||
be_t<u32> ep_num; // count of EPs
|
||||
|
||||
|
||||
union
|
||||
{
|
||||
u8 data[32]; // specific info
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellPhotoDecode("cellPhotoDecode");
|
||||
|
||||
@@ -18,14 +18,14 @@ enum
|
||||
|
||||
// Datatypes
|
||||
struct CellPhotoDecodeSetParam
|
||||
{
|
||||
{
|
||||
u32 dstBuffer_addr;
|
||||
u16 width;
|
||||
u16 height;
|
||||
};
|
||||
|
||||
struct CellPhotoDecodeReturnParam
|
||||
{
|
||||
{
|
||||
u16 width;
|
||||
u16 height;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellPhotoExport("cellPhotoExport");
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellPhotoImportUtil("cellPhotoImportUtil");
|
||||
|
||||
@@ -18,24 +18,24 @@ enum
|
||||
|
||||
// Datatypes
|
||||
struct CellPhotoImportFileDataSub
|
||||
{
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
//CellPhotoImportFormatType format;
|
||||
//CellPhotoImportTexRot rotate;
|
||||
};
|
||||
//CellPhotoImportFormatType format;
|
||||
//CellPhotoImportTexRot rotate;
|
||||
};
|
||||
|
||||
struct CellPhotoImportFileData
|
||||
{
|
||||
char dstFileName; //[CELL_FS_MAX_FS_FILE_NAME_LENGTH];
|
||||
char photo_title; //[CELL_PHOTO_IMPORT_PHOTO_TITLE_MAX_LENGTH*3];
|
||||
char game_title; //[CELL_PHOTO_IMPORT_GAME_TITLE_MAX_SIZE];
|
||||
char game_comment; //[CELL_PHOTO_IMPORT_GAME_COMMENT_MAX_SIZE];
|
||||
CellPhotoImportFileDataSub* data_sub;
|
||||
{
|
||||
char dstFileName; //[CELL_FS_MAX_FS_FILE_NAME_LENGTH];
|
||||
char photo_title; //[CELL_PHOTO_IMPORT_PHOTO_TITLE_MAX_LENGTH*3];
|
||||
char game_title; //[CELL_PHOTO_IMPORT_GAME_TITLE_MAX_SIZE];
|
||||
char game_comment; //[CELL_PHOTO_IMPORT_GAME_COMMENT_MAX_SIZE];
|
||||
CellPhotoImportFileDataSub* data_sub;
|
||||
};
|
||||
|
||||
struct CellPhotoImportSetParam
|
||||
{
|
||||
{
|
||||
unsigned int fileSizeMax;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum CellPngTxtType : s32
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
#include "cellPng.h"
|
||||
|
||||
@@ -328,7 +328,7 @@ static s32 getPngDecColourType(u8 type)
|
||||
|
||||
static bool cellPngColorSpaceHasAlpha(u32 colorspace)
|
||||
{
|
||||
switch (colorspace)
|
||||
switch (colorspace)
|
||||
{
|
||||
case CELL_PNGDEC_RGBA:
|
||||
case CELL_PNGDEC_ARGB:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "Emu/IdManager.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellRec("cellRec");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -27,33 +27,33 @@ enum
|
||||
|
||||
enum CellRescBufferMode
|
||||
{
|
||||
CELL_RESC_720x480 = 0x1,
|
||||
CELL_RESC_720x576 = 0x2,
|
||||
CELL_RESC_1280x720 = 0x4,
|
||||
CELL_RESC_1920x1080 = 0x8,
|
||||
CELL_RESC_720x480 = 0x1,
|
||||
CELL_RESC_720x576 = 0x2,
|
||||
CELL_RESC_1280x720 = 0x4,
|
||||
CELL_RESC_1920x1080 = 0x8,
|
||||
};
|
||||
|
||||
enum CellRescPalTemporalMode
|
||||
{
|
||||
CELL_RESC_PAL_50 = 0,
|
||||
CELL_RESC_PAL_60_DROP = 1,
|
||||
CELL_RESC_PAL_60_INTERPOLATE = 2,
|
||||
CELL_RESC_PAL_60_INTERPOLATE_30_DROP = 3,
|
||||
CELL_RESC_PAL_60_INTERPOLATE_DROP_FLEXIBLE = 4,
|
||||
CELL_RESC_PAL_60_FOR_HSYNC = 5,
|
||||
CELL_RESC_PAL_50 = 0,
|
||||
CELL_RESC_PAL_60_DROP = 1,
|
||||
CELL_RESC_PAL_60_INTERPOLATE = 2,
|
||||
CELL_RESC_PAL_60_INTERPOLATE_30_DROP = 3,
|
||||
CELL_RESC_PAL_60_INTERPOLATE_DROP_FLEXIBLE = 4,
|
||||
CELL_RESC_PAL_60_FOR_HSYNC = 5,
|
||||
};
|
||||
|
||||
enum CellRescRatioConvertMode
|
||||
{
|
||||
CELL_RESC_FULLSCREEN = 0,
|
||||
CELL_RESC_LETTERBOX = 1,
|
||||
CELL_RESC_PANSCAN = 2,
|
||||
CELL_RESC_FULLSCREEN = 0,
|
||||
CELL_RESC_LETTERBOX = 1,
|
||||
CELL_RESC_PANSCAN = 2,
|
||||
};
|
||||
|
||||
enum CellRescFlipMode
|
||||
{
|
||||
CELL_RESC_DISPLAY_VSYNC = 0,
|
||||
CELL_RESC_DISPLAY_HSYNC = 1,
|
||||
CELL_RESC_DISPLAY_VSYNC = 0,
|
||||
CELL_RESC_DISPLAY_HSYNC = 1,
|
||||
};
|
||||
|
||||
enum CellRescDstFormat
|
||||
@@ -64,18 +64,18 @@ enum CellRescDstFormat
|
||||
|
||||
enum CellRescResourcePolicy
|
||||
{
|
||||
CELL_RESC_CONSTANT_VRAM = 0x0,
|
||||
CELL_RESC_MINIMUM_VRAM = 0x1,
|
||||
CELL_RESC_MINIMUM_GPU_LOAD = 0x2,
|
||||
CELL_RESC_CONSTANT_VRAM = 0x0,
|
||||
CELL_RESC_MINIMUM_VRAM = 0x1,
|
||||
CELL_RESC_MINIMUM_GPU_LOAD = 0x2,
|
||||
};
|
||||
|
||||
enum CellRescConvolutionFilterMode
|
||||
{
|
||||
CELL_RESC_NORMAL_BILINEAR = 0,
|
||||
CELL_RESC_INTERLACE_FILTER = 1,
|
||||
CELL_RESC_3X3_GAUSSIAN = 2,
|
||||
CELL_RESC_2X3_QUINCUNX = 3,
|
||||
CELL_RESC_2X3_QUINCUNX_ALT = 4,
|
||||
CELL_RESC_NORMAL_BILINEAR = 0,
|
||||
CELL_RESC_INTERLACE_FILTER = 1,
|
||||
CELL_RESC_3X3_GAUSSIAN = 2,
|
||||
CELL_RESC_2X3_QUINCUNX = 3,
|
||||
CELL_RESC_2X3_QUINCUNX_ALT = 4,
|
||||
};
|
||||
|
||||
struct CellRescDsts
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "cellVpost.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Error Codes
|
||||
enum
|
||||
@@ -157,8 +157,8 @@ enum
|
||||
_CELL_SAIL_PARAMETER_TYPE_NUM_OF_ELEMENTS = 36, // Should be never used
|
||||
CELL_SAIL_PARAMETER_SOURCE_PPU_THREAD_PRIORITY = CELL_SAIL_PARAMETER_IO_PPU_THREAD_PRIORITY,
|
||||
CELL_SAIL_PARAMETER_DMUX_SPURS_TASK_PRIORITY = CELL_SAIL_PARAMETER_DMUX_SPURS_TASK_PRIORITIES, // Deprecated
|
||||
CELL_SAIL_PARAMETER_VDEC_SPURS_TASK_PRIORITY = CELL_SAIL_PARAMETER_VDEC_SPURS_TASK_PRIORITIES, // Deprecated
|
||||
CELL_SAIL_PARAMETER_ADEC_SPURS_TASK_PRIORITY = CELL_SAIL_PARAMETER_ADEC_SPURS_TASK_PRIORITIES, // Deprecated
|
||||
CELL_SAIL_PARAMETER_VDEC_SPURS_TASK_PRIORITY = CELL_SAIL_PARAMETER_VDEC_SPURS_TASK_PRIORITIES, // Deprecated
|
||||
CELL_SAIL_PARAMETER_ADEC_SPURS_TASK_PRIORITY = CELL_SAIL_PARAMETER_ADEC_SPURS_TASK_PRIORITIES, // Deprecated
|
||||
CELL_SAIL_PARAMETER_VPOST_SPURS_TASK_PRIORITY = CELL_SAIL_PARAMETER_VPOST_SPURS_TASK_PRIORITIES, // Deprecated
|
||||
};
|
||||
|
||||
@@ -367,7 +367,7 @@ enum
|
||||
// 5. Back Right
|
||||
// 6. Back Center
|
||||
// 7. LFE
|
||||
// (for at3plus)
|
||||
// (for at3plus)
|
||||
CELL_SAIL_AUDIO_CH_LAYOUT_7CH_LCRxycE = 10,
|
||||
|
||||
// 1. Front Left
|
||||
@@ -1035,7 +1035,7 @@ struct CellSailAviMediaType
|
||||
union u {
|
||||
struct audio {
|
||||
be_t<u16> formatTag;
|
||||
be_t<u16> reserved; // Specify 0
|
||||
be_t<u16> reserved; // Specify 0
|
||||
union u {
|
||||
struct mpeg {
|
||||
be_t<u16> headLayer; // Specify 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
// Return codes
|
||||
enum
|
||||
@@ -16,7 +16,7 @@ enum
|
||||
CELL_SAVEDATA_ERROR_NOUSER = 0x8002b409,
|
||||
CELL_SAVEDATA_ERROR_SIZEOVER = 0x8002b40a,
|
||||
CELL_SAVEDATA_ERROR_NODATA = 0x8002b40b,
|
||||
CELL_SAVEDATA_ERROR_NOTSUPPORTED = 0x8002b40c,
|
||||
CELL_SAVEDATA_ERROR_NOTSUPPORTED = 0x8002b40c,
|
||||
};
|
||||
|
||||
// Callback return codes
|
||||
@@ -97,7 +97,7 @@ enum
|
||||
|
||||
// Datatypes
|
||||
struct CellSaveDataSetList
|
||||
{
|
||||
{
|
||||
be_t<u32> sortType;
|
||||
be_t<u32> sortOrder;
|
||||
vm::bptr<char> dirNamePrefix;
|
||||
@@ -105,7 +105,7 @@ struct CellSaveDataSetList
|
||||
};
|
||||
|
||||
struct CellSaveDataSetBuf
|
||||
{
|
||||
{
|
||||
be_t<u32> dirListMax;
|
||||
be_t<u32> fileListMax;
|
||||
be_t<u32> reserved[6];
|
||||
@@ -113,16 +113,16 @@ struct CellSaveDataSetBuf
|
||||
vm::bptr<void> buf;
|
||||
};
|
||||
|
||||
struct CellSaveDataNewDataIcon
|
||||
{
|
||||
struct CellSaveDataNewDataIcon
|
||||
{
|
||||
vm::bptr<char> title;
|
||||
be_t<u32> iconBufSize;
|
||||
vm::bptr<void> iconBuf;
|
||||
vm::bptr<void> reserved;
|
||||
};
|
||||
|
||||
struct CellSaveDataListNewData
|
||||
{
|
||||
struct CellSaveDataListNewData
|
||||
{
|
||||
be_t<u32> iconPosition;
|
||||
vm::bptr<char> dirName;
|
||||
vm::bptr<CellSaveDataNewDataIcon> icon;
|
||||
@@ -130,14 +130,14 @@ struct CellSaveDataListNewData
|
||||
};
|
||||
|
||||
struct CellSaveDataDirList
|
||||
{
|
||||
char dirName[CELL_SAVEDATA_DIRNAME_SIZE];
|
||||
{
|
||||
char dirName[CELL_SAVEDATA_DIRNAME_SIZE];
|
||||
char listParam[CELL_SAVEDATA_SYSP_LPARAM_SIZE];
|
||||
char reserved[8];
|
||||
};
|
||||
|
||||
struct CellSaveDataListGet
|
||||
{
|
||||
{
|
||||
be_t<u32> dirNum;
|
||||
be_t<u32> dirListNum;
|
||||
vm::bptr<CellSaveDataDirList> dirList;
|
||||
@@ -145,7 +145,7 @@ struct CellSaveDataListGet
|
||||
};
|
||||
|
||||
struct CellSaveDataListSet
|
||||
{
|
||||
{
|
||||
be_t<u32> focusPosition;
|
||||
vm::bptr<char> focusDirName;
|
||||
be_t<u32> fixedListNum;
|
||||
@@ -155,45 +155,45 @@ struct CellSaveDataListSet
|
||||
};
|
||||
|
||||
struct CellSaveDataFixedSet
|
||||
{
|
||||
{
|
||||
vm::bptr<char> dirName;
|
||||
vm::bptr<CellSaveDataNewDataIcon> newIcon;
|
||||
be_t<u32> option;
|
||||
};
|
||||
|
||||
struct CellSaveDataSystemFileParam
|
||||
{
|
||||
char title[CELL_SAVEDATA_SYSP_TITLE_SIZE];
|
||||
char subTitle[CELL_SAVEDATA_SYSP_SUBTITLE_SIZE];
|
||||
char detail[CELL_SAVEDATA_SYSP_DETAIL_SIZE];
|
||||
be_t<u32> attribute;
|
||||
char reserved2[4];
|
||||
char listParam[CELL_SAVEDATA_SYSP_LPARAM_SIZE];
|
||||
char reserved[256];
|
||||
struct CellSaveDataSystemFileParam
|
||||
{
|
||||
char title[CELL_SAVEDATA_SYSP_TITLE_SIZE];
|
||||
char subTitle[CELL_SAVEDATA_SYSP_SUBTITLE_SIZE];
|
||||
char detail[CELL_SAVEDATA_SYSP_DETAIL_SIZE];
|
||||
be_t<u32> attribute;
|
||||
char reserved2[4];
|
||||
char listParam[CELL_SAVEDATA_SYSP_LPARAM_SIZE];
|
||||
char reserved[256];
|
||||
};
|
||||
|
||||
struct CellSaveDataDirStat
|
||||
{
|
||||
{
|
||||
be_t<s64> atime;
|
||||
be_t<s64> mtime;
|
||||
be_t<s64> ctime;
|
||||
char dirName[CELL_SAVEDATA_DIRNAME_SIZE];
|
||||
char dirName[CELL_SAVEDATA_DIRNAME_SIZE];
|
||||
};
|
||||
|
||||
struct CellSaveDataFileStat
|
||||
{
|
||||
{
|
||||
be_t<u32> fileType;
|
||||
char reserved1[4];
|
||||
be_t<u64> size;
|
||||
be_t<s64> atime;
|
||||
be_t<s64> mtime;
|
||||
be_t<s64> ctime;
|
||||
char fileName[CELL_SAVEDATA_FILENAME_SIZE];
|
||||
char fileName[CELL_SAVEDATA_FILENAME_SIZE];
|
||||
char reserved2[3];
|
||||
};
|
||||
|
||||
struct CellSaveDataStatGet
|
||||
{
|
||||
{
|
||||
be_t<s32> hddFreeSizeKB;
|
||||
be_t<u32> isNewData;
|
||||
CellSaveDataDirStat dir;
|
||||
@@ -208,7 +208,7 @@ struct CellSaveDataStatGet
|
||||
};
|
||||
|
||||
struct CellSaveDataAutoIndicator
|
||||
{
|
||||
{
|
||||
be_t<u32> dispPosition;
|
||||
be_t<u32> dispMode;
|
||||
vm::bptr<char> dispMsg;
|
||||
@@ -217,25 +217,25 @@ struct CellSaveDataAutoIndicator
|
||||
vm::bptr<void> reserved;
|
||||
};
|
||||
|
||||
struct CellSaveDataStatSet
|
||||
{
|
||||
struct CellSaveDataStatSet
|
||||
{
|
||||
vm::bptr<CellSaveDataSystemFileParam> setParam;
|
||||
be_t<u32> reCreateMode;
|
||||
vm::bptr<CellSaveDataAutoIndicator> indicator;
|
||||
};
|
||||
|
||||
struct CellSaveDataFileGet
|
||||
{
|
||||
{
|
||||
be_t<u32> excSize;
|
||||
char reserved[64];
|
||||
};
|
||||
};
|
||||
|
||||
struct CellSaveDataFileSet
|
||||
{
|
||||
struct CellSaveDataFileSet
|
||||
{
|
||||
be_t<u32> fileOperation;
|
||||
vm::bptr<void> reserved;
|
||||
be_t<u32> fileType;
|
||||
u8 secureFileId[CELL_SAVEDATA_SECUREFILEID_SIZE];
|
||||
u8 secureFileId[CELL_SAVEDATA_SECUREFILEID_SIZE];
|
||||
vm::bptr<char> fileName;
|
||||
be_t<u32> fileOffset;
|
||||
be_t<u32> fileSize;
|
||||
@@ -243,8 +243,8 @@ struct CellSaveDataFileSet
|
||||
vm::bptr<void> fileBuf;
|
||||
};
|
||||
|
||||
struct CellSaveDataCBResult
|
||||
{
|
||||
struct CellSaveDataCBResult
|
||||
{
|
||||
be_t<s32> result;
|
||||
be_t<u32> progressBarInc;
|
||||
be_t<s32> errNeedSizeKB;
|
||||
@@ -253,9 +253,9 @@ struct CellSaveDataCBResult
|
||||
};
|
||||
|
||||
struct CellSaveDataDoneGet
|
||||
{
|
||||
{
|
||||
be_t<s32> excResult;
|
||||
char dirName[CELL_SAVEDATA_DIRNAME_SIZE];
|
||||
char dirName[CELL_SAVEDATA_DIRNAME_SIZE];
|
||||
be_t<s32> sizeKB;
|
||||
be_t<s32> hddFreeSizeKB;
|
||||
char reserved[64];
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "cellScreenshot.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellScreenshot("cellScreenshot");
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ enum
|
||||
|
||||
struct CellScreenShotSetParam
|
||||
{
|
||||
vm::bcptr<char> photo_title;
|
||||
vm::bcptr<char> game_title;
|
||||
vm::bcptr<char> game_comment;
|
||||
vm::ps3::bcptr<char> photo_title;
|
||||
vm::ps3::bcptr<char> game_title;
|
||||
vm::ps3::bcptr<char> game_comment;
|
||||
};
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "cellMusic.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
#include "cellSearch.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
logs::channel cellSearch("cellSearch");
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ enum
|
||||
CELL_SEARCH_TITLE_LEN_MAX = 384,
|
||||
CELL_SEARCH_TAG_NUM_MAX = 6,
|
||||
CELL_SEARCH_TAG_LEN_MAX = 63,
|
||||
CELL_MUSIC_SELECTION_CONTEXT_SIZE = 2048,
|
||||
CELL_SEARCH_PATH_LEN_MAX = 63,
|
||||
CELL_SEARCH_MTOPTION_LEN_MAX = 63,
|
||||
CELL_SEARCH_DEVELOPERDATA_LEN_MAX = 64,
|
||||
@@ -225,7 +226,7 @@ enum CellSearchSharableType : s32
|
||||
};
|
||||
|
||||
using CellSearchId = s32;
|
||||
using CellSearchSystemCallback = void(CellSearchEvent event, s32 result, vm::cptr<void> param, vm::ptr<void> userData);
|
||||
using CellSearchSystemCallback = void(CellSearchEvent event, s32 result, vm::ps3::cptr<void> param, vm::ps3::ptr<void> userData);
|
||||
|
||||
struct CellSearchContentId
|
||||
{
|
||||
@@ -338,6 +339,11 @@ struct CellSearchVideoSceneInfo
|
||||
char tags[CELL_SEARCH_TAG_NUM_MAX][CELL_SEARCH_TAG_LEN_MAX];
|
||||
};
|
||||
|
||||
struct CellMusicSelectionContext
|
||||
{
|
||||
char data[CELL_MUSIC_SELECTION_CONTEXT_SIZE];
|
||||
};
|
||||
|
||||
struct CellSearchContentInfoPath
|
||||
{
|
||||
char contentPath[CELL_SEARCH_PATH_LEN_MAX + 1];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "cellSpudll.h"
|
||||
|
||||
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
logs::channel cellSpudll("cellSpudll");
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user