Compare commits
928 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1a98966ee | ||
|
|
195929953b | ||
|
|
3d0d1a26df | ||
|
|
3ab118837a | ||
|
|
3c111202e1 | ||
|
|
db43c601fc | ||
|
|
d55e41a19e | ||
|
|
a89c29c2ca | ||
|
|
95638d5ca5 | ||
|
|
6d728ec7ed | ||
|
|
7b24b42711 | ||
|
|
8f7eb2d0e9 | ||
|
|
c284cf72e1 | ||
|
|
2c0f986c52 | ||
|
|
0a4453b912 | ||
|
|
092d42e981 | ||
|
|
c2e9c877dd | ||
|
|
400da1aa8d | ||
|
|
94f861588d | ||
|
|
dfdd819e3e | ||
|
|
43fd8fa44a | ||
|
|
2dc5755799 | ||
|
|
8abc43a03d | ||
|
|
7fe4df85ab | ||
|
|
8a409d86d4 | ||
|
|
ab5240d8d2 | ||
|
|
14dc136832 | ||
|
|
aba2b29074 | ||
|
|
433d9459e0 | ||
|
|
5eebb04de9 | ||
|
|
fac21a5362 | ||
|
|
0931802151 | ||
|
|
fb2c035c05 | ||
|
|
7e890def48 | ||
|
|
08182f814f | ||
|
|
8d8bb05055 | ||
|
|
39fed1f469 | ||
|
|
953fb14638 | ||
|
|
f2a989b9da | ||
|
|
b0b74243af | ||
|
|
188eebb92a | ||
|
|
adf4b635f7 | ||
|
|
1e08099036 | ||
|
|
32435674f2 | ||
|
|
b1b4c8c487 | ||
|
|
be4c38bf1c | ||
|
|
ccfb1bbfa8 | ||
|
|
87773a417b | ||
|
|
aa5c1c10df | ||
|
|
3c8e25e8e4 | ||
|
|
5585e42677 | ||
|
|
8a4e03228a | ||
|
|
e7c4ffe032 | ||
|
|
3001b007f6 | ||
|
|
9aa1c13c7e | ||
|
|
d2ac92481b | ||
|
|
0fd1ab674b | ||
|
|
af26c945b1 | ||
|
|
876445faf1 | ||
|
|
f93677b953 | ||
|
|
8b88344679 | ||
|
|
e9ede8d627 | ||
|
|
27447537c3 | ||
|
|
e752f04cde | ||
|
|
cafd40f2c2 | ||
|
|
3c0c921ef5 | ||
|
|
3e22622508 | ||
|
|
8caca4df32 | ||
|
|
40e8a40ada | ||
|
|
a57ccf9112 | ||
|
|
32556ad0d8 | ||
|
|
8bb1e8fcdb | ||
|
|
715ac8a279 | ||
|
|
f1c23d514b | ||
|
|
722a0e36be | ||
|
|
028be3ba5d | ||
|
|
306279901f | ||
|
|
cfbd869126 | ||
|
|
8acefd25e7 | ||
|
|
bab00dbca8 | ||
|
|
f587931ed3 | ||
|
|
91d57e830b | ||
|
|
5be807fc8a | ||
|
|
3f1061de56 | ||
|
|
2a19d915e8 | ||
|
|
1e3d034f96 | ||
|
|
ec8e5d5ef1 | ||
|
|
7aa868562c | ||
|
|
3d1e332c6f | ||
|
|
5789d1a5fb | ||
|
|
7f4265834a | ||
|
|
714605c6a7 | ||
|
|
0a9c437ec8 | ||
|
|
b82993c568 | ||
|
|
0211b7e38e | ||
|
|
14f7dc3527 | ||
|
|
e612e881ac | ||
|
|
8db1beaec6 | ||
|
|
2a953391ef | ||
|
|
51bf98a7b5 | ||
|
|
14c2be8c67 | ||
|
|
e36c4d5f75 | ||
|
|
b8a443c728 | ||
|
|
ea8ad35947 | ||
|
|
00543fe640 | ||
|
|
e5e1aba241 | ||
|
|
41fd1c84cf | ||
|
|
bf41ab6c40 | ||
|
|
aa5293e3ad | ||
|
|
cd9fc5d0e9 | ||
|
|
f1b23c616e | ||
|
|
f623613d12 | ||
|
|
07f451650f | ||
|
|
0b59ebb22f | ||
|
|
f347d3df18 | ||
|
|
f938829f12 | ||
|
|
fea2593ab4 | ||
|
|
1793fd4df0 | ||
|
|
a88850fec6 | ||
|
|
0b672a08ac | ||
|
|
4fb2247196 | ||
|
|
71a82199ed | ||
|
|
7d546f32d8 | ||
|
|
1940ac0fec | ||
|
|
dad5953e8c | ||
|
|
8ee672fe32 | ||
|
|
cde84e4bac | ||
|
|
119e03cb58 | ||
|
|
c076ba69e8 | ||
|
|
57e762468f | ||
|
|
2266622dcf | ||
|
|
941a668f78 | ||
|
|
9524f94749 | ||
|
|
6f543b5bd9 | ||
|
|
8eacb88a86 | ||
|
|
e1ecfb8dd1 | ||
|
|
7ffa581d4b | ||
|
|
357b7829c3 | ||
|
|
6acfdd5e33 | ||
|
|
9e618c0e0c | ||
|
|
d05846a327 | ||
|
|
17abbcd74d | ||
|
|
77da8bac00 | ||
|
|
22a2741ea0 | ||
|
|
874508f8c2 | ||
|
|
642dedea8c | ||
|
|
7fbe15de28 | ||
|
|
37f4bad2b7 | ||
|
|
15ae7a094d | ||
|
|
98f0cb65d7 | ||
|
|
2380f2f9c9 | ||
|
|
c019b54fec | ||
|
|
920acb8d8b | ||
|
|
74b091fd08 | ||
|
|
6bf93071cf | ||
|
|
c66db95378 | ||
|
|
f0b75289c8 | ||
|
|
eb844b9b63 | ||
|
|
fda4f06518 | ||
|
|
3dc0f6d831 | ||
|
|
0835dc71b3 | ||
|
|
f658fc58d1 | ||
|
|
4a5850628e | ||
|
|
b00a321b5e | ||
|
|
394a14626b | ||
|
|
4ebb90c774 | ||
|
|
5f4d03172f | ||
|
|
b0860d6e8c | ||
|
|
5b6e0ab238 | ||
|
|
3d0aacd43d | ||
|
|
7153838c4e | ||
|
|
2002e37ce9 | ||
|
|
07f4a0305b | ||
|
|
c0d43a1a5f | ||
|
|
36044043bc | ||
|
|
99ac10a417 | ||
|
|
7bf168e47f | ||
|
|
7e525a59e4 | ||
|
|
b1a024efbd | ||
|
|
7b68004a40 | ||
|
|
6c215e672d | ||
|
|
086c5802f4 | ||
|
|
9f6261524b | ||
|
|
d6d1ec4f22 | ||
|
|
57a3c0132d | ||
|
|
bd3371bdfb | ||
|
|
286a288bfd | ||
|
|
471ebdb4f0 | ||
|
|
18a36c5daa | ||
|
|
3f1be5a4ce | ||
|
|
cd4f48cb8d | ||
|
|
cea6d87472 | ||
|
|
2226175d9b | ||
|
|
ff18b89e66 | ||
|
|
20b4cd2a32 | ||
|
|
001b94e802 | ||
|
|
23bb5f09fd | ||
|
|
82bd780a6b | ||
|
|
3d95ad0e3a | ||
|
|
16e1d679dc | ||
|
|
fde1726af5 | ||
|
|
add6eeeb8a | ||
|
|
d7d28aa8da | ||
|
|
5976300788 | ||
|
|
df8284c5f8 | ||
|
|
15d6b095f7 | ||
|
|
c71385ec90 | ||
|
|
9ed07f6f6e | ||
|
|
8c9d7d1a08 | ||
|
|
8f2d71d458 | ||
|
|
f9ae945a55 | ||
|
|
c4506da0ae | ||
|
|
6904764aab | ||
|
|
e968b1c23f | ||
|
|
2a0629477b | ||
|
|
5054827441 | ||
|
|
c55d7fbb6a | ||
|
|
c83ac654ce | ||
|
|
3d04765a3f | ||
|
|
e98fab4b58 | ||
|
|
e585330744 | ||
|
|
b41664ac61 | ||
|
|
96cd79f272 | ||
|
|
da00235eaf | ||
|
|
9f42a12baf | ||
|
|
17c47bcd96 | ||
|
|
c45af9a2ca | ||
|
|
8fbd9187f8 | ||
|
|
e1fecda74f | ||
|
|
ce158290fb | ||
|
|
7be35c3997 | ||
|
|
bf239ebc04 | ||
|
|
8e281575b5 | ||
|
|
6ae92c0aac | ||
|
|
0c52d02043 | ||
|
|
85f45d2788 | ||
|
|
8a15d68a8d | ||
|
|
f5618e0342 | ||
|
|
b64dcd2f56 | ||
|
|
7ab851592b | ||
|
|
4fd7f67459 | ||
|
|
f7b458c85a | ||
|
|
75d2181489 | ||
|
|
176d222519 | ||
|
|
ed0a9c0e4e | ||
|
|
a547b2774f | ||
|
|
f45cad6bc9 | ||
|
|
46ac48c311 | ||
|
|
f98b9f7726 | ||
|
|
204bba9be8 | ||
|
|
aa4c6c0178 | ||
|
|
fe389e560a | ||
|
|
f068f13e4a | ||
|
|
76f440889b | ||
|
|
29183354cc | ||
|
|
0b015daff7 | ||
|
|
9ec75c3feb | ||
|
|
7b16085c59 | ||
|
|
b7fe08519f | ||
|
|
72440a4996 | ||
|
|
67dfc7916c | ||
|
|
8d15388aeb | ||
|
|
cdae6a4ce5 | ||
|
|
4da21a016e | ||
|
|
8b139ff5fa | ||
|
|
1620481331 | ||
|
|
7794fc3ce7 | ||
|
|
97bb22998b | ||
|
|
c59f6fd5c3 | ||
|
|
8b2c151f1f | ||
|
|
9d6eee6acf | ||
|
|
a8d2684929 | ||
|
|
6e00121eb5 | ||
|
|
406041b7ad | ||
|
|
be1d11eb62 | ||
|
|
7654a08d9a | ||
|
|
8e08756b6e | ||
|
|
5a071f3137 | ||
|
|
e596e9350b | ||
|
|
0ecb6695de | ||
|
|
c38e3f77f9 | ||
|
|
87f8fea4de | ||
|
|
47ba6c6344 | ||
|
|
a13d1d1ab1 | ||
|
|
24bce59f70 | ||
|
|
96ea686eb6 | ||
|
|
9814a1b788 | ||
|
|
ddc35639a8 | ||
|
|
181b005636 | ||
|
|
ac6b4a625d | ||
|
|
88c37048ac | ||
|
|
aa958c4d19 | ||
|
|
b4ced58acc | ||
|
|
f79b7f10ab | ||
|
|
0f0d9740c2 | ||
|
|
70430313e3 | ||
|
|
b62d2f839d | ||
|
|
25de4d6b65 | ||
|
|
877cda9b9a | ||
|
|
170db22d9c | ||
|
|
437ebc1e02 | ||
|
|
6fc7b3993d | ||
|
|
08343faf01 | ||
|
|
a588bc5da8 | ||
|
|
29ad2eca62 | ||
|
|
168ba8dbcd | ||
|
|
7e27afb37d | ||
|
|
09725bd921 | ||
|
|
a3df2448ec | ||
|
|
9b54e82314 | ||
|
|
b965b094b7 | ||
|
|
bd9f82df94 | ||
|
|
f0ee3919e0 | ||
|
|
cf2e617f08 | ||
|
|
8776eba8c8 | ||
|
|
1cc4ab7e88 | ||
|
|
d3491bfced | ||
|
|
1e16fe5349 | ||
|
|
97b5289f15 | ||
|
|
7c00ac637a | ||
|
|
b412cb4cca | ||
|
|
87a76af86f | ||
|
|
cd085ea2de | ||
|
|
169b641bd1 | ||
|
|
dbdbb40c0b | ||
|
|
dc99d3ebfc | ||
|
|
04ad430115 | ||
|
|
66f1bb937f | ||
|
|
0f91661660 | ||
|
|
2f80d7565d | ||
|
|
21eb175aa1 | ||
|
|
dcc4057dd8 | ||
|
|
0df0d0cb66 | ||
|
|
0a5f46942e | ||
|
|
09cbccb40b | ||
|
|
d91ad6174e | ||
|
|
fd4893f6ef | ||
|
|
6e986f8133 | ||
|
|
3982ef7188 | ||
|
|
0e0de5a2a0 | ||
|
|
ab6901ae6a | ||
|
|
87f8f3a59e | ||
|
|
299a29e243 | ||
|
|
0a12ba4120 | ||
|
|
100036aecf | ||
|
|
56e8ed7833 | ||
|
|
c9f894c45a | ||
|
|
873fbc469b | ||
|
|
ddb0928f10 | ||
|
|
d4eae28ce2 | ||
|
|
6fe26173dc | ||
|
|
7d4f1ce5f9 | ||
|
|
e45eb0da9a | ||
|
|
53b7c5cc77 | ||
|
|
4fa55b7aa2 | ||
|
|
3e7137cc6b | ||
|
|
aba803bd04 | ||
|
|
20915eb5b8 | ||
|
|
f139762c64 | ||
|
|
96344873d6 | ||
|
|
01fb320f4e | ||
|
|
ce53c41205 | ||
|
|
7389cf3e89 | ||
|
|
20db37f235 | ||
|
|
d7e5b5f13f | ||
|
|
75c92a7cd1 | ||
|
|
3c0255b953 | ||
|
|
310814ac71 | ||
|
|
4ce95e55e0 | ||
|
|
351e4861ca | ||
|
|
2fd4861d3e | ||
|
|
60092ce849 | ||
|
|
2a7d56dbf2 | ||
|
|
927bb0c175 | ||
|
|
5bb45dc7ba | ||
|
|
8576d5e72c | ||
|
|
ee57c2fd69 | ||
|
|
1dabea7514 | ||
|
|
2b8c2ce423 | ||
|
|
a5968b630d | ||
|
|
76644a0169 | ||
|
|
ec6579cb4f | ||
|
|
9f79764b01 | ||
|
|
be411b37d4 | ||
|
|
49ceff71a2 | ||
|
|
da519f9091 | ||
|
|
af398e3684 | ||
|
|
009f956d8d | ||
|
|
ff13aff862 | ||
|
|
54dafce541 | ||
|
|
5e26294e27 | ||
|
|
ed24632ceb | ||
|
|
7209b7d786 | ||
|
|
1a34c2a189 | ||
|
|
388d717205 | ||
|
|
7e533ccf50 | ||
|
|
93317911eb | ||
|
|
394b7fa671 | ||
|
|
d20efcb0d2 | ||
|
|
ee1e55d5e1 | ||
|
|
61f750bdd9 | ||
|
|
e68774d449 | ||
|
|
75adf7c8d1 | ||
|
|
65f72372f0 | ||
|
|
f93b8c1e8d | ||
|
|
7d96c9d634 | ||
|
|
3dea1a9f81 | ||
|
|
3a36615da7 | ||
|
|
b92dc8c714 | ||
|
|
e4c8626806 | ||
|
|
bf3e43b016 | ||
|
|
82c7c6aed1 | ||
|
|
98ea06e82d | ||
|
|
7084fc4c41 | ||
|
|
0be0f18764 | ||
|
|
dda5cc411f | ||
|
|
348da93ee6 | ||
|
|
cda2317ddb | ||
|
|
afe32d1e03 | ||
|
|
603f709784 | ||
|
|
fc6c755e5a | ||
|
|
62c59d195f | ||
|
|
cbbf3505e7 | ||
|
|
c7ff0419ad | ||
|
|
398019867b | ||
|
|
d9f287eaa2 | ||
|
|
80bf46da4c | ||
|
|
5e98a3e1d8 | ||
|
|
40d00e3066 | ||
|
|
a4168150ed | ||
|
|
545e94d267 | ||
|
|
36271b9cdf | ||
|
|
dc96338c2e | ||
|
|
7b5d66e5c1 | ||
|
|
1dd2e46fce | ||
|
|
bc6c0de76d | ||
|
|
4e4f3d7504 | ||
|
|
65bd62e98b | ||
|
|
7476287649 | ||
|
|
a5298c4025 | ||
|
|
651ab4c62c | ||
|
|
687be5b132 | ||
|
|
75166ecd2a | ||
|
|
938b9b9826 | ||
|
|
ebebafed64 | ||
|
|
cf342e7a4b | ||
|
|
50fc5e339d | ||
|
|
c73fad6772 | ||
|
|
eef0e6fc63 | ||
|
|
23f4b304b8 | ||
|
|
0b7126e3be | ||
|
|
675fd4b31a | ||
|
|
b7e2903911 | ||
|
|
1d23f40e02 | ||
|
|
6295d6c416 | ||
|
|
54e2179337 | ||
|
|
ddb82a690b | ||
|
|
3d5a6203e1 | ||
|
|
e67c10de01 | ||
|
|
6a70d08043 | ||
|
|
5a4d5b9f31 | ||
|
|
45e206e248 | ||
|
|
11c155d0f1 | ||
|
|
f657ab3cc6 | ||
|
|
a984d44fd3 | ||
|
|
e634461ebb | ||
|
|
1ec8f34a99 | ||
|
|
b2de662d67 | ||
|
|
36ef61908d | ||
|
|
cc99f52606 | ||
|
|
f79da986e3 | ||
|
|
cec9275c85 | ||
|
|
19cb4ec05d | ||
|
|
3f12fb0c91 | ||
|
|
beb809b612 | ||
|
|
6da67645e9 | ||
|
|
23bf8bf5e7 | ||
|
|
7f9bc0abbd | ||
|
|
1620eea37b | ||
|
|
f97f73f0b5 | ||
|
|
43e7c00fdd | ||
|
|
4ba19a02b0 | ||
|
|
ad9f1370d5 | ||
|
|
8c8a6ccddd | ||
|
|
5799091044 | ||
|
|
5a8e8f5936 | ||
|
|
a016792371 | ||
|
|
7df3919617 | ||
|
|
cd7268a70e | ||
|
|
10d29cc007 | ||
|
|
a5001d11a8 | ||
|
|
ee38eec7fe | ||
|
|
fb5bc371cb | ||
|
|
e1d03c35fd | ||
|
|
654f85a4b1 | ||
|
|
bfe2e1e57c | ||
|
|
a18419dd73 | ||
|
|
8811cc5cc6 | ||
|
|
5db27109c9 | ||
|
|
581ddfec4d | ||
|
|
edde0a3e7e | ||
|
|
dd184fd95d | ||
|
|
5f4ddc14fc | ||
|
|
913a46173a | ||
|
|
171e475f80 | ||
|
|
4fe81231f6 | ||
|
|
eaa92b5a65 | ||
|
|
c3d5824279 | ||
|
|
0c63267b1c | ||
|
|
0f4bcd8c83 | ||
|
|
077f8981a7 | ||
|
|
079d90211f | ||
|
|
5638735af6 | ||
|
|
048b8aef58 | ||
|
|
60f315a54d | ||
|
|
7b8f0d2a19 | ||
|
|
07de1ee977 | ||
|
|
c0f7de9fde | ||
|
|
7b8bc90157 | ||
|
|
d07c81e0d2 | ||
|
|
cf4824a008 | ||
|
|
26cca79582 | ||
|
|
38a13832b3 | ||
|
|
868cffd793 | ||
|
|
2aab7e05ee | ||
|
|
84e2c4d3bb | ||
|
|
4a0bd876ff | ||
|
|
28ec489dbe | ||
|
|
ecb5a5fdec | ||
|
|
da1e4ff5eb | ||
|
|
faea291295 | ||
|
|
dcf245b814 | ||
|
|
75a4df53a5 | ||
|
|
b09b28c7f3 | ||
|
|
c8d0d5637a | ||
|
|
9203e28b21 | ||
|
|
b14f447060 | ||
|
|
1879c9d12f | ||
|
|
febc1a9e17 | ||
|
|
5c5c02cb04 | ||
|
|
12a0a02e38 | ||
|
|
e30255e0d2 | ||
|
|
1ea6db6045 | ||
|
|
c924457e28 | ||
|
|
c181102a02 | ||
|
|
ab201398b2 | ||
|
|
de183d3b80 | ||
|
|
3a888ebb9f | ||
|
|
1b6cc447b4 | ||
|
|
b911c70d35 | ||
|
|
a49c7e9dcb | ||
|
|
fc90f279e2 | ||
|
|
bc66fe8fb5 | ||
|
|
1b12138cda | ||
|
|
6606da808b | ||
|
|
5e12303b06 | ||
|
|
8a76cd888f | ||
|
|
136f6072b9 | ||
|
|
0ebae4ca6f | ||
|
|
1c0dfc60a1 | ||
|
|
ccf02d0aed | ||
|
|
dd61c2a0d1 | ||
|
|
c27d79c2e7 | ||
|
|
d66d129357 | ||
|
|
fdb13a3b90 | ||
|
|
74c2888aaa | ||
|
|
c5b8e492f6 | ||
|
|
5fc90b5565 | ||
|
|
b0bbb16aae | ||
|
|
14e7cd587d | ||
|
|
3a65052b8e | ||
|
|
dcab06ff2b | ||
|
|
f23c6dc852 | ||
|
|
6b5cd04893 | ||
|
|
4502a5ddcc | ||
|
|
411449cd51 | ||
|
|
adfb3af95f | ||
|
|
a0cf4ce7de | ||
|
|
1da1946ef5 | ||
|
|
56cc70dc97 | ||
|
|
e3c2a91477 | ||
|
|
96f7a75f38 | ||
|
|
9101bd7ad4 | ||
|
|
446d8c4ff1 | ||
|
|
035cb3eeaa | ||
|
|
f1becb2507 | ||
|
|
047a115b3e | ||
|
|
749fe92882 | ||
|
|
fda5689ddb | ||
|
|
81f7c830be | ||
|
|
16363ac692 | ||
|
|
13743b27fc | ||
|
|
649527a235 | ||
|
|
ffd0f7b53a | ||
|
|
f1fd846762 | ||
|
|
09ce12a868 | ||
|
|
bb29224daf | ||
|
|
416e23fe76 | ||
|
|
b97b5a7db4 | ||
|
|
8d1641e4d3 | ||
|
|
1d7ee198e1 | ||
|
|
a48bfb0fa6 | ||
|
|
bad3d5a68e | ||
|
|
b08baaeb13 | ||
|
|
4e0dc91040 | ||
|
|
eb2520a240 | ||
|
|
76f4ceda31 | ||
|
|
89fb1a024f | ||
|
|
28feb77982 | ||
|
|
b9c6093717 | ||
|
|
0dd6e257c5 | ||
|
|
bea5f643ca | ||
|
|
0a5c36482e | ||
|
|
2709b45877 | ||
|
|
ba0c1df545 | ||
|
|
f31c92ffd1 | ||
|
|
9eadec849c | ||
|
|
0b0c82452e | ||
|
|
8ccec1b956 | ||
|
|
b87e6f3838 | ||
|
|
d24f8ddf03 | ||
|
|
e340583a7f | ||
|
|
34ffd95306 | ||
|
|
d7f799c6b7 | ||
|
|
3a388fec1e | ||
|
|
e9ef726185 | ||
|
|
42ab101908 | ||
|
|
d48836d5ae | ||
|
|
6012e3cc86 | ||
|
|
cfe49fbfba | ||
|
|
f4ff0d493c | ||
|
|
1b37f61102 | ||
|
|
6877cc12c1 | ||
|
|
ee7e6f0b1d | ||
|
|
83a7bac945 | ||
|
|
51610cba43 | ||
|
|
a1377029cc | ||
|
|
f087f43736 | ||
|
|
3f8a8d3a24 | ||
|
|
1bf9be89bf | ||
|
|
a886b44347 | ||
|
|
d56708c87d | ||
|
|
af107d4ef9 | ||
|
|
bf7a91b5f7 | ||
|
|
6bc3ed57a6 | ||
|
|
3cb16d9c4f | ||
|
|
cf9ec6548c | ||
|
|
f2c7fac20b | ||
|
|
9ccd60459d | ||
|
|
6944a16407 | ||
|
|
e1ca445b78 | ||
|
|
04fbd7b9e7 | ||
|
|
9a772aa2f5 | ||
|
|
dc1313ea3c | ||
|
|
0503054b40 | ||
|
|
f8d71b59d9 | ||
|
|
816288962b | ||
|
|
b7e0df34a7 | ||
|
|
0a1fed9b75 | ||
|
|
26201f3dae | ||
|
|
3b0e251518 | ||
|
|
f3a62891ed | ||
|
|
101aeb920d | ||
|
|
f514fdfd18 | ||
|
|
1d8359f828 | ||
|
|
2311070203 | ||
|
|
1bd9317509 | ||
|
|
e4d8857eb5 | ||
|
|
0276ed92a6 | ||
|
|
450c825873 | ||
|
|
ad22e2cfac | ||
|
|
63d78aee0a | ||
|
|
dbc603cdc8 | ||
|
|
5e089ada08 | ||
|
|
9b6cd9ec9f | ||
|
|
df7e25d9aa | ||
|
|
079ae9ef43 | ||
|
|
7415cee34c | ||
|
|
9e5047947b | ||
|
|
723068049e | ||
|
|
1157e6e764 | ||
|
|
c9aa7c802d | ||
|
|
7b95b08a20 | ||
|
|
6510083778 | ||
|
|
5b2779d548 | ||
|
|
946dec7df8 | ||
|
|
7551f061ad | ||
|
|
0c90ab92da | ||
|
|
95d58b8b18 | ||
|
|
3abc7d6b43 | ||
|
|
95943e42ed | ||
|
|
5aaab7f841 | ||
|
|
766c286d62 | ||
|
|
fb5c7c5062 | ||
|
|
382f104369 | ||
|
|
ebfed28f6b | ||
|
|
61db246c5e | ||
|
|
4182740384 | ||
|
|
ca1613258f | ||
|
|
3d375a28eb | ||
|
|
69d4fecdfe | ||
|
|
7886761476 | ||
|
|
6080066f75 | ||
|
|
84f1690dfb | ||
|
|
f1fe6b9f96 | ||
|
|
6e552aac6a | ||
|
|
0f87d1e3d4 | ||
|
|
68fa5e292f | ||
|
|
bdfff5e8ea | ||
|
|
cdd193d5b1 | ||
|
|
30ab2b7f71 | ||
|
|
f2b6843f9d | ||
|
|
a17150960f | ||
|
|
1651db24fe | ||
|
|
6bf42aa985 | ||
|
|
8d41695e74 | ||
|
|
cb5190e31a | ||
|
|
cf706f8cc7 | ||
|
|
6fbbe3d79b | ||
|
|
fab390b860 | ||
|
|
5a96ac1a4f | ||
|
|
ac2fa103fa | ||
|
|
7e7854346d | ||
|
|
751f6f9bab | ||
|
|
1c835a1aa4 | ||
|
|
07c8c28000 | ||
|
|
66e96dd944 | ||
|
|
aef7498c49 | ||
|
|
790d19e59b | ||
|
|
3ae18c9073 | ||
|
|
83e343f77e | ||
|
|
81eb3a4d14 | ||
|
|
37786e06c2 | ||
|
|
9d349a1308 | ||
|
|
c997490645 | ||
|
|
600c5079ce | ||
|
|
8827c72a1c | ||
|
|
18e95ae4c0 | ||
|
|
e1382b43c8 | ||
|
|
614a23b369 | ||
|
|
a6a9fff666 | ||
|
|
3fbb68048e | ||
|
|
55be97bca3 | ||
|
|
d2e4a200fb | ||
|
|
a291800418 | ||
|
|
365e17f64e | ||
|
|
af18728962 | ||
|
|
6f938a10ce | ||
|
|
08036d2b49 | ||
|
|
e57d55e6e9 | ||
|
|
163019e3dc | ||
|
|
bc661039c5 | ||
|
|
2e2f3bb2c6 | ||
|
|
89bdd3bba2 | ||
|
|
15fc267f0d | ||
|
|
0b24ac6991 | ||
|
|
698dade864 | ||
|
|
4e6e90dfb9 | ||
|
|
be49871c68 | ||
|
|
905d49fd96 | ||
|
|
dcc4762c7e | ||
|
|
4a6ce1e0d6 | ||
|
|
878fac7f94 | ||
|
|
da966bedfd | ||
|
|
8192eaa668 | ||
|
|
9f4e55a8e7 | ||
|
|
9d59ea06c7 | ||
|
|
990da7edcc | ||
|
|
550cf0188d | ||
|
|
79e86a39fc | ||
|
|
dfb30ea955 | ||
|
|
c37679154e | ||
|
|
87ccfdfbbd | ||
|
|
ed42db47af | ||
|
|
1a02efbd15 | ||
|
|
e4254ebdaa | ||
|
|
e65bf19118 | ||
|
|
860b935054 | ||
|
|
3842993a43 | ||
|
|
3d46a5d492 | ||
|
|
595b845df0 | ||
|
|
659e7a4675 | ||
|
|
3eb47226d9 | ||
|
|
371d1d009a | ||
|
|
59b651be07 | ||
|
|
288db9a0cf | ||
|
|
62f165a7e4 | ||
|
|
2d354a095a | ||
|
|
7ecc1d3be0 | ||
|
|
af4356bfe1 | ||
|
|
3e94b533b6 | ||
|
|
287c3a4ab1 | ||
|
|
7c7d04133e | ||
|
|
ad8373095a | ||
|
|
aae6e5be73 | ||
|
|
cd6b5abccf | ||
|
|
6520f3ca17 | ||
|
|
d3b6b17c75 | ||
|
|
0b5616c493 | ||
|
|
3627393707 | ||
|
|
6e340bcdc1 | ||
|
|
78e24852f8 | ||
|
|
7f6d08a3c8 | ||
|
|
7aa8cf992f | ||
|
|
e16aa2a012 | ||
|
|
86870e7c8d | ||
|
|
fae0c0ae85 | ||
|
|
5d7407dc7d | ||
|
|
bcc3a10557 | ||
|
|
6fd4264b5d | ||
|
|
2a737d0800 | ||
|
|
b687ae5e34 | ||
|
|
3a8a666df0 | ||
|
|
c2ddfe51e1 | ||
|
|
abc7f55c06 | ||
|
|
26b5661dea | ||
|
|
6a87c37aeb | ||
|
|
5664d45305 | ||
|
|
977371e7e1 | ||
|
|
ba140b9680 | ||
|
|
5691838eca | ||
|
|
21ce86003b | ||
|
|
83b43363fa | ||
|
|
e603165e2b | ||
|
|
7766a653d5 | ||
|
|
3f445eca40 | ||
|
|
41a93dcae4 | ||
|
|
1e90f45941 | ||
|
|
d241867c7b | ||
|
|
c79b10edc1 | ||
|
|
9e4fc17e6c | ||
|
|
208575d392 | ||
|
|
8b0fd59149 | ||
|
|
41dec15869 | ||
|
|
6a84f6e188 | ||
|
|
243fd0be78 | ||
|
|
fc745ee767 | ||
|
|
2c540fbecb | ||
|
|
0b3a88cf22 | ||
|
|
0ed4614464 | ||
|
|
9852f95c58 | ||
|
|
df03783948 | ||
|
|
0c5b91e1fb | ||
|
|
a0774c0e87 | ||
|
|
a71d0d8dbb | ||
|
|
fda2fdae69 | ||
|
|
6545b09b74 | ||
|
|
bce3a9c9e7 | ||
|
|
3310fd9a1f | ||
|
|
3e8d7c2040 | ||
|
|
d4be3dbb31 | ||
|
|
83bcced16c | ||
|
|
746559658c | ||
|
|
12a65e3fb8 | ||
|
|
834a25fa2b | ||
|
|
aed9a737d6 | ||
|
|
ca4b520272 | ||
|
|
79680c50c0 | ||
|
|
dfd305ff77 | ||
|
|
ba0a6ab038 | ||
|
|
132ca9c5a8 | ||
|
|
3426ad8cc0 | ||
|
|
6d0d2eaa59 | ||
|
|
9275b0966e | ||
|
|
fc300b5265 | ||
|
|
6596fe091c | ||
|
|
958db559c6 | ||
|
|
3f9c86ad33 | ||
|
|
32cb3649d3 | ||
|
|
42c4d8353a | ||
|
|
6080649b7c | ||
|
|
34a1339a2b | ||
|
|
e070dab2f0 | ||
|
|
c60bfbe2a5 | ||
|
|
95c89ca6a9 | ||
|
|
8d90e6d997 | ||
|
|
0b3356bd1a | ||
|
|
8f7b3c2e8c | ||
|
|
09da94b7b2 | ||
|
|
9d45b99171 | ||
|
|
1f416134e7 | ||
|
|
516a3e7104 | ||
|
|
138c9ce787 | ||
|
|
360b7e1d71 | ||
|
|
d5e978c6f2 | ||
|
|
09b71a9a3f | ||
|
|
c58ad6d3b5 | ||
|
|
c9a502b31a | ||
|
|
5551c61000 | ||
|
|
ed96a9fb8e | ||
|
|
5891900c6e | ||
|
|
1c898d0842 | ||
|
|
70576035b0 | ||
|
|
63938ba8dd | ||
|
|
3be2e4b2b8 | ||
|
|
ecf7f36763 | ||
|
|
43e92bb987 | ||
|
|
73adc3ed1b | ||
|
|
2935ca0fef | ||
|
|
9fce6f7c01 | ||
|
|
93f14e8ae9 | ||
|
|
6510af90be | ||
|
|
f36440dc09 | ||
|
|
786db80742 | ||
|
|
558fcf6597 | ||
|
|
dcb057dd7f | ||
|
|
9e810b7524 | ||
|
|
1d1c88ad31 | ||
|
|
ff33b00c3a | ||
|
|
154771cca5 | ||
|
|
444cdfbba5 | ||
|
|
ad60ae1d40 | ||
|
|
c1fb5d5bca | ||
|
|
3197ad336e | ||
|
|
910e96c420 | ||
|
|
23dddca1f0 | ||
|
|
5c70adc6ab | ||
|
|
62741434db | ||
|
|
b3ef959b25 | ||
|
|
5c4ac98d49 | ||
|
|
0d6e8e227a | ||
|
|
e33ff10212 | ||
|
|
b5c69189e5 | ||
|
|
e96e66eedd | ||
|
|
14947232a7 | ||
|
|
0d56be629b | ||
|
|
4375e6fa3a | ||
|
|
ddec111da6 |
@@ -10,7 +10,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Default clang-format points to default 3.5 version one
|
# Default clang-format points to default 3.5 version one
|
||||||
CLANG_FORMAT=clang-format-17
|
CLANG_FORMAT=clang-format-18
|
||||||
$CLANG_FORMAT --version
|
$CLANG_FORMAT --version
|
||||||
|
|
||||||
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
||||||
|
|||||||
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ko_fi: shadps4
|
||||||
11
.github/linux-appimage-qt.sh
vendored
@@ -9,6 +9,8 @@ fi
|
|||||||
|
|
||||||
export Qt6_DIR="/usr/lib/qt6"
|
export Qt6_DIR="/usr/lib/qt6"
|
||||||
export PATH="$Qt6_DIR/bin:$PATH"
|
export PATH="$Qt6_DIR/bin:$PATH"
|
||||||
|
export EXTRA_QT_PLUGINS="waylandcompositor"
|
||||||
|
export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so"
|
||||||
|
|
||||||
# Prepare Tools for building the AppImage
|
# Prepare Tools for building the AppImage
|
||||||
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||||
@@ -22,5 +24,10 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
|
|||||||
# Build AppImage
|
# Build AppImage
|
||||||
./linuxdeploy-x86_64.AppImage --appdir AppDir
|
./linuxdeploy-x86_64.AppImage --appdir AppDir
|
||||||
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
|
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
|
||||||
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --plugin qt --output appimage
|
|
||||||
mv Shadps4-x86_64.AppImage Shadps4-qt.AppImage
|
cp -a "$GITHUB_WORKSPACE/build/translations" AppDir/usr/bin
|
||||||
|
|
||||||
|
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --plugin qt
|
||||||
|
rm AppDir/usr/plugins/multimedia/libgstreamermediaplugin.so
|
||||||
|
./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage
|
||||||
|
mv shadPS4-x86_64.AppImage Shadps4-qt.AppImage
|
||||||
|
|||||||
4
.github/linux-appimage-sdl.sh
vendored
@@ -17,5 +17,5 @@ chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
|
|||||||
# Build AppImage
|
# Build AppImage
|
||||||
./linuxdeploy-x86_64.AppImage --appdir AppDir
|
./linuxdeploy-x86_64.AppImage --appdir AppDir
|
||||||
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
|
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
|
||||||
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --output appimage
|
./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/dist/net.shadps4.shadPS4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/src/images/net.shadps4.shadPS4.svg --output appimage
|
||||||
mv Shadps4-x86_64.AppImage Shadps4-sdl.AppImage
|
mv shadPS4-x86_64.AppImage Shadps4-sdl.AppImage
|
||||||
|
|||||||
529
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,529 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
name: Build and Release
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{ github.event_name }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ github.event_name == 'push' }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILD_TYPE: Release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
reuse:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: fsfe/reuse-action@v5
|
||||||
|
|
||||||
|
clang-format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
|
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install clang-format-18
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||||
|
run: ./.ci/clang-format.sh
|
||||||
|
|
||||||
|
get-info:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
date: ${{ steps.vars.outputs.date }}
|
||||||
|
shorthash: ${{ steps.vars.outputs.shorthash }}
|
||||||
|
fullhash: ${{ steps.vars.outputs.fullhash }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Get date and git hash
|
||||||
|
id: vars
|
||||||
|
run: |
|
||||||
|
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||||
|
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
|
echo "fullhash=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||||
|
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||||
|
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
echo "fullhash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
windows-sdl:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Cache CMake Configuration
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-sdl-ninja-cache-cmake-configuration
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.cache-name }}-
|
||||||
|
|
||||||
|
- name: Cache CMake Build
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
|
||||||
|
with:
|
||||||
|
append-timestamp: false
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
|
||||||
|
- name: Setup VS Environment
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||||
|
with:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
|
||||||
|
|
||||||
|
- name: Upload Windows SDL artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-win64-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: ${{github.workspace}}/build/shadPS4.exe
|
||||||
|
|
||||||
|
windows-qt:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup Qt
|
||||||
|
uses: jurplel/install-qt-action@v4
|
||||||
|
with:
|
||||||
|
version: 6.7.3
|
||||||
|
host: windows
|
||||||
|
target: desktop
|
||||||
|
arch: win64_msvc2019_64
|
||||||
|
archives: qtbase qttools
|
||||||
|
modules: qtmultimedia
|
||||||
|
|
||||||
|
- name: Cache CMake Configuration
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-qt-ninja-cache-cmake-configuration
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.cache-name }}-
|
||||||
|
|
||||||
|
- name: Cache CMake Build
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-qt-cache-cmake-build
|
||||||
|
with:
|
||||||
|
append-timestamp: false
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
|
||||||
|
- name: Setup VS Environment
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||||
|
with:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
|
||||||
|
|
||||||
|
- name: Deploy and Package
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
move build/shadPS4.exe upload
|
||||||
|
windeployqt --no-compiler-runtime --no-system-d3d-compiler --no-system-dxc-compiler --dir upload upload/shadPS4.exe
|
||||||
|
Compress-Archive -Path upload/* -DestinationPath shadps4-win64-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}.zip
|
||||||
|
|
||||||
|
- name: Upload Windows Qt artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-win64-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: upload/
|
||||||
|
|
||||||
|
macos-sdl:
|
||||||
|
runs-on: macos-15
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup latest Xcode
|
||||||
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: latest
|
||||||
|
|
||||||
|
- name: Cache CMake Configuration
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.cache-name }}-
|
||||||
|
|
||||||
|
- name: Cache CMake Build
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
|
env:
|
||||||
|
cache-name: ${{runner.os}}-sdl-cache-cmake-build
|
||||||
|
with:
|
||||||
|
append-timestamp: false
|
||||||
|
create-symlink: true
|
||||||
|
key: ${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
variant: sccache
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
|
||||||
|
|
||||||
|
- name: Package and Upload macOS SDL artifact
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
mv ${{github.workspace}}/build/shadps4 upload
|
||||||
|
cp ${{github.workspace}}/build/externals/MoltenVK/libMoltenVK.dylib upload
|
||||||
|
tar cf shadps4-macos-sdl.tar.gz -C upload .
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-macos-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: shadps4-macos-sdl.tar.gz
|
||||||
|
|
||||||
|
macos-qt:
|
||||||
|
runs-on: macos-15
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup latest Xcode
|
||||||
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: latest
|
||||||
|
|
||||||
|
- name: Setup Qt
|
||||||
|
uses: jurplel/install-qt-action@v4
|
||||||
|
with:
|
||||||
|
version: 6.7.3
|
||||||
|
host: mac
|
||||||
|
target: desktop
|
||||||
|
arch: clang_64
|
||||||
|
archives: qtbase qttools
|
||||||
|
modules: qtmultimedia
|
||||||
|
|
||||||
|
- name: Cache CMake Configuration
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-qt-cache-cmake-configuration
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.cache-name }}-
|
||||||
|
|
||||||
|
- name: Cache CMake Build
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
|
env:
|
||||||
|
cache-name: ${{runner.os}}-qt-cache-cmake-build
|
||||||
|
with:
|
||||||
|
append-timestamp: false
|
||||||
|
create-symlink: true
|
||||||
|
key: ${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
variant: sccache
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
|
||||||
|
|
||||||
|
- name: Package and Upload macOS Qt artifact
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
mv ${{github.workspace}}/build/shadps4.app upload
|
||||||
|
macdeployqt upload/shadps4.app
|
||||||
|
tar cf shadps4-macos-qt.tar.gz -C upload .
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-macos-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: shadps4-macos-qt.tar.gz
|
||||||
|
|
||||||
|
linux-sdl:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||||
|
|
||||||
|
- name: Cache CMake Configuration
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.cache-name }}-
|
||||||
|
|
||||||
|
- name: Cache CMake Build
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
|
||||||
|
with:
|
||||||
|
append-timestamp: false
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||||
|
|
||||||
|
- name: Package and Upload Linux(ubuntu64) SDL artifact
|
||||||
|
run: |
|
||||||
|
ls -la ${{ github.workspace }}/build/shadps4
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-ubuntu64-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: ${{ github.workspace }}/build/shadps4
|
||||||
|
|
||||||
|
- name: Run AppImage packaging script
|
||||||
|
run: ./.github/linux-appimage-sdl.sh
|
||||||
|
|
||||||
|
- name: Package and Upload Linux SDL artifact
|
||||||
|
run: |
|
||||||
|
tar cf shadps4-linux-sdl.tar.gz -C ${{github.workspace}}/build shadps4
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-linux-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: Shadps4-sdl.AppImage
|
||||||
|
|
||||||
|
linux-qt:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev
|
||||||
|
|
||||||
|
- name: Cache CMake Configuration
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-qt-cache-cmake-configuration
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.cache-name }}-
|
||||||
|
|
||||||
|
- name: Cache CMake Build
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2.14
|
||||||
|
env:
|
||||||
|
cache-name: ${{ runner.os }}-qt-cache-cmake-build
|
||||||
|
with:
|
||||||
|
append-timestamp: false
|
||||||
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||||
|
|
||||||
|
- name: Run AppImage packaging script
|
||||||
|
run: ./.github/linux-appimage-qt.sh
|
||||||
|
|
||||||
|
- name: Package and Upload Linux Qt artifact
|
||||||
|
run: |
|
||||||
|
tar cf shadps4-linux-qt.tar.gz -C ${{github.workspace}}/build shadps4
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: shadps4-linux-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
|
||||||
|
path: Shadps4-qt.AppImage
|
||||||
|
|
||||||
|
pre-release:
|
||||||
|
if: github.ref == 'refs/heads/main' && github.repository == 'shadps4-emu/shadPS4' && github.event_name == 'push'
|
||||||
|
needs: [get-info, windows-sdl, windows-qt, macos-sdl, macos-qt, linux-sdl, linux-qt]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: ./artifacts
|
||||||
|
|
||||||
|
- name: Compress individual directories (without parent directory)
|
||||||
|
run: |
|
||||||
|
cd ./artifacts
|
||||||
|
for dir in */; do
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
dir_name=${dir%/}
|
||||||
|
echo "Creating zip for $dir_name"
|
||||||
|
(cd "$dir_name" && zip -r "../${dir_name}.zip" .)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Get latest release information
|
||||||
|
id: get_latest_release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.SHADPS4_TOKEN_REPO }}
|
||||||
|
run: |
|
||||||
|
api_url="https://api.github.com/repos/${{ github.repository }}"
|
||||||
|
latest_release_info=$(curl -H "Authorization: token $GITHUB_TOKEN" "$api_url/releases/latest")
|
||||||
|
echo "last_release_tag=$(echo "$latest_release_info" | jq -r '.tag_name')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create Pre-Release on GitHub
|
||||||
|
id: create_release
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.SHADPS4_TOKEN_REPO }}
|
||||||
|
name: "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}"
|
||||||
|
tag: "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}"
|
||||||
|
draft: false
|
||||||
|
prerelease: true
|
||||||
|
body: "Full Changelog: [${{ env.last_release_tag }}...${{ needs.get-info.outputs.shorthash }}](https://github.com/shadps4-emu/shadPS4/compare/${{ env.last_release_tag }}...${{ needs.get-info.outputs.fullhash }})"
|
||||||
|
artifacts: ./artifacts/*.zip
|
||||||
|
|
||||||
|
- name: Publish to Release Repository
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.SHADPS4_TOKEN_REPO }}
|
||||||
|
run: |
|
||||||
|
ARTIFACTS_DIR=./artifacts
|
||||||
|
REPO_WINDOWS="shadps4-emu/shadps4-binaries-Windows"
|
||||||
|
REPO_LINUX="shadps4-emu/shadps4-binaries-Linux"
|
||||||
|
REPO_MAC="shadps4-emu/shadps4-binaries-Mac"
|
||||||
|
|
||||||
|
for file in "$ARTIFACTS_DIR"/*.zip; do
|
||||||
|
filename=$(basename "$file")
|
||||||
|
REPO=""
|
||||||
|
|
||||||
|
# Determine repository based on file name
|
||||||
|
if [[ "$filename" == *"win64"* ]]; then
|
||||||
|
REPO=$REPO_WINDOWS
|
||||||
|
elif [[ "$filename" == *"linux"* ]] || [[ "$filename" == *"ubuntu64"* ]]; then
|
||||||
|
REPO=$REPO_LINUX
|
||||||
|
elif [[ "$filename" == *"macos"* ]]; then
|
||||||
|
REPO=$REPO_MAC
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If REPO is empty, skip file
|
||||||
|
if [[ -z "$REPO" ]]; then
|
||||||
|
echo "No matching repository for $filename"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if release already exists and get ID
|
||||||
|
release_id=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
"https://api.github.com/repos/$REPO/releases/tags/Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}" | jq -r '.id')
|
||||||
|
|
||||||
|
if [[ "$release_id" == "null" ]]; then
|
||||||
|
echo "Creating release in $REPO for $filename"
|
||||||
|
release_id=$(curl -s -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
-d '{
|
||||||
|
"tag_name": "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}",
|
||||||
|
"name": "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}",
|
||||||
|
"draft": false,
|
||||||
|
"prerelease": true,
|
||||||
|
"body": "Commit: [${{ needs.get-info.outputs.fullhash }}](https://github.com/shadps4-emu/shadPS4/commit/${{ needs.get-info.outputs.fullhash }})"
|
||||||
|
}' "https://api.github.com/repos/$REPO/releases" | jq -r '.id')
|
||||||
|
else
|
||||||
|
echo "Release already exists in $REPO with ID $release_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Artifact upload
|
||||||
|
echo "Uploading $filename to release $release_id in $REPO"
|
||||||
|
upload_url="https://uploads.github.com/repos/$REPO/releases/$release_id/assets?name=$filename"
|
||||||
|
curl -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/octet-stream" --data-binary @"$file" "$upload_url"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Get current pre-release information
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.SHADPS4_TOKEN_REPO }}
|
||||||
|
run: |
|
||||||
|
api_url="https://api.github.com/repos/${{ github.repository }}/releases"
|
||||||
|
|
||||||
|
# Get all releases (sorted by date)
|
||||||
|
releases=$(curl -H "Authorization: token $GITHUB_TOKEN" "$api_url")
|
||||||
|
|
||||||
|
# Capture the most recent pre-release (assuming the first one is the latest)
|
||||||
|
current_release=$(echo "$releases" | jq -c '.[] | select(.prerelease == true) | .published_at' | sort -r | head -n 1)
|
||||||
|
|
||||||
|
# Remove extra quotes from captured date
|
||||||
|
current_release=$(echo $current_release | tr -d '"')
|
||||||
|
|
||||||
|
# Export the current published_at to be available for the next step
|
||||||
|
echo "CURRENT_PUBLISHED_AT=$current_release" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Delete old pre-releases and tags
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.SHADPS4_TOKEN_REPO }}
|
||||||
|
run: |
|
||||||
|
api_url="https://api.github.com/repos/${{ github.repository }}/releases"
|
||||||
|
|
||||||
|
# Get current pre-releases
|
||||||
|
releases=$(curl -H "Authorization: token $GITHUB_TOKEN" "$api_url")
|
||||||
|
|
||||||
|
# Remove extra quotes from captured date
|
||||||
|
CURRENT_PUBLISHED_AT=$(echo $CURRENT_PUBLISHED_AT | tr -d '"')
|
||||||
|
|
||||||
|
# Convert CURRENT_PUBLISHED_AT para timestamp Unix
|
||||||
|
current_published_ts=$(date -d "$CURRENT_PUBLISHED_AT" +%s)
|
||||||
|
|
||||||
|
# Identify pre-releases
|
||||||
|
echo "$releases" | jq -c '.[] | select(.prerelease == true)' | while read -r release; do
|
||||||
|
release_date=$(echo "$release" | jq -r '.published_at')
|
||||||
|
release_id=$(echo "$release" | jq -r '.id')
|
||||||
|
release_tag=$(echo "$release" | jq -r '.tag_name')
|
||||||
|
|
||||||
|
# Remove extra quotes from captured date
|
||||||
|
release_date=$(echo $release_date | tr -d '"')
|
||||||
|
|
||||||
|
# Convert release_date para timestamp Unix
|
||||||
|
release_date_ts=$(date -d "$release_date" +%s)
|
||||||
|
|
||||||
|
# Compare timestamps and delete old pre-releases
|
||||||
|
if [[ "$release_date_ts" -lt "$current_published_ts" ]]; then
|
||||||
|
echo "Deleting old pre-release: $release_id from $release_date with tag: $release_tag"
|
||||||
|
# Delete the pre-release
|
||||||
|
curl -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$api_url/$release_id"
|
||||||
|
# Delete the tag
|
||||||
|
curl -X DELETE -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/${{ github.repository }}/git/refs/tags/$release_tag"
|
||||||
|
else
|
||||||
|
echo "Skipping pre-release: $release_id (newer or same date)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
17
.github/workflows/ci.yml
vendored
@@ -1,17 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: Reuse
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
tags: [ "*" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
jobs:
|
|
||||||
reuse:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: fsfe/reuse-action@v4
|
|
||||||
28
.github/workflows/format.yml
vendored
@@ -1,28 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: Clang Format
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "*" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
clang-format:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
||||||
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install clang-format-17
|
|
||||||
- name: Build
|
|
||||||
env:
|
|
||||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
|
||||||
run: ./.ci/clang-format.sh
|
|
||||||
41
.github/workflows/linux-qt.yml
vendored
@@ -1,41 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: Linux-Qt
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install misc packages
|
|
||||||
run: >
|
|
||||||
sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential qt6-base-dev
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
|
||||||
|
|
||||||
- name: Run AppImage packaging script
|
|
||||||
run: ./.github/linux-appimage-qt.sh
|
|
||||||
|
|
||||||
- name: Upload executable
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: shadps4-linux-qt
|
|
||||||
path: Shadps4-qt.AppImage
|
|
||||||
48
.github/workflows/linux.yml
vendored
@@ -1,48 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: Linux
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install misc packages
|
|
||||||
run: >
|
|
||||||
sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
|
||||||
|
|
||||||
- name: Upload executable
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: shadps4-ubuntu64
|
|
||||||
path: |
|
|
||||||
${{github.workspace}}/build/shadps4
|
|
||||||
|
|
||||||
- name: Run AppImage packaging script
|
|
||||||
run: ./.github/linux-appimage-sdl.sh
|
|
||||||
|
|
||||||
- name: Upload executable
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: shadps4-sdl-appimage
|
|
||||||
path: Shadps4-sdl.AppImage
|
|
||||||
60
.github/workflows/macos-qt.yml
vendored
@@ -1,60 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: macOS-Qt
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup latest Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@v1
|
|
||||||
with:
|
|
||||||
xcode-version: latest
|
|
||||||
|
|
||||||
- name: Install MoltenVK
|
|
||||||
run: |
|
|
||||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
||||||
arch -x86_64 /usr/local/bin/brew install molten-vk
|
|
||||||
|
|
||||||
- name: Setup Qt
|
|
||||||
uses: jurplel/install-qt-action@v4
|
|
||||||
with:
|
|
||||||
version: 6.7.2
|
|
||||||
host: mac
|
|
||||||
target: desktop
|
|
||||||
arch: clang_64
|
|
||||||
archives: qtbase
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
|
|
||||||
|
|
||||||
- name: Package
|
|
||||||
run: |
|
|
||||||
mkdir upload
|
|
||||||
mv ${{github.workspace}}/build/shadps4.app upload
|
|
||||||
macdeployqt upload/shadps4.app
|
|
||||||
tar cf shadps4-macos-qt.tar.gz -C upload .
|
|
||||||
|
|
||||||
- name: Upload executable
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: shadps4-macos-qt
|
|
||||||
path: shadps4-macos-qt.tar.gz
|
|
||||||
52
.github/workflows/macos.yml
vendored
@@ -1,52 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: macOS
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup latest Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@v1
|
|
||||||
with:
|
|
||||||
xcode-version: latest
|
|
||||||
|
|
||||||
- name: Install MoltenVK
|
|
||||||
run: |
|
|
||||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
||||||
arch -x86_64 /usr/local/bin/brew install molten-vk
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
|
|
||||||
|
|
||||||
- name: Package
|
|
||||||
run: |
|
|
||||||
mkdir upload
|
|
||||||
mv ${{github.workspace}}/build/shadps4 upload
|
|
||||||
cp $(arch -x86_64 /usr/local/bin/brew --prefix)/opt/molten-vk/lib/libMoltenVK.dylib upload
|
|
||||||
install_name_tool -add_rpath "@loader_path" upload/shadps4
|
|
||||||
tar cf shadps4-macos.tar.gz -C upload .
|
|
||||||
|
|
||||||
- name: Upload executable
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: shadps4-macos
|
|
||||||
path: shadps4-macos.tar.gz
|
|
||||||
49
.github/workflows/windows-qt.yml
vendored
@@ -1,49 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: Windows-Qt
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup Qt
|
|
||||||
uses: jurplel/install-qt-action@v4
|
|
||||||
with:
|
|
||||||
version: 6.7.2
|
|
||||||
host: windows
|
|
||||||
target: desktop
|
|
||||||
arch: win64_msvc2019_64
|
|
||||||
archives: qtbase
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL -DENABLE_QT_GUI=ON
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
run: |
|
|
||||||
mkdir upload
|
|
||||||
move build/Release/shadPS4.exe upload
|
|
||||||
windeployqt --dir upload upload/shadPS4.exe
|
|
||||||
|
|
||||||
- name: Upload executable
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: shadps4-win64-qt
|
|
||||||
path: upload
|
|
||||||
34
.github/workflows/windows.yml
vendored
@@ -1,34 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
name: Windows
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
|
||||||
|
|
||||||
- name: Upload executable
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: shadps4-win64
|
|
||||||
path: |
|
|
||||||
${{github.workspace}}/build/Release/shadPS4.exe
|
|
||||||
17
.gitignore
vendored
@@ -382,11 +382,13 @@ FodyWeavers.xsd
|
|||||||
|
|
||||||
# VS Code files for those working on multiple tools
|
# VS Code files for those working on multiple tools
|
||||||
.vscode/*
|
.vscode/*
|
||||||
!.vscode/settings.json
|
.vscode/settings.json
|
||||||
!.vscode/tasks.json
|
.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
.vscode/extensions.json
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
/CMakeUserPresets.json
|
||||||
|
/compile_commands.json
|
||||||
|
|
||||||
# Local History for Visual Studio Code
|
# Local History for Visual Studio Code
|
||||||
.history/
|
.history/
|
||||||
@@ -409,3 +411,10 @@ FodyWeavers.xsd
|
|||||||
/out/*
|
/out/*
|
||||||
/third-party/out/*
|
/third-party/out/*
|
||||||
/src/common/scm_rev.cpp
|
/src/common/scm_rev.cpp
|
||||||
|
|
||||||
|
# for macOS
|
||||||
|
**/.DS_Store
|
||||||
|
|
||||||
|
# JetBrains
|
||||||
|
.idea
|
||||||
|
cmake-build-*
|
||||||
|
|||||||
64
.gitmodules
vendored
@@ -1,63 +1,121 @@
|
|||||||
[submodule "externals/discord-rpc"]
|
|
||||||
path = externals/discord-rpc
|
|
||||||
url = https://github.com/shadps4-emu/ext-discord-rpc.git
|
|
||||||
[submodule "externals/cryptopp-cmake"]
|
[submodule "externals/cryptopp-cmake"]
|
||||||
path = externals/cryptopp-cmake
|
path = externals/cryptopp-cmake
|
||||||
url = https://github.com/shadps4-emu/ext-cryptopp-cmake.git
|
url = https://github.com/shadps4-emu/ext-cryptopp-cmake.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/cryptopp"]
|
[submodule "externals/cryptopp"]
|
||||||
path = externals/cryptopp
|
path = externals/cryptopp
|
||||||
url = https://github.com/shadps4-emu/ext-cryptopp.git
|
url = https://github.com/shadps4-emu/ext-cryptopp.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/cryptoppwin"]
|
[submodule "externals/cryptoppwin"]
|
||||||
path = externals/cryptoppwin
|
path = externals/cryptoppwin
|
||||||
url = https://github.com/shadps4-emu/ext-cryptoppwin.git
|
url = https://github.com/shadps4-emu/ext-cryptoppwin.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/zlib-ng"]
|
[submodule "externals/zlib-ng"]
|
||||||
path = externals/zlib-ng
|
path = externals/zlib-ng
|
||||||
url = https://github.com/shadps4-emu/ext-zlib-ng.git
|
url = https://github.com/shadps4-emu/ext-zlib-ng.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/sdl3"]
|
[submodule "externals/sdl3"]
|
||||||
path = externals/sdl3
|
path = externals/sdl3
|
||||||
url = https://github.com/shadps4-emu/ext-SDL.git
|
url = https://github.com/shadps4-emu/ext-SDL.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/fmt"]
|
[submodule "externals/fmt"]
|
||||||
path = externals/fmt
|
path = externals/fmt
|
||||||
url = https://github.com/shadps4-emu/ext-fmt.git
|
url = https://github.com/shadps4-emu/ext-fmt.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/vulkan-headers"]
|
[submodule "externals/vulkan-headers"]
|
||||||
path = externals/vulkan-headers
|
path = externals/vulkan-headers
|
||||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/vma"]
|
[submodule "externals/vma"]
|
||||||
path = externals/vma
|
path = externals/vma
|
||||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/glslang"]
|
[submodule "externals/glslang"]
|
||||||
path = externals/glslang
|
path = externals/glslang
|
||||||
url = https://github.com/KhronosGroup/glslang.git
|
url = https://github.com/KhronosGroup/glslang.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/robin-map"]
|
[submodule "externals/robin-map"]
|
||||||
path = externals/robin-map
|
path = externals/robin-map
|
||||||
url = https://github.com/Tessil/robin-map.git
|
url = https://github.com/Tessil/robin-map.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/xbyak"]
|
[submodule "externals/xbyak"]
|
||||||
path = externals/xbyak
|
path = externals/xbyak
|
||||||
url = https://github.com/herumi/xbyak.git
|
url = https://github.com/herumi/xbyak.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/winpthreads"]
|
[submodule "externals/winpthreads"]
|
||||||
path = externals/winpthreads
|
path = externals/winpthreads
|
||||||
url = https://github.com/shadps4-emu/winpthreads.git
|
url = https://github.com/shadps4-emu/winpthreads.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/magic_enum"]
|
[submodule "externals/magic_enum"]
|
||||||
path = externals/magic_enum
|
path = externals/magic_enum
|
||||||
url = https://github.com/Neargye/magic_enum.git
|
url = https://github.com/Neargye/magic_enum.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/toml11"]
|
[submodule "externals/toml11"]
|
||||||
path = externals/toml11
|
path = externals/toml11
|
||||||
url = https://github.com/ToruNiina/toml11.git
|
url = https://github.com/ToruNiina/toml11.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/zydis"]
|
[submodule "externals/zydis"]
|
||||||
path = externals/zydis
|
path = externals/zydis
|
||||||
url = https://github.com/zyantific/zydis.git
|
url = https://github.com/zyantific/zydis.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/sirit"]
|
[submodule "externals/sirit"]
|
||||||
path = externals/sirit
|
path = externals/sirit
|
||||||
url = https://github.com/shadps4-emu/sirit.git
|
url = https://github.com/shadps4-emu/sirit.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/xxhash"]
|
[submodule "externals/xxhash"]
|
||||||
path = externals/xxhash
|
path = externals/xxhash
|
||||||
url = https://github.com/Cyan4973/xxHash.git
|
url = https://github.com/Cyan4973/xxHash.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/tracy"]
|
[submodule "externals/tracy"]
|
||||||
path = externals/tracy
|
path = externals/tracy
|
||||||
url = https://github.com/shadps4-emu/tracy.git
|
url = https://github.com/shadps4-emu/tracy.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/ext-boost"]
|
[submodule "externals/ext-boost"]
|
||||||
path = externals/ext-boost
|
path = externals/ext-boost
|
||||||
url = https://github.com/shadps4-emu/ext-boost.git
|
url = https://github.com/shadps4-emu/ext-boost.git
|
||||||
|
shallow = true
|
||||||
[submodule "externals/date"]
|
[submodule "externals/date"]
|
||||||
path = externals/date
|
path = externals/date
|
||||||
url = https://github.com/HowardHinnant/date.git
|
url = https://github.com/HowardHinnant/date.git
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/ffmpeg-core"]
|
||||||
|
path = externals/ffmpeg-core
|
||||||
|
url = https://github.com/shadps4-emu/ext-ffmpeg-core.git
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/half"]
|
||||||
|
path = externals/half
|
||||||
|
url = https://github.com/ROCm/half.git
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/dear_imgui"]
|
||||||
|
path = externals/dear_imgui
|
||||||
|
url = https://github.com/shadps4-emu/ext-imgui.git
|
||||||
|
shallow = true
|
||||||
|
branch = docking
|
||||||
|
[submodule "externals/pugixml"]
|
||||||
|
path = externals/pugixml
|
||||||
|
url = https://github.com/zeux/pugixml.git
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/discord-rpc"]
|
||||||
|
path = externals/discord-rpc
|
||||||
|
url = https://github.com/shadps4-emu/ext-discord-rpc.git
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/LibAtrac9"]
|
||||||
|
path = externals/LibAtrac9
|
||||||
|
url = https://github.com/shadps4-emu/ext-LibAtrac9.git
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/libpng"]
|
||||||
|
path = externals/libpng
|
||||||
|
url = https://github.com/pnggroup/libpng
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/MoltenVK/SPIRV-Cross"]
|
||||||
|
path = externals/MoltenVK/SPIRV-Cross
|
||||||
|
url = https://github.com/KhronosGroup/SPIRV-Cross
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/MoltenVK/MoltenVK"]
|
||||||
|
path = externals/MoltenVK/MoltenVK
|
||||||
|
url = https://github.com/KhronosGroup/MoltenVK
|
||||||
|
shallow = true
|
||||||
|
[submodule "externals/MoltenVK/cereal"]
|
||||||
|
path = externals/MoltenVK/cereal
|
||||||
|
url = https://github.com/USCiLab/cereal
|
||||||
|
shallow = true
|
||||||
|
|||||||
59
.reuse/dep5
@@ -1,59 +0,0 @@
|
|||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Comment: It is best to use this file to record copyright information about
|
|
||||||
generated, binary and third party files
|
|
||||||
|
|
||||||
Files: CMakeSettings.json
|
|
||||||
.github/shadps4.desktop
|
|
||||||
.github/shadps4.png
|
|
||||||
.gitmodules
|
|
||||||
documents/changelog.txt
|
|
||||||
documents/readme.txt
|
|
||||||
documents/Quickstart/1.png
|
|
||||||
documents/Quickstart/2.png
|
|
||||||
documents/Screenshots/Bloodborne.png
|
|
||||||
documents/Screenshots/Sonic Mania.png
|
|
||||||
documents/Screenshots/Undertale.png
|
|
||||||
documents/Screenshots/We are DOOMED.png
|
|
||||||
scripts/ps4_names.txt
|
|
||||||
src/images/controller_icon.png
|
|
||||||
src/images/exit_icon.png
|
|
||||||
src/images/file_icon.png
|
|
||||||
src/images/flag_china.png
|
|
||||||
src/images/flag_eu.png
|
|
||||||
src/images/flag_jp.png
|
|
||||||
src/images/flag_unk.png
|
|
||||||
src/images/flag_us.png
|
|
||||||
src/images/flag_world.png
|
|
||||||
src/images/folder_icon.png
|
|
||||||
src/images/grid_icon.png
|
|
||||||
src/images/iconsize_icon.png
|
|
||||||
src/images/list_icon.png
|
|
||||||
src/images/list_mode_icon.png
|
|
||||||
src/images/pause_icon.png
|
|
||||||
src/images/play_icon.png
|
|
||||||
src/images/refresh_icon.png
|
|
||||||
src/images/settings_icon.png
|
|
||||||
src/images/stop_icon.png
|
|
||||||
src/images/shadPS4.icns
|
|
||||||
src/images/shadps4.ico
|
|
||||||
src/images/themes_icon.png
|
|
||||||
src/shadps4.qrc
|
|
||||||
src/shadps4.rc
|
|
||||||
Copyright: shadPS4 Emulator Project
|
|
||||||
License: GPL-2.0-or-later
|
|
||||||
|
|
||||||
Files: externals/cmake-modules/*
|
|
||||||
Copyright: 2009-2010 Iowa State University
|
|
||||||
License: BSL-1.0
|
|
||||||
|
|
||||||
Files: externals/renderdoc/*
|
|
||||||
Copyright: 2019-2024 Baldur Karlsson
|
|
||||||
License: MIT
|
|
||||||
|
|
||||||
Files: externals/stb_image.h
|
|
||||||
Copyright: 2017 Sean Barrett
|
|
||||||
License: MIT
|
|
||||||
|
|
||||||
Files: externals/tracy/*
|
|
||||||
Copyright: 2017-2024 Bartosz Taudul <wolf@nereid.pl>
|
|
||||||
License: BSD-3-Clause
|
|
||||||
556
CMakeLists.txt
Normal file → Executable file
@@ -1,23 +1,65 @@
|
|||||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.16.3)
|
# Version 3.24 needed for FetchContent OVERRIDE_FIND_PACKAGE
|
||||||
|
cmake_minimum_required(VERSION 3.24)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
enable_language(OBJC)
|
enable_language(OBJC)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 11)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 14)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(shadPS4)
|
project(shadPS4 CXX C ASM)
|
||||||
|
|
||||||
|
# Forcing PIE makes sure that the base address is high enough so that it doesn't clash with the PS4 memory.
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
|
# check PIE support at link time
|
||||||
|
include(CheckPIESupported)
|
||||||
|
check_pie_supported(OUTPUT_VARIABLE pie_check LANGUAGES C CXX)
|
||||||
|
if(NOT CMAKE_C_LINK_PIE_SUPPORTED OR NOT CMAKE_CXX_LINK_PIE_SUPPORTED)
|
||||||
|
message(WARNING "PIE is not supported at link time: ${pie_check}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
|
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
|
||||||
|
option(ENABLE_DISCORD_RPC "Enable the Discord RPC integration" ON)
|
||||||
|
option(ENABLE_UPDATER "Enables the options to updater" ON)
|
||||||
|
|
||||||
|
# First, determine whether to use CMAKE_OSX_ARCHITECTURES or CMAKE_SYSTEM_PROCESSOR.
|
||||||
|
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||||
|
set(BASE_ARCHITECTURE "${CMAKE_OSX_ARCHITECTURES}")
|
||||||
|
else()
|
||||||
|
set(BASE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Next, match common architecture strings down to a known common value.
|
||||||
|
if (BASE_ARCHITECTURE MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
|
||||||
|
set(ARCHITECTURE "x86_64")
|
||||||
|
elseif (BASE_ARCHITECTURE MATCHES "(aarch64)|(AARCH64)|(arm64)|(ARM64)")
|
||||||
|
set(ARCHITECTURE "arm64")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unsupported CPU architecture: ${BASE_ARCHITECTURE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (APPLE AND ARCHITECTURE STREQUAL "x86_64" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||||
|
# Exclude ARM homebrew path to avoid conflicts when cross compiling.
|
||||||
|
list(APPEND CMAKE_IGNORE_PREFIX_PATH "/opt/homebrew")
|
||||||
|
|
||||||
|
# Need to reconfigure pkg-config to use the right architecture library paths.
|
||||||
|
# It's not ideal to override these but otherwise the build breaks just by having pkg-config installed.
|
||||||
|
set(ENV{PKG_CONFIG_DIR} "")
|
||||||
|
set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig:${CMAKE_SYSROOT}/usr/local/lib/pkgconfig:${CMAKE_SYSROOT}/usr/local/share/pkgconfig")
|
||||||
|
set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
|
||||||
|
endif()
|
||||||
|
|
||||||
# This function should be passed a list of all files in a target. It will automatically generate file groups
|
# This function should be passed a list of all files in a target. It will automatically generate file groups
|
||||||
# following the directory hierarchy, so that the layout of the files in IDEs matches the one in the filesystem.
|
# following the directory hierarchy, so that the layout of the files in IDEs matches the one in the filesystem.
|
||||||
@@ -62,24 +104,33 @@ include(GetGitRevisionDescription)
|
|||||||
get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
||||||
git_describe(GIT_DESC --always --long --dirty)
|
git_describe(GIT_DESC --always --long --dirty)
|
||||||
git_branch_name(GIT_BRANCH)
|
git_branch_name(GIT_BRANCH)
|
||||||
|
string(TIMESTAMP BUILD_DATE "%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp" @ONLY)
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp" @ONLY)
|
||||||
|
|
||||||
find_package(Boost 1.84.0 CONFIG)
|
find_package(Boost 1.84.0 CONFIG)
|
||||||
find_package(cryptopp 8.9.0 MODULE)
|
find_package(FFmpeg 5.1.2 MODULE)
|
||||||
find_package(fmt 10.2.1 CONFIG)
|
find_package(fmt 10.2.0 CONFIG)
|
||||||
find_package(glslang 14.2.0 CONFIG)
|
find_package(glslang 15 CONFIG)
|
||||||
find_package(magic_enum 0.9.6 CONFIG)
|
find_package(half 1.12.0 MODULE)
|
||||||
|
find_package(magic_enum 0.9.7 CONFIG)
|
||||||
|
find_package(PNG 1.6 MODULE)
|
||||||
|
find_package(RenderDoc 1.6.0 MODULE)
|
||||||
find_package(SDL3 3.1.2 CONFIG)
|
find_package(SDL3 3.1.2 CONFIG)
|
||||||
find_package(toml11 3.8.1 CONFIG)
|
find_package(stb MODULE)
|
||||||
|
find_package(toml11 4.2.0 CONFIG)
|
||||||
find_package(tsl-robin-map 1.3.0 CONFIG)
|
find_package(tsl-robin-map 1.3.0 CONFIG)
|
||||||
find_package(VulkanHeaders 1.3.289 CONFIG)
|
find_package(VulkanHeaders 1.4.303 CONFIG)
|
||||||
find_package(VulkanMemoryAllocator 3.1.0 CONFIG)
|
find_package(VulkanMemoryAllocator 3.1.0 CONFIG)
|
||||||
find_package(xbyak 7.07 CONFIG)
|
find_package(xbyak 7.07 CONFIG)
|
||||||
find_package(xxHash 0.8.2 MODULE)
|
find_package(xxHash 0.8.2 MODULE)
|
||||||
find_package(zlib-ng 2.2.0 MODULE)
|
find_package(ZLIB 1.3 MODULE)
|
||||||
find_package(Zydis 4.1.0 CONFIG)
|
find_package(Zydis 5.0.0 CONFIG)
|
||||||
find_package(RenderDoc MODULE)
|
find_package(pugixml 1.14 CONFIG)
|
||||||
|
|
||||||
|
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT MSVC)
|
||||||
|
find_package(cryptopp 8.9.0 MODULE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
find_package(date 3.0.1 CONFIG)
|
find_package(date 3.0.1 CONFIG)
|
||||||
@@ -91,63 +142,111 @@ check_symbol_exists(pthread_mutex_timedlock "pthread.h" HAVE_PTHREAD_MUTEX_TIMED
|
|||||||
if(HAVE_PTHREAD_MUTEX_TIMEDLOCK OR WIN32)
|
if(HAVE_PTHREAD_MUTEX_TIMEDLOCK OR WIN32)
|
||||||
add_compile_options(-DHAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
add_compile_options(-DHAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||||
endif()
|
endif()
|
||||||
check_symbol_exists(sem_timedwait "semaphore.h" HAVE_SEM_TIMEDWAIT)
|
|
||||||
if(HAVE_SEM_TIMEDWAIT OR WIN32)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
add_compile_options(-DHAVE_SEM_TIMEDWAIT)
|
# libc++ requires -fexperimental-library to enable std::jthread and std::stop_token support.
|
||||||
|
include(CheckCXXSymbolExists)
|
||||||
|
check_cxx_symbol_exists(_LIBCPP_VERSION version LIBCPP)
|
||||||
|
if(LIBCPP)
|
||||||
|
add_compile_options(-fexperimental-library)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(externals)
|
add_subdirectory(externals)
|
||||||
include_directories(src)
|
include_directories(src)
|
||||||
|
|
||||||
if(ENABLE_QT_GUI)
|
if(ENABLE_QT_GUI)
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent)
|
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent LinguistTools Network Multimedia)
|
||||||
qt_standard_project_setup()
|
qt_standard_project_setup()
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
|
set(QT_TRANSLATIONS "${PROJECT_SOURCE_DIR}/src/qt_gui/translations")
|
||||||
|
file(GLOB_RECURSE TRANSLATIONS_TS ${QT_TRANSLATIONS}/*.ts)
|
||||||
|
|
||||||
|
set_source_files_properties(${TRANSLATIONS_TS} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations")
|
||||||
|
qt_add_translation(TRANSLATIONS_QM ${TRANSLATIONS_TS})
|
||||||
|
|
||||||
|
set(TRANSLATIONS_QRC ${CMAKE_CURRENT_BINARY_DIR}/translations/translations.qrc)
|
||||||
|
file(WRITE ${TRANSLATIONS_QRC} "<RCC><qresource prefix=\"translations\">\n")
|
||||||
|
foreach (QM ${TRANSLATIONS_QM})
|
||||||
|
get_filename_component(QM_FILE ${QM} NAME)
|
||||||
|
file(APPEND ${TRANSLATIONS_QRC} "<file>${QM_FILE}</file>\n")
|
||||||
|
endforeach (QM)
|
||||||
|
file(APPEND ${TRANSLATIONS_QRC} "</qresource></RCC>")
|
||||||
|
|
||||||
|
qt_add_resources(TRANSLATIONS ${TRANSLATIONS_QRC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(AUDIO_CORE src/audio_core/sdl_audio.cpp
|
set(AJM_LIB src/core/libraries/ajm/ajm.cpp
|
||||||
src/audio_core/sdl_audio.h
|
src/core/libraries/ajm/ajm.h
|
||||||
|
src/core/libraries/ajm/ajm_at9.cpp
|
||||||
|
src/core/libraries/ajm/ajm_at9.h
|
||||||
|
src/core/libraries/ajm/ajm_batch.cpp
|
||||||
|
src/core/libraries/ajm/ajm_batch.h
|
||||||
|
src/core/libraries/ajm/ajm_context.cpp
|
||||||
|
src/core/libraries/ajm/ajm_context.h
|
||||||
|
src/core/libraries/ajm/ajm_error.h
|
||||||
|
src/core/libraries/ajm/ajm_instance.cpp
|
||||||
|
src/core/libraries/ajm/ajm_instance.h
|
||||||
|
src/core/libraries/ajm/ajm_mp3.cpp
|
||||||
|
src/core/libraries/ajm/ajm_mp3.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(AUDIO_LIB src/core/libraries/audio/audioin.cpp
|
set(AUDIO_LIB src/core/libraries/audio/audioin.cpp
|
||||||
src/core/libraries/audio/audioin.h
|
src/core/libraries/audio/audioin.h
|
||||||
src/core/libraries/audio/audioout.cpp
|
src/core/libraries/audio/audioout.cpp
|
||||||
src/core/libraries/audio/audioout.h
|
src/core/libraries/audio/audioout.h
|
||||||
src/core/libraries/ajm/ajm.cpp
|
src/core/libraries/audio/sdl_audio.cpp
|
||||||
src/core/libraries/ajm/ajm.h
|
src/core/libraries/audio/sdl_audio.h
|
||||||
|
src/core/libraries/audio/audioout_error.h
|
||||||
|
src/core/libraries/ngs2/ngs2.cpp
|
||||||
|
src/core/libraries/ngs2/ngs2.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(GNM_LIB src/core/libraries/gnmdriver/gnmdriver.cpp
|
set(GNM_LIB src/core/libraries/gnmdriver/gnmdriver.cpp
|
||||||
src/core/libraries/gnmdriver/gnmdriver.h
|
src/core/libraries/gnmdriver/gnmdriver.h
|
||||||
|
src/core/libraries/gnmdriver/gnm_error.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(KERNEL_LIB
|
set(KERNEL_LIB src/core/libraries/kernel/sync/mutex.cpp
|
||||||
src/core/libraries/kernel/event_flag/event_flag.cpp
|
src/core/libraries/kernel/sync/mutex.h
|
||||||
src/core/libraries/kernel/event_flag/event_flag.h
|
src/core/libraries/kernel/sync/semaphore.h
|
||||||
src/core/libraries/kernel/event_flag/event_flag_obj.cpp
|
src/core/libraries/kernel/threads/condvar.cpp
|
||||||
src/core/libraries/kernel/event_flag/event_flag_obj.h
|
src/core/libraries/kernel/threads/event_flag.cpp
|
||||||
|
src/core/libraries/kernel/threads/exception.cpp
|
||||||
|
src/core/libraries/kernel/threads/exception.h
|
||||||
|
src/core/libraries/kernel/threads/mutex.cpp
|
||||||
|
src/core/libraries/kernel/threads/pthread_attr.cpp
|
||||||
|
src/core/libraries/kernel/threads/pthread_clean.cpp
|
||||||
|
src/core/libraries/kernel/threads/pthread.cpp
|
||||||
|
src/core/libraries/kernel/threads/pthread_spec.cpp
|
||||||
src/core/libraries/kernel/threads/rwlock.cpp
|
src/core/libraries/kernel/threads/rwlock.cpp
|
||||||
src/core/libraries/kernel/threads/semaphore.cpp
|
src/core/libraries/kernel/threads/semaphore.cpp
|
||||||
src/core/libraries/kernel/threads/keys.cpp
|
src/core/libraries/kernel/threads/sleepq.cpp
|
||||||
src/core/libraries/kernel/threads/threads.h
|
src/core/libraries/kernel/threads/sleepq.h
|
||||||
src/core/libraries/kernel/cpu_management.cpp
|
src/core/libraries/kernel/threads/stack.cpp
|
||||||
src/core/libraries/kernel/cpu_management.h
|
src/core/libraries/kernel/threads/tcb.cpp
|
||||||
src/core/libraries/kernel/event_queue.cpp
|
src/core/libraries/kernel/threads/pthread.h
|
||||||
src/core/libraries/kernel/event_queue.h
|
src/core/libraries/kernel/threads/thread_state.cpp
|
||||||
src/core/libraries/kernel/event_queues.cpp
|
src/core/libraries/kernel/threads/thread_state.h
|
||||||
src/core/libraries/kernel/event_queues.h
|
src/core/libraries/kernel/process.cpp
|
||||||
|
src/core/libraries/kernel/process.h
|
||||||
|
src/core/libraries/kernel/equeue.cpp
|
||||||
|
src/core/libraries/kernel/equeue.h
|
||||||
src/core/libraries/kernel/file_system.cpp
|
src/core/libraries/kernel/file_system.cpp
|
||||||
src/core/libraries/kernel/file_system.h
|
src/core/libraries/kernel/file_system.h
|
||||||
src/core/libraries/kernel/libkernel.cpp
|
src/core/libraries/kernel/kernel.cpp
|
||||||
src/core/libraries/kernel/libkernel.h
|
src/core/libraries/kernel/kernel.h
|
||||||
src/core/libraries/kernel/memory_management.cpp
|
src/core/libraries/kernel/memory.cpp
|
||||||
src/core/libraries/kernel/memory_management.h
|
src/core/libraries/kernel/memory.h
|
||||||
src/core/libraries/kernel/thread_management.cpp
|
src/core/libraries/kernel/threads.cpp
|
||||||
src/core/libraries/kernel/thread_management.h
|
src/core/libraries/kernel/threads.h
|
||||||
src/core/libraries/kernel/time_management.cpp
|
src/core/libraries/kernel/time.cpp
|
||||||
src/core/libraries/kernel/time_management.h
|
src/core/libraries/kernel/time.h
|
||||||
|
src/core/libraries/kernel/orbis_error.h
|
||||||
|
src/core/libraries/kernel/posix_error.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(NETWORK_LIBS src/core/libraries/network/http.cpp
|
set(NETWORK_LIBS src/core/libraries/network/http.cpp
|
||||||
@@ -155,37 +254,85 @@ set(NETWORK_LIBS src/core/libraries/network/http.cpp
|
|||||||
src/core/libraries/network/net.cpp
|
src/core/libraries/network/net.cpp
|
||||||
src/core/libraries/network/netctl.cpp
|
src/core/libraries/network/netctl.cpp
|
||||||
src/core/libraries/network/netctl.h
|
src/core/libraries/network/netctl.h
|
||||||
|
src/core/libraries/network/net_ctl_obj.cpp
|
||||||
|
src/core/libraries/network/net_ctl_obj.h
|
||||||
|
src/core/libraries/network/net_ctl_codes.h
|
||||||
src/core/libraries/network/net.h
|
src/core/libraries/network/net.h
|
||||||
src/core/libraries/network/ssl.cpp
|
src/core/libraries/network/ssl.cpp
|
||||||
src/core/libraries/network/ssl.h
|
src/core/libraries/network/ssl.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(AVPLAYER_LIB src/core/libraries/avplayer/avplayer_common.cpp
|
||||||
|
src/core/libraries/avplayer/avplayer_common.h
|
||||||
|
src/core/libraries/avplayer/avplayer_file_streamer.cpp
|
||||||
|
src/core/libraries/avplayer/avplayer_file_streamer.h
|
||||||
|
src/core/libraries/avplayer/avplayer_impl.cpp
|
||||||
|
src/core/libraries/avplayer/avplayer_impl.h
|
||||||
|
src/core/libraries/avplayer/avplayer_source.cpp
|
||||||
|
src/core/libraries/avplayer/avplayer_source.h
|
||||||
|
src/core/libraries/avplayer/avplayer_state.cpp
|
||||||
|
src/core/libraries/avplayer/avplayer_state.h
|
||||||
|
src/core/libraries/avplayer/avplayer.cpp
|
||||||
|
src/core/libraries/avplayer/avplayer.h
|
||||||
|
src/core/libraries/avplayer/avplayer_error.h
|
||||||
|
)
|
||||||
|
|
||||||
set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp
|
set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp
|
||||||
src/core/libraries/system/commondialog.h
|
src/core/libraries/system/commondialog.h
|
||||||
src/core/libraries/system/msgdialog.cpp
|
src/core/libraries/system/msgdialog.cpp
|
||||||
src/core/libraries/system/msgdialog.h
|
src/core/libraries/system/msgdialog.h
|
||||||
|
src/core/libraries/system/msgdialog_ui.cpp
|
||||||
src/core/libraries/system/posix.cpp
|
src/core/libraries/system/posix.cpp
|
||||||
src/core/libraries/system/posix.h
|
src/core/libraries/system/posix.h
|
||||||
src/core/libraries/save_data/error_codes.h
|
src/core/libraries/save_data/save_backup.cpp
|
||||||
|
src/core/libraries/save_data/save_backup.h
|
||||||
|
src/core/libraries/save_data/save_instance.cpp
|
||||||
|
src/core/libraries/save_data/save_instance.h
|
||||||
|
src/core/libraries/save_data/save_memory.cpp
|
||||||
|
src/core/libraries/save_data/save_memory.h
|
||||||
src/core/libraries/save_data/savedata.cpp
|
src/core/libraries/save_data/savedata.cpp
|
||||||
src/core/libraries/save_data/savedata.h
|
src/core/libraries/save_data/savedata.h
|
||||||
src/core/libraries/system/savedatadialog.cpp
|
src/core/libraries/save_data/dialog/savedatadialog.cpp
|
||||||
src/core/libraries/system/savedatadialog.h
|
src/core/libraries/save_data/dialog/savedatadialog.h
|
||||||
|
src/core/libraries/save_data/dialog/savedatadialog_ui.cpp
|
||||||
|
src/core/libraries/save_data/dialog/savedatadialog_ui.h
|
||||||
src/core/libraries/system/sysmodule.cpp
|
src/core/libraries/system/sysmodule.cpp
|
||||||
src/core/libraries/system/sysmodule.h
|
src/core/libraries/system/sysmodule.h
|
||||||
|
src/core/libraries/system/system_error.h
|
||||||
src/core/libraries/system/systemservice.cpp
|
src/core/libraries/system/systemservice.cpp
|
||||||
src/core/libraries/system/systemservice.h
|
src/core/libraries/system/systemservice.h
|
||||||
|
src/core/libraries/system/systemservice_error.h
|
||||||
src/core/libraries/system/userservice.cpp
|
src/core/libraries/system/userservice.cpp
|
||||||
src/core/libraries/system/userservice.h
|
src/core/libraries/system/userservice.h
|
||||||
|
src/core/libraries/system/userservice_error.h
|
||||||
src/core/libraries/app_content/app_content.cpp
|
src/core/libraries/app_content/app_content.cpp
|
||||||
src/core/libraries/app_content/app_content.h
|
src/core/libraries/app_content/app_content.h
|
||||||
|
src/core/libraries/app_content/app_content_error.h
|
||||||
src/core/libraries/rtc/rtc.cpp
|
src/core/libraries/rtc/rtc.cpp
|
||||||
src/core/libraries/rtc/rtc.h
|
src/core/libraries/rtc/rtc.h
|
||||||
|
src/core/libraries/rtc/rtc_error.h
|
||||||
src/core/libraries/disc_map/disc_map.cpp
|
src/core/libraries/disc_map/disc_map.cpp
|
||||||
src/core/libraries/disc_map/disc_map.h
|
src/core/libraries/disc_map/disc_map.h
|
||||||
src/core/libraries/disc_map/disc_map_codes.h
|
src/core/libraries/disc_map/disc_map_codes.h
|
||||||
src/core/libraries/avplayer/avplayer.cpp
|
src/core/libraries/ngs2/ngs2.cpp
|
||||||
src/core/libraries/avplayer/avplayer.h
|
src/core/libraries/ngs2/ngs2.h
|
||||||
|
src/core/libraries/ngs2/ngs2_error.h
|
||||||
|
src/core/libraries/ngs2/ngs2_impl.cpp
|
||||||
|
src/core/libraries/ngs2/ngs2_impl.h
|
||||||
|
src/core/libraries/ajm/ajm_error.h
|
||||||
|
src/core/libraries/audio3d/audio3d.cpp
|
||||||
|
src/core/libraries/audio3d/audio3d.h
|
||||||
|
src/core/libraries/audio3d/audio3d_error.h
|
||||||
|
src/core/libraries/audio3d/audio3d_impl.cpp
|
||||||
|
src/core/libraries/audio3d/audio3d_impl.h
|
||||||
|
src/core/libraries/game_live_streaming/gamelivestreaming.cpp
|
||||||
|
src/core/libraries/game_live_streaming/gamelivestreaming.h
|
||||||
|
src/core/libraries/remote_play/remoteplay.cpp
|
||||||
|
src/core/libraries/remote_play/remoteplay.h
|
||||||
|
src/core/libraries/share_play/shareplay.cpp
|
||||||
|
src/core/libraries/share_play/shareplay.h
|
||||||
|
src/core/libraries/razor_cpu/razor_cpu.cpp
|
||||||
|
src/core/libraries/razor_cpu/razor_cpu.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h
|
set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h
|
||||||
@@ -193,65 +340,118 @@ set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h
|
|||||||
src/core/libraries/videoout/driver.h
|
src/core/libraries/videoout/driver.h
|
||||||
src/core/libraries/videoout/video_out.cpp
|
src/core/libraries/videoout/video_out.cpp
|
||||||
src/core/libraries/videoout/video_out.h
|
src/core/libraries/videoout/video_out.h
|
||||||
|
src/core/libraries/videoout/videoout_error.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(LIBC_SOURCES src/core/libraries/libc/libc.cpp
|
set(LIBC_SOURCES src/core/libraries/libc_internal/libc_internal.cpp
|
||||||
src/core/libraries/libc/libc.h
|
|
||||||
src/core/libraries/libc/printf.h
|
|
||||||
src/core/libraries/libc/va_ctx.h
|
|
||||||
src/core/libraries/libc/libc_cxa.cpp
|
|
||||||
src/core/libraries/libc/libc_cxa.h
|
|
||||||
src/core/libraries/libc/libc_stdio.cpp
|
|
||||||
src/core/libraries/libc/libc_stdio.h
|
|
||||||
src/core/libraries/libc/libc_math.cpp
|
|
||||||
src/core/libraries/libc/libc_math.h
|
|
||||||
src/core/libraries/libc/libc_string.cpp
|
|
||||||
src/core/libraries/libc/libc_string.h
|
|
||||||
src/core/libraries/libc/libc_stdlib.cpp
|
|
||||||
src/core/libraries/libc/libc_stdlib.h
|
|
||||||
src/core/libraries/libc_internal/libc_internal.cpp
|
|
||||||
src/core/libraries/libc_internal/libc_internal.h
|
src/core/libraries/libc_internal/libc_internal.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(DIALOGS_LIB src/core/libraries/dialogs/error_dialog.cpp
|
set(IME_LIB src/core/libraries/ime/error_dialog.cpp
|
||||||
src/core/libraries/dialogs/error_dialog.h
|
src/core/libraries/ime/error_dialog.h
|
||||||
src/core/libraries/dialogs/ime_dialog.cpp
|
src/core/libraries/ime/ime_common.h
|
||||||
src/core/libraries/dialogs/ime_dialog.h
|
src/core/libraries/ime/ime_dialog_ui.cpp
|
||||||
src/core/libraries/dialogs/error_codes.h
|
src/core/libraries/ime/ime_dialog_ui.h
|
||||||
|
src/core/libraries/ime/ime_dialog.cpp
|
||||||
|
src/core/libraries/ime/ime_dialog.h
|
||||||
|
src/core/libraries/ime/ime_ui.cpp
|
||||||
|
src/core/libraries/ime/ime_ui.h
|
||||||
|
src/core/libraries/ime/ime.cpp
|
||||||
|
src/core/libraries/ime/ime.h
|
||||||
|
src/core/libraries/ime/ime_error.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PAD_LIB src/core/libraries/pad/pad.cpp
|
set(PAD_LIB src/core/libraries/pad/pad.cpp
|
||||||
src/core/libraries/pad/pad.h
|
src/core/libraries/pad/pad.h
|
||||||
|
src/core/libraries/pad/pad_errors.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PNG_LIB src/core/libraries/libpng/pngdec.cpp
|
set(PNG_LIB src/core/libraries/libpng/pngdec.cpp
|
||||||
src/core/libraries/libpng/pngdec.h
|
src/core/libraries/libpng/pngdec.h
|
||||||
|
src/core/libraries/libpng/pngdec_error.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(JPEG_LIB src/core/libraries/jpeg/jpeg_error.h
|
||||||
|
src/core/libraries/jpeg/jpegenc.cpp
|
||||||
|
src/core/libraries/jpeg/jpegenc.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLAYGO_LIB src/core/libraries/playgo/playgo.cpp
|
set(PLAYGO_LIB src/core/libraries/playgo/playgo.cpp
|
||||||
src/core/libraries/playgo/playgo.h
|
src/core/libraries/playgo/playgo.h
|
||||||
|
src/core/libraries/playgo/playgo_dialog.cpp
|
||||||
|
src/core/libraries/playgo/playgo_dialog.h
|
||||||
src/core/libraries/playgo/playgo_types.h
|
src/core/libraries/playgo/playgo_types.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(RANDOM_LIB src/core/libraries/random/random.cpp
|
set(RANDOM_LIB src/core/libraries/random/random.cpp
|
||||||
src/core/libraries/random/random.h
|
src/core/libraries/random/random.h
|
||||||
|
src/core/libraries/random/random_error.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(USBD_LIB src/core/libraries/usbd/usbd.cpp
|
set(USBD_LIB src/core/libraries/usbd/usbd.cpp
|
||||||
src/core/libraries/usbd/usbd.h
|
src/core/libraries/usbd/usbd.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(FIBER_LIB src/core/libraries/fiber/fiber_context.s
|
||||||
|
src/core/libraries/fiber/fiber.cpp
|
||||||
|
src/core/libraries/fiber/fiber.h
|
||||||
|
src/core/libraries/fiber/fiber_error.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(VDEC_LIB src/core/libraries/videodec/videodec2_impl.cpp
|
||||||
|
src/core/libraries/videodec/videodec2_impl.h
|
||||||
|
src/core/libraries/videodec/videodec2.cpp
|
||||||
|
src/core/libraries/videodec/videodec2.h
|
||||||
|
src/core/libraries/videodec/videodec2_avc.h
|
||||||
|
src/core/libraries/videodec/videodec.cpp
|
||||||
|
src/core/libraries/videodec/videodec.h
|
||||||
|
src/core/libraries/videodec/videodec_error.h
|
||||||
|
src/core/libraries/videodec/videodec_impl.cpp
|
||||||
|
src/core/libraries/videodec/videodec_impl.h
|
||||||
|
)
|
||||||
|
|
||||||
set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
|
set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
|
||||||
src/core/libraries/np_manager/np_manager.h
|
src/core/libraries/np_manager/np_manager.h
|
||||||
src/core/libraries/np_score/np_score.cpp
|
src/core/libraries/np_score/np_score.cpp
|
||||||
src/core/libraries/np_score/np_score.h
|
src/core/libraries/np_score/np_score.h
|
||||||
src/core/libraries/np_trophy/np_trophy.cpp
|
src/core/libraries/np_trophy/np_trophy.cpp
|
||||||
src/core/libraries/np_trophy/np_trophy.h
|
src/core/libraries/np_trophy/np_trophy.h
|
||||||
|
src/core/libraries/np_trophy/trophy_ui.cpp
|
||||||
|
src/core/libraries/np_trophy/trophy_ui.h
|
||||||
|
src/core/libraries/np_trophy/np_trophy_error.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp
|
set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp
|
||||||
src/core/libraries/screenshot/screenshot.h
|
src/core/libraries/screenshot/screenshot.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(DEV_TOOLS src/core/devtools/layer.cpp
|
||||||
|
src/core/devtools/layer.h
|
||||||
|
src/core/devtools/options.cpp
|
||||||
|
src/core/devtools/options.h
|
||||||
|
src/core/devtools/gcn/gcn_context_regs.cpp
|
||||||
|
src/core/devtools/gcn/gcn_op_names.cpp
|
||||||
|
src/core/devtools/gcn/gcn_shader_regs.cpp
|
||||||
|
src/core/devtools/widget/cmd_list.cpp
|
||||||
|
src/core/devtools/widget/cmd_list.h
|
||||||
|
src/core/devtools/widget/common.h
|
||||||
|
src/core/devtools/widget/frame_dump.cpp
|
||||||
|
src/core/devtools/widget/frame_dump.h
|
||||||
|
src/core/devtools/widget/frame_graph.cpp
|
||||||
|
src/core/devtools/widget/frame_graph.h
|
||||||
|
src/core/devtools/widget/imgui_memory_editor.h
|
||||||
|
src/core/devtools/widget/memory_map.cpp
|
||||||
|
src/core/devtools/widget/memory_map.h
|
||||||
|
src/core/devtools/widget/reg_popup.cpp
|
||||||
|
src/core/devtools/widget/reg_popup.h
|
||||||
|
src/core/devtools/widget/reg_view.cpp
|
||||||
|
src/core/devtools/widget/reg_view.h
|
||||||
|
src/core/devtools/widget/shader_list.cpp
|
||||||
|
src/core/devtools/widget/shader_list.h
|
||||||
|
src/core/devtools/widget/text_editor.cpp
|
||||||
|
src/core/devtools/widget/text_editor.h
|
||||||
|
)
|
||||||
|
|
||||||
set(COMMON src/common/logging/backend.cpp
|
set(COMMON src/common/logging/backend.cpp
|
||||||
src/common/logging/backend.h
|
src/common/logging/backend.h
|
||||||
src/common/logging/filter.cpp
|
src/common/logging/filter.cpp
|
||||||
@@ -263,6 +463,7 @@ set(COMMON src/common/logging/backend.cpp
|
|||||||
src/common/logging/text_formatter.h
|
src/common/logging/text_formatter.h
|
||||||
src/common/logging/types.h
|
src/common/logging/types.h
|
||||||
src/common/alignment.h
|
src/common/alignment.h
|
||||||
|
src/common/arch.h
|
||||||
src/common/assert.cpp
|
src/common/assert.cpp
|
||||||
src/common/assert.h
|
src/common/assert.h
|
||||||
src/common/bit_field.h
|
src/common/bit_field.h
|
||||||
@@ -270,9 +471,11 @@ set(COMMON src/common/logging/backend.cpp
|
|||||||
src/common/concepts.h
|
src/common/concepts.h
|
||||||
src/common/config.cpp
|
src/common/config.cpp
|
||||||
src/common/config.h
|
src/common/config.h
|
||||||
|
src/common/cstring.h
|
||||||
src/common/debug.h
|
src/common/debug.h
|
||||||
src/common/disassembler.cpp
|
src/common/decoder.cpp
|
||||||
src/common/disassembler.h
|
src/common/decoder.h
|
||||||
|
src/common/elf_info.h
|
||||||
src/common/endian.h
|
src/common/endian.h
|
||||||
src/common/enum.h
|
src/common/enum.h
|
||||||
src/common/io_file.cpp
|
src/common/io_file.cpp
|
||||||
@@ -280,6 +483,7 @@ set(COMMON src/common/logging/backend.cpp
|
|||||||
src/common/error.cpp
|
src/common/error.cpp
|
||||||
src/common/error.h
|
src/common/error.h
|
||||||
src/common/scope_exit.h
|
src/common/scope_exit.h
|
||||||
|
src/common/fixed_value.h
|
||||||
src/common/func_traits.h
|
src/common/func_traits.h
|
||||||
src/common/native_clock.cpp
|
src/common/native_clock.cpp
|
||||||
src/common/native_clock.h
|
src/common/native_clock.h
|
||||||
@@ -289,8 +493,15 @@ set(COMMON src/common/logging/backend.cpp
|
|||||||
src/common/polyfill_thread.h
|
src/common/polyfill_thread.h
|
||||||
src/common/rdtsc.cpp
|
src/common/rdtsc.cpp
|
||||||
src/common/rdtsc.h
|
src/common/rdtsc.h
|
||||||
|
src/common/signal_context.h
|
||||||
|
src/common/signal_context.cpp
|
||||||
src/common/singleton.h
|
src/common/singleton.h
|
||||||
|
src/common/slab_heap.h
|
||||||
src/common/slot_vector.h
|
src/common/slot_vector.h
|
||||||
|
src/common/spin_lock.cpp
|
||||||
|
src/common/spin_lock.h
|
||||||
|
src/common/stb.cpp
|
||||||
|
src/common/stb.h
|
||||||
src/common/string_util.cpp
|
src/common/string_util.cpp
|
||||||
src/common/string_util.h
|
src/common/string_util.h
|
||||||
src/common/thread.cpp
|
src/common/thread.cpp
|
||||||
@@ -298,24 +509,37 @@ set(COMMON src/common/logging/backend.cpp
|
|||||||
src/common/types.h
|
src/common/types.h
|
||||||
src/common/uint128.h
|
src/common/uint128.h
|
||||||
src/common/unique_function.h
|
src/common/unique_function.h
|
||||||
|
src/common/va_ctx.h
|
||||||
src/common/version.h
|
src/common/version.h
|
||||||
src/common/ntapi.h
|
src/common/ntapi.h
|
||||||
src/common/ntapi.cpp
|
src/common/ntapi.cpp
|
||||||
|
src/common/number_utils.h
|
||||||
|
src/common/number_utils.cpp
|
||||||
|
src/common/memory_patcher.h
|
||||||
|
src/common/memory_patcher.cpp
|
||||||
src/common/scm_rev.cpp
|
src/common/scm_rev.cpp
|
||||||
src/common/scm_rev.h
|
src/common/scm_rev.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (ENABLE_DISCORD_RPC)
|
||||||
|
list(APPEND COMMON src/common/discord_rpc_handler.cpp src/common/discord_rpc_handler.h)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CORE src/core/aerolib/stubs.cpp
|
set(CORE src/core/aerolib/stubs.cpp
|
||||||
src/core/aerolib/stubs.h
|
src/core/aerolib/stubs.h
|
||||||
src/core/aerolib/aerolib.cpp
|
src/core/aerolib/aerolib.cpp
|
||||||
src/core/aerolib/aerolib.h
|
src/core/aerolib/aerolib.h
|
||||||
src/core/address_space.cpp
|
src/core/address_space.cpp
|
||||||
src/core/address_space.h
|
src/core/address_space.h
|
||||||
src/core/cpu_patches.cpp
|
|
||||||
src/core/cpu_patches.h
|
|
||||||
src/core/crypto/crypto.cpp
|
src/core/crypto/crypto.cpp
|
||||||
src/core/crypto/crypto.h
|
src/core/crypto/crypto.h
|
||||||
src/core/crypto/keys.h
|
src/core/crypto/keys.h
|
||||||
|
src/core/devices/base_device.cpp
|
||||||
|
src/core/devices/base_device.h
|
||||||
|
src/core/devices/ioccom.h
|
||||||
|
src/core/devices/logger.cpp
|
||||||
|
src/core/devices/logger.h
|
||||||
|
src/core/devices/nop_device.h
|
||||||
src/core/file_format/pfs.h
|
src/core/file_format/pfs.h
|
||||||
src/core/file_format/pkg.cpp
|
src/core/file_format/pkg.cpp
|
||||||
src/core/file_format/pkg.h
|
src/core/file_format/pkg.h
|
||||||
@@ -339,9 +563,10 @@ set(CORE src/core/aerolib/stubs.cpp
|
|||||||
src/core/loader/elf.h
|
src/core/loader/elf.h
|
||||||
src/core/loader/symbols_resolver.h
|
src/core/loader/symbols_resolver.h
|
||||||
src/core/loader/symbols_resolver.cpp
|
src/core/loader/symbols_resolver.cpp
|
||||||
src/core/libraries/error_codes.h
|
|
||||||
src/core/libraries/libs.h
|
src/core/libraries/libs.h
|
||||||
src/core/libraries/libs.cpp
|
src/core/libraries/libs.cpp
|
||||||
|
${AJM_LIB}
|
||||||
|
${AVPLAYER_LIB}
|
||||||
${AUDIO_LIB}
|
${AUDIO_LIB}
|
||||||
${GNM_LIB}
|
${GNM_LIB}
|
||||||
${KERNEL_LIB}
|
${KERNEL_LIB}
|
||||||
@@ -352,11 +577,17 @@ set(CORE src/core/aerolib/stubs.cpp
|
|||||||
${VIDEOOUT_LIB}
|
${VIDEOOUT_LIB}
|
||||||
${NP_LIBS}
|
${NP_LIBS}
|
||||||
${PNG_LIB}
|
${PNG_LIB}
|
||||||
|
${JPEG_LIB}
|
||||||
${PLAYGO_LIB}
|
${PLAYGO_LIB}
|
||||||
${RANDOM_LIB}
|
${RANDOM_LIB}
|
||||||
${USBD_LIB}
|
${USBD_LIB}
|
||||||
${MISC_LIBS}
|
${MISC_LIBS}
|
||||||
${DIALOGS_LIB}
|
${IME_LIB}
|
||||||
|
${FIBER_LIB}
|
||||||
|
${VDEC_LIB}
|
||||||
|
${DEV_TOOLS}
|
||||||
|
src/core/debug_state.cpp
|
||||||
|
src/core/debug_state.h
|
||||||
src/core/linker.cpp
|
src/core/linker.cpp
|
||||||
src/core/linker.h
|
src/core/linker.h
|
||||||
src/core/memory.cpp
|
src/core/memory.cpp
|
||||||
@@ -364,17 +595,29 @@ set(CORE src/core/aerolib/stubs.cpp
|
|||||||
src/core/module.cpp
|
src/core/module.cpp
|
||||||
src/core/module.h
|
src/core/module.h
|
||||||
src/core/platform.h
|
src/core/platform.h
|
||||||
|
src/core/signals.cpp
|
||||||
|
src/core/signals.h
|
||||||
|
src/core/thread.cpp
|
||||||
|
src/core/thread.h
|
||||||
src/core/tls.cpp
|
src/core/tls.cpp
|
||||||
src/core/tls.h
|
src/core/tls.h
|
||||||
src/core/virtual_memory.cpp
|
|
||||||
src/core/virtual_memory.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (ARCHITECTURE STREQUAL "x86_64")
|
||||||
|
set(CORE ${CORE}
|
||||||
|
src/core/cpu_patches.cpp
|
||||||
|
src/core/cpu_patches.h)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
||||||
src/shader_recompiler/profile.h
|
src/shader_recompiler/profile.h
|
||||||
src/shader_recompiler/recompiler.cpp
|
src/shader_recompiler/recompiler.cpp
|
||||||
src/shader_recompiler/recompiler.h
|
src/shader_recompiler/recompiler.h
|
||||||
|
src/shader_recompiler/info.h
|
||||||
|
src/shader_recompiler/params.h
|
||||||
src/shader_recompiler/runtime_info.h
|
src/shader_recompiler/runtime_info.h
|
||||||
|
src/shader_recompiler/specialization.h
|
||||||
|
src/shader_recompiler/backend/bindings.h
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv.cpp
|
src/shader_recompiler/backend/spirv/emit_spirv.cpp
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv.h
|
src/shader_recompiler/backend/spirv/emit_spirv.h
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp
|
src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp
|
||||||
@@ -388,6 +631,8 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
|||||||
src/shader_recompiler/backend/spirv/emit_spirv_instructions.h
|
src/shader_recompiler/backend/spirv/emit_spirv_instructions.h
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp
|
src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv_logical.cpp
|
src/shader_recompiler/backend/spirv/emit_spirv_logical.cpp
|
||||||
|
src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.cpp
|
||||||
|
src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.h
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv_select.cpp
|
src/shader_recompiler/backend/spirv/emit_spirv_select.cpp
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp
|
src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp
|
||||||
src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
|
src/shader_recompiler/backend/spirv/emit_spirv_special.cpp
|
||||||
@@ -397,8 +642,8 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
|||||||
src/shader_recompiler/backend/spirv/spirv_emit_context.h
|
src/shader_recompiler/backend/spirv/spirv_emit_context.h
|
||||||
src/shader_recompiler/frontend/translate/data_share.cpp
|
src/shader_recompiler/frontend/translate/data_share.cpp
|
||||||
src/shader_recompiler/frontend/translate/export.cpp
|
src/shader_recompiler/frontend/translate/export.cpp
|
||||||
src/shader_recompiler/frontend/translate/flat_memory.cpp
|
|
||||||
src/shader_recompiler/frontend/translate/scalar_alu.cpp
|
src/shader_recompiler/frontend/translate/scalar_alu.cpp
|
||||||
|
src/shader_recompiler/frontend/translate/scalar_flow.cpp
|
||||||
src/shader_recompiler/frontend/translate/scalar_memory.cpp
|
src/shader_recompiler/frontend/translate/scalar_memory.cpp
|
||||||
src/shader_recompiler/frontend/translate/translate.cpp
|
src/shader_recompiler/frontend/translate/translate.cpp
|
||||||
src/shader_recompiler/frontend/translate/translate.h
|
src/shader_recompiler/frontend/translate/translate.h
|
||||||
@@ -407,6 +652,8 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
|||||||
src/shader_recompiler/frontend/translate/vector_memory.cpp
|
src/shader_recompiler/frontend/translate/vector_memory.cpp
|
||||||
src/shader_recompiler/frontend/control_flow_graph.cpp
|
src/shader_recompiler/frontend/control_flow_graph.cpp
|
||||||
src/shader_recompiler/frontend/control_flow_graph.h
|
src/shader_recompiler/frontend/control_flow_graph.h
|
||||||
|
src/shader_recompiler/frontend/copy_shader.cpp
|
||||||
|
src/shader_recompiler/frontend/copy_shader.h
|
||||||
src/shader_recompiler/frontend/decode.cpp
|
src/shader_recompiler/frontend/decode.cpp
|
||||||
src/shader_recompiler/frontend/decode.h
|
src/shader_recompiler/frontend/decode.h
|
||||||
src/shader_recompiler/frontend/fetch_shader.cpp
|
src/shader_recompiler/frontend/fetch_shader.cpp
|
||||||
@@ -417,13 +664,17 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
|||||||
src/shader_recompiler/frontend/opcodes.h
|
src/shader_recompiler/frontend/opcodes.h
|
||||||
src/shader_recompiler/frontend/structured_control_flow.cpp
|
src/shader_recompiler/frontend/structured_control_flow.cpp
|
||||||
src/shader_recompiler/frontend/structured_control_flow.h
|
src/shader_recompiler/frontend/structured_control_flow.h
|
||||||
src/shader_recompiler/ir/passes/constant_propogation_pass.cpp
|
src/shader_recompiler/ir/passes/constant_propagation_pass.cpp
|
||||||
src/shader_recompiler/ir/passes/dead_code_elimination_pass.cpp
|
src/shader_recompiler/ir/passes/dead_code_elimination_pass.cpp
|
||||||
|
src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp
|
||||||
|
src/shader_recompiler/ir/passes/hull_shader_transform.cpp
|
||||||
src/shader_recompiler/ir/passes/identity_removal_pass.cpp
|
src/shader_recompiler/ir/passes/identity_removal_pass.cpp
|
||||||
src/shader_recompiler/ir/passes/ir_passes.h
|
src/shader_recompiler/ir/passes/ir_passes.h
|
||||||
src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp
|
src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp
|
||||||
src/shader_recompiler/ir/passes/resource_tracking_pass.cpp
|
src/shader_recompiler/ir/passes/resource_tracking_pass.cpp
|
||||||
|
src/shader_recompiler/ir/passes/ring_access_elimination.cpp
|
||||||
src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp
|
src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp
|
||||||
|
src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp
|
||||||
src/shader_recompiler/ir/passes/ssa_rewrite_pass.cpp
|
src/shader_recompiler/ir/passes/ssa_rewrite_pass.cpp
|
||||||
src/shader_recompiler/ir/abstract_syntax_list.h
|
src/shader_recompiler/ir/abstract_syntax_list.h
|
||||||
src/shader_recompiler/ir/attribute.cpp
|
src/shader_recompiler/ir/attribute.cpp
|
||||||
@@ -437,6 +688,8 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
|||||||
src/shader_recompiler/ir/opcodes.cpp
|
src/shader_recompiler/ir/opcodes.cpp
|
||||||
src/shader_recompiler/ir/opcodes.h
|
src/shader_recompiler/ir/opcodes.h
|
||||||
src/shader_recompiler/ir/opcodes.inc
|
src/shader_recompiler/ir/opcodes.inc
|
||||||
|
src/shader_recompiler/ir/patch.cpp
|
||||||
|
src/shader_recompiler/ir/patch.h
|
||||||
src/shader_recompiler/ir/post_order.cpp
|
src/shader_recompiler/ir/post_order.cpp
|
||||||
src/shader_recompiler/ir/post_order.h
|
src/shader_recompiler/ir/post_order.h
|
||||||
src/shader_recompiler/ir/program.cpp
|
src/shader_recompiler/ir/program.cpp
|
||||||
@@ -455,6 +708,8 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
|
|||||||
src/video_core/amdgpu/pm4_cmds.h
|
src/video_core/amdgpu/pm4_cmds.h
|
||||||
src/video_core/amdgpu/pm4_opcodes.h
|
src/video_core/amdgpu/pm4_opcodes.h
|
||||||
src/video_core/amdgpu/resource.h
|
src/video_core/amdgpu/resource.h
|
||||||
|
src/video_core/amdgpu/types.h
|
||||||
|
src/video_core/amdgpu/default_context.cpp
|
||||||
src/video_core/buffer_cache/buffer.cpp
|
src/video_core/buffer_cache/buffer.cpp
|
||||||
src/video_core/buffer_cache/buffer.h
|
src/video_core/buffer_cache/buffer.h
|
||||||
src/video_core/buffer_cache/buffer_cache.cpp
|
src/video_core/buffer_cache/buffer_cache.cpp
|
||||||
@@ -464,8 +719,6 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
|
|||||||
src/video_core/buffer_cache/word_manager.h
|
src/video_core/buffer_cache/word_manager.h
|
||||||
src/video_core/renderer_vulkan/liverpool_to_vk.cpp
|
src/video_core/renderer_vulkan/liverpool_to_vk.cpp
|
||||||
src/video_core/renderer_vulkan/liverpool_to_vk.h
|
src/video_core/renderer_vulkan/liverpool_to_vk.h
|
||||||
src/video_core/renderer_vulkan/renderer_vulkan.cpp
|
|
||||||
src/video_core/renderer_vulkan/renderer_vulkan.h
|
|
||||||
src/video_core/renderer_vulkan/vk_common.cpp
|
src/video_core/renderer_vulkan/vk_common.cpp
|
||||||
src/video_core/renderer_vulkan/vk_common.h
|
src/video_core/renderer_vulkan/vk_common.h
|
||||||
src/video_core/renderer_vulkan/vk_compute_pipeline.cpp
|
src/video_core/renderer_vulkan/vk_compute_pipeline.cpp
|
||||||
@@ -480,14 +733,20 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
|
|||||||
src/video_core/renderer_vulkan/vk_master_semaphore.h
|
src/video_core/renderer_vulkan/vk_master_semaphore.h
|
||||||
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
|
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
|
||||||
src/video_core/renderer_vulkan/vk_pipeline_cache.h
|
src/video_core/renderer_vulkan/vk_pipeline_cache.h
|
||||||
|
src/video_core/renderer_vulkan/vk_pipeline_common.cpp
|
||||||
|
src/video_core/renderer_vulkan/vk_pipeline_common.h
|
||||||
src/video_core/renderer_vulkan/vk_platform.cpp
|
src/video_core/renderer_vulkan/vk_platform.cpp
|
||||||
src/video_core/renderer_vulkan/vk_platform.h
|
src/video_core/renderer_vulkan/vk_platform.h
|
||||||
|
src/video_core/renderer_vulkan/vk_presenter.cpp
|
||||||
|
src/video_core/renderer_vulkan/vk_presenter.h
|
||||||
src/video_core/renderer_vulkan/vk_rasterizer.cpp
|
src/video_core/renderer_vulkan/vk_rasterizer.cpp
|
||||||
src/video_core/renderer_vulkan/vk_rasterizer.h
|
src/video_core/renderer_vulkan/vk_rasterizer.h
|
||||||
src/video_core/renderer_vulkan/vk_resource_pool.cpp
|
src/video_core/renderer_vulkan/vk_resource_pool.cpp
|
||||||
src/video_core/renderer_vulkan/vk_resource_pool.h
|
src/video_core/renderer_vulkan/vk_resource_pool.h
|
||||||
src/video_core/renderer_vulkan/vk_scheduler.cpp
|
src/video_core/renderer_vulkan/vk_scheduler.cpp
|
||||||
src/video_core/renderer_vulkan/vk_scheduler.h
|
src/video_core/renderer_vulkan/vk_scheduler.h
|
||||||
|
src/video_core/renderer_vulkan/vk_shader_hle.cpp
|
||||||
|
src/video_core/renderer_vulkan/vk_shader_hle.h
|
||||||
src/video_core/renderer_vulkan/vk_shader_util.cpp
|
src/video_core/renderer_vulkan/vk_shader_util.cpp
|
||||||
src/video_core/renderer_vulkan/vk_shader_util.h
|
src/video_core/renderer_vulkan/vk_shader_util.h
|
||||||
src/video_core/renderer_vulkan/vk_swapchain.cpp
|
src/video_core/renderer_vulkan/vk_swapchain.cpp
|
||||||
@@ -505,6 +764,7 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
|
|||||||
src/video_core/texture_cache/tile_manager.cpp
|
src/video_core/texture_cache/tile_manager.cpp
|
||||||
src/video_core/texture_cache/tile_manager.h
|
src/video_core/texture_cache/tile_manager.h
|
||||||
src/video_core/texture_cache/types.h
|
src/video_core/texture_cache/types.h
|
||||||
|
src/video_core/texture_cache/host_compatibility.h
|
||||||
src/video_core/page_manager.cpp
|
src/video_core/page_manager.cpp
|
||||||
src/video_core/page_manager.h
|
src/video_core/page_manager.h
|
||||||
src/video_core/multi_level_page_table.h
|
src/video_core/multi_level_page_table.h
|
||||||
@@ -512,6 +772,20 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
|
|||||||
src/video_core/renderdoc.h
|
src/video_core/renderdoc.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(IMGUI src/imgui/imgui_config.h
|
||||||
|
src/imgui/imgui_layer.h
|
||||||
|
src/imgui/imgui_std.h
|
||||||
|
src/imgui/imgui_texture.h
|
||||||
|
src/imgui/renderer/imgui_core.cpp
|
||||||
|
src/imgui/renderer/imgui_core.h
|
||||||
|
src/imgui/renderer/imgui_impl_sdl3.cpp
|
||||||
|
src/imgui/renderer/imgui_impl_sdl3.h
|
||||||
|
src/imgui/renderer/imgui_impl_vulkan.cpp
|
||||||
|
src/imgui/renderer/imgui_impl_vulkan.h
|
||||||
|
src/imgui/renderer/texture_manager.cpp
|
||||||
|
src/imgui/renderer/texture_manager.h
|
||||||
|
)
|
||||||
|
|
||||||
set(INPUT src/input/controller.cpp
|
set(INPUT src/input/controller.cpp
|
||||||
src/input/controller.h
|
src/input/controller.h
|
||||||
)
|
)
|
||||||
@@ -527,7 +801,22 @@ set(EMULATOR src/emulator.cpp
|
|||||||
if(ENABLE_QT_GUI)
|
if(ENABLE_QT_GUI)
|
||||||
qt_add_resources(RESOURCE_FILES src/shadps4.qrc)
|
qt_add_resources(RESOURCE_FILES src/shadps4.qrc)
|
||||||
|
|
||||||
set(QT_GUI src/qt_gui/main_window_ui.h
|
if (ENABLE_UPDATER)
|
||||||
|
set(UPDATER src/qt_gui/check_update.cpp
|
||||||
|
src/qt_gui/check_update.h
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(QT_GUI src/qt_gui/about_dialog.cpp
|
||||||
|
src/qt_gui/about_dialog.h
|
||||||
|
src/qt_gui/about_dialog.ui
|
||||||
|
src/qt_gui/background_music_player.cpp
|
||||||
|
src/qt_gui/background_music_player.h
|
||||||
|
src/qt_gui/cheats_patches.cpp
|
||||||
|
src/qt_gui/cheats_patches.h
|
||||||
|
src/qt_gui/compatibility_info.cpp
|
||||||
|
src/qt_gui/compatibility_info.h
|
||||||
|
src/qt_gui/main_window_ui.h
|
||||||
src/qt_gui/main_window.cpp
|
src/qt_gui/main_window.cpp
|
||||||
src/qt_gui/main_window.h
|
src/qt_gui/main_window.h
|
||||||
src/qt_gui/gui_context_menus.h
|
src/qt_gui/gui_context_menus.h
|
||||||
@@ -540,6 +829,8 @@ set(QT_GUI src/qt_gui/main_window_ui.h
|
|||||||
src/qt_gui/game_grid_frame.h
|
src/qt_gui/game_grid_frame.h
|
||||||
src/qt_gui/game_install_dialog.cpp
|
src/qt_gui/game_install_dialog.cpp
|
||||||
src/qt_gui/game_install_dialog.h
|
src/qt_gui/game_install_dialog.h
|
||||||
|
src/qt_gui/install_dir_select.cpp
|
||||||
|
src/qt_gui/install_dir_select.h
|
||||||
src/qt_gui/pkg_viewer.cpp
|
src/qt_gui/pkg_viewer.cpp
|
||||||
src/qt_gui/pkg_viewer.h
|
src/qt_gui/pkg_viewer.h
|
||||||
src/qt_gui/trophy_viewer.cpp
|
src/qt_gui/trophy_viewer.cpp
|
||||||
@@ -554,12 +845,15 @@ set(QT_GUI src/qt_gui/main_window_ui.h
|
|||||||
src/qt_gui/main.cpp
|
src/qt_gui/main.cpp
|
||||||
${EMULATOR}
|
${EMULATOR}
|
||||||
${RESOURCE_FILES}
|
${RESOURCE_FILES}
|
||||||
|
${TRANSLATIONS}
|
||||||
|
${UPDATER}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_QT_GUI)
|
if (ENABLE_QT_GUI)
|
||||||
qt_add_executable(shadps4
|
qt_add_executable(shadps4
|
||||||
${AUDIO_CORE}
|
${AUDIO_CORE}
|
||||||
|
${IMGUI}
|
||||||
${INPUT}
|
${INPUT}
|
||||||
${QT_GUI}
|
${QT_GUI}
|
||||||
${COMMON}
|
${COMMON}
|
||||||
@@ -572,6 +866,7 @@ if (ENABLE_QT_GUI)
|
|||||||
else()
|
else()
|
||||||
add_executable(shadps4
|
add_executable(shadps4
|
||||||
${AUDIO_CORE}
|
${AUDIO_CORE}
|
||||||
|
${IMGUI}
|
||||||
${INPUT}
|
${INPUT}
|
||||||
${COMMON}
|
${COMMON}
|
||||||
${CORE}
|
${CORE}
|
||||||
@@ -588,16 +883,39 @@ endif()
|
|||||||
|
|
||||||
create_target_directory_groups(shadps4)
|
create_target_directory_groups(shadps4)
|
||||||
|
|
||||||
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 tsl::robin_map xbyak::xbyak Tracy::TracyClient RenderDoc::API)
|
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 tsl::robin_map xbyak::xbyak Tracy::TracyClient RenderDoc::API FFmpeg::ffmpeg Dear_ImGui gcn half::half ZLIB::ZLIB PNG::PNG)
|
||||||
target_link_libraries(shadps4 PRIVATE Boost::headers GPUOpen::VulkanMemoryAllocator sirit Vulkan::Headers xxHash::xxhash Zydis::Zydis glslang::SPIRV glslang::glslang SDL3::SDL3)
|
target_link_libraries(shadps4 PRIVATE Boost::headers GPUOpen::VulkanMemoryAllocator LibAtrac9 sirit Vulkan::Headers xxHash::xxhash Zydis::Zydis glslang::glslang SDL3::SDL3 pugixml::pugixml stb::headers)
|
||||||
|
|
||||||
|
target_compile_definitions(shadps4 PRIVATE IMGUI_USER_CONFIG="imgui/imgui_config.h")
|
||||||
|
target_compile_definitions(Dear_ImGui PRIVATE IMGUI_USER_CONFIG="${PROJECT_SOURCE_DIR}/src/imgui/imgui_config.h")
|
||||||
|
|
||||||
|
if (ENABLE_DISCORD_RPC)
|
||||||
|
target_compile_definitions(shadps4 PRIVATE ENABLE_DISCORD_RPC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Optional due to https://github.com/shadps4-emu/shadPS4/issues/1704
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ENABLE_USERFAULTFD)
|
||||||
|
target_compile_definitions(shadps4 PRIVATE ENABLE_USERFAULTFD)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# Reserve system-managed memory space.
|
if (ENABLE_QT_GUI)
|
||||||
target_link_options(shadps4 PRIVATE -Wl,-no_pie,-no_fixup_chains,-no_huge,-pagezero_size,0x400000,-segaddr,GUEST_SYSTEM,0x400000,-image_base,0x10000000000)
|
# Include MoltenVK in the app bundle, along with an ICD file so it can be found by the system Vulkan loader if used for loading layers.
|
||||||
|
target_sources(shadps4 PRIVATE externals/MoltenVK/MoltenVK_icd.json)
|
||||||
|
set_source_files_properties(externals/MoltenVK/MoltenVK_icd.json
|
||||||
|
PROPERTIES MACOSX_PACKAGE_LOCATION Resources/vulkan/icd.d)
|
||||||
|
add_custom_command(TARGET shadps4 POST_BUILD
|
||||||
|
COMMAND cmake -E copy $<TARGET_LINKER_FILE:MoltenVK> $<TARGET_BUNDLE_DIR:shadps4>/Contents/Frameworks/libMoltenVK.dylib)
|
||||||
|
set_property(TARGET shadps4 APPEND PROPERTY BUILD_RPATH "@executable_path/../Frameworks")
|
||||||
|
else()
|
||||||
|
# For non-bundled SDL build, just do a normal library link.
|
||||||
|
target_link_libraries(shadps4 PRIVATE MoltenVK)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Link MoltenVK for Vulkan support
|
if (ARCHITECTURE STREQUAL "x86_64")
|
||||||
find_library(MOLTENVK MoltenVK REQUIRED)
|
# Reserve system-managed memory space.
|
||||||
target_link_libraries(shadps4 PRIVATE ${MOLTENVK})
|
target_link_options(shadps4 PRIVATE -Wl,-no_pie,-no_fixup_chains,-no_huge,-pagezero_size,0x4000,-segaddr,TCB_SPACE,0x4000,-segaddr,GUEST_SYSTEM,0x400000,-image_base,0x20000000000)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Replacement for std::chrono::time_zone
|
# Replacement for std::chrono::time_zone
|
||||||
target_link_libraries(shadps4 PRIVATE date::date-tz)
|
target_link_libraries(shadps4 PRIVATE date::date-tz)
|
||||||
@@ -608,33 +926,54 @@ if (NOT ENABLE_QT_GUI)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
||||||
target_link_libraries(shadps4 PRIVATE cryptoppwin zlib-ng::zlib)
|
target_link_libraries(shadps4 PRIVATE cryptoppwin)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(shadps4 PRIVATE cryptopp::cryptopp zlib-ng::zlib)
|
target_link_libraries(shadps4 PRIVATE cryptopp::cryptopp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_QT_GUI)
|
if (ENABLE_QT_GUI)
|
||||||
target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent)
|
target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network Qt6::Multimedia)
|
||||||
|
add_definitions(-DENABLE_QT_GUI)
|
||||||
|
if (ENABLE_UPDATER)
|
||||||
|
add_definitions(-DENABLE_UPDATER)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(shadps4 PRIVATE mincore winpthreads clang_rt.builtins-x86_64.lib)
|
target_link_libraries(shadps4 PRIVATE mincore winpthreads)
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
# MSVC likes putting opinions on what people can use, disable:
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# Needed for conflicts with time.h of windows.h
|
# Needed for conflicts with time.h of windows.h
|
||||||
add_definitions(-D_TIMESPEC_DEFINED)
|
add_definitions(-D_TIMESPEC_DEFINED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Target Windows 10 RS5
|
# Target Windows 10 RS5
|
||||||
add_definitions(-DNTDDI_VERSION=0x0A000006 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
add_definitions(-DNTDDI_VERSION=0x0A000006 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
||||||
# Increase stack commit area
|
|
||||||
target_link_options(shadps4 PRIVATE /STACK:0x200000,0x200000)
|
if (MSVC)
|
||||||
|
target_link_libraries(shadps4 PRIVATE clang_rt.builtins-x86_64.lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Disable ASLR so we can reserve the user area
|
# Disable ASLR so we can reserve the user area
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_options(shadps4 PRIVATE /DYNAMICBASE:NO)
|
target_link_options(shadps4 PRIVATE /DYNAMICBASE:NO)
|
||||||
else()
|
else()
|
||||||
target_link_options(shadps4 PRIVATE -Wl,--disable-dynamicbase)
|
target_link_options(shadps4 PRIVATE -Wl,--disable-dynamicbase)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Increase stack commit area (Needed, otherwise there are crashes)
|
||||||
|
if (MSVC)
|
||||||
|
target_link_options(shadps4 PRIVATE /STACK:0x200000,0x200000)
|
||||||
|
else()
|
||||||
|
target_link_options(shadps4 PRIVATE -Wl,--stack,2097152)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@@ -652,12 +991,43 @@ add_subdirectory(${HOST_SHADERS_INCLUDE})
|
|||||||
add_dependencies(shadps4 host_shaders)
|
add_dependencies(shadps4 host_shaders)
|
||||||
target_include_directories(shadps4 PRIVATE ${HOST_SHADERS_INCLUDE})
|
target_include_directories(shadps4 PRIVATE ${HOST_SHADERS_INCLUDE})
|
||||||
|
|
||||||
|
# ImGui resources
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/renderer)
|
||||||
|
add_dependencies(shadps4 ImGui_Resources)
|
||||||
|
target_include_directories(shadps4 PRIVATE ${IMGUI_RESOURCES_INCLUDE})
|
||||||
|
|
||||||
if (ENABLE_QT_GUI)
|
if (ENABLE_QT_GUI)
|
||||||
set_target_properties(shadps4 PROPERTIES
|
set_target_properties(shadps4 PROPERTIES
|
||||||
# WIN32_EXECUTABLE ON
|
# WIN32_EXECUTABLE ON
|
||||||
MACOSX_BUNDLE ON
|
MACOSX_BUNDLE ON
|
||||||
MACOSX_BUNDLE_ICON_FILE shadPS4.icns)
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/dist/MacOSBundleInfo.plist.in"
|
||||||
|
MACOSX_BUNDLE_ICON_FILE "shadPS4.icns"
|
||||||
|
MACOSX_BUNDLE_SHORT_VERSION_STRING "0.4.1"
|
||||||
|
)
|
||||||
|
|
||||||
set_source_files_properties(src/images/shadPS4.icns PROPERTIES
|
set_source_files_properties(src/images/shadPS4.icns PROPERTIES
|
||||||
MACOSX_PACKAGE_LOCATION Resources)
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (UNIX AND NOT APPLE)
|
||||||
|
if (ENABLE_QT_GUI)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
target_link_libraries(shadps4 PRIVATE ${OPENSSL_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Discord RPC
|
||||||
|
if (ENABLE_DISCORD_RPC)
|
||||||
|
target_link_libraries(shadps4 PRIVATE discord-rpc)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Install rules
|
||||||
|
install(TARGETS shadps4 BUNDLE DESTINATION .)
|
||||||
|
|
||||||
|
if (ENABLE_QT_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
install(FILES "dist/net.shadps4.shadPS4.desktop" DESTINATION "share/applications")
|
||||||
|
install(FILES "dist/net.shadps4.shadPS4.releases.xml" DESTINATION "share/metainfo/releases")
|
||||||
|
install(FILES "dist/net.shadps4.shadPS4.metainfo.xml" DESTINATION "share/metainfo")
|
||||||
|
install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps" RENAME "net.shadps4.shadPS4.png")
|
||||||
|
install(FILES "src/images/net.shadps4.shadPS4.svg" DESTINATION "share/icons/hicolor/scalable/apps")
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
"cmakeCommandArgs": "",
|
"cmakeCommandArgs": "",
|
||||||
"buildCommandArgs": "",
|
"buildCommandArgs": "",
|
||||||
"ctestCommandArgs": "",
|
"ctestCommandArgs": "",
|
||||||
"inheritEnvironments": [ "clang_cl_x64_x64" ]
|
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||||
|
"intelliSenseMode": "windows-clang-x64"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x64-Clang-Debug",
|
"name": "x64-Clang-Debug",
|
||||||
@@ -20,7 +21,8 @@
|
|||||||
"cmakeCommandArgs": "",
|
"cmakeCommandArgs": "",
|
||||||
"buildCommandArgs": "",
|
"buildCommandArgs": "",
|
||||||
"ctestCommandArgs": "",
|
"ctestCommandArgs": "",
|
||||||
"inheritEnvironments": [ "clang_cl_x64_x64" ]
|
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||||
|
"intelliSenseMode": "windows-clang-x64"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x64-Clang-RelWithDebInfo",
|
"name": "x64-Clang-RelWithDebInfo",
|
||||||
@@ -31,7 +33,8 @@
|
|||||||
"cmakeCommandArgs": "",
|
"cmakeCommandArgs": "",
|
||||||
"buildCommandArgs": "",
|
"buildCommandArgs": "",
|
||||||
"ctestCommandArgs": "",
|
"ctestCommandArgs": "",
|
||||||
"inheritEnvironments": [ "clang_cl_x64_x64" ]
|
"inheritEnvironments": [ "clang_cl_x64_x64" ],
|
||||||
|
"intelliSenseMode": "windows-clang-x64"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ enum class SomeEnum {
|
|||||||
* Note that the asterisks are indented by one space to align to the first line.
|
* Note that the asterisks are indented by one space to align to the first line.
|
||||||
*/
|
*/
|
||||||
struct Position {
|
struct Position {
|
||||||
// Always intitialize member variables!
|
// Always initialize member variables!
|
||||||
int x{};
|
int x{};
|
||||||
int y{};
|
int y{};
|
||||||
};
|
};
|
||||||
|
|||||||
43
LICENSES/OFL-1.1.txt
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
SIL OPEN FONT LICENSE
|
||||||
|
|
||||||
|
Version 1.1 - 26 February 2007
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
|
||||||
|
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
|
||||||
|
This license becomes null and void if any of the above conditions are not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
142
README.md
@@ -12,7 +12,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<h1 align="center">
|
<h1 align="center">
|
||||||
<a href="https://discord.gg/MyZRaBngxA">
|
<a href="https://discord.gg/bFJxfftGW6">
|
||||||
<img src="https://img.shields.io/discord/1080089157554155590?color=5865F2&label=shadPS4 Discord&logo=Discord&logoColor=white" width="240">
|
<img src="https://img.shields.io/discord/1080089157554155590?color=5865F2&label=shadPS4 Discord&logo=Discord&logoColor=white" width="240">
|
||||||
<a href="https://github.com/shadps4-emu/shadPS4/releases/latest">
|
<a href="https://github.com/shadps4-emu/shadPS4/releases/latest">
|
||||||
<img src="https://img.shields.io/github/downloads/shadps4-emu/shadPS4/total.svg" width="140">
|
<img src="https://img.shields.io/github/downloads/shadps4-emu/shadPS4/total.svg" width="140">
|
||||||
@@ -26,33 +26,34 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://shadps4.net/">
|
<a href="https://shadps4.net/">
|
||||||
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/Sonic Mania.png" width="400">
|
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/1.png" width="400">
|
||||||
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/Bloodborne.png" width="400">
|
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/2.png" width="400">
|
||||||
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/Undertale.png" width="400">
|
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/3.png" width="400">
|
||||||
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/We are DOOMED.png" width="400">
|
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Screenshots/4.png" width="400">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# shadPS4
|
# General information
|
||||||
|
|
||||||
shadPS4 is an early **PlayStation 4** emulator for **Windows**, **Linux** and **macOS** written in C++
|
**shadPS4** is an early **PlayStation 4** emulator for **Windows**, **Linux** and **macOS** written in C++.
|
||||||
|
|
||||||
If you encounter problems or have doubts, do not hesitate to look at the [**Quickstart**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Quickstart/Quickstart.md).
|
If you encounter problems or have doubts, do not hesitate to look at the [**Quickstart**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Quickstart/Quickstart.md).\
|
||||||
|
To verify that a game works, you can look at [**shadPS4 Game Compatibility**](https://github.com/shadps4-emu/shadps4-game-compatibility).\
|
||||||
To verify that a game works, you can look at [**shadPS4 Game Compatibility**](https://github.com/shadps4-emu/shadps4-game-compatibility).
|
To discuss shadPS4 development, suggest ideas or to ask for help, join our [**Discord server**](https://discord.gg/bFJxfftGW6).\
|
||||||
|
To get the latest news, go to our [**X (Twitter)**](https://x.com/shadps4) or our [**website**](https://shadps4.net/).\
|
||||||
To discuss shadPS4 development or suggest ideas, join the [**Discord server**](https://discord.gg/MyZRaBngxA).
|
For those who'd like to donate to the project, we now have a [**Kofi page**](https://ko-fi.com/shadps4)!
|
||||||
|
|
||||||
To get the latest news, go to our [**X (twitter)**](https://x.com/shadps4) or our [**website**](https://shadps4.net/).
|
|
||||||
|
|
||||||
# Status
|
# Status
|
||||||
|
|
||||||
In development, small games are working like [**Sonic Mania**](https://www.youtube.com/watch?v=AAHoNzhHyCU), [**Undertale**](https://youtu.be/5zIvdy65Ro4), [**Dysmantle**](https://youtu.be/b9xzhLBdESE) and others...
|
> [!IMPORTANT]
|
||||||
|
> shadPS4 is early in development, don't expect a flawless experience.
|
||||||
|
|
||||||
|
Currently, the emulator can successfully run games like [**Bloodborne**](https://www.youtube.com/watch?v=wC6s0avpQRE), [**Dark Souls Remastered**](https://www.youtube.com/watch?v=-3PA-Xwszts), [**Red Dead Redemption**](https://www.youtube.com/watch?v=Al7yz_5nLag) and many other games.
|
||||||
|
|
||||||
# Why
|
# Why
|
||||||
|
|
||||||
The project started as a fun project. Due to limited free time, it will probably take a while before shadPS4 is able to run anything decent, but we're trying to make small, regular commits.
|
This project began as a fun project. Given our limited free time, it may take some time before shadPS4 can run more complex games, but we're committed to making small, regular updates.
|
||||||
|
|
||||||
# Build
|
# Building
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
@@ -62,63 +63,55 @@ Check the build instructions for [**Windows**](https://github.com/shadps4-emu/sh
|
|||||||
|
|
||||||
Check the build instructions for [**Linux**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md).
|
Check the build instructions for [**Linux**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md).
|
||||||
|
|
||||||
## Build status
|
## macOS
|
||||||
|
|
||||||
<details>
|
Check the build instructions for [**macOS**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-macos.md).
|
||||||
<summary><b>Windows</b></summary>
|
|
||||||
|
|
||||||
| Windows | Build status |
|
> [!IMPORTANT]
|
||||||
|--------|--------|
|
> macOS users need at least macOS 15 on Apple Silicon-based Mac devices and at least macOS 14 on Intel-based Mac devices.
|
||||||
|Windows SDL Build|[](https://github.com/shadps4-emu/shadPS4/actions/workflows/windows.yml)
|
|
||||||
|Windows Qt Build|[](https://github.com/shadps4-emu/shadPS4/actions/workflows/windows-qt.yml)
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
# Debugging and reporting issues
|
||||||
<summary><b>Linux</b></summary>
|
|
||||||
|
|
||||||
| Linux | Build status |
|
For more information on how to test, debug and report issues with the emulator or games, read the [**Debugging documentation**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md).
|
||||||
|--------|--------|
|
|
||||||
|Linux SDL Build|[](https://github.com/shadps4-emu/shadPS4/actions/workflows/linux.yml)
|
|
||||||
|Linux Qt Build|[](https://github.com/shadps4-emu/shadPS4/actions/workflows/linux-qt.yml)
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
# Keyboard mapping
|
||||||
<summary><b>macOS</b></summary>
|
|
||||||
|
|
||||||
| macOS | Build status |
|
| Button | Function |
|
||||||
|--------|--------|
|
|
||||||
|macOS SDL Build|[](https://github.com/shadps4-emu/shadPS4/actions/workflows/macos.yml)
|
|
||||||
|macOS Qt Build|[](https://github.com/shadps4-emu/shadPS4/actions/workflows/macos-qt.yml)
|
|
||||||
</details>
|
|
||||||
|
|
||||||
# Keyboard Mapping
|
|
||||||
|
|
||||||
| Controller button | Keyboard |
|
|
||||||
|-------------|-------------|
|
|-------------|-------------|
|
||||||
LEFT AXIS UP | W |
|
F10 | FPS Counter
|
||||||
LEFT AXIS DOWN | S |
|
Ctrl+F10 | Video Debug Info
|
||||||
LEFT AXIS LEFT | A |
|
F11 | Fullscreen
|
||||||
LEFT AXIS RIGHT | D |
|
F12 | Trigger RenderDoc Capture
|
||||||
RIGHT AXIS UP | I |
|
|
||||||
RIGHT AXIS DOWN | K |
|
> [!NOTE]
|
||||||
RIGHT AXIS LEFT | J |
|
> Xbox and DualShock controllers work out of the box.
|
||||||
RIGHT AXIS RIGHT | L |
|
|
||||||
TRIANGLE | Numpad 8 |
|
| Controller button | Keyboard equivelant | Mac alternative |
|
||||||
CIRCLE | Numpad 6 |
|
|-------------|-------------|--------------|
|
||||||
CROSS | Numpad 2 |
|
LEFT AXIS UP | W | |
|
||||||
SQUARE | Numpad 4 |
|
LEFT AXIS DOWN | S | |
|
||||||
PAD UP | UP |
|
LEFT AXIS LEFT | A | |
|
||||||
PAD DOWN | DOWN |
|
LEFT AXIS RIGHT | D | |
|
||||||
PAD LEFT | LEFT |
|
RIGHT AXIS UP | I | |
|
||||||
PAD RIGHT | RIGHT |
|
RIGHT AXIS DOWN | K | |
|
||||||
OPTIONS | RETURN |
|
RIGHT AXIS LEFT | J | |
|
||||||
TOUCH PAD | SPACE |
|
RIGHT AXIS RIGHT | L | |
|
||||||
L1 | Q |
|
TRIANGLE | Numpad 8 | C |
|
||||||
R1 | U |
|
CIRCLE | Numpad 6 | B |
|
||||||
L2 | E |
|
CROSS | Numpad 2 | N |
|
||||||
R2 | O |
|
SQUARE | Numpad 4 | V |
|
||||||
L3 | X |
|
PAD UP | UP | |
|
||||||
R3 | M |
|
PAD DOWN | DOWN | |
|
||||||
|
PAD LEFT | LEFT | |
|
||||||
|
PAD RIGHT | RIGHT | |
|
||||||
|
OPTIONS | RETURN | |
|
||||||
|
BACK BUTTON / TOUCH PAD | SPACE | |
|
||||||
|
L1 | Q | |
|
||||||
|
R1 | U | |
|
||||||
|
L2 | E | |
|
||||||
|
R2 | O | |
|
||||||
|
L3 | X | |
|
||||||
|
R3 | M | |
|
||||||
|
|
||||||
# Main team
|
# Main team
|
||||||
|
|
||||||
@@ -133,8 +126,7 @@ Logo is done by [**Xphalnos**](https://github.com/Xphalnos)
|
|||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
If you want to contribute, please look the [**CONTRIBUTING.md**](https://github.com/shadps4-emu/shadPS4/blob/main/CONTRIBUTING.md) file.
|
If you want to contribute, please look the [**CONTRIBUTING.md**](https://github.com/shadps4-emu/shadPS4/blob/main/CONTRIBUTING.md) file.\
|
||||||
|
|
||||||
Open a PR and we'll check it :)
|
Open a PR and we'll check it :)
|
||||||
|
|
||||||
# Contributors
|
# Contributors
|
||||||
@@ -143,9 +135,17 @@ Open a PR and we'll check it :)
|
|||||||
<img src="https://contrib.rocks/image?repo=shadps4-emu/shadPS4&max=15">
|
<img src="https://contrib.rocks/image?repo=shadps4-emu/shadPS4&max=15">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
# Sister Projects
|
|
||||||
|
|
||||||
- [**Panda3DS**](https://github.com/wheremyfoodat/Panda3DS): A multiplatform 3DS emulator from our co-author wheremyfoodat.
|
# Special Thanks
|
||||||
|
|
||||||
|
A few noteworthy teams/projects who've helped us along the way are:
|
||||||
|
|
||||||
|
- [**Panda3DS**](https://github.com/wheremyfoodat/Panda3DS): A multiplatform 3DS emulator from our co-author wheremyfoodat. They have been incredibly helpful in understanding and solving problems that came up from natively executing the x64 code of PS4 binaries
|
||||||
|
|
||||||
|
- [**fpPS4**](https://github.com/red-prig/fpPS4): The fpPS4 team has assisted massively with understanding some of the more complex parts of the PS4 operating system and libraries, by helping with reverse engineering work and research.
|
||||||
|
|
||||||
|
- **yuzu**: Our shader compiler has been designed with yuzu's Hades compiler as a blueprint. This allowed us to focus on the challenges of emulating a modern AMD GPU while having a high-quality optimizing shader compiler implementation as a base.
|
||||||
|
|
||||||
- [**hydra**](https://github.com/hydra-emu/hydra): A multisystem, multiplatform emulator (chip-8, GB, NES, N64) from Paris.
|
- [**hydra**](https://github.com/hydra-emu/hydra): A multisystem, multiplatform emulator (chip-8, GB, NES, N64) from Paris.
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|||||||
99
REUSE.toml
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
version = 1
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = [
|
||||||
|
"REUSE.toml",
|
||||||
|
"CMakeSettings.json",
|
||||||
|
".github/FUNDING.yml",
|
||||||
|
".github/shadps4.png",
|
||||||
|
".gitmodules",
|
||||||
|
"dist/MacOSBundleInfo.plist.in",
|
||||||
|
"dist/net.shadps4.shadPS4.desktop",
|
||||||
|
"dist/net.shadps4.shadPS4_metadata.pot",
|
||||||
|
"dist/net.shadps4.shadPS4.metainfo.xml",
|
||||||
|
"dist/net.shadps4.shadPS4.releases.xml",
|
||||||
|
"documents/changelog.md",
|
||||||
|
"documents/Quickstart/2.png",
|
||||||
|
"documents/Screenshots/*",
|
||||||
|
"externals/MoltenVK/MoltenVK_icd.json",
|
||||||
|
"scripts/ps4_names.txt",
|
||||||
|
"src/images/about_icon.png",
|
||||||
|
"src/images/controller_icon.png",
|
||||||
|
"src/images/discord.png",
|
||||||
|
"src/images/dump_icon.png",
|
||||||
|
"src/images/exit_icon.png",
|
||||||
|
"src/images/file_icon.png",
|
||||||
|
"src/images/flag_china.png",
|
||||||
|
"src/images/flag_eu.png",
|
||||||
|
"src/images/flag_jp.png",
|
||||||
|
"src/images/flag_unk.png",
|
||||||
|
"src/images/flag_us.png",
|
||||||
|
"src/images/flag_world.png",
|
||||||
|
"src/images/folder_icon.png",
|
||||||
|
"src/images/github.png",
|
||||||
|
"src/images/grid_icon.png",
|
||||||
|
"src/images/iconsize_icon.png",
|
||||||
|
"src/images/ko-fi.png",
|
||||||
|
"src/images/list_icon.png",
|
||||||
|
"src/images/list_mode_icon.png",
|
||||||
|
"src/images/pause_icon.png",
|
||||||
|
"src/images/play_icon.png",
|
||||||
|
"src/images/refresh_icon.png",
|
||||||
|
"src/images/settings_icon.png",
|
||||||
|
"src/images/stop_icon.png",
|
||||||
|
"src/images/utils_icon.png",
|
||||||
|
"src/images/shadPS4.icns",
|
||||||
|
"src/images/shadps4.ico",
|
||||||
|
"src/images/net.shadps4.shadPS4.svg",
|
||||||
|
"src/images/themes_icon.png",
|
||||||
|
"src/images/update_icon.png",
|
||||||
|
"src/images/youtube.png",
|
||||||
|
"src/images/website.png",
|
||||||
|
"src/shadps4.qrc",
|
||||||
|
"src/shadps4.rc",
|
||||||
|
]
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "shadPS4 Emulator Project"
|
||||||
|
SPDX-License-Identifier = "GPL-2.0-or-later"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "externals/cmake-modules/**"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2009-2010 Iowa State University"
|
||||||
|
SPDX-License-Identifier = "BSL-1.0"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "externals/renderdoc/**"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2019-2024 Baldur Karlsson"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "externals/stb/**"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2017 Sean Barrett"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "externals/tracy/**"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2017-2024 Bartosz Taudul <wolf@nereid.pl>"
|
||||||
|
SPDX-License-Identifier = "BSD-3-Clause"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "src/imgui/renderer/fonts/NotoSansJP-Regular.ttf"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "2012 Google Inc. All Rights Reserved."
|
||||||
|
SPDX-License-Identifier = "OFL-1.1"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "src/imgui/renderer/fonts/ProggyVector-Regular.ttf"
|
||||||
|
precedence = "aggregate"
|
||||||
|
SPDX-FileCopyrightText = "Copyright (c) 2004, 2005 Tristan Grimmer"
|
||||||
|
SPDX-License-Identifier = "MIT"
|
||||||
|
|
||||||
|
[[annotations]]
|
||||||
|
path = "externals/gcn/include/**"
|
||||||
|
SPDX-FileCopyrightText = "NONE"
|
||||||
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
||||||
23
cmake/FindFFmpeg.cmake
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_check_modules(FFMPEG QUIET IMPORTED_TARGET libavcodec libavfilter libavformat libavutil libswresample libswscale)
|
||||||
|
|
||||||
|
find_file(FFMPEG_VERSION_FILE libavutil/ffversion.h HINTS "${FFMPEG_libavutil_INCLUDEDIR}")
|
||||||
|
if (FFMPEG_VERSION_FILE)
|
||||||
|
file(STRINGS "${FFMPEG_VERSION_FILE}" FFMPEG_VERSION_LINE REGEX "FFMPEG_VERSION")
|
||||||
|
string(REGEX MATCH "[0-9.]+" FFMPEG_VERSION "${FFMPEG_VERSION_LINE}")
|
||||||
|
unset(FFMPEG_VERSION_LINE)
|
||||||
|
unset(FFMPEG_VERSION_FILE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(FFmpeg
|
||||||
|
REQUIRED_VARS FFMPEG_LINK_LIBRARIES
|
||||||
|
VERSION_VAR FFMPEG_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (FFmpeg_FOUND AND NOT TARGET FFmpeg::ffmpeg)
|
||||||
|
add_library(FFmpeg::ffmpeg ALIAS PkgConfig::FFMPEG)
|
||||||
|
endif()
|
||||||
25
cmake/FindRenderDoc.cmake
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
find_path(RENDERDOC_INCLUDE_DIR renderdoc_app.h)
|
||||||
|
|
||||||
|
if (RENDERDOC_INCLUDE_DIR AND EXISTS "${RENDERDOC_INCLUDE_DIR}/renderdoc_app.h")
|
||||||
|
file(STRINGS "${RENDERDOC_INCLUDE_DIR}/renderdoc_app.h" RENDERDOC_VERSION_LINE REGEX "typedef struct RENDERDOC_API")
|
||||||
|
string(REGEX REPLACE ".*typedef struct RENDERDOC_API_([0-9]+)_([0-9]+)_([0-9]+).*" "\\1.\\2.\\3" RENDERDOC_VERSION "${RENDERDOC_VERSION_LINE}")
|
||||||
|
unset(RENDERDOC_VERSION_LINE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(RenderDoc
|
||||||
|
REQUIRED_VARS RENDERDOC_INCLUDE_DIR
|
||||||
|
VERSION_VAR RENDERDOC_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (RenderDoc_FOUND AND NOT TARGET RenderDoc::API)
|
||||||
|
add_library(RenderDoc::API INTERFACE IMPORTED)
|
||||||
|
set_target_properties(RenderDoc::API PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${RENDERDOC_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(RENDERDOC_INCLUDE_DIR)
|
||||||
28
cmake/Findhalf.cmake
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
find_path(half_INCLUDE_DIR NAMES half.hpp PATH_SUFFIXES half)
|
||||||
|
|
||||||
|
if (half_INCLUDE_DIR)
|
||||||
|
file(STRINGS "${half_INCLUDE_DIR}/half.hpp" _ver_line
|
||||||
|
REGEX "^// Version [0-9.]+$"
|
||||||
|
LIMIT_COUNT 1
|
||||||
|
)
|
||||||
|
string(REGEX MATCH "[0-9.]+" half_VERSION "${_ver_line}")
|
||||||
|
unset(_ver_line)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(half
|
||||||
|
REQUIRED_VARS half_INCLUDE_DIR
|
||||||
|
VERSION_VAR half_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if (half_FOUND AND NOT TARGET half::half)
|
||||||
|
add_library(half::half INTERFACE IMPORTED)
|
||||||
|
set_target_properties(half::half PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${half_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(half_INCLUDE_DIR)
|
||||||
19
cmake/Findstb.cmake
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
find_path(stb_image_INCLUDE_DIR stb_image.h PATH_SUFFIXES stb)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(stb
|
||||||
|
REQUIRED_VARS stb_image_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if (stb_FOUND AND NOT TARGET stb::headers)
|
||||||
|
add_library(stb::headers INTERFACE IMPORTED)
|
||||||
|
set_property(TARGET stb::headers PROPERTY
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES
|
||||||
|
"${stb_image_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(stb_image_INCLUDE_DIR)
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
find_package(PkgConfig QUIET)
|
|
||||||
pkg_search_module(ZLIB_NG QUIET IMPORTED_TARGET zlib-ng)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(zlib-ng
|
|
||||||
REQUIRED_VARS ZLIB_NG_LINK_LIBRARIES
|
|
||||||
VERSION_VAR ZLIB_NG_VERSION
|
|
||||||
)
|
|
||||||
|
|
||||||
if (zlib-ng_FOUND AND NOT TARGET zlib-ng::zlib)
|
|
||||||
add_library(zlib-ng::zlib ALIAS PkgConfig::ZLIB_NG)
|
|
||||||
endif()
|
|
||||||
46
dist/MacOSBundleInfo.plist.in
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>shadps4</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.shadps4-emu.shadps4</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>shadps4</string>
|
||||||
|
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0.0</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||||
|
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.games</string>
|
||||||
|
<key>GCSupportsGameMode</key>
|
||||||
|
<true/>
|
||||||
|
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string></string>
|
||||||
|
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||||
|
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleAllowMixedLocalizations</key>
|
||||||
|
<true/>
|
||||||
|
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
|
||||||
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Shadps4
|
Name=shadPS4
|
||||||
Exec=shadps4
|
Exec=shadps4
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Icon=shadps4
|
Icon=net.shadps4.shadPS4
|
||||||
Comment=shadps4 emulator
|
Comment=PlayStation 4 emulator
|
||||||
Categories=Game;
|
Categories=Game;
|
||||||
StartupWMClass=shadps4;
|
StartupWMClass=shadps4;
|
||||||
63
dist/net.shadps4.shadPS4.metainfo.xml
vendored
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop-application">
|
||||||
|
<id translate="no">net.shadps4.shadPS4</id>
|
||||||
|
<name translate="no">shadPS4</name>
|
||||||
|
<developer id="net.shadps4.shadPS4">
|
||||||
|
<name>shadPS4 Contributors</name>
|
||||||
|
<url translate="no">https://github.com/shadps4-emu/shadps4/graphs/contributors</url>
|
||||||
|
</developer>
|
||||||
|
<summary>PS4 Emulator</summary>
|
||||||
|
<metadata_license translate="no">CC0-1.0</metadata_license>
|
||||||
|
<project_license translate="no">GPL-2.0</project_license>
|
||||||
|
<launchable type="desktop-id" translate="no">net.shadps4.shadPS4.desktop</launchable>
|
||||||
|
<url type="homepage" translate="no">https://shadps4.net/</url>
|
||||||
|
<description>
|
||||||
|
<p>shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++.</p>
|
||||||
|
<p>The emulator is still early in development, so don't expect a flawless experience. Nonetheless, the emulator can already run a number of commercial games.</p>
|
||||||
|
</description>
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">
|
||||||
|
<image type="source" translate="no" >https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/1.png</image>
|
||||||
|
<caption>Bloodborne</caption>
|
||||||
|
</screenshot>
|
||||||
|
<screenshot>
|
||||||
|
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/2.png</image>
|
||||||
|
<caption>Hatsune Miku: Project DIVA Future Tone</caption>
|
||||||
|
</screenshot>
|
||||||
|
<screenshot>
|
||||||
|
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/3.png</image>
|
||||||
|
<caption>Yakuza Kiwami</caption>
|
||||||
|
</screenshot>
|
||||||
|
<screenshot>
|
||||||
|
<image type="source" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/4.png</image>
|
||||||
|
<caption>Persona 4 Golden</caption>
|
||||||
|
</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
<categories>
|
||||||
|
<category translate="no">Game</category>
|
||||||
|
</categories>
|
||||||
|
<releases type="external" url="https://cdn.jsdelivr.net/gh/fpiesche/flatpak-builds/apps/net.shadps4.shadPS4/net.shadps4.shadPS4.releases.xml">
|
||||||
|
<release version="v.0.4.0" date="2024-11-03">
|
||||||
|
<description></description>
|
||||||
|
</release>
|
||||||
|
</releases>
|
||||||
|
<content_rating type="oars-1.1"/>
|
||||||
|
<supports>
|
||||||
|
<control translate="no">keyboard</control>
|
||||||
|
</supports>
|
||||||
|
<recommends>
|
||||||
|
<control translate="no">gamepad</control>
|
||||||
|
</recommends>
|
||||||
|
<requires>
|
||||||
|
<internet translate="no">offline-only</internet>
|
||||||
|
</requires>
|
||||||
|
<provides>
|
||||||
|
<binary translate="no">shadps4</binary>
|
||||||
|
</provides>
|
||||||
|
<keywords>
|
||||||
|
<keyword>emulator</keyword>
|
||||||
|
<keyword>emulation</keyword>
|
||||||
|
<keyword translate="no">playstation</keyword>
|
||||||
|
<keyword translate="no">ps4</keyword>
|
||||||
|
</keywords>
|
||||||
|
</component>
|
||||||
23
dist/net.shadps4.shadPS4.releases.xml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<releases>
|
||||||
|
<release version="0.4.0" date="2024-10-31">
|
||||||
|
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.4.0</url>
|
||||||
|
</release>
|
||||||
|
<release version="0.3.0" date="2024-09-23">
|
||||||
|
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.3.0</url>
|
||||||
|
</release>
|
||||||
|
<release version="0.2.0" date="2024-08-15">
|
||||||
|
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.2.0</url>
|
||||||
|
</release>
|
||||||
|
<release version="0.1.0" date="2024-07-01">
|
||||||
|
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/0.1.0</url>
|
||||||
|
</release>
|
||||||
|
<release version="0.0.3" date="2024-03-23">
|
||||||
|
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.3</url>
|
||||||
|
</release>
|
||||||
|
<release version="0.0.2" date="2023-10-21">
|
||||||
|
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.2</url>
|
||||||
|
</release>
|
||||||
|
<release version="0.0.1" date="2024-09-29">
|
||||||
|
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.1</url>
|
||||||
|
</release>
|
||||||
|
</releases>
|
||||||
65
dist/net.shadps4.shadPS4_metadata.pot
vendored
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2024-11-08 09:07+0000\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#. (itstool) path: component/name
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:4
|
||||||
|
msgid "shadPS4"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: developer/name
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:6
|
||||||
|
msgid "shadPS4 Contributors"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: component/summary
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:9
|
||||||
|
msgid "PS4 Emulator"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:16
|
||||||
|
msgid "shadPS4 is an early PlayStation 4 emulator for Windows, Linux and macOS written in C++."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: description/p
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:17
|
||||||
|
msgid "The emulator is still early in development, so don't expect a flawless experience. Nonetheless, the emulator can already run a number of commercial games."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:22
|
||||||
|
msgid "Bloodborne"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:26
|
||||||
|
msgid "Hatsune Miku: Project DIVA Future Tone"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:30
|
||||||
|
msgid "Yakuza Kiwami"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: screenshot/caption
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:34
|
||||||
|
msgid "Persona 4 Golden"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: keywords/keyword
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:59
|
||||||
|
msgid "emulator"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. (itstool) path: keywords/keyword
|
||||||
|
#: ./net.shadps4.shadPS4.metainfo.xml:60
|
||||||
|
msgid "emulation"
|
||||||
|
msgstr ""
|
||||||
156
documents/Debugging/Debugging.md
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||||
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Debugging and reporting issues about shadPS4 and games
|
||||||
|
|
||||||
|
This document covers information about debugging, troubleshooting and reporting developer-side issues related to shadPS4 and games.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
This section will guide you through setting up tools for debugging the emulator. This list will likely expand as more tools and platforms receive consistent setups.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Windows and Visual Studio</summary>
|
||||||
|
|
||||||
|
Make sure you have the project set up for building on Windows with Visual Studio and CMake: [Build shadPS4 for Windows
|
||||||
|
](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-windows.md)
|
||||||
|
|
||||||
|
1. Open the project folder in Visual Studio **as a folder**. _Do not run `cmake ..` or other commands that set up the project._
|
||||||
|
|
||||||
|
2. In the Solution Explorer, click the **Switch between solutions and available views** button.\
|
||||||
|

|
||||||
|
|
||||||
|
3. Double-click on **CMake Targets View**.\
|
||||||
|

|
||||||
|
|
||||||
|
4. Under **shadPS4 Project**, right-click on the **shadps4 (executable)** solution and click **Set as Startup Item**. This will let you start and debug shadPS4 using the VS debug buttons, as well as the default F5 shortcut.\
|
||||||
|

|
||||||
|
|
||||||
|
5. Right-click the **shadps4 (executable)** solution once more and click **Add debug configuration**.
|
||||||
|
|
||||||
|
6. Add an `"args: []"` section into the first `configurations` entry.\
|
||||||
|
List your game path as an argument, as if you were launching the non-GUI emulator from the command line.
|
||||||
|

|
||||||
|
|
||||||
|
7. Set the appropriate CMake configuration for debugging or testing.
|
||||||
|
- For debugging the emulator and games within it, select `x64-Clang-Debug`.
|
||||||
|
- For testing the emulator with compiler optimizations as a release build, it is recommended to select `x64-Clang-RelWithDebInfo`,
|
||||||
|
as debug symbols will still be generated in case you encounter release configuration-exclusive bugs/errors.
|
||||||
|

|
||||||
|
|
||||||
|
Launch and debug the emulator through **Debug > Start Debugging** (F5 by default), or **Debug > Start Without Debugging** (Ctrl+F5 by default) when testing games for performance.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
You can configure the emulator by editing the `config.toml` file found in the `user` folder created after starting the application.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Some configuration entries worth changing</summary>
|
||||||
|
|
||||||
|
- `[General]`
|
||||||
|
|
||||||
|
- `logType`: Configures logging synchronization (`sync`/`async`)
|
||||||
|
- By default, the emulator logs messages asynchronously for better performance. Some log messages may end up being received out-of-order.
|
||||||
|
- It can be beneficial to set this to `sync` in order for the log to accurately maintain message order, at the cost of performance.
|
||||||
|
- When communicating about issues with games and the log messages aren't clear due to potentially confusing order, set this to `sync` and send that log as well.
|
||||||
|
- `logFilter`: Sets the logging category for various logging classes.
|
||||||
|
- Format: `<class>:<level> ...`
|
||||||
|
- Multiple classes can be set by separating them with a space. (example: `Render:Warning Debug:Critical Lib.Pad:Error`)
|
||||||
|
- Sub-classes can be specified in the same format as seen in the console/log (such as `Core.Linker`).
|
||||||
|
- All classes and sub-classes can be set by specifying a `*` symbol. (example: `Kernel.*:Critical`)
|
||||||
|
- Valid log levels: `Trace, Debug, Info, Warning, Error, Critical` - in this order, setting a level silences all levels preceding it and logs every level after it.
|
||||||
|
- Examples:
|
||||||
|
- If the log is being spammed with messages coming from Lib.Pad, you can use `Lib.Pad:Critical` to only log critical-level messages.
|
||||||
|
- If you'd like to mute everything, but still want to receive messages from Vulkan rendering: `*:Critical Render.Vulkan:Info`
|
||||||
|
|
||||||
|
- `Fullscreen`: Display the game in a full screen borderless window.
|
||||||
|
|
||||||
|
- `[GPU]`
|
||||||
|
- `dumpShaders`: Dump shaders that are loaded by the emulator. Dump path: `../user/shader/dumps`
|
||||||
|
- `nullGpu`: Disables rendering.
|
||||||
|
- `screenWidth` and `screenHeight`: Configures the game window width and height.
|
||||||
|
|
||||||
|
- `[Vulkan]`
|
||||||
|
- `validation`-related settings: Use when debugging Vulkan.
|
||||||
|
- `rdocEnable`: Automatically hook RenderDoc when installed. Useful for debugging shaders and game rendering.
|
||||||
|
- `rdocMarkersEnable`: Enable automatic RenderDoc event annotation
|
||||||
|
|
||||||
|
- `[LLE]`
|
||||||
|
- `libc`: Use LLE with `libc`.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Quick analysis
|
||||||
|
|
||||||
|
This section will provide some preliminary steps to take and tips on what to do when you encounter scenarios that require debugging.
|
||||||
|
|
||||||
|
<details open>
|
||||||
|
<summary>When a game crashes and breaks in the debugger</summary>
|
||||||
|
|
||||||
|
1. Analyze the log
|
||||||
|
- A console will open by default when you launch the emulator. It shows the same log messages that go into the log file found at `<emulator executable>/user/log/shad_log.txt`.
|
||||||
|
|
||||||
|
- It is recommended that you start analyzing the log bottom-up first:
|
||||||
|
- Are there any critical or error-level messages at the end of the log that would point to a reason for the game crashing?
|
||||||
|
- Do any of the last few messages contain information about the game loading files?
|
||||||
|
- Did the game window draw anything on-screen?
|
||||||
|
|
||||||
|
- Continue analyzing the log from the start to see other errors (such as with initialization, memory mapping, linker errors etc.)
|
||||||
|
|
||||||
|
2. Analyze the stack trace
|
||||||
|
- When the emulator is launched through a debugger, it will **break** when an exception or violation is encountered.\
|
||||||
|
_(**breaking** in this context means pausing execution of the program before it continues or stops altogether.
|
||||||
|
Breaks can be intentional as well - these are set with various kinds of **breakpoints**.)_
|
||||||
|
|
||||||
|
- Default setups of most debuggers include a **Stack trace** window/panel that lists the functions the program has called before breaking.
|
||||||
|
|
||||||
|
- The stack trace entries can be navigated to and will show the relevant function, as well as switch to the state that the program was in at the time of execution.\
|
||||||
|
Use the **Locals** and **Watch** windows to investigate variables and other code in these contexts.
|
||||||
|
|
||||||
|
3. Identify the reason for the crash
|
||||||
|
- **Logs aren't always accurate in determining the reason for a crash.**\
|
||||||
|
Some log entries are reported as errors but may not be fatal for the execution to stop. `Critical` entries are most likely to be the cause for crashes.
|
||||||
|
|
||||||
|
- Pinpoint the area of the emulator where the crash occured\
|
||||||
|
If the stack trace ends with functions that are relevant to rendering, it is safe to assume that the issue is with **rendering**.\
|
||||||
|
Similarly, if a crash is in a library responsible for playing videos, your issue can be narrowed down to the scope of video playback in the emulator.
|
||||||
|
|
||||||
|
- **⚠ Some crashes are intentional**
|
||||||
|
- If you identify **Access violations for writing operations** where the function is (or in cases of game libraries, _looks like_ it is) copying memory,
|
||||||
|
it most likely is an **intentional exception** meant to catch game data being written by the game.
|
||||||
|
This is used by the emulator developers to identify procedures that have to do with game data changing.
|
||||||
|
- Debugging tools usually include an option to not break on certain types of exceptions. **Exclude access violations and other intentional exceptions when debugging to skip these exceptions.**
|
||||||
|
- You can also identify such cases if the game works in Release builds of the emulator. These intentional exceptions are development-time only.
|
||||||
|
- Attempt to **Continue** and observe whether the stack trace and/or variables and registers change when you encounter exceptions.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Reporting and communicating about issues
|
||||||
|
|
||||||
|
When communicating with the project about game-specific issues, specify an **uniquely identifable game name** along with its `CUSA-xxxxx` code that is specific to the region/variant of the game you're testing.\
|
||||||
|
The version number is also important to add at least in the description, especially if you can verify that the game behaves differently across versions.\
|
||||||
|
Accurately identifying games will help other developers that own that game recognize your issue by its title and jump in to help test and debug it.
|
||||||
|
|
||||||
|
- Examples of good naming schemes:
|
||||||
|
- Amplitude (2016) `CUSA02480`
|
||||||
|
- Rock Band 4 (`CUSA02084`) v1.0
|
||||||
|
- inFamous: Second Son \[`CUSA-00004`\]
|
||||||
|
- Examples of unideal naming schemes:
|
||||||
|
- _The Witness_
|
||||||
|
- _GTA 5_
|
||||||
|
- _Watch Dogs_
|
||||||
|
|
||||||
|
- If your issue is small or you aren't sure whether you have properly identified something, [join the Discord server](https://discord.gg/MyZRaBngxA) and use the #development channel
|
||||||
|
to concisely explain the issue, as well as any findings you currently have.
|
||||||
|
|
||||||
|
- It is recommended that you check the [game compatibility issue tracker](https://github.com/shadps4-emu/shadps4-game-compatibility/issues) and post very short summaries of progress changes there,
|
||||||
|
(such as the game now booting into the menu or getting in-game) for organizational and status update purposes.
|
||||||
|
|
||||||
|
- ⚠ **Do not post theoretical, unproven game-specific issues in the emulator issue tracker that you cannot verify and locate in the emulator source code as being a bug.**\
|
||||||
|
Do, however, add information about the game you experienced the issue in, so that it can be tested in a reproducible environment.
|
||||||
|
- Good example: "_Crash in `Shader::Gcn::CFG::EmitBlocks()`, out of bounds list access_" -> _issue description shares stack trace, points to code in the repository and provides relevant information_
|
||||||
|
- Bad example: "_Amplitude crashes on boot, access violation_" -> _issue description reiterates title, focuses on the game instead of the emulator and refuses to elaborate_
|
||||||
|
Before Width: | Height: | Size: 51 KiB |
@@ -7,21 +7,22 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
- [PC Requirements](#pc-requirements)
|
- [**PC Requirements**](#minimum-pc-requirements)
|
||||||
- [CPU](#cpu)
|
- [**CPU**](#cpu)
|
||||||
- [GPU](#gpu)
|
- [**GPU**](#gpu)
|
||||||
- [RAM](#ram)
|
- [**RAM**](#ram)
|
||||||
- [OS](#os)
|
- [**OS**](#os)
|
||||||
- [Have the latest WIP version](#have-the-latest-wip-version)
|
- [**Have the latest WIP version**](#how-to-run-the-latest-work-in-progress-builds-of-shadps4)
|
||||||
- [Install PKG files (Games and Updates)](#install-pkg-files)
|
- [**Install PKG files (Games and Updates)**](#install-pkg-files)
|
||||||
- [Configure the emulator](#configure-the-emulator)
|
- [**Configure the emulator**](#configure-the-emulator)
|
||||||
|
|
||||||
## PC Requirements
|
## Minimum PC requirements
|
||||||
|
|
||||||
### CPU
|
### CPU
|
||||||
|
|
||||||
- A processor with at least 4 cores and 6 threads
|
- A processor with at least 4 cores and 6 threads
|
||||||
- Above 2.5 GHz frequency
|
- Above 2.5 GHz frequency
|
||||||
|
- required support AVX2 extension or Rosetta 2 on ARM
|
||||||
|
|
||||||
### GPU
|
### GPU
|
||||||
|
|
||||||
@@ -37,25 +38,25 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
|
|
||||||
- Windows 10 or Ubuntu 22.04
|
- Windows 10 or Ubuntu 22.04
|
||||||
|
|
||||||
## How to run the latest Work-in-Progress builds of ShadPS4
|
## How to run the latest Work-in-Progress builds of shadPS4
|
||||||
|
|
||||||
1. Go to <https://github.com/shadps4-emu/shadPS4/actions> and make sure you are logged into your GitHub account (important!)
|
1. Go to <https://github.com/shadps4-emu/shadPS4/releases> In the release identified as 'pre-release' click on the down arrow(Assets), select your operating system of choice (the "**qt**" versions have a user interface, which is probably the one you want. The others are SDL versions, which can only be run via command line).
|
||||||
2. On the left side of the page, select your operating system of choice (the "**qt**" versions have a user interface, which is probably the one you want. The others are SDL versions, which can only be run via command line). 
|

|
||||||
|
|
||||||
3. In the workflow list, select the latest entry with a green :white_check_mark: icon in front of it. (or the latest entry for whatever pull request you wish to test). 
|
2. Once downloaded, extract to its own folder, and run shadPS4's executable from the extracted folder.
|
||||||
|
|
||||||
4. On the bottom of this page, select the name of the file, and it should start downloading. (If there is no file here, double check that you are indeed logged into a GitHub account, and that there is a green :white_check_mark: icon. 
|
3. Upon first launch, shadPS4 will prompt you to select a folder to store your installed games in. Select "Browse" and then select a folder that shadPS4 can use to install your PKG files to.
|
||||||
|
|
||||||
5. Once downloaded, extract to its own folder, and run ShadPS4's executable from the extracted folder.
|
|
||||||
|
|
||||||
6. Upon first launch, ShadPS4 will prompt you to select a folder to store your installed games in. Select "Browse" and then select a folder that ShadPS4 can use to install your PKG files to.
|
|
||||||
|
|
||||||
## Install PKG files
|
## Install PKG files
|
||||||
|
|
||||||
To install PKG files (game and updates), you will need the Qt application (with UI). You will have to go to "File" then to "Install Packages (PKG)", a window will open then you will have to select the files. You can install multiple PKG files at once. Once finished, the game should appear in the application.
|
To install PKG files (game and updates), you will need the Qt application (with UI). You will have to go to "File" then to "Install Packages (PKG)", a window will open then you will have to select the files. You can install multiple PKG files at once. Once finished, the game should appear in the application.
|
||||||
|
|
||||||
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Quickstart/2.png" width="800"></a>
|
<img src="https://github.com/shadps4-emu/shadPS4/blob/main/documents/Quickstart/2.png" width="800">
|
||||||
|
|
||||||
## Configure the emulator
|
## Configure the emulator
|
||||||
|
|
||||||
You can configure the emulator in the "user" folder (created after the first start of the application) then in the "config.toml" file. Here you can find lots of parameters to set with True or False.
|
To configure the emulator, you can go through the interface and go to "settings".
|
||||||
|
|
||||||
|
You can also configure the emulator by editing the `config.toml` file located in the `user` folder created after the application is started (Mostly useful if you are using the SDL version).
|
||||||
|
Some settings may be related to more technical development and debugging.\
|
||||||
|
For more information on this, see [**Debugging**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md#configuration).
|
||||||
BIN
documents/Screenshots/1.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
documents/Screenshots/2.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
documents/Screenshots/3.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
documents/Screenshots/4.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 350 KiB |
|
Before Width: | Height: | Size: 850 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 175 KiB |
@@ -9,22 +9,22 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
|
|
||||||
#### Debian & Ubuntu
|
#### Debian & Ubuntu
|
||||||
```
|
```
|
||||||
sudo apt-get install build-essential libasound2-dev libpulse-dev libopenal-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git libevdev-dev libsdl2-2.0 libsdl2-dev libjack-dev libsndio-dev
|
sudo apt install build-essential clang git cmake libasound2-dev libpulse-dev libopenal-dev libssl-dev zlib1g-dev libedit-dev libudev-dev libevdev-dev libsdl2-dev libjack-dev libsndio-dev qt6-base-dev qt6-tools-dev qt6-multimedia-dev libvulkan-dev vulkan-validationlayers
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Fedora
|
#### Fedora
|
||||||
```
|
```
|
||||||
sudo dnf install alsa-lib-devel cmake libatomic libevdev-devel libudev-devel openal-devel qt6-qtbase-devel qt6-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt6-qtmultimedia-devel qt6-qtsvg-devel
|
sudo dnf install clang git cmake libatomic alsa-lib-devel pipewire-jack-audio-connection-kit-devel openal-devel openssl-devel libevdev-devel libudev-devel libXext-devel qt6-qtbase-devel qt6-qtbase-private-devel qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qttools-devel vulkan-devel vulkan-validation-layers
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Arch Linux
|
#### Arch Linux
|
||||||
```
|
```
|
||||||
sudo pacman -S openal cmake vulkan-validation-layers qt6-base qt6-declarative qt6-multimedia sdl2 sndio jack2 base-devel
|
sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declarative qt6-multimedia sdl2 vulkan-validation-layers
|
||||||
```
|
```
|
||||||
|
|
||||||
#### OpenSUSE
|
#### OpenSUSE
|
||||||
```
|
```
|
||||||
sudo zypper install git cmake libasound2 libpulse-devel openal-soft-devel zlib-devel libedit-devel vulkan-devel libudev-devel libqt6-qtbase-devel libqt6-qtmultimedia-devel libqt6-qtsvg-devel libQt6Gui-private-headers-devel libevdev-devel libsndio7_1 libjack-devel
|
sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers
|
||||||
```
|
```
|
||||||
### Cloning and compiling:
|
### Cloning and compiling:
|
||||||
|
|
||||||
@@ -34,9 +34,11 @@ git clone --recursive https://github.com/shadps4-emu/shadPS4.git
|
|||||||
cd shadPS4
|
cd shadPS4
|
||||||
```
|
```
|
||||||
|
|
||||||
Generate the build directory in the shadPS4 directory:
|
Generate the build directory in the shadPS4 directory. To disable the QT GUI, remove the ```-DENABLE_QT_GUI=ON``` flag:
|
||||||
|
|
||||||
|
**Note**: Clang is the compiler used for official builds and CI. If you build with GCC, you might encounter issues—please report any you find. If you choose to use GCC, we recommend building with Clang at least once before submitting a pull request.
|
||||||
```
|
```
|
||||||
cmake -S . -B build/
|
cmake -S . -B build/ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||||
```
|
```
|
||||||
|
|
||||||
Enter the directory:
|
Enter the directory:
|
||||||
@@ -49,8 +51,11 @@ Use make to build the project:
|
|||||||
cmake --build . --parallel$(nproc)
|
cmake --build . --parallel$(nproc)
|
||||||
```
|
```
|
||||||
|
|
||||||
Now run the emulator:
|
Now run the emulator. If QT is enabled:
|
||||||
|
```
|
||||||
|
./shadps4
|
||||||
|
```
|
||||||
|
Otherwise, specify the path to your PKG's boot file:
|
||||||
```
|
```
|
||||||
./shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
./shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
||||||
```
|
```
|
||||||
|
|||||||
71
documents/building-macos.md
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||||
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Build shadPS4 for macOS
|
||||||
|
|
||||||
|
### Install the necessary tools to build shadPS4:
|
||||||
|
|
||||||
|
First, make sure you have **Xcode 16.0 or newer** installed.
|
||||||
|
|
||||||
|
For installing other tools and library dependencies we will be using [Homebrew](https://brew.sh/).
|
||||||
|
|
||||||
|
On an ARM system, we will need the native ARM Homebrew to install tools and x86_64 Homebrew to install libraries.
|
||||||
|
|
||||||
|
First, install native Homebrew and tools:
|
||||||
|
```
|
||||||
|
# Installs native Homebrew to /opt/homebrew
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
# Adds Homebrew to your path
|
||||||
|
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> ~/.zprofile
|
||||||
|
eval $(/opt/homebrew/bin/brew shellenv)
|
||||||
|
# Installs tools.
|
||||||
|
brew install clang-format cmake
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, install x86_64 Qt. You can skip these steps and move on to **Cloning and compiling** if you do not intend to build the Qt GUI.
|
||||||
|
|
||||||
|
**If you are on an ARM Mac:**
|
||||||
|
```
|
||||||
|
# Installs x86_64 Homebrew to /usr/local
|
||||||
|
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
# Installs libraries.
|
||||||
|
arch -x86_64 /usr/local/bin/brew install qt@6
|
||||||
|
```
|
||||||
|
|
||||||
|
**If you are on an x86_64 Mac:**
|
||||||
|
```
|
||||||
|
brew install qt@6
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cloning and compiling:
|
||||||
|
|
||||||
|
Clone the repository recursively:
|
||||||
|
```
|
||||||
|
git clone --recursive https://github.com/shadps4-emu/shadPS4.git
|
||||||
|
cd shadPS4
|
||||||
|
```
|
||||||
|
|
||||||
|
Generate the build directory in the shadPS4 directory:
|
||||||
|
```
|
||||||
|
cmake -S . -B build/ -DCMAKE_OSX_ARCHITECTURES=x86_64
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to build the Qt GUI, add `-DENABLE_QT_GUI=ON` to the end of this command as well.
|
||||||
|
|
||||||
|
Enter the directory:
|
||||||
|
```
|
||||||
|
cd build/
|
||||||
|
```
|
||||||
|
|
||||||
|
Use make to build the project:
|
||||||
|
```
|
||||||
|
cmake --build . --parallel$(sysctl -n hw.ncpu)
|
||||||
|
```
|
||||||
|
|
||||||
|
Now run the emulator:
|
||||||
|
|
||||||
|
```
|
||||||
|
./shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
||||||
|
```
|
||||||
@@ -5,21 +5,106 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
|
|
||||||
# Build shadPS4 for Windows
|
# Build shadPS4 for Windows
|
||||||
|
|
||||||
## Download Visual Studio Community 2022
|
This tutorial reads as if you have none of the prerequisites already installed. If you do, just ignore the steps regarding installation.
|
||||||
|
If you are building to contribute to the project, please omit `--depth 1` from the git invocations.
|
||||||
|
|
||||||
Download link: [**Visual Studio 2022**](https://visualstudio.microsoft.com/vs/)
|
Note: **ARM64 is not supported!** As of writing, it will not build nor run. The instructions with respect to ARM64 are for developers only.
|
||||||
|
|
||||||
## Requirements
|
## Option 1: Visual Studio 2022
|
||||||
|
|
||||||
### From Visual Studio Community
|
### (Prerequisite) Download the Community edition from [**Visual Studio 2022**](https://visualstudio.microsoft.com/vs/)
|
||||||
|
|
||||||
- Desktop development with C++
|
Once you are within the installer:
|
||||||
|
|
||||||
### From individual components tab install
|
1. Select `Desktop development with C++`
|
||||||
|
2. Go to "Individual Components" tab
|
||||||
|
3. Search and select `C++ Clang Compiler for Windows` and `MSBuild support for LLVM`
|
||||||
|
4. Continue the installation
|
||||||
|
|
||||||
- C++ Clang Compiler for Windows (17.0.3)
|
### (Prerequisite) Download [**Qt**](https://doc.qt.io/qt-6/get-and-install-qt.html)
|
||||||
- MSBuild support for LLVM (Clang-cl) toolset
|
|
||||||
|
|
||||||
- ## Compiling
|
Beware, this requires you to create a Qt account. If you do not want to do this, please follow the MSYS2/MinGW compilation method instead.
|
||||||
|
|
||||||
- Open Visual Studio Community and select the **x64-Clang-Release**, **x64-Clang-Debug** or **x64-Clang-RelWithDebInfo**. It should compile just fine.
|
1. Under the current, non beta version of Qt (at the time of writing 6.7.3), select the option `MSVC 2022 64-bit` or similar.
|
||||||
|
If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `MSVC 2022 ARM64` instead.
|
||||||
|
|
||||||
|
Go through the installation normally. If you know what you are doing, you may unselect individual components that eat up too much disk space.
|
||||||
|
|
||||||
|
2. Download and install [Qt Visual Studio Tools](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2022)
|
||||||
|
|
||||||
|
Once you are finished, you will have to configure Qt within Visual Studio:
|
||||||
|
|
||||||
|
1. Tools -> Options -> Qt -> Versions
|
||||||
|
2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.7.3\msvc2022_64`
|
||||||
|
3. Enable the default checkmark on the new version you just created.
|
||||||
|
|
||||||
|
### (Prerequisite) Download [**Git for Windows**](https://git-scm.com/download/win)
|
||||||
|
|
||||||
|
Go through the Git for Windows installation as normal
|
||||||
|
|
||||||
|
### Cloning the source code
|
||||||
|
|
||||||
|
1. Open Git for Windows, navigate to a place where you want to store the shadPS4 source code folder
|
||||||
|
2. Clone the repository by running
|
||||||
|
`git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4`
|
||||||
|
|
||||||
|
### Compiling with Visual Studio GUI
|
||||||
|
|
||||||
|
1. Open up Visual Studio, select `Open a local folder` and select the folder with the shadPS4 source code. The folder should contain `CMakeLists.txt`
|
||||||
|
2. Change x64-Clang-Debug to x64-Clang-Release if you want a regular, non-debug build.
|
||||||
|
3. If you want to build shadPS4 with the Qt Gui:
|
||||||
|
1. Click x64-Clang-Release and select "Manage Configurations"
|
||||||
|
2. Look for "CMake command arguments" and add to the text field
|
||||||
|
`-DENABLE_QT_GUI=ON -DCMAKE_PREFIX_PATH=C:\Qt\6.7.3\msvc2022_64`
|
||||||
|
(Change Qt path if you've installed it to non-default path)
|
||||||
|
3. Press CTRL+S to save and wait a moment for CMake generation
|
||||||
|
4. Change the project to build to shadps4.exe
|
||||||
|
5. Build -> Build All
|
||||||
|
|
||||||
|
Your shadps4.exe will be in `C:\path\to\source\Build\x64-Clang-Release\`
|
||||||
|
|
||||||
|
To automatically populate the necessary files to run shadPS4.exe, run in a command prompt or terminal:
|
||||||
|
`C:\Qt\6.7.3\msvc2022_64\bin\windeployqt.exe "C:\path\to\shadps4.exe"`
|
||||||
|
(Change Qt path if you've installed it to non-default path)
|
||||||
|
|
||||||
|
## Option 2: MSYS2/MinGW
|
||||||
|
|
||||||
|
### (Prerequisite) Download [**MSYS2**](https://www.msys2.org/)
|
||||||
|
|
||||||
|
Go through the MSYS2 installation as normal
|
||||||
|
|
||||||
|
If you are building to distribute, please omit `-DCMAKE_CXX_FLAGS="-O2 -march=native"` within the build configuration step.
|
||||||
|
|
||||||
|
Normal x86-based computers, follow:
|
||||||
|
|
||||||
|
1. Open "MSYS2 MINGW64" from your new applications
|
||||||
|
2. Run `pacman -Syu`, let it complete;
|
||||||
|
3. Run `pacman -S --needed git mingw-w64-x86_64-binutils mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-rapidjson mingw-w64-x86_64-ninja mingw-w64-x86_64-ffmpeg`
|
||||||
|
1. Optional (Qt only): run `pacman -S --needed mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-tools mingw-w64-x86_64-qt6-multimedia`
|
||||||
|
4. Run `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4`
|
||||||
|
5. Run `cd shadPS4`
|
||||||
|
6. Run `cmake -S . -B build -DCMAKE_C_COMPILER="clang.exe" -DCMAKE_CXX_COMPILER="clang++.exe" -DCMAKE_CXX_FLAGS="-O2 -march=native"`
|
||||||
|
1. Optional (Qt only): add `-DENABLE_QT_GUI=ON`
|
||||||
|
7. Run `cmake --build build`
|
||||||
|
1. Optional (Qt only): run `windeployqt6 build/shadps4.exe`
|
||||||
|
8. To run the finished product, run `./build/shadPS4.exe`
|
||||||
|
|
||||||
|
ARM64-based computers, follow:
|
||||||
|
|
||||||
|
1. Open "MSYS2 CLANGARM64" from your new applications
|
||||||
|
2. Run `pacman -Syu`, let it complete;
|
||||||
|
3. Run `pacman -S --needed git mingw-w64-clang-aarch64-binutils mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-rapidjson mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-ninja mingw-w64-clang-aarch64-ffmpeg`
|
||||||
|
1. Optional (Qt only): run `pacman -S --needed mingw-w64-clang-aarch64-qt6-base mingw-w64-clang-aarch64-qt6-tools mingw-w64-clang-aarch64-qt6-multimedia`
|
||||||
|
4. Run `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4`
|
||||||
|
5. Run `cd shadPS4`
|
||||||
|
6. Run `cmake -S . -B build -DCMAKE_C_COMPILER="clang.exe" -DCMAKE_CXX_COMPILER="clang++.exe" -DCMAKE_CXX_FLAGS="-O2 -march=native"`
|
||||||
|
1. Optional (Qt only): add `-DENABLE_QT_GUI=ON`
|
||||||
|
7. Run `cmake --build build`
|
||||||
|
1. Optional (Qt only): run `windeployqt6 build/shadps4.exe`
|
||||||
|
8. To run the finished product, run `./build/shadPS4.exe`
|
||||||
|
|
||||||
|
## Note on MSYS2 builds
|
||||||
|
|
||||||
|
These builds may not be easily copyable to people who do not also have a MSYS2 installation.
|
||||||
|
If you want to distribute these builds, you need to copy over the correct DLLs into a distribution folder.
|
||||||
|
In order to run them, you must be within the MSYS2 shell environment.
|
||||||
|
|||||||
99
documents/changelog.md
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
v0.4.0 31/10/2024 - codename divicius
|
||||||
|
=================
|
||||||
|
|
||||||
|
- Shader recompiler fixes
|
||||||
|
- Emulated support for cpus that doesn't have SSE4.2a (intel cpus)
|
||||||
|
- Frame graph + Precise 60 fps timing
|
||||||
|
- Save data: fix nullptr & concurrent file write
|
||||||
|
- Auto Update
|
||||||
|
- Error dialog implementation
|
||||||
|
- Swapchain recreation and window resizing
|
||||||
|
- Add playback of background/title music in game list
|
||||||
|
- Kernel: Quiet sceKernelWaitEventFlag error log on timeout
|
||||||
|
- Improve keyboard navigation in game list
|
||||||
|
- core/memory: Pooled memory implementation
|
||||||
|
- Fix PKG loading
|
||||||
|
- replace trophy xml assert with error
|
||||||
|
- Refactor audio handling with range checks, buffer threshold, and lock
|
||||||
|
- audio_core: Fix return value types and shift some error handling to library
|
||||||
|
- Devtools: PM4 Explorer
|
||||||
|
- Initial support of Geometry shaders
|
||||||
|
- Working touchpad support
|
||||||
|
- net: Stub sceNetErrnoLoc
|
||||||
|
- Add support to click touchpad using back button on non PS4/5 controllers
|
||||||
|
- Multiple Install Folders
|
||||||
|
- Using a more standard data directory for linux
|
||||||
|
- video_core: Implement sceGnmInsertPushColorMarker
|
||||||
|
- ime_dialog: Initial implementation
|
||||||
|
- Network libs fixes
|
||||||
|
- Use GetSystemTimePreciseAsFileTime to fix fps timing issues
|
||||||
|
- Added adaptive mutex initializer
|
||||||
|
- Small Np + trophy fixes
|
||||||
|
- Separate Updates from Game Folder
|
||||||
|
- Minor Fixes for Separate Update Folder
|
||||||
|
- AvPlayer: Do not align w/h to 16 with vdec2
|
||||||
|
- Improve sceSystemServiceReceiveEvent stub
|
||||||
|
- renderer_vulkan: Commize and adjust buffer bindings
|
||||||
|
- Add poll interval to libScePad
|
||||||
|
- Add more surface format mappings.
|
||||||
|
- vulkan: Report only missing format feature flags.
|
||||||
|
- IME implementation
|
||||||
|
- Videodec2 implementation
|
||||||
|
- path_util: Make sure macOS has current directory set and clean up path code.
|
||||||
|
- Load LLE modules from sys_modules/GAMEID folder
|
||||||
|
|
||||||
|
v0.3.0 23/09/2024 - codename broamic
|
||||||
|
=================
|
||||||
|
|
||||||
|
- Cheat/Patching support
|
||||||
|
- DLC support
|
||||||
|
- New translations support (26 languages)
|
||||||
|
- Support for unlocking trophies
|
||||||
|
- Support for more controllers (Dualshock and Xbox)
|
||||||
|
- Many GUI improvements
|
||||||
|
- AVplayer
|
||||||
|
|
||||||
|
v0.2.0 15/08/2024 - codename validptr
|
||||||
|
=================
|
||||||
|
- Adding macOS support
|
||||||
|
- Big shader recompiler improvements
|
||||||
|
- Core improvements
|
||||||
|
- GUI improvements
|
||||||
|
|
||||||
|
v0.1.0 01/07/2024 - codename madturtle
|
||||||
|
=================
|
||||||
|
- Added a shader recompiler, with this we have a lot of games that starts to work
|
||||||
|
- Rewrote a big part of core
|
||||||
|
|
||||||
|
v0.0.3 23/03/2024 - codename salad
|
||||||
|
=================
|
||||||
|
- Switching to std::thread
|
||||||
|
- Use unique_ptr where possible
|
||||||
|
- Replace printf/scanf with type safe fmt
|
||||||
|
- Implemented sceKernelGetProcessTime
|
||||||
|
- Implemented sceKernelGetProcessTimeCounter, sceKernelGetProcessTimeCounterFrequency
|
||||||
|
- Pause emu with P button
|
||||||
|
- Timers rewrote with std::chrono
|
||||||
|
- Added sceSystemServiceGetStatus
|
||||||
|
- Initial FileSystem implementation
|
||||||
|
- Initial TLS work
|
||||||
|
- New logging implementation
|
||||||
|
- Some functions implemented for userService, systemService
|
||||||
|
- Added sceAudioOut module and output using SDL audio
|
||||||
|
|
||||||
|
v0.0.2 21/10/2023
|
||||||
|
=================
|
||||||
|
- Using cstdint header in variable types
|
||||||
|
- run_main_entry: Rewrite in asm for stack setup
|
||||||
|
- Printf libc implementation for work with sysv_abi
|
||||||
|
- Initial pad emulation (only digital pad atm)
|
||||||
|
- Implemented sceVideoOutIsFlipPending
|
||||||
|
- Added auto stubs, now unsupported hle function will resolve as empty stubs
|
||||||
|
- Rewrote libc_cxa functions
|
||||||
|
- Libc implementations ( _ZdlPv,_Znwm,rand,_Fsin,qsort,free,strncpy,memmove,atan2f,pow,_Sin)
|
||||||
|
- ET_SCE_DYNAMIC behaves as valid for execution now
|
||||||
|
- Initial FileSystem work (not yet usable)
|
||||||
|
|
||||||
|
v0.0.1 29/09/2023
|
||||||
|
=================
|
||||||
|
First public release. Everything is new.
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
v0.0.3 23/03/2024 - codename salad
|
|
||||||
=================
|
|
||||||
-Switching to std::thread
|
|
||||||
-Use unique_ptr where possible
|
|
||||||
-Replace printf/scanf with type safe fmt
|
|
||||||
-Implemented sceKernelGetProcessTime
|
|
||||||
-Implemented sceKernelGetProcessTimeCounter , sceKernelGetProcessTimeCounterFrequency
|
|
||||||
-Pause emu with P button
|
|
||||||
-Timers rewrote with std::chrono
|
|
||||||
-Added sceSystemServiceGetStatus
|
|
||||||
-Initial FileSystem implementation
|
|
||||||
-Initial TLS work
|
|
||||||
-New logging implementation
|
|
||||||
-Some functions implemented for userService,systemService
|
|
||||||
-Added sceAudioOut module and output using sdl audio
|
|
||||||
|
|
||||||
v0.0.2 21/10/2023
|
|
||||||
=================
|
|
||||||
-using cstdint header in variable types
|
|
||||||
-run_main_entry: Rewrite in asm for stack setup
|
|
||||||
-printf libc implementation for work with sysv_abi
|
|
||||||
-initial pad emulation (only digital pad atm)
|
|
||||||
-Implemented sceVideoOutIsFlipPending
|
|
||||||
-Added auto stubs , now unsupported hle function will resolve as empty stubs
|
|
||||||
-Rewrote libc_cxa functions
|
|
||||||
-Libc implementations ( _ZdlPv,_Znwm,rand,_Fsin,qsort,free,strncpy,memmove,atan2f,pow,_Sin)
|
|
||||||
-ET_SCE_DYNAMIC behaves as valid for execution now.
|
|
||||||
-Initial FileSystem work (not yet usable).
|
|
||||||
|
|
||||||
v0.0.1 29/09/2023
|
|
||||||
=================
|
|
||||||
First public release . Everything is new
|
|
||||||
19
documents/patching-shader.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||||
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Install Vulkan SDK and \*ensure `spirv-cross` and `glslc` are in PATH\*.
|
||||||
|
|
||||||
|
1. Enable `dumpShaders` in config.toml
|
||||||
|
|
||||||
|
2. Run `spirv-cross -V fs_0x000000.spv --output fs_0x000000.glsl` to decompile the SPIR-V IR to GLSL.
|
||||||
|
|
||||||
|
3. Edit the GLSL file as you wish
|
||||||
|
|
||||||
|
4. To compile back to SPIR-V, run (change the _**-fshader-stage**_ to correct stage):
|
||||||
|
`glslc --target-env=vulkan1.3 --target-spv=spv1.6 -fshader-stage=frag fs_0x000000.glsl -o fs_0x000000.spv`
|
||||||
|
|
||||||
|
5. Put the updated .spv file to `shader/patch` folder with the same name as the original shader
|
||||||
|
|
||||||
|
6. Enable `patchShaders` in config.toml
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
shadPS4 - A PS4 emulator
|
|
||||||
=========================
|
|
||||||
|
|
||||||
1. Intro
|
|
||||||
2. Current status
|
|
||||||
3. Contributors
|
|
||||||
4. Greetings
|
|
||||||
|
|
||||||
1.Intro
|
|
||||||
=======
|
|
||||||
shadPS4 is a Play Station 4 emulator for Windows and Linux. Although atm it can't run a lot of stuff, we are working torwards to make it more compatible.
|
|
||||||
|
|
||||||
2.Current status
|
|
||||||
================
|
|
||||||
shadPS4 is a HLE emulator. Currently on a small amount of functions is emulated, which is one of the reasons compatibility is low.
|
|
||||||
|
|
||||||
3.Contributors
|
|
||||||
==============
|
|
||||||
- georgemoralis
|
|
||||||
- raphaelthegreat
|
|
||||||
- skmp
|
|
||||||
- wheremyfoodat
|
|
||||||
|
|
||||||
4.Greetings
|
|
||||||
===========
|
|
||||||
I would like to thank the following people for helping me so far, with coding or moral support.
|
|
||||||
|
|
||||||
- wheremyfoodat - or @rodakinos for believed me
|
|
||||||
- paris - or OFFTKP for not believing me and that made me a better coder :D
|
|
||||||
- skmp - or kornilios for being good old friend
|
|
||||||
- PandaBad - our beloved stalker
|
|
||||||
- emufan4568 - for advices
|
|
||||||
- velocity - for talking 1-2 times per year on discord server. We miss you velocity
|
|
||||||
|
|
||||||
- probably more, will include in the next readme :D
|
|
||||||
129
externals/CMakeLists.txt
vendored
@@ -3,7 +3,13 @@
|
|||||||
|
|
||||||
set(BUILD_SHARED_LIBS OFF)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
set(BUILD_TESTING OFF)
|
set(BUILD_TESTING OFF)
|
||||||
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
|
set_directory_properties(PROPERTIES
|
||||||
|
EXCLUDE_FROM_ALL ON
|
||||||
|
SYSTEM ON
|
||||||
|
)
|
||||||
|
|
||||||
|
# Set CMP0069 policy to "NEW" in order to ensure consistent behavior when building external targets with LTO enabled
|
||||||
|
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# Silence "deprecation" warnings
|
# Silence "deprecation" warnings
|
||||||
@@ -13,11 +19,8 @@ endif()
|
|||||||
# Boost
|
# Boost
|
||||||
if (NOT TARGET Boost::headers)
|
if (NOT TARGET Boost::headers)
|
||||||
set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "")
|
set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "")
|
||||||
set(Boost_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "")
|
|
||||||
set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "")
|
set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "")
|
||||||
add_library(boost INTERFACE)
|
add_subdirectory(ext-boost)
|
||||||
target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIR})
|
|
||||||
add_library(Boost::headers ALIAS boost)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# fmtlib
|
# fmtlib
|
||||||
@@ -25,11 +28,6 @@ if (NOT TARGET fmt::fmt)
|
|||||||
add_subdirectory(fmt)
|
add_subdirectory(fmt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Discord-RPC
|
|
||||||
set(BUILD_EXAMPLES OFF CACHE BOOL "")
|
|
||||||
add_subdirectory(discord-rpc)
|
|
||||||
target_include_directories(discord-rpc INTERFACE ./discord-rpc/include)
|
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
||||||
# If it is clang and MSVC we will add a static lib
|
# If it is clang and MSVC we will add a static lib
|
||||||
# CryptoPP
|
# CryptoPP
|
||||||
@@ -40,21 +38,41 @@ else()
|
|||||||
if (NOT TARGET cryptopp::cryptopp)
|
if (NOT TARGET cryptopp::cryptopp)
|
||||||
set(CRYPTOPP_INSTALL OFF)
|
set(CRYPTOPP_INSTALL OFF)
|
||||||
set(CRYPTOPP_BUILD_TESTING OFF)
|
set(CRYPTOPP_BUILD_TESTING OFF)
|
||||||
set(CRYPTOPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/)
|
set(CRYPTOPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp)
|
||||||
add_subdirectory(cryptopp-cmake)
|
add_subdirectory(cryptopp-cmake)
|
||||||
file(COPY cryptopp DESTINATION cryptopp FILES_MATCHING PATTERN "*.h")
|
file(COPY cryptopp DESTINATION cryptopp FILES_MATCHING PATTERN "*.h")
|
||||||
target_include_directories(cryptopp INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/cryptopp")
|
# remove externals/cryptopp from include directories because it contains a conflicting zlib.h file
|
||||||
|
set_target_properties(cryptopp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/cryptopp")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Zlib-Ng
|
if (NOT TARGET FFmpeg::ffmpeg)
|
||||||
if (NOT TARGET zlib-ng::zlib)
|
add_subdirectory(ffmpeg-core)
|
||||||
|
add_library(FFmpeg::ffmpeg ALIAS ffmpeg)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# LibAtrac9
|
||||||
|
file(GLOB LIBATRAC9_SOURCES LibAtrac9/C/src/*.c)
|
||||||
|
add_library(LibAtrac9 STATIC ${LIBATRAC9_SOURCES})
|
||||||
|
target_include_directories(LibAtrac9 INTERFACE LibAtrac9/C/src)
|
||||||
|
|
||||||
|
# zlib
|
||||||
|
if (NOT TARGET ZLIB::ZLIB)
|
||||||
set(ZLIB_ENABLE_TESTS OFF)
|
set(ZLIB_ENABLE_TESTS OFF)
|
||||||
set(WITH_GTEST OFF)
|
set(WITH_GTEST OFF)
|
||||||
set(WITH_NEW_STRATEGIES ON)
|
set(WITH_NEW_STRATEGIES ON)
|
||||||
set(WITH_NATIVE_INSTRUCTIONS ON)
|
set(WITH_NATIVE_INSTRUCTIONS ON)
|
||||||
add_subdirectory(zlib-ng)
|
set(ZLIB_COMPAT ON CACHE BOOL "" FORCE)
|
||||||
add_library(zlib-ng::zlib ALIAS zlib)
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
ZLIB
|
||||||
|
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng"
|
||||||
|
OVERRIDE_FIND_PACKAGE
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(ZLIB)
|
||||||
|
add_library(ZLIB::ZLIB ALIAS zlib)
|
||||||
|
# libpng expects this variable to exist after its find_package(ZLIB)
|
||||||
|
set(ZLIB_INCLUDE_DIRS "${FETCHCONTENT_BASE_DIR}/zlib-build")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# SDL3
|
# SDL3
|
||||||
@@ -77,7 +95,7 @@ endif()
|
|||||||
# RenderDoc
|
# RenderDoc
|
||||||
if (NOT TARGET RenderDoc::API)
|
if (NOT TARGET RenderDoc::API)
|
||||||
add_library(renderdoc INTERFACE)
|
add_library(renderdoc INTERFACE)
|
||||||
target_include_directories(renderdoc SYSTEM INTERFACE ./renderdoc)
|
target_include_directories(renderdoc INTERFACE ./renderdoc)
|
||||||
add_library(RenderDoc::API ALIAS renderdoc)
|
add_library(RenderDoc::API ALIAS renderdoc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -92,7 +110,7 @@ if (NOT TARGET glslang::glslang)
|
|||||||
set(ENABLE_OPT OFF CACHE BOOL "")
|
set(ENABLE_OPT OFF CACHE BOOL "")
|
||||||
add_subdirectory(glslang)
|
add_subdirectory(glslang)
|
||||||
file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h")
|
file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h")
|
||||||
target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
|
target_include_directories(glslang INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Robin-map
|
# Robin-map
|
||||||
@@ -141,19 +159,45 @@ if (WIN32)
|
|||||||
target_compile_options(sirit PUBLIC "-Wno-error=unused-command-line-argument")
|
target_compile_options(sirit PUBLIC "-Wno-error=unused-command-line-argument")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# date
|
# half
|
||||||
if (APPLE AND NOT TARGET date::date-tz)
|
if (NOT TARGET half::half)
|
||||||
option(BUILD_TZ_LIB "" ON)
|
add_library(half INTERFACE)
|
||||||
option(USE_SYSTEM_TZ_DB "" ON)
|
target_include_directories(half INTERFACE half/include)
|
||||||
add_subdirectory(date)
|
add_library(half::half ALIAS half)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# libpng
|
||||||
|
if (NOT TARGET PNG::PNG)
|
||||||
|
set(PNG_SHARED OFF CACHE BOOL "" FORCE)
|
||||||
|
set(PNG_STATIC ON CACHE BOOL "" FORCE)
|
||||||
|
set(PNG_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(PNG_TOOLS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(SKIP_INSTALL_ALL OFF CACHE BOOL "" FORCE)
|
||||||
|
add_subdirectory(libpng)
|
||||||
|
add_library(PNG::PNG ALIAS png_static)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Dear ImGui
|
||||||
|
add_library(Dear_ImGui
|
||||||
|
dear_imgui/imgui.cpp
|
||||||
|
dear_imgui/imgui_demo.cpp
|
||||||
|
dear_imgui/imgui_draw.cpp
|
||||||
|
dear_imgui/imgui_internal.h
|
||||||
|
dear_imgui/imgui_tables.cpp
|
||||||
|
dear_imgui/imgui_widgets.cpp
|
||||||
|
)
|
||||||
|
target_include_directories(Dear_ImGui INTERFACE dear_imgui/)
|
||||||
|
|
||||||
# Tracy
|
# Tracy
|
||||||
|
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
|
option(TRACY_ENABLE "" OFF)
|
||||||
|
else()
|
||||||
option(TRACY_ENABLE "" ON)
|
option(TRACY_ENABLE "" ON)
|
||||||
|
endif()
|
||||||
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
|
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
|
||||||
option(TRACY_ON_DEMAND "" ON)
|
option(TRACY_ON_DEMAND "" ON)
|
||||||
option(TRACY_NO_FRAME_IMAGE "" ON)
|
option(TRACY_NO_FRAME_IMAGE "" ON)
|
||||||
option(TRACY_FIBERS "" ON) # For AmdGpu frontend profiling
|
option(TRACY_FIBERS "" OFF) # For AmdGpu frontend profiling, disabled due to instability
|
||||||
option(TRACY_NO_SYSTEM_TRACING "" ON)
|
option(TRACY_NO_SYSTEM_TRACING "" ON)
|
||||||
option(TRACY_NO_CALLSTACK "" ON)
|
option(TRACY_NO_CALLSTACK "" ON)
|
||||||
option(TRACY_NO_CODE_TRANSFER "" ON)
|
option(TRACY_NO_CODE_TRANSFER "" ON)
|
||||||
@@ -161,3 +205,40 @@ option(TRACY_NO_SAMPLING "" ON)
|
|||||||
option(TRACY_ONLY_LOCALHOST "" ON)
|
option(TRACY_ONLY_LOCALHOST "" ON)
|
||||||
option(TRACY_NO_CONTEXT_SWITCH "" ON)
|
option(TRACY_NO_CONTEXT_SWITCH "" ON)
|
||||||
add_subdirectory(tracy)
|
add_subdirectory(tracy)
|
||||||
|
|
||||||
|
# pugixml
|
||||||
|
if (NOT TARGET pugixml::pugixml)
|
||||||
|
add_subdirectory(pugixml)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Discord RPC
|
||||||
|
if (ENABLE_DISCORD_RPC)
|
||||||
|
set(BUILD_EXAMPLES OFF)
|
||||||
|
add_subdirectory(discord-rpc)
|
||||||
|
target_include_directories(discord-rpc INTERFACE discord-rpc/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# GCN Headers
|
||||||
|
add_subdirectory(gcn)
|
||||||
|
|
||||||
|
# stb
|
||||||
|
if (NOT TARGET stb::headers)
|
||||||
|
add_library(stb INTERFACE)
|
||||||
|
target_include_directories(stb INTERFACE stb)
|
||||||
|
add_library(stb::headers ALIAS stb)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Apple-only dependencies
|
||||||
|
if (APPLE)
|
||||||
|
# date
|
||||||
|
if (NOT TARGET date::date-tz)
|
||||||
|
option(BUILD_TZ_LIB "" ON)
|
||||||
|
option(USE_SYSTEM_TZ_DB "" ON)
|
||||||
|
add_subdirectory(date)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# MoltenVK
|
||||||
|
if (NOT TARGET MoltenVK)
|
||||||
|
add_subdirectory(MoltenVK)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|||||||
1
externals/LibAtrac9
vendored
Submodule
93
externals/MoltenVK/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
# Prepare MoltenVK Git revision
|
||||||
|
find_package(Git)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||||
|
OUTPUT_VARIABLE MVK_GIT_REV
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK
|
||||||
|
ERROR_QUIET
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
endif()
|
||||||
|
set(MVK_GENERATED_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/Generated)
|
||||||
|
file(WRITE ${MVK_GENERATED_INCLUDES}/mvkGitRevDerived.h "static const char* mvkRevString = \"${MVK_GIT_REV}\";")
|
||||||
|
message(STATUS "MoltenVK revision: ${MVK_GIT_REV}")
|
||||||
|
|
||||||
|
# Prepare MoltenVK version
|
||||||
|
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVK/MoltenVK/API/mvk_private_api.h MVK_PRIVATE_API)
|
||||||
|
string(REGEX MATCH "#define MVK_VERSION_MAJOR [0-9]+" MVK_VERSION_MAJOR_LINE "${MVK_PRIVATE_API}")
|
||||||
|
string(REGEX MATCH "[0-9]+" MVK_VERSION_MAJOR "${MVK_VERSION_MAJOR_LINE}")
|
||||||
|
string(REGEX MATCH "#define MVK_VERSION_MINOR [0-9]+" MVK_VERSION_MINOR_LINE "${MVK_PRIVATE_API}")
|
||||||
|
string(REGEX MATCH "[0-9]+" MVK_VERSION_MINOR "${MVK_VERSION_MINOR_LINE}")
|
||||||
|
string(REGEX MATCH "#define MVK_VERSION_PATCH [0-9]+" MVK_VERSION_PATCH_LINE "${MVK_PRIVATE_API}")
|
||||||
|
string(REGEX MATCH "[0-9]+" MVK_VERSION_PATCH "${MVK_VERSION_PATCH_LINE}")
|
||||||
|
set(MVK_VERSION "${MVK_VERSION_MAJOR}.${MVK_VERSION_MINOR}.${MVK_VERSION_PATCH}")
|
||||||
|
message(STATUS "MoltenVK version: ${MVK_VERSION}")
|
||||||
|
|
||||||
|
# Find required system libraries
|
||||||
|
find_library(APPKIT_LIBRARY AppKit REQUIRED)
|
||||||
|
find_library(FOUNDATION_LIBRARY Foundation REQUIRED)
|
||||||
|
find_library(IOKIT_LIBRARY IOKit REQUIRED)
|
||||||
|
find_library(IOSURFACE_LIBRARY IOSurface REQUIRED)
|
||||||
|
find_library(METAL_LIBRARY Metal REQUIRED)
|
||||||
|
find_library(QUARTZCORE_LIBRARY QuartzCore REQUIRED)
|
||||||
|
|
||||||
|
# cereal
|
||||||
|
option(SKIP_PORTABILITY_TEST "" ON)
|
||||||
|
option(BUILD_DOC "" OFF)
|
||||||
|
option(BUILD_SANDBOX "" OFF)
|
||||||
|
option(SKIP_PERFORMANCE_COMPARISON "" ON)
|
||||||
|
option(SPIRV_CROSS_SKIP_INSTALL "" ON)
|
||||||
|
add_subdirectory(cereal)
|
||||||
|
|
||||||
|
# SPIRV-Cross
|
||||||
|
option(SPIRV_CROSS_CLI "" OFF)
|
||||||
|
option(SPIRV_CROSS_ENABLE_TESTS "" OFF)
|
||||||
|
option(SPIRV_CROSS_ENABLE_HLSL "" OFF)
|
||||||
|
option(SPIRV_CROSS_ENABLE_CPP "" OFF)
|
||||||
|
option(SPIRV_CROSS_SKIP_INSTALL "" ON)
|
||||||
|
add_subdirectory(SPIRV-Cross)
|
||||||
|
|
||||||
|
# Common
|
||||||
|
set(MVK_COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/Common)
|
||||||
|
file(GLOB_RECURSE MVK_COMMON_SOURCES CONFIGURE_DEPENDS
|
||||||
|
${MVK_COMMON_DIR}/*.cpp
|
||||||
|
${MVK_COMMON_DIR}/*.m
|
||||||
|
${MVK_COMMON_DIR}/*.mm)
|
||||||
|
set(MVK_COMMON_INCLUDES ${MVK_COMMON_DIR})
|
||||||
|
|
||||||
|
add_library(MoltenVKCommon STATIC ${MVK_COMMON_SOURCES})
|
||||||
|
target_include_directories(MoltenVKCommon PUBLIC ${MVK_COMMON_INCLUDES})
|
||||||
|
target_compile_options(MoltenVKCommon PRIVATE -w)
|
||||||
|
|
||||||
|
# MoltenVKShaderConverter
|
||||||
|
set(MVK_SHADER_CONVERTER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVKShaderConverter)
|
||||||
|
file(GLOB_RECURSE MVK_SHADER_CONVERTER_SOURCES CONFIGURE_DEPENDS
|
||||||
|
${MVK_SHADER_CONVERTER_DIR}/MoltenVKShaderConverter/*.cpp
|
||||||
|
${MVK_SHADER_CONVERTER_DIR}/MoltenVKShaderConverter/*.m
|
||||||
|
${MVK_SHADER_CONVERTER_DIR}/MoltenVKShaderConverter/*.mm)
|
||||||
|
set(MVK_SHADER_CONVERTER_INCLUDES ${MVK_SHADER_CONVERTER_DIR} ${MVK_SHADER_CONVERTER_DIR}/include)
|
||||||
|
|
||||||
|
add_library(MoltenVKShaderConverter STATIC ${MVK_SHADER_CONVERTER_SOURCES})
|
||||||
|
target_include_directories(MoltenVKShaderConverter PUBLIC ${MVK_SHADER_CONVERTER_INCLUDES})
|
||||||
|
target_compile_options(MoltenVKShaderConverter PRIVATE -w)
|
||||||
|
target_link_libraries(MoltenVKShaderConverter PRIVATE spirv-cross-msl spirv-cross-reflect MoltenVKCommon)
|
||||||
|
target_compile_definitions(MoltenVKShaderConverter PRIVATE MVK_EXCLUDE_SPIRV_TOOLS=1)
|
||||||
|
|
||||||
|
# MoltenVK
|
||||||
|
set(MVK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MoltenVK/MoltenVK)
|
||||||
|
file(GLOB_RECURSE MVK_SOURCES CONFIGURE_DEPENDS
|
||||||
|
${MVK_DIR}/MoltenVK/*.cpp
|
||||||
|
${MVK_DIR}/MoltenVK/*.m
|
||||||
|
${MVK_DIR}/MoltenVK/*.mm)
|
||||||
|
file(GLOB MVK_SRC_INCLUDES LIST_DIRECTORIES ON ${MVK_DIR}/MoltenVK/*)
|
||||||
|
set(MVK_INCLUDES ${MVK_SRC_INCLUDES} ${MVK_GENERATED_INCLUDES} ${MVK_DIR}/include)
|
||||||
|
|
||||||
|
add_library(MoltenVK SHARED ${MVK_SOURCES})
|
||||||
|
target_include_directories(MoltenVK PRIVATE ${MVK_INCLUDES})
|
||||||
|
target_compile_options(MoltenVK PRIVATE -w)
|
||||||
|
target_link_libraries(MoltenVK PRIVATE
|
||||||
|
${APPKIT_LIBRARY} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY} ${IOSURFACE_LIBRARY} ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY}
|
||||||
|
Vulkan::Headers cereal::cereal spirv-cross-msl MoltenVKCommon MoltenVKShaderConverter)
|
||||||
|
target_compile_definitions(MoltenVK PRIVATE MVK_FRAMEWORK_VERSION=${MVK_VERSION} MVK_USE_METAL_PRIVATE_API=1)
|
||||||
1
externals/MoltenVK/MoltenVK
vendored
Submodule
8
externals/MoltenVK/MoltenVK_icd.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"file_format_version": "1.0.0",
|
||||||
|
"ICD": {
|
||||||
|
"library_path": "../../../Frameworks/libMoltenVK.dylib",
|
||||||
|
"api_version": "1.2.0",
|
||||||
|
"is_portability_driver": true
|
||||||
|
}
|
||||||
|
}
|
||||||
1
externals/MoltenVK/SPIRV-Cross
vendored
Submodule
1
externals/MoltenVK/cereal
vendored
Submodule
2
externals/date
vendored
1
externals/dear_imgui
vendored
Submodule
2
externals/ext-boost
vendored
1
externals/ffmpeg-core
vendored
Submodule
2
externals/fmt
vendored
8
externals/gcn/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
project(gcn LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_library(gcn dummy.cpp)
|
||||||
|
|
||||||
|
target_include_directories(gcn INTERFACE include)
|
||||||
2
externals/gcn/dummy.cpp
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
15339
externals/gcn/include/gcn/si_ci_vi_merged_offset.h
vendored
Normal file
117
externals/gcn/include/gcn/si_ci_vi_merged_pm4_it_opcodes.h
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
***********************************************************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-2021 Advanced Micro Devices, Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
**********************************************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef PM4_IT_OPCODES_H
|
||||||
|
#define PM4_IT_OPCODES_H
|
||||||
|
|
||||||
|
enum IT_OpCodeType {
|
||||||
|
IT_NOP = 0x10,
|
||||||
|
IT_SET_BASE = 0x11,
|
||||||
|
IT_CLEAR_STATE = 0x12,
|
||||||
|
IT_INDEX_BUFFER_SIZE = 0x13,
|
||||||
|
IT_DISPATCH_DIRECT = 0x15,
|
||||||
|
IT_DISPATCH_INDIRECT = 0x16,
|
||||||
|
IT_ATOMIC_GDS = 0x1D,
|
||||||
|
IT_ATOMIC = 0x1E,
|
||||||
|
IT_OCCLUSION_QUERY = 0x1F,
|
||||||
|
IT_SET_PREDICATION = 0x20,
|
||||||
|
IT_REG_RMW = 0x21,
|
||||||
|
IT_COND_EXEC = 0x22,
|
||||||
|
IT_PRED_EXEC = 0x23,
|
||||||
|
IT_DRAW_INDIRECT = 0x24,
|
||||||
|
IT_DRAW_INDEX_INDIRECT = 0x25,
|
||||||
|
IT_INDEX_BASE = 0x26,
|
||||||
|
IT_DRAW_INDEX_2 = 0x27,
|
||||||
|
IT_CONTEXT_CONTROL = 0x28,
|
||||||
|
IT_INDEX_TYPE = 0x2A,
|
||||||
|
IT_DRAW_INDIRECT_MULTI = 0x2C,
|
||||||
|
IT_DRAW_INDEX_AUTO = 0x2D,
|
||||||
|
IT_NUM_INSTANCES = 0x2F,
|
||||||
|
IT_DRAW_INDEX_MULTI_AUTO = 0x30,
|
||||||
|
IT_INDIRECT_BUFFER_CNST = 0x33,
|
||||||
|
IT_STRMOUT_BUFFER_UPDATE = 0x34,
|
||||||
|
IT_DRAW_INDEX_OFFSET_2 = 0x35,
|
||||||
|
IT_WRITE_DATA = 0x37,
|
||||||
|
IT_DRAW_INDEX_INDIRECT_MULTI = 0x38,
|
||||||
|
IT_MEM_SEMAPHORE = 0x39,
|
||||||
|
IT_COPY_DW__SI__CI = 0x3B,
|
||||||
|
IT_WAIT_REG_MEM = 0x3C,
|
||||||
|
IT_INDIRECT_BUFFER = 0x3F,
|
||||||
|
IT_COND_INDIRECT_BUFFER = 0x3F,
|
||||||
|
IT_COPY_DATA = 0x40,
|
||||||
|
IT_CP_DMA = 0x41,
|
||||||
|
IT_PFP_SYNC_ME = 0x42,
|
||||||
|
IT_SURFACE_SYNC = 0x43,
|
||||||
|
IT_COND_WRITE = 0x45,
|
||||||
|
IT_EVENT_WRITE = 0x46,
|
||||||
|
IT_EVENT_WRITE_EOP = 0x47,
|
||||||
|
IT_EVENT_WRITE_EOS = 0x48,
|
||||||
|
IT_PREAMBLE_CNTL = 0x4A,
|
||||||
|
IT_CONTEXT_REG_RMW = 0x51,
|
||||||
|
IT_LOAD_SH_REG = 0x5F,
|
||||||
|
IT_LOAD_CONFIG_REG = 0x60,
|
||||||
|
IT_LOAD_CONTEXT_REG = 0x61,
|
||||||
|
IT_SET_CONFIG_REG = 0x68,
|
||||||
|
IT_SET_CONTEXT_REG = 0x69,
|
||||||
|
IT_SET_CONTEXT_REG_INDIRECT = 0x73,
|
||||||
|
IT_SET_SH_REG = 0x76,
|
||||||
|
IT_SET_SH_REG_OFFSET = 0x77,
|
||||||
|
IT_SCRATCH_RAM_WRITE = 0x7D,
|
||||||
|
IT_SCRATCH_RAM_READ = 0x7E,
|
||||||
|
IT_LOAD_CONST_RAM = 0x80,
|
||||||
|
IT_WRITE_CONST_RAM = 0x81,
|
||||||
|
IT_DUMP_CONST_RAM = 0x83,
|
||||||
|
IT_INCREMENT_CE_COUNTER = 0x84,
|
||||||
|
IT_INCREMENT_DE_COUNTER = 0x85,
|
||||||
|
IT_WAIT_ON_CE_COUNTER = 0x86,
|
||||||
|
IT_WAIT_ON_DE_COUNTER__SI = 0x87,
|
||||||
|
IT_WAIT_ON_DE_COUNTER_DIFF = 0x88,
|
||||||
|
IT_SWITCH_BUFFER = 0x8B,
|
||||||
|
IT_DRAW_PREAMBLE__CI__VI = 0x36,
|
||||||
|
IT_RELEASE_MEM__CI__VI = 0x49,
|
||||||
|
IT_DMA_DATA__CI__VI = 0x50,
|
||||||
|
IT_ACQUIRE_MEM__CI__VI = 0x58,
|
||||||
|
IT_REWIND__CI__VI = 0x59,
|
||||||
|
IT_LOAD_UCONFIG_REG__CI__VI = 0x5E,
|
||||||
|
IT_SET_QUEUE_REG__CI__VI = 0x78,
|
||||||
|
IT_SET_UCONFIG_REG__CI__VI = 0x79,
|
||||||
|
IT_INDEX_ATTRIBUTES_INDIRECT__CI__VI = 0x91,
|
||||||
|
IT_SET_SH_REG_INDEX__CI__VI = 0x9B,
|
||||||
|
IT_SET_RESOURCES__CI__VI = 0xA0,
|
||||||
|
IT_MAP_PROCESS__CI__VI = 0xA1,
|
||||||
|
IT_MAP_QUEUES__CI__VI = 0xA2,
|
||||||
|
IT_UNMAP_QUEUES__CI__VI = 0xA3,
|
||||||
|
IT_QUERY_STATUS__CI__VI = 0xA4,
|
||||||
|
IT_RUN_LIST__CI__VI = 0xA5,
|
||||||
|
IT_LOAD_SH_REG_INDEX__VI = 0x63,
|
||||||
|
IT_LOAD_CONTEXT_REG_INDEX__VI = 0x9F,
|
||||||
|
IT_DUMP_CONST_RAM_OFFSET__VI = 0x9E,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define PM4_TYPE_0 0
|
||||||
|
#define PM4_TYPE_2 2
|
||||||
|
#define PM4_TYPE_3 3
|
||||||
|
|
||||||
|
#endif
|
||||||
2
externals/glslang
vendored
1
externals/half
vendored
Submodule
1
externals/libpng
vendored
Submodule
2
externals/magic_enum
vendored
1
externals/pugixml
vendored
Submodule
2
externals/robin-map
vendored
2
externals/sdl3
vendored
2
externals/sirit
vendored
2
externals/toml11
vendored
2
externals/tracy
vendored
2
externals/vma
vendored
2
externals/vulkan-headers
vendored
2
externals/xbyak
vendored
2
externals/xxhash
vendored
2
externals/zydis
vendored
@@ -114108,7 +114108,7 @@ STUB(
|
|||||||
_ZN3sce2Np9CppWebApi6Common12IntrusivePtrINS1_7Matches2V124RequestCompetitiveResultEE7add_refEv)
|
_ZN3sce2Np9CppWebApi6Common12IntrusivePtrINS1_7Matches2V124RequestCompetitiveResultEE7add_refEv)
|
||||||
STUB("efPahl2FufA",
|
STUB("efPahl2FufA",
|
||||||
_ZN3sce2Np9CppWebApi30CommunicationRestrictionStatus2V35Error8fromJsonERKNS_4Json5ValueE)
|
_ZN3sce2Np9CppWebApi30CommunicationRestrictionStatus2V35Error8fromJsonERKNS_4Json5ValueE)
|
||||||
STUB("efX3lrPwdKA", sceAppContentAddcontMountByEntitlemetId)
|
STUB("efX3lrPwdKA", sceAppContentAddcontMountByEntitlementId)
|
||||||
STUB("efXnxYFN5oE", _ZNSt11range_errorD0Ev)
|
STUB("efXnxYFN5oE", _ZNSt11range_errorD0Ev)
|
||||||
STUB("efcwuDLsAM0", _ZThn120_NK7WebCore16HTMLMediaElement5mutedEv)
|
STUB("efcwuDLsAM0", _ZThn120_NK7WebCore16HTMLMediaElement5mutedEv)
|
||||||
STUB("efhGArzWdxE", _ZN7bmalloc6IsoTLS15s_didInitializeE)
|
STUB("efhGArzWdxE", _ZN7bmalloc6IsoTLS15s_didInitializeE)
|
||||||
@@ -129493,7 +129493,7 @@ STUB(
|
|||||||
STUB("kJlYH5uMAWI", sceNetResolverDestroy)
|
STUB("kJlYH5uMAWI", sceNetResolverDestroy)
|
||||||
STUB("kJmdxo4uM+8",
|
STUB("kJmdxo4uM+8",
|
||||||
_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo)
|
_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo)
|
||||||
STUB("kJmjt81mXKQ", sceAppContentAddcontEnqueueDownloadByEntitlemetId)
|
STUB("kJmjt81mXKQ", sceAppContentAddcontEnqueueDownloadByEntitlementId)
|
||||||
STUB(
|
STUB(
|
||||||
"kJoY9lMIFzY",
|
"kJoY9lMIFzY",
|
||||||
_ZN3sce2Np9CppWebApi6Common8IteratorINS2_12IntrusivePtrINS1_21AdvancedPlayerProfile2V138MatchCompletionRateDisconnectedMetricsEEEEmmEi)
|
_ZN3sce2Np9CppWebApi6Common8IteratorINS2_12IntrusivePtrINS1_21AdvancedPlayerProfile2V138MatchCompletionRateDisconnectedMetricsEEEEmmEi)
|
||||||
|
|||||||
52
scripts/file_formats/sfo.hexpat
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
import std.io;
|
||||||
|
import std.sys;
|
||||||
|
|
||||||
|
struct Header {
|
||||||
|
u32 magic;
|
||||||
|
u32 version;
|
||||||
|
u32 key_table_offset;
|
||||||
|
u32 data_table_offset;
|
||||||
|
u32 index_table_entries;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct KeyEntry {
|
||||||
|
char name[];
|
||||||
|
} [[inline]];
|
||||||
|
|
||||||
|
struct DataEntry<auto fmt, auto size> {
|
||||||
|
if (fmt == 0x0404) {
|
||||||
|
u32 int_value;
|
||||||
|
} else if(fmt == 0x0004) {
|
||||||
|
char bin_value[size];
|
||||||
|
} else if(fmt == 0x0204) {
|
||||||
|
char str_value[size];
|
||||||
|
} else {
|
||||||
|
std::warning("unknown fmt type");
|
||||||
|
}
|
||||||
|
} [[inline]];
|
||||||
|
|
||||||
|
struct IndexEntry {
|
||||||
|
u16 key_offset;
|
||||||
|
u16 param_fmt;
|
||||||
|
u32 param_len;
|
||||||
|
u32 param_max_len;
|
||||||
|
u32 data_offset;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Entry<auto KeyTableOffset, auto DataTableOffset> {
|
||||||
|
u64 begin = $;
|
||||||
|
IndexEntry index;
|
||||||
|
KeyEntry key @ KeyTableOffset + index.key_offset;
|
||||||
|
DataEntry<index.param_fmt, index.param_len> data @ DataTableOffset + index.data_offset;
|
||||||
|
u8 data_empty[index.param_max_len - index.param_len] @ DataTableOffset + index.data_offset + index.param_len;
|
||||||
|
$ = begin + sizeof(IndexEntry);
|
||||||
|
};
|
||||||
|
|
||||||
|
Header header @ 0;
|
||||||
|
std::assert(header.magic == 0x46535000, "Miss match magic");
|
||||||
|
std::assert(header.version == 0x00000101, "Miss match version");
|
||||||
|
|
||||||
|
Entry<header.key_table_offset, header.data_table_offset> list[header.index_table_entries] @ 0x14;
|
||||||
@@ -80897,10 +80897,10 @@ sceAppCheckerExecute
|
|||||||
sceAppCheckerExecuteEx
|
sceAppCheckerExecuteEx
|
||||||
sceAppContentAddcontDelete
|
sceAppContentAddcontDelete
|
||||||
sceAppContentAddcontEnqueueDownload
|
sceAppContentAddcontEnqueueDownload
|
||||||
sceAppContentAddcontEnqueueDownloadByEntitlemetId
|
sceAppContentAddcontEnqueueDownloadByEntitlementId
|
||||||
sceAppContentAddcontEnqueueDownloadSp
|
sceAppContentAddcontEnqueueDownloadSp
|
||||||
sceAppContentAddcontMount
|
sceAppContentAddcontMount
|
||||||
sceAppContentAddcontMountByEntitlemetId
|
sceAppContentAddcontMountByEntitlementId
|
||||||
sceAppContentAddcontShrink
|
sceAppContentAddcontShrink
|
||||||
sceAppContentAddcontUnmount
|
sceAppContentAddcontUnmount
|
||||||
sceAppContentAppParamGetInt
|
sceAppContentAppParamGetInt
|
||||||
|
|||||||
@@ -1,158 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#include <SDL3/SDL_audio.h>
|
|
||||||
#include <SDL3/SDL_init.h>
|
|
||||||
#include <SDL3/SDL_timer.h>
|
|
||||||
#include "common/assert.h"
|
|
||||||
#include "core/libraries/error_codes.h"
|
|
||||||
#include "sdl_audio.h"
|
|
||||||
|
|
||||||
namespace Audio {
|
|
||||||
|
|
||||||
int SDLAudio::AudioOutOpen(int type, u32 samples_num, u32 freq,
|
|
||||||
Libraries::AudioOut::OrbisAudioOutParamFormat format) {
|
|
||||||
using Libraries::AudioOut::OrbisAudioOutParamFormat;
|
|
||||||
std::scoped_lock lock{m_mutex};
|
|
||||||
for (int id = 0; id < portsOut.size(); id++) {
|
|
||||||
auto& port = portsOut[id];
|
|
||||||
if (!port.isOpen) {
|
|
||||||
port.isOpen = true;
|
|
||||||
port.type = type;
|
|
||||||
port.samples_num = samples_num;
|
|
||||||
port.freq = freq;
|
|
||||||
port.format = format;
|
|
||||||
SDL_AudioFormat sampleFormat;
|
|
||||||
switch (format) {
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_MONO:
|
|
||||||
sampleFormat = SDL_AUDIO_S16;
|
|
||||||
port.channels_num = 1;
|
|
||||||
port.sample_size = 2;
|
|
||||||
break;
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_MONO:
|
|
||||||
sampleFormat = SDL_AUDIO_F32;
|
|
||||||
port.channels_num = 1;
|
|
||||||
port.sample_size = 4;
|
|
||||||
break;
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_STEREO:
|
|
||||||
sampleFormat = SDL_AUDIO_S16;
|
|
||||||
port.channels_num = 2;
|
|
||||||
port.sample_size = 2;
|
|
||||||
break;
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_STEREO:
|
|
||||||
sampleFormat = SDL_AUDIO_F32;
|
|
||||||
port.channels_num = 2;
|
|
||||||
port.sample_size = 4;
|
|
||||||
break;
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_8CH:
|
|
||||||
sampleFormat = SDL_AUDIO_S16;
|
|
||||||
port.channels_num = 8;
|
|
||||||
port.sample_size = 2;
|
|
||||||
break;
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_8CH:
|
|
||||||
sampleFormat = SDL_AUDIO_F32;
|
|
||||||
port.channels_num = 8;
|
|
||||||
port.sample_size = 4;
|
|
||||||
break;
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_8CH_STD:
|
|
||||||
sampleFormat = SDL_AUDIO_S16;
|
|
||||||
port.channels_num = 8;
|
|
||||||
port.sample_size = 2;
|
|
||||||
break;
|
|
||||||
case OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_8CH_STD:
|
|
||||||
sampleFormat = SDL_AUDIO_F32;
|
|
||||||
port.channels_num = 8;
|
|
||||||
port.sample_size = 4;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
UNREACHABLE_MSG("Unknown format");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < port.channels_num; i++) {
|
|
||||||
port.volume[i] = Libraries::AudioOut::SCE_AUDIO_OUT_VOLUME_0DB;
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_AudioSpec fmt;
|
|
||||||
SDL_zero(fmt);
|
|
||||||
fmt.format = sampleFormat;
|
|
||||||
fmt.channels = port.channels_num;
|
|
||||||
fmt.freq = 48000;
|
|
||||||
port.stream =
|
|
||||||
SDL_OpenAudioDeviceStream(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &fmt, NULL, NULL);
|
|
||||||
SDL_ResumeAudioDevice(SDL_GetAudioStreamDevice(port.stream));
|
|
||||||
return id + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1; // all ports are used
|
|
||||||
}
|
|
||||||
|
|
||||||
s32 SDLAudio::AudioOutOutput(s32 handle, const void* ptr) {
|
|
||||||
std::scoped_lock lock{m_mutex};
|
|
||||||
auto& port = portsOut[handle - 1];
|
|
||||||
if (!port.isOpen) {
|
|
||||||
return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT;
|
|
||||||
}
|
|
||||||
if (ptr == nullptr) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
// TODO mixing channels
|
|
||||||
int result = SDL_PutAudioStreamData(port.stream, ptr,
|
|
||||||
port.samples_num * port.sample_size * port.channels_num);
|
|
||||||
// TODO find a correct value 8192 is estimated
|
|
||||||
while (SDL_GetAudioStreamAvailable(port.stream) > 8192) {
|
|
||||||
SDL_Delay(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDLAudio::AudioOutSetVolume(s32 handle, s32 bitflag, s32* volume) {
|
|
||||||
using Libraries::AudioOut::OrbisAudioOutParamFormat;
|
|
||||||
std::scoped_lock lock{m_mutex};
|
|
||||||
auto& port = portsOut[handle - 1];
|
|
||||||
if (!port.isOpen) {
|
|
||||||
return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < port.channels_num; i++, bitflag >>= 1u) {
|
|
||||||
auto bit = bitflag & 0x1u;
|
|
||||||
|
|
||||||
if (bit == 1) {
|
|
||||||
int src_index = i;
|
|
||||||
if (port.format ==
|
|
||||||
OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_FLOAT_8CH_STD ||
|
|
||||||
port.format == OrbisAudioOutParamFormat::ORBIS_AUDIO_OUT_PARAM_FORMAT_S16_8CH_STD) {
|
|
||||||
switch (i) {
|
|
||||||
case 4:
|
|
||||||
src_index = 6;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
src_index = 7;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
src_index = 4;
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
src_index = 5;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
port.volume[i] = volume[src_index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SDLAudio::AudioOutGetStatus(s32 handle, int* type, int* channels_num) {
|
|
||||||
std::scoped_lock lock{m_mutex};
|
|
||||||
auto& port = portsOut[handle - 1];
|
|
||||||
*type = port.type;
|
|
||||||
*channels_num = port.channels_num;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Audio
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <mutex>
|
|
||||||
#include <SDL3/SDL_audio.h>
|
|
||||||
#include "core/libraries/audio/audioout.h"
|
|
||||||
|
|
||||||
namespace Audio {
|
|
||||||
|
|
||||||
class SDLAudio {
|
|
||||||
public:
|
|
||||||
SDLAudio() = default;
|
|
||||||
virtual ~SDLAudio() = default;
|
|
||||||
|
|
||||||
int AudioOutOpen(int type, u32 samples_num, u32 freq,
|
|
||||||
Libraries::AudioOut::OrbisAudioOutParamFormat format);
|
|
||||||
s32 AudioOutOutput(s32 handle, const void* ptr);
|
|
||||||
bool AudioOutSetVolume(s32 handle, s32 bitflag, s32* volume);
|
|
||||||
bool AudioOutGetStatus(s32 handle, int* type, int* channels_num);
|
|
||||||
|
|
||||||
private:
|
|
||||||
struct PortOut {
|
|
||||||
bool isOpen = false;
|
|
||||||
int type = 0;
|
|
||||||
u32 samples_num = 0;
|
|
||||||
u8 sample_size = 0;
|
|
||||||
u32 freq = 0;
|
|
||||||
u32 format = -1;
|
|
||||||
int channels_num = 0;
|
|
||||||
int volume[8] = {};
|
|
||||||
SDL_AudioStream* stream = nullptr;
|
|
||||||
};
|
|
||||||
std::mutex m_mutex;
|
|
||||||
std::array<PortOut, 22> portsOut; // main up to 8 ports , BGM 1 port , voice up to 4 ports ,
|
|
||||||
// personal up to 4 ports , padspk up to 5 ports , aux 1 port
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Audio
|
|
||||||
@@ -22,10 +22,28 @@ template <typename T>
|
|||||||
return static_cast<T>(value - value % size);
|
return static_cast<T>(value - value % size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
requires std::is_integral_v<T>
|
||||||
|
[[nodiscard]] constexpr bool IsAligned(T value, std::size_t alignment) {
|
||||||
|
return (value & (alignment - 1)) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
requires std::is_integral_v<T>
|
requires std::is_integral_v<T>
|
||||||
[[nodiscard]] constexpr bool Is16KBAligned(T value) {
|
[[nodiscard]] constexpr bool Is16KBAligned(T value) {
|
||||||
return (value & 0x3FFF) == 0;
|
return (value & 0x3FFF) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
requires std::is_integral_v<T>
|
||||||
|
[[nodiscard]] constexpr bool Is64KBAligned(T value) {
|
||||||
|
return (value & 0xFFFF) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
requires std::is_integral_v<T>
|
||||||
|
[[nodiscard]] constexpr bool Is2MBAligned(T value) {
|
||||||
|
return (value & 0x1FFFFF) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|||||||
10
src/common/arch.h
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(__x86_64__) || defined(_M_X64)
|
||||||
|
#define ARCH_X86_64 1
|
||||||
|
#elif defined(__aarch64__) || defined(_M_ARM64)
|
||||||
|
#define ARCH_ARM64 1
|
||||||
|
#endif
|
||||||
@@ -1,10 +1,17 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/arch.h"
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/logging/backend.h"
|
#include "common/logging/backend.h"
|
||||||
|
|
||||||
|
#if defined(ARCH_X86_64)
|
||||||
#define Crash() __asm__ __volatile__("int $3")
|
#define Crash() __asm__ __volatile__("int $3")
|
||||||
|
#elif defined(ARCH_ARM64)
|
||||||
|
#define Crash() __asm__ __volatile__("brk 0")
|
||||||
|
#else
|
||||||
|
#error "Missing Crash() implementation for target CPU architecture."
|
||||||
|
#endif
|
||||||
|
|
||||||
void assert_fail_impl() {
|
void assert_fail_impl() {
|
||||||
Common::Log::Stop();
|
Common::Log::Stop();
|
||||||
@@ -18,3 +25,8 @@ void assert_fail_impl() {
|
|||||||
Crash();
|
Crash();
|
||||||
throw std::runtime_error("Unreachable code");
|
throw std::runtime_error("Unreachable code");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void assert_fail_debug_msg(const char* msg) {
|
||||||
|
LOG_CRITICAL(Debug, "Assertion Failed!\n{}", msg);
|
||||||
|
assert_fail_impl();
|
||||||
|
}
|
||||||
|
|||||||
@@ -81,7 +81,9 @@
|
|||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
template <std::size_t Position, std::size_t Bits, typename T>
|
template <std::size_t Position, std::size_t Bits, typename T>
|
||||||
struct BitField {
|
struct BitField {
|
||||||
private:
|
|
||||||
|
using Type = T;
|
||||||
|
|
||||||
// UnderlyingType is T for non-enum types and the underlying type of T if
|
// UnderlyingType is T for non-enum types and the underlying type of T if
|
||||||
// T is an enumeration. Note that T is wrapped within an enable_if in the
|
// T is an enumeration. Note that T is wrapped within an enable_if in the
|
||||||
// former case to workaround compile errors which arise when using
|
// former case to workaround compile errors which arise when using
|
||||||
@@ -92,7 +94,6 @@ private:
|
|||||||
// We store the value as the unsigned type to avoid undefined behaviour on value shifting
|
// We store the value as the unsigned type to avoid undefined behaviour on value shifting
|
||||||
using StorageType = std::make_unsigned_t<UnderlyingType>;
|
using StorageType = std::make_unsigned_t<UnderlyingType>;
|
||||||
|
|
||||||
public:
|
|
||||||
/// Constants to allow limited introspection of fields if needed
|
/// Constants to allow limited introspection of fields if needed
|
||||||
static constexpr std::size_t position = Position;
|
static constexpr std::size_t position = Position;
|
||||||
static constexpr std::size_t bits = Bits;
|
static constexpr std::size_t bits = Bits;
|
||||||
|
|||||||
@@ -4,33 +4,73 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
|
#include <fmt/xchar.h> // for wstring support
|
||||||
#include <toml.hpp>
|
#include <toml.hpp>
|
||||||
|
|
||||||
|
#include "common/path_util.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "logging/formatter.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
namespace toml {
|
||||||
|
template <typename TC, typename K>
|
||||||
|
std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
|
||||||
|
std::filesystem::path opt) {
|
||||||
|
try {
|
||||||
|
auto str = find<std::string>(v, ky);
|
||||||
|
if (str.empty()) {
|
||||||
|
return opt;
|
||||||
|
}
|
||||||
|
std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};
|
||||||
|
return std::filesystem::path{u8str};
|
||||||
|
} catch (...) {
|
||||||
|
return opt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // namespace toml
|
||||||
|
|
||||||
namespace Config {
|
namespace Config {
|
||||||
|
|
||||||
static bool isNeo = false;
|
static bool isNeo = false;
|
||||||
static bool isFullscreen = false;
|
static bool isFullscreen = false;
|
||||||
|
static bool playBGM = false;
|
||||||
|
static bool isTrophyPopupDisabled = false;
|
||||||
|
static int BGMvolume = 50;
|
||||||
|
static bool enableDiscordRPC = false;
|
||||||
static u32 screenWidth = 1280;
|
static u32 screenWidth = 1280;
|
||||||
static u32 screenHeight = 720;
|
static u32 screenHeight = 720;
|
||||||
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
|
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
|
||||||
static std::string logFilter;
|
static std::string logFilter;
|
||||||
static std::string logType = "async";
|
static std::string logType = "async";
|
||||||
static std::string userName = "shadPS4";
|
static std::string userName = "shadPS4";
|
||||||
|
static std::string updateChannel;
|
||||||
|
static std::string backButtonBehavior = "left";
|
||||||
|
static bool useSpecialPad = false;
|
||||||
|
static int specialPadClass = 1;
|
||||||
static bool isDebugDump = false;
|
static bool isDebugDump = false;
|
||||||
static bool isLibc = true;
|
static bool isShaderDebug = false;
|
||||||
static bool isShowSplash = false;
|
static bool isShowSplash = false;
|
||||||
|
static bool isAutoUpdate = false;
|
||||||
static bool isNullGpu = false;
|
static bool isNullGpu = false;
|
||||||
|
static bool shouldCopyGPUBuffers = false;
|
||||||
static bool shouldDumpShaders = false;
|
static bool shouldDumpShaders = false;
|
||||||
static bool shouldDumpPM4 = false;
|
static bool shouldPatchShaders = true;
|
||||||
static u32 vblankDivider = 1;
|
static u32 vblankDivider = 1;
|
||||||
static bool vkValidation = false;
|
static bool vkValidation = false;
|
||||||
static bool vkValidationSync = false;
|
static bool vkValidationSync = false;
|
||||||
static bool vkValidationGpu = false;
|
static bool vkValidationGpu = false;
|
||||||
static bool rdocEnable = false;
|
static bool rdocEnable = false;
|
||||||
static bool rdocMarkersEnable = false;
|
static bool vkMarkers = false;
|
||||||
|
static bool vkCrashDiagnostic = false;
|
||||||
|
static s16 cursorState = HideCursorState::Idle;
|
||||||
|
static int cursorHideTimeout = 5; // 5 seconds (default)
|
||||||
|
static bool separateupdatefolder = false;
|
||||||
|
static bool compatibilityData = false;
|
||||||
|
static bool checkCompatibilityOnStartup = false;
|
||||||
|
|
||||||
// Gui
|
// Gui
|
||||||
std::string settings_install_dir = "";
|
std::vector<std::filesystem::path> settings_install_dirs = {};
|
||||||
|
std::filesystem::path settings_addon_install_dir = {};
|
||||||
u32 main_window_geometry_x = 400;
|
u32 main_window_geometry_x = 400;
|
||||||
u32 main_window_geometry_y = 400;
|
u32 main_window_geometry_y = 400;
|
||||||
u32 main_window_geometry_w = 1280;
|
u32 main_window_geometry_w = 1280;
|
||||||
@@ -46,12 +86,10 @@ u32 m_window_size_H = 720;
|
|||||||
std::vector<std::string> m_pkg_viewer;
|
std::vector<std::string> m_pkg_viewer;
|
||||||
std::vector<std::string> m_elf_viewer;
|
std::vector<std::string> m_elf_viewer;
|
||||||
std::vector<std::string> m_recent_files;
|
std::vector<std::string> m_recent_files;
|
||||||
// Settings
|
std::string emulator_language = "en";
|
||||||
u32 m_language = 1; // english
|
|
||||||
|
|
||||||
bool isLleLibc() {
|
// Language
|
||||||
return isLibc;
|
u32 m_language = 1; // english
|
||||||
}
|
|
||||||
|
|
||||||
bool isNeoMode() {
|
bool isNeoMode() {
|
||||||
return isNeo;
|
return isNeo;
|
||||||
@@ -61,6 +99,30 @@ bool isFullscreenMode() {
|
|||||||
return isFullscreen;
|
return isFullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool getisTrophyPopupDisabled() {
|
||||||
|
return isTrophyPopupDisabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getPlayBGM() {
|
||||||
|
return playBGM;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getBGMvolume() {
|
||||||
|
return BGMvolume;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getEnableDiscordRPC() {
|
||||||
|
return enableDiscordRPC;
|
||||||
|
}
|
||||||
|
|
||||||
|
s16 getCursorState() {
|
||||||
|
return cursorState;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getCursorHideTimeout() {
|
||||||
|
return cursorHideTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
u32 getScreenWidth() {
|
u32 getScreenWidth() {
|
||||||
return screenWidth;
|
return screenWidth;
|
||||||
}
|
}
|
||||||
@@ -85,24 +147,52 @@ std::string getUserName() {
|
|||||||
return userName;
|
return userName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getUpdateChannel() {
|
||||||
|
return updateChannel;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string getBackButtonBehavior() {
|
||||||
|
return backButtonBehavior;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getUseSpecialPad() {
|
||||||
|
return useSpecialPad;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getSpecialPadClass() {
|
||||||
|
return specialPadClass;
|
||||||
|
}
|
||||||
|
|
||||||
bool debugDump() {
|
bool debugDump() {
|
||||||
return isDebugDump;
|
return isDebugDump;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool collectShadersForDebug() {
|
||||||
|
return isShaderDebug;
|
||||||
|
}
|
||||||
|
|
||||||
bool showSplash() {
|
bool showSplash() {
|
||||||
return isShowSplash;
|
return isShowSplash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool autoUpdate() {
|
||||||
|
return isAutoUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
bool nullGpu() {
|
bool nullGpu() {
|
||||||
return isNullGpu;
|
return isNullGpu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool copyGPUCmdBuffers() {
|
||||||
|
return shouldCopyGPUBuffers;
|
||||||
|
}
|
||||||
|
|
||||||
bool dumpShaders() {
|
bool dumpShaders() {
|
||||||
return shouldDumpShaders;
|
return shouldDumpShaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dumpPM4() {
|
bool patchShaders() {
|
||||||
return shouldDumpPM4;
|
return shouldPatchShaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isRdocEnabled() {
|
bool isRdocEnabled() {
|
||||||
@@ -110,7 +200,7 @@ bool isRdocEnabled() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isMarkersEnabled() {
|
bool isMarkersEnabled() {
|
||||||
return rdocMarkersEnable;
|
return vkMarkers;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 vblankDiv() {
|
u32 vblankDiv() {
|
||||||
@@ -129,6 +219,26 @@ bool vkValidationGpuEnabled() {
|
|||||||
return vkValidationGpu;
|
return vkValidationGpu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool vkMarkersEnabled() {
|
||||||
|
return vkMarkers || vkCrashDiagnostic; // Crash diagnostic forces markers on
|
||||||
|
}
|
||||||
|
|
||||||
|
bool vkCrashDiagnosticEnabled() {
|
||||||
|
return vkCrashDiagnostic;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getSeparateUpdateEnabled() {
|
||||||
|
return separateupdatefolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getCompatibilityEnabled() {
|
||||||
|
return compatibilityData;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getCheckCompatibilityOnStartup() {
|
||||||
|
return checkCompatibilityOnStartup;
|
||||||
|
}
|
||||||
|
|
||||||
void setGpuId(s32 selectedGpuId) {
|
void setGpuId(s32 selectedGpuId) {
|
||||||
gpuId = selectedGpuId;
|
gpuId = selectedGpuId;
|
||||||
}
|
}
|
||||||
@@ -145,20 +255,28 @@ void setDebugDump(bool enable) {
|
|||||||
isDebugDump = enable;
|
isDebugDump = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setCollectShaderForDebug(bool enable) {
|
||||||
|
isShaderDebug = enable;
|
||||||
|
}
|
||||||
|
|
||||||
void setShowSplash(bool enable) {
|
void setShowSplash(bool enable) {
|
||||||
isShowSplash = enable;
|
isShowSplash = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setAutoUpdate(bool enable) {
|
||||||
|
isAutoUpdate = enable;
|
||||||
|
}
|
||||||
|
|
||||||
void setNullGpu(bool enable) {
|
void setNullGpu(bool enable) {
|
||||||
isNullGpu = enable;
|
isNullGpu = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDumpShaders(bool enable) {
|
void setCopyGPUCmdBuffers(bool enable) {
|
||||||
shouldDumpShaders = enable;
|
shouldCopyGPUBuffers = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDumpPM4(bool enable) {
|
void setDumpShaders(bool enable) {
|
||||||
shouldDumpPM4 = enable;
|
shouldDumpShaders = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setVkValidation(bool enable) {
|
void setVkValidation(bool enable) {
|
||||||
@@ -181,6 +299,30 @@ void setFullscreenMode(bool enable) {
|
|||||||
isFullscreen = enable;
|
isFullscreen = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setisTrophyPopupDisabled(bool disable) {
|
||||||
|
isTrophyPopupDisabled = disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setPlayBGM(bool enable) {
|
||||||
|
playBGM = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setBGMvolume(int volume) {
|
||||||
|
BGMvolume = volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setEnableDiscordRPC(bool enable) {
|
||||||
|
enableDiscordRPC = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCursorState(s16 newCursorState) {
|
||||||
|
cursorState = newCursorState;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCursorHideTimeout(int newcursorHideTimeout) {
|
||||||
|
cursorHideTimeout = newcursorHideTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
void setLanguage(u32 language) {
|
void setLanguage(u32 language) {
|
||||||
m_language = language;
|
m_language = language;
|
||||||
}
|
}
|
||||||
@@ -189,116 +331,208 @@ void setNeoMode(bool enable) {
|
|||||||
isNeo = enable;
|
isNeo = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLogType(std::string type) {
|
void setLogType(const std::string& type) {
|
||||||
logType = type;
|
logType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLogFilter(std::string type) {
|
void setLogFilter(const std::string& type) {
|
||||||
logFilter = type;
|
logFilter = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setUserName(std::string type) {
|
void setUserName(const std::string& type) {
|
||||||
userName = type;
|
userName = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setUpdateChannel(const std::string& type) {
|
||||||
|
updateChannel = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setBackButtonBehavior(const std::string& type) {
|
||||||
|
backButtonBehavior = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setUseSpecialPad(bool use) {
|
||||||
|
useSpecialPad = use;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setSpecialPadClass(int type) {
|
||||||
|
specialPadClass = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setSeparateUpdateEnabled(bool use) {
|
||||||
|
separateupdatefolder = use;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCompatibilityEnabled(bool use) {
|
||||||
|
compatibilityData = use;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCheckCompatibilityOnStartup(bool use) {
|
||||||
|
checkCompatibilityOnStartup = use;
|
||||||
|
}
|
||||||
|
|
||||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) {
|
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) {
|
||||||
main_window_geometry_x = x;
|
main_window_geometry_x = x;
|
||||||
main_window_geometry_y = y;
|
main_window_geometry_y = y;
|
||||||
main_window_geometry_w = w;
|
main_window_geometry_w = w;
|
||||||
main_window_geometry_h = h;
|
main_window_geometry_h = h;
|
||||||
}
|
}
|
||||||
void setGameInstallDir(const std::string& dir) {
|
|
||||||
settings_install_dir = dir;
|
bool addGameInstallDir(const std::filesystem::path& dir) {
|
||||||
|
if (std::find(settings_install_dirs.begin(), settings_install_dirs.end(), dir) ==
|
||||||
|
settings_install_dirs.end()) {
|
||||||
|
settings_install_dirs.push_back(dir);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeGameInstallDir(const std::filesystem::path& dir) {
|
||||||
|
auto iterator = std::find(settings_install_dirs.begin(), settings_install_dirs.end(), dir);
|
||||||
|
if (iterator != settings_install_dirs.end()) {
|
||||||
|
settings_install_dirs.erase(iterator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setAddonInstallDir(const std::filesystem::path& dir) {
|
||||||
|
settings_addon_install_dir = dir;
|
||||||
|
}
|
||||||
|
|
||||||
void setMainWindowTheme(u32 theme) {
|
void setMainWindowTheme(u32 theme) {
|
||||||
mw_themes = theme;
|
mw_themes = theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setIconSize(u32 size) {
|
void setIconSize(u32 size) {
|
||||||
m_icon_size = size;
|
m_icon_size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setIconSizeGrid(u32 size) {
|
void setIconSizeGrid(u32 size) {
|
||||||
m_icon_size_grid = size;
|
m_icon_size_grid = size;
|
||||||
}
|
}
|
||||||
void setSliderPositon(u32 pos) {
|
|
||||||
|
void setSliderPosition(u32 pos) {
|
||||||
m_slider_pos = pos;
|
m_slider_pos = pos;
|
||||||
}
|
}
|
||||||
void setSliderPositonGrid(u32 pos) {
|
|
||||||
|
void setSliderPositionGrid(u32 pos) {
|
||||||
m_slider_pos_grid = pos;
|
m_slider_pos_grid = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setTableMode(u32 mode) {
|
void setTableMode(u32 mode) {
|
||||||
m_table_mode = mode;
|
m_table_mode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMainWindowWidth(u32 width) {
|
void setMainWindowWidth(u32 width) {
|
||||||
m_window_size_W = width;
|
m_window_size_W = width;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMainWindowHeight(u32 height) {
|
void setMainWindowHeight(u32 height) {
|
||||||
m_window_size_H = height;
|
m_window_size_H = height;
|
||||||
}
|
}
|
||||||
void setPkgViewer(std::vector<std::string> pkgList) {
|
|
||||||
|
void setPkgViewer(const std::vector<std::string>& pkgList) {
|
||||||
m_pkg_viewer.resize(pkgList.size());
|
m_pkg_viewer.resize(pkgList.size());
|
||||||
m_pkg_viewer = pkgList;
|
m_pkg_viewer = pkgList;
|
||||||
}
|
}
|
||||||
void setElfViewer(std::vector<std::string> elfList) {
|
|
||||||
|
void setElfViewer(const std::vector<std::string>& elfList) {
|
||||||
m_elf_viewer.resize(elfList.size());
|
m_elf_viewer.resize(elfList.size());
|
||||||
m_elf_viewer = elfList;
|
m_elf_viewer = elfList;
|
||||||
}
|
}
|
||||||
void setRecentFiles(std::vector<std::string> recentFiles) {
|
|
||||||
|
void setRecentFiles(const std::vector<std::string>& recentFiles) {
|
||||||
m_recent_files.resize(recentFiles.size());
|
m_recent_files.resize(recentFiles.size());
|
||||||
m_recent_files = recentFiles;
|
m_recent_files = recentFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setEmulatorLanguage(std::string language) {
|
||||||
|
emulator_language = language;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setGameInstallDirs(const std::vector<std::filesystem::path>& settings_install_dirs_config) {
|
||||||
|
settings_install_dirs = settings_install_dirs_config;
|
||||||
|
}
|
||||||
|
|
||||||
u32 getMainWindowGeometryX() {
|
u32 getMainWindowGeometryX() {
|
||||||
return main_window_geometry_x;
|
return main_window_geometry_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getMainWindowGeometryY() {
|
u32 getMainWindowGeometryY() {
|
||||||
return main_window_geometry_y;
|
return main_window_geometry_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getMainWindowGeometryW() {
|
u32 getMainWindowGeometryW() {
|
||||||
return main_window_geometry_w;
|
return main_window_geometry_w;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getMainWindowGeometryH() {
|
u32 getMainWindowGeometryH() {
|
||||||
return main_window_geometry_h;
|
return main_window_geometry_h;
|
||||||
}
|
}
|
||||||
std::string getGameInstallDir() {
|
|
||||||
return settings_install_dir;
|
const std::vector<std::filesystem::path>& getGameInstallDirs() {
|
||||||
|
return settings_install_dirs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::filesystem::path getAddonInstallDir() {
|
||||||
|
if (settings_addon_install_dir.empty()) {
|
||||||
|
// Default for users without a config file or a config file from before this option existed
|
||||||
|
return Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "addcont";
|
||||||
|
}
|
||||||
|
return settings_addon_install_dir;
|
||||||
|
}
|
||||||
|
|
||||||
u32 getMainWindowTheme() {
|
u32 getMainWindowTheme() {
|
||||||
return mw_themes;
|
return mw_themes;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getIconSize() {
|
u32 getIconSize() {
|
||||||
return m_icon_size;
|
return m_icon_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getIconSizeGrid() {
|
u32 getIconSizeGrid() {
|
||||||
return m_icon_size_grid;
|
return m_icon_size_grid;
|
||||||
}
|
}
|
||||||
u32 getSliderPositon() {
|
|
||||||
|
u32 getSliderPosition() {
|
||||||
return m_slider_pos;
|
return m_slider_pos;
|
||||||
}
|
}
|
||||||
u32 getSliderPositonGrid() {
|
|
||||||
|
u32 getSliderPositionGrid() {
|
||||||
return m_slider_pos_grid;
|
return m_slider_pos_grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getTableMode() {
|
u32 getTableMode() {
|
||||||
return m_table_mode;
|
return m_table_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getMainWindowWidth() {
|
u32 getMainWindowWidth() {
|
||||||
return m_window_size_W;
|
return m_window_size_W;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 getMainWindowHeight() {
|
u32 getMainWindowHeight() {
|
||||||
return m_window_size_H;
|
return m_window_size_H;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> getPkgViewer() {
|
std::vector<std::string> getPkgViewer() {
|
||||||
return m_pkg_viewer;
|
return m_pkg_viewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> getElfViewer() {
|
std::vector<std::string> getElfViewer() {
|
||||||
return m_elf_viewer;
|
return m_elf_viewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> getRecentFiles() {
|
std::vector<std::string> getRecentFiles() {
|
||||||
return m_recent_files;
|
return m_recent_files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getEmulatorLanguage() {
|
||||||
|
return emulator_language;
|
||||||
|
}
|
||||||
|
|
||||||
u32 GetLanguage() {
|
u32 GetLanguage() {
|
||||||
return m_language;
|
return m_language;
|
||||||
}
|
}
|
||||||
|
|
||||||
void load(const std::filesystem::path& path) {
|
void load(const std::filesystem::path& path) {
|
||||||
// If the configuration file does not exist, create it and return
|
// If the configuration file does not exist, create it and return
|
||||||
std::error_code error;
|
std::error_code error;
|
||||||
@@ -310,7 +544,10 @@ void load(const std::filesystem::path& path) {
|
|||||||
toml::value data;
|
toml::value data;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
data = toml::parse(path);
|
std::ifstream ifs;
|
||||||
|
ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
ifs.open(path, std::ios_base::binary);
|
||||||
|
data = toml::parse(ifs, std::string{fmt::UTF(path.filename().u8string()).data});
|
||||||
} catch (std::exception& ex) {
|
} catch (std::exception& ex) {
|
||||||
fmt::print("Got exception trying to load config file. Exception: {}\n", ex.what());
|
fmt::print("Got exception trying to load config file. Exception: {}\n", ex.what());
|
||||||
return;
|
return;
|
||||||
@@ -320,10 +557,34 @@ void load(const std::filesystem::path& path) {
|
|||||||
|
|
||||||
isNeo = toml::find_or<bool>(general, "isPS4Pro", false);
|
isNeo = toml::find_or<bool>(general, "isPS4Pro", false);
|
||||||
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
|
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
|
||||||
|
playBGM = toml::find_or<bool>(general, "playBGM", false);
|
||||||
|
isTrophyPopupDisabled = toml::find_or<bool>(general, "isTrophyPopupDisabled", false);
|
||||||
|
BGMvolume = toml::find_or<int>(general, "BGMvolume", 50);
|
||||||
|
enableDiscordRPC = toml::find_or<bool>(general, "enableDiscordRPC", true);
|
||||||
logFilter = toml::find_or<std::string>(general, "logFilter", "");
|
logFilter = toml::find_or<std::string>(general, "logFilter", "");
|
||||||
logType = toml::find_or<std::string>(general, "logType", "sync");
|
logType = toml::find_or<std::string>(general, "logType", "sync");
|
||||||
userName = toml::find_or<std::string>(general, "userName", "shadPS4");
|
userName = toml::find_or<std::string>(general, "userName", "shadPS4");
|
||||||
|
if (Common::isRelease) {
|
||||||
|
updateChannel = toml::find_or<std::string>(general, "updateChannel", "Release");
|
||||||
|
} else {
|
||||||
|
updateChannel = toml::find_or<std::string>(general, "updateChannel", "Nightly");
|
||||||
|
}
|
||||||
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
|
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
|
||||||
|
isAutoUpdate = toml::find_or<bool>(general, "autoUpdate", false);
|
||||||
|
separateupdatefolder = toml::find_or<bool>(general, "separateUpdateEnabled", false);
|
||||||
|
compatibilityData = toml::find_or<bool>(general, "compatibilityEnabled", false);
|
||||||
|
checkCompatibilityOnStartup =
|
||||||
|
toml::find_or<bool>(general, "checkCompatibilityOnStartup", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.contains("Input")) {
|
||||||
|
const toml::value& input = data.at("Input");
|
||||||
|
|
||||||
|
cursorState = toml::find_or<int>(input, "cursorState", HideCursorState::Idle);
|
||||||
|
cursorHideTimeout = toml::find_or<int>(input, "cursorHideTimeout", 5);
|
||||||
|
backButtonBehavior = toml::find_or<std::string>(input, "backButtonBehavior", "left");
|
||||||
|
useSpecialPad = toml::find_or<bool>(input, "useSpecialPad", false);
|
||||||
|
specialPadClass = toml::find_or<int>(input, "specialPadClass", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.contains("GPU")) {
|
if (data.contains("GPU")) {
|
||||||
@@ -332,8 +593,9 @@ void load(const std::filesystem::path& path) {
|
|||||||
screenWidth = toml::find_or<int>(gpu, "screenWidth", screenWidth);
|
screenWidth = toml::find_or<int>(gpu, "screenWidth", screenWidth);
|
||||||
screenHeight = toml::find_or<int>(gpu, "screenHeight", screenHeight);
|
screenHeight = toml::find_or<int>(gpu, "screenHeight", screenHeight);
|
||||||
isNullGpu = toml::find_or<bool>(gpu, "nullGpu", false);
|
isNullGpu = toml::find_or<bool>(gpu, "nullGpu", false);
|
||||||
|
shouldCopyGPUBuffers = toml::find_or<bool>(gpu, "copyGPUBuffers", false);
|
||||||
shouldDumpShaders = toml::find_or<bool>(gpu, "dumpShaders", false);
|
shouldDumpShaders = toml::find_or<bool>(gpu, "dumpShaders", false);
|
||||||
shouldDumpPM4 = toml::find_or<bool>(gpu, "dumpPM4", false);
|
shouldPatchShaders = toml::find_or<bool>(gpu, "patchShaders", true);
|
||||||
vblankDivider = toml::find_or<int>(gpu, "vblankDivider", 1);
|
vblankDivider = toml::find_or<int>(gpu, "vblankDivider", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,19 +607,15 @@ void load(const std::filesystem::path& path) {
|
|||||||
vkValidationSync = toml::find_or<bool>(vk, "validation_sync", false);
|
vkValidationSync = toml::find_or<bool>(vk, "validation_sync", false);
|
||||||
vkValidationGpu = toml::find_or<bool>(vk, "validation_gpu", true);
|
vkValidationGpu = toml::find_or<bool>(vk, "validation_gpu", true);
|
||||||
rdocEnable = toml::find_or<bool>(vk, "rdocEnable", false);
|
rdocEnable = toml::find_or<bool>(vk, "rdocEnable", false);
|
||||||
rdocMarkersEnable = toml::find_or<bool>(vk, "rdocMarkersEnable", false);
|
vkMarkers = toml::find_or<bool>(vk, "rdocMarkersEnable", false);
|
||||||
|
vkCrashDiagnostic = toml::find_or<bool>(vk, "crashDiagnostic", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.contains("Debug")) {
|
if (data.contains("Debug")) {
|
||||||
const toml::value& debug = data.at("Debug");
|
const toml::value& debug = data.at("Debug");
|
||||||
|
|
||||||
isDebugDump = toml::find_or<bool>(debug, "DebugDump", false);
|
isDebugDump = toml::find_or<bool>(debug, "DebugDump", false);
|
||||||
}
|
isShaderDebug = toml::find_or<bool>(debug, "CollectShader", false);
|
||||||
|
|
||||||
if (data.contains("LLE")) {
|
|
||||||
const toml::value& lle = data.at("LLE");
|
|
||||||
|
|
||||||
isLibc = toml::find_or<bool>(lle, "libc", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.contains("GUI")) {
|
if (data.contains("GUI")) {
|
||||||
@@ -370,7 +628,14 @@ void load(const std::filesystem::path& path) {
|
|||||||
mw_themes = toml::find_or<int>(gui, "theme", 0);
|
mw_themes = toml::find_or<int>(gui, "theme", 0);
|
||||||
m_window_size_W = toml::find_or<int>(gui, "mw_width", 0);
|
m_window_size_W = toml::find_or<int>(gui, "mw_width", 0);
|
||||||
m_window_size_H = toml::find_or<int>(gui, "mw_height", 0);
|
m_window_size_H = toml::find_or<int>(gui, "mw_height", 0);
|
||||||
settings_install_dir = toml::find_or<std::string>(gui, "installDir", "");
|
|
||||||
|
const auto install_dir_array =
|
||||||
|
toml::find_or<std::vector<std::string>>(gui, "installDirs", {});
|
||||||
|
for (const auto& dir : install_dir_array) {
|
||||||
|
addGameInstallDir(std::filesystem::path{dir});
|
||||||
|
}
|
||||||
|
|
||||||
|
settings_addon_install_dir = toml::find_fs_path_or(gui, "addonInstallDir", {});
|
||||||
main_window_geometry_x = toml::find_or<int>(gui, "geometry_x", 0);
|
main_window_geometry_x = toml::find_or<int>(gui, "geometry_x", 0);
|
||||||
main_window_geometry_y = toml::find_or<int>(gui, "geometry_y", 0);
|
main_window_geometry_y = toml::find_or<int>(gui, "geometry_y", 0);
|
||||||
main_window_geometry_w = toml::find_or<int>(gui, "geometry_w", 0);
|
main_window_geometry_w = toml::find_or<int>(gui, "geometry_w", 0);
|
||||||
@@ -379,6 +644,7 @@ void load(const std::filesystem::path& path) {
|
|||||||
m_elf_viewer = toml::find_or<std::vector<std::string>>(gui, "elfDirs", {});
|
m_elf_viewer = toml::find_or<std::vector<std::string>>(gui, "elfDirs", {});
|
||||||
m_recent_files = toml::find_or<std::vector<std::string>>(gui, "recentFiles", {});
|
m_recent_files = toml::find_or<std::vector<std::string>>(gui, "recentFiles", {});
|
||||||
m_table_mode = toml::find_or<int>(gui, "gameTableMode", 0);
|
m_table_mode = toml::find_or<int>(gui, "gameTableMode", 0);
|
||||||
|
emulator_language = toml::find_or<std::string>(gui, "emulatorLanguage", "en");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.contains("Settings")) {
|
if (data.contains("Settings")) {
|
||||||
@@ -387,54 +653,111 @@ void load(const std::filesystem::path& path) {
|
|||||||
m_language = toml::find_or<int>(settings, "consoleLanguage", 1);
|
m_language = toml::find_or<int>(settings, "consoleLanguage", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void save(const std::filesystem::path& path) {
|
void save(const std::filesystem::path& path) {
|
||||||
toml::value data;
|
toml::value data;
|
||||||
|
|
||||||
std::error_code error;
|
std::error_code error;
|
||||||
if (std::filesystem::exists(path, error)) {
|
if (std::filesystem::exists(path, error)) {
|
||||||
try {
|
try {
|
||||||
data = toml::parse(path);
|
std::ifstream ifs;
|
||||||
|
ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
ifs.open(path, std::ios_base::binary);
|
||||||
|
data = toml::parse(ifs, std::string{fmt::UTF(path.filename().u8string()).data});
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
fmt::print("Exception trying to parse config file. Exception: {}\n", ex.what());
|
fmt::print("Exception trying to parse config file. Exception: {}\n", ex.what());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (error) {
|
if (error) {
|
||||||
fmt::print("Filesystem error accessing {} (error: {})\n", path.string(),
|
fmt::print("Filesystem error: {}\n", error.message());
|
||||||
error.message().c_str());
|
|
||||||
}
|
}
|
||||||
fmt::print("Saving new configuration file {}\n", path.string());
|
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
|
||||||
}
|
}
|
||||||
|
|
||||||
data["General"]["isPS4Pro"] = isNeo;
|
data["General"]["isPS4Pro"] = isNeo;
|
||||||
data["General"]["Fullscreen"] = isFullscreen;
|
data["General"]["Fullscreen"] = isFullscreen;
|
||||||
|
data["General"]["isTrophyPopupDisabled"] = isTrophyPopupDisabled;
|
||||||
|
data["General"]["playBGM"] = playBGM;
|
||||||
|
data["General"]["BGMvolume"] = BGMvolume;
|
||||||
|
data["General"]["enableDiscordRPC"] = enableDiscordRPC;
|
||||||
data["General"]["logFilter"] = logFilter;
|
data["General"]["logFilter"] = logFilter;
|
||||||
data["General"]["logType"] = logType;
|
data["General"]["logType"] = logType;
|
||||||
data["General"]["userName"] = userName;
|
data["General"]["userName"] = userName;
|
||||||
|
data["General"]["updateChannel"] = updateChannel;
|
||||||
data["General"]["showSplash"] = isShowSplash;
|
data["General"]["showSplash"] = isShowSplash;
|
||||||
|
data["General"]["autoUpdate"] = isAutoUpdate;
|
||||||
|
data["General"]["separateUpdateEnabled"] = separateupdatefolder;
|
||||||
|
data["General"]["compatibilityEnabled"] = compatibilityData;
|
||||||
|
data["General"]["checkCompatibilityOnStartup"] = checkCompatibilityOnStartup;
|
||||||
|
data["Input"]["cursorState"] = cursorState;
|
||||||
|
data["Input"]["cursorHideTimeout"] = cursorHideTimeout;
|
||||||
|
data["Input"]["backButtonBehavior"] = backButtonBehavior;
|
||||||
|
data["Input"]["useSpecialPad"] = useSpecialPad;
|
||||||
|
data["Input"]["specialPadClass"] = specialPadClass;
|
||||||
data["GPU"]["screenWidth"] = screenWidth;
|
data["GPU"]["screenWidth"] = screenWidth;
|
||||||
data["GPU"]["screenHeight"] = screenHeight;
|
data["GPU"]["screenHeight"] = screenHeight;
|
||||||
data["GPU"]["nullGpu"] = isNullGpu;
|
data["GPU"]["nullGpu"] = isNullGpu;
|
||||||
|
data["GPU"]["copyGPUBuffers"] = shouldCopyGPUBuffers;
|
||||||
data["GPU"]["dumpShaders"] = shouldDumpShaders;
|
data["GPU"]["dumpShaders"] = shouldDumpShaders;
|
||||||
data["GPU"]["dumpPM4"] = shouldDumpPM4;
|
data["GPU"]["patchShaders"] = shouldPatchShaders;
|
||||||
data["GPU"]["vblankDivider"] = vblankDivider;
|
data["GPU"]["vblankDivider"] = vblankDivider;
|
||||||
data["Vulkan"]["gpuId"] = gpuId;
|
data["Vulkan"]["gpuId"] = gpuId;
|
||||||
data["Vulkan"]["validation"] = vkValidation;
|
data["Vulkan"]["validation"] = vkValidation;
|
||||||
data["Vulkan"]["validation_sync"] = vkValidationSync;
|
data["Vulkan"]["validation_sync"] = vkValidationSync;
|
||||||
data["Vulkan"]["validation_gpu"] = vkValidationGpu;
|
data["Vulkan"]["validation_gpu"] = vkValidationGpu;
|
||||||
data["Vulkan"]["rdocEnable"] = rdocEnable;
|
data["Vulkan"]["rdocEnable"] = rdocEnable;
|
||||||
data["Vulkan"]["rdocMarkersEnable"] = rdocMarkersEnable;
|
data["Vulkan"]["rdocMarkersEnable"] = vkMarkers;
|
||||||
|
data["Vulkan"]["crashDiagnostic"] = vkCrashDiagnostic;
|
||||||
data["Debug"]["DebugDump"] = isDebugDump;
|
data["Debug"]["DebugDump"] = isDebugDump;
|
||||||
data["LLE"]["libc"] = isLibc;
|
data["Debug"]["CollectShader"] = isShaderDebug;
|
||||||
|
|
||||||
|
std::vector<std::string> install_dirs;
|
||||||
|
for (const auto& dirString : settings_install_dirs) {
|
||||||
|
install_dirs.emplace_back(std::string{fmt::UTF(dirString.u8string()).data});
|
||||||
|
}
|
||||||
|
data["GUI"]["installDirs"] = install_dirs;
|
||||||
|
|
||||||
|
data["GUI"]["addonInstallDir"] =
|
||||||
|
std::string{fmt::UTF(settings_addon_install_dir.u8string()).data};
|
||||||
|
data["GUI"]["emulatorLanguage"] = emulator_language;
|
||||||
|
data["Settings"]["consoleLanguage"] = m_language;
|
||||||
|
|
||||||
|
std::ofstream file(path, std::ios::binary);
|
||||||
|
file << data;
|
||||||
|
file.close();
|
||||||
|
saveMainWindow(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void saveMainWindow(const std::filesystem::path& path) {
|
||||||
|
toml::value data;
|
||||||
|
|
||||||
|
std::error_code error;
|
||||||
|
if (std::filesystem::exists(path, error)) {
|
||||||
|
try {
|
||||||
|
std::ifstream ifs;
|
||||||
|
ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||||
|
ifs.open(path, std::ios_base::binary);
|
||||||
|
data = toml::parse(ifs, std::string{fmt::UTF(path.filename().u8string()).data});
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
fmt::print("Exception trying to parse config file. Exception: {}\n", ex.what());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (error) {
|
||||||
|
fmt::print("Filesystem error: {}\n", error.message());
|
||||||
|
}
|
||||||
|
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
|
||||||
|
}
|
||||||
|
|
||||||
|
data["GUI"]["mw_width"] = m_window_size_W;
|
||||||
|
data["GUI"]["mw_height"] = m_window_size_H;
|
||||||
data["GUI"]["theme"] = mw_themes;
|
data["GUI"]["theme"] = mw_themes;
|
||||||
data["GUI"]["iconSize"] = m_icon_size;
|
data["GUI"]["iconSize"] = m_icon_size;
|
||||||
data["GUI"]["sliderPos"] = m_slider_pos;
|
data["GUI"]["sliderPos"] = m_slider_pos;
|
||||||
data["GUI"]["iconSizeGrid"] = m_icon_size_grid;
|
data["GUI"]["iconSizeGrid"] = m_icon_size_grid;
|
||||||
data["GUI"]["sliderPosGrid"] = m_slider_pos_grid;
|
data["GUI"]["sliderPosGrid"] = m_slider_pos_grid;
|
||||||
data["GUI"]["gameTableMode"] = m_table_mode;
|
data["GUI"]["gameTableMode"] = m_table_mode;
|
||||||
data["GUI"]["mw_width"] = m_window_size_W;
|
|
||||||
data["GUI"]["mw_height"] = m_window_size_H;
|
|
||||||
data["GUI"]["installDir"] = settings_install_dir;
|
|
||||||
data["GUI"]["geometry_x"] = main_window_geometry_x;
|
data["GUI"]["geometry_x"] = main_window_geometry_x;
|
||||||
data["GUI"]["geometry_y"] = main_window_geometry_y;
|
data["GUI"]["geometry_y"] = main_window_geometry_y;
|
||||||
data["GUI"]["geometry_w"] = main_window_geometry_w;
|
data["GUI"]["geometry_w"] = main_window_geometry_w;
|
||||||
@@ -443,9 +766,7 @@ void save(const std::filesystem::path& path) {
|
|||||||
data["GUI"]["elfDirs"] = m_elf_viewer;
|
data["GUI"]["elfDirs"] = m_elf_viewer;
|
||||||
data["GUI"]["recentFiles"] = m_recent_files;
|
data["GUI"]["recentFiles"] = m_recent_files;
|
||||||
|
|
||||||
data["Settings"]["consoleLanguage"] = m_language;
|
std::ofstream file(path, std::ios::binary);
|
||||||
|
|
||||||
std::ofstream file(path, std::ios::out);
|
|
||||||
file << data;
|
file << data;
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
@@ -453,21 +774,44 @@ void save(const std::filesystem::path& path) {
|
|||||||
void setDefaultValues() {
|
void setDefaultValues() {
|
||||||
isNeo = false;
|
isNeo = false;
|
||||||
isFullscreen = false;
|
isFullscreen = false;
|
||||||
|
isTrophyPopupDisabled = false;
|
||||||
|
playBGM = false;
|
||||||
|
BGMvolume = 50;
|
||||||
|
enableDiscordRPC = true;
|
||||||
screenWidth = 1280;
|
screenWidth = 1280;
|
||||||
screenHeight = 720;
|
screenHeight = 720;
|
||||||
logFilter = "";
|
logFilter = "";
|
||||||
logType = "async";
|
logType = "async";
|
||||||
userName = "shadPS4";
|
userName = "shadPS4";
|
||||||
|
if (Common::isRelease) {
|
||||||
|
updateChannel = "Release";
|
||||||
|
} else {
|
||||||
|
updateChannel = "Nightly";
|
||||||
|
}
|
||||||
|
cursorState = HideCursorState::Idle;
|
||||||
|
cursorHideTimeout = 5;
|
||||||
|
backButtonBehavior = "left";
|
||||||
|
useSpecialPad = false;
|
||||||
|
specialPadClass = 1;
|
||||||
isDebugDump = false;
|
isDebugDump = false;
|
||||||
|
isShaderDebug = false;
|
||||||
isShowSplash = false;
|
isShowSplash = false;
|
||||||
|
isAutoUpdate = false;
|
||||||
isNullGpu = false;
|
isNullGpu = false;
|
||||||
shouldDumpShaders = false;
|
shouldDumpShaders = false;
|
||||||
shouldDumpPM4 = false;
|
|
||||||
vblankDivider = 1;
|
vblankDivider = 1;
|
||||||
vkValidation = false;
|
vkValidation = false;
|
||||||
|
vkValidationSync = false;
|
||||||
|
vkValidationGpu = false;
|
||||||
rdocEnable = false;
|
rdocEnable = false;
|
||||||
|
vkMarkers = false;
|
||||||
|
vkCrashDiagnostic = false;
|
||||||
|
emulator_language = "en";
|
||||||
m_language = 1;
|
m_language = 1;
|
||||||
gpuId = -1;
|
gpuId = -1;
|
||||||
|
separateupdatefolder = false;
|
||||||
|
compatibilityData = false;
|
||||||
|
checkCompatibilityOnStartup = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Config
|
} // namespace Config
|
||||||
|
|||||||
@@ -8,45 +8,82 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
namespace Config {
|
namespace Config {
|
||||||
|
|
||||||
|
enum HideCursorState : s16 { Never, Idle, Always };
|
||||||
|
|
||||||
void load(const std::filesystem::path& path);
|
void load(const std::filesystem::path& path);
|
||||||
void save(const std::filesystem::path& path);
|
void save(const std::filesystem::path& path);
|
||||||
|
void saveMainWindow(const std::filesystem::path& path);
|
||||||
|
|
||||||
bool isNeoMode();
|
bool isNeoMode();
|
||||||
bool isFullscreenMode();
|
bool isFullscreenMode();
|
||||||
|
bool getPlayBGM();
|
||||||
|
int getBGMvolume();
|
||||||
|
bool getisTrophyPopupDisabled();
|
||||||
|
bool getEnableDiscordRPC();
|
||||||
|
bool getSeparateUpdateEnabled();
|
||||||
|
bool getCompatibilityEnabled();
|
||||||
|
bool getCheckCompatibilityOnStartup();
|
||||||
|
|
||||||
std::string getLogFilter();
|
std::string getLogFilter();
|
||||||
std::string getLogType();
|
std::string getLogType();
|
||||||
std::string getUserName();
|
std::string getUserName();
|
||||||
|
std::string getUpdateChannel();
|
||||||
|
|
||||||
|
s16 getCursorState();
|
||||||
|
int getCursorHideTimeout();
|
||||||
|
std::string getBackButtonBehavior();
|
||||||
|
bool getUseSpecialPad();
|
||||||
|
int getSpecialPadClass();
|
||||||
|
|
||||||
u32 getScreenWidth();
|
u32 getScreenWidth();
|
||||||
u32 getScreenHeight();
|
u32 getScreenHeight();
|
||||||
s32 getGpuId();
|
s32 getGpuId();
|
||||||
|
|
||||||
bool debugDump();
|
bool debugDump();
|
||||||
bool isLleLibc();
|
bool collectShadersForDebug();
|
||||||
bool showSplash();
|
bool showSplash();
|
||||||
|
bool autoUpdate();
|
||||||
bool nullGpu();
|
bool nullGpu();
|
||||||
|
bool copyGPUCmdBuffers();
|
||||||
bool dumpShaders();
|
bool dumpShaders();
|
||||||
bool dumpPM4();
|
bool patchShaders();
|
||||||
bool isRdocEnabled();
|
bool isRdocEnabled();
|
||||||
bool isMarkersEnabled();
|
|
||||||
u32 vblankDiv();
|
u32 vblankDiv();
|
||||||
|
|
||||||
void setDebugDump(bool enable);
|
void setDebugDump(bool enable);
|
||||||
|
void setCollectShaderForDebug(bool enable);
|
||||||
void setShowSplash(bool enable);
|
void setShowSplash(bool enable);
|
||||||
|
void setAutoUpdate(bool enable);
|
||||||
void setNullGpu(bool enable);
|
void setNullGpu(bool enable);
|
||||||
|
void setCopyGPUCmdBuffers(bool enable);
|
||||||
void setDumpShaders(bool enable);
|
void setDumpShaders(bool enable);
|
||||||
void setDumpPM4(bool enable);
|
|
||||||
void setVblankDiv(u32 value);
|
void setVblankDiv(u32 value);
|
||||||
void setGpuId(s32 selectedGpuId);
|
void setGpuId(s32 selectedGpuId);
|
||||||
void setScreenWidth(u32 width);
|
void setScreenWidth(u32 width);
|
||||||
void setScreenHeight(u32 height);
|
void setScreenHeight(u32 height);
|
||||||
void setFullscreenMode(bool enable);
|
void setFullscreenMode(bool enable);
|
||||||
|
void setisTrophyPopupDisabled(bool disable);
|
||||||
|
void setPlayBGM(bool enable);
|
||||||
|
void setBGMvolume(int volume);
|
||||||
|
void setEnableDiscordRPC(bool enable);
|
||||||
void setLanguage(u32 language);
|
void setLanguage(u32 language);
|
||||||
void setNeoMode(bool enable);
|
void setNeoMode(bool enable);
|
||||||
void setUserName(std::string type);
|
void setUserName(const std::string& type);
|
||||||
|
void setUpdateChannel(const std::string& type);
|
||||||
|
void setSeparateUpdateEnabled(bool use);
|
||||||
|
void setGameInstallDirs(const std::vector<std::filesystem::path>& settings_install_dirs_config);
|
||||||
|
void setCompatibilityEnabled(bool use);
|
||||||
|
void setCheckCompatibilityOnStartup(bool use);
|
||||||
|
|
||||||
void setLogType(std::string type);
|
void setCursorState(s16 cursorState);
|
||||||
void setLogFilter(std::string type);
|
void setCursorHideTimeout(int newcursorHideTimeout);
|
||||||
|
void setBackButtonBehavior(const std::string& type);
|
||||||
|
void setUseSpecialPad(bool use);
|
||||||
|
void setSpecialPadClass(int type);
|
||||||
|
|
||||||
|
void setLogType(const std::string& type);
|
||||||
|
void setLogFilter(const std::string& type);
|
||||||
|
|
||||||
void setVkValidation(bool enable);
|
void setVkValidation(bool enable);
|
||||||
void setVkSyncValidation(bool enable);
|
void setVkSyncValidation(bool enable);
|
||||||
@@ -55,38 +92,45 @@ void setRdocEnabled(bool enable);
|
|||||||
bool vkValidationEnabled();
|
bool vkValidationEnabled();
|
||||||
bool vkValidationSyncEnabled();
|
bool vkValidationSyncEnabled();
|
||||||
bool vkValidationGpuEnabled();
|
bool vkValidationGpuEnabled();
|
||||||
|
bool vkMarkersEnabled();
|
||||||
|
bool vkCrashDiagnosticEnabled();
|
||||||
|
|
||||||
// Gui
|
// Gui
|
||||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
||||||
void setGameInstallDir(const std::string& dir);
|
bool addGameInstallDir(const std::filesystem::path& dir);
|
||||||
|
void removeGameInstallDir(const std::filesystem::path& dir);
|
||||||
|
void setAddonInstallDir(const std::filesystem::path& dir);
|
||||||
void setMainWindowTheme(u32 theme);
|
void setMainWindowTheme(u32 theme);
|
||||||
void setIconSize(u32 size);
|
void setIconSize(u32 size);
|
||||||
void setIconSizeGrid(u32 size);
|
void setIconSizeGrid(u32 size);
|
||||||
void setSliderPositon(u32 pos);
|
void setSliderPosition(u32 pos);
|
||||||
void setSliderPositonGrid(u32 pos);
|
void setSliderPositionGrid(u32 pos);
|
||||||
void setTableMode(u32 mode);
|
void setTableMode(u32 mode);
|
||||||
void setMainWindowWidth(u32 width);
|
void setMainWindowWidth(u32 width);
|
||||||
void setMainWindowHeight(u32 height);
|
void setMainWindowHeight(u32 height);
|
||||||
void setPkgViewer(std::vector<std::string> pkgList);
|
void setPkgViewer(const std::vector<std::string>& pkgList);
|
||||||
void setElfViewer(std::vector<std::string> elfList);
|
void setElfViewer(const std::vector<std::string>& elfList);
|
||||||
void setRecentFiles(std::vector<std::string> recentFiles);
|
void setRecentFiles(const std::vector<std::string>& recentFiles);
|
||||||
|
void setEmulatorLanguage(std::string language);
|
||||||
|
|
||||||
u32 getMainWindowGeometryX();
|
u32 getMainWindowGeometryX();
|
||||||
u32 getMainWindowGeometryY();
|
u32 getMainWindowGeometryY();
|
||||||
u32 getMainWindowGeometryW();
|
u32 getMainWindowGeometryW();
|
||||||
u32 getMainWindowGeometryH();
|
u32 getMainWindowGeometryH();
|
||||||
std::string getGameInstallDir();
|
const std::vector<std::filesystem::path>& getGameInstallDirs();
|
||||||
|
std::filesystem::path getAddonInstallDir();
|
||||||
u32 getMainWindowTheme();
|
u32 getMainWindowTheme();
|
||||||
u32 getIconSize();
|
u32 getIconSize();
|
||||||
u32 getIconSizeGrid();
|
u32 getIconSizeGrid();
|
||||||
u32 getSliderPositon();
|
u32 getSliderPosition();
|
||||||
u32 getSliderPositonGrid();
|
u32 getSliderPositionGrid();
|
||||||
u32 getTableMode();
|
u32 getTableMode();
|
||||||
u32 getMainWindowWidth();
|
u32 getMainWindowWidth();
|
||||||
u32 getMainWindowHeight();
|
u32 getMainWindowHeight();
|
||||||
std::vector<std::string> getPkgViewer();
|
std::vector<std::string> getPkgViewer();
|
||||||
std::vector<std::string> getElfViewer();
|
std::vector<std::string> getElfViewer();
|
||||||
std::vector<std::string> getRecentFiles();
|
std::vector<std::string> getRecentFiles();
|
||||||
|
std::string getEmulatorLanguage();
|
||||||
|
|
||||||
void setDefaultValues();
|
void setDefaultValues();
|
||||||
|
|
||||||
|
|||||||
171
src/common/cstring.h
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
|
#include "assert.h"
|
||||||
|
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wtautological-undefined-compare"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief A null-terminated string with a fixed maximum length
|
||||||
|
* This class is not meant to be used as a general-purpose string class
|
||||||
|
* It is meant to be used as `char[N]` where memory layout is fixed
|
||||||
|
* @tparam N Maximum length of the string
|
||||||
|
* @tparam T Type of character
|
||||||
|
*/
|
||||||
|
template <size_t N, typename T = char>
|
||||||
|
class CString {
|
||||||
|
T data[N]{};
|
||||||
|
|
||||||
|
public:
|
||||||
|
class Iterator;
|
||||||
|
|
||||||
|
CString() = default;
|
||||||
|
|
||||||
|
template <size_t M>
|
||||||
|
explicit CString(const CString<M>& other)
|
||||||
|
requires(M <= N)
|
||||||
|
{
|
||||||
|
if (this == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
std::ranges::copy(other.begin(), other.end(), data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FromString(const std::basic_string_view<T>& str) {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
size_t p = str.copy(data, N - 1);
|
||||||
|
data[p] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
void Zero() {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
std::ranges::fill(data, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit(false) operator std::basic_string_view<T>() const {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return std::basic_string_view<T>{data};
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit operator std::basic_string<T>() const {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return std::basic_string<T>{data};
|
||||||
|
}
|
||||||
|
|
||||||
|
std::basic_string<T> to_string() const {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return std::basic_string<T>{data};
|
||||||
|
}
|
||||||
|
|
||||||
|
std::basic_string_view<T> to_view() const {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return std::basic_string_view<T>{data};
|
||||||
|
}
|
||||||
|
|
||||||
|
T* begin() {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T* begin() const {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
T* end() {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return data + N;
|
||||||
|
}
|
||||||
|
|
||||||
|
const T* end() const {
|
||||||
|
if (this == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return data + N;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr std::size_t capacity() const {
|
||||||
|
return N;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::size_t size() const {
|
||||||
|
return std::char_traits<T>::length(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
T& operator[](size_t idx) {
|
||||||
|
return data[idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
const T& operator[](size_t idx) const {
|
||||||
|
return data[idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
class Iterator {
|
||||||
|
T* ptr;
|
||||||
|
T* end;
|
||||||
|
|
||||||
|
public:
|
||||||
|
using difference_type = std::ptrdiff_t;
|
||||||
|
using value_type = T;
|
||||||
|
using pointer = T*;
|
||||||
|
using reference = T&;
|
||||||
|
using iterator_category = std::random_access_iterator_tag;
|
||||||
|
|
||||||
|
Iterator() = default;
|
||||||
|
explicit Iterator(T* ptr) : ptr(ptr), end(ptr + N) {}
|
||||||
|
|
||||||
|
Iterator& operator++() {
|
||||||
|
++ptr;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Iterator operator++(int) {
|
||||||
|
Iterator tmp = *this;
|
||||||
|
++ptr;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
operator T*() {
|
||||||
|
ASSERT_MSG(ptr >= end, "CString iterator out of bounds");
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(CString<13>) == sizeof(char[13])); // Ensure size still matches a simple array
|
||||||
|
static_assert(std::weakly_incrementable<CString<13>::Iterator>);
|
||||||
|
|
||||||
|
template <size_t N>
|
||||||
|
using CWString = CString<N, wchar_t>;
|
||||||
|
|
||||||
|
template <size_t N>
|
||||||
|
using CU16String = CString<N, char16_t>;
|
||||||
|
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
|
} // namespace Common
|
||||||
@@ -14,9 +14,15 @@
|
|||||||
#include <tracy/Tracy.hpp>
|
#include <tracy/Tracy.hpp>
|
||||||
|
|
||||||
static inline bool IsProfilerConnected() {
|
static inline bool IsProfilerConnected() {
|
||||||
|
#if TRACY_ENABLE
|
||||||
return tracy::GetProfiler().IsConnected();
|
return tracy::GetProfiler().IsConnected();
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TRACY_GPU_ENABLED 0
|
||||||
|
|
||||||
#define CUSTOM_LOCK(type, varname) \
|
#define CUSTOM_LOCK(type, varname) \
|
||||||
tracy::LockableCtx varname { \
|
tracy::LockableCtx varname { \
|
||||||
[]() -> const tracy::SourceLocationData* { \
|
[]() -> const tracy::SourceLocationData* { \
|
||||||
@@ -29,7 +35,7 @@ static inline bool IsProfilerConnected() {
|
|||||||
#define TRACK_ALLOC(ptr, size, pool) TracyAllocN(std::bit_cast<void*>(ptr), (size), (pool))
|
#define TRACK_ALLOC(ptr, size, pool) TracyAllocN(std::bit_cast<void*>(ptr), (size), (pool))
|
||||||
#define TRACK_FREE(ptr, pool) TracyFreeN(std::bit_cast<void*>(ptr), (pool))
|
#define TRACK_FREE(ptr, pool) TracyFreeN(std::bit_cast<void*>(ptr), (pool))
|
||||||
|
|
||||||
enum MarkersPallete : int {
|
enum MarkersPalette : int {
|
||||||
EmulatorMarkerColor = 0x264653,
|
EmulatorMarkerColor = 0x264653,
|
||||||
RendererMarkerColor = 0x2a9d8f,
|
RendererMarkerColor = 0x2a9d8f,
|
||||||
HleMarkerColor = 0xe9c46a,
|
HleMarkerColor = 0xe9c46a,
|
||||||
@@ -41,7 +47,7 @@ enum MarkersPallete : int {
|
|||||||
#define RENDERER_TRACE ZoneScopedC(RendererMarkerColor)
|
#define RENDERER_TRACE ZoneScopedC(RendererMarkerColor)
|
||||||
#define HLE_TRACE ZoneScopedC(HleMarkerColor)
|
#define HLE_TRACE ZoneScopedC(HleMarkerColor)
|
||||||
|
|
||||||
#define TRACE_HINT(str) ZoneText(str.c_str(), str.size())
|
#define TRACE_HINT(str) ZoneText(str.data(), str.size())
|
||||||
|
|
||||||
#define TRACE_WARN(msg) \
|
#define TRACE_WARN(msg) \
|
||||||
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::DarkOrange); }(msg);
|
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::DarkOrange); }(msg);
|
||||||
@@ -57,3 +63,11 @@ enum MarkersPallete : int {
|
|||||||
tracy::SourceLocationData{nullptr, name, TracyFile, (uint32_t)TracyLine, 0};
|
tracy::SourceLocationData{nullptr, name, TracyFile, (uint32_t)TracyLine, 0};
|
||||||
|
|
||||||
#define FRAME_END FrameMark
|
#define FRAME_END FrameMark
|
||||||
|
|
||||||
|
#ifdef TRACY_FIBERS
|
||||||
|
#define FIBER_ENTER(name) TracyFiberEnter(name)
|
||||||
|
#define FIBER_EXIT TracyFiberLeave
|
||||||
|
#else
|
||||||
|
#define FIBER_ENTER(name)
|
||||||
|
#define FIBER_EXIT
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -2,18 +2,27 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include "common/disassembler.h"
|
#include "common/decoder.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
Disassembler::Disassembler() {
|
DecoderImpl::DecoderImpl() {
|
||||||
ZydisDecoderInit(&m_decoder, ZYDIS_MACHINE_MODE_LONG_64, ZYDIS_STACK_WIDTH_64);
|
ZydisDecoderInit(&m_decoder, ZYDIS_MACHINE_MODE_LONG_64, ZYDIS_STACK_WIDTH_64);
|
||||||
ZydisFormatterInit(&m_formatter, ZYDIS_FORMATTER_STYLE_INTEL);
|
ZydisFormatterInit(&m_formatter, ZYDIS_FORMATTER_STYLE_INTEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Disassembler::~Disassembler() = default;
|
DecoderImpl::~DecoderImpl() = default;
|
||||||
|
|
||||||
void Disassembler::printInstruction(void* code, u64 address) {
|
std::string DecoderImpl::disassembleInst(ZydisDecodedInstruction& inst,
|
||||||
|
ZydisDecodedOperand* operands, u64 address) {
|
||||||
|
const int bufLen = 256;
|
||||||
|
char szBuffer[bufLen];
|
||||||
|
ZydisFormatterFormatInstruction(&m_formatter, &inst, operands, inst.operand_count_visible,
|
||||||
|
szBuffer, sizeof(szBuffer), address, ZYAN_NULL);
|
||||||
|
return szBuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DecoderImpl::printInstruction(void* code, u64 address) {
|
||||||
ZydisDecodedInstruction instruction;
|
ZydisDecodedInstruction instruction;
|
||||||
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT_VISIBLE];
|
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT_VISIBLE];
|
||||||
ZyanStatus status =
|
ZyanStatus status =
|
||||||
@@ -25,13 +34,15 @@ void Disassembler::printInstruction(void* code, u64 address) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Disassembler::printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,
|
void DecoderImpl::printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,
|
||||||
u64 address) {
|
u64 address) {
|
||||||
const int bufLen = 256;
|
std::string s = disassembleInst(inst, operands, address);
|
||||||
char szBuffer[bufLen];
|
fmt::print("instruction: {}\n", s);
|
||||||
ZydisFormatterFormatInstruction(&m_formatter, &inst, operands, inst.operand_count_visible,
|
}
|
||||||
szBuffer, sizeof(szBuffer), address, ZYAN_NULL);
|
|
||||||
fmt::print("instruction: {}\n", szBuffer);
|
ZyanStatus DecoderImpl::decodeInstruction(ZydisDecodedInstruction& inst,
|
||||||
|
ZydisDecodedOperand* operands, void* data, u64 size) {
|
||||||
|
return ZydisDecoderDecodeFull(&m_decoder, data, size, &inst, operands);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
@@ -4,21 +4,28 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Zydis/Zydis.h>
|
#include <Zydis/Zydis.h>
|
||||||
|
#include "common/singleton.h"
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
class Disassembler {
|
class DecoderImpl {
|
||||||
public:
|
public:
|
||||||
Disassembler();
|
DecoderImpl();
|
||||||
~Disassembler();
|
~DecoderImpl();
|
||||||
|
|
||||||
|
std::string disassembleInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,
|
||||||
|
u64 address);
|
||||||
void printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands, u64 address);
|
void printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands, u64 address);
|
||||||
void printInstruction(void* code, u64 address);
|
void printInstruction(void* code, u64 address);
|
||||||
|
ZyanStatus decodeInstruction(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,
|
||||||
|
void* data, u64 size = 15);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ZydisDecoder m_decoder;
|
ZydisDecoder m_decoder;
|
||||||
ZydisFormatter m_formatter;
|
ZydisFormatter m_formatter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using Decoder = Common::Singleton<DecoderImpl>;
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include <ctime>
|
|
||||||
#include "common/discord.h"
|
|
||||||
|
|
||||||
namespace Discord {
|
|
||||||
|
|
||||||
void RPC::init() {
|
|
||||||
DiscordEventHandlers handlers{};
|
|
||||||
Discord_Initialize("1139939140494971051", &handlers, 1, nullptr);
|
|
||||||
|
|
||||||
startTimestamp = time(nullptr);
|
|
||||||
enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RPC::update(Discord::RPCStatus status, const std::string& game) {
|
|
||||||
DiscordRichPresence rpc{};
|
|
||||||
|
|
||||||
if (status == Discord::RPCStatus::Playing) {
|
|
||||||
rpc.details = "Playing a game";
|
|
||||||
rpc.state = game.c_str();
|
|
||||||
} else {
|
|
||||||
rpc.details = "Idle";
|
|
||||||
}
|
|
||||||
|
|
||||||
rpc.largeImageKey = "shadps4";
|
|
||||||
rpc.largeImageText = "ShadPS4 is a PS4 emulator";
|
|
||||||
rpc.startTimestamp = startTimestamp;
|
|
||||||
|
|
||||||
Discord_UpdatePresence(&rpc);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RPC::stop() {
|
|
||||||
if (enabled) {
|
|
||||||
enabled = false;
|
|
||||||
Discord_ClearPresence();
|
|
||||||
Discord_Shutdown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Discord
|
|
||||||
57
src/common/discord_rpc_handler.cpp
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
#include <ctime>
|
||||||
|
#include "discord_rpc_handler.h"
|
||||||
|
|
||||||
|
namespace DiscordRPCHandler {
|
||||||
|
|
||||||
|
void RPC::init() {
|
||||||
|
DiscordEventHandlers handlers{};
|
||||||
|
|
||||||
|
Discord_Initialize("1139939140494971051", &handlers, 1, nullptr);
|
||||||
|
startTimestamp = time(nullptr);
|
||||||
|
rpcEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RPC::setStatusIdling() {
|
||||||
|
DiscordRichPresence rpc{};
|
||||||
|
rpc.largeImageKey = "https://cdn.jsdelivr.net/gh/shadps4-emu/shadPS4@main/.github/shadps4.png";
|
||||||
|
rpc.largeImageText = "shadPS4 is a PS4 emulator";
|
||||||
|
rpc.startTimestamp = startTimestamp;
|
||||||
|
rpc.details = "Idle";
|
||||||
|
|
||||||
|
status = RPCStatus::Idling;
|
||||||
|
Discord_UpdatePresence(&rpc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RPC::setStatusPlaying(const std::string& game_name, const std::string& game_id) {
|
||||||
|
DiscordRichPresence rpc{};
|
||||||
|
|
||||||
|
rpc.details = "Playing";
|
||||||
|
rpc.state = game_name.c_str();
|
||||||
|
std::string largeImageUrl =
|
||||||
|
"https://store.playstation.com/store/api/chihiro/00_09_000/titlecontainer/US/en/999/" +
|
||||||
|
game_id + "_00/image";
|
||||||
|
rpc.largeImageKey = largeImageUrl.c_str();
|
||||||
|
rpc.largeImageText = game_name.c_str();
|
||||||
|
rpc.startTimestamp = startTimestamp;
|
||||||
|
|
||||||
|
status = RPCStatus::Playing;
|
||||||
|
Discord_UpdatePresence(&rpc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RPC::shutdown() {
|
||||||
|
if (rpcEnabled) {
|
||||||
|
rpcEnabled = false;
|
||||||
|
Discord_ClearPresence();
|
||||||
|
Discord_Shutdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool RPC::getRPCEnabled() {
|
||||||
|
return rpcEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace DiscordRPCHandler
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <discord_rpc.h>
|
#include <discord_rpc.h>
|
||||||
|
|
||||||
namespace Discord {
|
namespace DiscordRPCHandler {
|
||||||
|
|
||||||
enum class RPCStatus {
|
enum class RPCStatus {
|
||||||
Idling,
|
Idling,
|
||||||
@@ -16,12 +16,15 @@ enum class RPCStatus {
|
|||||||
|
|
||||||
class RPC {
|
class RPC {
|
||||||
std::uint64_t startTimestamp;
|
std::uint64_t startTimestamp;
|
||||||
bool enabled = false;
|
bool rpcEnabled = false;
|
||||||
|
RPCStatus status;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void init();
|
void init();
|
||||||
void update(RPCStatus status, const std::string& title);
|
void setStatusIdling();
|
||||||
void stop();
|
void setStatusPlaying(const std::string& game_name, const std::string& game_id);
|
||||||
|
void shutdown();
|
||||||
|
bool getRPCEnabled();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Discord
|
} // namespace DiscordRPCHandler
|
||||||