Compare commits

...

435 Commits

Author SHA1 Message Date
Zangetsu38 ef46739f42 Update LLVM 5.0 2017-07-10 19:00:54 +02:00
Zion Nimchuk 2f72fcdb45 Initial LLVM 5 port 2017-07-10 19:00:54 +02:00
Zangetsu38 9565d64c7d Update Project to Visual Studio 2017. 2017-07-10 19:00:54 +02:00
RipleyTom fd061d9c55 Fix Stswi instruction 2017-07-10 19:00:51 +02:00
scribam 648ecc833c Check if the pth is a valid directory before to look for icons. 2017-07-10 19:00:51 +02:00
Robbie 6a2628f139 Fix VFS default button (#2975) 2017-07-10 19:00:51 +02:00
Megamouse 93c6826d35 Dagimon super mega level
add stretchToDisplayArea to settingsdialog

fix color picker and toolbar background

settingsdialog adjustments

fix tooltips + .pup

fix adapter box
2017-07-10 19:00:51 +02:00
Megamouse 9d259368fa Dagimon mega level
ani fixes

add color options for toolbar and game icons
2017-07-10 19:00:51 +02:00
Megamouse 6c09198799 Dagimon ultra level
gui new design: hidpi fixes

settings_dialog fix glitch

welcome dialog hdpi adjustments

about dialog hdpi adjustments

about dialog fix size

pad dialog hdpi adjustments

settings_dialog: remove SetActiveTab
2017-07-10 19:00:51 +02:00
Megamouse 96c6a67607 Dagimon champion level 2017-07-10 19:00:51 +02:00
Megamouse cec9a66393 Dagimon rookie level
fix lib stuff

fix build

add slider amd searchbar

disable gamelist toolbar per default

Dagimon rookie level
2017-07-10 19:00:51 +02:00
Jake e1f80819ca Move vblank to 'custom' package_id, move fps limit sleep, fix dx12 0 size fb crash 2017-07-10 01:00:10 -05:00
Jake 8c64bd5754 tiles, sync, bufferId, flipReset 2017-07-08 16:54:18 -05:00
Jake 18964fbab3 gcm: Fix bufferId, sysutil: add refreshrate 2017-07-08 16:54:17 -05:00
Jake 2f0052f10b add to auto lle 2017-07-08 16:54:17 -05:00
Jake daed44574b fix thread 2017-07-08 16:54:17 -05:00
Jake afd10c5668 dma main fix 2017-07-08 16:54:16 -05:00
Jake 7f37cff370 fix labels 2017-07-08 16:54:16 -05:00
Jake 5966c1a85b stuff 2017-07-08 16:54:15 -05:00
Jake 036aadc66b Rebase and cleanup, removed irrelevant code, lv2 lle gcm for now 2017-07-08 16:54:15 -05:00
raven02 2e47c42367 Add Stretch to Display Area option (#2961) 2017-07-08 16:06:11 +03:00
kd-11 41d921808b spu: Reimplement FCGT and FCMGT to handle corner cases (such as comparisons against infinites and denormals)
- Also optimize FMA/FMS/FNMS for recompiler
2017-07-08 14:52:16 +03:00
kd-11 9e7a42d057 rsx: Minor bug fixes
- vk: Do not select first available format when choosing a swapchain format
- gl/vk: Ignore rendering zero sized framebuffers/scissors
- fp: Re-enable range clamp on fp16 registers; fix fx12 clamping [-2, 2]
2017-07-08 14:52:16 +03:00
kd-11 d43e06c0ea rsx: Fix some fp bugs
rsx/fp: Properly fix RCP
- Input is always scalar, output is a vector

rsx/fp: Ignore forced unit for SIP and TEX instructions
2017-07-08 14:52:16 +03:00
kd-11 c788331e45 vk: Fix layout transitions 2017-07-08 14:52:16 +03:00
kd-11 3d935b64f2 rsx/gl/vk: Enable contents transfer when a new framebuffer is created and not cleared 2017-07-08 14:52:16 +03:00
kd-11 e9b8f94fb1 rsx/gl/vk: Enable frame skipping 2017-07-08 14:52:16 +03:00
kd-11 b95ffaf4dd rsx: Implement skip draw. Also, start working on MT vertex upload 2017-07-08 14:52:16 +03:00
kd-11 ab97a0a5a3 spu: dma tweaks 2017-07-08 14:52:16 +03:00
Megamouse e74d6446c8 msg_dialog_frame: hidpi fixes for osk_dialog 2017-07-07 01:53:42 +03:00
Megamouse cbb7753227 msg_dialog_frame: hidpi fixes for m_dialog
move spacings up
2017-07-07 01:53:42 +03:00
Zion Nimchuk 78fad1a372 Finalize AppImage build 2017-07-04 21:19:33 +01:00
RipleyTom d793f8ad78 Implements sys_fs_disk_free 2017-07-04 16:16:32 +03:00
Nekotekina dda274afb0 Fix Miku OP video
And break something else
2017-07-04 02:04:22 +03:00
Nekotekina f0d184f38b PPU LLVM: relocation support 2017-07-04 02:04:22 +03:00
Nekotekina 9fccb47e7c bf_t: fix warning 2017-07-04 02:04:22 +03:00
Robbie fd1ca2f102 Change default selection button to select entry instead of cancel. 2017-07-03 23:56:55 +03:00
Robbie 458968658f Fix akiba with cell cancel 2017-07-03 23:56:55 +03:00
Martin Lindhe 051dd388d7 remove invalid comment 2017-07-03 23:30:09 +03:00
Zion 233506480b Fix CMake build instructions on Linux (#2946)
Fix CMake build instructions on Linux
2017-07-03 19:30:34 +01:00
Martin Lindhe 37898d38e5 README: add fedora instructions 2017-07-03 17:51:39 +01:00
Martin Lindhe be441bd3a7 README: relax qt5 version requirement to 5.7 2017-07-03 17:32:14 +01:00
Martin Lindhe 2e9a543598 qt: relax dependency to qt 5.7 2017-07-03 17:32:14 +01:00
Robbie 190a59ce03 Basic Save Manager (#2924)
* The basic unstubbing.  Save entries will be listed and you can select a save.  If you select none, then it'll work as well.  WIP

* Filled out the trivial parts of the info dialog.

* Finish implementation and clean up.  No "maintain" dialog or context menu for now until the copy/delete functions are implemented.

* Fix crash

* Update cellSaveData.cpp
2017-07-01 21:42:09 +03:00
Zangetsu38 253e7a90b8 vk: add "add_signed" in blend op. 2017-06-30 18:40:40 +03:00
Megamouse fd4a153eef GUI fixes + log stacking (#2897)
* Add Stacking option to log contextmenu

Squashed commit:

[69f296af] cleanup

[4f4bf41f] use contextmenu instead

[e67036bc] use gui settings instead (+1 squashed commits)

Squashed commits:

[b3913dbe] fix backwards selection (+1 squashed commits)

Squashed commits:

[1e150f04] add stacking option (+3 squashed commit)

Squashed commit:

[be78da4f] fix scroll

[d3450c21] fix clearSelection

[e962ec9c] fix log color issue

* fix recent games related app crash

* gamelist improvements

Squashed commit:

[aa1f79c2] fix title names & con background

[d8381984] fix gamelist search

* finally fix show menu bug

* add rows to gamelist: resolutions, sound formats and parental level

* fix gamelist loadsettings
2017-06-30 15:41:40 +03:00
Inviuz 645f0e63ab REF 57 plus FREF fix
kept bothering me until i realized what was wrong with it
2017-06-30 14:24:00 +03:00
Nekotekina c087a9534a PPU LLVM: SSA reordering
Fetch indirect jump target
Flush registers earlier
2017-06-29 17:48:55 +03:00
Nekotekina da87bb6710 PPU LLVM: minor fix 2017-06-29 17:48:55 +03:00
Nekotekina 3c064439b3 PPU LLVM: new mptr/cptr format 2017-06-29 17:48:55 +03:00
Nekotekina 85f8a42bd2 PPU: MTOCRF optimization 2017-06-29 17:48:55 +03:00
Nekotekina ef55d6fa0c PPU LLVM: less trash, fix crash 2017-06-29 17:48:55 +03:00
Nekotekina aa34fa8baa PPU LLVM: some passes disabled 2017-06-29 17:48:55 +03:00
Nekotekina 2629f9be44 PPU: VREFP, VRSQRTEFP changed 2017-06-29 17:48:55 +03:00
Nekotekina fc2a45d6d6 Removed unnecessary code 2017-06-29 17:48:55 +03:00
Nekotekina 22af341ad3 umulh64, mulh64 moved; added ror8/16/32 2017-06-29 17:48:55 +03:00
kd-11 a69f19a9ab rsx/decompilers: Avoid std::endl like the plague. It adds extra processing overhead 2017-06-29 13:13:19 +03:00
kd-11 d7662e54cc rsx/fp: Do not swizzle shadow lookups 2017-06-29 13:13:19 +03:00
kd-11 459a7ba5a2 rsx: Avoid using push_back/emplace_back on empty STL containers
- Reckless management of STL containers causes significant slowdown
- Also reorders vertex compare steps to fail quickly on simpler checks
2017-06-29 13:13:19 +03:00
kd-11 9cb58a47cd gl: Avoid creating surface copies when strict mode is disabled. 2017-06-29 13:13:19 +03:00
kd-11 3651e67a25 vk: Fix mapping of output colors to render target ranges 2017-06-29 13:13:19 +03:00
kd-11 8a0f6f1cbc gl: Fix legacy ring buffer address alignment
- Should always return a base address aligned to the buffers alignment.
- Fixes renderdoc crashes when capturing
2017-06-29 13:13:19 +03:00
kd-11 9cbaacb13f cellVideoOut: Enable 59.94 Hz required for some games 2017-06-29 13:13:19 +03:00
kd-11 1887e2460f rsx: Use loose memory protection on textures since they're almost guaranteed to be wholly moved when changing. Speedup. 2017-06-29 13:13:19 +03:00
kd-11 6e578c4fde rsx: Initialize declared but unset varying variables to all ones 2017-06-29 13:13:19 +03:00
kd-11 47e5074dc5 rsx: Emulated index buffers are based on vertex 0 with no disjoint ranges
- Drop the 'first' argument as it is unused for now
2017-06-29 13:13:19 +03:00
kd-11 74d8619240 dx12: Fix error reporting 2017-06-29 13:13:19 +03:00
Nekotekina 89f676de75 PPU: preparations (no fixes) 2017-06-26 16:56:13 +03:00
Nekotekina 061c92ba1f PPU LLVM: Improve FlushRegisters 2017-06-26 16:56:13 +03:00
Nekotekina 8034196c25 ppu_syscall_code type added (for fmt) 2017-06-26 16:56:13 +03:00
Nekotekina f49a30bc1a PPU LLVM: disable unnecessary passes 2017-06-26 16:56:13 +03:00
Nekotekina 1196e9decc PPU LLVM: remove unnecessary code 2017-06-26 16:56:13 +03:00
Nekotekina cd4f290d3d PPU LLVM: v2, simplification (no allocas) 2017-06-26 16:56:13 +03:00
Nekotekina 45fae363c6 PPU LLVM: MFCR optimized 2017-06-26 16:56:13 +03:00
Nekotekina 9738ce0cf6 LLVM: fix cancellation 2017-06-26 16:56:13 +03:00
Nekotekina e5ae32e5f3 Fix #ifdef style 2017-06-26 16:56:13 +03:00
Inviuz 81ab6ab8b4 FREFS/weak imports and VREFS 4 and 6 2017-06-26 14:17:34 +03:00
Megamouse cfbfdd7b8a dialog fixes for multithreading (#2913)
* add appicon to msg_dialogs

* give every msg_dialog its own taskprogress

* weird little m*f* algorithm
2017-06-26 02:44:52 +03:00
Megamouse 8d0e7adb62 fix image load log message 2017-06-25 00:13:10 +03:00
Megamouse 96a893120d disable compat for non ps3 games 2017-06-25 00:13:10 +03:00
Megamouse a1c72de1eb add "Other" category
include all categories to list and filters
2017-06-25 00:13:10 +03:00
Megamouse d11bb71a17 Reenable Home and Audio/Video interactions 2017-06-25 00:13:10 +03:00
Nekotekina 6561ddae41 PPU LLVM: multithread compilation 2017-06-24 19:12:19 +03:00
Nekotekina ef21e2253f qt: Use #pragma once, Q_SIGNALS, Q_SLOTS 2017-06-24 14:25:11 +03:00
Nekotekina dd553331df qt: Remove emit 2017-06-24 14:25:11 +03:00
Nekotekina d86858da64 Fix tabs 2017-06-24 14:25:11 +03:00
Nekotekina fcefbf26c6 wxFuneral 2017-06-24 14:25:11 +03:00
Nekotekina 79a3b308d1 qt: Update about dlg 2017-06-24 14:25:11 +03:00
Robbie 5ecc7d5360 Fix issue with msgdialog not passing event back properly. 2017-06-24 13:59:07 +03:00
Nekotekina 321f50bf7b qt: Fix kb pad handler 2017-06-23 20:09:33 +03:00
Nekotekina d0b37777c3 Remove throw cpu_flag 2017-06-23 20:09:33 +03:00
Nekotekina aea094730b PPU LLVM: paradigm shift
For now, compile only one block at time
Use tail calls to move between blocks
Fully write PPU context (except CIA)

This fixes many compatibility problems
2017-06-23 20:09:33 +03:00
Nekotekina a29d7d3962 LLVM: implement STSWI, LSWI...
Fix DIVD, DIVDU, DIVW, DIVWU, MULHW
Removed __adde_get_ca in ADDE, SUBFE
2017-06-23 20:09:33 +03:00
Nekotekina 155f13ed54 Workaround booting NP games 2017-06-23 20:09:33 +03:00
Nekotekina 82a296f900 PPUOpcodes.h updated 2017-06-23 20:09:33 +03:00
Nekotekina 0df861d7b5 Added uptr type 2017-06-23 20:09:33 +03:00
Nekotekina 0890cc3e49 qt: Fix OutDir config 2017-06-23 20:09:33 +03:00
Nekotekina 0da9c8d20c qt: Fix logging 2017-06-23 20:09:33 +03:00
Zion b3c4ec4b55 Fix Travis build (#2902) 2017-06-23 16:51:39 +03:00
Megamouse 4ce8e9ba16 fix debugger o.O (#2903)
* fix debugger o.O

* minor simplification

* how did I not see this the first time
2017-06-23 15:08:38 +03:00
Megamouse 51ce8f6c20 add No Thread option 2017-06-23 02:16:14 +03:00
kd-11 72edf26fb8 rsx/gui: Add a strict mode toggle. Also reorganizes the graphics tab a bit
code cleanup
2017-06-22 23:36:15 +03:00
kd-11 d2b3cf22e3 vs: drop user files from shipped vs files 2017-06-22 23:36:15 +03:00
kd-11 28f3e9a65b vk: Move resource init/destroy to constructor and destructor 2017-06-22 23:36:15 +03:00
kd-11 17318112eb rsx: Do not sample as pcf shader if writing a vector result 2017-06-22 23:36:15 +03:00
kd-11 590bb7cbe4 rsx: Bug fixes
rsx: Give more info when ring buffer allocations fail
2017-06-22 23:36:15 +03:00
kd-11 798f90dac2 rsx/ui: Make a few settings configurable via the GUI 2017-06-22 23:36:15 +03:00
kd-11 b2e906f4cc rsx: Code cleanup. Fixes several dozen warnings
- Wrap unused parameters as comments to prevent C1400
- Fix sized variable conversions with explicit casts
2017-06-22 23:36:15 +03:00
kd-11 11317acdbe rsx: Handle non-zero base vertex better
- Vertex buffer contents treat the base vertex as vertex 0 so we do the same for indices

rsx: Fix vertex base indexing

rsx: Properly fix non-zero offset indexed rendering
2017-06-22 23:36:15 +03:00
kd-11 5c6cf77c57 rsx: Register NV4097_SET_COLOR_KEY_COLOR method. 2017-06-22 23:36:15 +03:00
kd-11 13825c9ef7 vk: Proper shutdown to avoid destroying resources still in use 2017-06-22 23:36:15 +03:00
kd-11 6013b0782e vk: Avoid constantly reinitializing the SH context when compiling SPIRV. Speedup 2017-06-22 23:36:15 +03:00
kd-11 5f180e0b30 vk: Prefer optimal formats when clearing buffers 2017-06-22 23:36:15 +03:00
kd-11 84ae1c5214 gl: Silence log spam 2017-06-22 23:36:15 +03:00
kd-11 86adc42739 rsx/gl/vk: Invert default stencil values
- Fixes stencil volume shadows in a few games. This is part of the surface invalidation workarounds
2017-06-22 23:36:15 +03:00
kd-11 30f276a49b gl: Properly emulate signed normalized wide integers
Another fix for signed normalized formats; single component vectors are swizzled
2017-06-22 23:36:15 +03:00
kd-11 98cf72e0fb rsx: Fix clip space computations 2017-06-22 23:36:15 +03:00
kd-11 75964c686f rsx/gl/vk: Fix some warnings and whitespace issues (LF vs CRLF) 2017-06-22 23:36:15 +03:00
kd-11 0cb6dee474 vk/gl: Do not sample currently bound render targets
- Create temporary copies for use with the draw call instead
2017-06-22 23:36:15 +03:00
kd-11 db1a90d828 rsx: Discard surface store contents once per frame (temp workaround)
Need to find the proper command issued to discard all surfaces
2017-06-22 23:36:15 +03:00
kd-11 110974af0b vk/gl: Fix sampling of shadow2D textures 2017-06-22 23:36:15 +03:00
kd-11 69d3d47901 gl: Fix clip-space -> depth conversion. Fixes remaining depth read issues
- Also set some default values for samplers in a cleaner way using their 'natural' float values
2017-06-22 23:36:15 +03:00
kd-11 b50d5107b3 rsx/vk/gl: Minor fixes 2017-06-22 23:36:15 +03:00
kd-11 6a9eef0382 rsx/gl/vk: Enable use of native PCF shadows 2017-06-22 23:36:15 +03:00
kd-11 5f66d0b996 rsx/wip: Fix depth surface reuse and clearing (fixes shadows) 2017-06-22 23:36:15 +03:00
kd-11 701728ecd7 rsx: Fix depth-as-rgba read in fp 2017-06-22 23:36:15 +03:00
kd-11 423fd4a388 rsx: Fix stencil initial values 2017-06-22 23:36:15 +03:00
Zion ea2970d6e5 Fix da build (#2900)
* Add RelWithDebInfo

* Fix the build
2017-06-22 21:05:32 +01:00
Jan Beich 392d91b604 Improve portability for BSDs (#2813)
* sys_net: don't use fds_bits from a system header on FreeBSD

rpcs3/Emu/Cell/Modules/sys_net.cpp:137:14: error: no member named '__fds_bits' in
      'sys_net::fd_set'; did you mean 'fds_bits'?
                                if (src->fds_bits[i] & (1 << bit))
                                         ^~~~~~~~
                                         fds_bits
/usr/include/sys/select.h:75:18: note: expanded from macro 'fds_bits'
#define fds_bits        __fds_bits
                        ^
rpcs3/Emu/Cell/Modules/sys_net.h:114:13: note: 'fds_bits' declared here
                be_t<u32> fds_bits[32];
                          ^

* GUI: fallback to xdg-open on other Unices

rpcs3/Gui/GameViewer.cpp:289:26: error: use of undeclared identifier 'command'
        wxExecute(fmt::FromUTF8(command));
                                ^

* File: FreeBSD never supported copyfile(3) but sendfile(2) works fine

Utilities/File.cpp:114:10: fatal error: 'copyfile.h' file not found
#include <copyfile.h>
         ^~~~~~~~~~~~

* Thread: add signal handling for BSDs

Utilities/Thread.cpp:761:23: error: use of undeclared identifier 'REG_RAX'
static const decltype(REG_RAX) reg_table[] =
                      ^
Utilities/Thread.cpp:763:2: error: use of undeclared identifier 'REG_RAX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
        ^
Utilities/Thread.cpp:763:11: error: use of undeclared identifier 'REG_RCX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                 ^
Utilities/Thread.cpp:763:20: error: use of undeclared identifier 'REG_RDX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                          ^
Utilities/Thread.cpp:763:29: error: use of undeclared identifier 'REG_RBX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                   ^
Utilities/Thread.cpp:763:38: error: use of undeclared identifier 'REG_RSP'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                            ^
Utilities/Thread.cpp:763:47: error: use of undeclared identifier 'REG_RBP'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                                     ^
Utilities/Thread.cpp:763:56: error: use of undeclared identifier 'REG_RSI'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                                              ^
Utilities/Thread.cpp:763:65: error: use of undeclared identifier 'REG_RDI'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                                                       ^
Utilities/Thread.cpp:764:2: error: use of undeclared identifier 'REG_R8'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
        ^
Utilities/Thread.cpp:764:10: error: use of undeclared identifier 'REG_R9'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                ^
Utilities/Thread.cpp:764:18: error: use of undeclared identifier 'REG_R10'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                        ^
Utilities/Thread.cpp:764:27: error: use of undeclared identifier 'REG_R11'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                 ^
Utilities/Thread.cpp:764:36: error: use of undeclared identifier 'REG_R12'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                          ^
Utilities/Thread.cpp:764:45: error: use of undeclared identifier 'REG_R13'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                   ^
Utilities/Thread.cpp:764:54: error: use of undeclared identifier 'REG_R14'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                            ^
Utilities/Thread.cpp:764:63: error: use of undeclared identifier 'REG_R15'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                                     ^
Utilities/Thread.cpp:764:72: error: use of undeclared identifier 'REG_RIP'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                                              ^
Utilities/Thread.cpp:792:26: error: no member named 'gregs' in '__mcontext'
                const u64 reg_value = *X64REG(context, reg - X64R_RAX);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:804:21: error: no member named 'gregs' in '__mcontext'
                out_value = (u8)(*X64REG(context, reg - X64R_AL));
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:809:21: error: no member named 'gregs' in '__mcontext'
                out_value = (u8)(*X64REG(context, reg - X64R_AH) >> 8);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:815:31: error: no member named 'gregs' in '__mcontext'
                const s8 imm_value = *(s8*)(RIP(context) + i_size - 1);
                                            ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:827:33: error: no member named 'gregs' in '__mcontext'
                const s16 imm_value = *(s16*)(RIP(context) + i_size - 2);
                                              ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:836:33: error: no member named 'gregs' in '__mcontext'
                const s32 imm_value = *(s32*)(RIP(context) + i_size - 4);
                                              ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:846:20: error: no member named 'gregs' in '__mcontext'
                out_value = (u32)RCX(context);
                                 ^~~~~~~~~~~~
Utilities/Thread.cpp:779:18: note: expanded from macro 'RCX'
#define RCX(c) (*X64REG((c), 1))
                 ^~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:851:19: error: no member named 'gregs' in '__mcontext'
                const u32 _cf = EFLAGS(context) & 0x1;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:851:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:852:19: error: no member named 'gregs' in '__mcontext'
                const u32 _zf = EFLAGS(context) & 0x40;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:852:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:853:19: error: no member named 'gregs' in '__mcontext'
                const u32 _sf = EFLAGS(context) & 0x80;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:853:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:854:19: error: no member named 'gregs' in '__mcontext'
                const u32 _of = EFLAGS(context) & 0x800;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:854:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:855:19: error: no member named 'gregs' in '__mcontext'
                const u32 _pf = EFLAGS(context) & 0x4;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:855:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:885:12: error: no member named 'gregs' in '__mcontext'
                case 1: *X64REG(context, reg - X64R_RAX) = value & 0xff | *X64REG(context, re...
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:885:62: error: no member named 'gregs' in '__mcontext'
  ...*X64REG(context, reg - X64R_RAX) = value & 0xff | *X64REG(context, reg - X64R_RAX) & 0xffffff...
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:886:12: error: no member named 'gregs' in '__mcontext'
                case 2: *X64REG(context, reg - X64R_RAX) = value & 0xffff | *X64REG(context, ...
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:886:64: error: no member named 'gregs' in '__mcontext'
  ...reg - X64R_RAX) = value & 0xffff | *X64REG(context, reg - X64R_RAX) & 0xffff0000; return true;
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:887:12: error: no member named 'gregs' in '__mcontext'
                case 4: *X64REG(context, reg - X64R_RAX) = value & 0xffffffff; return true;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:888:12: error: no member named 'gregs' in '__mcontext'
                case 8: *X64REG(context, reg - X64R_RAX) = value; return true;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:913:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x1; // set CF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:913:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:917:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x1; // clear CF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:917:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:922:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x40; // set ZF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:922:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:926:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x40; // clear ZF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:926:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:931:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x80; // set SF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:931:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:935:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x80; // clear SF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:935:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:940:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x800; // set OF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:940:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:944:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x800; // clear OF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:944:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:953:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x4; // set PF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:953:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:957:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x4; // clear PF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:957:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:962:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x10; // set AF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:962:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:966:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x10; // clear AF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:966:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:976:7: error: no member named 'gregs' in '__mcontext'
                if (EFLAGS(context) & 0x400 /* direction flag */)
                    ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:976:7: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:1020:25: error: no member named 'gregs' in '__mcontext'
        auto code = (const u8*)RIP(context);
                               ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1146:3: error: no member named 'gregs' in '__mcontext'
                RIP(context) += i_size;
                ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1368:47: error: no member named 'gregs' in '__mcontext'
        const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
                                ~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1368:53: error: use of undeclared identifier 'REG_ERR'
        const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
                                                           ^
Utilities/Thread.cpp:1393:89: error: no member named 'gregs' in '__mcontext'
  ...%s location %p at %p.", cause, info->si_addr, RIP(context)));
                                                   ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^

* Thread: add explict casts for incomplete pthread_t on some platforms

Utilities/Thread.cpp:1467:17: error: no viable overloaded '='
        ctrl->m_thread = thread;
        ~~~~~~~~~~~~~~ ^ ~~~~~~
Utilities/Atomic.h:776:12: note: candidate function not viable: cannot convert argument of
      incomplete type 'pthread_t' (aka 'pthread *') to 'const atomic_t<unsigned long>' for 1st
      argument
        atomic_t& operator =(const atomic_t&) = delete;
                  ^
Utilities/Atomic.h:902:7: note: candidate function not viable: cannot convert argument of
      incomplete type 'pthread_t' (aka 'pthread *') to 'const type' (aka 'const unsigned long') for
      1st argument
        type operator =(const type& rhs)
             ^
Utilities/Thread.cpp:1656:3: error: no matching function for call to 'pthread_detach'
                pthread_detach(m_thread.raw());
                ^~~~~~~~~~~~~~
/usr/include/pthread.h:218:6: note: candidate function not viable: no known conversion from 'type'
      (aka 'unsigned long') to 'pthread_t' (aka 'pthread *') for 1st argument
int             pthread_detach(pthread_t);
                ^

* build: dlopen() maybe in libc

/usr/bin/ld: cannot find -ldl
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* build: iconv() maybe available on some BSDs in libc

/usr/bin/ld: cannot find -liconv
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* build: hidapi-hidraw is only built on Linux

/usr/bin/ld: cannot find -lhidapi-hidraw
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* Thread: use getrusage() on more POSIX-like systems

* Qt: don't return NULL handle on other platforms

rpcs3/rpcs3qt/gs_frame.cpp:120:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

* build: properly disable Vulkan on other platforms

In file included from rpcs3/rpcs3_app.cpp:40:
In file included from rpcs3/Emu/RSX/VK/VKGSRender.h:3:
rpcs3/Emu/RSX/VK/VKHelpers.h:1209:42: error: unknown type name 'device_queues'
                        std::vector<VkBool32> supportsPresent(device_queues);
                                                              ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1211:4: error: expected member name or ';' after declaration specifiers
                        for (u32 index = 0; index < device_queues; index++)
                        ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1221:4: error: expected member name or ';' after declaration specifiers
                        for (u32 i = 0; i < device_queues; i++)
                        ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1256:4: error: expected member name or ';' after declaration specifiers
                        if (graphicsQueueNodeIndex != presentQueueNodeIndex)
                        ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1261:4: error: expected member name or ';' after declaration specifiers
                        CHECK_RESULT(vkGetPhysicalDeviceSurfaceFormatsKHR(dev, surface, &formatCount, nullptr));
                        ^
[...]
/usr/bin/ld: cannot find -lvulkan
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* build: make install/strip work by moving commands

* Qt: create surface for GL context if it wasn't ready

  #0  strlen (str=0x0) at /usr/src/lib/libc/string/strlen.c:100
  #1  0x000000000090f02e in std::__1::char_traits<char>::length (__s=0x0)
      at /usr/include/c++/v1/__string:215
  #2  std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string (__s=0x0, this=<optimized out>) at /usr/include/c++/v1/string:1547
  #3  gl::capabilities::initialize (this=0x2ba32a0 <gl::g_driver_caps>)
      at rpcs3/Emu/RSX/GL/GLHelpers.h:133
  #4  0x000000000090d3dd in gl::get_driver_caps () at rpcs3/Emu/RSX/GL/GLHelpers.cpp:56
  #5  0x00000000008fa511 in GLGSRender::on_init_thread (this=0x838d30018)
      at rpcs3/Emu/RSX/GL/GLGSRender.cpp:484
  #6  0x0000000000938f9e in rsx::thread::on_task (this=0x838d30018)
      at rpcs3/Emu/RSX/RSXThread.cpp:334
  #7  0x0000000000abc329 in task_stack::task_type<named_thread::start_thread(std::__1::shared_ptr<void> const&)::$_10>::invoke() ()
  #8  0x0000000000abc114 in thread_ctrl::start(std::__1::shared_ptr<thread_ctrl> const&, task_stack)::$_7::__invoke(void*) ()
  #9  0x0000000801e60c35 in thread_start (curthread=0x843650a00)
      at /usr/src/lib/libthr/thread/thr_create.c:289
  #10 0x0000000000000000 in ?? ()

* build: don't abort without git metadata

-- Found Git: /usr/local/bin/git (found version "2.13.1")
fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Warning at git-version.cmake:12 (message):
  git rev-list failed, unable to include version.

* build: non-parallel needs git-version.h earlier

rpcs3/rpcs3_version.cpp:3:10: fatal error: 'git-version.h' file not found
 #include "git-version.h"
          ^~~~~~~~~~~~~~~
1 error generated.
2017-06-22 21:03:41 +03:00
clienthax ac12fc8b44 HLE cellHttpUtilParseUri, Also initalise networking with windows. (#2879)
TODO: rewrite with <regex>
2017-06-22 20:27:12 +03:00
scribam fe67d51e5e Stub cellMsgDialogOpenSimulViewWarning 2017-06-22 20:08:21 +03:00
scribam 4d294e7a69 Stub sys_rsxaudio_ functions 2017-06-22 20:08:21 +03:00
scribam 45dc7fbac8 Stub some cellHttpAuth* functions 2017-06-22 20:08:21 +03:00
Jake 72590e2c93 cellGem: Fix headers 2017-06-21 19:28:05 +03:00
Jake d3df83a3ea Sprx: loading / reloc fixes 2017-06-21 19:28:05 +03:00
Jake 03268b0838 Trophy: return size for GetRequiredDiskSpace again 2017-06-21 19:28:05 +03:00
Jake f77e9f8bc1 kb/mouse: fix max in init 2017-06-21 19:28:05 +03:00
Nekotekina 9cc52c75e3 Fix hex_to_bytes 2017-06-18 23:47:37 +03:00
Ryan Gonzalez 907c800e87 Fix message shown when Qt 5 is missing (#2884) 2017-06-18 19:05:02 +01:00
Robbie 8c9b816c3d EmuGameDir --> EmuConfigDir.
Give QListWidget a parent to remove a slight memory leak.
2017-06-18 18:09:41 +01:00
Robbie 40d1882db9 Fix refresh by having the save occur on accept instead of during the destructor. 2017-06-18 18:09:41 +01:00
Zangetsu38 152ab8c13d Rename project rpcs3qt in rpcs3. 2017-06-18 00:30:51 +03:00
Zangetsu38 4c8cc7d5c2 Fix icon and exe name for VS.
Rename old rpcs3 project.
Restored original name for rpcs3_.rc to rpcs3.rc.
Delete old wxWidgets/setup.h & FindwxWidgets.cmake.
2017-06-18 00:30:51 +03:00
Ani fe8f6fb48a GUI: List SPRX modules only
Excludes .prx modules from being listed, which prevents user from
downloading random folders from the web that only have .prx modules and
break auto load.
2017-06-17 22:42:23 +03:00
Megamouse 31cedb6192 Reimplement debugger resize & disassembly (#2876)
* Reimplement debugger resize
fix interrupt

* add splitter to disassembly
fix debugger regression of last commit
fix gotoaddr pos

* travis sth sth

* add drag & drop to cg_disasm

* check for invalid address on set breakpoint
reenable debugger controls on Emu.IsReady()

* check for valid address more thoroughly
2017-06-16 21:35:58 +03:00
Megamouse aca5c73fb3 Fix inconsistent selection in gamelist/grid (#2871)
* use userrole instead of missingno

* fix consistent gamelist selection

* fix consistent gamegrid selection

* scroll to selection on refresh

* fix adapters not saved to config
2017-06-16 20:43:22 +03:00
Robbie f84f4ccd38 Include a VFS manipulation dialog (#2863)
* VFS Dialog
* Couple convenience changes. Refresh after dialog in case dev_hdd0 changes.  And, have add directory set which directory you're currently using as well.
2017-06-15 13:22:06 +03:00
Zion Nimchuk d6e4566418 Fix annoying cmake output. 2017-06-14 18:45:14 +01:00
Zion Nimchuk 8872421785 Add automated qt5 tech support in CMake 2017-06-14 18:45:14 +01:00
Zion Nimchuk 3f74bafa70 Disable LLVM option in PPU when RPCS3 is not built with it 2017-06-14 18:45:14 +01:00
Zion Nimchuk e1a78abfc9 Misc organizing and bug fixing 2017-06-14 18:45:14 +01:00
Jake 23d1ddbb8e Dx12/Vulk: Fix KernelBase.dll crash (#2870) 2017-06-13 11:36:42 +03:00
Megamouse 25823a1f66 Update Icons provided by Discord user rutantan (#2862)
* update Icons + remove rightclick on toolbar
* use better data icons
* use better disc icons
* Use better unknown icons
* final adjustment (hdd icons)
2017-06-12 20:23:12 +01:00
Zion Nimchuk 0c4cc34488 Implement strncasecmp and strrchr 2017-06-12 20:25:03 +03:00
Robbie 5c7a4b1405 Add ability to boot elves in command line. (#2859) 2017-06-12 16:47:26 +01:00
Megamouse a3d1f7b7b0 Grid Mode + Tool Bar (#2857)
* Grid layout

* Add Tiny Mode
fix scrolling
fix maxGamesPerRow calculation

* prime empty toolbar

* Add Search Bar, Icon Size and List Mode to ToolBar
Fix some minor glitches

* fix toolbar save and adjust default margin

* fix toolbar regression
minor simplification in Refresh

* Implement search and rename PopulateUI to PopulateGameList

* minor refactoring hehehehehehe

* Fix crash

* refresh speedboost optimizations

* Small refactoring of refresh to have default argument of false.

* add icons to toolbar

* fix scrambed order

* search for serial as well
2017-06-11 15:07:00 +01:00
kd-11 9aa632bcc1 rsx/vk: Fixes for ring buffer allocation and image clipping (#2850) 2017-06-10 23:32:17 +03:00
RipleyTom 0dd10d1457 Command line elf path fix (#2844) 2017-06-10 22:50:10 +03:00
Ani 5dd5323ad0 Revert "Grid Game Layout (#2854)" (#2856)
This reverts commit 3537671cb7.
2017-06-10 16:05:13 +01:00
Robbie 3537671cb7 Grid Game Layout (#2854)
* Grid layout

* Add Tiny Mode
fix scrolling
fix maxGamesPerRow calculation

* prime empty toolbar

* Add Search Bar, Icon Size and List Mode to ToolBar
Fix some minor glitches

* fix toolbar save and adjust default margin
2017-06-10 22:41:14 +08:00
flash-fire 511ff9d12c Fix visual studio build since vulkan changed debug library names in update. 2017-06-10 15:59:22 +03:00
Megamouse d2518caf2e GUI: Hotfix for Boot Recent (#2847)
* fix recent list
check for empty name
only change list enabled at aboutToShow
only AddRecentGame if Boot succeeded

* use stringpairlist instead of two stringlists
fix weird typo line

* fix travis
2017-06-08 19:59:07 +01:00
Areiser e5e95a31f1 Add qt5-base dependency for arch linux (#2841)
Add Qt5 dependency for arch linux and debian/ubuntu
2017-06-08 18:01:30 +01:00
kd-11 fab6951789 Fix dpi awareness error; Enable program debug information on msvc 2017-06-08 19:08:44 +03:00
kd-11 12da498001 vk: API bug fixes - Improve spec conformity
explicitly request anisotropic filtering and BC compression

clean up a leaking framebuffer handle reference when using debug overlay

Wait for device instead of queue to ensure no conflict during renderer shutdown

Clip scissor regions when doing surface clears
2017-06-08 19:08:44 +03:00
kd-11 444c64ae75 update vulkan and glslang submodules
update vulkan.7z
2017-06-08 19:08:44 +03:00
kd-11 2556484c67 fixes to project files and build scripts
cleanup
2017-06-08 19:08:44 +03:00
kd-11 860b76452f vulkan bringup on linux
cleanup: drop unused stuff
2017-06-08 19:08:44 +03:00
Megamouse 6cb7a17814 GUI: Add recent games menu (#2843)
* add recent games menu

* remove invalid paths from list

* push InvalidRecentAction into BootRecentAction

* disable actions on boot
disable clear recent on freeze recent

* fix gamelist games not booting on recent list

* minor fix for list disable error
2017-06-08 13:52:18 +01:00
Megamouse 0f433ea882 use global config as default for game config again (#2845)
this was missing as a result to the previous fix of the game configs
2017-06-07 20:12:19 +01:00
Megamouse affda37d04 fix dpi scaling (for all ?) 2017-06-07 00:01:45 +01:00
Megamouse bda945218d add dpi scaling for windows
fix welcome screen for all platforms (looks slightly different)
2017-06-07 00:01:45 +01:00
Megamouse 01ea3def54 maybe fix about dialog encoding 2017-06-07 00:01:45 +01:00
Megamouse 6ab69012e3 fix game config saving to global if empty 2017-06-07 00:01:45 +01:00
Megamouse 35c80ab9fc fix about dialog icon 2017-06-07 00:01:45 +01:00
Megamouse 8183449fb1 fix shortcuts 2017-06-07 00:01:45 +01:00
Talkashie 761b74ec59 Update game_list_frame.cpp (#2835)
Fix two typos and make message less vague
2017-06-05 18:16:05 +01:00
Ani 1c91dac211 Fix travis (#2832) 2017-06-04 20:52:57 +01:00
Ani 3d284d3c8b Update TravisCI to build+upload AppImage for Linux (#2830)
* Update TravisCI to build+upload AppImage for Linux

Solves #2744 by @probonopd
2017-06-04 19:42:06 +01:00
Ani 11f5f29c87 Update Readme (#2829) 2017-06-04 16:44:48 +01:00
Robbie 6cfb184b1e RPCS3 QT (#2645)
* Fix windows build.  I made sure to do everything with a win32 prefix to not effect linux build.

* Make the window resizable instead of fixed in the corner.

* Ignore moc files and things in the debug/release folder.  I might also ignore rpcs3qt.vcxproj and its filters as they're autogenerated by importing the qt project file.  But, this helps clean out clutter for now.

* Add cmake.  This doesn't interact with the rest of rpcs3 nor the main cmake file.  That's the next thing I'm doing. I'll probably need to modify them so it'll take me time to figure out. But, this will build rpcs3qt on linux and build as is with using qt.

* The build works. I'd like to thank my friends, Google and Stackoverflow.

Setted up by importing rpcs3Qt project using Qt's visual studio plugin.

* Cleanup.  Remove all the stuff in the rpcs3qt folder as its incorporated elsewhere. Remove the rpcs3qt project file as its now built into the solution and cmake doesn't care about pro files.

* Update readme to reflect getting Qt.

* Remove wxwidgets as submodule and add zlib instead. Wxwidgets was our old way of having zlib. I also added build dependencies to rpcs3qt so you should no longer get link errors on the first clean rebuild.

* Add rpcs3_version, few GUI tweaks

* Set defaultSize to 70% of screen size

* Add the view menu (#3)

* Added the view menu with the corresponding elements. Now, the debugger/log are hidden by default. The view menu has a checkbox which you click to show/hide the dock widgets.

* Make log visible by default

* Improve UI by making it into a checkbox that's easier to use.

* fix qt build for vs2017 (seems to work fine in 2015 with plugin but needs testing by other users)

* updated readme for qt

* update appveyor for qt
- cleaned formatting for the post build command

* fix build (#6)

* fix build legit this time i promise

* [Ready] Gamepadsettings (#4)

* WIP Gamepadsettings
pushbutton Eventhandling missing

* GamepadSettings should work except for cfg Init
Some KeyInputs are missing

* Update padsettingsdialog.h

* Update padsettingsdialog.cpp (#5)

* Update padsettingsdialog.cpp

removed silly tabs

* Update padsettingsdialog.cpp

* GetKeyCode simplified

* rename pad settings to keyboard settings o.O

* rename keyboard setting to input settings

* Remvoed the QT_UI defines.

* Readded new line at end of file. Replaced define in padsettings with constant.

* GUI fixes (Settings)

* Stub the logger UI. Nothing special besides a simple stub.

* Unstub the log. I haven't tested TTY but it should work.

Only thing to do, but this is in general, is add persistent settings.

* Minor refactoring to simplify code.

* Fix image loading. I'm 90% sure it works because it loads the path as expected and that's the same format I used in my gamelist implementation for the images.

* Made game lists much more functional than it was.

* mainwindow

* gamelist

* Please forgive me for I have lambdaed.

Added the ability to toggle showing columns via a context menu.

* Fix GameList further

* sort by name on init fixed

* Created the baseline refactoring. I'm going to start working on the callbacks now.  May need to implement other classes in the process. Fun stuff, I know.

* adds InstallPkg (tested) and InstallPup (should work but makes unknown shenanigans) implementation
adds RefreshGameList
obliterates 10sec Refresh

* messages

* Rpcs3 gs frame (#16)

* Messing with project settings try to get trails of cold steel to boot.bluh

Definitely one change is needed in linker settings for RPCS3 to not crash immediately.

Can't even see how horribly botched my implementation of GSFrame is because we aren't booting lol. Something is gone awry with elf.

* remove random ! not that it matters much right now

* minor additions

* "Working" with debug mode though you have to ignore an assert reached from Qt. Qt is upset that the rsx thread is calling stuff on the UI thread despite not owning it.  However, I can't do a thing to change that atm. (The fix would be to do what the TODO says in System.cpp-- making gsframe and stuff get initialized via system call)

Crashes due to needing pad callback to be done.

* With this build in debug mode, Trails of Cold steel will get FPS. (caveat. You have to ignore when Qt throws a debug assert lol)

* Fix release mode.  Fix the Qt debug assert by using ancient occault rituals.  I want to be able to remove the blocking connects but it won't work right now without it.  It isn't perfect but it's good enough for now IMO.

* Add enters to the end of files.

* Removing target and setting source of events to be the application instead of the main window. The main window isn't the game window, and I don't really know what widget will be targetted for the game event.  Works, though, it's admittedly probably not optimal by ANY means.

* Fix comment.

* Fix libpng wit zlib.

* Move Qt GUI into RPCS3Qt. (#17)

Restore wx GUI.

* fix install-progressdialogs randomly not showing

* install-progressdialog cosmetics

* add stylesheet file loading

* apply request

* Add stylesheet to git ignore.

* XInput..

* Joystick...

* Rpcs3 qt small fixes (#20)

* Small fixes.  Have emulator stop when x button is pressed on game window.  Have emulator/application stop when the main window is closed.

* If I forget another new line ending for a file.............................................

* Add CgDisasm (#21)

* fix install-progressdialogs randomly not showing

* install-progressdialog cosmetics

* add stylesheet file loading

* apply request

* add CgDisasm
add code to disable contextmenu options
fix gamelist issue

* missing proj changes

* Add ability to open stylesheets from menu.

* Mega searcher (#23)

* add MemoryStringSearcher
set minimum Sizes for mainwindow and CgDisasm

* minor fixes

* Since the system.cpp callbacks for emulator state were unused, I removed them.  Then, I replaced them with callbacks for the Gui.

* added stylesheet options
setfocus on settings fixed
newline added

* added signals and slots for EmuRun and EmuStop

* update ui

update ui now works
added callback onReady
added EnableMenues
added ps3 commands

* added restart logic to menu

* newline

* event header removed

* Added graphic settings class. (#26)

* Added graphic settings class. First thing is to have the dock widgets and window size/location be stateful.  Minor bug with debugger frame changing size on hide/show on default setup on second load. But, otherwise, fine. Also, the GUI doesn't update to accomodate the statefulness of the widgets.  But, that'll come in time as I update this class.

* Add view debugger, logger, gamelist to settings and synchronize them.

* Separate initializing actions from connects

* Add invisible fullscreen cursor and double click event.

* Add the UI log settings.

* Add MemoryViewer (#30)

* Add Memoryviewer
Image Button crashes/not fully implemented
focus on some button annoying

minor changes for question dialogs

* GuiSettings Refactoring (#31)

* Add settings for columns shown and which one is saved

* I accidentally refactored the settings class.  Added ability to reset to default GUI.  Added statefulness to column widths.

* add gui tab

* Fix logging at startup.

* Preset settings.I think I ironed out MOST of the glitches. Will work on the rest of it soon. Should be a lot simpler as I won't have to use the so-called meta settings. Also, renamed all settings methods to CapitalCase.

* Removed dock widget controls.

* Added style sheets. Removed the option from the menu.

* Rewrite to use folder design. Much simpler! Yay! Simpler. Better, right?

* It's remarkable how tricky this is.

* Added convenience button to open up the settings folder in explorer

* Add newlines at end of file

* simplified logic. Fixed a bug.. hopefully not more bugs

* Fix the undocumented feature

* Make the dialog big enough to have entire text on title shown. If talkashie changes the font to size 1203482 I don't care lol

* Make warning messagebox instead of changing the title of the dialog.

* marking...

* Hcorion suggested changes.

* [WIP] autopause (#32)

* autopause added
needs fixing
headers do not show text

* fix compile stuff

* Add MsgDialog + edge widgets (#33)

* Add MsgDialog
needs magic

* add "Debugger" Buttons to menubar

* Adapt ds4 changes. I'm not sure if they work as I don't have a compatible controller.  But, at the same time, it's kind of silly all I had to do was remove stdguiafx to get compilation.

* [Ready] Add KernelExplorer (#36)

* KernelExplorer added

* Fix build.  Connect mainwindow to show explorer.

* qstr formatting added
hid header, fixed button size

* Taskbar Progress for install PUP/PKG (#37)

* Add Taskbar Progress for both PKG and PUP installer

* fix missing ifdefs for windows

* add mainwindow icon + thumbnail toolbar

* add game specific icons to the GSFrame

* fix icon crash

* fix appIcon's aspect ratio in SetAppIconFromPath

* Fix black borders in RGB32 icons

* rename thumbar related buttons

* EmuSettings (#35)

* Core tab done minus doing the library list.

* Graphics tab.

* Audio tab

* Input tab

* Added the other tabs

* LLE part one-- load existing libraries sorted. (I'd finish it but I'm going to look at a PR by mega)

* add search and add other libraries that aren't checked.

* Finish adding lle selecting things.

* marking my territory (#38)

fixed settingsdialog glitch and width
added groupbox to gui buttons
removed parents from layouts

* add debuggerframe + RSXDebugger (#34)

* Add Debuggerframe

* add RSXDebugger

* add RSXDebugger fo real

* RSXDebugger improved
minor adjustments

* add utf8 conversions like neko told me to
hopefully i did not utf8-ise too many things xD

* fix some variables

* maybe fix image buffers in RSXDebugger

* fixed image view (pretty sure)

* fixed image buffer (hopefully)

*  QT Opengl frame (#41)

* fix RSX Debugger headers (#40)

* fix some debugger layout issues
fix RSX Debugger headers + some comments

* add kd-11's SPU options
fix D3D12 showing on non-compatible systems
tidy up coretab

* improve D3D12 behaviour in graphicstab:
adapter selection and D3D12 render won't show on non-compatible systems
add monospace font to cgDisasm

* enable update only on visibility

* Rpcs3 qt llvm build (#42)

* LLVM pushed so mega can test

* probably is what is needed with Release LLVM

* should probably have RPCS3-Qt be using release-llvm

* include zlib the same way.

* don't talk to me about how I made this happen.

* I applied the magical treatment to debug mode too.  Though, it's entirely probably that doing it once in LLVM-release mode made this entirely redundant

* hack

* progress bar for LLVM spawns but doesn't close yet.

* fix msgDialog (#43)

fix oskDialog

* Minor bug fixzz

* fix osk and msgdialog for real (#44)

* fix msgDialog
fix oskDialog

* fix OskDialog part 2
fix MsgDialog part 2

* This bug is evil, and it should be ashamed of itself.

* Refactor YAML.  Commented out gui options that aren't added to config yet (add em back later when we merge that in)

* Fix pad stuff.

* add SaveDataUtility (#45)

* add SaveDataUtility

* fix slots

* fix slots again
fix lists not showing stuff
fix dialogs not showing
add colClicked
refactor stuff and polish some layouts

* add SaveDataDialog.h and SaveDataDialog.cpp

* tidy up mainwindow

* add callback

* fix RegisterEditor (#47)

* fix RegisterEditor

* fix other dialogs' immortality (gasp...vampires)

* remove debug leftovers

* fix InstructionEditor (#46)

* fix InstructionEditor

* fix typo

* Fix MouseClickEvents in RSXDebugger (#50)

* Fix MouseClickEvents in RSXDebugger
Fix focus on MemoryViewer and RSXDebugger
Adjust PadButtonWidth

* fix another comment

* fix debuggerframe events (#49)

* Fix pad settings bro (#48)

* Fix pad settings bro

* fix comment

* Icons and Menu-Additions (#39)

* Add Icons and iconlogic to cornerWidget and actions

* add cornerWidget toggle
fix dockwidget action state on start
remove DoSettings

* fix game removal bug
remove tableitem focus rectangle
therefore add TableItemDelegate.h

* remove grid and focus rectangle from autopausedialog

* add fullscreen checkbox to misctab
minor padsettings layout improvements

* Add show category submenu to view menu
Add gamelist filter accordingly
fix minor bug where play icon was displayed despite pause label
add boolean b_fullscreen to mainwindow for later use in GSFrame

* fix headers in autopausesettings
fix remove bug in autopausesettings
add delete keypressevent in autopausesettings
fix missing tr() and minor refactoring in gamelist

* add default Icons for play/pause/stop/restart

* Fix fullscreen start.  Some stuff was wrong with settings, just trust me.

* remove fullscreen leftovers and fix merge

* SPU stuff. (There was also a weird thing with config.h in GLGSFrame.h with an include that I removed to fix build)

* please neko's lambda fetishes (#53)

* please neko's lambda fetish in mainwindow

* please neko's lambda fetish in gamelistframe

* please neko's lambda fetish in logframe

* fix neko's lambda fetish in debuggerframe

* pleasefixdofetishsomething in Autopausesettingsdialog

* fix sth sth lambda in cg disasm

* lambda stuff in instructioneditor

* lambda kernelexplorer

* lambda-ise memoryviewer

* lambda rsxdebugger

* lambda savedatautil
this could be done even more, but the functions are not implemented

* Rpcs3 qt fixes -- shadow taskbar bug (#52)

* SShadow's bug of taskbar progress staying fixed on cancelling pkg install.

* other taskbar

* i'm still a baka

* Fix a warning

* qtQt refactoring (#54)

* fix neko's snake fetish

* File names should match headers. Are these the names I want?  Not necessarily.  But, this is much less confusing.

* i thought I committed everything with stage all.........................

* remove unused utilities

* The most important commit of them all.

* Disable legacy opengl buffers when not using opengl.

* fix code review comment

* Quick crash patch. Neko removed autopause. SO, I remove it too from emusettings/misc tab

* Merge lovely things from master (#55)

* Configuration simplified

* untrivial parts of the merge

* no need for these options anymore

* Minor change to fix column widths at startup (not sure why it doesn't work already, but adding the true makes it work so......... whatever)

* here ya go

* FIx hitting okay in settings causing graphics to messup (#57)

* fixes + msgdialog taskbarprogress (#56)

* fix ok button in taskbar
add taskicon progressbar for msgdialog
add tablewidgetitem to rsxdebugger
fix comments in save_data_utility.cpp

* fix d3d adapter default

* fix taskicon progressbar not being destroyed properly

* add last_path to filedialogs

* fix msgdialog crash on ok (#58)

* fix thread stopping in debbugerFrame (#59)

* Move Emu.init to be first.  This will fix the qt stuff seeming to ignore the virtual filesystem in the config. (VFS to be made soon maybe) (#60)

* Fix full screen opening on double RIGHT click.

* fix other instances of double click ...

* Fix locaiton of gui config. (#61)

* fix d3d bug (#62)

* fix d3d bug

* small utf8 addition

* Fix cmake for qt (#64)

* Initial CMake fix

* Fix compilation with GCC

* Get rid of awful hack

* Update cotire with qt support

* Maybe fix travis

* Emergency Hack Relief Program Activated

* Fix travis build (#65)

* make about dialog great again (#67)

and add previous additions

* Fix library sort / smart gamelist context menu (#63)

* fix library sort

* add Title to custom game config dialog

* disable options on gamelist context menu

* use namespace for category Strings

* introduce sstr

* fix some tr nonsense

* Rpcs3qt Appveyor (#68)

Fix appyveyor build!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* possible fix for gamelist icons (#69)

add warning for appicon

* Fix clang build (#66)

Hcorion, the build savior.

* Rpcs3 qt resources (#70)

* Resource files attempt 1

* Autorcc should probably be on?

* forgot the most important file lol

* Forgot an instance of the icon in the code...

* Patch fix for clang build.

* vulkan/d3d12 combobox merge (#71)

* add vulkan adapterbox and merge with d3d12 box

* fix adapter text on other renderer

* gather render strings

* attempt fix on gamelist row height

* adjust adapter behaviour to new guideline

* Compiler of Peace.

* High critical hit rate.

* Mugi eating strawberries is savage.

* Apply KD-11 Hotfix (#73)

* Most of Ani Adjusts (#72)

* Most of the adjustments are made here.

* fix gamelist rowheight

* fix msg dialog layout and disable_cancel

* cleanup

* fix disable cancle again

* fix debuggerframe buttons and doubleclick

* Add a fun little bonus feature :) (#74)

* category filters simplyfied (#75)

* Cleaning up cmake a bit.

* fixezzzzzz (#76)

* upgrade Info Boxes

* upgrade file explorer

* refactor GetSettings and SetSettings

* second refactoring

* cleanup

* travis is a grammar nazi

* second travis shenanigans

* third travis weirdo thingy

* travis 4 mega fun

* travis 5 default to def

* finish refactoring for settings
fix gamelist headers

* hotfix msgdialog and infobox (#77)

* msgdialog fix 1

* fix zombie infobox

* Rpcs3 Qt Welcome Page (#78)

* Add a welcome dialog.

* Add enter to end of file

* i'm an idiot

* last mistake i hope

* sponsored via --> funded by

* RPCS3 does not condone piracy.

* Mega Adjusts

* Ani Adjustments and a few refactorings

* Yay

* Add Gamelist Icon Sizes (#79)

* Reverting Mega's suggestion.  If people can use alt-f4 to get around this dialog, they can probably use an emulator too.

* Fix firmware file choice dialog in QT GUI (#80)

* ani adjusts 2 + minor icon size simplifications (#81)

FPS Additions

* Update Travis to Qt 5.9 (#82)
2017-06-04 17:48:33 +03:00
Jake 195f24507b cellPad: Clear info structs before setting 2017-06-02 19:40:22 +03:00
Jake 56b21fd411 cellPadPeriphGetData impl 2017-06-02 19:40:22 +03:00
kd-11 d5df4a4616 rsx/fp/gl: Minor fixes (#2823)
* rsx/fp: expand glsl unpack instructions to vec4

* rsx/fp: Ignore BRK outside LOOP/REP

* fix string compare typo
2017-06-01 15:53:25 +03:00
kd-11 e6d55a6692 ui/vk: Reimplement vulkan GS selection; minor fixes for broken contexts on unsupported devices 2017-05-26 18:26:10 +03:00
John-Gee 63cadab042 Need to link to libatomic for objects with sizes that aren't supported natively by the CPU 2017-05-26 13:11:41 +03:00
xperia64 05b9575981 Add option to select Vulkan device (#2814) 2017-05-25 18:46:28 +03:00
kd-11 e82163bfb9 cmake: Link libllvm-4.0.so dynamically to avoid conflict with system libs (#2811)
* cmake: Link libllvm dynamically to avoid conflict with other system libs
2017-05-24 18:33:16 +03:00
Trevor a5874d76d1 Add caching for dependencies in appveyor.yml (#2804)
* Add caching for dependencies in appveyor.yml

* Add cache clearing support for Appveyor

Clears the cached files if appveyor.yml changes
2017-05-23 17:18:49 +03:00
Zion Nimchuk 83ffd7c9fb Add installation for linux 2017-05-22 20:53:59 +03:00
Zion Nimchuk 7f2e87580f Update .xpm based on new .ico 2017-05-22 20:53:59 +03:00
kd-11 18df292f90 rsx/fp: Better handling of flow control ops 2017-05-22 14:28:33 +03:00
kd-11 ccb23d70a5 vk: Improve flush queue sync between cell threads 2017-05-22 14:28:33 +03:00
kd-11 786bcb0d1b rsx: bugfix - avoid a divide by zero 2017-05-22 14:28:33 +03:00
kd-11 0efc3c1c6c rsx: Relax restriction on vertex register data fetch 2017-05-22 14:28:33 +03:00
kd-11 d4ddc40988 rsx: Add support for repeated data streams (broken attrib divisor?) 2017-05-22 14:28:33 +03:00
kd-11 e8b4d332eb rsx: Use faster upload path when conditions allow
Fix aligned memory access (SSE)

rsx: BufferUtils; always use optimized paths
2017-05-22 14:28:33 +03:00
Jake 674acd8431 ds4: use controller calibration values for accel/gyro 2017-05-21 18:07:43 +03:00
Jake 80fc471067 Ignore LLE savedata modules 2017-05-21 18:07:43 +03:00
Jake 4bcafb3e75 Fix C00 SPRX loading 2017-05-21 18:07:43 +03:00
Jake 7ccc5d3910 Set TrophyRequiredSize to 0 2017-05-21 18:07:43 +03:00
Nekotekina 1c2a423b14 Config fix 2017-05-20 19:26:22 +03:00
Nekotekina f010b5b235 Configuration simplified 2017-05-20 16:01:48 +03:00
Nekotekina d5107aab47 cfmt improved 2017-05-19 01:13:23 +03:00
Nekotekina bd8dfac713 ALSA: decrease buffer 2017-05-19 01:13:23 +03:00
Nekotekina b613fb70f1 Fix MFC_WrTagUpdate 2017-05-19 01:13:23 +03:00
Zangetsu38 43b06c2a9c Fix compilation asmjit for VS. (#2791) 2017-05-18 19:31:39 +03:00
Zion c133db6721 Update asmjit submodule (Testers wanted!) (#2782)
* Update asmjit submodule

* Add myself as a contributor 	😉
2017-05-18 14:22:45 +03:00
raven02 f54628fcfd Stub cellGcmSetWaitFlipUnsafe() (#2786) 2017-05-16 07:33:37 +08:00
Nekotekina 7ac64a6725 CELL_OK cleanup 2017-05-15 14:58:32 +03:00
Nekotekina 45908b9dd8 fs::statfs fixed 2017-05-15 14:37:05 +03:00
Nekotekina 81c8d3f27a Added CELL_CANCEL 2017-05-15 14:37:05 +03:00
Nekotekina 3a1f1dbc1a Minor StrFmt fix
Added fmt_unveil<f16>
Added enum helper (experimental)
2017-05-15 14:37:05 +03:00
Nekotekina 88fef183a3 config.yml: Log section optimized 2017-05-15 14:37:05 +03:00
scribam 299f627321 Stub cell (#2785)
* Update cellGcmSys

* Update cellStorage

* Update cellSubdisplay

* Update sceNpTrophy
- Use error_code as return type
- Add few checks

* Update cellKey2char

* Update cellKb:
- Use error_code as return type
- Replace UNIMPLEMENTED_FUNC by .todo

* Update cellNetCtl

* Update cellSpudll

* Update cellSysutilAp

* Update cellUserInfo

* Stub sys_mempool_allocate_block (bad idea)
2017-05-15 14:30:14 +03:00
kd-11 c26607de08 gl: Strict export of diff_color and spec_color for mesa compatibility (#2779)
* gl: Strict export of diff_color and spec_color for mesa compatibility

* gl: Relax the front_diff/spec rules a little
2017-05-14 11:50:24 +03:00
shameful e93c4c42b6 fix for shader fog mode exponential2_abs (#2781)
* Update VKFragmentProgram.cpp

added missing exponent parameter

* fixed misplaced exponent in VKFragmentProgram.cpp

parameter that belonged to pow() was being passed to exp() instead, causing the shader compilation to fail

* fix for opengl fog_mode exponential2

same fix as the vulkan version

* directx fog_mode exponential2 fix

misplaced parameter

* directx fog_mode exponential2_abs fix

* vulkan fog_mode exponential2_abs fix

* opengl fog_mode exponential2 fix
2017-05-14 12:56:24 +08:00
kd-11 d24ba0da90 gl: Workaround to detect opengl driver caps for intel 2017-05-12 20:10:03 +03:00
kd-11 7460bdfb1b gl: Use strict vertex output declaration for better compatibility with mesa 2017-05-12 20:10:03 +03:00
kd-11 c5975d5f66 rsx: Vertex program output fixes 2017-05-12 20:10:03 +03:00
Nekotekina 07f0c7b4a5 Update yaml-cpp 2017-05-11 19:19:10 +03:00
Nekotekina 8df95dbe39 Stub sys_fs syscalls 2017-05-11 19:05:41 +03:00
Nekotekina 75017345be cellFsGetPath implemented 2017-05-11 19:05:41 +03:00
Nekotekina 08c955d177 Remove AutoPause.cpp 2017-05-11 19:05:41 +03:00
Nekotekina 8209e6c1e3 ppu_initialize_syscalls draft 2017-05-11 19:05:41 +03:00
Nekotekina 3a5efe9809 sys_ppu_thread_register_atexit implemented 2017-05-11 19:05:41 +03:00
Nekotekina d4146e4e68 Disable /host_root/ by default 2017-05-11 19:05:41 +03:00
Nekotekina 5ffb4766b0 sys_ppu_thread_once rewritten
sys_initialize_tls moved
sys_interrupt_thread_disestablish moved
2017-05-11 19:05:41 +03:00
kd-11 450d45354c rsx: Enable GPU texture scaling by default 2017-05-10 21:50:14 +03:00
kd-11 df7b466656 spu: Speed hacks - Do not starve PPU threads
optionally hint to the OS scheduler to give less attention to SPUs

ui: Add speed 'hacks' as configurable options
2017-05-10 21:50:14 +03:00
kd-11 4b5a30f53d vulkan: Do not bother with cache checks if buffer sync is not managed
introduce pause intrin
2017-05-10 21:50:14 +03:00
kd-11 0ec88bb65d vulkan: Mark of critical code from allowing cb split in exception handler
vk: Shader loads are sacred
2017-05-10 21:50:14 +03:00
kd-11 3b27b3c182 vk: Buffer sync timing tweaks
vulkan: more sync timing fixes
2017-05-10 21:50:14 +03:00
kd-11 e1a75deb25 rsx: Refactor image scaling code; Scale downloaded surfaces with vulkan 2017-05-10 21:50:14 +03:00
kd-11 c7db322873 vulkan: Use non-blocking list of lists (WIP)
whitespace fix only

facepalm
2017-05-10 21:50:14 +03:00
kd-11 b78c6f7127 clear up a spec misunderstanding 2017-05-10 21:50:14 +03:00
kd-11 2b19031206 vulkan: Use a parallel cb for texture cache ops; bug fixes
vk: More surface fixes and debug stuff

vk: Crude thread sync implementation to prevent cb desync crashes due to resource usage

fix build

more fixes

vulkan: Do not flush command queue if address cannot be flushed

vk: More fixes for accuracy. Needs optimizations

vk: Batch all flush-to-buffer operations in the non-critical path
- More work is needed to make queue submission asynchronous
2017-05-10 21:50:14 +03:00
kd-11 fd754a4ddc vulkan: Start work on buffer synchronization
addendum - fix build

vulkan: separate cached section lifetime management

bug fixes
2017-05-10 21:50:14 +03:00
Nekotekina b1e8eefad0 cellFs fixes
cellFsAllocateFileAreaWithoutZeroFill implemented
2017-05-07 15:24:07 +03:00
Nekotekina e8d76ede14 sys_fs_fsync fix 2017-05-05 00:11:57 +03:00
Nekotekina e2478902c9 Update supporters 2017-05-05 00:11:57 +03:00
Jake b9ebf595e6 XInput vibrate support 2017-05-04 23:35:09 +03:00
Jake 6bb32e4e80 DS4 Support. Supports sixaxis and vibrate 2017-05-04 23:35:09 +03:00
Jake 6d7419be0e Add hidapi submodule, build updates / readme 2017-05-04 23:35:09 +03:00
Xemnoras bef67c8a2d Fix FAQ link (#2748) 2017-05-02 18:03:03 +01:00
scribam e33c01131e Update sceNpSns (#2732) 2017-05-01 21:35:49 +03:00
Nekotekina 2845617053 Hide cursor in GSFrame
Implements #2054
2017-04-30 21:10:27 +03:00
Nekotekina 95c6278863 Organize cellDaisy 2017-04-30 21:10:27 +03:00
Nekotekina eba44261c7 Preserve original function names 2017-04-30 21:10:27 +03:00
Nekotekina b349100d9d Stack overflow detection
Added a gap between stack allocations
PPU callstack improved
2017-04-30 21:10:27 +03:00
Wilfried Rabouin 7ab210432e PPU interpreter (precise): SAT bit implemented (#2736) 2017-04-30 21:05:50 +03:00
Pierre Vezien f40dcbfa30 Stub sceNp functions to return an offline status until further developement is done. 2017-04-30 18:21:34 +03:00
scribam 84ba7c3e73 Stub cellFiber module (#2704) 2017-04-29 02:44:42 +03:00
Jake ff366f4e4e Partially implement cellPadGetDataExtra 2017-04-29 01:26:03 +03:00
Jake 5f470b316a Fix cellPadGetData button reports 2017-04-29 01:26:03 +03:00
Jake c8252d2b28 Fix cellGameContentErrorDialog freeze 2017-04-29 01:26:03 +03:00
Jake ac58953276 Fix typo/spacing from userclip 2017-04-29 01:26:03 +03:00
Jake f064a26382 Settings Fix 2017-04-29 01:26:03 +03:00
Jake 16d7eb4f55 [Crypto] Edat cleanup 2017-04-29 01:26:03 +03:00
Nekotekina 5f26c2fc8f REG_FUNC+ macro improved
This includes REG_FNID, REG_VAR, REG_VNID
Allows to specify alternative function name
2017-04-26 23:38:24 +03:00
Nekotekina f6383f6e06 cellAudioAdd2chData fixed
cellAudioAdd6chData fixed
Speculatively.
2017-04-26 23:05:49 +03:00
Nekotekina 8055d83da2 sys_fs_fget_block_size improved 2017-04-26 20:31:39 +03:00
Nekotekina b0a83cdb56 sys_fs_lsn_get_cda_size stub 2017-04-26 20:26:29 +03:00
Nekotekina 3f5951c9f8 sys_fs_fcntl update 2017-04-26 16:10:26 +03:00
Nekotekina c3c442ccb1 cellFsGetFreeSize implemented 2017-04-26 02:27:35 +03:00
Nekotekina a95a63a58a sys_fs_lsn_lock implemented 2017-04-26 02:27:35 +03:00
Nekotekina 1bbb76fa20 sys_fs_test implemented 2017-04-26 02:27:35 +03:00
Nekotekina f42b830ce9 fs::statfs implemented 2017-04-26 02:27:35 +03:00
Nekotekina 256dfc5729 sys_fs_fsync implemented
sys_fs_fdatasync implemented as equal function
2017-04-26 02:27:34 +03:00
Nekotekina 19fd8c109e cellFsSdataOpenByFd fixed 2017-04-26 02:27:34 +03:00
Nekotekina 634f353ed4 Fix module initialization 2017-04-26 02:27:34 +03:00
Nekotekina d7c3d1ce12 sys_fs: 0xc0000006 stub 2017-04-26 02:27:34 +03:00
Nekotekina a626bbf635 PPU Debug fix 2017-04-26 02:27:34 +03:00
Nekotekina 0f95736c36 cellFsGetDirectoryEntries rewritten 2017-04-26 02:27:34 +03:00
Nekotekina d05b6135c6 Use libfs.sprx (LLE) 2017-04-26 02:27:34 +03:00
Jake 60ce85f840 [Render] Userclip for d12/vk/ogl (#2719) 2017-04-25 18:32:39 +08:00
scribam 8b2473251d Stub new modules
- cellGamePs1Emu
- cellSysconfPs1emu
- sysBdMediaId (which included sys_get_bd_media_id)
- sysConsoleId (which included sys_get_console_id)
- sysPs2Disc
2017-04-23 16:02:57 +03:00
raven02 24fc1027ea vk: add source alpha saturate blend factor (#2724) 2017-04-22 22:35:36 +08:00
Nekotekina 463e18f893 Disable SPUJIT.log (opt-in) 2017-04-20 00:52:31 +03:00
Nekotekina f7cb1aea64 Fix Lib Loading 2017-04-20 00:52:11 +03:00
Nekotekina 9b43203111 offset32(): pointer-to-member arithmetic 2017-04-20 00:17:16 +03:00
Megamouse ff5295de32 Lib Loader Radiobutton (#2689) 2017-04-20 00:16:55 +03:00
scribam 8060cf9b19 Add cellRtcAlarm module (#2703) 2017-04-19 21:24:52 +03:00
scribam ba9fdfa802 Add cellFsAccess function 2017-04-19 03:42:44 +03:00
scribam df8a0517dc Add FT_Done_Library function 2017-04-19 03:42:44 +03:00
scribam d27c3eee24 Add FTFaceH_GetMaxVerticalAdvance function 2017-04-19 03:42:44 +03:00
Ryan Gonzalez e447f071ce Misc compile fixes 2017-04-18 22:37:17 +03:00
Nicolas Werner cc12302dd4 Fix crash on linux when opening the settings dialog in debug mode
D3D12 is not in the list of supported renderes on platforms other than windows.
Deleting an item, that can't be found, triggers an assert in debug builds, so let's
avoid that.
2017-04-18 21:37:17 +03:00
scribam 30eb680c9d Check variable before to execute remove, in GLGSRender::on_exit (#2682) 2017-04-18 00:30:34 +03:00
Ani fa782046f9 Add CONTRIBUTING.md guidelines (#2706)
Due to the big amount of invalid issues being submitted later, I think we need to activate those.
2017-04-16 21:32:58 +01:00
Nekotekina f0f8f50e12 Error filtering updated 2017-04-16 17:44:20 +03:00
Nekotekina 4ceaab10a5 _mxr000 hack moved 2017-04-16 17:44:20 +03:00
Nekotekina 402df68235 sys_spu_image loading rewritten 2017-04-16 17:44:20 +03:00
Nekotekina db1b012a26 SPU fix 2017-04-16 17:44:20 +03:00
Nekotekina b1f1a5885b PPU LLVM improved 2017-04-16 17:44:19 +03:00
Nekotekina 2fd58dc7e8 sys_prx updated 2017-04-16 17:44:19 +03:00
Nekotekina 7428bb3025 HLE linkage rewritten 2017-04-16 17:44:19 +03:00
Jeremiah 14f02b23c2 Properly overwrite param.sfo in savedata (#2690) 2017-04-16 01:45:50 +03:00
Ofek 617746606d Trophy fixed (#2687) 2017-04-14 13:08:17 +03:00
kd-11 65bdcaed29 spu: Check exponent bits in FMA ops (#2683) 2017-04-13 23:02:51 +03:00
Ofek a5fd7abcf7 Trophy update (#2655)
* Added checksum check to TROPHY.TRP loader

* Implemented sceNpTrophyGetGameProgress, sceNpTrophyGetGameIcon & sceNpTrophyGetTrophyIcon

* Updates to up to date APIs and tiny changes

* Code style fixes for checksum verifier, and another fix for trophy functions

* Format fix
2017-04-13 20:29:47 +03:00
Ani 94ab3ae7cf Misc (#2614)
* cellSysmodule: Register libad modules

Register libad_core, libad_async, libad_billboard_util

* Misc

sys_ss_get_console_open_psid (Called on Project Diva F 2nd),
sys_ss_get_console_id
Stub cellWebBrowserGetUsrdataOnGameExit for Professional Baseball
Spirits 2015
Fix two logs on GcmSys
2017-04-13 19:30:25 +03:00
Jeremiah 370c2ecac5 Update cellSaveDataGetListItem 2017-04-13 18:42:38 +03:00
Nekotekina af8d7b9e4e Travis fix 2017-04-12 12:58:03 +03:00
kd-11 3ce7947dd3 rsx: Throw if user attempts to use Vulkan/DX12 without driver support 2017-04-11 13:19:31 +03:00
Nekotekina 3f20e0c5a8 Fix zip cmd 2017-04-11 00:48:27 +03:00
Nekotekina a01398eda0 Travis fix 2017-04-10 23:30:35 +03:00
Nekotekina 78080fd782 Fix token 2017-04-10 17:29:41 +03:00
kd-11 d3e3e10b7d Update libglew-dev for travis
Update libglew as well
2017-04-10 17:24:30 +03:00
kd-11 ac3b22902a gl: Autodetect supported OpenGL extensions
cleanup
2017-04-10 17:24:30 +03:00
Nekotekina ea098a920e Fix 2017-04-10 16:41:14 +03:00
Nekotekina e786192766 Upload Travis builds 2017-04-10 16:08:10 +03:00
raven02 9b48074389 GL: fix wireframe in Catherine (#2660) 2017-04-10 09:28:46 +08:00
scribam 9ba0a9189b Update sys_spu
- Implement sys_spu_thread_group_set_priority
- Implement sys_spu_thread_group_get_priority
2017-04-10 04:08:55 +03:00
scribam 7cd15a6202 Add functions to cellSsl 2017-04-10 03:25:45 +03:00
scribam 49ba4bbfb5 Typo 2017-04-10 02:39:52 +03:00
Nekotekina 77aa3142a9 Audio: downmix to stereo 2017-04-10 00:18:12 +03:00
Nekotekina 4c741e93c3 ALSA Audio Renderer (Linux) 2017-04-09 19:45:12 +03:00
Nekotekina dc3d38c255 PPU Analyser: TOC detection
Improved TOC detection logic
Added "PPU Debug" option
2017-04-09 00:16:53 +03:00
Nekotekina fb9b09d004 PPU disasm: print HLE index 2017-04-08 23:51:54 +03:00
Nekotekina d7c66fc949 ppu_analyse: use entry point 2017-04-08 23:51:54 +03:00
kd-11 adefd1fd63 rsx/ui: Add config toggle for GPU texture scaling/blit 2017-04-08 23:12:09 +03:00
kd-11 6d6d0e4e36 gl: Use the GPU to scale textures; use ARB_sampler_object
Improve scaling and separate sampler state from texture state

gl: Unify all texture cache objects under one structure separate by use case
gl: Texture cache fixes

- Acquire lock when finding matching textures
- Account for swizzled surfaces when deciding whether to cpu memcpy
- Handle swizzled images on the GPU
2017-04-08 23:12:09 +03:00
kd-11 d94986ff0d rsx: Set up hw accelerated blit 2017-04-08 23:12:09 +03:00
Zangetsu38 b3cb827526 Registers more functions missing.
Implement and stub cell_FreeType2.
Reorder cellRtc.
2017-04-08 22:32:59 +03:00
Nekotekina ac79654d1b Warn about libfiber.sprx
It's currently incompatible with LLVM
Also fixed breakpoint bug
2017-04-08 00:56:38 +03:00
Nekotekina 69d86e39b9 Fixed auto LLE 2017-04-08 00:56:38 +03:00
Nekotekina 49daecc4ea Update supporters 2017-04-08 00:56:38 +03:00
Nekotekina 8f0b55c2cb Update rpcs3.ico 2017-04-08 00:56:38 +03:00
Nekotekina ed7883ba07 PPU Analyser fix 2017-04-08 00:56:38 +03:00
scribam 7a1fd27ecc Update cellSpudll
- Stub cellSpudllGetImageSize
- Implement cellSpudllHandleConfigSetDefaultValues
2017-04-08 00:09:06 +03:00
scribam d160c862c7 Stub cellScreenshot module 2017-04-07 22:40:23 +03:00
scribam 4c4b353766 Stub cellVideoUpload module (#2642) 2017-04-07 19:45:38 +03:00
scribam 22ec8c4dd2 Stub cellSysconf module 2017-04-07 18:53:00 +03:00
scribam 219dba8aae Stub cellBgdl module 2017-04-07 16:36:51 +03:00
scribam 7c2af5ceae Register cellSpursRemoveSystemWorkloadForUtility
Before
! LDR: **** cellSpurs export: [0x31F5196B] at 0x13ab56c

After
! LDR: **** cellSpurs export: [cellSpursRemoveSystemWorkloadForUtility] at 0x13ab56c
2017-04-07 16:13:14 +03:00
scribam a1cc40e7b1 Add cellLibprof module (#2637) 2017-04-07 15:48:59 +03:00
ikki84 27ea4285ef Imejp: cellImeJpEnterChar (#2600) 2017-04-07 15:30:07 +03:00
Yukariin 74e806810d [WIP] Update Qt interface (#2336)
* Fix rpcs3qt Linux build

* Files clean up

* Add base MainWindow class

* Add slot stubs

* Update MainWindow::DecryptSPRXLibraries

* Add SettingsDialog base class and tab stubs

* Add CoreTab base layout

* Add compile guards

* Minor fixes

* Add GraphicsTab base layout

* Add OK button signal

* Remove QML stuff

* Fix indentation

* Add AudioTab base layout

* Add InputTab base layout

* Fix layouts

* Add MiscTab base layout

* Fix layouts

* Add NetworkingTab base layout

* Add SystemTab base layout

* Fix button layout in SettingsDialog

* Make SettingsDialog resizable

* Add base dock widget stubs

* Add very base PadSettingsDialog layout

* Add combo box entries

* Abb LogFrame base layout

* Fix indent

* Abb GameListFrame base layout

* Minor fixes

* Add AutoPauseSettingsDialog base layout
2017-04-07 01:12:15 +03:00
jjsat d8dc4f4474 Fix isdenormal() for MS VC. 2017-04-06 20:58:02 +03:00
scribam ba8aa580a1 Add few functions in cellSysutil. 2017-04-06 14:58:03 +03:00
scribam c863da278f Add cellRtc functions 2017-04-06 12:55:33 +03:00
Inviuz 22e679e23e cellSave fix plus bugfixes (#2631)
* cellSave fix plus bugfixes

allows allocation of last byte in memory block
prevents rpcs3 from crashing when closing non existent socket

* Fix overflow

* add more socket options
fix typo

prevent sys_net from operating on nullptr sockets
2017-04-05 16:08:58 +03:00
Ivan 1ae334e500 Fix freezes on Linux (#2632) 2017-04-04 23:27:16 +03:00
Nekotekina 65488078a4 cellSaveData workaround 2017-04-03 16:02:43 +03:00
kd-11 2d99f3556e rsx: Fix line_loop -> line_strip indexing 2017-04-03 13:50:58 +03:00
kd-11 d33bc540bc rsx/vk: Re-enable layout transitions in vulkan. Vulkan drivers take this hint seriously
- Fix enum typo
2017-04-03 13:50:58 +03:00
Jochen Schleu ce7d62968e Only pass positive values to sqrt and log2 in the fragment program. (#2624) 2017-04-03 13:17:20 +03:00
Andrey 215a9f9e11 Gdb debug server (#2542) 2017-04-02 21:10:06 +03:00
scribam b54ba47870 Stub cellHttpUtil (#2611) 2017-04-02 15:32:53 +03:00
Cornee Traas 901f503a3a Fix mounting bdvd when elf in subdirectory
Causes MGS4 to boot further
2017-04-01 19:29:49 +03:00
kd-11 0fba38f691 gl: Fix legacy clamp mode (#2612) 2017-03-30 19:37:49 +03:00
Nekotekina c4066b924b Restore GD in game viewer 2017-03-30 13:17:34 +03:00
Nekotekina 3ec156b2f2 Enable patch engine for SPU images 2017-03-30 12:04:59 +03:00
Nekotekina 78b9c64f67 Simple patch engine 2017-03-30 12:04:59 +03:00
Nekotekina 77e88741bc Alternative TLS allocation
Should fix "out of TLS memory"
2017-03-30 12:04:59 +03:00
Nekotekina 4c789faea4 RemoveGameConfig improved 2017-03-30 12:04:59 +03:00
kd-11 66835cf083 rsx: Fix mipmap count calculation 2017-03-29 23:06:17 +03:00
kd-11 ad12900397 gl: Force alignment of DXT textures 2017-03-29 23:06:17 +03:00
kd-11 909f3e9b3e rsx: Support indexed immediate draw via ArrayElement method 2017-03-29 23:06:17 +03:00
Inviuz 632287afe7 Add simple divide to get kbytes
integer division
2017-03-28 23:13:25 +03:00
Inviuz 08c9a7c184 Check for invalid arguments
Caused crash when recvfrom was using null buffer
2017-03-28 23:13:25 +03:00
Inviuz 149c08ba78 implement getSizeKB functions
bugfix in sys_net. id 0 is acceptable socket id
2017-03-28 23:13:25 +03:00
Nekotekina cec75e8567 OpenConfigFolder 2017-03-27 13:19:53 +03:00
Nekotekina c1a98f76cd OpenGameFolder simplified
Added menu separators
2017-03-27 12:44:00 +03:00
Nekotekina 6b471d50eb libmedi fix 2017-03-27 01:15:41 +03:00
Nekotekina e8984d976c _sys_sprintf implemented
_sys_printf, _sys_snprintf fixed
2017-03-27 01:15:41 +03:00
Nekotekina 8590b66b4b Fix cpu_thread pause 2017-03-27 01:15:41 +03:00
Nekotekina 98d96fd649 util::memory_reserve fixed 2017-03-27 01:15:41 +03:00
Nekotekina 37a97a71e3 vm::g_exec_addr added
s_ppu_compiled renamed
Exception handling enabled
2017-03-27 01:15:41 +03:00
Nekotekina e4d1bdef07 Fix check_addr arg 2017-03-27 01:15:41 +03:00
Nekotekina f1f53de24b PPU analyser fix 2017-03-27 01:15:41 +03:00
Nekotekina cd9bd79639 AutoLLE: libhttp.sprx added 2017-03-27 01:15:41 +03:00
Nekotekina 4bbe1b6bf3 fs::write_file aux 2017-03-27 01:15:41 +03:00
Nekotekina 0393c7f52c fs:: handle negative seek 2017-03-27 01:15:41 +03:00
Nekotekina e12a708036 LLVM: fix for mingw 2017-03-27 01:15:41 +03:00
Megamouse 51cd98c9f4 Add "Open Game Folder" Option" (#2595) 2017-03-27 01:11:08 +03:00
kd-11 3ec1fe9ee7 rsx: Fix depth clears on z16 surfaces without stencil
remove some debug code
2017-03-26 16:22:53 +03:00
kd-11 70d3a6d840 rsx: Support more base types for immediate rendering
fix alignment
2017-03-26 16:22:53 +03:00
kd-11 ba968048c9 vk: Minor fixes to vertex counting and lower exception to notice if var does not exist 2017-03-26 16:22:53 +03:00
kd-11 79d114cc06 rsx: Support immediate mode rendering 2017-03-26 16:22:53 +03:00
Zangetsu38 0f9f787a55 Move module in correct path 2017-03-26 01:50:22 +03:00
Ani 7ae2a8840b Register HLE libmedi, cellCrossController, cellSysutilNpEula
Motorstorm Apocalypse calls for cellMediatorGetSignatureLength,
cellMediatorCreateContext, cellMediatorGetProviderUrl,
cellMediatorGetStatus

LittleBigPlanet 2 and 3 may call for 0x37E1F502 (unknown name) on
cellCrossController

Resistance 3 and Uncharted 2 may call for the functions registered
on cellSysutilNpEula
2017-03-26 01:04:39 +03:00
Ani 7d59f7e69c cellSysmodule: Register 0xF044, 0x0054, 0x005C modules
cellSysmodule: Register 0xF044 module (cellSysutilNpEula)
Found by debugging Uncharted 2 Demo (NPEA90055)
Helps in all games that register sys module configuration 'multi-player'

cellSysmodule: Register 0x0054 module (libmedi)
Found on Motorstorm Apocalypse [NPEA00315] (thanks Zangetsu for the log)

cellSysmodule: Register 0x005C module (cellCrossController)
Found on LittleBigPlanet 2 [BCES00850] (thanks Zangetsu for the log)
2017-03-26 01:04:39 +03:00
kd-11 5b0fddd3e8 gl/vk: Fix stencil ops 2017-03-25 15:07:43 +03:00
Jake f4a0ff19d5 Xinput/MMjoy: Fix connection status 2017-03-25 14:26:27 +03:00
Jake 65696bf6a3 Crypto: fix sprx/self check in npDrm and edata fixes 2017-03-25 14:26:27 +03:00
clienthax 44e62c5c92 Fixs for klics 2017-03-25 14:26:27 +03:00
Svyatoslav 620ec7ef25 PVS-Studio: fix V547 (#2543) 2017-03-25 13:27:42 +03:00
kd-11 34c2b8a55e rsx: recover from FIFO parse errors
- Validate FIFO registers before access

-- Validate the args ptr separate from the get ptr
2017-03-24 09:30:23 +03:00
kd-11 ef822d785e rsx/fp: src3 workaround 2017-03-24 09:30:23 +03:00
kd-11 f7d767d0e8 gl/vk: Fix projected coordinate lookup on a cubemap sampler 2017-03-24 09:30:23 +03:00
kd-11 8fa3f0721e fix false alphakill flags when texture fetch is optimized away 2017-03-24 09:30:23 +03:00
Mårten Nordheim 458e5fa4e1 Multithreaded compile on Windows for llvm, glsl, vulkan 2017-03-23 20:50:22 +03:00
twdarkeh ee8fecea21 remove custom config (#2574)
Add remove custom config to right click
2017-03-23 11:27:33 +03:00
Nekotekina 3bfe17a14f PPU: HACK instruction removed
Breakpoints fixed
2017-03-22 23:23:47 +03:00
Nekotekina ddd6ebc58d LLVM: Bump obj version 2017-03-22 01:33:50 +03:00
Nekotekina 1b5c0c68dd LLVM: enable New GVN Pass 2017-03-22 01:21:19 +03:00
Nekotekina 3e6f9faf71 Use LLVM 4.0 2017-03-21 23:32:14 +03:00
Nekotekina ad72168143 LLVM: load .pdata section 2017-03-21 20:16:41 +03:00
Nekotekina 4fc8276f0f LLVM: fix FCTIW, FCTID 2017-03-21 20:16:41 +03:00
Nekotekina aad035c4b5 LLVM: fix FCTIWZ, FCTIDZ 2017-03-21 20:16:41 +03:00
Nekotekina 560d6776af LLVM: generate trampolines
Must fix issues with older CPUs
JIT.cpp refactored to use utils::memory*
2017-03-21 20:16:41 +03:00
Nekotekina c7a9a8e8f1 utils::memory update 2017-03-21 20:16:41 +03:00
Nekotekina c2cd0c994f LLVM: volatile load for state 2017-03-21 20:16:41 +03:00
Inviuz c729d6d65a Use sys_vm_memory_map plus add default value for sys_allocate (#2560)
for different memory map(unconfirmed) also handle default action.
Fixes unknown syscall 313 error
Issue 2510
2017-03-21 16:02:00 +03:00
scribam 5785ebb384 Update cellOvis
- Add parameters to cellOvisInitializeOverlayTable, cellOvisFixSpuSegments and cellOvisInvalidateOverlappedSegments functions
- Modify return type for cellOvisFixSpuSegments and cellOvisInvalidateOverlappedSegments functions
- Replace UNIMPLEMENTED_FUNC by cellOvis.todo
2017-03-20 16:40:44 +03:00
scribam b32ad80c23 Update PPUFunction.cpp
Source:
- http://www.psdevwiki.com/ps3/LV2_Functions_and_Syscalls
- http://www.psdevwiki.com/ps3/VSH_Exports
2017-03-19 20:12:11 +03:00
Nekotekina 2b79a3691f cellVdec: default FRC workaround 2017-03-17 20:51:06 +03:00
Nekotekina cff39ec3a9 Fix override warning 2017-03-17 20:23:21 +03:00
Nekotekina c4bdc930ca Fix UB in PPU interpreter 2017-03-17 20:23:03 +03:00
Nekotekina 14b9b12211 Fix UB in BitField.h 2017-03-17 20:22:47 +03:00
Nekotekina d45d8eb4bc Stub sys_crash_dump_set_user_log_area 2017-03-17 20:08:00 +03:00
al0xf c5e6665010 Fix async OSK loading (#2531) 2017-03-16 12:34:47 +03:00
Nekotekina 1b5a479bbd Auto LLE: cellSsl 2017-03-14 19:21:03 +03:00
Nekotekina fc92040d7f About dialog updated 2017-03-14 19:13:01 +03:00
Nekotekina b3073bbf1e Gui: TTY log fix 2017-03-14 16:29:58 +03:00
Nekotekina 63a107acbc Small fix 2017-03-14 16:12:03 +03:00
Nekotekina 07646c2124 LLVM CPU override option 2017-03-14 16:12:03 +03:00
Nekotekina b45cea1434 Opt-in LLVM logs 2017-03-14 16:12:03 +03:00
Nekotekina 3648a058d1 Auto LLE update
libdtslbrdec.sprx removed
Some encoders added
2017-03-14 16:12:03 +03:00
Nekotekina 90479eaad6 sys_lv2coredump, sys_crashdump modules 2017-03-14 16:12:03 +03:00
kd-11 1de2ceca9b rsx/vp: Fixes (#2533)
* rsx/vp: Fix rsq opcode broken in previous commit

* fix ms compiler error

* fix another possible conflict with ms d3d compiler
2017-03-14 16:05:59 +03:00
kd-11 8fc281e034 gl: Separate scale offset, fragment constants and transform constants uploads 2017-03-13 23:40:34 +03:00
kd-11 2093134420 gl: Do not attempt to re-flush an address if another thread flushes it first 2017-03-13 23:40:34 +03:00
kd-11 818dd88390 gl/vk: Ignore invalid texture uploads 2017-03-13 23:40:34 +03:00
kd-11 be4bb48476 rsx/fp: Fix some decompiler bugs 2017-03-13 23:40:34 +03:00
Nekotekina 1c8cb3b7d3 Boot messages 2017-03-13 18:03:38 +03:00
Nekotekina 1ede0f4706 Minor optimization 2017-03-13 15:02:18 +03:00
Nekotekina 78703cfe47 Use utils::memory_protect 2017-03-13 13:16:22 +03:00
Nekotekina c72a5a5775 thread_ctrl::finalize crash fix 2017-03-13 13:16:22 +03:00
Nekotekina d09dd29054 utils::memory_protect 2017-03-13 13:16:22 +03:00
kd-11 ed711c0e59 Merge pull request #2522 from kd-11/experiments
gl: Lower restriction on render target pitch
2017-03-13 13:06:49 +03:00
kd-11 fa6114719d gl: Lower restriction on render target pitch 2017-03-13 12:44:28 +03:00
ikki84 c8b9cc9fe5 Stub cellAvconfExt
Changed "fmt::throw_exception("Unimplemented" HERE); "
into:
"UNIMPLEMENTED_FUNC(cellAvconfExt); "
"return CELL_OK;"

Allow NPEB01283 to go further in boot (pass the intro and reaches the menu)...
2017-03-13 12:19:38 +03:00
640 changed files with 45014 additions and 22695 deletions
+8
View File
@@ -55,9 +55,12 @@
rpcs3/git-version.h
# Visual Studio Files
.vs/*
*.ipch
*.vspx
*.psess
*.VC.*
*.vcxproj.user
# Copyrighted files
/bin/data/
@@ -85,3 +88,8 @@ CMakeCache.txt
# cotire
rpcs3/cotire/*
rpcs3/rpcs3_*_cotire.cmake
# Qt
moc_*.cpp
qrc_resources.cpp
rpcs3_automoc.cpp
+8 -6
View File
@@ -1,7 +1,3 @@
[submodule "wxWidgets"]
path = wxWidgets
url = https://github.com/wxWidgets/wxWidgets
ignore = dirty
[submodule "rpcs3-ffmpeg"]
path = 3rdparty/ffmpeg
url = https://github.com/hrydgard/ppsspp-ffmpeg
@@ -12,7 +8,6 @@
[submodule "llvm"]
path = llvm
url = https://github.com/llvm-mirror/llvm
branch = release_38
[submodule "rsx_program_decompiler"]
path = rsx_program_decompiler
url = https://github.com/RPCS3/rsx_program_decompiler
@@ -21,7 +16,7 @@
url = https://github.com/Microsoft/GSL.git
[submodule "libpng"]
path = 3rdparty/libpng
url = https://github.com/RPCS3/libpng
url = https://github.com/Zangetsu38/libpng
ignore = dirty
[submodule "Vulkan/glslang"]
path = Vulkan/glslang
@@ -41,3 +36,10 @@
[submodule "rsx-debugger"]
path = rsx-debugger
url = https://github.com/RPCS3/rsx-debugger.git
[submodule "3rdparty/zlib"]
path = 3rdparty/zlib
url = https://github.com/madler/zlib
[submodule "3rdparty/hidapi"]
path = 3rdparty/hidapi
url = https://github.com/Zangetsu38/hidapi
branch = master
+58 -15
View File
@@ -1,12 +1,12 @@
language: cpp
sudo: false
sudo: required
dist: trusty
os:
- linux
#- osx
osx_image: xcode6.4
# osx_image: xcode6.4
compiler:
- clang
@@ -19,7 +19,7 @@ cache:
env:
global:
- secure: "Vf+FY48nip9JppMnq11105NealdErSWsoUhHo63/V3V+LKfA9guenxCp93/qoSIdSGC/sJwb0yIIMGvkTT/rxDJNh6Z+BWUTb2E0WEIIQbvTJNOSUzoq7dfF1LT61XjVjByFzcbC2xjtaBowmcAYEs1jGUUuEjYVCMmD5lY8hUg="
- secure: BXyNziNYFLqLtY6Q58BDEUpRJr81HUtHpxf2Sr646bDcbG0Rf2rb2utqHZJ1Om926WdH7RqHuoVti4dr2X1lh4nHMkLD7MrIrfIkNN5T9aZdk19uw9IyMtz/cXon7/wqVo24tVqtBI0UghFxKii/GTDJEvRKgfpPp1e1vKSNGa4=
# Which Travis environment to run Coverity on
- coverity_scan_run_condition='"$TRAVIS_OS_NAME" = linux -a "$CC" = gcc'
# Test mode is for testing if it's working with Coverity. Change to true if testing, to avoid reaching the quota.
@@ -29,61 +29,104 @@ matrix:
exclude:
- os: osx
compiler: gcc
include:
- os: linux
compiler: clang
env: WITHOUT_LLVM="yes"
git:
submodules: false
before_install:
- if [ "$CC" = "clang" ]; then
export CXX="clang++-4.0" CC="clang-4.0";
fi;
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "g++" ]; then
export CXX="g++-5" CC="gcc-5" CXXFLAGS="-Wno-format-security";
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01';
fi;
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo add-apt-repository ppa:beineri/opt-qt59-trusty -y;
sudo apt-get update;
sudo apt-get install qt59base -y --allow-unauthenticated;
fi;
# Add coverall for C++ so coverall.io could be triggered. Even it should be --coverage and gcov.
# Install updated libglew-dev since the version provided by trusty is outdated
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
pip install --user cpp-coveralls requests[security];
wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew-dev_1.13.0-2_amd64.deb;
wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew1.13_1.13.0-2_amd64.deb;
wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_1.0.21.0+dfsg1-1~16.04.1_amd64.deb;
wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_1.0.21.0+dfsg1-1~16.04.1_amd64.deb;
sudo dpkg -i libglew1.13_1.13.0-2_amd64.deb libglew-dev_1.13.0-2_amd64.deb libvulkan1_1.0.21.0+dfsg1-1~16.04.1_amd64.deb libvulkan-dev_1.0.21.0+dfsg1-1~16.04.1_amd64.deb;
else
brew update; brew update;
brew install ccache glew wxwidgets llvm38;
brew install ccache glew llvm40;
fi;
before_script:
- git submodule update --init rsx_program_decompiler asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal
- git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal 3rdparty/hidapi Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers
- source /opt/qt59/bin/qt59-env.sh
- mkdir build
- cd build
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
cmake ..;
- if [ -z "$WITHOUT_LLVM" ]; then
cmake .. -DCMAKE_INSTALL_PREFIX=/usr;
else
cmake .. -DLLVM_DIR=/usr/local/opt/llvm38/lib/llvm-3.8/share/llvm/cmake;
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITHOUT_LLVM=ON;
fi;
- make -j 3
- # AppImage generation
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$CC" = "clang-4.0" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
export LD_LIBRARY_PATH=${PWD}/3rdparty/libpng:/opt/qt59/lib/:$LD_LIBRARY_PATH ;
make DESTDIR=appdir 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 ;
unset QTDIR; unset QT_PLUGIN_PATH ;
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs ;
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage ;
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq ;
zip -r9 rpcs3.zip ./RPCS3*.AppImage;
if [ -z "$WITHOUT_LLVM" ]; then
export LLVM="-LLVM";
fi;
curl ${UPLOAD_URL}${TRAVIS_COMMIT:0:7}-${TRAVIS_BUILD_NUMBER}${LLVM}_linux64 --upload-file rpcs3.zip;
fi;
script:
# Add a command to show all the variables. May be useful for debugging Travis.
#- echo "--Shell Export Lists START--" ; export -p; echo "--Shell Export Lists STOP--";
# And to ensure the versions of toolchain
- echo "--CXX version?"; "$CXX" --version; echo "--CXX version confirmed";
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -j 3; fi
#- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -j 3; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
#- llvm-toolchain-trusty-3.8 temporarily disabled
- llvm-toolchain-trusty-4.0
packages:
- cmake
- libasound2-dev
- libopenal-dev
- freeglut3-dev
- libglew-dev
#- libglew-dev
#- libvulkan1
#- libvulkan-dev
- libc6-dev
#- llvm-3.8
#- llvm-3.8-dev
- llvm-4.0
- llvm-4.0-dev
- clang-4.0
- libedit-dev
- g++-5
- gcc-5
#- clang-3.6
- libstdc++-5-dev
- lib32stdc++6
- zlib1g-dev
- libwxgtk3.0-dev
# We need to install qt 5.8 manually because the version trusty provides is too old.
#- qtbase5-dev
- libudev-dev
coverity_scan:
project:
name: $TRAVIS_REPO_SLUG
Vendored Submodule
+1
Submodule 3rdparty/hidapi added at 66eed15b05
Vendored Submodule
+1
Submodule 3rdparty/zlib added at cacf7f1d4e
+22 -9
View File
@@ -1,5 +1,12 @@
cmake_minimum_required(VERSION 2.8.12)
option(WITH_GDB "WITH_GDB" OFF)
option(WITHOUT_LLVM "WITHOUT_LLVM" OFF)
if (WITH_GDB)
add_definitions(-DWITH_GDB_DEBUGGER)
endif()
set(ASMJIT_STATIC TRUE)
if (NOT CMAKE_BUILD_TYPE)
@@ -11,14 +18,6 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." )
endif()
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
message( FATAL_ERROR "RPCS3 requires at least gcc-5.1." )
endif()
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.1)
message( FATAL_ERROR "RPCS3 can't be compiled with gcc-6.1, see #1691." )
endif()
find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
@@ -41,6 +40,20 @@ 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")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${PROJECT_BINARY_DIR}/bin")
add_subdirectory( Vulkan )
add_subdirectory( rpcs3 )
add_subdirectory( rsx_program_decompiler )
include_directories(3rdparty/hidapi/hidapi)
if(APPLE)
add_subdirectory(3rdparty/hidapi/mac)
#list(APPEND LIBS hidapi)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_subdirectory(3rdparty/hidapi/linux)
elseif(MSVC)
add_subdirectory(3rdparty/hidapi/windows)
else()
add_subdirectory(3rdparty/hidapi/libusb)
#list(APPEND LIBS hidapi-libusb)
endif()
+20
View File
@@ -0,0 +1,20 @@
# Getting Started
Before getting started using the emulator, read the [Quickstart Guide](https://rpcs3.net/quickstart) and the [FAQ](https://rpcs3.net/faq). After reading those, if you need support, visit our [Forums](http://www.emunewz.net/forum/forumdisplay.php?fid=172).
# Issue Reporting
**The GitHub Issue Tracker is not the place to ask for support or to submit [Game Compatibility](https://rpcs3.net/compatibility) reports.** Requests for support or incorrect reports will be closed. If you are not sure whether the issue you want to report is an actual issue that is not yet known, please use the forums to submit such report.
**Before reporting an issue:**
- Check if your system matches all the minimum requirements listed in the [Quickstart Guide](https://rpcs3.net/quickstart);
- Check if the issue is meaningful for the team (e.g. The Last of Us doesn't work is obvious and therefore useless);
- Search older issues/forum threads to see if your issue was already submitted.
- Use understandable English. It doesn't need to be perfect, but clear enough to understand your message.
- While reporting issues, don't forget to include details about your system (OS, CPU, GPU, etc.), as well as the RPCS3.log file.
Submitting your test results for Commercial Games must be done on our forums' [Commercial Games](http://www.emunewz.net/forum/forumdisplay.php?fid=193) section. If there's already a thread for the game you want to report post in it, otherwise please make a new thread following the [Guidelines for submitting new games](http://www.emunewz.net/forum/showthread.php?tid=174376).
# Contributing
Check the [Coding Style Guidelines](https://github.com/RPCS3/rpcs3/wiki/Coding-Style), [Roadmap](https://github.com/RPCS3/rpcs3/wiki/Roadmap) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information). If you have any questions, hit us up on our [Discord Server](https://discord.me/RPCS3) in the **#development** channel.
+45 -29
View File
@@ -5,47 +5,61 @@ RPCS3
[![Build status](https://ci.appveyor.com/api/projects/status/411c4clmiohtx7eo/branch/master?svg=true)](https://ci.appveyor.com/project/rpcs3/rpcs3/branch/master)
[![Coverity Status](https://img.shields.io/coverity/scan/3960.svg)](https://scan.coverity.com/projects/3960)
An open-source PlayStation 3 emulator/debugger written in C++.
The world's first open-source PlayStation 3 emulator/debugger written in C++ for Windows and Linux.
You can find some basic information in the [FAQ](https://github.com/RPCS3/rpcs3/wiki/FAQ). For discussion about this emulator and PS3 emulation please visit the [official forums](http://www.emunewz.net/forum/forumdisplay.php?fid=172).
You can find some basic information in our [**website**](https://rpcs3.net/).
For discussion about this emulator and PS3 emulation please visit our [**forums**](http://www.emunewz.net/forum/forumdisplay.php?fid=172) and our [**Discord server**](https://discord.me/RPCS3).
Official Discord server: https://discord.me/RPCS3
Support Nekotekina on Patreon: https://www.patreon.com/Nekotekina
### Development
If you want to contribute please take a look at the [Coding Style](https://github.com/RPCS3/rpcs3/wiki/Coding-Style), [Roadmap](https://github.com/RPCS3/rpcs3/wiki/Roadmap) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information) pages. You should as well contact any of the developers in the forum in order to know about the current situation of the emulator.
[**Support Lead Developer Nekotekina on Patreon**](https://www.patreon.com/Nekotekina)
### Dependencies
## Development
__Windows__
* [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
* [Visual C++ Redistributable Packages for Visual Studio 2015](http://www.microsoft.com/en-us/download/details.aspx?id=48145)
* [Cmake 3.1.0+](http://www.cmake.org/download/) (required; add to PATH)
If you want to contribute please take a look at the [Coding Style](https://github.com/RPCS3/rpcs3/wiki/Coding-Style), [Roadmap](https://github.com/RPCS3/rpcs3/wiki/Roadmap) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information) pages. You should as well contact any of the developers in the forums or in Discord in order to know more about the current situation of the emulator.
## Dependencies
### Windows
* [Visual Studio 2017](https://www.visualstudio.com/downloads/)
* [Visual C++ Redistributable Packages for Visual Studio 2017](https://go.microsoft.com/fwlink/?LinkId=746572)
* [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.9+](https://www.qt.io/download-open-source/) (required; add QTDIR `<QtInstallFolder>\5.9\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__
### Linux
* [Qt 5.9+](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 libopenal-dev libwxgtk3.0-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev git`
* Arch: `sudo pacman -S glew openal wxgtk cmake llvm`
* Debian & Ubuntu: `sudo apt-get install cmake build-essential libasound2-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`
* Fedora: `sudo dnf install cmake qt5-devel vulkan-devel libGLEW`
__Mac OSX__
### Mac OSX
Mac OSX is not supported at this moment because it doesn't meet system requirements (OpenGL 4.3)
* Xcode 6+ (tested with Xcode 6.4)
* Install with Homebrew: `brew install glew wxwidgets`
* Remove '-framework QuickTime' from '_ldflags' in /usr/local/bin/wx-config
* Install with Homebrew: `brew install glew`
### Building
- __Windows__: </br>
1) To initialize the repository don't forget to execute `git submodule update --init` to pull the submodules. </br>
2) Open the *.SLN* file. </br>
3) Build the projects in *__BUILD_BEFORE* folder: right-click on every project > *Build*. </br>
4) Press *BUILD* > *Build Solution* or *Rebuild Solution*. </br>
## Building on Windows:
To initialize the repository don't forget to execute `git submodule update --init` to pull the submodules.
### 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 `<QtInstallFolder>\5.9\msvc2017_64\` </br>
*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.8\msvc2015_64`. </br>
2) While selecting the rpcs3qt project, go to Qt5->Project Setting and select the version you added.
### Building the projects
1) Build the projects in *__BUILD_BEFORE* folder: right-click on every project > *Build*. </br>
2) Press *BUILD* > *Build Solution* or *Rebuild Solution*. </br>
## Building on Linux & Mac OSX:
- __Linux & Mac OSX__: </br>
1) `git clone https://github.com/RPCS3/rpcs3.git` </br>
2) `cd rpcs3/` </br>
3) `git submodule update --init` </br>
@@ -56,7 +70,8 @@ If you are on OSX and want to build with llvm don't forget to add `-DLLVM_DIR=..
When using GDB, configure it to ignore SIGSEGV signal (`handle SIGSEGV nostop noprint`).
##### CMake Build Options (Linux & Mac OSX)
## CMake Build Options (Linux & Mac OSX)
- ```-DUSE_SYSTEM_LIBPNG=ON/OFF``` (default = *OFF*) </br>
Build against the shared libpng instead of using the builtin one. libpng 1.6+ highly recommended. Try this option if you get version conflict errors or only see black game icons.
@@ -64,6 +79,7 @@ Build against the shared libpng instead of using the builtin one. libpng 1.6+ hi
- ```-DUSE_SYSTEM_FFMPEG=ON/OFF``` (default = *OFF*) </br>
Build against the shared ffmpeg libraries instead of using the builtin patched version. Try this if the builtin version breaks the OpenGL renderer for you.
### License
## 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.
-73
View File
@@ -1,73 +0,0 @@
#include "stdafx.h"
#include "Config.h"
#include "Emu/System.h"
#include "AutoPause.h"
cfg::bool_entry g_cfg_debug_autopause_syscall(cfg::root.misc, "Auto Pause at System Call");
cfg::bool_entry g_cfg_debug_autopause_func_call(cfg::root.misc, "Auto Pause at Function Call");
debug::autopause& debug::autopause::get_instance()
{
// Use magic static
static autopause instance;
return instance;
}
// Load Auto Pause Configuration from file "pause.bin"
void debug::autopause::reload(void)
{
auto& instance = get_instance();
instance.m_pause_function.clear();
instance.m_pause_syscall.clear();
// TODO: better format, possibly a config entry
if (fs::file list{ fs::get_config_dir() + "pause.bin" })
{
u32 num;
size_t fmax = list.size();
size_t fcur = 0;
list.seek(0);
while (fcur <= fmax - sizeof(u32))
{
list.read(&num, sizeof(u32));
fcur += sizeof(u32);
if (num == 0xFFFFFFFF) break;
if (num < 1024)
{
instance.m_pause_syscall.emplace(num);
LOG_WARNING(HLE, "Set autopause at syscall %lld", num);
}
else
{
instance.m_pause_function.emplace(num);
LOG_WARNING(HLE, "Set autopause at function 0x%08x", num);
}
}
}
}
bool debug::autopause::pause_syscall(u64 code)
{
if (g_cfg_debug_autopause_syscall && get_instance().m_pause_syscall.count(code) != 0)
{
Emu.Pause();
LOG_SUCCESS(HLE, "Autopause triggered at syscall %lld", code);
return true;
}
return false;
}
bool debug::autopause::pause_function(u32 code)
{
if (g_cfg_debug_autopause_func_call && get_instance().m_pause_function.count(code) != 0)
{
Emu.Pause();
LOG_SUCCESS(HLE, "Autopause triggered at function 0x%08x", code);
return true;
}
return false;
}
-22
View File
@@ -1,22 +0,0 @@
#pragma once
#include <unordered_set>
// Regarded as a Debugger Enchantment
namespace debug
{
// To store the pause function/call id, and let those pause there.
// Would be with a GUI to configure those.
class autopause
{
std::unordered_set<u64> m_pause_syscall;
std::unordered_set<u32> m_pause_function;
static autopause& get_instance();
public:
static void reload();
static bool pause_syscall(u64 code);
static bool pause_function(u32 code);
};
}
+10
View File
@@ -301,6 +301,16 @@ union alignas(16) v128
}
};
template <typename T, std::size_t N, std::size_t M>
struct offset32_array<v128::masked_array_t<T, N, M>>
{
template <typename Arg>
static inline u32 index32(const Arg& arg)
{
return SIZE_32(T) * (static_cast<u32>(arg) ^ static_cast<u32>(M));
}
};
inline v128 operator|(const v128& left, const v128& right)
{
return v128::fromV(_mm_or_si128(left.vi, right.vi));
+4 -1
View File
@@ -18,6 +18,9 @@ struct bf_base
// Value mask
static constexpr utype vmask = static_cast<utype>(~utype{} >> (bitmax - bitsize));
// All ones mask
static constexpr utype mask1 = static_cast<utype>(~utype{});
protected:
type m_data;
};
@@ -36,7 +39,7 @@ struct bf_t : bf_base<T, N>
// Get bitmask of size N, at I pos
static constexpr utype data_mask()
{
return static_cast<utype>(~utype{} >> (bf_t::bitmax - bf_t::bitsize) << bitpos);
return static_cast<utype>(static_cast<utype>(bf_t::mask1 >> (bf_t::bitmax - bf_t::bitsize)) << bitpos);
}
// Bitfield extraction helper
+1702
View File
File diff suppressed because it is too large Load Diff
+81 -50
View File
@@ -5,9 +5,9 @@
namespace cfg
{
logs::channel cfg("CFG", logs::level::notice);
logs::channel cfg("CFG");
entry_base::entry_base(type _type)
_base::_base(type _type)
: m_type(_type)
{
if (_type != type::node)
@@ -16,51 +16,36 @@ namespace cfg
}
}
entry_base::entry_base(type _type, node& owner, const std::string& name)
_base::_base(type _type, node* owner, const std::string& name)
: m_type(_type)
{
if (!owner.m_nodes.emplace(name, this).second)
for (const auto& pair : owner->m_nodes)
{
fmt::throw_exception<std::logic_error>("Node already exists: %s" HERE, name);
}
}
entry_base& entry_base::operator[](const std::string& name) const
{
if (m_type == type::node)
{
return *static_cast<const node&>(*this).m_nodes.at(name);
if (pair.first == name)
{
fmt::throw_exception<std::logic_error>("Node already exists: %s" HERE, name);
}
}
fmt::throw_exception<std::logic_error>("Invalid node type" HERE);
owner->m_nodes.emplace_back(name, this);
}
entry_base& entry_base::operator[](const char* name) const
{
if (m_type == type::node)
{
return *static_cast<const node&>(*this).m_nodes.at(name);
}
fmt::throw_exception<std::logic_error>("Invalid node type" HERE);
}
bool entry_base::from_string(const std::string&)
bool _base::from_string(const std::string&)
{
fmt::throw_exception<std::logic_error>("from_string() purecall" HERE);
}
bool entry_base::from_list(std::vector<std::string>&&)
bool _base::from_list(std::vector<std::string>&&)
{
fmt::throw_exception<std::logic_error>("from_list() purecall" HERE);
}
// Emit YAML
static void encode(YAML::Emitter& out, const class entry_base& rhs);
static void encode(YAML::Emitter& out, const class _base& rhs);
// Incrementally load config entries from YAML::Node.
// The config value is preserved if the corresponding YAML node doesn't exist.
static void decode(const YAML::Node& data, class entry_base& rhs);
static void decode(const YAML::Node& data, class _base& rhs);
}
bool cfg::try_to_int64(s64* out, const std::string& value, s64 min, s64 max)
@@ -118,7 +103,13 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) f
try
{
const auto val = std::stoull(value, nullptr, 0);
std::size_t pos;
const auto val = std::stoull(value, &pos, 0);
if (pos != value.size())
{
return false;
}
if (out) *out = val;
return true;
@@ -151,7 +142,7 @@ std::vector<std::string> cfg::try_to_enum_list(decltype(&fmt_class_string<int>::
return result;
}
void cfg::encode(YAML::Emitter& out, const cfg::entry_base& rhs)
void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
{
switch (rhs.get_type())
{
@@ -161,7 +152,8 @@ void cfg::encode(YAML::Emitter& out, const cfg::entry_base& rhs)
for (const auto& np : static_cast<const node&>(rhs).get_nodes())
{
out << YAML::Key << np.first;
out << YAML::Value; encode(out, *np.second);
out << YAML::Value;
encode(out, *np.second);
}
out << YAML::EndMap;
@@ -178,12 +170,25 @@ void cfg::encode(YAML::Emitter& out, const cfg::entry_base& rhs)
out << YAML::EndSeq;
return;
}
case type::log:
{
out << YAML::BeginMap;
for (const auto& np : static_cast<const log_entry&>(rhs).get_map())
{
if (np.second == logs::level::notice) continue;
out << YAML::Key << np.first;
out << YAML::Value << fmt::format("%s", np.second);
}
out << YAML::EndMap;
return;
}
}
out << rhs.to_string();
}
void cfg::decode(const YAML::Node& data, cfg::entry_base& rhs)
void cfg::decode(const YAML::Node& data, cfg::_base& rhs)
{
switch (rhs.get_type())
{
@@ -199,16 +204,12 @@ void cfg::decode(const YAML::Node& data, cfg::entry_base& rhs)
if (!pair.first.IsScalar()) continue;
// Find the key among existing nodes
const auto name = pair.first.Scalar();
const auto found = static_cast<node&>(rhs).get_nodes().find(name);
if (found != static_cast<node&>(rhs).get_nodes().cend())
for (const auto& _pair : static_cast<node&>(rhs).get_nodes())
{
decode(pair.second, *found->second);
}
else
{
// ???
if (_pair.first == pair.first.Scalar())
{
decode(pair.second, *_pair.second);
}
}
}
@@ -225,6 +226,29 @@ void cfg::decode(const YAML::Node& data, cfg::entry_base& rhs)
break;
}
case type::log:
{
if (data.IsScalar() || data.IsSequence())
{
return; // ???
}
std::map<std::string, logs::level> values;
for (const auto& pair : data)
{
if (!pair.first.IsScalar() || !pair.second.IsScalar()) continue;
u64 value;
if (cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar()))
{
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
}
}
static_cast<log_entry&>(rhs).set_map(std::move(values));
break;
}
default:
{
std::string value;
@@ -261,25 +285,32 @@ void cfg::node::from_default()
}
}
void cfg::bool_entry::from_default()
void cfg::_bool::from_default()
{
value = def;
m_value = def;
}
void cfg::string_entry::from_default()
void cfg::string::from_default()
{
*this = def;
m_value = def;
}
void cfg::set_entry::from_default()
{
std::lock_guard<std::mutex> lock(m_mutex);
m_set = {};
}
cfg::root_node& cfg::get_root()
void cfg::log_entry::set_map(std::map<std::string, logs::level>&& map)
{
// Magic static
static root_node root;
return root;
logs::reset();
for (auto&& pair : (m_map = std::move(map)))
{
logs::set_level(pair.first, pair.second);
}
}
void cfg::log_entry::from_default()
{
set_map({});
}
+69 -219
View File
@@ -1,18 +1,14 @@
#pragma once
#include "Utilities/types.h"
#include "Utilities/Atomic.h"
#include "Utilities/StrFmt.h"
#include "Utilities/Log.h"
#include <initializer_list>
#include <exception>
#include <utility>
#include <string>
#include <vector>
#include <set>
#include <unordered_map>
#include <map>
#include <mutex>
namespace cfg
{
@@ -29,36 +25,33 @@ namespace cfg
enum class type : uint
{
node = 0, // cfg::node type
boolean, // cfg::bool_entry type
fixed_map, // cfg::map_entry type
enumeration, // cfg::enum_entry type
integer, // cfg::int_entry type
string, // cfg::string_entry type
_bool, // cfg::_bool type
_enum, // cfg::_enum type
_int, // cfg::_int type
string, // cfg::string type
set, // cfg::set_entry type
log,
};
// Config tree entry abstract base class
class entry_base
class _base
{
const type m_type;
protected:
// Ownerless entry constructor
entry_base(type _type);
_base(type _type);
// Owned entry constructor
entry_base(type _type, class node& owner, const std::string& name);
_base(type _type, class node* owner, const std::string& name);
public:
// Disallow copy/move constructors and assignments
entry_base(const entry_base&) = delete;
_base(const _base&) = delete;
// Get type
type get_type() const { return m_type; }
// Access child node (must exist)
entry_base& operator [](const std::string& name) const; entry_base& operator [](const char* name) const;
// Reset defaults
virtual void from_default() = 0;
@@ -82,27 +75,27 @@ namespace cfg
};
// Config tree node which contains another nodes
class node : public entry_base
class node : public _base
{
std::map<std::string, entry_base*> m_nodes;
std::vector<std::pair<std::string, _base*>> m_nodes;
friend class entry_base;
friend class _base;
public:
// Root node constructor
node()
: entry_base(type::node)
: _base(type::node)
{
}
// Registered node constructor
node(node& owner, const std::string& name)
: entry_base(type::node, owner, name)
node(node* owner, const std::string& name)
: _base(type::node, owner, name)
{
}
// Get child nodes
const std::map<std::string, entry_base*>& get_nodes() const
const auto& get_nodes() const
{
return m_nodes;
}
@@ -117,43 +110,38 @@ namespace cfg
void from_default() override;
};
struct bool_entry final : public entry_base
class _bool final : public _base
{
atomic_t<bool> value;
bool m_value;
public:
const bool def;
bool_entry(node& owner, const std::string& name, bool def = false)
: entry_base(type::boolean, owner, name)
, value(def)
_bool(node* owner, const std::string& name, bool def = false)
: _base(type::_bool, owner, name)
, m_value(def)
, def(def)
{
}
explicit operator bool() const
{
return value.load();
}
bool_entry& operator =(bool value)
{
value = value;
return *this;
return m_value;
}
void from_default() override;
std::string to_string() const override
{
return value.load() ? "true" : "false";
return m_value ? "true" : "false";
}
bool from_string(const std::string& value) override
{
if (value == "false")
this->value = false;
m_value = false;
else if (value == "true")
this->value = true;
m_value = true;
else
return false;
@@ -161,116 +149,17 @@ namespace cfg
}
};
// Value node with fixed set of possible values, each maps to a value of type T.
template<typename T>
struct map_entry final : public entry_base
{
using init_type = std::initializer_list<std::pair<std::string, T>>;
using map_type = std::unordered_map<std::string, T>;
using list_type = std::vector<std::string>;
using value_type = typename map_type::value_type;
static map_type make_map(init_type init)
{
map_type map(init.size());
for (const auto& v : init)
{
// Ensure elements are unique
verify(HERE), map.emplace(v.first, v.second).second;
}
return map;
}
static list_type make_list(init_type init)
{
list_type list; list.reserve(init.size());
for (const auto& v : init)
{
list.emplace_back(v.first);
}
return list;
}
public:
const map_type map;
const list_type list; // Element list sorted in original order
const value_type& def; // Pointer to the default value
private:
atomic_t<const value_type*> m_value;
public:
map_entry(node& owner, const std::string& name, const std::string& def, init_type init)
: entry_base(type::fixed_map, owner, name)
, map(make_map(init))
, list(make_list(init))
, def(*map.find(def))
, m_value(&this->def)
{
}
map_entry(node& owner, const std::string& name, std::size_t def_index, init_type init)
: map_entry(owner, name, (init.begin() + (def_index < init.size() ? def_index : 0))->first, init)
{
}
map_entry(node& owner, const std::string& name, init_type init)
: map_entry(owner, name, 0, init)
{
}
const T& get() const
{
return m_value.load()->second;
}
void from_default() override
{
m_value = &def;
}
std::string to_string() const override
{
return m_value.load()->first;
}
bool from_string(const std::string& value) override
{
const auto found = map.find(value);
if (found == map.end())
{
return false;
}
else
{
m_value = &*found;
return true;
}
}
std::vector<std::string> to_list() const override
{
return list;
}
};
// Value node with fixed set of possible values, each maps to an enum value of type T.
template<typename T, bool External = false>
class enum_entry final : public entry_base
template <typename T>
class _enum final : public _base
{
// Value or reference
std::conditional_t<External, atomic_t<T>&, atomic_t<T>> m_value;
T m_value;
public:
const T def;
enum_entry(node& owner, const std::string& name, std::conditional_t<External, atomic_t<T>&, T> value)
: entry_base(type::enumeration, owner, name)
_enum(node* owner, const std::string& name, T value = {})
: _base(type::_enum, owner, name)
, m_value(value)
, def(value)
{
@@ -278,13 +167,7 @@ namespace cfg
operator T() const
{
return m_value.load();
}
enum_entry& operator =(T value)
{
m_value = value;
return *this;
return m_value;
}
void from_default() override
@@ -320,21 +203,21 @@ namespace cfg
};
// Signed 32/64-bit integer entry with custom Min/Max range.
template<s64 Min, s64 Max>
class int_entry final : public entry_base
template <s64 Min, s64 Max>
class _int final : public _base
{
static_assert(Min < Max, "Invalid cfg::int_entry range");
static_assert(Min < Max, "Invalid cfg::_int range");
// Prefer 32 bit type if possible
using int_type = std::conditional_t<Min >= INT32_MIN && Max <= INT32_MAX, s32, s64>;
atomic_t<int_type> m_value;
int_type m_value;
public:
const int_type def;
int_entry(node& owner, const std::string& name, int_type def = std::min<int_type>(Max, std::max<int_type>(Min, 0)))
: entry_base(type::integer, owner, name)
_int(node* owner, const std::string& name, int_type def = std::min<int_type>(Max, std::max<int_type>(Min, 0)))
: _base(type::_int, owner, name)
, m_value(def)
, def(def)
{
@@ -342,18 +225,7 @@ namespace cfg
operator int_type() const
{
return m_value.load();
}
int_entry& operator =(int_type value)
{
if (value < Min || value > Max)
{
fmt::throw_exception("Value out of the valid range: %lld" HERE, s64{ value });
}
m_value = value;
return *this;
return m_value;
}
void from_default() override
@@ -363,7 +235,7 @@ namespace cfg
std::string to_string() const override
{
return std::to_string(m_value.load());
return std::to_string(m_value);
}
bool from_string(const std::string& value) override
@@ -380,22 +252,21 @@ namespace cfg
};
// Alias for 32 bit int
using int32_entry = int_entry<INT32_MIN, INT32_MAX>;
using int32 = _int<INT32_MIN, INT32_MAX>;
// Alias for 64 bit int
using int64_entry = int_entry<INT64_MIN, INT64_MAX>;
using int64 = _int<INT64_MIN, INT64_MAX>;
// Simple string entry with mutex
class string_entry final : public entry_base
class string final : public _base
{
mutable std::mutex m_mutex;
std::string m_value;
public:
const std::string def;
string_entry(node& owner, const std::string& name, const std::string& def = {})
: entry_base(type::string, owner, name)
string(node* owner, const std::string& name, const std::string& def = {})
: _base(type::string, owner, name)
, m_value(def)
, def(def)
{
@@ -403,25 +274,16 @@ namespace cfg
operator std::string() const
{
std::lock_guard<std::mutex> lock(m_mutex);
return m_value;
}
std::string get() const
const std::string& get() const
{
return *this;
}
string_entry& operator =(const std::string& value)
{
std::lock_guard<std::mutex> lock(m_mutex);
m_value = value;
return *this;
return m_value;
}
std::size_t size() const
{
std::lock_guard<std::mutex> lock(m_mutex);
return m_value.size();
}
@@ -429,41 +291,35 @@ namespace cfg
std::string to_string() const override
{
std::lock_guard<std::mutex> lock(m_mutex);
return m_value;
}
bool from_string(const std::string& value) override
{
*this = value;
m_value = value;
return true;
}
};
// Simple set entry with mutex (TODO: template for various types)
class set_entry final : public entry_base
class set_entry final : public _base
{
mutable std::mutex m_mutex;
std::set<std::string> m_set;
public:
// Default value is empty list in current implementation
set_entry(node& owner, const std::string& name)
: entry_base(type::set, owner, name)
set_entry(node* owner, const std::string& name)
: _base(type::set, owner, name)
{
}
std::set<std::string> get_set() const
{
std::lock_guard<std::mutex> lock(m_mutex);
return m_set;
}
void set_set(std::set<std::string>&& set)
{
std::lock_guard<std::mutex> lock(m_mutex);
m_set = std::move(set);
}
@@ -471,40 +327,34 @@ namespace cfg
std::vector<std::string> to_list() const override
{
std::lock_guard<std::mutex> lock(m_mutex);
return{ m_set.begin(), m_set.end() };
}
bool from_list(std::vector<std::string>&& list) override
{
std::lock_guard<std::mutex> lock(m_mutex);
m_set = { std::make_move_iterator(list.begin()), std::make_move_iterator(list.end()) };
return true;
}
};
// Root type with some predefined nodes. Don't change it, this is not mandatory for adding nodes.
struct root_node : node
class log_entry final : public _base
{
node core { *this, "Core" };
node vfs { *this, "VFS" };
node log { *this, "Log" };
node video { *this, "Video" };
node audio { *this, "Audio" };
node io { *this, "Input/Output" };
node sys { *this, "System" };
node net { *this, "Net" };
node misc { *this, "Miscellaneous" };
std::map<std::string, logs::level> m_map;
public:
log_entry(node* owner, const std::string& name)
: _base(type::log, owner, name)
{
}
std::map<std::string, logs::level> get_map() const
{
return m_map;
}
void set_map(std::map<std::string, logs::level>&& map);
void from_default() override;
};
// Get global configuration root instance
extern root_node& get_root();
// Global configuration root instance (cached reference)
static root_node& root = get_root();
}
// Registered log channel
#define LOG_CHANNEL(name) extern logs::channel name; namespace logs { static cfg::enum_entry<logs::level, true> name(cfg::root.log, #name, ::name.enabled); }
+101 -16
View File
@@ -6,8 +6,11 @@
#include <unordered_map>
#include <algorithm>
#include <cstring>
#include <cerrno>
using namespace std::literals::string_literals;
#ifdef _WIN32
#include <cwchar>
@@ -99,6 +102,7 @@ static fs::error to_error(DWORD e)
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/statvfs.h>
#include <dirent.h>
#include <fcntl.h>
#include <libgen.h>
@@ -106,10 +110,12 @@ static fs::error to_error(DWORD e)
#include <unistd.h>
#include <utime.h>
#if defined(__APPLE__) || defined(__FreeBSD__)
#if defined(__APPLE__)
#include <copyfile.h>
#include <mach-o/dyld.h>
#else
#elif defined(__DragonFly__) || defined(__FreeBSD__)
#include <sys/socket.h> // sendfile
#elif defined(__linux__) || defined(__sun)
#include <sys/sendfile.h>
#endif
@@ -153,6 +159,16 @@ namespace fs
{
}
stat_t file_base::stat()
{
fmt::throw_exception("fs::file::stat() not supported for %s", typeid(*this).name());
}
void file_base::sync()
{
// Do notning
}
dir_base::~dir_base()
{
}
@@ -390,6 +406,45 @@ bool fs::is_dir(const std::string& path)
return true;
}
bool fs::statfs(const std::string& path, fs::device_stat& info)
{
if (auto device = get_virtual_device(path))
{
return device->statfs(path, info);
}
#ifdef _WIN32
ULARGE_INTEGER avail_free;
ULARGE_INTEGER total_size;
ULARGE_INTEGER total_free;
if (!GetDiskFreeSpaceExW(to_wchar(path).get(), &avail_free, &total_size, &total_free))
{
g_tls_error = to_error(GetLastError());
return false;
}
info.block_size = 4096; // TODO
info.total_size = total_size.QuadPart;
info.total_free = total_free.QuadPart;
info.avail_free = avail_free.QuadPart;
#else
struct ::statvfs buf;
if (::statvfs(path.c_str(), &buf) != 0)
{
g_tls_error = to_error(errno);
return false;
}
info.block_size = buf.f_frsize;
info.total_size = info.block_size * buf.f_blocks;
info.total_free = info.block_size * buf.f_bfree;
info.avail_free = info.block_size * buf.f_bavail;
#endif
return true;
}
bool fs::create_dir(const std::string& path)
{
if (auto device = get_virtual_device(path))
@@ -525,14 +580,20 @@ bool fs::copy_file(const std::string& from, const std::string& to, bool overwrit
}
// Here we use kernel-space copying for performance reasons
#if defined(__APPLE__) || defined(__FreeBSD__)
// fcopyfile works on FreeBSD and OS X 10.5+
#if defined(__APPLE__)
// fcopyfile works on OS X 10.5+
if (::fcopyfile(input, output, 0, COPYFILE_ALL))
#else
#elif defined(__DragonFly__) || defined(__FreeBSD__)
if (::sendfile(input, output, 0, 0, NULL, NULL, 0))
#elif defined(__linux__) || defined(__sun)
// sendfile will work with non-socket output (i.e. regular file) on Linux 2.6.33+
off_t bytes_copied = 0;
struct ::stat fileinfo = { 0 };
if (::fstat(input, &fileinfo) || ::sendfile(output, input, &bytes_copied, fileinfo.st_size))
#else // NetBSD, OpenBSD, etc.
fmt::throw_exception("fs::copy_file() isn't implemented for this platform.\nFrom: %s\nTo: %s", from, to);
errno = 0;
if (true)
#endif
{
const int err = errno;
@@ -742,6 +803,11 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
return info;
}
void sync() override
{
verify("file::sync" HERE), FlushFileBuffers(m_handle);
}
bool trunc(u64 length) override
{
LARGE_INTEGER old, pos;
@@ -797,7 +863,11 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
whence == seek_end ? FILE_END :
(fmt::throw_exception("Invalid whence (0x%x)" HERE, whence), 0);
verify("file::seek" HERE), SetFilePointerEx(m_handle, pos, &pos, mode);
if (!SetFilePointerEx(m_handle, pos, &pos, mode))
{
g_tls_error = to_error(GetLastError());
return -1;
}
return pos.QuadPart;
}
@@ -863,6 +933,11 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
return info;
}
void sync() override
{
verify("file::sync" HERE), ::fsync(m_fd) == 0;
}
bool trunc(u64 length) override
{
if (::ftruncate(m_fd, length) != 0)
@@ -899,7 +974,12 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
(fmt::throw_exception("Invalid whence (0x%x)" HERE, whence), 0);
const auto result = ::lseek(m_fd, offset, mode);
verify("file::seek" HERE), result != -1;
if (result == -1)
{
g_tls_error = to_error(errno);
return -1;
}
return result;
}
@@ -933,11 +1013,6 @@ fs::file::file(const void* ptr, std::size_t size)
{
}
fs::stat_t stat() override
{
fmt::raw_error("fs::file::memory_stream::stat(): not supported");
}
bool trunc(u64 length) override
{
return false;
@@ -966,11 +1041,20 @@ fs::file::file(const void* ptr, std::size_t size)
u64 seek(s64 offset, fs::seek_mode whence) override
{
return
whence == fs::seek_set ? m_pos = offset :
whence == fs::seek_cur ? m_pos = offset + m_pos :
whence == fs::seek_end ? m_pos = offset + m_size :
const s64 new_pos =
whence == fs::seek_set ? offset :
whence == fs::seek_cur ? offset + m_pos :
whence == fs::seek_end ? offset + size() :
(fmt::raw_error("fs::file::memory_stream::seek(): invalid whence"), 0);
if (new_pos < 0)
{
fs::g_tls_error = fs::error::inval;
return -1;
}
m_pos = new_pos;
return m_pos;
}
u64 size() override
@@ -1313,6 +1397,7 @@ void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
case fs::error::inval: return "Invalid arguments";
case fs::error::noent: return "Not found";
case fs::error::exist: return "Already exists";
case fs::error::acces: return "Access violation";
}
return unknown;
+48 -10
View File
@@ -60,7 +60,8 @@ namespace fs
{
virtual ~file_base();
virtual stat_t stat() = 0;
virtual stat_t stat();
virtual void sync();
virtual bool trunc(u64 length) = 0;
virtual u64 read(void* buffer, u64 size) = 0;
virtual u64 write(const void* buffer, u64 size) = 0;
@@ -83,12 +84,22 @@ namespace fs
virtual void rewind() = 0;
};
// Device information
struct device_stat
{
u64 block_size;
u64 total_size;
u64 total_free; // Total size of free space
u64 avail_free; // Free space available to unprivileged user
};
// Virtual device
struct device_base
{
virtual ~device_base();
virtual bool stat(const std::string& path, stat_t& info) = 0;
virtual bool statfs(const std::string& path, device_stat& info) = 0;
virtual bool remove_dir(const std::string& path) = 0;
virtual bool create_dir(const std::string& path) = 0;
virtual bool rename(const std::string& from, const std::string& to) = 0;
@@ -121,6 +132,9 @@ namespace fs
// Check whether the directory exists and is NOT a file
bool is_dir(const std::string& path);
// Get filesystem information
bool statfs(const std::string& path, device_stat& info);
// Delete empty directory
bool remove_dir(const std::string& path);
@@ -206,6 +220,13 @@ namespace fs
return m_file->stat();
}
// Sync file buffers
void sync() const
{
if (!m_file) xnull();
return m_file->sync();
}
// Read the data from the file and return the amount of data written in buffer
u64 read(void* buffer, u64 count) const
{
@@ -488,11 +509,6 @@ namespace fs
{
}
stat_t stat() override
{
fmt::raw_error("fs::container_stream<>::stat(): not supported");
}
bool trunc(u64 length) override
{
obj.resize(length);
@@ -547,11 +563,20 @@ namespace fs
u64 seek(s64 offset, seek_mode whence) override
{
return
whence == fs::seek_set ? pos = offset :
whence == fs::seek_cur ? pos = offset + pos :
whence == fs::seek_end ? pos = offset + size() :
const s64 new_pos =
whence == fs::seek_set ? offset :
whence == fs::seek_cur ? offset + pos :
whence == fs::seek_end ? offset + size() :
(fmt::raw_error("fs::container_stream<>::seek(): invalid whence"), 0);
if (new_pos < 0)
{
fs::g_tls_error = fs::error::inval;
return -1;
}
pos = new_pos;
return pos;
}
u64 size() override
@@ -567,4 +592,17 @@ namespace fs
result.reset(std::make_unique<container_stream<T>>(std::forward<T>(container)));
return result;
}
template <typename... Args>
bool write_file(const std::string& path, bs_t<fs::open_mode> mode, const Args&... args)
{
if (fs::file f{path, mode})
{
// Write args sequentially
int seq[]{ (f.write(args), 0)... };
return true;
}
return false;
}
}
+817
View File
@@ -0,0 +1,817 @@
#include "stdafx.h"
#ifdef WITH_GDB_DEBUGGER
#include "GDBDebugServer.h"
#include "Log.h"
#include <algorithm>
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/CPU/CPUThread.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/RawSPUThread.h"
#include "Emu/Cell/SPUThread.h"
#ifndef _WIN32
#include"fcntl.h"
#endif
extern void ppu_set_breakpoint(u32 addr);
extern void ppu_remove_breakpoint(u32 addr);
logs::channel gdbDebugServer("gdbDebugServer");
int sock_init(void)
{
#ifdef _WIN32
WSADATA wsa_data;
return WSAStartup(MAKEWORD(1, 1), &wsa_data);
#else
return 0;
#endif
}
int sock_quit(void)
{
#ifdef _WIN32
return WSACleanup();
#else
return 0;
#endif
}
#ifndef _WIN32
int closesocket(socket_t s) {
return close(s);
}
const int SOCKET_ERROR = -1;
const socket_t INVALID_SOCKET = -1;
#define sscanf_s sscanf
#define HEX_U32 "x"
#define HEX_U64 "lx"
#else
#define HEX_U32 "lx"
#define HEX_U64 "llx"
#endif
bool check_errno_again() {
#ifdef _WIN32
int err = GetLastError();
return (err == WSAEWOULDBLOCK);
#else
int err = errno;
return (err == EAGAIN) || (err == EWOULDBLOCK);
#endif
}
std::string u32_to_hex(u32 i) {
return fmt::format("%" HEX_U32, i);
}
std::string u64_to_padded_hex(u64 value) {
return fmt::format("%.16" HEX_U64, value);
}
std::string u32_to_padded_hex(u32 value) {
return fmt::format("%.8" HEX_U32, value);
}
u8 hex_to_u8(std::string val) {
u8 result;
sscanf_s(val.c_str(), "%02hhX", &result);
return result;
}
u32 hex_to_u32(std::string val) {
u32 result;
sscanf_s(val.c_str(), "%" HEX_U32, &result);
return result;
}
u64 hex_to_u64(std::string val) {
u64 result;
sscanf_s(val.c_str(), "%" HEX_U64, &result);
return result;
}
void GDBDebugServer::start_server()
{
server_socket = socket(AF_INET, SOCK_STREAM, 0);
if (server_socket == INVALID_SOCKET) {
gdbDebugServer.error("Error creating server socket");
return;
}
#ifdef WIN32
{
int mode = 1;
ioctlsocket(server_socket, FIONBIO, (u_long FAR *)&mode);
}
#else
fcntl(server_socket, F_SETFL, fcntl(server_socket, F_GETFL) | O_NONBLOCK);
#endif
int err;
sockaddr_in server_saddr;
server_saddr.sin_family = AF_INET;
int port = g_cfg.misc.gdb_server_port;
server_saddr.sin_port = htons(port);
server_saddr.sin_addr.s_addr = htonl(INADDR_ANY);
err = bind(server_socket, (struct sockaddr *) &server_saddr, sizeof(server_saddr));
if (err == SOCKET_ERROR) {
gdbDebugServer.error("Error binding to port %d", port);
return;
}
err = listen(server_socket, 1);
if (err == SOCKET_ERROR) {
gdbDebugServer.error("Error listening on port %d", port);
return;
}
gdbDebugServer.success("GDB Debug Server listening on port %d", port);
}
int GDBDebugServer::read(void * buf, int cnt)
{
while (!stop) {
int result = recv(client_socket, reinterpret_cast<char*>(buf), cnt, 0);
if (result == SOCKET_ERROR) {
if (check_errno_again()) {
thread_ctrl::wait_for(50);
continue;
}
gdbDebugServer.error("Error during socket read");
fmt::throw_exception("Error during socket read" HERE);
}
return result;
}
return 0;
}
char GDBDebugServer::read_char()
{
char result;
int cnt = read(&result, 1);
if (!cnt) {
fmt::throw_exception("Tried to read char, but no data was available" HERE);
}
return result;
}
u8 GDBDebugServer::read_hexbyte()
{
char buf[2];
read(buf, 2);
return static_cast<u8>(strtol(buf, nullptr, 16));
}
void GDBDebugServer::try_read_cmd(gdb_cmd & out_cmd)
{
char c = read_char();
//interrupt
if (UNLIKELY(c == 0x03)) {
out_cmd.cmd = "\0x03";
out_cmd.data = "";
out_cmd.checksum = 0;
return;
}
if (UNLIKELY(c != '$')) {
//gdb starts conversation with + for some reason
if (c == '+') {
c = read_char();
}
if (c != '$') {
fmt::throw_exception("Expected start of packet character '$', got '%c' instead" HERE, c);
}
}
//clear packet data
out_cmd.cmd = "";
out_cmd.data = "";
out_cmd.checksum = 0;
bool cmd_part = true;
u8 checksum = 0;
while(true) {
c = read_char();
if (c == '#') {
break;
}
checksum = (checksum + reinterpret_cast<u8&>(c)) % 256;
//escaped char
if (c == '}') {
c = read_char() ^ 0x20;
checksum = (checksum + reinterpret_cast<u8&>(c)) % 256;
}
//cmd-data splitters
if (cmd_part && ((c == ':') || (c == '.') || (c == ';'))) {
cmd_part = false;
}
if (cmd_part) {
out_cmd.cmd += c;
//only q and v commands can have multi-char command
if ((out_cmd.cmd.length() == 1) && (c != 'q') && (c != 'v')) {
cmd_part = false;
}
} else {
out_cmd.data += c;
}
}
out_cmd.checksum = read_hexbyte();
if (out_cmd.checksum != checksum) {
throw new wrong_checksum_exception("Wrong checksum for packet" HERE);
}
}
bool GDBDebugServer::read_cmd(gdb_cmd & out_cmd)
{
while (true) {
try {
try_read_cmd(out_cmd);
ack(true);
return true;
}
catch (wrong_checksum_exception) {
ack(false);
}
catch (std::runtime_error e) {
gdbDebugServer.error(e.what());
return false;
}
}
}
void GDBDebugServer::send(const char * buf, int cnt)
{
gdbDebugServer.trace("Sending %s (%d bytes)", buf, cnt);
while (!stop) {
int res = ::send(client_socket, buf, cnt, 0);
if (res == SOCKET_ERROR) {
if (check_errno_again()) {
thread_ctrl::wait_for(50);
continue;
}
gdbDebugServer.error("Failed sending %d bytes", cnt);
return;
}
return;
}
}
void GDBDebugServer::send_char(char c)
{
send(&c, 1);
}
void GDBDebugServer::ack(bool accepted)
{
send_char(accepted ? '+' : '-');
}
void GDBDebugServer::send_cmd(const std::string & cmd)
{
u8 checksum = 0;
std::string buf;
buf.reserve(cmd.length() + 4);
buf += "$";
for (int i = 0; i < cmd.length(); ++i) {
checksum = (checksum + append_encoded_char(cmd[i], buf)) % 256;
}
buf += "#";
buf += to_hexbyte(checksum);
send(buf.c_str(), static_cast<int>(buf.length()));
}
bool GDBDebugServer::send_cmd_ack(const std::string & cmd)
{
while (true) {
send_cmd(cmd);
char c = read_char();
if (LIKELY(c == '+')) {
return true;
}
if (UNLIKELY(c != '-')) {
gdbDebugServer.error("Wrong acknowledge character received %c", c);
return false;
}
gdbDebugServer.warning("Client rejected our cmd");
}
}
u8 GDBDebugServer::append_encoded_char(char c, std::string & str)
{
u8 checksum = 0;
if (UNLIKELY((c == '#') || (c == '$') || (c == '}'))) {
str += '}';
c ^= 0x20;
checksum = '}';
}
checksum = (checksum + reinterpret_cast<u8&>(c)) % 256;
str += c;
return checksum;
}
std::string GDBDebugServer::to_hexbyte(u8 i)
{
std::string result = "00";
u8 i1 = i & 0xF;
u8 i2 = i >> 4;
result[0] = i2 > 9 ? 'a' + i2 - 10 : '0' + i2;
result[1] = i1 > 9 ? 'a' + i1 - 10 : '0' + i1;
return result;
}
bool GDBDebugServer::select_thread(u64 id)
{
//in case we have none at all
selected_thread.reset();
const auto on_select = [&](u32, cpu_thread& cpu)
{
return (id == ALL_THREADS) || (id == ANY_THREAD) || (cpu.id == id);
};
if (auto ppu = idm::select<ppu_thread>(on_select)) {
selected_thread = ppu.ptr;
return true;
}
return false;
}
std::string GDBDebugServer::get_reg(std::shared_ptr<ppu_thread> thread, u32 rid)
{
std::string result;
//ids from gdb/features/rs6000/powerpc-64.c
//pc
switch (rid) {
case 64:
return u64_to_padded_hex(thread->cia);
//msr?
case 65:
return std::string(16, 'x');
case 66:
return u32_to_padded_hex(thread->cr_pack());
case 67:
return u64_to_padded_hex(thread->lr);
case 68:
return u64_to_padded_hex(thread->ctr);
//xer
case 69:
return std::string(8, 'x');
//fpscr
case 70:
return std::string(8, 'x');
default:
if (rid > 70) return "";
return (rid > 31)
? u64_to_padded_hex(reinterpret_cast<u64&>(thread->fpr[rid - 32])) //fpr
: u64_to_padded_hex(thread->gpr[rid]); //gpr
}
}
bool GDBDebugServer::set_reg(std::shared_ptr<ppu_thread> thread, u32 rid, std::string value)
{
switch (rid) {
case 64:
thread->cia = static_cast<u32>(hex_to_u64(value));
return true;
//msr?
case 65:
return true;
case 66:
thread->cr_unpack(hex_to_u32(value));
return true;
case 67:
thread->lr = hex_to_u64(value);
return true;
case 68:
thread->ctr = hex_to_u64(value);
return true;
//xer
case 69:
return true;
//fpscr
case 70:
return true;
default:
if (rid > 70) return false;
if (rid > 31) {
u64 val = hex_to_u64(value);
thread->fpr[rid - 32] = reinterpret_cast<f64&>(val);
} else {
thread->gpr[rid] = hex_to_u64(value);
}
return true;
}
}
u32 GDBDebugServer::get_reg_size(std::shared_ptr<ppu_thread> thread, u32 rid)
{
switch (rid) {
case 66:
case 69:
case 70:
return 4;
default:
if (rid > 70) {
return 0;
}
return 8;
}
}
bool GDBDebugServer::send_reason()
{
return send_cmd_ack("S05");
}
bool GDBDebugServer::cmd_extended_mode(gdb_cmd & cmd)
{
return send_cmd_ack("OK");
}
bool GDBDebugServer::cmd_reason(gdb_cmd & cmd)
{
return send_reason();
}
bool GDBDebugServer::cmd_supported(gdb_cmd & cmd)
{
return send_cmd_ack("PacketSize=1200");
}
bool GDBDebugServer::cmd_thread_info(gdb_cmd & cmd)
{
std::string result = "";
const auto on_select = [&](u32, cpu_thread& cpu)
{
if (result.length()) {
result += ",";
}
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);;
}
bool GDBDebugServer::cmd_current_thread(gdb_cmd & cmd)
{
return send_cmd_ack(selected_thread.expired() ? "" : u64_to_padded_hex(selected_thread.lock()->id));
}
bool GDBDebugServer::cmd_read_register(gdb_cmd & cmd)
{
select_thread(general_ops_thread_id);
auto th = selected_thread.lock();
if (th->id_type() == 1) {
auto ppu = std::static_pointer_cast<ppu_thread>(th);
u32 rid = hex_to_u32(cmd.data);
std::string result = get_reg(ppu, rid);
if (!result.length()) {
gdbDebugServer.warning("Wrong register id %d", rid);
return send_cmd_ack("E01");
}
return send_cmd_ack(result);
}
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
return send_cmd_ack("");
}
bool GDBDebugServer::cmd_write_register(gdb_cmd & cmd)
{
select_thread(general_ops_thread_id);
auto th = selected_thread.lock();
if (th->id_type() == 1) {
auto ppu = std::static_pointer_cast<ppu_thread>(th);
size_t eq_pos = cmd.data.find('=');
if (eq_pos == std::string::npos) {
gdbDebugServer.warning("Wrong write_register cmd data %s", cmd.data.c_str());
return send_cmd_ack("E02");
}
u32 rid = hex_to_u32(cmd.data.substr(0, eq_pos));
std::string value = cmd.data.substr(eq_pos + 1);
if (!set_reg(ppu, rid, value)) {
gdbDebugServer.warning("Wrong register id %d", rid);
return send_cmd_ack("E01");
}
return send_cmd_ack("OK");
}
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
return send_cmd_ack("");
}
bool GDBDebugServer::cmd_read_memory(gdb_cmd & cmd)
{
size_t s = cmd.data.find(',');
u32 addr = hex_to_u32(cmd.data.substr(0, s));
u32 len = hex_to_u32(cmd.data.substr(s + 1));
std::string result;
result.reserve(len * 2);
for (u32 i = 0; i < len; ++i) {
if (vm::check_addr(addr + i)) {
result += to_hexbyte(vm::read8(addr + i));
} else {
break;
//result += "xx";
}
}
if (len && !result.length()) {
//nothing read
return send_cmd_ack("E01");
}
return send_cmd_ack(result);
}
bool GDBDebugServer::cmd_write_memory(gdb_cmd & cmd)
{
size_t s = cmd.data.find(',');
size_t s2 = cmd.data.find(':');
if ((s == std::string::npos) || (s2 == std::string::npos)) {
gdbDebugServer.warning("Malformed write memory request received: %s", cmd.data.c_str());
return send_cmd_ack("E01");
}
u32 addr = hex_to_u32(cmd.data.substr(0, s));
u32 len = hex_to_u32(cmd.data.substr(s + 1, s2 - s - 1));
const char* data_ptr = (cmd.data.c_str()) + s2 + 1;
for (u32 i = 0; i < len; ++i) {
if (vm::check_addr(addr + i)) {
u8 val;
int res = sscanf_s(data_ptr, "%02hhX", &val);
if (!res) {
gdbDebugServer.warning("Couldn't read u8 from string %s", data_ptr);
return send_cmd_ack("E02");
}
data_ptr += 2;
vm::write8(addr + i, val);
} else {
return send_cmd_ack("E03");
}
}
return send_cmd_ack("OK");
}
bool GDBDebugServer::cmd_read_all_registers(gdb_cmd & cmd)
{
std::string result;
select_thread(general_ops_thread_id);
auto th = selected_thread.lock();
if (th->id_type() == 1) {
auto ppu = std::static_pointer_cast<ppu_thread>(th);
//68 64-bit registers, and 3 32-bit
result.reserve(68*16 + 3*8);
for (int i = 0; i < 71; ++i) {
result += get_reg(ppu, i);
}
return send_cmd_ack(result);
}
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
return send_cmd_ack("");
}
bool GDBDebugServer::cmd_write_all_registers(gdb_cmd & cmd)
{
select_thread(general_ops_thread_id);
auto th = selected_thread.lock();
if (th->id_type() == 1) {
auto ppu = std::static_pointer_cast<ppu_thread>(th);
int ptr = 0;
for (int i = 0; i < 71; ++i) {
int sz = get_reg_size(ppu, i);
set_reg(ppu, i, cmd.data.substr(ptr, sz * 2));
ptr += sz * 2;
}
return send_cmd_ack("OK");
}
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
return send_cmd_ack("E01");
}
bool GDBDebugServer::cmd_set_thread_ops(gdb_cmd & cmd)
{
char type = cmd.data[0];
std::string thread = cmd.data.substr(1);
u64 id = thread == "-1" ? ALL_THREADS : hex_to_u64(thread);
if (type == 'c') {
continue_ops_thread_id = id;
} else {
general_ops_thread_id = id;
}
if (select_thread(id)) {
return send_cmd_ack("OK");
}
gdbDebugServer.warning("Client asked to use thread %llx for %s, but no matching thread was found", id, type == 'c' ? "continue ops" : "general ops");
return send_cmd_ack("E01");
}
bool GDBDebugServer::cmd_attached_to_what(gdb_cmd & cmd)
{
//creating processes from client is not available yet
return send_cmd_ack("1");
}
bool GDBDebugServer::cmd_kill(gdb_cmd & cmd)
{
Emu.Stop();
return true;
}
bool GDBDebugServer::cmd_continue_support(gdb_cmd & cmd)
{
return send_cmd_ack("vCont;c;s;C;S");
}
bool GDBDebugServer::cmd_vcont(gdb_cmd & cmd)
{
//todo: handle multiple actions and thread ids
this->from_breakpoint = false;
if (cmd.data[1] == 'c') {
select_thread(continue_ops_thread_id);
auto ppu = std::static_pointer_cast<ppu_thread>(selected_thread.lock());
ppu->state -= cpu_flag::dbg_pause;
if (Emu.IsPaused()) {
Emu.Resume();
}
thread_ctrl::wait();
//we are in all-stop mode
Emu.Pause();
return send_reason();
} else if (cmd.data[1] == 's') {
select_thread(continue_ops_thread_id);
auto ppu = std::static_pointer_cast<ppu_thread>(selected_thread.lock());
ppu->state += cpu_flag::dbg_step;
ppu->state -= cpu_flag::dbg_pause;
if (Emu.IsPaused()) {
Emu.Resume();
} else {
ppu->notify();
}
thread_ctrl::wait();
//we are in all-stop mode
Emu.Pause();
return send_reason();
}
return send_cmd_ack("");
}
static const u32 INVALID_PTR = 0xffffffff;
bool GDBDebugServer::cmd_set_breakpoint(gdb_cmd & cmd)
{
char type = cmd.data[0];
//software breakpoint
if (type == '0') {
u32 addr = INVALID_PTR;
if (cmd.data.find(';') != std::string::npos) {
gdbDebugServer.warning("Received request to set breakpoint with condition, but they are not supported");
return send_cmd_ack("E01");
}
sscanf_s(cmd.data.c_str(), "0,%x", &addr);
if (addr == INVALID_PTR) {
gdbDebugServer.warning("Can't parse breakpoint request, data: %s", cmd.data.c_str());
return send_cmd_ack("E02");
}
ppu_set_breakpoint(addr);
return send_cmd_ack("OK");
}
//other breakpoint types are not supported
return send_cmd_ack("");
}
bool GDBDebugServer::cmd_remove_breakpoint(gdb_cmd & cmd)
{
char type = cmd.data[0];
//software breakpoint
if (type == '0') {
u32 addr = INVALID_PTR;
sscanf_s(cmd.data.c_str(), "0,%x", &addr);
if (addr == INVALID_PTR) {
gdbDebugServer.warning("Can't parse breakpoint remove request, data: %s", cmd.data.c_str());
return send_cmd_ack("E01");
}
ppu_remove_breakpoint(addr);
return send_cmd_ack("OK");
}
//other breakpoint types are not supported
return send_cmd_ack("");
}
#define PROCESS_CMD(cmds,handler) if (cmd.cmd == cmds) { if (!handler(cmd)) break; else continue; }
void GDBDebugServer::on_task()
{
sock_init();
start_server();
while (!stop) {
sockaddr_in client;
socklen_t client_len = sizeof(client);
client_socket = accept(server_socket, (struct sockaddr *) &client, &client_len);
if (client_socket == INVALID_SOCKET) {
if (check_errno_again()) {
thread_ctrl::wait_for(50);
continue;
}
gdbDebugServer.error("Could not establish new connection\n");
return;
}
//stop immediately
Emu.Pause();
try {
char hostbuf[32];
inet_ntop(client.sin_family, reinterpret_cast<void*>(&client.sin_addr), hostbuf, 32);
gdbDebugServer.success("Got connection to GDB debug server from %s:%d", hostbuf, client.sin_port);
gdb_cmd cmd;
while (!stop) {
if (!read_cmd(cmd)) {
break;
}
gdbDebugServer.trace("Command %s with data %s received", cmd.cmd.c_str(), cmd.data.c_str());
PROCESS_CMD("!", cmd_extended_mode);
PROCESS_CMD("?", cmd_reason);
PROCESS_CMD("qSupported", cmd_supported);
PROCESS_CMD("qfThreadInfo", cmd_thread_info);
PROCESS_CMD("qC", cmd_current_thread);
PROCESS_CMD("p", cmd_read_register);
PROCESS_CMD("P", cmd_write_register);
PROCESS_CMD("m", cmd_read_memory);
PROCESS_CMD("M", cmd_write_memory);
PROCESS_CMD("g", cmd_read_all_registers);
PROCESS_CMD("G", cmd_write_all_registers);
PROCESS_CMD("H", cmd_set_thread_ops);
PROCESS_CMD("qAttached", cmd_attached_to_what);
PROCESS_CMD("k", cmd_kill);
PROCESS_CMD("vCont?", cmd_continue_support);
PROCESS_CMD("vCont", cmd_vcont);
PROCESS_CMD("z", cmd_remove_breakpoint);
PROCESS_CMD("Z", cmd_set_breakpoint);
gdbDebugServer.trace("Unsupported command received %s", cmd.cmd.c_str());
if (!send_cmd_ack("")) {
break;
}
}
}
catch (std::runtime_error& e)
{
if (client_socket) {
closesocket(client_socket);
client_socket = 0;
}
gdbDebugServer.error(e.what());
}
}
}
#undef PROCESS_CMD
void GDBDebugServer::on_exit()
{
if (server_socket) {
closesocket(server_socket);
}
if (client_socket) {
closesocket(client_socket);
}
sock_quit();
}
std::string GDBDebugServer::get_name() const
{
return "GDBDebugger";
}
void GDBDebugServer::on_stop()
{
this->stop = true;
//just in case we are waiting for breakpoint
this->notify();
named_thread::on_stop();
}
u32 g_gdb_debugger_id = 0;
#ifndef _WIN32
#undef sscanf_s
#endif
#undef HEX_U32
#undef HEX_U64
#endif
+131
View File
@@ -0,0 +1,131 @@
#pragma once
#ifdef WITH_GDB_DEBUGGER
#include "Thread.h"
#include <Emu/IdManager.h>
#include "Emu/CPU/CPUThread.h"
#include "Emu/Cell/PPUThread.h"
#ifdef _WIN32
#include <winsock2.h>
#include <WS2tcpip.h>
#else
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <unistd.h>
#endif
#ifdef _WIN32
using socket_t = SOCKET;
#else
using socket_t = int;
#endif
typedef struct gdb_cmd {
std::string cmd;
std::string data;
u8 checksum;
} gdb_cmd;
class wrong_checksum_exception : public std::runtime_error {
public:
wrong_checksum_exception(char const* const message) : runtime_error(message) {}
};
const u64 ALL_THREADS = 0xffffffffffffffff;
const u64 ANY_THREAD = 0;
class GDBDebugServer : public named_thread {
socket_t server_socket;
socket_t client_socket;
std::weak_ptr<cpu_thread> selected_thread;
u64 continue_ops_thread_id = ANY_THREAD;
u64 general_ops_thread_id = ANY_THREAD;
//initialize server socket and start listening
void start_server();
//read at most cnt bytes to buf, returns nubmer of bytes actually read
int read(void* buf, int cnt);
//reads one character
char read_char();
//reads pairs of hex characters and returns their integer value
u8 read_hexbyte();
//tries to read command, throws exceptions if anything goes wrong
void try_read_cmd(gdb_cmd& out_cmd);
//reads commands until receiveing one with valid checksum
//in case of other exception (i.e. wrong first char of command)
//it will log exception text and return false
//in that case best for caller would be to stop reading, because
//chance of getting correct command is low
bool read_cmd(gdb_cmd& out_cmd);
//send cnt bytes from buf to client
void send(const char* buf, int cnt);
//send character to client
void send_char(char c);
//acknowledge packet, either as accepted or declined
void ack(bool accepted);
//sends command body cmd to client
void send_cmd(const std::string & cmd);
//sends command to client until receives positive acknowledgement
//returns false in case some error happened, and command wasn't sent
bool send_cmd_ack(const std::string & cmd);
//appends encoded char c to string str, and returns checksum. encoded byte can occupy 2 bytes
static u8 append_encoded_char(char c, std::string& str);
//convert u8 to 2 byte hexademical representation
static std::string to_hexbyte(u8 i);
//choose thread, support ALL_THREADS and ANY_THREAD values, returns true if some thread was selected
bool select_thread(u64 id);
//returns register value as hex string by register id (in gdb), in case of wrong id returns empty string
static std::string get_reg(std::shared_ptr<ppu_thread> thread, u32 rid);
//sets register value to hex string by register id (in gdb), in case of wrong id returns false
static bool set_reg(std::shared_ptr<ppu_thread> thread, u32 rid, std::string value);
//returns size of register with id rid in bytes, zero if invalid rid is provided
static u32 get_reg_size(std::shared_ptr<ppu_thread> thread, u32 rid);
//send reason of stop, returns false if sending response failed
bool send_reason();
//commands
bool cmd_extended_mode(gdb_cmd& cmd);
bool cmd_reason(gdb_cmd& cmd);
bool cmd_supported(gdb_cmd& cmd);
bool cmd_thread_info(gdb_cmd& cmd);
bool cmd_current_thread(gdb_cmd& cmd);
bool cmd_read_register(gdb_cmd& cmd);
bool cmd_write_register(gdb_cmd& cmd);
bool cmd_read_memory(gdb_cmd& cmd);
bool cmd_write_memory(gdb_cmd& cmd);
bool cmd_read_all_registers(gdb_cmd& cmd);
bool cmd_write_all_registers(gdb_cmd& cmd);
bool cmd_set_thread_ops(gdb_cmd& cmd);
bool cmd_attached_to_what(gdb_cmd& cmd);
bool cmd_kill(gdb_cmd& cmd);
bool cmd_continue_support(gdb_cmd& cmd);
bool cmd_vcont(gdb_cmd& cmd);
bool cmd_set_breakpoint(gdb_cmd& cmd);
bool cmd_remove_breakpoint(gdb_cmd& cmd);
protected:
void on_task() override final;
void on_exit() override final;
public:
static const u32 id_base = 1;
static const u32 id_step = 1;
static const u32 id_count = 0x100000;
bool from_breakpoint = true;
bool stop = false;
virtual std::string get_name() const;
virtual void on_stop() override final;
};
extern u32 g_gdb_debugger_id;
#endif
+313 -251
View File
@@ -5,11 +5,14 @@
#include <unordered_set>
#include <set>
#include <array>
#include <deque>
#include "types.h"
#include "StrFmt.h"
#include "File.h"
#include "Log.h"
#include "mutex.h"
#include "VirtualMemory.h"
#ifdef _MSC_VER
#pragma warning(push, 0)
@@ -19,24 +22,19 @@
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/ObjectCache.h"
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#ifdef _WIN32
#include <Windows.h>
#else
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#endif
#include "JIT.h"
// Global LLVM context (thread-unsafe)
llvm::LLVMContext g_llvm_ctx;
// Memory manager mutex
shared_mutex s_mutex;
// Size of virtual memory area reserved: 512 MB
static const u64 s_memory_size = 0x20000000;
@@ -44,38 +42,59 @@ static const u64 s_memory_size = 0x20000000;
// Try to reserve a portion of virtual memory in the first 2 GB address space beforehand, if possible.
static void* const s_memory = []() -> void*
{
#ifdef _WIN32
for (u64 addr = 0x10000000; addr <= 0x60000000; addr += 0x1000000)
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
LLVMLinkInMCJIT();
for (u64 addr = 0x10000000; addr <= 0x80000000 - s_memory_size; addr += 0x1000000)
{
if (VirtualAlloc((void*)addr, s_memory_size, MEM_RESERVE, PAGE_NOACCESS))
if (auto ptr = utils::memory_reserve(s_memory_size, (void*)addr))
{
return (void*)addr;
return ptr;
}
}
return VirtualAlloc(NULL, s_memory_size, MEM_RESERVE, PAGE_NOACCESS);
#else
return ::mmap((void*)0x10000000, s_memory_size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
#endif
return utils::memory_reserve(s_memory_size);
}();
// Code section
static u8* s_code_addr;
static u64 s_code_size;
// EH frames
static u8* s_unwind_info;
static u64 s_unwind_size;
static void* s_next = s_memory;
#ifdef _WIN32
static std::deque<std::vector<RUNTIME_FUNCTION>> s_unwater;
static std::vector<std::vector<RUNTIME_FUNCTION>> s_unwind; // .pdata
#endif
// Reset memory manager
extern void jit_finalize()
{
#ifdef _WIN32
for (auto&& unwind : s_unwind)
{
if (!RtlDeleteFunctionTable(unwind.data()))
{
LOG_FATAL(GENERAL, "RtlDeleteFunctionTable() failed! Error %u", GetLastError());
}
}
s_unwind.clear();
#else
// TODO: unregister EH frames if necessary
#endif
utils::memory_decommit(s_memory, s_memory_size);
s_next = s_memory;
}
// Helper class
struct MemoryManager final : llvm::RTDyldMemoryManager
struct MemoryManager : llvm::RTDyldMemoryManager
{
std::unordered_map<std::string, std::uintptr_t>& m_link;
std::array<u8, 16>* m_tramps{};
u8* m_code_addr{}; // TODO
MemoryManager(std::unordered_map<std::string, std::uintptr_t>& table)
: m_link(table)
{
@@ -86,31 +105,70 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
fmt::throw_exception("Null function" HERE);
}
virtual u64 getSymbolAddress(const std::string& name) override
llvm::JITSymbol findSymbol(const std::string& name) override
{
const auto found = m_link.find(name);
auto& addr = m_link[name];
if (found != m_link.end())
// Find function address
if (!addr)
{
return found->second;
addr = RTDyldMemoryManager::getSymbolAddress(name);
if (addr)
{
LOG_WARNING(GENERAL, "LLVM: Symbol requested: %s -> 0x%016llx", name, addr);
}
else
{
LOG_ERROR(GENERAL, "LLVM: Linkage failed: %s", name);
addr = (u64)null;
}
}
if (u64 addr = RTDyldMemoryManager::getSymbolAddress(name))
// Verify address for small code model
if ((u64)s_memory > 0x80000000 - s_memory_size ? (u64)addr - (u64)s_memory >= s_memory_size : addr >= 0x80000000)
{
// This may be bad if LLVM requests some built-in functions like fma.
LOG_ERROR(GENERAL, "LLVM: Symbol requested: %s -> 0x%016llx", name, addr);
return addr;
// Lock memory manager
writer_lock lock(s_mutex);
// Allocate memory for trampolines
if (!m_tramps)
{
m_tramps = reinterpret_cast<decltype(m_tramps)>(s_next);
utils::memory_commit(s_next, 4096, utils::protection::wx);
s_next = (u8*)((u64)s_next + 4096);
}
// Create a trampoline
auto& data = *m_tramps++;
data[0x0] = 0xff; // JMP [rip+2]
data[0x1] = 0x25;
data[0x2] = 0x02;
data[0x3] = 0x00;
data[0x4] = 0x00;
data[0x5] = 0x00;
data[0x6] = 0x48; // MOV rax, imm64 (not executed)
data[0x7] = 0xb8;
std::memcpy(data.data() + 8, &addr, 8);
addr = (u64)&data;
// Reset pointer (memory page exhausted)
if (((u64)m_tramps % 4096) == 0)
{
m_tramps = nullptr;
}
}
// It's fine if some function is never called, for example.
LOG_ERROR(GENERAL, "LLVM: Symbol not found: %s", name);
return (u64)null;
return {addr, llvm::JITSymbolFlags::Exported};
}
virtual u8* allocateCodeSection(std::uintptr_t size, uint align, uint sec_id, llvm::StringRef sec_name) override
{
// Lock memory manager
writer_lock lock(s_mutex);
// Simple allocation
const u64 next = ::align((u64)m_next + size, 4096);
const u64 next = ::align((u64)s_next + size, 4096);
if (next > (u64)s_memory + s_memory_size)
{
@@ -118,27 +176,20 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
return nullptr;
}
#ifdef _WIN32
if (!VirtualAlloc(m_next, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE))
#else
if (::mprotect(m_next, size, PROT_READ | PROT_WRITE | PROT_EXEC))
#endif
{
LOG_FATAL(GENERAL, "LLVM: Failed to allocate memory at %p", m_next);
return nullptr;
}
utils::memory_commit(s_next, size, utils::protection::wx);
m_code_addr = (u8*)s_next;
s_code_addr = (u8*)m_next;
s_code_size = size;
LOG_NOTICE(GENERAL, "LLVM: Code section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x)", sec_id, sec_name.data(), m_next, size, align);
return (u8*)std::exchange(m_next, (void*)next);
LOG_NOTICE(GENERAL, "LLVM: Code section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x)", sec_id, sec_name.data(), s_next, size, align);
return (u8*)std::exchange(s_next, (void*)next);
}
virtual u8* allocateDataSection(std::uintptr_t size, uint align, uint sec_id, llvm::StringRef sec_name, bool is_ro) override
{
// Lock memory manager
writer_lock lock(s_mutex);
// Simple allocation
const u64 next = ::align((u64)m_next + size, 4096);
const u64 next = ::align((u64)s_next + size, 4096);
if (next > (u64)s_memory + s_memory_size)
{
@@ -151,22 +202,17 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
LOG_ERROR(GENERAL, "LLVM: Writeable data section not supported!");
}
#ifdef _WIN32
if (!VirtualAlloc(m_next, size, MEM_COMMIT, PAGE_READWRITE))
#else
if (::mprotect(m_next, size, PROT_READ | PROT_WRITE))
#endif
{
LOG_FATAL(GENERAL, "LLVM: Failed to allocate memory at %p", m_next);
return nullptr;
}
utils::memory_commit(s_next, size);
LOG_NOTICE(GENERAL, "LLVM: Data section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x, %s)", sec_id, sec_name.data(), m_next, size, align, is_ro ? "ro" : "rw");
return (u8*)std::exchange(m_next, (void*)next);
LOG_NOTICE(GENERAL, "LLVM: Data section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x, %s)", sec_id, sec_name.data(), s_next, size, align, is_ro ? "ro" : "rw");
return (u8*)std::exchange(s_next, (void*)next);
}
virtual bool finalizeMemory(std::string* = nullptr) override
{
// Lock memory manager
writer_lock lock(s_mutex);
// TODO: make only read-only sections read-only
//#ifdef _WIN32
// DWORD op;
@@ -181,230 +227,246 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
virtual void registerEHFrames(u8* addr, u64 load_addr, std::size_t size) override
{
s_unwind_info = addr;
s_unwind_size = size;
#ifdef _WIN32
// Lock memory manager
writer_lock lock(s_mutex);
// Use s_memory as a BASE, compute the difference
const u64 unwind_diff = (u64)addr - (u64)s_memory;
// Fix RUNTIME_FUNCTION records (.pdata section)
auto pdata = std::move(s_unwater.front());
s_unwater.pop_front();
for (auto& rf : pdata)
{
rf.UnwindData += static_cast<DWORD>(unwind_diff);
}
// Register .xdata UNWIND_INFO structs
if (!RtlAddFunctionTable(pdata.data(), (DWORD)pdata.size(), (u64)s_memory))
{
LOG_ERROR(GENERAL, "RtlAddFunctionTable() failed! Error %u", GetLastError());
}
else
{
s_unwind.emplace_back(std::move(pdata));
}
#endif
return RTDyldMemoryManager::registerEHFrames(addr, load_addr, size);
}
virtual void deregisterEHFrames(u8* addr, u64 load_addr, std::size_t size) override
virtual void deregisterEHFrames() override
{
LOG_ERROR(GENERAL, "deregisterEHFrames() called"); // Not expected
return RTDyldMemoryManager::deregisterEHFrames(addr, load_addr, size);
return RTDyldMemoryManager::deregisterEHFrames();
}
~MemoryManager()
{
#ifdef _WIN32
for (auto&& unwind : s_unwind)
{
if (!RtlDeleteFunctionTable(unwind.data()))
{
LOG_FATAL(GENERAL, "RtlDeleteFunctionTable() failed! Error %u", GetLastError());
}
}
s_unwind.clear();
if (!VirtualFree(s_memory, 0, MEM_DECOMMIT))
{
LOG_FATAL(GENERAL, "VirtualFree(%p) failed! Error %u", s_memory, GetLastError());
}
#else
if (!::mmap(s_memory, s_memory_size, PROT_NONE, MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0))
{
LOG_FATAL(GENERAL, "mmap(%p) failed! Error %d", s_memory, errno);
}
// TODO: unregister EH frames if necessary
#endif
}
private:
void* m_next = s_memory;
};
// Helper class
struct EventListener final : llvm::JITEventListener
struct EventListener : llvm::JITEventListener
{
std::string path;
MemoryManager& m_mem;
EventListener(MemoryManager& mem)
: m_mem(mem)
{
}
virtual void NotifyObjectEmitted(const llvm::object::ObjectFile& obj, const llvm::RuntimeDyld::LoadedObjectInfo& inf) override
{
if (!path.empty())
#ifdef _WIN32
for (auto it = obj.section_begin(), end = obj.section_end(); it != end; ++it)
{
const llvm::StringRef elf = obj.getData();
fs::file(path, fs::rewrite).write(elf.data(), elf.size());
llvm::StringRef name;
it->getName(name);
if (name == ".pdata")
{
llvm::StringRef data;
it->getContents(data);
std::vector<RUNTIME_FUNCTION> rfs(data.size() / sizeof(RUNTIME_FUNCTION));
auto offsets = reinterpret_cast<DWORD*>(rfs.data());
// Initialize .pdata section using relocation info
for (auto ri = it->relocation_begin(), end = it->relocation_end(); ri != end; ++ri)
{
if (ri->getType() == 3 /*R_X86_64_GOT32*/)
{
const u64 value = *reinterpret_cast<const DWORD*>(data.data() + ri->getOffset());
offsets[ri->getOffset() / sizeof(DWORD)] = static_cast<DWORD>(value + ri->getSymbol()->getAddress().get());
}
}
// Lock memory manager
writer_lock lock(s_mutex);
// Use s_memory as a BASE, compute the difference
const u64 code_diff = (u64)m_mem.m_code_addr - (u64)s_memory;
// Fix RUNTIME_FUNCTION records (.pdata section)
for (auto& rf : rfs)
{
rf.BeginAddress += static_cast<DWORD>(code_diff);
rf.EndAddress += static_cast<DWORD>(code_diff);
}
s_unwater.emplace_back(std::move(rfs));
}
}
#endif
}
};
// Helper class
class ObjectCache final : public llvm::ObjectCache
{
const std::string& m_path;
public:
ObjectCache(const std::string& path)
: m_path(path)
{
}
~ObjectCache() override = default;
void notifyObjectCompiled(const llvm::Module* module, llvm::MemoryBufferRef obj) override
{
std::string name = m_path;
name.append(module->getName());
fs::file(name, fs::rewrite).write(obj.getBufferStart(), obj.getBufferSize());
LOG_SUCCESS(GENERAL, "LLVM: Created module: %s", module->getName().data());
}
std::unique_ptr<llvm::MemoryBuffer> getObject(const llvm::Module* module) override
{
std::string name = m_path;
name.append(module->getName());
if (fs::file cached{name, fs::read})
{
auto buf = llvm::MemoryBuffer::getNewUninitMemBuffer(cached.size());
cached.read(const_cast<char*>(buf->getBufferStart()), buf->getBufferSize());
LOG_SUCCESS(GENERAL, "LLVM: Loaded module: %s", module->getName().data());
return buf;
}
else
{
return nullptr;
}
}
};
static EventListener s_listener;
static void dummy()
jit_compiler::jit_compiler(const std::unordered_map<std::string, std::uintptr_t>& _link, std::string _cpu)
: m_link(std::move(_link))
, m_cpu(std::move(_cpu))
{
}
jit_compiler::jit_compiler(std::unordered_map<std::string, std::uintptr_t> init_linkage_info)
: m_link(std::move(init_linkage_info))
{
#ifdef _MSC_VER
m_link.emplace("__chkstk", (u64)&dummy);
#endif
verify(HERE), s_memory;
// Initialization
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
LLVMLinkInMCJIT();
m_cpu = llvm::sys::getHostCPUName();
if (m_cpu == "skylake")
if (m_cpu.empty())
{
m_cpu = "haswell";
m_cpu = llvm::sys::getHostCPUName();
}
std::string result;
m_engine.reset(llvm::EngineBuilder(std::make_unique<llvm::Module>("", g_llvm_ctx))
.setErrorStr(&result)
.setMCJITMemoryManager(std::make_unique<MemoryManager>(m_link))
.setOptLevel(llvm::CodeGenOpt::Aggressive)
.setCodeModel((u64)s_memory <= 0x60000000 ? llvm::CodeModel::Small : llvm::CodeModel::Large) // TODO
.setMCPU(m_cpu)
.create());
if (m_link.empty())
{
// Auxiliary JIT (does not use custom memory manager, only writes the objects)
m_engine.reset(llvm::EngineBuilder(std::make_unique<llvm::Module>("null_", m_context))
.setErrorStr(&result)
.setOptLevel(llvm::CodeGenOpt::Aggressive)
.setCodeModel(llvm::CodeModel::Small)
.setMCPU(m_cpu)
.create());
}
else
{
// Primary JIT
auto mem = std::make_unique<MemoryManager>(m_link);
m_jit_el = std::make_unique<EventListener>(*mem);
m_engine.reset(llvm::EngineBuilder(std::make_unique<llvm::Module>("null", m_context))
.setErrorStr(&result)
.setMCJITMemoryManager(std::move(mem))
.setOptLevel(llvm::CodeGenOpt::Aggressive)
.setCodeModel(llvm::CodeModel::Small)
.setMCPU(m_cpu)
.create());
if (m_engine)
{
m_engine->RegisterJITEventListener(m_jit_el.get());
}
}
if (!m_engine)
{
fmt::throw_exception("LLVM: Failed to create ExecutionEngine: %s", result);
}
m_engine->setProcessAllSections(true); // ???
m_engine->RegisterJITEventListener(&s_listener);
}
void jit_compiler::load(std::unique_ptr<llvm::Module> module, std::unique_ptr<llvm::object::ObjectFile> object)
{
s_listener.path.clear();
auto* module_ptr = module.get();
m_engine->addModule(std::move(module));
m_engine->addObjectFile(std::move(object));
m_engine->finalizeObject();
m_map.clear();
for (auto& func : module_ptr->functions())
{
const std::string& name = func.getName();
if (!m_link.count(name))
{
// Register compiled function
m_map[name] = m_engine->getFunctionAddress(name);
}
}
init();
}
void jit_compiler::make(std::unique_ptr<llvm::Module> module, std::string path)
{
s_listener.path = std::move(path);
auto* module_ptr = module.get();
m_engine->addModule(std::move(module));
m_engine->finalizeObject();
m_map.clear();
for (auto& func : module_ptr->functions())
{
if (!func.empty())
{
const std::string& name = func.getName();
// Register compiled function
m_map[name] = m_engine->getFunctionAddress(name);
}
// Delete IR to lower memory consumption
func.deleteBody();
}
init();
}
void jit_compiler::init()
{
#ifdef _WIN32
// Register .xdata UNWIND_INFO (.pdata section is empty for some reason)
std::set<u64> func_set;
for (const auto& pair : m_map)
{
func_set.emplace(pair.second);
}
const u64 base = (u64)s_memory;
const u8* bits = s_unwind_info;
std::vector<RUNTIME_FUNCTION> unwind;
unwind.reserve(m_map.size());
for (const u64 addr : func_set)
{
// Find next function address
const auto _next = func_set.upper_bound(addr);
const u64 next = _next != func_set.end() ? *_next : (u64)s_code_addr + s_code_size;
// Generate RUNTIME_FUNCTION record
RUNTIME_FUNCTION uw;
uw.BeginAddress = static_cast<u32>(addr - base);
uw.EndAddress = static_cast<u32>(next - base);
uw.UnwindData = static_cast<u32>((u64)bits - base);
unwind.emplace_back(uw);
// Parse .xdata UNWIND_INFO record
const u8 flags = *bits++; // Version and flags
const u8 prolog = *bits++; // Size of prolog
const u8 count = *bits++; // Count of unwind codes
const u8 frame = *bits++; // Frame Reg + Off
bits += ::align(std::max<u8>(1, count), 2) * sizeof(u16); // UNWIND_CODE array
if (flags != 1)
{
// Can't happen for trivial code
LOG_ERROR(GENERAL, "LLVM: unsupported UNWIND_INFO version/flags (0x%02x)", flags);
break;
}
LOG_TRACE(GENERAL, "LLVM: .xdata at 0x%llx: function 0x%x..0x%x: p0x%02x, c0x%02x, f0x%02x", uw.UnwindData + base, uw.BeginAddress + base, uw.EndAddress + base, prolog, count, frame);
}
if (s_unwind_info + s_unwind_size != bits)
{
LOG_ERROR(GENERAL, "LLVM: .xdata analysis failed! (%p != %p)", s_unwind_info + s_unwind_size, bits);
}
else if (!RtlAddFunctionTable(unwind.data(), (DWORD)unwind.size(), base))
{
LOG_ERROR(GENERAL, "RtlAddFunctionTable(%p) failed! Error %u", s_unwind_info, GetLastError());
}
else
{
LOG_NOTICE(GENERAL, "LLVM: UNWIND_INFO registered (%p, size=0x%llx)", s_unwind_info, s_unwind_size);
}
s_unwind.emplace_back(std::move(unwind));
#endif
}
jit_compiler::~jit_compiler()
{
}
void jit_compiler::add(std::unique_ptr<llvm::Module> module, const std::string& path)
{
ObjectCache cache{path};
m_engine->setObjectCache(&cache);
const auto ptr = module.get();
m_engine->addModule(std::move(module));
m_engine->generateCodeForModule(ptr);
m_engine->setObjectCache(nullptr);
for (auto& func : ptr->functions())
{
// Delete IR to lower memory consumption
func.deleteBody();
}
}
void jit_compiler::fin()
{
m_engine->finalizeObject();
}
u64 jit_compiler::get(const std::string& name)
{
return m_engine->getGlobalValueAddress(name);
}
std::unordered_map<std::string, u64> jit_compiler::add(std::unordered_map<std::string, std::string> data)
{
// Lock memory manager
writer_lock lock(s_mutex);
std::unordered_map<std::string, u64> result;
std::size_t size = 0;
for (auto&& pair : data)
{
size += ::align(pair.second.size(), 16);
}
utils::memory_commit(s_next, size, utils::protection::wx);
std::memset(s_next, 0xc3, ::align(size, 4096));
for (auto&& pair : data)
{
std::memcpy(s_next, pair.second.data(), pair.second.size());
result.emplace(pair.first, (u64)s_next);
s_next = (void*)::align((u64)s_next + pair.second.size(), 16);
}
s_next = (void*)::align((u64)s_next, 4096);
return result;
}
#endif
+29 -25
View File
@@ -7,6 +7,7 @@
#include <unordered_map>
#include "types.h"
#include "mutex.h"
#include "restore_new.h"
#ifdef _MSC_VER
@@ -20,54 +21,57 @@
#endif
#include "define_new_memleakdetect.h"
extern llvm::LLVMContext g_llvm_ctx;
// Temporary compiler interface
class jit_compiler final
{
// Local LLVM context
llvm::LLVMContext m_context;
// JIT Event Listener
std::unique_ptr<struct EventListener> m_jit_el;
// Execution instance
std::unique_ptr<llvm::ExecutionEngine> m_engine;
// Compiled functions
std::unordered_map<std::string, std::uintptr_t> m_map;
// Linkage cache
std::unordered_map<std::string, std::uintptr_t> m_link;
// Link table
std::unordered_map<std::string, u64> m_link;
// Arch
std::string m_cpu;
// Internal
void init();
public:
jit_compiler(std::unordered_map<std::string, std::uintptr_t>);
jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string _cpu);
~jit_compiler();
// Compile module
void make(std::unique_ptr<llvm::Module>, std::string);
// Get LLVM context
auto& get_context()
{
return m_context;
}
// Load object
void load(std::unique_ptr<llvm::Module>, std::unique_ptr<llvm::object::ObjectFile>);
// Add module
void add(std::unique_ptr<llvm::Module> module, const std::string& path);
// Finalize
void fin();
// Get compiled function address
std::uintptr_t get(const std::string& name) const
{
const auto found = m_map.find(name);
if (found != m_map.end())
{
return found->second;
}
u64 get(const std::string& name);
return 0;
}
// Add functions directly to the memory manager (name -> code)
static std::unordered_map<std::string, u64> add(std::unordered_map<std::string, std::string>);
// Get CPU info
const std::string& cpu() const
{
return m_cpu;
}
// Check JIT purpose
bool is_primary() const
{
return !m_link.empty();
}
};
#endif
+83 -11
View File
@@ -1,9 +1,11 @@
#include "Log.h"
#include "File.h"
#include "StrFmt.h"
#include "sema.h"
#include "rpcs3_version.h"
#include <string>
#include <unordered_map>
#ifdef _WIN32
#include <Windows.h>
@@ -11,8 +13,13 @@
#include <chrono>
#endif
static std::string empty_string()
{
return {};
}
// Thread-specific log prefix provider
thread_local std::string(*g_tls_log_prefix)() = nullptr;
thread_local std::string(*g_tls_log_prefix)() = &empty_string;
template<>
void fmt_class_string<logs::level>::format(std::string& out, u64 arg)
@@ -105,14 +112,53 @@ namespace logs
return timebase.get();
}
channel GENERAL(nullptr, level::notice);
channel LOADER("LDR", level::notice);
channel MEMORY("MEM", level::notice);
channel RSX("RSX", level::notice);
channel HLE("HLE", level::notice);
channel PPU("PPU", level::notice);
channel SPU("SPU", level::notice);
channel GENERAL("");
channel LOADER("LDR");
channel MEMORY("MEM");
channel RSX("RSX");
channel HLE("HLE");
channel PPU("PPU");
channel SPU("SPU");
channel ARMv7("ARMv7");
struct channel_info
{
channel* pointer = nullptr;
level enabled = level::notice;
void set_level(level value)
{
enabled = value;
if (pointer)
{
pointer->enabled = value;
}
}
};
// Channel registry mutex
semaphore<> g_mutex;
// Channel registry
std::unordered_map<std::string, channel_info> g_channels;
void reset()
{
semaphore_lock lock(g_mutex);
for (auto&& pair : g_channels)
{
pair.second.set_level(level::notice);
}
}
void set_level(const std::string& ch_name, level value)
{
semaphore_lock lock(g_mutex);
g_channels[ch_name].set_level(value);
}
}
logs::listener::~listener()
@@ -136,8 +182,34 @@ void logs::message::broadcast(const char* fmt, const fmt_type_info* sup, const u
// Get timestamp
const u64 stamp = get_stamp();
std::string text; fmt::raw_append(text, fmt, sup, args);
std::string prefix(g_tls_log_prefix ? g_tls_log_prefix() : "");
// Register channel
if (ch->enabled == level::_uninit)
{
semaphore_lock lock(g_mutex);
auto& info = g_channels[ch->name];
if (info.pointer && info.pointer != ch)
{
fmt::throw_exception("logs::channel repetition: %s", ch->name);
}
else if (!info.pointer)
{
info.pointer = ch;
ch->enabled = info.enabled;
// Check level again
if (info.enabled < sev)
{
return;
}
}
}
// Get text
std::string text;
fmt::raw_append(text, fmt, sup, args);
std::string prefix = g_tls_log_prefix();
// Get first (main) listener
listener* lis = get_logger();
@@ -203,7 +275,7 @@ void logs::file_listener::log(u64 stamp, const logs::message& msg, const std::st
text += "} ";
}
if (msg.ch->name)
if ('\0' != *msg.ch->name)
{
text += msg.ch->name;
text += msg.sev == level::todo ? " TODO: " : ": ";
+17 -8
View File
@@ -3,19 +3,22 @@
#include "types.h"
#include "Atomic.h"
#include "StrFmt.h"
#include <climits>
namespace logs
{
enum class level : uint
{
always, // highest level (unused, cannot be disabled)
always, // Highest log severity (unused, cannot be disabled)
fatal,
error,
todo,
success,
warning,
notice,
trace, // lowest level (usually disabled)
trace, // Lowest severity (usually disabled)
_uninit = UINT_MAX, // Special value for delayed initialization
};
struct channel;
@@ -23,7 +26,7 @@ namespace logs
// Message information (temporary data)
struct message
{
const channel* ch;
channel* ch;
level sev;
// Send log message to global logger instance
@@ -57,16 +60,16 @@ namespace logs
// The lowest logging level enabled for this channel (used for early filtering)
atomic_t<level> enabled;
// Constant initialization: name and initial log level
constexpr channel(const char* name, level enabled = level::trace)
// Constant initialization: channel name
constexpr channel(const char* name)
: name(name)
, enabled(enabled)
, enabled(level::_uninit)
{
}
// Formatting function
template<typename... Args>
SAFE_BUFFERS FORCE_INLINE void format(level sev, const char* fmt, const Args&... args) const
SAFE_BUFFERS FORCE_INLINE void format(level sev, const char* fmt, const Args&... args)
{
if (UNLIKELY(sev <= enabled))
{
@@ -76,7 +79,7 @@ namespace logs
#define GEN_LOG_METHOD(_sev)\
template<typename... Args>\
SAFE_BUFFERS void _sev(const char* fmt, const Args&... args) const\
SAFE_BUFFERS void _sev(const char* fmt, const Args&... args)\
{\
return format<Args...>(level::_sev, fmt, args...);\
}
@@ -102,6 +105,12 @@ namespace logs
extern channel PPU;
extern channel SPU;
extern channel ARMv7;
// Log level control: set all channels to level::notice
void reset();
// Log level control: register channel if necessary, set channel level
void set_level(const std::string&, level);
}
// Legacy:
+9
View File
@@ -286,6 +286,15 @@ struct fmt::cfmt_src
return 0;
}
static constexpr std::size_t size_char = 1;
static constexpr std::size_t size_short = 2;
static constexpr std::size_t size_int = 0;
static constexpr std::size_t size_long = sizeof(ulong);
static constexpr std::size_t size_llong = sizeof(ullong);
static constexpr std::size_t size_size = sizeof(std::size_t);
static constexpr std::size_t size_max = sizeof(std::uintmax_t);
static constexpr std::size_t size_diff = sizeof(std::ptrdiff_t);
};
void fmt::raw_append(std::string& out, const char* fmt, const fmt_type_info* sup, const u64* args) noexcept
+31 -5
View File
@@ -15,7 +15,7 @@ namespace fmt
template <typename T, typename>
struct fmt_unveil
{
static_assert(sizeof(T) > 0, "fmt_unveil<>: cannot pass forward-declared object");
static_assert(sizeof(T) > 0, "fmt_unveil<> error: incomplete type");
using type = T;
@@ -59,13 +59,24 @@ struct fmt_unveil<T, std::enable_if_t<std::is_floating_point<T>::value && sizeof
{
using type = T;
// Convert FP to f64 and reinterpret (TODO?)
static inline u64 get(const f64 arg)
// Convert FP to f64 and reinterpret as u64
static inline u64 get(const f64& arg)
{
return *reinterpret_cast<const u64*>(reinterpret_cast<const u8*>(&arg));
}
};
template <>
struct fmt_unveil<f16, void>
{
using type = f16;
static inline u64 get(const f16& arg)
{
return fmt_unveil<f64>::get(arg.operator float());
}
};
template <typename T>
struct fmt_unveil<T, std::enable_if_t<std::is_enum<T>::value>>
{
@@ -126,15 +137,27 @@ struct fmt_class_string
return *reinterpret_cast<const T*>(static_cast<std::uintptr_t>(arg));
}
// Enum -> string function type
using convert_t = const char*(*)(T value);
// Enum -> string function registered
static convert_t convert_enum;
// Helper function (safely converts arg to enum value)
static SAFE_BUFFERS FORCE_INLINE void format_enum(std::string& out, u64 arg, const char* (*get)(T value))
static SAFE_BUFFERS FORCE_INLINE void format_enum(std::string& out, u64 arg, convert_t convert)
{
// Save convert function
if (convert_enum == nullptr)
{
convert_enum = convert;
}
const auto value = static_cast<std::underlying_type_t<T>>(arg);
// Check narrowing
if (static_cast<u64>(value) == arg)
{
if (const char* str = get(static_cast<T>(value)))
if (const char* str = convert(static_cast<T>(value)))
{
out += str;
return;
@@ -180,6 +203,9 @@ struct fmt_class_string
static constexpr const char* unknown = nullptr;
};
template <typename T, typename V>
const char*(*fmt_class_string<T, V>::convert_enum)(T) = nullptr;
template <>
struct fmt_class_string<const void*, void>
{
+169 -8
View File
@@ -756,6 +756,90 @@ uint64_t* darwin_x64reg(x64_context *context, int reg)
}
}
#elif defined(__DragonFly__) || defined(__FreeBSD__)
#define X64REG(context, reg) (freebsd_x64reg(context, reg))
#ifdef __DragonFly__
# define XMMREG(context, reg) (reinterpret_cast<v128*>(((union savefpu*)(context)->uc_mcontext.mc_fpregs)->sv_xmm.sv_xmm[reg]))
#else
# define XMMREG(context, reg) (reinterpret_cast<v128*>(((struct savefpu*)(context)->uc_mcontext.mc_fpstate)->sv_xmm[reg]))
#endif
#define EFLAGS(context) ((context)->uc_mcontext.mc_rflags)
register_t* freebsd_x64reg(x64_context *context, int reg)
{
auto *state = &context->uc_mcontext;
switch(reg)
{
case 0: return &state->mc_rax;
case 1: return &state->mc_rcx;
case 2: return &state->mc_rdx;
case 3: return &state->mc_rbx;
case 4: return &state->mc_rsp;
case 5: return &state->mc_rbp;
case 6: return &state->mc_rsi;
case 7: return &state->mc_rdi;
case 8: return &state->mc_r8;
case 9: return &state->mc_r9;
case 10: return &state->mc_r10;
case 11: return &state->mc_r11;
case 12: return &state->mc_r12;
case 13: return &state->mc_r13;
case 14: return &state->mc_r14;
case 15: return &state->mc_r15;
case 16: return &state->mc_rip;
default:
LOG_ERROR(GENERAL, "Invalid register index: %d", reg);
return nullptr;
}
}
#elif defined(__OpenBSD__)
#define X64REG(context, reg) (openbsd_x64reg(context, reg))
#define XMMREG(context, reg) (reinterpret_cast<v128*>((context)->sc_fpstate->fx_xmm[reg]))
#define EFLAGS(context) ((context)->sc_rflags)
long* openbsd_x64reg(x64_context *context, int reg)
{
auto *state = &context->uc_mcontext;
switch(reg)
{
case 0: return &state->sc_rax;
case 1: return &state->sc_rcx;
case 2: return &state->sc_rdx;
case 3: return &state->sc_rbx;
case 4: return &state->sc_rsp;
case 5: return &state->sc_rbp;
case 6: return &state->sc_rsi;
case 7: return &state->sc_rdi;
case 8: return &state->sc_r8;
case 9: return &state->sc_r9;
case 10: return &state->sc_r10;
case 11: return &state->sc_r11;
case 12: return &state->sc_r12;
case 13: return &state->sc_r13;
case 14: return &state->sc_r14;
case 15: return &state->sc_r15;
case 16: return &state->sc_rip;
default:
LOG_ERROR(GENERAL, "Invalid register index: %d", reg);
return nullptr;
}
}
#elif defined(__NetBSD__)
static const decltype(_REG_RAX) reg_table[] =
{
_REG_RAX, _REG_RCX, _REG_RDX, _REG_RBX, _REG_RSP, _REG_RBP, _REG_RSI, _REG_RDI,
_REG_R8, _REG_R9, _REG_R10, _REG_R11, _REG_R12, _REG_R13, _REG_R14, _REG_R15, _REG_RIP
};
#define X64REG(context, reg) (&(context)->uc_mcontext.__gregs[reg_table[reg]])
#define XMM_sig(context, reg) (reinterpret_cast<v128*>(((struct fxsave64*)(context)->uc_mcontext.__fpregs)->fx_xmm[reg]))
#define EFLAGS(context) ((context)->uc_mcontext.__gregs[_REG_RFL])
#else
static const decltype(REG_RAX) reg_table[] =
@@ -765,7 +849,11 @@ static const decltype(REG_RAX) reg_table[] =
};
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
#ifdef __sun
#define XMMREG(context, reg) (reinterpret_cast<v128*>(&(context)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[reg_table[reg]]))
#else
#define XMMREG(context, reg) (reinterpret_cast<v128*>(&(context)->uc_mcontext.fpregs->_xmm[reg]))
#endif // __sun
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
#endif // __APPLE__
@@ -1003,9 +1091,17 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
{
g_tls_fault_all++;
const auto cpu = get_current_cpu_thread();
if (rsx::g_access_violation_handler && rsx::g_access_violation_handler(addr, is_writing))
{
g_tls_fault_rsx++;
if (cpu)
{
cpu->test_state();
}
return true;
}
@@ -1140,13 +1236,18 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
return true;
}
if (vm::check_addr(addr, d_size))
if (vm::check_addr(addr, std::max<std::size_t>(1, d_size)))
{
if (cpu)
{
cpu->test_state();
}
return true;
}
// TODO: allow recovering from a page fault as a feature of PS3 virtual memory
if (const auto cpu = get_current_cpu_thread())
if (cpu)
{
LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr);
cpu->state += cpu_flag::dbg_pause;
@@ -1216,7 +1317,8 @@ static bool is_leaf_function(u64 rip)
static LONG exception_handler(PEXCEPTION_POINTERS pExp)
{
const u64 addr64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::base(0);
const u64 addr64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::g_base_addr;
const u64 exec64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::g_exec_addr;
const bool is_writing = pExp->ExceptionRecord->ExceptionInformation[0] != 0;
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && addr64 < 0x100000000ull)
@@ -1227,6 +1329,14 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp)
}
}
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && exec64 < 0x100000000ull)
{
if (thread_ctrl::get_current() && handle_access_violation((u32)exec64, is_writing, pExp->ContextRecord))
{
return EXCEPTION_CONTINUE_EXECUTION;
}
}
return EXCEPTION_CONTINUE_SEARCH;
}
@@ -1236,7 +1346,6 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp)
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
{
const u64 addr64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::base(0);
const auto cause = pExp->ExceptionRecord->ExceptionInformation[0] != 0 ? "writing" : "reading";
msg += fmt::format("Segfault %s location %p at %p.\n", cause, pExp->ExceptionRecord->ExceptionInformation[1], pExp->ExceptionRecord->ExceptionAddress);
@@ -1343,11 +1452,18 @@ static void signal_handler(int sig, siginfo_t* info, void* uct)
#ifdef __APPLE__
const bool is_writing = context->uc_mcontext->__es.__err & 0x2;
#elif defined(__DragonFly__) || defined(__FreeBSD__)
const bool is_writing = context->uc_mcontext.mc_err & 0x2;
#elif defined(__OpenBSD__)
const bool is_writing = context->sc_err & 0x2;
#elif defined(__NetBSD__)
const bool is_writing = context->uc_mcontext.__gregs[_REG_ERR] & 0x2;
#else
const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
#endif
const u64 addr64 = (u64)info->si_addr - (u64)vm::base(0);
const u64 addr64 = (u64)info->si_addr - (u64)vm::g_base_addr;
const u64 exec64 = (u64)info->si_addr - (u64)vm::g_exec_addr;
const auto cause = is_writing ? "writing" : "reading";
if (addr64 < 0x100000000ull)
@@ -1359,6 +1475,14 @@ static void signal_handler(int sig, siginfo_t* info, void* uct)
}
}
if (exec64 < 0x100000000ull)
{
if (thread_ctrl::get_current() && handle_access_violation((u32)exec64, is_writing, context))
{
return;
}
}
// TODO (debugger interaction)
report_fatal_error(fmt::format("Segfault %s location %p at %p.", cause, info->si_addr, RIP(context)));
std::abort();
@@ -1434,7 +1558,7 @@ void thread_ctrl::start(const std::shared_ptr<thread_ctrl>& ctrl, task_stack tas
#endif
// TODO: this is unsafe and must be duplicated in thread_ctrl::initialize
ctrl->m_thread = thread;
ctrl->m_thread = (uintptr_t)thread;
}
void thread_ctrl::initialize()
@@ -1490,7 +1614,7 @@ void thread_ctrl::finalize(std::exception_ptr eptr) noexcept
FILETIME ctime, etime, ktime, utime;
GetThreadTimes(GetCurrentThread(), &ctime, &etime, &ktime, &utime);
const u64 time = ((ktime.dwLowDateTime | (u64)ktime.dwHighDateTime << 32) + (utime.dwLowDateTime | (u64)utime.dwHighDateTime << 32)) * 100ull;
#elif __linux__
#elif defined(RUSAGE_THREAD)
const u64 cycles = 0; // Not supported
struct ::rusage stats{};
::getrusage(RUSAGE_THREAD, &stats);
@@ -1500,6 +1624,11 @@ void thread_ctrl::finalize(std::exception_ptr eptr) noexcept
const u64 time = 0;
#endif
g_tls_log_prefix = []
{
return g_tls_this_thread->m_name;
};
LOG_NOTICE(GENERAL, "Thread time: %fs (%fGc); Faults: %u [rsx:%u, spu:%u];",
time / 1000000000.,
cycles / 1000000000.,
@@ -1618,7 +1747,7 @@ thread_ctrl::~thread_ctrl()
#ifdef _WIN32
CloseHandle((HANDLE)m_thread.raw());
#else
pthread_detach(m_thread.raw());
pthread_detach((pthread_t)m_thread.raw());
#endif
}
}
@@ -1690,6 +1819,37 @@ void thread_ctrl::test()
}
}
void thread_ctrl::set_native_priority(int priority)
{
#ifdef _WIN32
HANDLE _this_thread = GetCurrentThread();
INT native_priority = THREAD_PRIORITY_NORMAL;
switch (priority)
{
default:
case 0:
break;
case 1:
native_priority = THREAD_PRIORITY_ABOVE_NORMAL;
break;
case -1:
native_priority = THREAD_PRIORITY_BELOW_NORMAL;
break;
}
SetThreadPriority(_this_thread, native_priority);
#endif
}
void thread_ctrl::set_ideal_processor_core(int core)
{
#ifdef _WIN32
HANDLE _this_thread = GetCurrentThread();
SetThreadIdealProcessor(_this_thread, core);
#endif
}
named_thread::named_thread()
{
@@ -1715,6 +1875,7 @@ void named_thread::start_thread(const std::shared_ptr<void>& _this)
try
{
LOG_TRACE(GENERAL, "Thread started");
on_spawn();
on_task();
LOG_TRACE(GENERAL, "Thread ended");
}
+6
View File
@@ -230,6 +230,9 @@ public:
thread_ctrl::start(out, std::forward<F>(func));
}
static void set_native_priority(int priority);
static void set_ideal_processor_core(int core);
};
class named_thread
@@ -258,6 +261,9 @@ protected:
// Thread finalization (called after on_task)
virtual void on_exit() {}
// Called once upon thread spawn within the thread's own context
virtual void on_spawn() {}
public:
// ID initialization
virtual void on_init(const std::shared_ptr<void>& _this)
+55 -9
View File
@@ -11,32 +11,78 @@
#include <sys/types.h>
#endif
namespace memory_helper
namespace utils
{
void* reserve_memory(std::size_t size)
// Convert memory protection (internal)
static auto operator +(protection prot)
{
#ifdef _WIN32
return verify("reserve_memory" HERE, VirtualAlloc(NULL, size, MEM_RESERVE, PAGE_NOACCESS));
DWORD _prot = PAGE_NOACCESS;
switch (prot)
{
case protection::rw: _prot = PAGE_READWRITE; break;
case protection::ro: _prot = PAGE_READONLY; break;
case protection::no: break;
case protection::wx: _prot = PAGE_EXECUTE_READWRITE; break;
case protection::rx: _prot = PAGE_EXECUTE_READ; break;
}
#else
return verify("reserve_memory" HERE, ::mmap(nullptr, size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0));
int _prot = PROT_NONE;
switch (prot)
{
case protection::rw: _prot = PROT_READ | PROT_WRITE; break;
case protection::ro: _prot = PROT_READ; break;
case protection::no: break;
case protection::wx: _prot = PROT_READ | PROT_WRITE | PROT_EXEC; break;
case protection::rx: _prot = PROT_READ | PROT_EXEC; break;
}
#endif
return _prot;
}
void* memory_reserve(std::size_t size, void* use_addr)
{
#ifdef _WIN32
return ::VirtualAlloc(use_addr, size, MEM_RESERVE, PAGE_NOACCESS);
#else
auto ptr = ::mmap(use_addr, size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
if (use_addr && ptr != use_addr)
{
::munmap(ptr, size);
return nullptr;
}
return ptr;
#endif
}
void commit_page_memory(void* pointer, std::size_t size)
void memory_commit(void* pointer, std::size_t size, protection prot)
{
#ifdef _WIN32
verify(HERE), VirtualAlloc(pointer, size, MEM_COMMIT, PAGE_READWRITE);
verify(HERE), ::VirtualAlloc(pointer, size, MEM_COMMIT, +prot);
#else
verify(HERE), ::mprotect((void*)((u64)pointer & -4096), ::align(size, 4096), PROT_READ | PROT_WRITE) != -1;
verify(HERE), ::mprotect((void*)((u64)pointer & -4096), ::align(size, 4096), +prot) != -1;
#endif
}
void free_reserved_memory(void* pointer, std::size_t size)
void memory_decommit(void* pointer, std::size_t size)
{
#ifdef _WIN32
verify(HERE), VirtualFree(pointer, 0, MEM_DECOMMIT);
verify(HERE), ::VirtualFree(pointer, 0, MEM_DECOMMIT);
#else
verify(HERE), ::mmap(pointer, size, PROT_NONE, MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
#endif
}
void memory_protect(void* pointer, std::size_t size, protection prot)
{
#ifdef _WIN32
DWORD old;
verify(HERE), ::VirtualProtect(pointer, size, +prot, &old);
#else
verify(HERE), ::mprotect((void*)((u64)pointer & -4096), ::align(size, 4096), +prot) != -1;
#endif
}
}
+17 -4
View File
@@ -1,22 +1,35 @@
#pragma once
namespace memory_helper
namespace utils
{
// Memory protection type
enum class protection
{
rw, // Read + write (default)
ro, // Read only
no, // No access
wx, // Read + write + execute
rx, // Read + execute
};
/**
* Reserve `size` bytes of virtual memory and returns it.
* The memory should be commited before usage.
*/
void* reserve_memory(std::size_t size);
void* memory_reserve(std::size_t size, void* use_addr = nullptr);
/**
* Commit `size` bytes of virtual memory starting at pointer.
* That is, bake reserved memory with physical memory.
* pointer should belong to a range of reserved memory.
*/
void commit_page_memory(void* pointer, std::size_t size);
void memory_commit(void* pointer, std::size_t size, protection prot = protection::rw);
/**
* Decommit all memory committed via commit_page_memory.
*/
void free_reserved_memory(void* pointer, std::size_t size);
void memory_decommit(void* pointer, std::size_t size);
// Set memory protection
void memory_protect(void* pointer, std::size_t size, protection prot);
}
+105
View File
@@ -0,0 +1,105 @@
#include "bin_patch.h"
#include "yaml-cpp/yaml.h"
#include "File.h"
#include "Config.h"
template <>
void fmt_class_string<patch_type>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](patch_type value)
{
switch (value)
{
case patch_type::byte: return "byte";
case patch_type::le16: return "le16";
case patch_type::le32: return "le32";
case patch_type::le64: return "le64";
case patch_type::be16: return "be16";
case patch_type::be32: return "be32";
case patch_type::be64: return "be64";
}
return unknown;
});
}
void patch_engine::append(const std::string& patch)
{
if (fs::file f{patch})
{
auto root = YAML::Load(f.to_string());
for (auto pair : root)
{
auto& name = pair.first.Scalar();
auto& data = m_map[name];
for (auto patch : pair.second)
{
u64 type64 = 0;
cfg::try_to_enum_value(&type64, &fmt_class_string<patch_type>::format, patch[0].Scalar());
struct patch info;
info.type = static_cast<patch_type>(type64);
info.offset = patch[1].as<u32>();
info.value = patch[2].as<u64>();
data.emplace_back(info);
}
}
}
}
void patch_engine::apply(const std::string& name, u8* dst) const
{
const auto found = m_map.find(name);
if (found == m_map.cend())
{
return;
}
// Apply modifications sequentially
for (const auto& p : found->second)
{
auto ptr = dst + p.offset;
switch (p.type)
{
case patch_type::byte:
{
*ptr = static_cast<u8>(p.value);
break;
}
case patch_type::le16:
{
*reinterpret_cast<le_t<u16, 1>*>(ptr) = static_cast<u16>(p.value);
break;
}
case patch_type::le32:
{
*reinterpret_cast<le_t<u32, 1>*>(ptr) = static_cast<u32>(p.value);
break;
}
case patch_type::le64:
{
*reinterpret_cast<le_t<u64, 1>*>(ptr) = static_cast<u64>(p.value);
break;
}
case patch_type::be16:
{
*reinterpret_cast<be_t<u16, 1>*>(ptr) = static_cast<u16>(p.value);
break;
}
case patch_type::be32:
{
*reinterpret_cast<be_t<u32, 1>*>(ptr) = static_cast<u32>(p.value);
break;
}
case patch_type::be64:
{
*reinterpret_cast<be_t<u64, 1>*>(ptr) = static_cast<u64>(p.value);
break;
}
}
}
}
+37
View File
@@ -0,0 +1,37 @@
#pragma once
#include "BEType.h"
#include <vector>
#include <string>
#include <unordered_map>
enum class patch_type
{
byte,
le16,
le32,
le64,
be16,
be32,
be64,
};
class patch_engine
{
struct patch
{
patch_type type;
u32 offset;
u64 value;
};
// Database
std::unordered_map<std::string, std::vector<patch>> m_map;
public:
// Load from file
void append(const std::string& path);
// Apply patch
void apply(const std::string& name, u8* dst) const;
};
+27 -7
View File
@@ -204,11 +204,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
else if (fmt[0] == 'h')
{
fmt++, ctx.size++;
ctx.type = sizeof(char);
ctx.type = src.size_char;
}
else
{
ctx.type = sizeof(short);
ctx.type = src.size_short;
}
break;
@@ -223,11 +223,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
else if (fmt[0] == 'l')
{
fmt++, ctx.size++;
ctx.type = sizeof(llong);
ctx.type = src.size_llong;
}
else
{
ctx.type = sizeof(long);
ctx.type = src.size_long;
}
break;
@@ -241,7 +241,7 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
}
else
{
ctx.type = sizeof(std::size_t);
ctx.type = src.size_size;
}
break;
@@ -255,7 +255,7 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
}
else
{
ctx.type = sizeof(std::intmax_t);
ctx.type = src.size_max;
}
break;
@@ -269,7 +269,7 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
}
else
{
ctx.type = sizeof(std::ptrdiff_t);
ctx.type = src.size_diff;
}
break;
@@ -339,6 +339,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
if (!ctx.type)
{
ctx.type = (u8)src.type(ctx.args);
if (!ctx.type)
{
ctx.type = src.size_int;
}
}
// Sign-extended argument expected
@@ -396,6 +401,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
if (!ctx.type)
{
ctx.type = (u8)src.type(ctx.args);
if (!ctx.type)
{
ctx.type = src.size_int;
}
}
const u64 mask =
@@ -447,6 +457,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
if (!ctx.type)
{
ctx.type = (u8)src.type(ctx.args);
if (!ctx.type)
{
ctx.type = src.size_int;
}
}
const u64 mask =
@@ -505,6 +520,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
if (!ctx.type)
{
ctx.type = (u8)src.type(ctx.args);
if (!ctx.type)
{
ctx.type = src.size_int;
}
}
const u64 mask =
+2
View File
@@ -1,6 +1,8 @@
#include "cond.h"
#include "sync.h"
#include <limits.h>
#ifndef _WIN32
#include <thread>
#endif
+24 -10
View File
@@ -1,6 +1,8 @@
#include "mutex.h"
#include "sync.h"
#include <limits.h>
void shared_mutex::imp_lock_shared(s64 _old)
{
verify("shared_mutex overflow" HERE), _old <= c_max;
@@ -21,9 +23,12 @@ void shared_mutex::imp_lock_shared(s64 _old)
// Acquire writer lock
imp_wait(m_value.load());
// Convert value
// Convert to reader lock
s64 value = m_value.fetch_add(c_one - c_min);
// Proceed exclusively
return;
if (value != 0)
{
imp_unlock(value);
@@ -35,7 +40,14 @@ void shared_mutex::imp_lock_shared(s64 _old)
NtWaitForKeyedEvent(nullptr, (int*)&m_value + 1, false, nullptr);
}
#else
while (true)
// Acquire writer lock
imp_wait(0);
// Convert to reader lock
m_value += c_one - c_min;
// Disabled code
while (false)
{
const s64 value0 = m_value.fetch_op([](s64& value)
{
@@ -63,13 +75,13 @@ void shared_mutex::imp_lock_shared(s64 _old)
value1 += c_one - c_min;
if (value1 >= 0)
if (value1 > 0)
{
return;
}
// Wait as a reader if necessary
while (futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAIT_PRIVATE, int(value1 >> 32), nullptr, nullptr, 0))
while (futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAIT_BITSET_PRIVATE, int(value1 >> 32), nullptr, nullptr, INT_MIN))
{
value1 = m_value.load();
@@ -110,7 +122,7 @@ void shared_mutex::imp_unlock_shared(s64 _old)
#else
m_value -= c_sig;
futex((int*)&m_value.raw() + IS_BE_MACHINE, FUTEX_WAKE_PRIVATE, 1, nullptr, nullptr, 0);
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_BITSET_PRIVATE, 1, nullptr, nullptr, u32(c_sig >> 32));
#endif
}
}
@@ -145,7 +157,7 @@ void shared_mutex::imp_wait(s64)
return;
}
futex((int*)&m_value.raw() + IS_BE_MACHINE, FUTEX_WAIT_PRIVATE, int(value), nullptr, nullptr, 0);
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAIT_BITSET_PRIVATE, int(value >> 32), nullptr, nullptr, u32(c_sig >> 32));
}
#endif
}
@@ -180,8 +192,9 @@ void shared_mutex::imp_unlock(s64 _old)
{
NtReleaseKeyedEvent(nullptr, &m_value, false, nullptr);
}
else if (s64 count = -_old / c_min)
else if (s64 count = -_old / c_min * 0)
{
// Disabled code
while (count--)
{
NtReleaseKeyedEvent(nullptr, (int*)&m_value + 1, false, nullptr);
@@ -192,11 +205,12 @@ void shared_mutex::imp_unlock(s64 _old)
{
m_value -= c_sig;
futex((int*)&m_value.raw() + IS_BE_MACHINE, FUTEX_WAKE_PRIVATE, 1, nullptr, nullptr, 0);
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_BITSET_PRIVATE, 1, nullptr, nullptr, u32(c_sig >> 32));
}
else if (s64 count = -_old / c_min)
else if (false)
{
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_PRIVATE, INT_MAX, nullptr, nullptr, 0);
// Disabled code
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_BITSET_PRIVATE, INT_MAX, nullptr, nullptr, INT_MIN);
}
#endif
}
+118 -13
View File
@@ -12,6 +12,7 @@
#include <type_traits>
#include <utility>
#include <chrono>
#include <array>
// Assume little-endian
#define IS_LE_MACHINE 1
@@ -45,9 +46,6 @@
// Return 32 bit alignof() to avoid widening/narrowing conversions with size_t
#define ALIGN_32(...) static_cast<u32>(alignof(__VA_ARGS__))
// Return 32 bit offsetof()
#define OFFSET_32(type, x) static_cast<u32>(reinterpret_cast<std::uintptr_t>(&reinterpret_cast<const volatile char&>(reinterpret_cast<type*>(0ull)->x)))
#define CONCATENATE_DETAIL(x, y) x ## y
#define CONCATENATE(x, y) CONCATENATE_DETAIL(x, y)
@@ -72,6 +70,8 @@ using ulong = unsigned long;
using ullong = unsigned long long;
using llong = long long;
using uptr = std::uintptr_t;
using u8 = std::uint8_t;
using u16 = std::uint16_t;
using u32 = std::uint32_t;
@@ -450,6 +450,71 @@ constexpr T align(const T& value, ullong align)
return static_cast<T>((value + (align - 1)) & ~(align - 1));
}
template <typename T, typename T2>
inline u32 offset32(T T2::*const mptr)
{
#ifdef _MSC_VER
static_assert(sizeof(mptr) == sizeof(u32), "Invalid pointer-to-member size");
return reinterpret_cast<const u32&>(mptr);
#elif __GNUG__
static_assert(sizeof(mptr) == sizeof(std::size_t), "Invalid pointer-to-member size");
return static_cast<u32>(reinterpret_cast<const std::size_t&>(mptr));
#else
static_assert(sizeof(mptr) == 0, "Invalid pointer-to-member size");
#endif
}
template <typename T>
struct offset32_array
{
static_assert(std::is_array<T>::value, "Invalid pointer-to-member type (array expected)");
template <typename Arg>
static inline u32 index32(const Arg& arg)
{
return SIZE_32(std::remove_extent_t<T>) * static_cast<u32>(arg);
}
};
template <typename T, std::size_t N>
struct offset32_array<std::array<T, N>>
{
template <typename Arg>
static inline u32 index32(const Arg& arg)
{
return SIZE_32(T) * static_cast<u32>(arg);
}
};
template <typename Arg>
struct offset32_detail;
template <typename T, typename T2, typename Arg, typename... Args>
inline u32 offset32(T T2::*const mptr, const Arg& arg, const Args&... args)
{
return offset32_detail<Arg>::offset32(mptr, arg, args...);
}
template <typename Arg>
struct offset32_detail
{
template <typename T, typename T2, typename... Args>
static inline u32 offset32(T T2::*const mptr, const Arg& arg, const Args&... args)
{
return ::offset32(mptr, args...) + offset32_array<T>::index32(arg);
}
};
template <typename T3, typename T4>
struct offset32_detail<T3 T4::*>
{
template <typename T, typename T2, typename... Args>
static inline u32 offset32(T T2::*const mptr, T3 T4::*const mptr2, const Args&... args)
{
return ::offset32(mptr) + ::offset32(mptr2, args...);
}
};
inline u32 cntlz32(u32 arg, bool nonzero = false)
{
#ifdef _MSC_VER
@@ -909,45 +974,85 @@ inline void busy_wait(std::size_t count = 100)
// Rotate helpers
#if defined(__GNUG__)
inline u8 rol8(const u8 x, const u8 n)
inline u8 rol8(u8 x, u8 n)
{
u8 result = x;
__asm__("rolb %[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u16 rol16(const u16 x, const u16 n)
inline u8 ror8(u8 x, u8 n)
{
u8 result = x;
__asm__("rorb %[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u16 rol16(u16 x, u16 n)
{
u16 result = x;
__asm__("rolw %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u32 rol32(const u32 x, const u32 n)
inline u16 ror16(u16 x, u16 n)
{
u16 result = x;
__asm__("rorw %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u32 rol32(u32 x, u32 n)
{
u32 result = x;
__asm__("roll %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u64 rol64(const u64 x, const u64 n)
inline u32 ror32(u32 x, u32 n)
{
u32 result = x;
__asm__("rorl %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u64 rol64(u64 x, u64 n)
{
u64 result = x;
__asm__("rolq %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u64 ror64(const u64 x, const u64 n)
inline u64 ror64(u64 x, u64 n)
{
u64 result = x;
__asm__("rorq %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
return result;
}
inline u64 umulh64(u64 a, u64 b)
{
u64 result;
__asm__("mulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
return result;
}
inline s64 mulh64(s64 a, s64 b)
{
s64 result;
__asm__("imulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
return result;
}
#elif defined(_MSC_VER)
inline u8 rol8(const u8 x, const u8 n) { return _rotl8(x, n); }
inline u16 rol16(const u16 x, const u16 n) { return _rotl16(x, (u8)n); }
inline u32 rol32(const u32 x, const u32 n) { return _rotl(x, (int)n); }
inline u64 rol64(const u64 x, const u64 n) { return _rotl64(x, (int)n); }
inline u64 ror64(const u64 x, const u64 n) { return _rotr64(x, (int)n); }
inline u8 rol8(u8 x, u8 n) { return _rotl8(x, n); }
inline u8 ror8(u8 x, u8 n) { return _rotr8(x, n); }
inline u16 rol16(u16 x, u16 n) { return _rotl16(x, (u8)n); }
inline u16 ror16(u16 x, u16 n) { return _rotr16(x, (u8)n); }
inline u32 rol32(u32 x, u32 n) { return _rotl(x, (int)n); }
inline u32 ror32(u32 x, u32 n) { return _rotr(x, (int)n); }
inline u64 rol64(u64 x, u64 n) { return _rotl64(x, (int)n); }
inline u64 ror64(u64 x, u64 n) { return _rotr64(x, (int)n); }
inline u64 umulh64(u64 x, u64 y) { return __umulh(x, y); }
inline s64 mulh64(s64 x, s64 y) { return __mulh(x, y); }
#endif
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -19,7 +19,7 @@
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -54,6 +54,7 @@
</ClCompile>
<ClCompile Include="yaml-cpp\src\emitterutils.cpp">
</ClCompile>
<ClCompile Include="yaml-cpp\src\exceptions.cpp" />
<ClCompile Include="yaml-cpp\src\exp.cpp">
</ClCompile>
<ClCompile Include="yaml-cpp\src\memory.cpp">
+30 -27
View File
@@ -7,85 +7,88 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\binary.cpp">
<ClCompile Include="yaml-cpp\src\binary.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\convert.cpp">
<ClCompile Include="yaml-cpp\src\convert.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\directives.cpp">
<ClCompile Include="yaml-cpp\src\directives.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\emit.cpp">
<ClCompile Include="yaml-cpp\src\emit.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\emitfromevents.cpp">
<ClCompile Include="yaml-cpp\src\emitfromevents.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\emitter.cpp">
<ClCompile Include="yaml-cpp\src\emitter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\emitterstate.cpp">
<ClCompile Include="yaml-cpp\src\emitterstate.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\emitterutils.cpp">
<ClCompile Include="yaml-cpp\src\emitterutils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\exp.cpp">
<ClCompile Include="yaml-cpp\src\exp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\memory.cpp">
<ClCompile Include="yaml-cpp\src\memory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\node.cpp">
<ClCompile Include="yaml-cpp\src\node.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\node_data.cpp">
<ClCompile Include="yaml-cpp\src\nodebuilder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\nodebuilder.cpp">
<ClCompile Include="yaml-cpp\src\nodeevents.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\nodeevents.cpp">
<ClCompile Include="yaml-cpp\src\node_data.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\null.cpp">
<ClCompile Include="yaml-cpp\src\null.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\ostream_wrapper.cpp">
<ClCompile Include="yaml-cpp\src\ostream_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\parse.cpp">
<ClCompile Include="yaml-cpp\src\parse.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\parser.cpp">
<ClCompile Include="yaml-cpp\src\parser.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\regex_yaml.cpp">
<ClCompile Include="yaml-cpp\src\regex_yaml.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\scanner.cpp">
<ClCompile Include="yaml-cpp\src\scanner.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\scanscalar.cpp">
<ClCompile Include="yaml-cpp\src\scanscalar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\scantag.cpp">
<ClCompile Include="yaml-cpp\src\scantag.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\scantoken.cpp">
<ClCompile Include="yaml-cpp\src\scantoken.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\simplekey.cpp">
<ClCompile Include="yaml-cpp\src\simplekey.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\singledocparser.cpp">
<ClCompile Include="yaml-cpp\src\singledocparser.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\stream.cpp">
<ClCompile Include="yaml-cpp\src\stream.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\tag.cpp">
<ClCompile Include="yaml-cpp\src\tag.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="yaml-cpp\src\exceptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
+14 -14
View File
@@ -19,12 +19,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -39,21 +39,21 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>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</NMakeBuildCommandLine>
<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</NMakeCleanCommandLine>
<NMakeReBuildCommandLine>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
<NMakeBuildCommandLine>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
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
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m</NMakeCleanCommandLine>
<NMakeReBuildCommandLine>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
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m
</NMakeReBuildCommandLine>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>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</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>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</NMakeReBuildCommandLine>
<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</NMakeCleanCommandLine>
<NMakeBuildCommandLine>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
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" -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
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m</NMakeCleanCommandLine>
</PropertyGroup>
<ItemDefinitionGroup>
</ItemDefinitionGroup>
+14 -14
View File
@@ -19,12 +19,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -39,25 +39,25 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release</NMakeCleanCommandLine>
<NMakeBuildCommandLine>cmake -G "Visual Studio 15 2017 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
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
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m</NMakeCleanCommandLine>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m
</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m
</NMakeCleanCommandLine>
</PropertyGroup>
<ItemDefinitionGroup>
+14 -11
View File
@@ -1,6 +1,6 @@
version: '0.0.2-{build}'
os: Visual Studio 2015
os: Visual Studio 2017
platform: x64
clone_folder: C:\rpcs3
clone_depth: 3
@@ -12,27 +12,30 @@ configuration:
before_build:
- ps: $env:Date="$(git show -s --date=short --format='%ad')"
- git submodule update --init 3rdparty/ffmpeg 3rdparty/pugixml asmjit 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp rsx_program_decompiler 3rdparty/cereal
- 7z x wxWidgets.7z -aos -oC:\rpcs3\wxWidgets > null
- git submodule update --init 3rdparty/ffmpeg 3rdparty/pugixml asmjit 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp 3rdparty/cereal 3rdparty/zlib 3rdparty/hidapi
- 7z x zlib.7z -aos -oC:\rpcs3\ > null
- 7z x vulkan.7z -aos -oC:\rpcs3\Vulkan > null
- if %configuration%==Release (cmake -G "Visual Studio 14 Win64" -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
else (7z x llvmlibs.7z -aos -oC:\rpcs3 > null && cmake -G "Visual Studio 14 Win64" -DLLVM_DIR=C:/rpcs3/llvm_build/share/llvm/cmake -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
- if %configuration%==Release (cmake -G "Visual Studio 15 Win64" -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
else (7z x llvmlibs.7z -aos -oC:\rpcs3 > null && cmake -G "Visual Studio 15 Win64" -DLLVM_DIR=C:/rpcs3/llvm_build/lib/cmake/llvm -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
build_script:
- cmake --build . --config Release -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
install:
- appveyor DownloadFile "https://dl.dropboxusercontent.com/s/c1by0uulee6g8th/wxWidgets.7z?dl=0" -FileName wxWidgets.7z
- appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B-98fOyaZKJ5YWVnb29JZXFQWkU" -FileName llvmlibs.7z
- appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRa21fbDQteTN1dGs" -FileName vulkan.7z
- appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B6v_qtb9hkicQ2hHa2dRbF83cE0" -FileName zlib.7z
- set WXWIN=C:\rpcs3\wxWidgets
- if not exist llvmlibs.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRY2k3Q2Yya05lcm8" -FileName llvmlibs.7z
- if not exist vulkan.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRaHYxV3VOS2d0a0U" -FileName vulkan.7z
- if not exist zlib.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B-HVE3xvheVFX05lRFdnZlh5aUU" -FileName zlib.7z
- set QTDIR=C:\Qt\5.9\msvc2017_64
- set OPENALDIR=C:\rpcs3\3rdparty\OpenAL
- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;C:\wxWidgets;%PATH%
- set PATH=C:\Program Files (x86)\MSBuild\15.0\Bin;%QTDIR%;%PATH%
- set COMMIT_SHA=%APPVEYOR_REPO_COMMIT:~0,8%
artifacts:
- path: bin
name: 'rpcs3-v0.0.2-$(Date)-$(COMMIT_SHA)_win64'
type: zip
cache:
- llvmlibs.7z -> appveyor.yml
- vulkan.7z -> appveyor.yml
- zlib.7z -> appveyor.yml
+1 -1
Submodule asmjit updated: b0dad1af25...1370fe6a26
+29 -22
View File
@@ -23,47 +23,53 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\asmjit\src\asmjit\base\arch.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\assembler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codegen.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\compiler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codebuilder.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codecompiler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codeemitter.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codeholder.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\constpool.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\containers.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\context.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\cpuinfo.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\cputicks.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\error.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\func.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\globals.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\intutil.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\logger.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\inst.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\logging.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\osutils.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\operand.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\regalloc.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\runtime.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\string.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\vmem.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\zone.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86assembler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86compiler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86context.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86cpuinfo.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86inst.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86instimpl.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86internal.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86logging.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand_regs.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86scheduler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86regalloc.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\asmjit\src\asmjit\base\arch.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\assembler.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codegen.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\compiler.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codebuilder.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codecompiler.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codeemitter.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codeholder.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\constpool.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\containers.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\context_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\cpuinfo.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\cputicks.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\error.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\func.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\logging.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\globals.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\intutil.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\inst.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\lock.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\logger.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\operand.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\osutils.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\regalloc_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\runtime.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\string.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\vectypes.h" />
@@ -71,11 +77,12 @@
<ClInclude Include="..\asmjit\src\asmjit\base\zone.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86assembler.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86compiler.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86context_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86cpuinfo.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86inst.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86instimpl_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86internal_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86logging_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86operand.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86scheduler_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86regalloc_p.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{AC40FF01-426E-4838-A317-66354CEFAE88}</ProjectGuid>
@@ -86,7 +93,7 @@
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+32 -25
View File
@@ -1,58 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\asmjit\src\asmjit\base\arch.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\assembler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codegen.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\compiler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codebuilder.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codecompiler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codeemitter.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\codeholder.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\constpool.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\containers.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\context.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\cpuinfo.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\cputicks.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\error.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\func.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\globals.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\intutil.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\logger.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\inst.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\logging.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\osutils.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\operand.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\regalloc.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\runtime.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\string.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\vmem.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\base\zone.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86assembler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86compiler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86context.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86cpuinfo.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86inst.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86instimpl.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86internal.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86logging.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand_regs.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86scheduler.cpp" />
<ClCompile Include="..\asmjit\src\asmjit\x86\x86regalloc.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\asmjit\src\asmjit\x86\x86assembler.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86compiler.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86context_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86cpuinfo.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86inst.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86operand.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86scheduler_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\arch.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\assembler.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codegen.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\compiler.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codebuilder.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codecompiler.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codeemitter.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\codeholder.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\constpool.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\containers.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\context_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\cpuinfo.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\cputicks.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\error.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\func.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\logging.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\globals.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\intutil.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\inst.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\lock.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\logger.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\operand.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\osutils.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\regalloc_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\runtime.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\string.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\vectypes.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\vmem.h" />
<ClInclude Include="..\asmjit\src\asmjit\base\zone.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86assembler.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86compiler.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86inst.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86instimpl_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86internal_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86logging_p.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86operand.h" />
<ClInclude Include="..\asmjit\src\asmjit\x86\x86regalloc_p.h" />
</ItemGroup>
</Project>
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
Submodule llvm updated: 051e787f26...80e0f20bde
+14 -14
View File
@@ -18,12 +18,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -39,31 +39,31 @@
<NMakePreprocessorDefinitions>
</NMakePreprocessorDefinitions>
<NMakeBuildCommandLine>
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
cmake -G "Visual Studio 15 2017 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 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
cmake -G "Visual Studio 15 2017 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 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
cmake -G "Visual Studio 15 2017 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 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
cmake -G "Visual Studio 15 2017 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 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
cmake -G "Visual Studio 15 2017 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 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
cmake -G "Visual Studio 15 2017 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>
<ItemDefinitionGroup>
+2 -68
View File
@@ -20,14 +20,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
@@ -100,72 +100,6 @@
<ProjectReference Include="..\rpcs3\XAudio.vcxproj">
<Project>{78cb2f39-b809-4a06-8329-8c0a19119d3d}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_adv.vcxproj">
<Project>{24c45343-fd20-5c92-81c1-35a2ae841e79}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_aui.vcxproj">
<Project>{a16d3832-0f42-57ce-8f48-50e06649ade8}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_base.vcxproj">
<Project>{3fcc50c2-81e9-5db2-b8d8-2129427568b1}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_core.vcxproj">
<Project>{6744dad8-9c70-574a-bff2-9f8dddb24a75}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_gl.vcxproj">
<Project>{da8b15ef-6750-5928-bc0e-c748213cf9b2}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_html.vcxproj">
<Project>{33cc42f9-7756-5587-863c-8d4461b7c5dd}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_media.vcxproj">
<Project>{8bd8f8d9-4275-5b42-a8f4-f1db2970a550}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_net.vcxproj">
<Project>{69f2ede4-7d21-5738-9bc0-f66f61c9ae00}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_propgrid.vcxproj">
<Project>{97fdab45-9c58-5bc5-a2f4-ee42739ebc63}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_qa.vcxproj">
<Project>{e21129e0-7c08-5936-9d8c-0d60b5319ba7}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_ribbon.vcxproj">
<Project>{87b42a9c-3f5c-53d7-9017-2b1cae39457d}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_richtext.vcxproj">
<Project>{7fb0902d-8579-5dce-b883-daf66a885005}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_stc.vcxproj">
<Project>{23e1c437-a951-5943-8639-a17f3cf2e606}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxexpat.vcxproj">
<Project>{a1a8355b-0988-528e-9cc2-b971d6266669}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxjpeg.vcxproj">
<Project>{6053cc38-cdee-584c-8bc8-4b000d800fc7}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxpng.vcxproj">
<Project>{8acc122a-ca6a-5aa6-9c97-9cdd2e533db0}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxregex.vcxproj">
<Project>{56a4b526-bb81-5d01-aaa9-16d23bbb169d}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxscintilla.vcxproj">
<Project>{74827ebd-93dc-5110-ba95-3f2ab029b6b0}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxtiff.vcxproj">
<Project>{75596ce6-5ae7-55c9-b890-c07b0a657a83}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxzlib.vcxproj">
<Project>{8b867186-a0b5-5479-b824-e176edd27c40}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_xml.vcxproj">
<Project>{3e6dca27-5fa3-53ec-bbd6-2d42294b7ae6}</Project>
</ProjectReference>
<ProjectReference Include="..\wxWidgets\build\msw\wx_xrc.vcxproj">
<Project>{09f2f96a-1cc6-5e43-af1d-956ec2a4888d}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
+54 -489
View File
@@ -1,163 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.26430.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}"
ProjectSection(ProjectDependencies) = postProject
{AC40FF01-426E-4838-A317-66354CEFAE88} = {AC40FF01-426E-4838-A317-66354CEFAE88}
{56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D}
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
{C4A10229-4712-4BD2-B63E-50D93C67A038} = {C4A10229-4712-4BD2-B63E-50D93C67A038}
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}
{7FB0902D-8579-5DCE-B883-DAF66A885005} = {7FB0902D-8579-5DCE-B883-DAF66A885005}
{A16D3832-0F42-57CE-8F48-50E06649ADE8} = {A16D3832-0F42-57CE-8F48-50E06649ADE8}
{23E1C437-A951-5943-8639-A17F3CF2E606} = {23E1C437-A951-5943-8639-A17F3CF2E606}
{6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {6053CC38-CDEE-584C-8BC8-4B000D800FC7}
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} = {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}
{A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669}
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
{97E17077-A21F-45EF-9C3A-73A0BC092D7E} = {97E17077-A21F-45EF-9C3A-73A0BC092D7E}
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {7D73447B-3D2D-4DFE-BF62-57E644C1D09F}
{8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0}
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} = {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}
{E21129E0-7C08-5936-9D8C-0D60B5319BA7} = {E21129E0-7C08-5936-9D8C-0D60B5319BA7}
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} = {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}
{75596CE6-5AE7-55C9-B890-C07B0A657A83} = {75596CE6-5AE7-55C9-B890-C07B0A657A83}
{DA8B15EF-6750-5928-BC0E-C748213CF9B2} = {DA8B15EF-6750-5928-BC0E-C748213CF9B2}
{33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wxWidgets", "wxWidgets", "{5812E712-6213-4372-B095-9EB9BAA1F2DF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wxWidgets\build\msw\wx_adv.vcxproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}"
ProjectSection(ProjectDependencies) = postProject
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wxWidgets\build\msw\wx_aui.vcxproj", "{A16D3832-0F42-57CE-8F48-50E06649ADE8}"
ProjectSection(ProjectDependencies) = postProject
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
{33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wxWidgets\build\msw\wx_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
{56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D}
{A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669}
{8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wxWidgets\build\msw\wx_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wxWidgets\build\msw\wx_propgrid.vcxproj", "{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}"
ProjectSection(ProjectDependencies) = postProject
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wxWidgets\build\msw\wx_gl.vcxproj", "{DA8B15EF-6750-5928-BC0E-C748213CF9B2}"
ProjectSection(ProjectDependencies) = postProject
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wxWidgets\build\msw\wx_html.vcxproj", "{33CC42F9-7756-5587-863C-8D4461B7C5DD}"
ProjectSection(ProjectDependencies) = postProject
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wxWidgets\build\msw\wx_media.vcxproj", "{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}"
ProjectSection(ProjectDependencies) = postProject
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wxWidgets\build\msw\wx_net.vcxproj", "{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}"
ProjectSection(ProjectDependencies) = postProject
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wxWidgets\build\msw\wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}"
ProjectSection(ProjectDependencies) = postProject
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wxWidgets\build\msw\wx_richtext.vcxproj", "{7FB0902D-8579-5DCE-B883-DAF66A885005}"
ProjectSection(ProjectDependencies) = postProject
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wxWidgets\build\msw\wx_wxexpat.vcxproj", "{A1A8355B-0988-528E-9CC2-B971D6266669}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wxWidgets\build\msw\wx_wxjpeg.vcxproj", "{6053CC38-CDEE-584C-8BC8-4B000D800FC7}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wxWidgets\build\msw\wx_wxpng.vcxproj", "{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wxWidgets\build\msw\wx_wxregex.vcxproj", "{56A4B526-BB81-5D01-AAA9-16D23BBB169D}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wxWidgets\build\msw\wx_wxtiff.vcxproj", "{75596CE6-5AE7-55C9-B890-C07B0A657A83}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wxWidgets\build\msw\wx_wxzlib.vcxproj", "{8B867186-A0B5-5479-B824-E176EDD27C40}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wxWidgets\build\msw\wx_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wxWidgets\build\msw\wx_xrc.vcxproj", "{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wxWidgets\build\msw\wx_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}"
ProjectSection(ProjectDependencies) = postProject
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wxWidgets\build\msw\wx_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}"
ProjectSection(ProjectDependencies) = postProject
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wxWidgets\build\msw\wx_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asmjit", "asmjitsrc\asmjit.vcxproj", "{AC40FF01-426E-4838-A317-66354CEFAE88}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asmjit", "asmjit", "{E2A982F2-4B1A-48B1-8D77-A17A589C58D7}"
@@ -166,19 +10,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "emucore", "rpcs3\emucore.vc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build", "llvm_build\llvm_build.vcxproj", "{8BC303AB-25BE-4276-8E57-73F171B2D672}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_custom_build", "wxWidgets\build\msw\wx_custom_build.vcxproj", "{01F4CE10-2CFB-41A8-B41F-E54337868A1D}"
ProjectSection(ProjectDependencies) = postProject
{00D36322-6188-4A66-B514-3B3F183E998D} = {00D36322-6188-4A66-B514-3B3F183E998D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy_setup_h", "rpcs3\copy_setup_h.vcxproj", "{00D36322-6188-4A66-B514-3B3F183E998D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "D3D12GSRender", "rpcs3\D3D12GSRender.vcxproj", "{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3-tests", "rpcs3-tests\rpcs3-tests.vcxproj", "{AB222E8A-00CA-4ACF-A87E-5251C16C0587}"
ProjectSection(ProjectDependencies) = postProject
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
{00D36322-6188-4A66-B514-3B3F183E998D} = {00D36322-6188-4A66-B514-3B3F183E998D}
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672}
EndProjectSection
@@ -187,10 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLGSRender", "rpcs3\GLGSRen
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rpcs3.emu", "rpcs3.emu", "{10FBF193-D532-4CCF-B875-4C7091A7F6C2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shader_code", "rsx_program_decompiler\shader_code\shader_code.vcxproj", "{97E17077-A21F-45EF-9C3A-73A0BC092D7E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsx_decompiler", "rsx_program_decompiler\rsx_decompiler\rsx_decompiler.vcxproj", "{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XAudio", "rpcs3\XAudio.vcxproj", "{78CB2F39-B809-4A06-8329-8C0A19119D3D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenAL", "rpcs3\OpenAL.vcxproj", "{30A05C4D-F5FD-421C-A864-17A64BDEAA75}"
@@ -216,14 +47,33 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKGSRender", "rpcs3\VKGSRen
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {8F85B6CC-250F-4ACA-A617-E820A74E3E3C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wxWidgets\build\msw\wx_webview.vcxproj", "{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "yaml-cpp", "yaml-cpp", "{DDF904CA-2771-441A-8629-5DF2EB922A79}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__BUILD_BEFORE", "__BUILD_BEFORE", "{B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml-cpp", "Utilities\yaml-cpp.vcxproj", "{FDC361C5-7734-493B-8CFB-037308B35122}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}"
ProjectSection(ProjectDependencies) = postProject
{AC40FF01-426E-4838-A317-66354CEFAE88} = {AC40FF01-426E-4838-A317-66354CEFAE88}
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {A107C21C-418A-4697-BB10-20C3AA60E2E4}
{C4A10229-4712-4BD2-B63E-50D93C67A038} = {C4A10229-4712-4BD2-B63E-50D93C67A038}
{78CB2F39-B809-4A06-8329-8C0A19119D3D} = {78CB2F39-B809-4A06-8329-8C0A19119D3D}
{3384223A-6D97-4799-9862-359F85312892} = {3384223A-6D97-4799-9862-359F85312892}
{30A05C4D-F5FD-421C-A864-17A64BDEAA75} = {30A05C4D-F5FD-421C-A864-17A64BDEAA75}
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF}
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}
{58B40697-B15E-429E-B325-D52C28AEBCBF} = {58B40697-B15E-429E-B325-D52C28AEBCBF}
{FDC361C5-7734-493B-8CFB-037308B35122} = {FDC361C5-7734-493B-8CFB-037308B35122}
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {8F85B6CC-250F-4ACA-A617-E820A74E3E3C}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hidapi", "hidapi", "{FA1E6C16-CA63-45F8-8D52-E21DF396BE36}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hidapi", "3rdparty\hidapi\windows\hidapi.vcxproj", "{A107C21C-418A-4697-BB10-20C3AA60E2E4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - LLVM|x64 = Debug - LLVM|x64
@@ -233,236 +83,6 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.Build.0 = Debug - MemLeak|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - LLVM|x64.Build.0 = Debug|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - MemLeak|x64.Build.0 = Debug|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.ActiveCfg = Debug|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.Build.0 = Debug|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release - LLVM|x64.ActiveCfg = Release|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release - LLVM|x64.Build.0 = Release|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.ActiveCfg = Release|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.Build.0 = Release|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - LLVM|x64.Build.0 = Debug|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - MemLeak|x64.Build.0 = Debug|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.ActiveCfg = Debug|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.Build.0 = Debug|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release - LLVM|x64.ActiveCfg = Release|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release - LLVM|x64.Build.0 = Release|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.ActiveCfg = Release|x64
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.Build.0 = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - LLVM|x64.Build.0 = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - MemLeak|x64.Build.0 = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release - LLVM|x64.ActiveCfg = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release - LLVM|x64.Build.0 = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - LLVM|x64.Build.0 = Debug|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - MemLeak|x64.Build.0 = Debug|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.ActiveCfg = Debug|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.Build.0 = Debug|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release - LLVM|x64.ActiveCfg = Release|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release - LLVM|x64.Build.0 = Release|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.ActiveCfg = Release|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.Build.0 = Release|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - LLVM|x64.Build.0 = Debug|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - MemLeak|x64.Build.0 = Debug|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.ActiveCfg = Debug|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.Build.0 = Debug|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release - LLVM|x64.ActiveCfg = Release|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release - LLVM|x64.Build.0 = Release|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.ActiveCfg = Release|x64
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.Build.0 = Release|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - LLVM|x64.Build.0 = Debug|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - MemLeak|x64.Build.0 = Debug|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.ActiveCfg = Debug|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.Build.0 = Debug|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release - LLVM|x64.ActiveCfg = Release|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release - LLVM|x64.Build.0 = Release|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.ActiveCfg = Release|x64
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.Build.0 = Release|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - LLVM|x64.Build.0 = Debug|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - MemLeak|x64.Build.0 = Debug|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.ActiveCfg = Debug|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.Build.0 = Debug|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release - LLVM|x64.ActiveCfg = Release|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release - LLVM|x64.Build.0 = Release|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.ActiveCfg = Release|x64
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.Build.0 = Release|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - LLVM|x64.Build.0 = Debug|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - MemLeak|x64.Build.0 = Debug|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.ActiveCfg = Debug|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.Build.0 = Debug|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release - LLVM|x64.ActiveCfg = Release|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release - LLVM|x64.Build.0 = Release|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.ActiveCfg = Release|x64
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.Build.0 = Release|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - LLVM|x64.Build.0 = Debug|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - MemLeak|x64.Build.0 = Debug|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.ActiveCfg = Debug|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.Build.0 = Debug|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release - LLVM|x64.ActiveCfg = Release|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release - LLVM|x64.Build.0 = Release|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.ActiveCfg = Release|x64
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.Build.0 = Release|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - LLVM|x64.Build.0 = Debug|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - MemLeak|x64.Build.0 = Debug|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.ActiveCfg = Debug|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.Build.0 = Debug|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release - LLVM|x64.ActiveCfg = Release|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release - LLVM|x64.Build.0 = Release|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.ActiveCfg = Release|x64
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.Build.0 = Release|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - LLVM|x64.Build.0 = Debug|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - MemLeak|x64.Build.0 = Debug|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.ActiveCfg = Debug|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.Build.0 = Debug|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release - LLVM|x64.ActiveCfg = Release|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release - LLVM|x64.Build.0 = Release|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.ActiveCfg = Release|x64
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.Build.0 = Release|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - LLVM|x64.Build.0 = Debug|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - MemLeak|x64.Build.0 = Debug|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.ActiveCfg = Debug|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.Build.0 = Debug|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release - LLVM|x64.ActiveCfg = Release|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release - LLVM|x64.Build.0 = Release|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.ActiveCfg = Release|x64
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.Build.0 = Release|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - LLVM|x64.Build.0 = Debug|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - MemLeak|x64.Build.0 = Debug|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.ActiveCfg = Debug|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.Build.0 = Debug|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release - LLVM|x64.ActiveCfg = Release|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release - LLVM|x64.Build.0 = Release|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.ActiveCfg = Release|x64
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.Build.0 = Release|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - LLVM|x64.Build.0 = Debug|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - MemLeak|x64.Build.0 = Debug|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.ActiveCfg = Debug|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.Build.0 = Debug|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release - LLVM|x64.ActiveCfg = Release|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release - LLVM|x64.Build.0 = Release|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.ActiveCfg = Release|x64
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.Build.0 = Release|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - LLVM|x64.Build.0 = Debug|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - MemLeak|x64.Build.0 = Debug|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.ActiveCfg = Debug|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.Build.0 = Debug|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release - LLVM|x64.ActiveCfg = Release|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release - LLVM|x64.Build.0 = Release|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.ActiveCfg = Release|x64
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.Build.0 = Release|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - LLVM|x64.Build.0 = Debug|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - MemLeak|x64.Build.0 = Debug|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.ActiveCfg = Debug|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.Build.0 = Debug|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release - LLVM|x64.ActiveCfg = Release|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release - LLVM|x64.Build.0 = Release|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.ActiveCfg = Release|x64
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.Build.0 = Release|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - LLVM|x64.Build.0 = Debug|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - MemLeak|x64.Build.0 = Debug|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.ActiveCfg = Debug|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.Build.0 = Debug|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release - LLVM|x64.ActiveCfg = Release|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release - LLVM|x64.Build.0 = Release|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.ActiveCfg = Release|x64
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.Build.0 = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - LLVM|x64.Build.0 = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - MemLeak|x64.Build.0 = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release - LLVM|x64.ActiveCfg = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release - LLVM|x64.Build.0 = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - LLVM|x64.Build.0 = Debug|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - MemLeak|x64.Build.0 = Debug|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.ActiveCfg = Debug|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.Build.0 = Debug|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release - LLVM|x64.ActiveCfg = Release|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release - LLVM|x64.Build.0 = Release|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.ActiveCfg = Release|x64
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.Build.0 = Release|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - LLVM|x64.Build.0 = Debug|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - MemLeak|x64.Build.0 = Debug|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release - LLVM|x64.ActiveCfg = Release|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release - LLVM|x64.Build.0 = Release|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - LLVM|x64.Build.0 = Debug|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - MemLeak|x64.Build.0 = Debug|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release - LLVM|x64.ActiveCfg = Release|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release - LLVM|x64.Build.0 = Release|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - LLVM|x64.Build.0 = Debug|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - MemLeak|x64.Build.0 = Debug|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release - LLVM|x64.ActiveCfg = Release|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release - LLVM|x64.Build.0 = Release|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
@@ -488,26 +108,6 @@ Global
{8BC303AB-25BE-4276-8E57-73F171B2D672}.Debug|x64.ActiveCfg = Debug|x64
{8BC303AB-25BE-4276-8E57-73F171B2D672}.Release - LLVM|x64.ActiveCfg = Release|x64
{8BC303AB-25BE-4276-8E57-73F171B2D672}.Release|x64.ActiveCfg = Release|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - LLVM|x64.Build.0 = Debug|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - MemLeak|x64.Build.0 = Debug|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|x64.ActiveCfg = Debug|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|x64.Build.0 = Debug|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release - LLVM|x64.ActiveCfg = Release|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release - LLVM|x64.Build.0 = Release|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release|x64.ActiveCfg = Release|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release|x64.Build.0 = Release|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - LLVM|x64.Build.0 = Debug|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - MemLeak|x64.Build.0 = Debug|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug|x64.ActiveCfg = Debug|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug|x64.Build.0 = Debug|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Release - LLVM|x64.ActiveCfg = Release|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Release - LLVM|x64.Build.0 = Release|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.ActiveCfg = Release|x64
{00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.Build.0 = Release|x64
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
@@ -533,26 +133,6 @@ Global
{3384223A-6D97-4799-9862-359F85312892}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
{3384223A-6D97-4799-9862-359F85312892}.Release|x64.ActiveCfg = Release|x64
{3384223A-6D97-4799-9862-359F85312892}.Release|x64.Build.0 = Release|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - LLVM|x64.Build.0 = Debug|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - MemLeak|x64.Build.0 = Debug|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug|x64.ActiveCfg = Debug|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug|x64.Build.0 = Debug|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release - LLVM|x64.ActiveCfg = Release|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release - LLVM|x64.Build.0 = Release|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release|x64.ActiveCfg = Release|x64
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release|x64.Build.0 = Release|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - LLVM|x64.Build.0 = Debug|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - MemLeak|x64.Build.0 = Debug|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug|x64.ActiveCfg = Debug|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug|x64.Build.0 = Debug|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release - LLVM|x64.ActiveCfg = Release|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release - LLVM|x64.Build.0 = Release|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release|x64.ActiveCfg = Release|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release|x64.Build.0 = Release|x64
{78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
{78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
{78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
@@ -583,16 +163,16 @@ Global
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release - LLVM|x64.Build.0 = Release Library|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release Library|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.ActiveCfg = Debug Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.Build.0 = Debug Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.ActiveCfg = Debug Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.Build.0 = Debug Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.ActiveCfg = Debug Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.Build.0 = Debug Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.ActiveCfg = Release Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.Build.0 = Release Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release Library|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.Build.0 = Debug|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.Build.0 = Debug|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.ActiveCfg = Debug|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.Build.0 = Debug|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.ActiveCfg = Release|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.Build.0 = Release|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release|x64
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release|x64
{58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug|x64.ActiveCfg = Debug|x64
@@ -613,16 +193,6 @@ Global
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.ActiveCfg = Release|x64
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.Build.0 = Release|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - LLVM|x64.Build.0 = Debug|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - MemLeak|x64.Build.0 = Debug|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.ActiveCfg = Debug|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.Build.0 = Debug|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release - LLVM|x64.ActiveCfg = Release|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release - LLVM|x64.Build.0 = Release|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.ActiveCfg = Release|x64
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.Build.0 = Release|x64
{FDC361C5-7734-493B-8CFB-037308B35122}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{FDC361C5-7734-493B-8CFB-037308B35122}.Debug - LLVM|x64.Build.0 = Debug|x64
{FDC361C5-7734-493B-8CFB-037308B35122}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
@@ -633,41 +203,36 @@ Global
{FDC361C5-7734-493B-8CFB-037308B35122}.Release - LLVM|x64.Build.0 = Release|x64
{FDC361C5-7734-493B-8CFB-037308B35122}.Release|x64.ActiveCfg = Release|x64
{FDC361C5-7734-493B-8CFB-037308B35122}.Release|x64.Build.0 = Release|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.Build.0 = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - LLVM|x64.ActiveCfg = Debug|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - LLVM|x64.Build.0 = Debug|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - MemLeak|x64.Build.0 = Debug|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug|x64.ActiveCfg = Debug|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug|x64.Build.0 = Debug|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release - LLVM|x64.ActiveCfg = Release|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release - LLVM|x64.Build.0 = Release|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release|x64.ActiveCfg = Release|x64
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{A16D3832-0F42-57CE-8F48-50E06649ADE8} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{DA8B15EF-6750-5928-BC0E-C748213CF9B2} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{33CC42F9-7756-5587-863C-8D4461B7C5DD} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{E21129E0-7C08-5936-9D8C-0D60B5319BA7} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{7FB0902D-8579-5DCE-B883-DAF66A885005} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{A1A8355B-0988-528E-9CC2-B971D6266669} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{75596CE6-5AE7-55C9-B890-C07B0A657A83} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{8B867186-A0B5-5479-B824-E176EDD27C40} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{AC40FF01-426E-4838-A317-66354CEFAE88} = {E2A982F2-4B1A-48B1-8D77-A17A589C58D7}
{C4A10229-4712-4BD2-B63E-50D93C67A038} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{00D36322-6188-4A66-B514-3B3F183E998D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{3384223A-6D97-4799-9862-359F85312892} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{78CB2F39-B809-4A06-8329-8C0A19119D3D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{30A05C4D-F5FD-421C-A864-17A64BDEAA75} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {A17D34F1-7E3E-4841-818D-3B7C6F5AF829}
@@ -675,7 +240,7 @@ Global
{58B40697-B15E-429E-B325-D52C28AEBCBF} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{FDC361C5-7734-493B-8CFB-037308B35122} = {DDF904CA-2771-441A-8629-5DF2EB922A79}
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {FA1E6C16-CA63-45F8-8D52-E21DF396BE36}
EndGlobalSection
EndGlobal
-170
View File
@@ -1,170 +0,0 @@
#include "stdafx.h"
#include "stdafx_gui.h"
#include "rpcs3.h"
#include "BasicKeyboardHandler.h"
void BasicKeyboardHandler::Init(const u32 max_connect)
{
for (u32 i = 0; i<max_connect; i++)
{
m_keyboards.emplace_back(Keyboard());
}
LoadSettings();
memset(&m_info, 0, sizeof(KbInfo));
m_info.max_connect = max_connect;
m_info.now_connect = std::min<size_t>(m_keyboards.size(), max_connect);
m_info.info = 0; // Ownership of keyboard data: 0=Application, 1=System
m_info.status[0] = CELL_KB_STATUS_CONNECTED; // (TODO: Support for more keyboards)
}
BasicKeyboardHandler::BasicKeyboardHandler()
{
wxGetApp().Bind(wxEVT_KEY_DOWN, &BasicKeyboardHandler::KeyDown, this);
wxGetApp().Bind(wxEVT_KEY_UP, &BasicKeyboardHandler::KeyUp, this);
}
void BasicKeyboardHandler::KeyDown(wxKeyEvent& event)
{
Key(event.GetKeyCode(), 1);
event.Skip();
}
void BasicKeyboardHandler::KeyUp(wxKeyEvent& event)
{
Key(event.GetKeyCode(), 0);
event.Skip();
}
void BasicKeyboardHandler::LoadSettings()
{
// Meta Keys
m_keyboards[0].m_buttons.emplace_back(WXK_CONTROL, CELL_KB_MKEY_L_CTRL);
m_keyboards[0].m_buttons.emplace_back(WXK_SHIFT, CELL_KB_MKEY_L_SHIFT);
m_keyboards[0].m_buttons.emplace_back(WXK_ALT, CELL_KB_MKEY_L_ALT);
m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_LEFT, CELL_KB_MKEY_L_WIN);
m_keyboards[0].m_buttons.emplace_back(WXK_COMMAND, CELL_KB_MKEY_L_WIN);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_CTRL);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_SHIFT);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_ALT);
m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_RIGHT, CELL_KB_MKEY_R_WIN);
// CELL_KB_RAWDAT
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_NO_EVENT);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_ROLLOVER);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_POSTFAIL);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_UNDEF);
m_keyboards[0].m_buttons.emplace_back(WXK_ESCAPE, CELL_KEYC_ESCAPE);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_106_KANJI);
m_keyboards[0].m_buttons.emplace_back(WXK_CAPITAL, CELL_KEYC_CAPS_LOCK);
m_keyboards[0].m_buttons.emplace_back(WXK_F1, CELL_KEYC_F1);
m_keyboards[0].m_buttons.emplace_back(WXK_F2, CELL_KEYC_F2);
m_keyboards[0].m_buttons.emplace_back(WXK_F3, CELL_KEYC_F3);
m_keyboards[0].m_buttons.emplace_back(WXK_F4, CELL_KEYC_F4);
m_keyboards[0].m_buttons.emplace_back(WXK_F5, CELL_KEYC_F5);
m_keyboards[0].m_buttons.emplace_back(WXK_F6, CELL_KEYC_F6);
m_keyboards[0].m_buttons.emplace_back(WXK_F7, CELL_KEYC_F7);
m_keyboards[0].m_buttons.emplace_back(WXK_F8, CELL_KEYC_F8);
m_keyboards[0].m_buttons.emplace_back(WXK_F9, CELL_KEYC_F9);
m_keyboards[0].m_buttons.emplace_back(WXK_F10, CELL_KEYC_F10);
m_keyboards[0].m_buttons.emplace_back(WXK_F11, CELL_KEYC_F11);
m_keyboards[0].m_buttons.emplace_back(WXK_F12, CELL_KEYC_F12);
m_keyboards[0].m_buttons.emplace_back(WXK_PRINT, CELL_KEYC_PRINTSCREEN);
m_keyboards[0].m_buttons.emplace_back(WXK_SCROLL, CELL_KEYC_SCROLL_LOCK);
m_keyboards[0].m_buttons.emplace_back(WXK_PAUSE, CELL_KEYC_PAUSE);
m_keyboards[0].m_buttons.emplace_back(WXK_INSERT, CELL_KEYC_INSERT);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HOME);
m_keyboards[0].m_buttons.emplace_back(WXK_PAGEUP, CELL_KEYC_PAGE_UP);
m_keyboards[0].m_buttons.emplace_back(WXK_DELETE, CELL_KEYC_DELETE);
m_keyboards[0].m_buttons.emplace_back(WXK_END, CELL_KEYC_END);
m_keyboards[0].m_buttons.emplace_back(WXK_PAGEDOWN, CELL_KEYC_PAGE_DOWN);
m_keyboards[0].m_buttons.emplace_back(WXK_RIGHT, CELL_KEYC_RIGHT_ARROW);
m_keyboards[0].m_buttons.emplace_back(WXK_LEFT, CELL_KEYC_LEFT_ARROW);
m_keyboards[0].m_buttons.emplace_back(WXK_DOWN, CELL_KEYC_DOWN_ARROW);
m_keyboards[0].m_buttons.emplace_back(WXK_UP, CELL_KEYC_UP_ARROW);
//m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_NUM_LOCK);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_APPLICATION);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_KANA);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HENKAN);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_MUHENKAN);
// CELL_KB_KEYPAD
m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_KPAD_NUMLOCK);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DIVIDE, CELL_KEYC_KPAD_SLASH);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_MULTIPLY, CELL_KEYC_KPAD_ASTERISK);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_SUBTRACT, CELL_KEYC_KPAD_MINUS);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ADD, CELL_KEYC_KPAD_PLUS);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ENTER, CELL_KEYC_KPAD_ENTER);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD1, CELL_KEYC_KPAD_1);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD2, CELL_KEYC_KPAD_2);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD3, CELL_KEYC_KPAD_3);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD4, CELL_KEYC_KPAD_4);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD5, CELL_KEYC_KPAD_5);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD6, CELL_KEYC_KPAD_6);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD7, CELL_KEYC_KPAD_7);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD8, CELL_KEYC_KPAD_8);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD9, CELL_KEYC_KPAD_9);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD0, CELL_KEYC_KPAD_0);
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DELETE, CELL_KEYC_KPAD_PERIOD);
// ASCII Printable characters
m_keyboards[0].m_buttons.emplace_back('A', CELL_KEYC_A);
m_keyboards[0].m_buttons.emplace_back('B', CELL_KEYC_B);
m_keyboards[0].m_buttons.emplace_back('C', CELL_KEYC_C);
m_keyboards[0].m_buttons.emplace_back('D', CELL_KEYC_D);
m_keyboards[0].m_buttons.emplace_back('E', CELL_KEYC_E);
m_keyboards[0].m_buttons.emplace_back('F', CELL_KEYC_F);
m_keyboards[0].m_buttons.emplace_back('G', CELL_KEYC_G);
m_keyboards[0].m_buttons.emplace_back('H', CELL_KEYC_H);
m_keyboards[0].m_buttons.emplace_back('I', CELL_KEYC_I);
m_keyboards[0].m_buttons.emplace_back('J', CELL_KEYC_J);
m_keyboards[0].m_buttons.emplace_back('K', CELL_KEYC_K);
m_keyboards[0].m_buttons.emplace_back('L', CELL_KEYC_L);
m_keyboards[0].m_buttons.emplace_back('M', CELL_KEYC_M);
m_keyboards[0].m_buttons.emplace_back('N', CELL_KEYC_N);
m_keyboards[0].m_buttons.emplace_back('O', CELL_KEYC_O);
m_keyboards[0].m_buttons.emplace_back('P', CELL_KEYC_P);
m_keyboards[0].m_buttons.emplace_back('Q', CELL_KEYC_Q);
m_keyboards[0].m_buttons.emplace_back('R', CELL_KEYC_R);
m_keyboards[0].m_buttons.emplace_back('S', CELL_KEYC_S);
m_keyboards[0].m_buttons.emplace_back('T', CELL_KEYC_T);
m_keyboards[0].m_buttons.emplace_back('U', CELL_KEYC_U);
m_keyboards[0].m_buttons.emplace_back('V', CELL_KEYC_V);
m_keyboards[0].m_buttons.emplace_back('W', CELL_KEYC_W);
m_keyboards[0].m_buttons.emplace_back('X', CELL_KEYC_X);
m_keyboards[0].m_buttons.emplace_back('Y', CELL_KEYC_Y);
m_keyboards[0].m_buttons.emplace_back('Z', CELL_KEYC_Z);
m_keyboards[0].m_buttons.emplace_back('1', CELL_KEYC_1);
m_keyboards[0].m_buttons.emplace_back('2', CELL_KEYC_2);
m_keyboards[0].m_buttons.emplace_back('3', CELL_KEYC_3);
m_keyboards[0].m_buttons.emplace_back('4', CELL_KEYC_4);
m_keyboards[0].m_buttons.emplace_back('5', CELL_KEYC_5);
m_keyboards[0].m_buttons.emplace_back('6', CELL_KEYC_6);
m_keyboards[0].m_buttons.emplace_back('7', CELL_KEYC_7);
m_keyboards[0].m_buttons.emplace_back('8', CELL_KEYC_8);
m_keyboards[0].m_buttons.emplace_back('9', CELL_KEYC_9);
m_keyboards[0].m_buttons.emplace_back('0', CELL_KEYC_0);
m_keyboards[0].m_buttons.emplace_back(WXK_RETURN, CELL_KEYC_ENTER);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_ESC);
m_keyboards[0].m_buttons.emplace_back(WXK_TAB, CELL_KEYC_TAB);
m_keyboards[0].m_buttons.emplace_back(WXK_SPACE, CELL_KEYC_SPACE);
m_keyboards[0].m_buttons.emplace_back(WXK_SUBTRACT, CELL_KEYC_MINUS);
m_keyboards[0].m_buttons.emplace_back('=', CELL_KEYC_EQUAL_101);
m_keyboards[0].m_buttons.emplace_back('^', CELL_KEYC_ACCENT_CIRCONFLEX_106);
//m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_101);
m_keyboards[0].m_buttons.emplace_back('@', CELL_KEYC_ATMARK_106);
//m_keyboards[0].m_buttons.emplace_back(')', CELL_KEYC_RIGHT_BRACKET_101);
m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_106);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_BACKSLASH_101);
m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_RIGHT_BRACKET_106);
m_keyboards[0].m_buttons.emplace_back(';', CELL_KEYC_SEMICOLON);
m_keyboards[0].m_buttons.emplace_back('"', CELL_KEYC_QUOTATION_101);
m_keyboards[0].m_buttons.emplace_back(':', CELL_KEYC_COLON_106);
m_keyboards[0].m_buttons.emplace_back(',', CELL_KEYC_COMMA);
m_keyboards[0].m_buttons.emplace_back('.', CELL_KEYC_PERIOD);
m_keyboards[0].m_buttons.emplace_back('/', CELL_KEYC_SLASH);
m_keyboards[0].m_buttons.emplace_back('\\', CELL_KEYC_BACKSLASH_106);
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_YEN_106);
}
-15
View File
@@ -1,15 +0,0 @@
#pragma once
#include "Emu/Io/KeyboardHandler.h"
class BasicKeyboardHandler final : public KeyboardHandlerBase, public wxWindow
{
public:
virtual void Init(const u32 max_connect) override;
BasicKeyboardHandler();
void KeyDown(wxKeyEvent& event);
void KeyUp(wxKeyEvent& event);
void LoadSettings();
};
-57
View File
@@ -1,57 +0,0 @@
#include "stdafx.h"
#include "stdafx_gui.h"
#include "rpcs3.h"
#include "BasicMouseHandler.h"
void BasicMouseHandler::Init(const u32 max_connect)
{
m_mice.emplace_back(Mouse());
memset(&m_info, 0, sizeof(MouseInfo));
m_info.max_connect = max_connect;
m_info.now_connect = std::min(m_mice.size(), (size_t)max_connect);
m_info.info = 0; // Ownership of mouse data: 0=Application, 1=System
m_info.status[0] = CELL_MOUSE_STATUS_CONNECTED; // (TODO: Support for more mice)
for (u32 i = 1; i<max_connect; i++) m_info.status[i] = CELL_MOUSE_STATUS_DISCONNECTED;
m_info.vendor_id[0] = 0x1234;
m_info.product_id[0] = 0x1234;
}
BasicMouseHandler::BasicMouseHandler()
{
wxGetApp().Bind(wxEVT_LEFT_DOWN, &BasicMouseHandler::MouseButtonDown, this);
wxGetApp().Bind(wxEVT_RIGHT_DOWN, &BasicMouseHandler::MouseButtonDown, this);
wxGetApp().Bind(wxEVT_MIDDLE_DOWN, &BasicMouseHandler::MouseButtonDown, this);
wxGetApp().Bind(wxEVT_LEFT_UP, &BasicMouseHandler::MouseButtonUp, this);
wxGetApp().Bind(wxEVT_RIGHT_UP, &BasicMouseHandler::MouseButtonUp, this);
wxGetApp().Bind(wxEVT_MIDDLE_UP, &BasicMouseHandler::MouseButtonUp, this);
wxGetApp().Bind(wxEVT_MOUSEWHEEL, &BasicMouseHandler::MouseScroll, this);
wxGetApp().Bind(wxEVT_MOTION, &BasicMouseHandler::MouseMove, this);
}
void BasicMouseHandler::MouseButtonDown(wxMouseEvent& event)
{
if (event.LeftDown()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_1, 1);
else if (event.RightDown()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_2, 1);
else if (event.MiddleDown()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_3, 1);
event.Skip();
}
void BasicMouseHandler::MouseButtonUp(wxMouseEvent& event)
{
if (event.LeftUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_1, 0);
else if (event.RightUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_2, 0);
else if (event.MiddleUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_3, 0);
event.Skip();
}
void BasicMouseHandler::MouseScroll(wxMouseEvent& event)
{
MouseHandlerBase::Scroll(event.GetWheelRotation());
event.Skip();
}
void BasicMouseHandler::MouseMove(wxMouseEvent& event)
{
MouseHandlerBase::Move(event.m_x, event.m_y);
event.Skip();
}
-16
View File
@@ -1,16 +0,0 @@
#pragma once
#include "Emu/Io/MouseHandler.h"
class BasicMouseHandler final : public MouseHandlerBase, public wxWindow
{
public:
virtual void Init(const u32 max_connect) override;
BasicMouseHandler();
void MouseButtonDown(wxMouseEvent& event);
void MouseButtonUp(wxMouseEvent& event);
void MouseScroll(wxMouseEvent& event);
void MouseMove(wxMouseEvent& event);
};
+188 -75
View File
@@ -1,7 +1,65 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.0.2)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
set(RES_FILES "")
set(CMAKE_CXX_STANDARD 14)
# Qt section
find_package(Qt5 5.9 COMPONENTS Widgets)
if (WIN32)
find_package(Qt5WinExtras REQUIRED)
set(RPCS3_QT_LIBS Qt5::Widgets Qt5::WinExtras)
include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5WinExtras_INCLUDE_DIRS})
else()
set(RPCS3_QT_LIBS Qt5::Widgets)
include_directories(${Qt5Widgets_INCLUDE_DIRS})
endif()
# Let's make sure we have Qt before we continue
if (NOT Qt5Widgets_FOUND)
if (Qt5Widgets_VERSION VERSION_LESS 5.9.0)
message("Minimum supported Qt5 version is 5.9! 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-qt59-xenial
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt59-trusty
just make sure to run
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/")
else()
message(FATAL_ERROR "Look online for instructions on installing an up-to-date Qt5 on ${CMAKE_SYSTEM}.")
endif()
endif()
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.9\\msvc2017_64\\)")
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
message(FATAL_ERROR "Make sure to install your distro's qt5 package!")
else()
message(FATAL_ERROR "You need to have Qt5 installed, look online for instructions on installing Qt5 on ${CMAKE_SYSTEM}.")
endif()
endif()
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
# To make UI files on cmake 3.7 or less work
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if (Qt5_POSITION_INDEPENDENT_CODE)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(UNIX)
# Cotire needs this set for some reason
SET(CMAKE_CXX_COMPILE_OPTIONS_PIE -fPIC)
endif()
endif()
include(cotire)
project(rpcs3)
@@ -16,38 +74,49 @@ add_custom_command(OUTPUT something_that_never_exists
# Check for a sufficient compiler and set build options
include(ConfigureCompiler)
if(WIN32)
add_definitions(-DUNICODE)
add_definitions(-D_WIN32_WINNT=0x0601)
set(RES_FILES "rpcs3_.rc")
if(NOT MSVC)
set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
endif()
set(RES_FILES "rpcs3.rc")
else()
add_definitions(-DGL_GLEXT_PROTOTYPES)
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
endif()
if(NOT MSVC)
add_definitions(-DwxGUI)
if($ENV{CI})
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1") # fix for travis gcc OoM crash. Might be fixed with the move to containers.
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fexceptions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
if(WIN32)
set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
# Workaround for mingw64 (MSYS2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--allow-multiple-definition")
endif()
add_compile_options(-msse -msse2 -mcx16 -mssse3)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# This fixes 'some' of the st11range issues. See issue #2516
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -image-base=0x10000")
endif()
find_package(GLEW REQUIRED)
find_package(ZLIB REQUIRED)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:throwingNew /D _CRT_SECURE_NO_DEPRECATE=1 /D _CRT_NON_CONFORMING_SWPRINTFS=1 /D _SCL_SECURE_NO_WARNINGS=1")
endif()
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/X11/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/X11/include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
#on some Linux distros shm_unlink and similar functions are in librt only
set(ADDITIONAL_LIBS "rt" "X11")
elseif(UNIX OR NOT MSVC)
set(ADDITIONAL_LIBS "rt" "X11" "asound")
elseif(NOT MSVC AND NOT CMAKE_CXX_FLAGS MATCHES "LIBICONV_PLUG")
#it seems like glibc includes the iconv functions we use but other libc
#implementations like the one on OSX don't seem implement them
set(ADDITIONAL_LIBS "iconv")
@@ -55,42 +124,21 @@ else()
set(ADDITIONAL_LIBS "")
endif()
If(NOT RPCS3_SRC_DIR)
if(NOT RPCS3_SRC_DIR)
SET(RPCS3_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})
Message("-- Initializing RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
Else()
else()
Message("-- Using Custom RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
EndIf()
endif()
set(CMAKE_MODULE_PATH "${RPCS3_SRC_DIR}/cmake_modules")
if(NOT WIN32)
add_definitions(-DGL_GLEXT_PROTOTYPES)
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
endif()
find_package(wxWidgets COMPONENTS core base net aui gl xml REQUIRED)
if(NOT MSVC)
if(APPLE)
find_path(GLEW_INCLUDE_DIR GL/glew.h
/usr/include/GL
/usr/openwin/share/include
/usr/openwin/include
/usr/X11R6/include
/usr/include/X11
/opt/graphics/OpenGL/include
/opt/graphics/OpenGL/contrib/libglew
/usr/local/include
)
endif()
find_package(GLEW REQUIRED)
find_package(ZLIB REQUIRED)
endif()
find_package(OpenGL REQUIRED)
find_package(OpenAL REQUIRED)
find_package(LLVM 3.8 CONFIG)
if (NOT WITHOUT_LLVM)
find_package(LLVM 4.0 CONFIG)
endif()
include("${wxWidgets_USE_FILE}")
if(APPLE)
set(PLATFORM_ARCH "macosx/x86_64")
@@ -122,7 +170,6 @@ endif()
include_directories(
${GLEW_INCLUDE_DIR}
${wxWidgets_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${OPENAL_INCLUDE_DIR}
${LLVM_INCLUDE_DIRS}
@@ -134,34 +181,42 @@ ${LLVM_INCLUDE_DIRS}
"${RPCS3_SRC_DIR}/../Utilities/yaml-cpp/include"
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit"
"${RPCS3_SRC_DIR}/../3rdparty/GSL/include"
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/rsx_decompiler"
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/shader_code"
"${RPCS3_SRC_DIR}/../Vulkan/Vulkan-LoaderAndValidationLayers/include"
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/Public"
"${RPCS3_SRC_DIR}/../Vulkan/glslang/"
"${RPCS3_SRC_DIR}/../3rdparty/hidapi/hidapi"
# Includes 3rdparty stuff that isn't included yet
"${RPCS3_SRC_DIR}/../3rdparty/GL"
"${RPCS3_SRC_DIR}/../3rdparty/stblib"
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/rsx_decompiler"
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/shader_code"
"${RPCS3_SRC_DIR}/../3rdparty/cereal/include"
)
if(WIN32)
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/XAudio2_7") # Slimmed down version of minidx9 for XAudio2_7 only
# Slimmed down version of minidx9 for XAudio2_7 only
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/XAudio2_7")
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/minidx12/Include")
endif()
if(NOT LLVM_FOUND)
Message("LLVM not found! LLVM 3.8 is required. RPCS3 will be compiled without LLVM support.")
Message("LLVM 4.0 not found. RPCS3 will be compiled without LLVM support.")
else()
add_definitions(${LLVM_DEFINITIONS})
add_definitions(-DLLVM_AVAILABLE)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler)
#Use static linking for windows binary but always dynamic on *nix
if (WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler)
else()
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
endif()
else()
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
set(LLVM_LIBS LLVM)
endif()
if (NOT MSVC)
set_source_files_properties(${RPCS3_SRC_DIR}/../Utilities/JIT.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
set_source_files_properties(${RPCS3_SRC_DIR}/Emu/Cell/PPUTranslator.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
endif()
endif()
@@ -170,6 +225,7 @@ link_directories(
"${RPCS3_SRC_DIR}/../Vulkan"
)
if(NOT USE_SYSTEM_FFMPEG)
if(MSVC OR NOT WIN32)
link_directories("${RPCS3_SRC_DIR}/../3rdparty/ffmpeg/${PLATFORM_ARCH}/lib")
@@ -178,7 +234,7 @@ endif()
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
foreach(dir ${dirs})
message(STATUS "dir='${dir}'")
message(STATUS "dir='${dir}'")
endforeach()
file(
@@ -186,44 +242,81 @@ GLOB_RECURSE
RPCS3_SRC
"${RPCS3_SRC_DIR}/*.cpp"
"${RPCS3_SRC_DIR}/../Utilities/*.cpp"
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/rsx_decompiler/*.cpp"
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/shader_code/*.cpp"
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit/*.cpp"
)
if(NOT WIN32)
set (EXCLUDE_DIR "/RSX/VK/")
foreach (TMP_PATH ${RPCS3_SRC})
string (FIND ${TMP_PATH} ${EXCLUDE_DIR} EXCLUDE_DIR_FOUND)
if (NOT ${EXCLUDE_DIR_FOUND} EQUAL -1)
if (NOT WIN32 AND "${CMAKE_SYSTEM}" MATCHES "Linux")
# Compile glslang and SPIRV modules needed for glsl compilation
file(
GLOB_RECURSE
UNIX_GLSLANG
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/GenericCodeGen/*.cpp"
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/MachineIndependent/*.cpp"
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/OSDependent/Unix/*.cpp"
"${RPCS3_SRC_DIR}/../Vulkan/glslang/OGLCompilersDLL/*.cpp"
"${RPCS3_SRC_DIR}/../Vulkan/glslang/hlsl/*.cpp"
"${RPCS3_SRC_DIR}/../Vulkan/glslang/SPIRV/*.cpp"
)
set (RPCS3_SRC ${RPCS3_SRC} ${UNIX_GLSLANG})
endif()
#File exclusion section
#Ignore vulkan if not on windows or linux
if(NOT WIN32 AND NOT "${CMAKE_SYSTEM}" MATCHES "Linux")
set (EXCLUDE_FILES "/RSX/VK/")
endif()
# The Gui folder contains wxWidgets stuff, which we no longer want.
set (EXCLUDE_FILES ${EXCLUDE_FILES} "/Gui/")
# Ignore autogenerated moc_* files if present
set (EXCLUDE_FILES ${EXCLUDE_FILES} "moc_")
set (EXCLUDE_FILES ${EXCLUDE_FILES} "rpcs3_automoc")
foreach (TMP_PATH ${RPCS3_SRC})
foreach (EXCLUDE_PATH ${EXCLUDE_FILES})
string (FIND ${TMP_PATH} ${EXCLUDE_PATH} EXCLUDE_FILE_FOUND)
if (NOT ${EXCLUDE_FILE_FOUND} EQUAL -1)
list (REMOVE_ITEM RPCS3_SRC ${TMP_PATH})
endif ()
endforeach(TMP_PATH)
endforeach(EXCLUDE_PATH)
endforeach(TMP_PATH)
# Remove the Qt moc files as part of clean, they are compiled when generating automoc
file(GLOB_RECURSE TMP_MOC "${RPCS3_SRC_DIR}/moc_*.cpp" "${RPCS3_SRC_DIR}/rpcs3_automoc.cpp")
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${TMP_MOC}")
if (WIN32)
add_executable(rpcs3 WIN32 ${RPCS3_SRC} ${RES_FILES} resources.qrc)
else()
add_executable(rpcs3 ${RPCS3_SRC} ${RES_FILES} resources.qrc)
endif()
add_executable(rpcs3 ${RPCS3_SRC} ${RES_FILES})
add_dependencies(rpcs3 GitVersion)
if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
endif()
if(WIN32)
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL)
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} ${GLEW_LIBRARY} opengl32.lib glu32.lib libpthread)
else()
target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib)
endif()
target_link_libraries(rpcs3 avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS})
target_link_libraries(rpcs3 avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS})
else()
target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
target_link_libraries(rpcs3 -ldl ${ZLIB_LIBRARIES} ${ADDITIONAL_LIBS})
target_link_libraries(rpcs3 ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(rpcs3 hidapi-hidraw udev vulkan)
else()
target_link_libraries(rpcs3 hidapi-libusb usb)
endif()
target_link_libraries(rpcs3 ${CMAKE_DL_LIBS} -lpthread ${ZLIB_LIBRARIES} ${ADDITIONAL_LIBS})
if (USE_SYSTEM_FFMPEG)
link_libraries(${FFMPEG_LIBRARY_DIR})
target_link_libraries(rpcs3 libavformat.so libavcodec.so libavutil.so libswresample.so libswscale.so)
else()
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a -ldl)
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a)
endif()
if (USE_SYSTEM_LIBPNG)
target_link_libraries(rpcs3 ${PNG_LIBRARIES})
@@ -231,11 +324,31 @@ else()
target_link_libraries(rpcs3 png16_static)
endif()
endif()
# For some reason GCC 7 requires manually linking with -latomic
if (CMAKE_COMPILER_IS_GNUCC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7))
target_link_libraries(rpcs3 -latomic)
endif()
if(LLVM_FOUND)
target_link_libraries(rpcs3 ${LLVM_LIBS})
endif()
target_link_libraries(rpcs3 rsx_decompiler shader_code)
target_link_libraries(rpcs3 ${RPCS3_QT_LIBS})
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
cotire(rpcs3)
# Unix installation
if(UNIX AND NOT APPLE)
# Install the binary
install(TARGETS rpcs3 RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
# Install the application icon and menu item
install(FILES rpcs3.svg
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps)
install(FILES rpcs3.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps)
install(FILES rpcs3.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
endif()
+3 -2
View File
@@ -748,12 +748,13 @@ SELF_KEY KeyVault::FindSelfKey(u32 type, u16 revision, u64 version)
void KeyVault::SetKlicenseeKey(u8 *key)
{
memcpy(klicensee_key, key, 0x10);
klicensee_key = std::make_unique<u8[]>(0x10);
memcpy(klicensee_key.get(), key, 0x10);
}
u8 *KeyVault::GetKlicenseeKey()
{
return klicensee_key;
return klicensee_key.get();
}
void rap_to_rif(unsigned char* rap, unsigned char* rif)
+3 -2
View File
@@ -2,6 +2,7 @@
#include <string>
#include <vector>
#include <memory>
enum SELF_KEY_TYPE {
KEY_LV0 = 1,
@@ -11,7 +12,7 @@ enum SELF_KEY_TYPE {
KEY_ISO,
KEY_LDR,
KEY_UNK7,
KEY_NPDRM
KEY_NPDRM
};
struct SELF_KEY {
@@ -159,7 +160,7 @@ class KeyVault
std::vector<SELF_KEY> sk_LDR_arr;
std::vector<SELF_KEY> sk_UNK7_arr;
std::vector<SELF_KEY> sk_NPDRM_arr;
u8 klicensee_key[0x10];
std::unique_ptr<u8[]> klicensee_key;
public:
KeyVault();
+4 -3
View File
@@ -767,7 +767,7 @@ std::array<u8, 0x10> GetEdatRifKeyFromRapFile(const fs::file& rap_file)
return rifkey;
}
bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8, 0x10>& custom_klic)
bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8, 0x10>& custom_klic, std::string* contentID)
{
// Setup NPD and EDAT/SDAT structs.
NPD_HEADER NPD;
@@ -801,6 +801,8 @@ bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& inpu
return false;
}
}
*contentID = std::string(reinterpret_cast<const char*>(NPD.content_id));
return true;
}
@@ -912,8 +914,7 @@ bool EDATADecrypter::ReadHeader()
if (dec_key == std::array<u8, 0x10>{0})
{
LOG_ERROR(LOADER, "EDAT: A valid RAP file is needed for this EDAT file!");
return false;
LOG_WARNING(LOADER, "EDAT: Empty Dec key!");
}
}
else if ((npdHeader.license & 0x1) == 0x1) // Type 1: Use network activation.
+15 -6
View File
@@ -14,7 +14,7 @@ constexpr u32 EDAT_FLAG_0x10 = 0x00000010;
constexpr u32 EDAT_FLAG_0x20 = 0x00000020;
constexpr u32 EDAT_DEBUG_DATA_FLAG = 0x80000000;
struct EdatKeys_t
struct LoadedNpdrmKeys_t
{
std::array<u8, 0x10> devKlic{};
std::array<u8, 0x10> rifKey{};
@@ -44,7 +44,7 @@ struct EDAT_HEADER
// Decrypts full file, or null/empty file
extern fs::file DecryptEDAT(const fs::file& input, const std::string& input_file_name, int mode, const std::string& rap_file_name, u8 *custom_klic, bool verbose);
extern bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8,0x10>& custom_klic);
extern bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8,0x10>& custom_klic, std::string* contentID);
extern std::array<u8, 0x10> GetEdatRifKeyFromRapFile(const fs::file& rap_file);
@@ -109,11 +109,20 @@ public:
u64 seek(s64 offset, fs::seek_mode whence) override
{
return
whence == fs::seek_set ? pos = offset :
whence == fs::seek_cur ? pos = offset + pos :
whence == fs::seek_end ? pos = offset + size() :
const s64 new_pos =
whence == fs::seek_set ? offset :
whence == fs::seek_cur ? offset + pos :
whence == fs::seek_end ? offset + size() :
(fmt::raw_error("EDATADecrypter::seek(): invalid whence"), 0);
if (new_pos < 0)
{
fs::g_tls_error = fs::error::inval;
return -1;
}
pos = new_pos;
return pos;
}
u64 size() override { return file_size; }
};
+53 -17
View File
@@ -5,7 +5,7 @@
#include "unself.h"
#include "Emu/VFS.h"
// TODO: Still reliant on wxWidgets for zlib functions. Alternative solutions?
#include <algorithm>
#include <zlib.h>
inline u8 Read8(const fs::file& f)
@@ -1081,17 +1081,10 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
// If not, the data has no NPDRM layer.
if (!ctrl)
{
LOG_WARNING(LOADER, "SELF: No NPDRM control info found!");
LOG_NOTICE(LOADER, "SELF: No NPDRM control info found!");
return true;
}
u8 klicensee_key[0x10];
memcpy(klicensee_key, key_v.GetKlicenseeKey(), 0x10);
// Use klicensee if available.
if (klicensee_key != NULL)
memcpy(npdrm_key, klicensee_key, 0x10);
if (ctrl->npdrm.license == 1) // Network license.
{
LOG_ERROR(LOADER, "SELF: Can't decrypt network NPDRM!");
@@ -1108,8 +1101,11 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
}
else if (ctrl->npdrm.license == 3) // Free license.
{
// Use the NP_KLIC_FREE.
memcpy(npdrm_key, NP_KLIC_FREE, 0x10);
// Use klicensee if available.
if (key_v.GetKlicenseeKey() != nullptr)
memcpy(npdrm_key, key_v.GetKlicenseeKey(), 0x10);
else
memcpy(npdrm_key, NP_KLIC_FREE, 0x10);
}
else
{
@@ -1131,7 +1127,7 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
return true;
}
bool SELFDecrypter::LoadMetadata()
bool SELFDecrypter::LoadMetadata(u8* klic_key)
{
aes_context aes;
u32 metadata_info_size = SIZE_32(meta_info);
@@ -1150,6 +1146,10 @@ bool SELFDecrypter::LoadMetadata()
// Find the right keyset from the key vault.
SELF_KEY keyset = key_v.FindSelfKey(app_info.self_type, sce_hdr.se_flags, app_info.version);
// Set klic if given
if (klic_key)
key_v.SetKlicenseeKey(klic_key);
// Copy the necessary parameters.
u8 metadata_key[0x20];
u8 metadata_iv[0x10];
@@ -1333,9 +1333,6 @@ fs::file SELFDecrypter::MakeElf(bool isElf32)
// Decompress if necessary.
if (meta_shdr[i].compressed == 2)
{
/// Removed all wxWidget dependent code. Replaced with zlib functions.
/// Also changed local mallocs to unique_ptrs.
// Store the length in writeable memory space.
std::unique_ptr<uLongf> decomp_buf_length(new uLongf);
memcpy(decomp_buf_length.get(), &phdr64_arr[meta_shdr[i].program_idx].p_filesz, sizeof(uLongf));
@@ -1480,7 +1477,7 @@ static bool CheckDebugSelf(fs::file& s)
return false;
}
extern fs::file decrypt_self(fs::file elf_or_self)
extern fs::file decrypt_self(fs::file elf_or_self, u8* klic_key)
{
if (!elf_or_self)
{
@@ -1506,7 +1503,7 @@ extern fs::file decrypt_self(fs::file elf_or_self)
}
// Load and decrypt the SELF file metadata.
if (!self_dec.LoadMetadata())
if (!self_dec.LoadMetadata(klic_key))
{
LOG_ERROR(LOADER, "SELF: Failed to load SELF file metadata!");
return fs::file{};
@@ -1525,3 +1522,42 @@ extern fs::file decrypt_self(fs::file elf_or_self)
return elf_or_self;
}
extern bool verify_npdrm_self_headers(const fs::file& self, u8* klic_key)
{
if (!self)
return false;
self.seek(0);
if (self.size() >= 4 && self.read<u32>() == "SCE\0"_u32)
{
// Check the ELF file class (32 or 64 bit).
bool isElf32 = IsSelfElf32(self);
// Start the decrypter on this SELF file.
SELFDecrypter self_dec(self);
// Load the SELF file headers.
if (!self_dec.LoadHeaders(isElf32))
{
LOG_ERROR(LOADER, "SELF: Failed to load SELF file headers!");
return false;
}
// Load and decrypt the SELF file metadata.
if (!self_dec.LoadMetadata(klic_key))
{
LOG_ERROR(LOADER, "SELF: Failed to load SELF file metadata!");
return false;
}
}
return true;
}
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;
}
+4 -2
View File
@@ -410,10 +410,12 @@ public:
fs::file MakeElf(bool isElf32);
bool LoadHeaders(bool isElf32);
void ShowHeaders(bool isElf32);
bool LoadMetadata();
bool LoadMetadata(u8* klic_key);
bool DecryptData();
bool DecryptNPDRM(u8 *metadata, u32 metadata_size);
bool GetKeyFromRap(u8 *content_id, u8 *npdrm_key);
};
extern fs::file decrypt_self(fs::file elf_or_self);
extern fs::file decrypt_self(fs::file elf_or_self, u8* klic_key = nullptr);
extern bool verify_npdrm_self_headers(const fs::file& self, u8* klic_key = nullptr);
extern std::array<u8, 0x10> get_default_self_klic();
+6 -11
View File
@@ -3,6 +3,7 @@
// http://www.gnu.org/licenses/gpl-3.0.txt
#include "utils.h"
#include <cstring>
#include <stdio.h>
#include <time.h>
@@ -51,28 +52,22 @@ u64 hex_to_u64(const char* hex_str)
return result;
}
void hex_to_bytes(unsigned char *data, const char *hex_str, unsigned int str_length)
void hex_to_bytes(unsigned char* data, const char* hex_str, unsigned int str_length)
{
u32 strn_length = (str_length > 0) ? str_length : (u32) strlen(hex_str);
u32 strn_length = (str_length > 0) ? str_length : (u32)std::strlen(hex_str);
u32 data_length = strn_length / 2;
char tmp_buf[3] = {0, 0, 0};
// Don't convert if the string length is odd.
if (!(strn_length % 2))
if ((strn_length % 2) == 0)
{
auto out = std::make_unique<u8[]>(strn_length * sizeof(u8));
u8 *pos = out.get();
while (strn_length--)
while (data_length--)
{
tmp_buf[0] = *hex_str++;
tmp_buf[1] = *hex_str++;
*pos++ = (u8)(hex_to_u64(tmp_buf) & 0xFF);
*data++ = (u8)(hex_to_u64(tmp_buf) & 0xFF);
}
// Copy back to our array.
memcpy(data, out.get(), data_length);
}
}
+2 -27
View File
@@ -31,7 +31,7 @@
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -61,31 +61,6 @@
<Import Project="..\rpcs3_llvm.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Emu\RSX\D3D12\D3D12Utils.h" />
<ClInclude Include="Emu\RSX\D3D12\D3D12CommonDecompiler.h" />
@@ -121,4 +96,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
+11 -5
View File
@@ -1,11 +1,8 @@
#include "stdafx.h"
#include "Utilities/Config.h"
#include "Emu/System.h"
#include "OpenALThread.h"
extern cfg::bool_entry g_cfg_audio_convert_to_u16;
#ifdef _MSC_VER
#pragma comment(lib, "OpenAL32.lib")
#endif
@@ -44,6 +41,15 @@ OpenALThread::OpenALThread()
alcMakeContextCurrent(m_context);
checkForAlcError("alcMakeContextCurrent");
if (g_cfg.audio.downmix_to_2ch)
{
m_format = g_cfg.audio.convert_to_u16 ? AL_FORMAT_STEREO16 : AL_FORMAT_STEREO_FLOAT32;
}
else
{
m_format = g_cfg.audio.convert_to_u16 ? AL_FORMAT_71CHN16 : AL_FORMAT_71CHN32;
}
}
OpenALThread::~OpenALThread()
@@ -102,7 +108,7 @@ void OpenALThread::Open(const void* src, int size)
for (uint i = 0; i<g_al_buffers_count; ++i)
{
alBufferData(m_buffers[i], g_cfg_audio_convert_to_u16 ? AL_FORMAT_71CHN16 : AL_FORMAT_71CHN32, src, m_buffer_size, 48000);
alBufferData(m_buffers[i], m_format, src, m_buffer_size, 48000);
checkForAlError("alBufferData");
}
@@ -137,7 +143,7 @@ void OpenALThread::AddData(const void* src, int size)
int bsize = size < m_buffer_size ? size : m_buffer_size;
alBufferData(buffer, g_cfg_audio_convert_to_u16 ? AL_FORMAT_71CHN16 : AL_FORMAT_71CHN32, bsrc, bsize, 48000);
alBufferData(buffer, m_format, bsrc, bsize, 48000);
checkForAlError("alBufferData");
alSourceQueueBuffers(m_source, 1, &buffer);
+1
View File
@@ -8,6 +8,7 @@ class OpenALThread : public AudioThread
private:
static const uint g_al_buffers_count = 24;
ALint m_format;
ALuint m_source;
ALuint m_buffers[g_al_buffers_count];
ALsizei m_buffer_size;
+134
View File
@@ -0,0 +1,134 @@
#include "stdafx.h"
#include "Utilities/GSL.h"
#include "Emu/System.h"
#include "ALSAThread.h"
#ifdef __linux__
#include <alsa/asoundlib.h>
static thread_local snd_pcm_t* s_tls_handle{nullptr};
static void error(int err, const char* reason)
{
fprintf(stderr, "ALSA: %s failed: %s\n", reason, snd_strerror(err));
}
static bool check(int err, const char* reason)
{
if (err < 0)
{
error(err, reason);
return false;
}
return true;
}
ALSAThread::ALSAThread()
{
snd_pcm_hw_params_t* hw_params{nullptr};
auto at_ret = gsl::finally([&]()
{
if (hw_params)
{
snd_pcm_hw_params_free(hw_params);
}
});
if (!check(snd_pcm_open(&s_tls_handle, "default", SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK), "snd_pcm_open"))
return;
if (!check(snd_pcm_hw_params_malloc(&hw_params), "snd_pcm_hw_params_malloc"))
return;
if (!check(snd_pcm_hw_params_any(s_tls_handle, hw_params), "snd_pcm_hw_params_any"))
return;
if (!check(snd_pcm_hw_params_set_access(s_tls_handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED), "snd_pcm_hw_params_set_access"))
return;
if (!check(snd_pcm_hw_params_set_format(s_tls_handle, hw_params, g_cfg.audio.convert_to_u16 ? SND_PCM_FORMAT_S16_LE : SND_PCM_FORMAT_FLOAT_LE), "snd_pcm_hw_params_set_format"))
return;
if (!check(snd_pcm_hw_params_set_rate(s_tls_handle, hw_params, 48000, 0), "snd_pcm_hw_params_set_rate_near"))
return;
if (!check(snd_pcm_hw_params_set_channels(s_tls_handle, hw_params, g_cfg.audio.downmix_to_2ch ? 2 : 8), "snd_pcm_hw_params_set_channels"))
return;
if (!check(snd_pcm_hw_params_set_buffer_size(s_tls_handle, hw_params, 8 * 256), "snd_pcm_hw_params_set_buffer_size"))
return;
if (!check(snd_pcm_hw_params_set_period_size(s_tls_handle, hw_params, 256, 0), "snd_pcm_hw_params_set_period_size"))
return;
//if (!check(snd_pcm_hw_params_set_periods(s_tls_handle, hw_params, 2, 0), "snd_pcm_hw_params_set_periods"))
// return;
if (!check(snd_pcm_hw_params(s_tls_handle, hw_params), "snd_pcm_hw_params"))
return;
if (!check(snd_pcm_prepare(s_tls_handle), "snd_pcm_prepare"))
return;
}
ALSAThread::~ALSAThread()
{
if (s_tls_handle)
{
snd_pcm_close(s_tls_handle);
}
}
void ALSAThread::Play()
{
}
void ALSAThread::Close()
{
}
void ALSAThread::Stop()
{
}
void ALSAThread::Open(const void* src, int size)
{
AddData(src, size);
}
void ALSAThread::AddData(const void* src, int size)
{
size /= g_cfg.audio.convert_to_u16 ? 2 : 4;
size /= g_cfg.audio.downmix_to_2ch ? 2 : 8;
int res;
while (true)
{
res = snd_pcm_writei(s_tls_handle, src, size);
if (res == -EAGAIN)
{
continue;
}
else if (res == -EPIPE)
{
snd_pcm_prepare(s_tls_handle);
}
else
{
break;
}
}
if (res != size)
{
error(res, "snd_pcm_writei");
}
}
#endif
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#ifdef __linux__
#include "Emu/Audio/AudioThread.h"
class ALSAThread : public AudioThread
{
public:
ALSAThread();
virtual ~ALSAThread() override;
virtual void Play() override;
virtual void Open(const void* src, int size) override;
virtual void Close() override;
virtual void Stop() override;
virtual void AddData(const void* src, int size) override;
};
#endif
+5 -8
View File
@@ -2,14 +2,11 @@
#include "Utilities/Log.h"
#include "Utilities/StrFmt.h"
#include "Utilities/Config.h"
#include "Emu/System.h"
#include "XAudio2Thread.h"
#include "3rdparty/XAudio2_7/XAudio2.h"
extern cfg::bool_entry g_cfg_audio_convert_to_u16;
static thread_local HMODULE s_tls_xaudio2_lib{};
static thread_local IXAudio2* s_tls_xaudio2_instance{};
static thread_local IXAudio2MasteringVoice* s_tls_master_voice{};
@@ -37,7 +34,7 @@ void XAudio2Thread::xa27_init(void* lib2_7)
return;
}
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, 8, 48000);
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, g_cfg.audio.downmix_to_2ch ? 2 : 8, 48000);
if (FAILED(hr))
{
LOG_ERROR(GENERAL, "XAudio2Thread : CreateMasteringVoice() failed(0x%08x)", (u32)hr);
@@ -104,11 +101,11 @@ void XAudio2Thread::xa27_open()
{
HRESULT hr;
WORD sample_size = g_cfg_audio_convert_to_u16 ? sizeof(u16) : sizeof(float);
WORD channels = 8;
WORD sample_size = g_cfg.audio.convert_to_u16 ? sizeof(u16) : sizeof(float);
WORD channels = g_cfg.audio.downmix_to_2ch ? 2 : 8;
WAVEFORMATEX waveformatex;
waveformatex.wFormatTag = g_cfg_audio_convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
waveformatex.wFormatTag = g_cfg.audio.convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
waveformatex.nChannels = channels;
waveformatex.nSamplesPerSec = 48000;
waveformatex.nAvgBytesPerSec = 48000 * (DWORD)channels * (DWORD)sample_size;
@@ -124,7 +121,7 @@ void XAudio2Thread::xa27_open()
return;
}
s_tls_source_voice->SetVolume(4.0);
s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0 : 4.0);
}
void XAudio2Thread::xa27_add(const void* src, int size)
+5 -8
View File
@@ -2,14 +2,11 @@
#include "Utilities/Log.h"
#include "Utilities/StrFmt.h"
#include "Utilities/Config.h"
#include "Emu/System.h"
#include "XAudio2Thread.h"
#include "3rdparty/minidx12/Include/xaudio2.h"
extern cfg::bool_entry g_cfg_audio_convert_to_u16;
static thread_local HMODULE s_tls_xaudio2_lib{};
static thread_local IXAudio2* s_tls_xaudio2_instance{};
static thread_local IXAudio2MasteringVoice* s_tls_master_voice{};
@@ -39,7 +36,7 @@ void XAudio2Thread::xa28_init(void* lib)
return;
}
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, 8, 48000);
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, g_cfg.audio.downmix_to_2ch ? 2 : 8, 48000);
if (FAILED(hr))
{
LOG_ERROR(GENERAL, "XAudio2Thread : CreateMasteringVoice() failed(0x%08x)", (u32)hr);
@@ -106,11 +103,11 @@ void XAudio2Thread::xa28_open()
{
HRESULT hr;
WORD sample_size = g_cfg_audio_convert_to_u16 ? sizeof(u16) : sizeof(float);
WORD channels = 8;
WORD sample_size = g_cfg.audio.convert_to_u16 ? sizeof(u16) : sizeof(float);
WORD channels = g_cfg.audio.downmix_to_2ch ? 2 : 8;
WAVEFORMATEX waveformatex;
waveformatex.wFormatTag = g_cfg_audio_convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
waveformatex.wFormatTag = g_cfg.audio.convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
waveformatex.nChannels = channels;
waveformatex.nSamplesPerSec = 48000;
waveformatex.nAvgBytesPerSec = 48000 * (DWORD)channels * (DWORD)sample_size;
@@ -126,7 +123,7 @@ void XAudio2Thread::xa28_open()
return;
}
s_tls_source_voice->SetVolume(4.0);
s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0 : 4.0);
}
void XAudio2Thread::xa28_add(const void* src, int size)
+13 -1
View File
@@ -2,6 +2,12 @@
#include "Emu/System.h"
#include "Emu/Memory/vm.h"
#include "CPUThread.h"
#include "Emu/IdManager.h"
#include "Utilities/GDBDebugServer.h"
#ifdef _WIN32
#include <Windows.h>
#endif
DECLARE(cpu_thread::g_threads_created){0};
DECLARE(cpu_thread::g_threads_deleted){0};
@@ -92,6 +98,12 @@ cpu_thread::cpu_thread(u32 id)
bool cpu_thread::check_state()
{
#ifdef WITH_GDB_DEBUGGER
if (test(state, cpu_flag::dbg_pause)) {
fxm::get<GDBDebugServer>()->notify();
}
#endif
bool cpu_sleep_called = false;
bool cpu_flag_memory = false;
@@ -123,7 +135,7 @@ bool cpu_thread::check_state()
if (cpu_flag_memory) vm::passive_lock(*this);
break;
}
else if (!cpu_sleep_called)
else if (!cpu_sleep_called && test(state, cpu_flag::suspend))
{
cpu_sleep();
cpu_sleep_called = true;
+6
View File
@@ -8,3 +8,9 @@ enum FPSCR_RN
FPSCR_RN_PINF = 2,
FPSCR_RN_MINF = 3,
};
// Get the exponent of a float
inline int fexpf(float x)
{
return ((u32&)x >> 23) & 0xFF;
}
+4 -9
View File
@@ -1,18 +1,13 @@
#pragma once
struct CellOk
enum CellNotAnError : s32
{
enum : s32
{
__not_an_error,
CELL_OK = 0,
CELL_CANCEL = 1,
CELL_OK = 0
};
__not_an_error
};
// Temporary workaround
constexpr auto CELL_OK = CellOk::CELL_OK;
enum CellError : u32
{
CELL_EAGAIN = 0x80010001, // The resource is temporarily unavailable
+2
View File
@@ -142,6 +142,8 @@ void mfc_thread::cpu_task()
cmd.size = 0;
no_updates = 0;
vm::reservation_acquire(cmd.eal, 128);
// Store unconditionally
vm::writer_lock lock(0);
data = to_write;
+1 -1
View File
@@ -19,7 +19,7 @@ extern "C"
extern std::mutex g_mutex_avcodec_open2;
logs::channel cellAdec("cellAdec", logs::level::notice);
logs::channel cellAdec("cellAdec");
class AudioDecoder : public ppu_thread
{
+1 -1
View File
@@ -4,7 +4,7 @@
#include "cellAtrac.h"
logs::channel cellAtrac("cellAtrac", logs::level::notice);
logs::channel cellAtrac("cellAtrac");
s32 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
{
+1 -1
View File
@@ -4,7 +4,7 @@
#include "cellAtracMulti.h"
logs::channel cellAtracMulti("cellAtracMulti", logs::level::notice);
logs::channel cellAtracMulti("cellAtracMulti");
s32 cellAtracMultiSetDataAndGetMemSize(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, u32 uiOutputChNum, vm::ptr<s32> piTrackArray, vm::ptr<u32> puiWorkMemByte)
{
+41 -28
View File
@@ -1,5 +1,4 @@
#include "stdafx.h"
#include "Utilities/Config.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/PPUModule.h"
@@ -11,10 +10,7 @@
#include <thread>
logs::channel cellAudio("cellAudio", logs::level::notice);
cfg::bool_entry g_cfg_audio_dump_to_file(cfg::root.audio, "Dump to file");
cfg::bool_entry g_cfg_audio_convert_to_u16(cfg::root.audio, "Convert to 16 bit");
logs::channel cellAudio("cellAudio");
void audio_config::on_init(const std::shared_ptr<void>& _this)
{
@@ -33,22 +29,22 @@ void audio_config::on_init(const std::shared_ptr<void>& _this)
void audio_config::on_task()
{
AudioDumper m_dump(g_cfg_audio_dump_to_file ? 2 : 0); // Init AudioDumper for 2 channels if enabled
AudioDumper m_dump(g_cfg.audio.dump_to_file ? 2 : 0); // Init AudioDumper for 2 channels if enabled
float buf2ch[2 * BUFFER_SIZE]{}; // intermediate buffer for 2 channels
float buf8ch[8 * BUFFER_SIZE]{}; // intermediate buffer for 8 channels
static const size_t out_buffer_size = 8 * BUFFER_SIZE; // output buffer for 8 channels
const u32 buf_sz = BUFFER_SIZE * (g_cfg.audio.convert_to_u16 ? 2 : 4) * (g_cfg.audio.downmix_to_2ch ? 2 : 8);
std::unique_ptr<float[]> out_buffer[BUFFER_NUM];
for (u32 i = 0; i < BUFFER_NUM; i++)
{
out_buffer[i].reset(new float[out_buffer_size] {});
out_buffer[i].reset(new float[8 * BUFFER_SIZE] {});
}
const auto audio = Emu.GetCallbacks().get_audio();
audio->Open(buf8ch, out_buffer_size * (g_cfg_audio_convert_to_u16 ? 2 : 4));
audio->Open(buf8ch, buf_sz);
while (fxm::check<audio_config>() && !Emu.IsStopped())
{
@@ -225,16 +221,20 @@ void audio_config::on_task()
if (!first_mix)
{
// copy output data (2 ch)
//for (u32 i = 0; i < (sizeof(buf2ch) / sizeof(float)); i++)
//{
// out_buffer[out_pos][i] = buf2ch[i];
//}
// copy output data (8 ch)
for (u32 i = 0; i < (sizeof(buf8ch) / sizeof(float)); i++)
// Copy output data (2ch or 8ch)
if (g_cfg.audio.downmix_to_2ch)
{
out_buffer[out_pos][i] = buf8ch[i];
for (u32 i = 0; i < (sizeof(buf2ch) / sizeof(float)); i++)
{
out_buffer[out_pos][i] = buf2ch[i];
}
}
else
{
for (u32 i = 0; i < (sizeof(buf8ch) / sizeof(float)); i++)
{
out_buffer[out_pos][i] = buf8ch[i];
}
}
}
@@ -242,10 +242,10 @@ void audio_config::on_task()
if (first_mix)
{
memset(out_buffer[out_pos].get(), 0, out_buffer_size * sizeof(float));
std::memset(out_buffer[out_pos].get(), 0, 8 * BUFFER_SIZE * sizeof(float));
}
if (g_cfg_audio_convert_to_u16)
if (g_cfg.audio.convert_to_u16)
{
// convert the data from float to u16 with clipping:
// 2x MULPS
@@ -254,20 +254,21 @@ void audio_config::on_task()
// 2x CVTPS2DQ (converts float to s32)
// PACKSSDW (converts s32 to s16 with signed saturation)
u16 buf_u16[out_buffer_size];
for (size_t i = 0; i < out_buffer_size; i += 8)
__m128i buf_u16[BUFFER_SIZE];
for (size_t i = 0; i < 8 * BUFFER_SIZE; i += 8)
{
const auto scale = _mm_set1_ps(0x8000);
(__m128i&)(buf_u16[i]) = _mm_packs_epi32(
buf_u16[i / 8] = _mm_packs_epi32(
_mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(out_buffer[out_pos].get() + i), scale)),
_mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(out_buffer[out_pos].get() + i + 4), scale)));
}
audio->AddData(buf_u16, out_buffer_size * sizeof(u16));
audio->AddData(buf_u16, buf_sz);
}
else
{
audio->AddData(out_buffer[out_pos].get(), out_buffer_size * sizeof(float));
audio->AddData(out_buffer[out_pos].get(), buf_sz);
}
const u64 stamp2 = get_system_time();
@@ -840,7 +841,11 @@ s32 cellAudioAdd2chData(u32 portNum, vm::ptr<float> src, u32 samples, float volu
if (port.channel == 2)
{
cellAudio.error("cellAudioAdd2chData(portNum=%d): port.channel = 2", portNum);
for (u32 i = 0; i < samples; i++)
{
dst[i * 2 + 0] += src[i * 2 + 0] * volume; // mix L ch
dst[i * 2 + 1] += src[i * 2 + 1] * volume; // mix R ch
}
}
else if (port.channel == 6)
{
@@ -896,9 +901,17 @@ s32 cellAudioAdd6chData(u32 portNum, vm::ptr<float> src, float volume)
const auto dst = vm::ptr<float>::make(port.addr.addr() + s32(port.tag % port.block) * port.channel * 256 * SIZE_32(float));
if (port.channel == 2 || port.channel == 6)
if (port.channel == 6)
{
cellAudio.error("cellAudioAdd2chData(portNum=%d): port.channel = %d", portNum, port.channel);
for (u32 i = 0; i < 256; i++)
{
dst[i * 6 + 0] += src[i * 6 + 0] * volume; // mix L ch
dst[i * 6 + 1] += src[i * 6 + 1] * volume; // mix R ch
dst[i * 6 + 2] += src[i * 6 + 2] * volume; // mix center
dst[i * 6 + 3] += src[i * 6 + 3] * volume; // mix LFE
dst[i * 6 + 4] += src[i * 6 + 4] * volume; // mix rear L
dst[i * 6 + 5] += src[i * 6 + 5] * volume; // mix rear R
}
}
else if (port.channel == 8)
{
+29 -15
View File
@@ -5,39 +5,46 @@
#include "cellAudioIn.h"
#include "cellAudioOut.h"
#include "cellVideoOut.h"
#include "cellSysutil.h"
logs::channel cellAvconfExt("cellAvconfExt", logs::level::notice);
logs::channel cellAvconfExt("cellAvconfExt");
vm::gvar<f32> g_gamma; // TODO
s32 cellAudioOutUnregisterDevice()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellAudioOutGetDeviceInfo2()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellVideoOutSetXVColor()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellVideoOutSetupDisplay()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellAudioInGetDeviceInfo()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellVideoOutConvertCursorColor()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellVideoOutGetGamma(u32 videoOut, vm::ptr<f32> gamma)
@@ -56,12 +63,14 @@ s32 cellVideoOutGetGamma(u32 videoOut, vm::ptr<f32> gamma)
s32 cellAudioInGetAvailableDeviceInfo()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellAudioOutGetAvailableDeviceInfo()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
@@ -85,27 +94,32 @@ s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
s32 cellAudioOutRegisterDevice()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellAudioOutSetDeviceMode()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellAudioInSetDeviceMode()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellAudioInRegisterDevice()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellAudioInUnregisterDevice()
{
fmt::throw_exception("Unimplemented" HERE);
UNIMPLEMENTED_FUNC(cellAvconfExt);
return CELL_OK;
}
s32 cellVideoOutGetScreenSize(u32 videoOut, vm::ptr<float> screenSize)
@@ -132,7 +146,7 @@ s32 cellVideoOutGetScreenSize(u32 videoOut, vm::ptr<float> screenSize)
DECLARE(ppu_module_manager::cellAvconfExt)("cellSysutilAvconfExt", []()
{
REG_VNID(cellSysutilAvconfExt, 0x00000000, g_gamma).init = []
REG_VNID(cellSysutilAvconfExt, 0x00000000u, g_gamma).init = []
{
// Test
*g_gamma = 1.0f;
+20 -27
View File
@@ -2,40 +2,33 @@
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
logs::channel cellBGDL("cellBGDL", logs::level::notice);
#include "cellBgdl.h"
// Return Codes
enum
{
CELL_BGDL_UTIL_RET_OK = 0x00000000,
CELL_BGDL_UTIL_ERROR_BUSY = 0x8002ce01,
CELL_BGDL_UTIL_ERROR_INTERNAL = 0x8002ce02,
CELL_BGDL_UTIL_ERROR_PARAM = 0x8002ce03,
CELL_BGDL_UTIL_ERROR_ACCESS_ERROR = 0x8002ce04,
CELL_BGDL_UTIL_ERROR_INITIALIZE = 0x8002ce05,
};
namespace vm { using namespace ps3; }
s32 cellBGDLGetInfo()
logs::channel cellBGDL("cellBGDL");
s32 cellBGDLGetInfo(vm::cptr<char> content_id, vm::ptr<CellBGDLInfo> info, s32 num)
{
UNIMPLEMENTED_FUNC(cellBGDL);
cellBGDL.todo("cellBGDLGetInfo(content_id=%s, info=*0x%x, num=%d)", content_id, info, num);
return 0;
}
s32 cellBGDLGetInfo2(vm::cptr<char> service_id, vm::ptr<CellBGDLInfo> info, s32 num)
{
cellBGDL.todo("cellBGDLGetInfo2(service_id=%s, info=*0x%x, num=%d)", service_id, info, num);
return 0;
}
s32 cellBGDLSetMode(CellBGDLMode mode)
{
cellBGDL.todo("cellBGDLSetMode(mode=%d)", (s32) mode);
return CELL_OK;
}
s32 cellBGDLGetInfo2()
s32 cellBGDLGetMode(vm::ptr<CellBGDLMode> mode)
{
UNIMPLEMENTED_FUNC(cellBGDL);
return CELL_OK;
}
s32 cellBGDLSetMode()
{
UNIMPLEMENTED_FUNC(cellBGDL);
return CELL_OK;
}
s32 cellBGDLGetMode()
{
UNIMPLEMENTED_FUNC(cellBGDL);
cellBGDL.todo("cellBGDLGetMode(mode=*0x%x)", mode);
return CELL_OK;
}
+34
View File
@@ -0,0 +1,34 @@
#pragma once
// Return Codes
enum
{
CELL_BGDL_UTIL_ERROR_BUSY = 0x8002ce01,
CELL_BGDL_UTIL_ERROR_INTERNAL = 0x8002ce02,
CELL_BGDL_UTIL_ERROR_PARAM = 0x8002ce03,
CELL_BGDL_UTIL_ERROR_ACCESS_ERROR = 0x8002ce04,
CELL_BGDL_UTIL_ERROR_INITIALIZE = 0x8002ce05,
};
enum CellBGDLState : s32
{
CELL_BGDL_STATE_ERROR = 0,
CELL_BGDL_STATE_PAUSE,
CELL_BGDL_STATE_READY,
CELL_BGDL_STATE_RUN,
CELL_BGDL_STATE_COMPLETE,
};
enum CellBGDLMode : s32
{
CELL_BGDL_MODE_AUTO = 0,
CELL_BGDL_MODE_ALWAYS_ALLOW,
};
struct CellBGDLInfo
{
be_t<u64> received_size;
be_t<u64> content_size;
be_t<s32> state; // CellBGDLState
vm::ps3::bptr<void> reserved;
};
+44 -23
View File
@@ -1,26 +1,43 @@
#include "stdafx.h"
#include "Utilities/Config.h"
#include "Emu/IdManager.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
#include "cellCamera.h"
logs::channel cellCamera("cellCamera", logs::level::notice);
logs::channel cellCamera("cellCamera");
cfg::map_entry<bool> g_cfg_camera(cfg::root.io, "Camera",
template <>
void fmt_class_string<camera_handler>::format(std::string& out, u64 arg)
{
{ "Null", false },
{ "Fake", true },
});
format_enum(out, arg, [](auto value)
{
switch (value)
{
case camera_handler::null: return "Null";
case camera_handler::fake: return "Fake";
}
cfg::map_entry<CellCameraType> g_cfg_camera_type(cfg::root.io, "Camera type",
return unknown;
});
}
template <>
void fmt_class_string<fake_camera_type>::format(std::string& out, u64 arg)
{
{ "Unknown", CELL_CAMERA_TYPE_UNKNOWN },
{ "EyeToy", CELL_CAMERA_EYETOY },
{ "PS Eye", CELL_CAMERA_EYETOY2 },
{ "UVC 1.1", CELL_CAMERA_USBVIDEOCLASS },
});
format_enum(out, arg, [](auto value)
{
switch (value)
{
case fake_camera_type::unknown: return "Unknown";
case fake_camera_type::eyetoy: return "EyeToy";
case fake_camera_type::eyetoy2: return "PS Eye";
case fake_camera_type::uvc1_1: return "UVC 1.1";
}
return unknown;
});
}
static const char* get_camera_attr_name(s32 value)
{
@@ -95,7 +112,7 @@ s32 cellCameraInit()
{
cellCamera.warning("cellCameraInit()");
if (!g_cfg_camera.get())
if (g_cfg.io.camera == camera_handler::null)
{
return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND;
}
@@ -107,9 +124,9 @@ s32 cellCameraInit()
return CELL_CAMERA_ERROR_ALREADY_INIT;
}
switch (g_cfg_camera_type.get())
switch (g_cfg.io.camera_type)
{
case CELL_CAMERA_EYETOY:
case fake_camera_type::eyetoy:
{
camera->attr[CELL_CAMERA_SATURATION] = { 164 };
camera->attr[CELL_CAMERA_BRIGHTNESS] = { 96 };
@@ -125,10 +142,10 @@ s32 cellCameraInit()
camera->attr[CELL_CAMERA_MIRRORFLAG] = { 1 };
camera->attr[CELL_CAMERA_422FLAG] = { 1 };
camera->attr[CELL_CAMERA_USBLOAD] = { 4 };
break;
}
break;
case CELL_CAMERA_EYETOY2:
case fake_camera_type::eyetoy2:
{
camera->attr[CELL_CAMERA_SATURATION] = { 64 };
camera->attr[CELL_CAMERA_BRIGHTNESS] = { 8 };
@@ -145,11 +162,8 @@ s32 cellCameraInit()
camera->attr[CELL_CAMERA_PIXELOUTLIERFILTER] = { 1 };
camera->attr[CELL_CAMERA_AGCLOW] = { 48 };
camera->attr[CELL_CAMERA_AGCHIGH] = { 64 };
break;
}
break;
default: break;
}
// TODO: Some other default attributes? Need to check the actual behaviour on a real PS3.
@@ -204,7 +218,14 @@ s32 cellCameraGetType(s32 dev_num, vm::ptr<s32> type)
return CELL_CAMERA_ERROR_NOT_INIT;
}
*type = g_cfg_camera_type.get();
switch (g_cfg.io.camera_type)
{
case fake_camera_type::unknown: *type = CELL_CAMERA_TYPE_UNKNOWN; break;
case fake_camera_type::eyetoy: *type = CELL_CAMERA_EYETOY; break;
case fake_camera_type::eyetoy2: *type = CELL_CAMERA_EYETOY2; break;
case fake_camera_type::uvc1_1: *type = CELL_CAMERA_USBVIDEOCLASS; break;
}
return CELL_OK;
}
@@ -218,7 +239,7 @@ s32 cellCameraIsAttached(s32 dev_num)
{
cellCamera.warning("cellCameraIsAttached(dev_num=%d)", dev_num);
if (g_cfg_camera.get())
if (g_cfg.io.camera == camera_handler::fake)
{
return 1;
}
+1 -1
View File
@@ -4,7 +4,7 @@
#include "cellCelp8Enc.h"
logs::channel cellCelp8Enc("cellCelp8Enc", logs::level::notice);
logs::channel cellCelp8Enc("cellCelp8Enc");
s32 cellCelp8EncQueryAttr()
+1 -1
View File
@@ -4,7 +4,7 @@
#include "cellCelpEnc.h"
logs::channel cellCelpEnc("cellCelpEnc", logs::level::notice);
logs::channel cellCelpEnc("cellCelpEnc");
s32 cellCelpEncQueryAttr()
@@ -0,0 +1,17 @@
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
logs::channel cellCrossController("cellCrossController");
s32 cellCrossController_37E1F502() // LittleBigPlanet 2 and 3
{
cellCrossController.todo("cellCrossController_37E1F502");
return CELL_OK;
}
DECLARE(ppu_module_manager::cellCrossController)("cellCrossController", []()
{
REG_FNID(cellCrossController, 0x37E1F502, cellCrossController_37E1F502);
});
+83 -221
View File
@@ -3,264 +3,124 @@
#include "cellDaisy.h"
logs::channel cellDaisy("cellDaisy", logs::level::notice);
logs::channel cellDaisy("cellDaisy");
s32 _ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE()
using LFQueue2 = struct CellDaisyLFQueue2;
using Lock = struct CellDaisyLock;
using ScatterGatherInterlock = struct CellDaisyScatterGatherInterlock;
using AtomicInterlock = volatile struct CellDaisyAtomicInterlock;
s32 cellDaisyLFQueue2GetPopPointer(vm::ptr<LFQueue2> queue, vm::ptr<s32> pPointer, u32 isBlocking)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij()
s32 cellDaisyLFQueue2CompletePopPointer(vm::ptr<LFQueue2> queue, s32 pointer, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal, u32 isQueueFull)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock15completeConsumeEj()
void cellDaisyLFQueue2PushOpen(vm::ptr<LFQueue2> queue)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy9_snprintfEPcjPKcz()
s32 cellDaisyLFQueue2PushClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock7popOpenEv()
void cellDaisyLFQueue2PopOpen(vm::ptr<LFQueue2> queue)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj()
s32 cellDaisyLFQueue2PopClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlock7releaseEv()
s32 cellDaisyLFQueue2HasUnfinishedConsumer(vm::ptr<LFQueue2> queue, u32 isCancelled)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock7popOpenEv()
s32 cellDaisy_snprintf(vm::ptr<char> buffer, u32 count, vm::cptr<char> fmt, ppu_va_args_t fmt_args)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh()
s32 cellDaisyLock_initialize(vm::ptr<Lock> _this, u32 depth)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh()
s32 cellDaisyLock_getNextHeadPointer(vm::ptr<Lock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy9_snprintfEPcjPKcz()
s32 cellDaisyLock_getNextTailPointer(vm::ptr<Lock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej()
s32 cellDaisyLock_completeConsume(vm::ptr<Lock> _this, u32 pointer)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock18getNextHeadPointerEv()
s32 cellDaisyLock_completeProduce(vm::ptr<Lock> _this, u32 pointer)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock10initializeEj()
s32 cellDaisyLock_pushOpen(vm::ptr<Lock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
s32 cellDaisyLock_pushClose(vm::ptr<Lock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh()
s32 cellDaisyLock_popOpen(vm::ptr<Lock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock15completeProduceEj()
s32 cellDaisyLock_popClose(vm::ptr<Lock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E()
void cellDaisyScatterGatherInterlock_1(vm::ptr<ScatterGatherInterlock> _this, vm::ptr<AtomicInterlock> ea, u32 size, vm::ptr<void> eaSignal, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE()
void cellDaisyScatterGatherInterlock_2(vm::ptr<ScatterGatherInterlock> _this, u32 size, vm::ptr<u32> ids, u32 numSpus, u8 spup)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock8popCloseEv()
void cellDaisyScatterGatherInterlock_9tor(vm::ptr<ScatterGatherInterlock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock8popCloseEv()
s32 cellDaisyScatterGatherInterlock_probe(vm::ptr<ScatterGatherInterlock> _this, u32 isBlocking)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlockD2Ev()
s32 cellDaisyScatterGatherInterlock_release(vm::ptr<ScatterGatherInterlock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock18getNextTailPointerEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock8pushOpenEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock9pushCloseEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlockD2Ev()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlockD1Ev()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock10initializeEj()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock15completeProduceEj()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy4Lock15completeConsumeEj()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock18getNextHeadPointerEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock9pushCloseEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy22ScatterGatherInterlock5probeEj()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock8pushOpenEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlock5probeEj()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlockD1Ev()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _ZN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy4Lock18getNextTailPointerEv()
{
fmt::throw_exception("Unimplemented" HERE);
}
s32 _QN4cell5Daisy22ScatterGatherInterlock7releaseEv()
void cellDaisyScatterGatherInterlock_proceedSequenceNumber(vm::ptr<ScatterGatherInterlock> _this)
{
fmt::throw_exception("Unimplemented" HERE);
}
@@ -268,56 +128,58 @@ s32 _QN4cell5Daisy22ScatterGatherInterlock7releaseEv()
DECLARE(ppu_module_manager::cellDaisy)("cellDaisy", []()
{
REG_FUNC(cellDaisy, _ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE);
REG_FUNC(cellDaisy, _ZN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock15completeConsumeEj);
REG_FUNC(cellDaisy, _QN4cell5Daisy9_snprintfEPcjPKcz);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock7popOpenEv);
REG_FUNC(cellDaisy, _ZN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlock7releaseEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock7popOpenEv);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh);
REG_FUNC(cellDaisy, _ZN4cell5Daisy9_snprintfEPcjPKcz);
REG_FUNC(cellDaisy, _ZN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock18getNextHeadPointerEv);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock10initializeEj);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock15completeProduceEj);
REG_FUNC(cellDaisy, _QN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E);
REG_FUNC(cellDaisy, _QN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock8popCloseEv);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock8popCloseEv);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockD2Ev);
REG_FUNC(cellDaisy, _QN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock18getNextTailPointerEv);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock8pushOpenEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock9pushCloseEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockD2Ev);
REG_FUNC(cellDaisy, _QN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockD1Ev);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock10initializeEj);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock15completeProduceEj);
REG_FUNC(cellDaisy, _ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE);
REG_FUNC(cellDaisy, _ZN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E);
REG_FUNC(cellDaisy, _QN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh);
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock15completeConsumeEj);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock18getNextHeadPointerEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock9pushCloseEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj);
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlock5probeEj);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock8pushOpenEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlock5probeEj);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockD1Ev);
REG_FUNC(cellDaisy, _ZN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E);
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock18getNextTailPointerEv);
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlock7releaseEv);
REG_FNID(cellDaisy, "_ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PushClose);
REG_FNID(cellDaisy, "_QN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PushClose);
REG_FNID(cellDaisy, "_ZN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij", cellDaisyLFQueue2GetPopPointer);
REG_FNID(cellDaisy, "_QN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij", cellDaisyLFQueue2GetPopPointer);
REG_FNID(cellDaisy, "_ZN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj", cellDaisyLFQueue2CompletePopPointer);
REG_FNID(cellDaisy, "_QN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj", cellDaisyLFQueue2CompletePopPointer);
REG_FNID(cellDaisy, "_ZN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej", cellDaisyLFQueue2HasUnfinishedConsumer);
REG_FNID(cellDaisy, "_QN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej", cellDaisyLFQueue2HasUnfinishedConsumer);
REG_FNID(cellDaisy, "_ZN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PushOpen);
REG_FNID(cellDaisy, "_QN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PushOpen);
REG_FNID(cellDaisy, "_ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PopClose);
REG_FNID(cellDaisy, "_QN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PopClose);
REG_FNID(cellDaisy, "_ZN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PopOpen);
REG_FNID(cellDaisy, "_QN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PopOpen);
REG_FNID(cellDaisy, "_ZN4cell5Daisy9_snprintfEPcjPKcz", cellDaisy_snprintf);
REG_FNID(cellDaisy, "_QN4cell5Daisy9_snprintfEPcjPKcz", cellDaisy_snprintf);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock7popOpenEv", cellDaisyLock_popOpen);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock7popOpenEv", cellDaisyLock_popOpen);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock18getNextHeadPointerEv", cellDaisyLock_getNextHeadPointer);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock18getNextHeadPointerEv", cellDaisyLock_getNextHeadPointer);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock10initializeEj", cellDaisyLock_initialize);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock10initializeEj", cellDaisyLock_initialize);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock15completeProduceEj", cellDaisyLock_completeProduce);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock15completeProduceEj", cellDaisyLock_completeProduce);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock8popCloseEv", cellDaisyLock_popClose);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock8popCloseEv", cellDaisyLock_popClose);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock18getNextTailPointerEv", cellDaisyLock_getNextTailPointer);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock18getNextTailPointerEv", cellDaisyLock_getNextTailPointer);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock8pushOpenEv", cellDaisyLock_pushOpen);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock8pushOpenEv", cellDaisyLock_pushOpen);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock9pushCloseEv", cellDaisyLock_pushClose);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock9pushCloseEv", cellDaisyLock_pushClose);
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock15completeConsumeEj", cellDaisyLock_completeConsume);
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock15completeConsumeEj", cellDaisyLock_completeConsume);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockD2Ev", cellDaisyScatterGatherInterlock_9tor);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockD2Ev", cellDaisyScatterGatherInterlock_9tor);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockD1Ev", cellDaisyScatterGatherInterlock_9tor);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockD1Ev", cellDaisyScatterGatherInterlock_9tor);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlock7releaseEv", cellDaisyScatterGatherInterlock_release);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlock7releaseEv", cellDaisyScatterGatherInterlock_release);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv", cellDaisyScatterGatherInterlock_proceedSequenceNumber);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv", cellDaisyScatterGatherInterlock_proceedSequenceNumber);
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlock5probeEj", cellDaisyScatterGatherInterlock_probe);
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlock5probeEj", cellDaisyScatterGatherInterlock_probe);
});
+1 -1
View File
@@ -9,7 +9,7 @@
#include <thread>
logs::channel cellDmux("cellDmux", logs::level::notice);
logs::channel cellDmux("cellDmux");
/* Demuxer Thread Classes */
+527 -96
View File
@@ -4,77 +4,216 @@
#include "cellFiber.h"
logs::channel cellFiber("cellFiber", logs::level::notice);
logs::channel cellFiber("cellFiber");
s32 _cellFiberPpuInitialize()
template <>
void fmt_class_string<CellFiberError>::format(std::string& out, u64 arg)
{
UNIMPLEMENTED_FUNC(cellFiber);
format_enum(out, arg, [](CellFiberError value)
{
switch (value)
{
STR_CASE(CELL_FIBER_ERROR_AGAIN);
STR_CASE(CELL_FIBER_ERROR_INVAL);
STR_CASE(CELL_FIBER_ERROR_NOMEM);
STR_CASE(CELL_FIBER_ERROR_DEADLK);
STR_CASE(CELL_FIBER_ERROR_PERM);
STR_CASE(CELL_FIBER_ERROR_BUSY);
STR_CASE(CELL_FIBER_ERROR_ABORT);
STR_CASE(CELL_FIBER_ERROR_STAT);
STR_CASE(CELL_FIBER_ERROR_ALIGN);
STR_CASE(CELL_FIBER_ERROR_NULL_POINTER);
STR_CASE(CELL_FIBER_ERROR_NOSYSINIT);
}
return unknown;
});
}
error_code _cellFiberPpuInitialize()
{
cellFiber.todo("_cellFiberPpuInitialize()");
return CELL_OK;
}
s32 _cellFiberPpuSchedulerAttributeInitialize()
error_code _cellFiberPpuSchedulerAttributeInitialize(vm::ptr<CellFiberPpuSchedulerAttribute> attr, u32 sdkVersion)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.warning("_cellFiberPpuSchedulerAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
if (!attr)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!attr.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuSchedulerAttribute));
attr->autoCheckFlags = false;
attr->autoCheckFlagsIntervalUsec = 0;
attr->debuggerSupport = false;
return CELL_OK;
}
s32 cellFiberPpuInitializeScheduler()
error_code cellFiberPpuInitializeScheduler(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<CellFiberPpuSchedulerAttribute> attr)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuInitializeScheduler(scheduler=*0x%x, attr=*0x%x)", scheduler, attr);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuFinalizeScheduler()
error_code cellFiberPpuFinalizeScheduler(vm::ptr<CellFiberPpuScheduler> scheduler)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuFinalizeScheduler(scheduler=*0x%x)", scheduler);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuRunFibers()
error_code cellFiberPpuRunFibers(vm::ptr<CellFiberPpuScheduler> scheduler)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuRunFibers(scheduler=*0x%x)", scheduler);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuCheckFlags()
error_code cellFiberPpuCheckFlags(vm::ptr<CellFiberPpuScheduler> scheduler)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuCheckFlags(scheduler=*0x%x)", scheduler);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuHasRunnableFiber()
error_code cellFiberPpuHasRunnableFiber(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<b8> flag)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuHasRunnableFiber(scheduler=*0x%x, flag=*0x%x)", scheduler, flag);
if (!scheduler || !flag)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 _cellFiberPpuAttributeInitialize()
error_code _cellFiberPpuAttributeInitialize(vm::ptr<CellFiberPpuAttribute> attr, u32 sdkVersion)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.warning("_cellFiberPpuAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
if (!attr)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!attr.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuAttribute));
attr->onExitCallback = vm::null;
return CELL_OK;
}
s32 cellFiberPpuCreateFiber()
error_code cellFiberPpuCreateFiber(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<CellFiberPpu> fiber, vm::ptr<CellFiberPpuEntry> entry, u64 arg, u32 priority, vm::ptr<void> eaStack, u32 sizeStack, vm::cptr<CellFiberPpuAttribute> attr)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuCreateFiber(scheduler=*0x%x, fiber=*0x%x, entry=*0x%x, arg=0x%x, priority=%d, eaStack=*0x%x, sizeStack=0x%x, attr=*0x%x)", scheduler, fiber, entry, arg, priority, eaStack, sizeStack, attr);
if (!scheduler || !fiber || !entry || !eaStack)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned() || !fiber.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
if (priority > 3)
{
return CELL_FIBER_ERROR_INVAL;
}
return CELL_OK;
}
s32 cellFiberPpuExit()
error_code cellFiberPpuExit(s32 status)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuExit(status=%d)", status);
return CELL_OK;
}
s32 cellFiberPpuYield()
error_code cellFiberPpuYield()
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuYield()");
return CELL_OK;
}
s32 cellFiberPpuJoinFiber()
error_code cellFiberPpuJoinFiber(vm::ptr<CellFiberPpu> fiber, vm::ptr<s32> status)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuJoinFiber(fiber=*0x%x, status=*0x%x)", fiber, status);
if (!fiber || !status)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!fiber.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
@@ -86,207 +225,499 @@ vm::ptr<void> cellFiberPpuSelf()
return vm::null;
}
s32 cellFiberPpuSendSignal()
error_code cellFiberPpuSendSignal(vm::ptr<CellFiberPpu> fiber, vm::ptr<u32> numWorker)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuSendSignal(fiber=*0x%x, numWorker=*0x%x)", fiber, numWorker);
if (!fiber)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!fiber.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuWaitSignal()
error_code cellFiberPpuWaitSignal()
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuWaitSignal()");
return CELL_OK;
}
s32 cellFiberPpuWaitFlag()
error_code cellFiberPpuWaitFlag(vm::ptr<u32> eaFlag, b8 flagValue)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuWaitFlag(eaFlag=*0x%x, flagValue=%d)", eaFlag, flagValue);
if (!eaFlag)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
return CELL_OK;
}
s32 cellFiberPpuGetScheduler()
error_code cellFiberPpuGetScheduler(vm::ptr<CellFiberPpu> fiber, vm::pptr<CellFiberPpuScheduler> pScheduler)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuGetScheduler(fiber=*0x%x, pScheduler=**0x%x)", fiber, pScheduler);
if (!fiber || !pScheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!fiber.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuSetPriority()
error_code cellFiberPpuSetPriority(u32 priority)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuSetPriority(priority=%d)", priority);
if (priority > 3)
{
return CELL_FIBER_ERROR_INVAL;
}
return CELL_OK;
}
s32 cellFiberPpuCheckStackLimit()
error_code cellFiberPpuCheckStackLimit()
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuCheckStackLimit()");
return CELL_OK;
}
s32 _cellFiberPpuContextAttributeInitialize()
error_code _cellFiberPpuContextAttributeInitialize(vm::ptr<CellFiberPpuContextAttribute> attr, u32 sdkVersion)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.warning("_cellFiberPpuContextAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
if (!attr)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!attr.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuContextAttribute));
attr->debuggerSupport = false;
return CELL_OK;
}
s32 cellFiberPpuContextInitialize()
error_code cellFiberPpuContextInitialize(vm::ptr<CellFiberPpuContext> context, vm::ptr<CellFiberPpuContextEntry> entry, u64 arg, vm::ptr<void> eaStack, u32 sizeStack, vm::cptr<CellFiberPpuContextAttribute> attr)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextInitialize(context=*0x%x, entry=*0x%x, arg=0x%x, eaStack=*0x%x, sizeStack=0x%x, attr=*0x%x)", context, entry, arg, eaStack, sizeStack, attr);
if (!context || !entry || !eaStack)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!context.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuContextFinalize()
error_code cellFiberPpuContextFinalize(vm::ptr<CellFiberPpuContext> context)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextFinalize(context=*0x%x)", context);
if (!context)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!context.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuContextRun()
error_code cellFiberPpuContextRun(vm::ptr<CellFiberPpuContext> context, vm::ptr<s32> cause, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextRun(context=*0x%x, cause=*0x%x, fiberFrom=**0x%x, option=*0x%x)", context, cause, fiberFrom, option);
if (!context || !cause)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!context.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuContextSwitch()
error_code cellFiberPpuContextSwitch(vm::ptr<CellFiberPpuContext> context, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextSwitch(context=*0x%x, fiberFrom=**0x%x, option=*0x%x)", context, fiberFrom, option);
if (!context)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!context.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuContextSelf()
vm::ptr<CellFiberPpuContext> cellFiberPpuContextSelf()
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextSelf()");
return vm::null;
}
error_code cellFiberPpuContextReturnToThread(s32 cause)
{
cellFiber.todo("cellFiberPpuContextReturnToThread(cause=%d)", cause);
return CELL_OK;
}
s32 cellFiberPpuContextReturnToThread()
error_code cellFiberPpuContextCheckStackLimit()
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextCheckStackLimit()");
return CELL_OK;
}
s32 cellFiberPpuContextCheckStackLimit()
error_code cellFiberPpuContextRunScheduler(vm::ptr<CellFiberPpuSchedulerCallback> scheduler, u64 arg0, u64 arg1, vm::ptr<s32> cause, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextRunScheduler(scheduler=*0x%x, arg0=0x%x, arg1=0x%x, cause=*0x%x, fiberFrom=**0x%x, option=*0x%x)", scheduler, arg0, arg1, cause, fiberFrom, option);
if (!scheduler || !cause)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
return CELL_OK;
}
s32 cellFiberPpuContextRunScheduler()
error_code cellFiberPpuContextEnterScheduler(vm::ptr<CellFiberPpuSchedulerCallback> scheduler, u64 arg0, u64 arg1, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuContextEnterScheduler(scheduler=*0x%x, arg0=0x%x, arg1=0x%x, fiberFrom=**0x%x, option=*0x%x)", scheduler, arg0, arg1, fiberFrom, option);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
return CELL_OK;
}
s32 cellFiberPpuContextEnterScheduler()
error_code cellFiberPpuSchedulerTraceInitialize(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<void> buffer, u32 size, u32 mode)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuSchedulerTraceInitialize(scheduler=*0x%x, buffer=*0x%x, size=0x%x, mode=0x%x)", scheduler, buffer, size, mode);
if (!scheduler || !buffer)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuSchedulerTraceInitialize()
error_code cellFiberPpuSchedulerTraceFinalize(vm::ptr<CellFiberPpuScheduler> scheduler)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuSchedulerTraceFinalize(scheduler=*0x%x)", scheduler);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuSchedulerTraceFinalize()
error_code cellFiberPpuSchedulerTraceStart(vm::ptr<CellFiberPpuScheduler> scheduler)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuSchedulerTraceStart(scheduler=*0x%x)", scheduler);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuSchedulerTraceStart()
error_code cellFiberPpuSchedulerTraceStop(vm::ptr<CellFiberPpuScheduler> scheduler)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuSchedulerTraceStop(scheduler=*0x%x)", scheduler);
if (!scheduler)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!scheduler.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuSchedulerTraceStop()
error_code _cellFiberPpuUtilWorkerControlAttributeInitialize(vm::ptr<CellFiberPpuUtilWorkerControlAttribute> attr, u32 sdkVersion)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.warning("_cellFiberPpuUtilWorkerControlAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
if (!attr)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!attr.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuUtilWorkerControlAttribute));
attr->scheduler.autoCheckFlags = false;
attr->scheduler.autoCheckFlagsIntervalUsec = 0;
attr->scheduler.debuggerSupport = false;
return CELL_OK;
}
s32 _cellFiberPpuUtilWorkerControlAttributeInitialize()
error_code cellFiberPpuUtilWorkerControlRunFibers(vm::ptr<CellFiberPpuUtilWorkerControl> control)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlRunFibers(control=*0x%x)", control);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlRunFibers()
error_code cellFiberPpuUtilWorkerControlInitialize(vm::ptr<CellFiberPpuUtilWorkerControl> control)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlInitialize(control=*0x%x)", control);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlInitialize()
error_code cellFiberPpuUtilWorkerControlSetPollingMode(vm::ptr<CellFiberPpuUtilWorkerControl> control, s32 mode, s32 timeout)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlSetPollingMode(control=*0x%x, mode=%d, timeout=%d)", control, mode, timeout);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlSetPollingMode()
error_code cellFiberPpuUtilWorkerControlJoinFiber(vm::ptr<CellFiberPpuUtilWorkerControl> control, vm::ptr<CellFiberPpu> fiber, vm::ptr<s32> exitCode)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlJoinFiber(control=*0x%x, fiber=*0x%x, exitCode=*0x%x)", control, fiber, exitCode);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlJoinFiber()
error_code cellFiberPpuUtilWorkerControlDisconnectEventQueue()
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlDisconnectEventQueue()");
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlDisconnectEventQueue()
error_code cellFiberPpuUtilWorkerControlSendSignal(vm::ptr<CellFiberPpu> fiber, vm::ptr<u32> numWorker)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlSendSignal(fiber=*0x%x, numWorker=*0x%x)", fiber, numWorker);
if (!fiber)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!fiber.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlSendSignal()
error_code cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs()
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs()");
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs()
error_code cellFiberPpuUtilWorkerControlFinalize(vm::ptr<CellFiberPpuUtilWorkerControl> control)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlFinalize(control=*0x%x)", control);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlFinalize()
error_code cellFiberPpuUtilWorkerControlWakeup(vm::ptr<CellFiberPpuUtilWorkerControl> control)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlWakeup(control=*0x%x)", control);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlWakeup()
error_code cellFiberPpuUtilWorkerControlCreateFiber(vm::ptr<CellFiberPpuUtilWorkerControl> control, vm::ptr<CellFiberPpu> fiber, vm::ptr<CellFiberPpuEntry> entry, u64 arg, u32 priority, vm::ptr<void> eaStack, u32 sizeStack, vm::cptr<CellFiberPpuAttribute> attr)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlCreateFiber(control=*0x%x, fiber=*0x%x, entry=*0x%x, arg=0x%x, priority=%d, eaStack=*0x%x, sizeStack=0x%x, attr=*0x%x)", control, fiber, entry, arg, priority, eaStack, sizeStack, attr);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlCreateFiber()
error_code cellFiberPpuUtilWorkerControlShutdown(vm::ptr<CellFiberPpuUtilWorkerControl> control)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlShutdown(control=*0x%x)", control);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlShutdown()
error_code cellFiberPpuUtilWorkerControlCheckFlags(vm::ptr<CellFiberPpuUtilWorkerControl> control, b8 wakingUp)
{
UNIMPLEMENTED_FUNC(cellFiber);
cellFiber.todo("cellFiberPpuUtilWorkerControlCheckFlags(control=*0x%x, wakingUp=%d)", control, wakingUp);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
return CELL_OK;
}
s32 cellFiberPpuUtilWorkerControlCheckFlags()
error_code cellFiberPpuUtilWorkerControlInitializeWithAttribute(vm::ptr<CellFiberPpuUtilWorkerControl> control, vm::ptr<CellFiberPpuUtilWorkerControlAttribute> attr)
{
UNIMPLEMENTED_FUNC(cellFiber);
return CELL_OK;
}
cellFiber.todo("cellFiberPpuUtilWorkerControlInitializeWithAttribute(control=*0x%x, attr=*0x%x)", control, attr);
if (!control)
{
return CELL_FIBER_ERROR_NULL_POINTER;
}
if (!control.aligned())
{
return CELL_FIBER_ERROR_ALIGN;
}
s32 cellFiberPpuUtilWorkerControlInitializeWithAttribute()
{
UNIMPLEMENTED_FUNC(cellFiber);
return CELL_OK;
}

Some files were not shown because too many files have changed in this diff Show More