Compare commits
1092 Commits
Author | SHA1 | Date |
---|---|---|
psucien | 4182740384 | |
psucien | ca1613258f | |
georgemoralis | 3d375a28eb | |
jnack | 69d4fecdfe | |
Xphalnos | 7886761476 | |
squidbus | 6080066f75 | |
georgemoralis | f1fe6b9f96 | |
squidbus | 6e552aac6a | |
adjonesey | 0f87d1e3d4 | |
georgemoralis | 68fa5e292f | |
bigol83 | bdfff5e8ea | |
georgemoralis | cdd193d5b1 | |
georgemoralis | 30ab2b7f71 | |
DanielSvoboda | f2b6843f9d | |
squidbus | a17150960f | |
Grégoire Hage | 1651db24fe | |
IndecisiveTurtle | 6bf42aa985 | |
georgemoralis | 8d41695e74 | |
IndecisiveTurtle | cb5190e31a | |
IndecisiveTurtle | cf706f8cc7 | |
IndecisiveTurtle | 6fbbe3d79b | |
IndecisiveTurtle | fab390b860 | |
Plínio Larrubia | 5a96ac1a4f | |
georgemoralis | ac2fa103fa | |
georgemoralis | 7e7854346d | |
DanielSvoboda | 751f6f9bab | |
Flamy | 1c835a1aa4 | |
georgemoralis | 07c8c28000 | |
TheTurtle | 66e96dd944 | |
DanielSvoboda | aef7498c49 | |
georgemoralis | 790d19e59b | |
georgemoralis | 3ae18c9073 | |
georgemoralis | 83e343f77e | |
kiwipuppeh | 81eb3a4d14 | |
Marcin Mitura | 37786e06c2 | |
psucien | 9d349a1308 | |
bigol83 | c997490645 | |
bigol83 | 600c5079ce | |
Dzmitry Dubrova | 8827c72a1c | |
¥IGA | e1382b43c8 | |
DanielSvoboda | 614a23b369 | |
georgemoralis | a6a9fff666 | |
psucien | 3fbb68048e | |
CyntexMore | 55be97bca3 | |
georgemoralis | d2e4a200fb | |
georgemoralis | a291800418 | |
bigol83 | 365e17f64e | |
Emulator-Team-2 | af18728962 | |
Emulator-Team-2 | 6f938a10ce | |
Emulator-Team-2 | 08036d2b49 | |
georgemoralis | e57d55e6e9 | |
georgemoralis | 163019e3dc | |
counter185 | bc661039c5 | |
counter185 | 2e2f3bb2c6 | |
counter185 | 89bdd3bba2 | |
counter185 | 15fc267f0d | |
counter185 | 0b24ac6991 | |
counter185 | 698dade864 | |
counter185 | 4e6e90dfb9 | |
georgemoralis | be49871c68 | |
squidbus | 905d49fd96 | |
georgemoralis | dcc4762c7e | |
squidbus | 4a6ce1e0d6 | |
georgemoralis | 878fac7f94 | |
squidbus | da966bedfd | |
Vinicius Rangel | 8192eaa668 | |
0xsegf4ult | 9f4e55a8e7 | |
InvoxiPlayGames | 9d59ea06c7 | |
tGecko | 990da7edcc | |
InvoxiPlayGames | 550cf0188d | |
InvoxiPlayGames | 79e86a39fc | |
Anton Kovalev | dfb30ea955 | |
Random | c37679154e | |
Anton Kovalev | 87ccfdfbbd | |
Exhigh | ed42db47af | |
Anton Kovalev | 1a02efbd15 | |
georgemoralis | e4254ebdaa | |
georgemoralis | e65bf19118 | |
Semenov Herman | 860b935054 | |
Anton Kovalev | 3842993a43 | |
Anton Kovalev | 3d46a5d492 | |
Anton Kovalev | 595b845df0 | |
Anton Kovalev | 659e7a4675 | |
psucien | 3eb47226d9 | |
psucien | 371d1d009a | |
Lizardy | 59b651be07 | |
Grégoire Hage | 288db9a0cf | |
georgemoralis | 62f165a7e4 | |
Vladislav Mikhalin | 2d354a095a | |
SolidStateDj | 7ecc1d3be0 | |
psucien | af4356bfe1 | |
psucien | 3e94b533b6 | |
georgemoralis | 287c3a4ab1 | |
Exhigh | 7c7d04133e | |
Plínio Larrubia | ad8373095a | |
Lizardy | aae6e5be73 | |
Batu | cd6b5abccf | |
Plínio Larrubia | 6520f3ca17 | |
Cristóbal Martí Méndez | d3b6b17c75 | |
Marcin Mitura | 0b5616c493 | |
georgemoralis | 3627393707 | |
nishinji | 6e340bcdc1 | |
psucien | 78e24852f8 | |
georgemoralis | 7f6d08a3c8 | |
nishinji | 7aa8cf992f | |
¥IGA | e16aa2a012 | |
greggameplayer | 86870e7c8d | |
Daniel R. | fae0c0ae85 | |
Yury | 5d7407dc7d | |
bigol83 | bcc3a10557 | |
psucien | 6fd4264b5d | |
DanielSvoboda | 2a737d0800 | |
psucien | b687ae5e34 | |
georgemoralis | c2ddfe51e1 | |
georgemoralis | abc7f55c06 | |
Dzmitry Dubrova | 26b5661dea | |
SaynedBread | 6a87c37aeb | |
SaynedBread | 5664d45305 | |
Dzmitry Dubrova | 21ce86003b | |
Dzmitry Dubrova | 83b43363fa | |
¥IGA | e603165e2b | |
Dzmitry Dubrova | 7766a653d5 | |
Dzmitry Dubrova | 3f445eca40 | |
SaynedBread | 41a93dcae4 | |
SaynedBread | 1e90f45941 | |
TheTurtle | c79b10edc1 | |
Vinicius Rangel | 9e4fc17e6c | |
georgemoralis | 208575d392 | |
georgemoralis | 8b0fd59149 | |
Vladislav Mikhalin | 41dec15869 | |
Exhigh | 6a84f6e188 | |
Herman Semenov | 243fd0be78 | |
Random | fc745ee767 | |
psucien | 2c540fbecb | |
georgemoralis | 0b3a88cf22 | |
Matthew Wells | 0ed4614464 | |
georgemoralis | 9852f95c58 | |
georgemoralis | df03783948 | |
¥IGA | 0c5b91e1fb | |
Herman Semenov | a0774c0e87 | |
Alexandre Bouvier | a71d0d8dbb | |
georgemoralis | fda2fdae69 | |
Exhigh | 6545b09b74 | |
georgemoralis | bce3a9c9e7 | |
georgemoralis | 3310fd9a1f | |
georgemoralis | 3e8d7c2040 | |
Xphalnos | d4be3dbb31 | |
georgemoralis | 83bcced16c | |
georgemoralis | 746559658c | |
georgemoralis | 12a65e3fb8 | |
georgemoralis | 834a25fa2b | |
Herman Semenov | aed9a737d6 | |
Aiden Turner | ca4b520272 | |
Vladislav Mikhalin | 79680c50c0 | |
georgemoralis | dfd305ff77 | |
Sebastian Kassai | ba0a6ab038 | |
georgemoralis | 132ca9c5a8 | |
georgemoralis | 3426ad8cc0 | |
Dzmitry Dubrova | 6d0d2eaa59 | |
squidbus | 9275b0966e | |
Borchev | fc300b5265 | |
Borchev | 6596fe091c | |
georgemoralis | 958db559c6 | |
TheTurtle | 3f9c86ad33 | |
Lizardy | 32cb3649d3 | |
xezrunner | 42c4d8353a | |
jdp_ | 6080649b7c | |
jdp_ | 34a1339a2b | |
jdp_ | e070dab2f0 | |
kotn3l | c60bfbe2a5 | |
georgemoralis | 95c89ca6a9 | |
georgemoralis | 8d90e6d997 | |
bax-cz | 0b3356bd1a | |
bax-cz | 8f7b3c2e8c | |
Random | 09da94b7b2 | |
¥IGA | 9d45b99171 | |
Dzmitry Dubrova | 1f416134e7 | |
bax-cz | 516a3e7104 | |
Lizardy | 138c9ce787 | |
georgemoralis | 360b7e1d71 | |
DanielSvoboda | d5e978c6f2 | |
georgemoralis | 09b71a9a3f | |
DanielSvoboda | c58ad6d3b5 | |
DanielSvoboda | c9a502b31a | |
georgemoralis | 5551c61000 | |
DanielSvoboda | ed96a9fb8e | |
DanielSvoboda | 5891900c6e | |
Vladislav Mikhalin | 1c898d0842 | |
Xphalnos | 70576035b0 | |
Lizardy | 63938ba8dd | |
¥IGA | 3be2e4b2b8 | |
georgemoralis | ecf7f36763 | |
georgemoralis | 43e92bb987 | |
Xphalnos | 73adc3ed1b | |
Stephen Miller | 2935ca0fef | |
Stephen Miller | 9fce6f7c01 | |
Stephen Miller | 93f14e8ae9 | |
Stephen Miller | 6510af90be | |
Stephen Miller | f36440dc09 | |
Stephen Miller | 786db80742 | |
Xphalnos | 558fcf6597 | |
Dzmitry Dubrova | dcb057dd7f | |
Dzmitry Dubrova | 9e810b7524 | |
TheTurtle | 1d1c88ad31 | |
Vinicius Rangel | ff33b00c3a | |
Alexandre Bouvier | 154771cca5 | |
Vinicius Rangel | 444cdfbba5 | |
Alexandre Bouvier | ad60ae1d40 | |
Herman Semenov | c1fb5d5bca | |
georgemoralis | 3197ad336e | |
Xphalnos | 910e96c420 | |
Vladislav Mikhalin | 23dddca1f0 | |
georgemoralis | 5c70adc6ab | |
squidbus | 62741434db | |
Vladislav Mikhalin | b3ef959b25 | |
Vladislav Mikhalin | 5c4ac98d49 | |
Vladislav Mikhalin | 0d6e8e227a | |
Vladislav Mikhalin | e33ff10212 | |
Vladislav Mikhalin | b5c69189e5 | |
georgemoralis | e96e66eedd | |
georgemoralis | da9b26fa1e | |
psucien | d32e584839 | |
¥IGA | 0b1d7839a3 | |
Vinicius Rangel | d45563f92c | |
¥IGA | a0fb47b0ab | |
¥IGA | 8c77d4dde6 | |
psucien | 9adc638220 | |
Dzmitry Dubrova | 6f4e1a47b9 | |
Stephen Miller | 5f963772a0 | |
TheTurtle | d332a5e611 | |
georgemoralis | 4b11dabd9e | |
Daniel R. | 6cc4a682fd | |
psucien | 27cb218584 | |
Samuel Fontes | ad3b6c793c | |
TheTurtle | d8b9d82ffa | |
counter185 | bb159eafb9 | |
squidbus | d1a033b6af | |
TheTurtle | 1fb0da9b89 | |
Vinicius Rangel | dfcfd62d4f | |
Lizardy | 5eecd089ab | |
Borchev | 18f1799280 | |
psucien | a8b6a55559 | |
squidbus | 284035d3e2 | |
psucien | a15a93997c | |
psucien | 2ba3221fc9 | |
psucien | 3d0fdf11f0 | |
psucien | ace39957ef | |
psucien | 3e2d4d6b79 | |
georgemoralis | 834e3a500e | |
georgemoralis | 924e9de97a | |
Dzmitry Dubrova | 3163cd135b | |
Dzmitry Dubrova | 96fb00d411 | |
Leonardo | 14947232a7 | |
georgemoralis | ea4ae56f4d | |
georgemoralis | 54b20e2938 | |
georgemoralis | 61a6f633fd | |
georgemoralis | d81dbc5b5b | |
georgemoralis | 425e5491a8 | |
Leonardo | 0d56be629b | |
Leonardo | 4375e6fa3a | |
georgemoralis | 250b2e4969 | |
georgemoralis | 6a2e09a1df | |
georgemoralis | 3ef69cae5e | |
georgemoralis | 7b7d1cb26f | |
georgemoralis | a83ac4c05e | |
georgemoralis | 816700d34d | |
georgemoralis | 4ffb812e94 | |
georgemoralis | 13331cdda9 | |
georgemoralis | 5a68224a13 | |
SleepingSnakezzz | ab56665d4b | |
Stephen Miller | 48c58d5ce0 | |
georgemoralis | 3943d13871 | |
georgemoralis | c96854f1f1 | |
georgemoralis | e5087877ae | |
georgemoralis | 14e56e267a | |
SamuelFontes | 564b2f6310 | |
SamuelFontes | 7e5cc6162c | |
georgemoralis | 81be8f270f | |
ElBread3 | 351f2e1073 | |
Xphalnos | 254b9ffb50 | |
IndecisiveTurtle | 3fd2abdd5b | |
TheTurtle | 341034fc30 | |
TheTurtle | 381ba8c7a5 | |
Leonardo | ddec111da6 | |
TheTurtle | 159be2c7f4 | |
DanielSvoboda | cdff4af38d | |
DanielSvoboda | 7308864537 | |
Xphalnos | 21462523de | |
Alexandre Bouvier | 6d0a763145 | |
georgemoralis | 9f2e73c1fd | |
georgemoralis | 305224650a | |
squidbus | be829389ea | |
squidbus | 56b362bb24 | |
georgemoralis | 54e831746d | |
georgemoralis | bd48e24c32 | |
georgemoralis | 62e501f31f | |
Xphalnos | a4e46c4362 | |
Xphalnos | 9968d03b90 | |
georgemoralis | 0ac9f8ffa4 | |
georgemoralis | a121e8e76a | |
Xphalnos | 205c0b961b | |
Dzmitry Dubrova | 0fe766db6c | |
Xphalnos | a7f2f09a44 | |
raziel1000 | 413402600b | |
raziel1000 | ec1335911b | |
raziel1000 | 51c89a9958 | |
raziel1000 | d017bab21e | |
raziel1000 | d7acb93d6f | |
TheTurtle | a7c9bfa5c5 | |
georgemoralis | ac6dc20c3b | |
Xphalnos | b3525d7f79 | |
Borchev | 361271826e | |
Borchev | 867f38fe13 | |
georgemoralis | c1d01709be | |
georgemoralis | 9b1092c995 | |
squidbus | 43d60a8ac9 | |
psucien | aa795f5c59 | |
Vasyl Baran | 3e6af54ea3 | |
Dzmitry Dubrova | aa7c8ca2b6 | |
DanielSvoboda | fb145342ce | |
psucien | 30198d5ffc | |
TheTurtle | 0d6edaa0a0 | |
Vinicius Rangel | 361412031c | |
Vinicius Rangel | 680192a0c4 | |
TheTurtle | d84b4adc83 | |
georgemoralis | b7c3ff932b | |
georgemoralis | 14e78591e8 | |
raziel1000 | 600a13c38f | |
georgemoralis | 2841eba538 | |
georgemoralis | a4912b8245 | |
georgemoralis | 64d305faeb | |
raziel1000 | a11ac5a687 | |
raziel1000 | fa76a723ad | |
georgemoralis | b62836d29f | |
georgemoralis | b4916ef2ca | |
raziel1000 | a475b38e5f | |
raziel1000 | f35518d527 | |
raziel1000 | f29293c9fb | |
raziel1000 | 02d4af27df | |
DanielSvoboda | b2ba84aa11 | |
TheTurtle | a2cd1669b6 | |
georgemoralis | bc28ed66e8 | |
georgemoralis | 8fa6a8c036 | |
IndecisiveTurtle | 8bb6c0ddf0 | |
Younes | 1d6a42c39a | |
DanielSvoboda | de6f703d7d | |
squidbus | de3864dba7 | |
georgemoralis | 0691e316e0 | |
VasylBaran | 4e81d91f88 | |
Foxi | f593204729 | |
georgemoralis | 7f990ea90d | |
squidbus | 54b5900498 | |
georgemoralis | 062ee9e092 | |
georgemoralis | fe9b07da54 | |
georgemoralis | 36ec7a1a43 | |
squidbus | 70708fc69b | |
squidbus | 615f4e770f | |
squidbus | 088130863b | |
squidbus | 43c0f313f2 | |
squidbus | 225ca3ac5b | |
squidbus | cf03743631 | |
squidbus | 426d82d07b | |
squidbus | b557de2c62 | |
squidbus | 26e0fc6ad5 | |
squidbus | fadf03909c | |
squidbus | 3e84d2b76c | |
squidbus | e2adbd75c3 | |
squidbus | f943ce2710 | |
squidbus | b3d97dcd89 | |
squidbus | 685b0bfd5e | |
squidbus | 4fd3af995e | |
squidbus | 68e1a6a596 | |
squidbus | e06039d727 | |
squidbus | 35bbbb1bd9 | |
squidbus | a4fd0d6386 | |
squidbus | 175ffe8ce3 | |
squidbus | 35d629a730 | |
squidbus | d9231b239c | |
squidbus | 6a6d5bad42 | |
squidbus | 66fa29059c | |
Borchev | 5419212088 | |
Borchev | f556f85279 | |
TheTurtle | 36d528743a | |
TheTurtle | 403a5a57b1 | |
psucien | 64459f1a76 | |
psucien | 2b52a17845 | |
TheTurtle | bfe3322977 | |
georgemoralis | 60b1aa62a3 | |
georgemoralis | fcc931956e | |
georgemoralis | d00a2465d5 | |
Vladislav Mikhalin | d0d7ef06e8 | |
georgemoralis | c578ccc435 | |
georgemoralis | 250bfbb494 | |
georgemoralis | 25e95c959a | |
Dzmitry Dubrova | 485d4fd0fb | |
georgemoralis | 384ea359ed | |
georgemoralis | 0ed9ea5b85 | |
georgemoralis | 439c0be9a6 | |
IndecisiveTurtle | 1208661d64 | |
IndecisiveTurtle | cd009cfec6 | |
IndecisiveTurtle | 53fb73e95f | |
IndecisiveTurtle | fcbaec51df | |
IndecisiveTurtle | 01dc7f5bfc | |
IndecisiveTurtle | b89941fbd9 | |
IndecisiveTurtle | 0408d8596d | |
IndecisiveTurtle | b6f011c8f6 | |
IndecisiveTurtle | c64694c673 | |
IndecisiveTurtle | 815ce11d2b | |
georgemoralis | 7ad44317f8 | |
Vladislav Mikhalin | f9e96793cc | |
georgemoralis | c6cdfcfb0b | |
squidbus | 3ff11818ab | |
TheTurtle | 0dda5eb6ef | |
TheTurtle | 3b0a5aed33 | |
georgemoralis | 0de914995f | |
IndecisiveTurtle | 3c8b3f9a29 | |
IndecisiveTurtle | 10a7110c7d | |
IndecisiveTurtle | 356b59b041 | |
IndecisiveTurtle | 0599f4e6a5 | |
georgemoralis | 0298889131 | |
georgemoralis | ba0be91c73 | |
IndecisiveTurtle | 58d1cbd9b7 | |
georgemoralis | c49afb4c17 | |
jas0n098 | 6ec4a3d1b9 | |
IndecisiveTurtle | ce6a01bd41 | |
IndecisiveTurtle | dbeed80e3b | |
IndecisiveTurtle | 26f8fbf628 | |
IndecisiveTurtle | 432defd992 | |
IndecisiveTurtle | 73d4aafc09 | |
IndecisiveTurtle | dd7d232ac3 | |
psucien | ed37fb32a7 | |
raziel1000 | 02cba0100d | |
georgemoralis | 056dcf52ca | |
georgemoralis | b07bbecab4 | |
georgemoralis | 4de9d9cf0d | |
raziel1000 | ecad6cd1a7 | |
georgemoralis | b4df90d8e4 | |
psucien | 034301de88 | |
psucien | 746792eda0 | |
psucien | dc50cc55fb | |
psucien | b8916787b2 | |
psucien | 8144f835a9 | |
Live session user | a1fbab5de7 | |
psucien | f041276b04 | |
Daniel R | 83c8204d23 | |
psucien | 1b94f07a6a | |
Daniel R. | 379e3b7607 | |
Daniel R. | 0649234fc2 | |
Daniel R | 547490a664 | |
Daniel R. | 88426e0399 | |
psucien | a75851f7e2 | |
georgemoralis | f3baad7fc8 | |
Daniel R. | 1421f82bf5 | |
Daniel R. | a049bd3135 | |
georgemoralis | 5f26bfc70c | |
Vladislav Mikhalin | 262bf3d337 | |
georgemoralis | 6a5855b645 | |
Daniel R | 914aa10875 | |
TreezZ | 090071bf16 | |
Vladislav Mikhalin | 989f88837d | |
georgemoralis | 59be090c83 | |
georgemoralis | 63795ddb3a | |
georgemoralis | 18f922b28b | |
psucien | ba5fb78c5a | |
psucien | d3e8e95334 | |
psucien | bad51953ac | |
psucien | 034b76eb33 | |
psucien | d6d2ed6e33 | |
psucien | 0bb5240202 | |
psucien | 465cb0413e | |
georgemoralis | ea7465a82d | |
Xphalnos | 999733f172 | |
Xphalnos | 820498c663 | |
Xphalnos | f3e188853d | |
georgemoralis | 5a078e3902 | |
georgemoralis | 5beb607435 | |
TreezZ | d156dda7b6 | |
Vinicius Rangel | 94d1a6b0b9 | |
georgemoralis | f420e33592 | |
DanielSvoboda | aef6d2e488 | |
DanielSvoboda | 63b0465a33 | |
psucien | ab6a1fb5f0 | |
TreezZ | 64e283c948 | |
Stolas | 2620919f0b | |
georgemoralis | 550e05b3ca | |
Vinicius Rangel | 574b8a458c | |
wheremyfoodat | f8c2dc0a18 | |
offtkp | 0619af24a7 | |
Vinicius Rangel | 6cc8381d62 | |
TheTurtle | a9f482cdfc | |
georgemoralis | 189033ae24 | |
psucien | 6dbb842bec | |
psucien | c7af8df2ad | |
psucien | 19c85c78cf | |
psucien | bf4bf4ccb2 | |
TheTurtle | 379ec554a8 | |
georgemoralis | 575acc4bd9 | |
psucien | 1d608427ed | |
DanielSvoboda | 971d2f02ef | |
DanielSvoboda | d9c1456f28 | |
georgemoralis | 3f3acc5543 | |
DanielSvoboda | 311ddbe2f9 | |
DanielSvoboda | f8e2b6d0cd | |
psucien | cfbe8b9e6d | |
psucien | 986ed0662c | |
DanielSvoboda | eff8a9e514 | |
georgemoralis | bf74888be4 | |
georgemoralis | d4d7e9f5f6 | |
DanielSvoboda | c3bf56f3eb | |
Xphalnos | a0aac5985e | |
TheTurtle | 38080b60af | |
DanielSvoboda | 56af77f1f4 | |
georgemoralis | 4ae879875e | |
georgemoralis | 134541bdcd | |
georgemoralis | 67af53fd58 | |
raziel1000 | 7ea87f69ea | |
Younes | 8ce6ed4b59 | |
TheTurtle | 3f123bbce2 | |
DanielSvoboda | 1d58a0403e | |
psucien | dd97b517f7 | |
TheTurtle | 6ceab6dfac | |
georgemoralis | 724869e088 | |
georgemoralis | a91c049754 | |
georgemoralis | fd39c50910 | |
georgemoralis | 8d17f87a08 | |
raziel1000 | bdcadf63d2 | |
raziel1000 | e22ad65e70 | |
raziel1000 | 1968b2aa81 | |
raziel1000 | c2c55fea87 | |
raziel1000 | 0ecc54032c | |
georgemoralis | 3875c00281 | |
georgemoralis | 0228b5861c | |
georgemoralis | 608301f86c | |
georgemoralis | af3bbc33e9 | |
georgemoralis | 94f83ad505 | |
georgemoralis | dc8d3b208c | |
georgemoralis | 33683cfdd7 | |
georgemoralis | afba6dbd66 | |
georgemoralis | 3b87c3c128 | |
IndecisiveTurtle | fe5bfa9d61 | |
IndecisiveTurtle | a603bc7d88 | |
georgemoralis | b2508c502b | |
IndecisiveTurtle | 2fe897eeda | |
Xphalnos | d424c65e8d | |
Xphalnos | 937bfc8018 | |
IndecisiveTurtle | 7d4f0da40e | |
IndecisiveTurtle | 20e83b4d53 | |
IndecisiveTurtle | 410ba37ec2 | |
IndecisiveTurtle | 7c7e9427ba | |
IndecisiveTurtle | 6774216038 | |
IndecisiveTurtle | b4d24d8737 | |
IndecisiveTurtle | 22b930ba5e | |
IndecisiveTurtle | ad10020836 | |
IndecisiveTurtle | 114f06d3f2 | |
IndecisiveTurtle | 10ef357f1f | |
IndecisiveTurtle | 5da79d4798 | |
georgemoralis | 1f83824a8a | |
psucien | f03262421e | |
georgemoralis | d2c1e58313 | |
georgemoralis | 90b27352f8 | |
georgemoralis | 24f78fac20 | |
psucien | 1f55eff9d8 | |
psucien | 14377b39b5 | |
georgemoralis | 1413a70a92 | |
georgemoralis | 8e01a1b6d8 | |
georgemoralis | d0278715cb | |
georgemoralis | 084b2ab6d5 | |
psucien | 2386b46726 | |
psucien | 9121ecf123 | |
psucien | 3663c60f3d | |
psucien | cc945fb92e | |
psucien | c4061c3b95 | |
georgemoralis | 0a33f8f799 | |
psucien | 2cbbcbd371 | |
georgemoralis | b3f15dfe2e | |
georgemoralis | 1e717ab046 | |
georgemoralis | a810e47876 | |
georgemoralis | e54d574241 | |
georgemoralis | 059f54838a | |
psucien | 7fd832b68c | |
georgemoralis | 0ada442cbc | |
psucien | 91940781b8 | |
Alexandre Bouvier | f5541e3c3d | |
georgemoralis | f522948df8 | |
georgemoralis | 521ff4d14b | |
IndecisiveTurtle | 550bfa1c88 | |
IndecisiveTurtle | c8ed338d5a | |
IndecisiveTurtle | c081663aac | |
IndecisiveTurtle | e94149340e | |
IndecisiveTurtle | 3a80df007e | |
IndecisiveTurtle | 4846704832 | |
IndecisiveTurtle | 9bd3898829 | |
IndecisiveTurtle | a2394109ee | |
psucien | 3532fd1c9c | |
psucien | 5ed0794c20 | |
georgemoralis | 8a617be3b7 | |
georgemoralis | 7ef11a7bd8 | |
georgemoralis | c511b1b0cf | |
georgemoralis | 84a39e2fb0 | |
Alexandre Bouvier | a2224a9b6b | |
georgemoralis | 8f45be7d44 | |
psucien | 9b3a89467e | |
georgemoralis | c8a149c983 | |
psucien | 3b2a312f15 | |
psucien | ff64dd74f6 | |
psucien | acc4ef7b4c | |
psucien | 8475a62a46 | |
georgemoralis | cee55355bf | |
georgemoralis | 52ff825171 | |
psucien | c04fbb75d8 | |
Xphalnos | 444e4d5336 | |
Xphalnos | 3f657b5f36 | |
psucien | 508d034263 | |
georgemoralis | 1b6cb32b34 | |
georgemoralis | 640354667e | |
georgemoralis | ad4db71e00 | |
georgemoralis | 6d2b2779ea | |
Xphalnos | c845b12990 | |
Xphalnos | 7fe5f12f29 | |
Xphalnos | acd9b57c88 | |
psucien | cb6b21de1f | |
georgemoralis | a9cbd8287c | |
georgemoralis | 94b9992d99 | |
georgemoralis | 32225f4a8b | |
georgemoralis | 11a3906243 | |
IndecisiveTurtle | 73d60b7e8d | |
IndecisiveTurtle | 11bfdf2348 | |
IndecisiveTurtle | 741427040f | |
IndecisiveTurtle | 30199fe701 | |
IndecisiveTurtle | 30351ad112 | |
IndecisiveTurtle | 2506a285f4 | |
IndecisiveTurtle | 7bdaeafdfd | |
IndecisiveTurtle | 8850c2f4be | |
georgemoralis | ce31fad222 | |
georgemoralis | 7519d4610c | |
georgemoralis | 19edb8155f | |
georgemoralis | 1b2c3ccc42 | |
georgemoralis | 49601f58ed | |
georgemoralis | 0325e4795a | |
georgemoralis | b17a57cb3d | |
georgemoralis | 91e6d35e89 | |
georgemoralis | 48d6ccd9bb | |
georgemoralis | 57c65cadb8 | |
georgemoralis | 9501bd77d4 | |
georgemoralis | 0aa29428e1 | |
georgemoralis | d9f2758850 | |
psucien | 5595da0a24 | |
psucien | abe2771c73 | |
psucien | 0c32ea242b | |
psucien | 396812bab6 | |
psucien | d3ab612bdc | |
psucien | ab4cc8b218 | |
psucien | 6e7fd21338 | |
psucien | 3f92a68129 | |
psucien | d054c3e0ad | |
psucien | be67fdc9c9 | |
psucien | 37ceea2314 | |
psucien | 54f8616d6a | |
psucien | 1fc86a6c9d | |
raziel1000 | 52f3b74fdd | |
TheTurtle | ca25333a1e | |
georgemoralis | 3552484b33 | |
psucien | b02ec385b2 | |
psucien | b2b45bf480 | |
psucien | b9602afc82 | |
psucien | e6f773f950 | |
psucien | bdb235716a | |
psucien | fd8ceacef7 | |
psucien | 37cbdad57b | |
psucien | a0fe34b01f | |
psucien | 142ad54876 | |
psucien | be6f523b6e | |
psucien | 1e69f83d9e | |
Younes | 0fa7d5d02c | |
TheTurtle | c5d1d579b1 | |
georgemoralis | 6a47f8ae50 | |
Xphalnos | d1f409f373 | |
Xphalnos | edf6724e74 | |
Xphalnos | eb22704771 | |
georgemoralis | 1a26983181 | |
raziel1000 | 080ec3e23e | |
TheTurtle | 31bd502764 | |
Xphalnos | e62690759d | |
georgemoralis | 400d910743 | |
georgemoralis | dfe2c345dc | |
psucien | 64569ff737 | |
georgemoralis | 8362e2c497 | |
Xphalnos | 7599ba1761 | |
psucien | 955752a24b | |
psucien | d7565dec57 | |
georgemoralis | 8612907831 | |
Xphalnos | ac0d073050 | |
georgemoralis | 991d44bde6 | |
Xphalnos | 7c7b617852 | |
georgemoralis | e8fa9e0e89 | |
psucien | 04b1226e9c | |
psucien | e89b2d1cdd | |
georgemoralis | bff2f006fb | |
georgemoralis | e3fd089881 | |
raziel1000 | 1abccb29f9 | |
raziel1000 | 0f27e0edf2 | |
psucien | cb2cf7d93c | |
psucien | 7fcb758da2 | |
psucien | c2dc7c3fd4 | |
Xphalnos | 71dda8c776 | |
TheTurtle | 8ce58389ad | |
TheTurtle | 7b1a317b09 | |
georgemoralis | 23f11a3fda | |
georgemoralis | e84d2cf9cf | |
georgemoralis | beb631607a | |
georgemoralis | 6f8d99fbf2 | |
georgemoralis | 3318f12639 | |
georgemoralis | 0c1ede1060 | |
georgemoralis | 81a1cbf6b1 | |
georgemoralis | deda3026d8 | |
georgemoralis | d89e4463e7 | |
georgemoralis | dfc4f1c35b | |
georgemoralis | 13cd22aea6 | |
georgemoralis | 4287bfcb91 | |
raphaelthegreat | 1092b1bcff | |
raphaelthegreat | fc887bf3f5 | |
psucien | 01f09cfa63 | |
Xphalnos | 623b1d6837 | |
psucien | fa73812f32 | |
Xphalnos | 1563dffd46 | |
georgemoralis | 1a66fa098f | |
raziel1000 | a790c30c28 | |
georgemoralis | ac192134e8 | |
psucien | eef05cf1f8 | |
psucien | d902339867 | |
georgemoralis | 908eaa102d | |
georgemoralis | 84dca0a5dd | |
georgemoralis | 2e6c28c34c | |
georgemoralis | 5be6777220 | |
georgemoralis | a1efcd9832 | |
raziel1000 | d3adcf2e6c | |
georgemoralis | c16275fe16 | |
raphaelthegreat | e9679f8309 | |
georgemoralis | 05e4a4b4e1 | |
georgemoralis | 8115665a90 | |
raziel1000 | 3b34aebe06 | |
psucien | edaeee194d | |
psucien | 9ca083ee06 | |
psucien | 9230d04a0a | |
georgemoralis | 5d24a961cb | |
TheTurtle | 998d046210 | |
georgemoralis | e5621759a2 | |
psucien | fe3b546d93 | |
psucien | dd5a25fda2 | |
psucien | e790ec775f | |
psucien | cfc297622f | |
psucien | b17b4ab787 | |
psucien | cb07778008 | |
psucien | 729d02d699 | |
psucien | 6814d5f108 | |
georgemoralis | 3faeba8f0c | |
raphaelthegreat | 5aa3a4d4a0 | |
raphaelthegreat | 705d326a6d | |
raphaelthegreat | ae7e6dafd5 | |
TheTurtle | 728249f58d | |
georgemoralis | 7d61b7ab9b | |
psucien | f9e5c70414 | |
psucien | b59e525408 | |
psucien | bee444b6da | |
psucien | 3a5ba82eae | |
psucien | 0b63a76b51 | |
psucien | 19994424c5 | |
psucien | 440a60a43b | |
psucien | 184b7b7fc2 | |
psucien | 2c87171b95 | |
georgemoralis | c936f8e2b9 | |
Xphalnos | 47323fa76d | |
Xphalnos | d52f8dbcad | |
Xphalnos | a48333bfac | |
psucien | cd87005ded | |
psucien | d491bbf366 | |
psucien | d7d324ac76 | |
psucien | 23cc60bf06 | |
psucien | 863d80c16c | |
georgemoralis | 4087a73145 | |
raphaelthegreat | 02a50265f8 | |
psucien | f624f7749c | |
georgemoralis | 8f9436080e | |
Xphalnos | 309e90783e | |
georgemoralis | 323e66f765 | |
georgemoralis | f292f551ae | |
georgemoralis | 3320156a27 | |
georgemoralis | e7e86c74ad | |
georgemoralis | 3d749bc904 | |
georgemoralis | 4749782a68 | |
georgemoralis | dc3ab91a76 | |
raphaelthegreat | dd91456b48 | |
georgemoralis | ff21750815 | |
psucien | 365df2a3ac | |
psucien | 8e6d492524 | |
psucien | 767e13cccb | |
psucien | 0212e68752 | |
psucien | 9227a2b868 | |
psucien | 3741f013a3 | |
psucien | d05cbd88bb | |
georgemoralis | 674bd4a2ed | |
raphaelthegreat | 58de7ff55a | |
georgemoralis | 10bceb1643 | |
psucien | 7fc273c6bc | |
psucien | 055dec1149 | |
psucien | a67b8f7a0b | |
psucien | 5f37a6be83 | |
psucien | db113bbc7b | |
psucien | e5486cc57f | |
psucien | fb237bddad | |
georgemoralis | efeb78f59c | |
georgemoralis | d30703b4eb | |
georgemoralis | 4d5e9d1da4 | |
georgemoralis | 1dfa91b638 | |
psucien | 5f67b59180 | |
raphaelthegreat | 4d728e943d | |
raphaelthegreat | d59b102b6f | |
georgemoralis | 729e166cd3 | |
psucien | 09c7379fe0 | |
TheTurtle | 8dfa5782b2 | |
psucien | 2963790e0d | |
TheTurtle | 3c90b8ac00 | |
georgemoralis | e9f64bb76c | |
psucien | 62fd72009b | |
psucien | 66b695f5c7 | |
psucien | d752aa5357 | |
georgemoralis | b0243dd3e5 | |
TheTurtle | 8730968385 | |
Xphalnos | 8cf64a33b2 | |
georgemoralis | b0978f4168 | |
georgemoralis | 0b8baedab7 | |
georgemoralis | 67c1772771 | |
georgemoralis | 42fb9f6473 | |
georgemoralis | 4b5e2e80fc | |
georgemoralis | cc98b11860 | |
georgemoralis | 43773d12d9 | |
georgemoralis | bb89b1c95a | |
psucien | aa88458ad8 | |
psucien | 45e73d324a | |
psucien | 133acdc120 | |
psucien | 8455574615 | |
psucien | 058e728e29 | |
psucien | 9ad7495661 | |
psucien | 85704e26a0 | |
georgemoralis | 3f692a4d7d | |
psucien | 64b2e58285 | |
psucien | dbdb3dc77e | |
psucien | 9df1a8d15b | |
georgemoralis | f881753944 | |
psucien | 38061ae636 | |
georgemoralis | 77cf875585 | |
psucien | 8c4f72f404 | |
psucien | 3d5be23671 | |
georgemoralis | c9b5b5e963 | |
TheTurtle | 55855b4195 | |
georgemoralis | 67f6d8b2e4 | |
georgemoralis | 266fa57c43 | |
georgemoralis | 1431731503 | |
georgemoralis | 074f3d3f88 | |
georgemoralis | 055ffff463 | |
psucien | 45e354fd77 | |
psucien | 8677972505 | |
georgemoralis | 932f0435e8 | |
georgemoralis | 413b67f8ce | |
georgemoralis | f1883870fd | |
georgemoralis | 99e4301dcc | |
georgemoralis | 882292f1ce | |
georgemoralis | 98316575fb | |
georgemoralis | 84de60a29a | |
georgemoralis | d0d84221fd | |
georgemoralis | d84752bfbb | |
georgemoralis | c70736d6b7 | |
georgemoralis | 64cabdadf2 | |
georgemoralis | 6196336533 | |
georgemoralis | 2038d179fe | |
georgemoralis | b326ce5f69 | |
psucien | d804a66aa2 | |
psucien | 37014394fd | |
psucien | b849b07442 | |
psucien | 59e7bbdec4 | |
psucien | 923baf0164 | |
psucien | 581688c1ac | |
georgemoralis | fc0288d1e5 | |
georgemoralis | a647f95ae5 | |
georgemoralis | e239df73b4 | |
psucien | 8e0c67f12e | |
georgemoralis | b00b849d3f | |
psucien | bfb18135fb | |
psucien | 498c5eb0cd | |
psucien | c7cfe2622d | |
psucien | 4746f514ff | |
psucien | 72ea0be9ff | |
Xphalnos | 93797af73f | |
psucien | 5f83ad2ecb | |
psucien | 50bcd13482 | |
psucien | 4206ec3c94 | |
georgemoralis | 96cf59efea | |
georgemoralis | 91dd175d6b | |
georgemoralis | 9dff1975a3 | |
georgemoralis | b32332956d | |
psucien | 1b811e08f1 | |
georgemoralis | 930f239556 | |
georgemoralis | 806781a110 | |
georgemoralis | ad6724eeba | |
georgemoralis | 277e16c7ba | |
georgemoralis | 2b9b3e76bf | |
Xphalnos | 235b6e8781 | |
georgemoralis | ce4bdee0aa | |
georgemoralis | e4d43f8e07 | |
georgemoralis | 7d6a717599 | |
georgemoralis | 150854c583 | |
georgemoralis | d2cc256b28 | |
georgemoralis | 90e3e47c4d | |
georgemoralis | 2f9f4e1eeb | |
georgemoralis | 2308d7f1d6 | |
georgemoralis | b0b73f1283 | |
georgemoralis | 6f1e488b37 | |
psucien | 7e8d90d609 | |
TheTurtle | 1b9bf924ca | |
TheTurtle | b94efcba5a | |
psucien | 2696733cad | |
georgemoralis | d496fab492 | |
georgemoralis | 0727775c88 | |
raphaelthegreat | 25c04ad42f | |
georgemoralis | 7d96308759 | |
psucien | 35777a9fb3 | |
psucien | 453b24eb20 | |
psucien | 249373bf0d | |
psucien | d2c53d0fde | |
psucien | 1047293bf2 | |
psucien | e0a4c3f1a3 | |
raphaelthegreat | 40c86b7688 | |
georgemoralis | fec7f6cdc2 | |
georgemoralis | 1275378e21 | |
georgemoralis | 7b5d8e5ff9 | |
georgemoralis | 096316619a | |
georgemoralis | 4394191fae | |
georgemoralis | de770bc668 | |
GPUCode | c01b6f8397 | |
georgemoralis | 5979fa74c5 | |
GPUCode | 0a94899c86 | |
GPUCode | 5e2ac6c72b | |
georgemoralis | e99129d72f | |
georgemoralis | 5ed4891a1f | |
georgemoralis | 6ca53f8b99 | |
georgemoralis | 6f1c2d3060 | |
georgemoralis | 7b16e9af23 | |
georgemoralis | 3a7834b821 | |
georgemoralis | bb8a400b7b | |
georgemoralis | b0cd6e5178 | |
georgemoralis | 598a6a88e0 | |
georgemoralis | 5663da21c2 | |
georgemoralis | ea4bb4773e | |
georgemoralis | fc5e133c44 | |
georgemoralis | 81143b4a9e | |
georgemoralis | 5409576197 | |
georgemoralis | c29f514e63 | |
georgemoralis | 935842291d | |
georgemoralis | a049d4c491 | |
georgemoralis | 121759d836 | |
georgemoralis | 33209a77f1 | |
georgemoralis | c832e3831a | |
georgemoralis | 2cc03e851e | |
georgemoralis | 0b8cc8eba9 | |
georgemoralis | 9d8fc61954 | |
georgemoralis | 6066c89607 | |
georgemoralis | 92e4c6b798 | |
georgemoralis | 0d49214da3 | |
georgemoralis | 06d6ad09ea | |
Jonah | 9af38c3309 | |
georgemoralis | 2382e77898 | |
georgemoralis | 03b3194c44 | |
georgemoralis | a21722a1db | |
georgemoralis | 186fa35f13 | |
georgemoralis | 0525481a9b | |
georgemoralis | 8fa5874fb1 | |
georgemoralis | ad7e750fa7 | |
georgemoralis | 30946e21dd | |
georgemoralis | 5373d7367d | |
georgemoralis | 94cd3be814 | |
georgemoralis | 0719e9c46f | |
georgemoralis | 8e8a82a310 | |
Xphalnos | f54e1f39cb | |
Jonah | c5e68ab819 | |
georgemoralis | 37813c1f59 | |
georgemoralis | b36df1383a | |
Jonah | aaa75a7ce1 | |
Jonah | 2007c0610e | |
Jonah | 0d1a1fae07 | |
raziel1000 | ca6f582ea8 | |
georgemoralis | 2d0414c365 | |
georgemoralis | b1e18529ac | |
Xphalnos | c78f3ad4c5 | |
georgemoralis | c3d26e92c6 | |
georgemoralis | b60a627d44 | |
georgemoralis | a1468c9d79 | |
whereismyfoodat | e272b152ed | |
georgemoralis | 9d4149f006 | |
georgemoralis | 489dd2c8fc | |
georgemoralis | 377d962478 | |
georgemoralis | da7b4df1c3 | |
georgemoralis | 683a0d55bf | |
georgemoralis | 1a7f5f7b31 | |
georgemoralis | bc7228fcb2 | |
georgemoralis | e5a224aa96 | |
georgemoralis | 7dbe258edc | |
georgemoralis | f70fbcac19 | |
georgemoralis | 354a9c3cdb | |
georgemoralis | 596831947e | |
georgemoralis | 365ae2aac9 | |
georgemoralis | f2f04142b0 | |
georgemoralis | 540c21d382 | |
georgemoralis | 63d8d4d833 | |
georgemoralis | 86911747bf | |
georgemoralis | 7799211100 | |
georgemoralis | 03e5cd2749 | |
georgemoralis | 4980aa3fd5 | |
georgemoralis | 7a42b9df79 | |
georgemoralis | 2e931c9f72 | |
georgemoralis | 2a03b4d03b | |
georgemoralis | 8c4f386641 | |
georgemoralis | 02dcf4d45c | |
Jonah | 00d401e103 | |
Younes | 8ba6d7add0 | |
Jonah | 12a8cf5ee9 | |
raziel1000 | 7e54255d29 | |
qurious-pixel | 58ae9c3ade | |
Younes | f2691d83b8 | |
qurious-pixel | 7425cb41a5 | |
georgemoralis | ffb2a583f9 | |
georgemoralis | 02cbebbf78 | |
georgemoralis | 99d013f612 | |
georgemoralis | 84b0aff35b | |
georgemoralis | 47e2619b51 | |
GPUCode | 79d6c8a377 | |
georgemoralis | b3084646a8 | |
georgemoralis | e40461b0c2 | |
qurious-pixel | 6e1f25d99f | |
georgemoralis | 08aba86ca1 | |
georgemoralis | d89653551e | |
GPUCode | 584b7d2b15 | |
GPUCode | 6f4c6ae0bb | |
georgemoralis | 32a5ff15bb | |
georgemoralis | 552d2da17a | |
georgemoralis | b62c44c914 | |
GPUCode | fe43558779 | |
georgemoralis | acfa56f6bc | |
Stefanos Kornilios Mitsis Poiitidis | a58289a353 | |
Stefanos Kornilios Mitsis Poiitidis | 6de4736e50 | |
georgemoralis | ff43fec76a | |
georgemoralis | 57ddf939d4 | |
Stefanos Kornilios Mitsis Poiitidis | 724c56d8aa | |
georgemoralis | af18453950 | |
georgemoralis | b6d98d4b72 | |
georgemoralis | 4f6dc8fddb | |
georgemoralis | f57f668c92 | |
georgemoralis | a298ddb057 | |
georgemoralis | 093ebb568c | |
georgemoralis | 103de64bba | |
georgemoralis | 3e8cd57986 | |
georgemoralis | 1316443c59 | |
georgemoralis | 776a680e85 | |
georgemoralis | cad5ac34b0 | |
georgemoralis | dde91c1c4d | |
georgemoralis | f3c189feb3 | |
georgemoralis | 8f8f0757af | |
georgemoralis | ae12f351f8 | |
wheremyfoodat | e8c425850e | |
georgemoralis | 7e6c741ed7 | |
georgemoralis | 420b917a0a | |
wheremyfoodat | 21c8150841 | |
georgemoralis | 7f0cf8784b | |
georgemoralis | 402ee7d006 | |
georgemoralis | dbaf38dc7d | |
georgemoralis | 5f825fc8a8 | |
georgemoralis | 7fcea3277d | |
georgemoralis | 11edfecb75 | |
georgemoralis | a10af46153 | |
georgemoralis | 91885e8a41 | |
georgemoralis | 86bc2d427f | |
georgemoralis | a01e057632 | |
GPUCode | 79c9d9ebd1 | |
GPUCode | 099d01f96c | |
GPUCode | 369d92fa56 | |
georgemoralis | 89cf4dbfcb | |
GPUCode | 7bccfeb8cc | |
GPUCode | 1cf032eeb1 | |
GPUCode | 303f086b14 | |
GPUCode | 996aa9d17a | |
GPUCode | a0b80893db | |
GPUCode | 17aefc1aef | |
GPUCode | 6e28ac711f |
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 Citra Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dist/*.desktop \
|
||||
dist/*.svg dist/*.xml; then
|
||||
echo Trailing whitespace found, aborting
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Default clang-format points to default 3.5 version one
|
||||
CLANG_FORMAT=clang-format-17
|
||||
$CLANG_FORMAT --version
|
||||
|
||||
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
||||
# Get list of every file modified in this pull request
|
||||
files_to_lint="$(git diff --name-only --diff-filter=ACMRTUXB $COMMIT_RANGE | grep '^src/[^.]*[.]\(cpp\|h\)$' || true)"
|
||||
else
|
||||
# Check everything for branch pushes
|
||||
files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"
|
||||
fi
|
||||
|
||||
# Turn off tracing for this because it's too verbose
|
||||
set +x
|
||||
|
||||
for f in $files_to_lint; do
|
||||
d=$(diff -u "$f" <($CLANG_FORMAT "$f") || true)
|
||||
if ! [ -z "$d" ]; then
|
||||
echo "!!! $f not compliant to coding style, here is the fix:"
|
||||
echo "$d"
|
||||
fail=1
|
||||
fi
|
||||
done
|
||||
|
||||
set -x
|
||||
|
||||
if [ "$fail" = 1 ]; then
|
||||
exit 1
|
||||
fi
|
|
@ -1,7 +0,0 @@
|
|||
BasedOnStyle: Google
|
||||
IndentWidth: 4
|
||||
ColumnLimit: 150
|
||||
AccessModifierOffset: -2
|
||||
TabWidth: 4
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
|
@ -1,50 +0,0 @@
|
|||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install dev packages
|
||||
run: |
|
||||
sudo apt install libxext-dev doxygen libgl-dev
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel `nproc`
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: shadps4-ubuntu64
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
path: |
|
||||
${{github.workspace}}/build/shadps4
|
||||
${{github.workspace}}/build/libSDL3.so.0.0.0
|
|
@ -0,0 +1,30 @@
|
|||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z $GITHUB_WORKSPACE ]]; then
|
||||
GITHUB_WORKSPACE="${PWD%/*}"
|
||||
fi
|
||||
|
||||
export Qt6_DIR="/usr/lib/qt6"
|
||||
export PATH="$Qt6_DIR/bin:$PATH"
|
||||
|
||||
# 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-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
|
||||
chmod a+x linuxdeploy-x86_64.AppImage
|
||||
chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
|
||||
|
||||
# Build AppImage
|
||||
./linuxdeploy-x86_64.AppImage --appdir AppDir
|
||||
./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir
|
||||
|
||||
cp -a "$GITHUB_WORKSPACE/build/translations" AppDir/usr/bin
|
||||
|
||||
./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
|
|
@ -0,0 +1,21 @@
|
|||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z $GITHUB_WORKSPACE ]]; then
|
||||
GITHUB_WORKSPACE="${PWD%/*}"
|
||||
fi
|
||||
|
||||
# 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-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
|
||||
chmod a+x linuxdeploy-x86_64.AppImage
|
||||
chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
|
||||
# Build AppImage
|
||||
./linuxdeploy-x86_64.AppImage --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
|
||||
mv Shadps4-x86_64.AppImage Shadps4-sdl.AppImage
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=Shadps4
|
||||
Exec=shadps4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=shadps4
|
||||
Comment=shadps4 emulator
|
||||
Categories=Game;
|
||||
StartupWMClass=shadps4;
|
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
|
@ -0,0 +1,17 @@
|
|||
# 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
|
|
@ -0,0 +1,28 @@
|
|||
# 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
|
|
@ -0,0 +1,41 @@
|
|||
# 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 qt6-tools-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
|
|
@ -0,0 +1,48 @@
|
|||
# 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
|
|
@ -0,0 +1,61 @@
|
|||
# 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 qttools
|
||||
|
||||
- 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
|
||||
mv ${{github.workspace}}/build/translations 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
|
|
@ -0,0 +1,52 @@
|
|||
# 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-sdl.tar.gz -C upload .
|
||||
|
||||
- name: Upload executable
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shadps4-macos-sdl
|
||||
path: shadps4-macos-sdl.tar.gz
|
|
@ -0,0 +1,50 @@
|
|||
# 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 qttools
|
||||
|
||||
- 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
|
||||
move build/translations upload
|
||||
windeployqt --dir upload upload/shadPS4.exe
|
||||
|
||||
- name: Upload executable
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shadps4-win64-qt
|
||||
path: upload
|
|
@ -1,7 +1,5 @@
|
|||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: Windows
|
||||
|
||||
|
@ -12,36 +10,25 @@ on:
|
|||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
- name: Upload executable
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shadps4-win64
|
||||
# A file, directory or wildcard pattern that describes what to upload
|
||||
name: shadps4-win64-sdl
|
||||
path: |
|
||||
${{github.workspace}}/build/Release/shadps4.exe
|
||||
${{github.workspace}}/build/Release/SDL3.dll
|
||||
${{github.workspace}}/build/Release/libwinpthread-1.dll
|
||||
${{github.workspace}}/build/Release/shadPS4.exe
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
|
@ -405,3 +408,4 @@ FodyWeavers.xsd
|
|||
/emulator/eboot.bin
|
||||
/out/*
|
||||
/third-party/out/*
|
||||
/src/common/scm_rev.cpp
|
||||
|
|
|
@ -1,43 +1,87 @@
|
|||
[submodule "third-party/imgui"]
|
||||
path = third-party/imgui
|
||||
url = https://github.com/ocornut/imgui
|
||||
[submodule "externals/cryptopp-cmake"]
|
||||
path = externals/cryptopp-cmake
|
||||
url = https://github.com/shadps4-emu/ext-cryptopp-cmake.git
|
||||
shallow = true
|
||||
[submodule "third-party/SDL"]
|
||||
path = third-party/SDL
|
||||
url = https://github.com/libsdl-org/SDL
|
||||
[submodule "externals/cryptopp"]
|
||||
path = externals/cryptopp
|
||||
url = https://github.com/shadps4-emu/ext-cryptopp.git
|
||||
shallow = true
|
||||
[submodule "third-party/fmt"]
|
||||
path = third-party/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
[submodule "externals/cryptoppwin"]
|
||||
path = externals/cryptoppwin
|
||||
url = https://github.com/shadps4-emu/ext-cryptoppwin.git
|
||||
shallow = true
|
||||
[submodule "third-party/spdlog"]
|
||||
path = third-party/spdlog
|
||||
url = https://github.com/gabime/spdlog
|
||||
[submodule "externals/zlib-ng"]
|
||||
path = externals/zlib-ng
|
||||
url = https://github.com/shadps4-emu/ext-zlib-ng.git
|
||||
shallow = true
|
||||
[submodule "third-party/magic_enum"]
|
||||
path = third-party/magic_enum
|
||||
[submodule "externals/sdl3"]
|
||||
path = externals/sdl3
|
||||
url = https://github.com/shadps4-emu/ext-SDL.git
|
||||
shallow = true
|
||||
[submodule "externals/fmt"]
|
||||
path = externals/fmt
|
||||
url = https://github.com/shadps4-emu/ext-fmt.git
|
||||
shallow = true
|
||||
[submodule "externals/vulkan-headers"]
|
||||
path = externals/vulkan-headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
shallow = true
|
||||
[submodule "externals/vma"]
|
||||
path = externals/vma
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
shallow = true
|
||||
[submodule "externals/glslang"]
|
||||
path = externals/glslang
|
||||
url = https://github.com/KhronosGroup/glslang.git
|
||||
shallow = true
|
||||
[submodule "externals/robin-map"]
|
||||
path = externals/robin-map
|
||||
url = https://github.com/Tessil/robin-map.git
|
||||
shallow = true
|
||||
[submodule "externals/xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
shallow = true
|
||||
[submodule "externals/winpthreads"]
|
||||
path = externals/winpthreads
|
||||
url = https://github.com/shadps4-emu/winpthreads.git
|
||||
shallow = true
|
||||
[submodule "externals/magic_enum"]
|
||||
path = externals/magic_enum
|
||||
url = https://github.com/Neargye/magic_enum.git
|
||||
shallow = true
|
||||
[submodule "third-party/zydis"]
|
||||
path = third-party/zydis
|
||||
[submodule "externals/toml11"]
|
||||
path = externals/toml11
|
||||
url = https://github.com/ToruNiina/toml11.git
|
||||
shallow = true
|
||||
[submodule "externals/zydis"]
|
||||
path = externals/zydis
|
||||
url = https://github.com/zyantific/zydis.git
|
||||
shallow = true
|
||||
[submodule "third-party/winpthread"]
|
||||
path = third-party/winpthread
|
||||
url = https://github.com/shadps4/winpthread.git
|
||||
branch = main
|
||||
[submodule "third-party/discord-rpc"]
|
||||
path = third-party/discord-rpc
|
||||
url = https://github.com/discord/discord-rpc
|
||||
[submodule "third-party/toml11"]
|
||||
path = third-party/toml11
|
||||
url = https://github.com/ToruNiina/toml11
|
||||
branch = master
|
||||
[submodule "third-party/vulkan"]
|
||||
path = third-party/vulkan
|
||||
url = https://github.com/shadps4/vulkan.git
|
||||
branch = main
|
||||
[submodule "third-party/xxHash"]
|
||||
path = third-party/xxHash
|
||||
[submodule "externals/sirit"]
|
||||
path = externals/sirit
|
||||
url = https://github.com/shadps4-emu/sirit.git
|
||||
shallow = true
|
||||
[submodule "externals/xxhash"]
|
||||
path = externals/xxhash
|
||||
url = https://github.com/Cyan4973/xxHash.git
|
||||
branch = dev
|
||||
shallow = true
|
||||
[submodule "externals/tracy"]
|
||||
path = externals/tracy
|
||||
url = https://github.com/shadps4-emu/tracy.git
|
||||
shallow = true
|
||||
[submodule "externals/ext-boost"]
|
||||
path = externals/ext-boost
|
||||
url = https://github.com/shadps4-emu/ext-boost.git
|
||||
shallow = true
|
||||
[submodule "externals/date"]
|
||||
path = externals/date
|
||||
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
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
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/about_icon.png
|
||||
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
|
789
CMakeLists.txt
789
CMakeLists.txt
|
@ -1,122 +1,727 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
cmake_minimum_required(VERSION 3.16.3)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
if(APPLE)
|
||||
enable_language(OBJC)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 11)
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
project(shadps4)
|
||||
project(shadPS4)
|
||||
|
||||
include_directories(third-party/)
|
||||
include_directories(third-party/discord-rpc/include)
|
||||
include_directories(third-party/imgui/)
|
||||
include_directories(third-party/imgui/backends)
|
||||
include_directories(third-party/sdl/)
|
||||
include_directories(third-party/fmt/include)
|
||||
include_directories(third-party/magic_enum/include)
|
||||
include_directories(third-party/zydis/include/Zydis)
|
||||
include_directories(third-party/winpthread/include)
|
||||
include_directories(third-party/vulkan/include)
|
||||
include_directories(third-party/xxhash/include)
|
||||
include_directories(third-party/result/include)
|
||||
add_subdirectory("third-party")
|
||||
#=================== EXAMPLE ===================
|
||||
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
|
||||
|
||||
# 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.
|
||||
function(create_target_directory_groups target_name)
|
||||
|
||||
# Place any files that aren't in the source list in a separate group so that they don't get in the way.
|
||||
source_group("Other Files" REGULAR_EXPRESSION ".")
|
||||
|
||||
get_target_property(target_sources "${target_name}" SOURCES)
|
||||
|
||||
foreach(file_name IN LISTS target_sources)
|
||||
get_filename_component(dir_name "${file_name}" PATH)
|
||||
# Group names use '\' as a separator even though the entire rest of CMake uses '/'...
|
||||
string(REPLACE "/" "\\" group_name "${dir_name}")
|
||||
source_group("${group_name}" FILES "${file_name}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Setup a custom clang-format target (if clang-format can be found) that will run
|
||||
# against all the src files. This should be used before making a pull request.
|
||||
if (CLANG_FORMAT)
|
||||
set(SRCS ${PROJECT_SOURCE_DIR}/src)
|
||||
set(CCOMMENT "Running clang format against all the .h and .cpp files in src/")
|
||||
if (WIN32)
|
||||
add_custom_target(clang-format
|
||||
COMMAND powershell.exe -Command "Get-ChildItem '${SRCS}/*' -Include *.cpp,*.h,*.mm -Recurse | Foreach {&'${CLANG_FORMAT}' -i $_.fullname}"
|
||||
COMMENT ${CCOMMENT})
|
||||
else()
|
||||
add_custom_target(clang-format
|
||||
COMMAND find ${SRCS} -iname *.h -o -iname *.cpp -o -iname *.mm | xargs ${CLANG_FORMAT} -i
|
||||
COMMENT ${CCOMMENT})
|
||||
endif()
|
||||
unset(SRCS)
|
||||
unset(CCOMMENT)
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
# generate git revision information
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules/")
|
||||
include(GetGitRevisionDescription)
|
||||
get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
||||
git_describe(GIT_DESC --always --long --dirty)
|
||||
git_branch_name(GIT_BRANCH)
|
||||
|
||||
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(FFmpeg 5.1.2 MODULE)
|
||||
find_package(fmt 10.2.0 CONFIG)
|
||||
find_package(glslang 14.2.0 CONFIG)
|
||||
find_package(magic_enum 0.9.6 CONFIG)
|
||||
find_package(RenderDoc 1.6.0 MODULE)
|
||||
find_package(SDL3 3.1.2 CONFIG)
|
||||
find_package(toml11 4.2.0 CONFIG)
|
||||
find_package(tsl-robin-map 1.3.0 CONFIG)
|
||||
find_package(VulkanHeaders 1.3.289 CONFIG)
|
||||
find_package(VulkanMemoryAllocator 3.1.0 CONFIG)
|
||||
find_package(xbyak 7.07 CONFIG)
|
||||
find_package(xxHash 0.8.2 MODULE)
|
||||
find_package(zlib-ng 2.1.7 MODULE)
|
||||
find_package(Zydis 5.0.0 CONFIG)
|
||||
|
||||
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT MSVC)
|
||||
find_package(cryptopp 8.9.0 MODULE)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
find_package(date 3.0.1 CONFIG)
|
||||
endif()
|
||||
|
||||
# Note: Windows always has these functions through winpthreads
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(pthread_mutex_timedlock "pthread.h" HAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||
if(HAVE_PTHREAD_MUTEX_TIMEDLOCK OR WIN32)
|
||||
add_compile_options(-DHAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
# 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()
|
||||
|
||||
add_subdirectory(externals)
|
||||
include_directories(src)
|
||||
|
||||
set(LIBC_SOURCES src/core/hle/libraries/Libc/Libc.cpp
|
||||
src/core/hle/libraries/Libc/Libc.h
|
||||
src/core/hle/libraries/Libc/printf.h
|
||||
src/core/hle/libraries/Libc/va_ctx.h
|
||||
src/core/hle/libraries/Libc/libc_cxa.cpp
|
||||
src/core/hle/libraries/Libc/libc_cxa.h
|
||||
src/core/hle/libraries/libc/libc_stdio.cpp
|
||||
src/core/hle/libraries/libc/libc_stdio.h
|
||||
src/core/hle/libraries/libc/libc_math.cpp
|
||||
src/core/hle/libraries/libc/libc_math.h
|
||||
src/core/hle/libraries/libc/libc_string.cpp
|
||||
src/core/hle/libraries/libc/libc_string.h
|
||||
src/core/hle/libraries/libc/libc_stdlib.cpp
|
||||
src/core/hle/libraries/libc/libc_stdlib.h
|
||||
)
|
||||
set(USERSERVICE_SOURCES src/core/hle/libraries/libuserservice/user_service.cpp
|
||||
src/core/hle/libraries/libuserservice/user_service.h
|
||||
if(ENABLE_QT_GUI)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent LinguistTools Network)
|
||||
qt_standard_project_setup()
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOMOC 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()
|
||||
|
||||
set(AUDIO_CORE src/audio_core/sdl_audio.cpp
|
||||
src/audio_core/sdl_audio.h
|
||||
)
|
||||
|
||||
set(PAD_SOURCES src/core/hle/libraries/libpad/pad.cpp
|
||||
src/core/hle/libraries/libpad/pad.h
|
||||
set(AUDIO_LIB src/core/libraries/audio/audioin.cpp
|
||||
src/core/libraries/audio/audioin.h
|
||||
src/core/libraries/audio/audioout.cpp
|
||||
src/core/libraries/audio/audioout.h
|
||||
src/core/libraries/ajm/ajm.cpp
|
||||
src/core/libraries/ajm/ajm.h
|
||||
src/core/libraries/ngs2/ngs2.cpp
|
||||
src/core/libraries/ngs2/ngs2.h
|
||||
)
|
||||
|
||||
set(SYSTEMSERVICE_SOURCES src/core/hle/libraries/libsystemservice/system_service.cpp
|
||||
src/core/hle/libraries/libsystemservice/system_service.h
|
||||
set(GNM_LIB src/core/libraries/gnmdriver/gnmdriver.cpp
|
||||
src/core/libraries/gnmdriver/gnmdriver.h
|
||||
src/core/libraries/gnmdriver/gnm_error.h
|
||||
)
|
||||
|
||||
set(FILESYSTEM_SOURCES src/core/hle/libraries/libkernel/file_system.cpp
|
||||
src/core/hle/libraries/libkernel/file_system.h
|
||||
|
||||
|
||||
set(KERNEL_LIB
|
||||
src/core/libraries/kernel/event_flag/event_flag.cpp
|
||||
src/core/libraries/kernel/event_flag/event_flag.h
|
||||
src/core/libraries/kernel/event_flag/event_flag_obj.cpp
|
||||
src/core/libraries/kernel/event_flag/event_flag_obj.h
|
||||
src/core/libraries/kernel/threads/rwlock.cpp
|
||||
src/core/libraries/kernel/threads/semaphore.cpp
|
||||
src/core/libraries/kernel/threads/keys.cpp
|
||||
src/core/libraries/kernel/threads/threads.h
|
||||
src/core/libraries/kernel/cpu_management.cpp
|
||||
src/core/libraries/kernel/cpu_management.h
|
||||
src/core/libraries/kernel/event_queue.cpp
|
||||
src/core/libraries/kernel/event_queue.h
|
||||
src/core/libraries/kernel/event_queues.cpp
|
||||
src/core/libraries/kernel/event_queues.h
|
||||
src/core/libraries/kernel/file_system.cpp
|
||||
src/core/libraries/kernel/file_system.h
|
||||
src/core/libraries/kernel/libkernel.cpp
|
||||
src/core/libraries/kernel/libkernel.h
|
||||
src/core/libraries/kernel/memory_management.cpp
|
||||
src/core/libraries/kernel/memory_management.h
|
||||
src/core/libraries/kernel/thread_management.cpp
|
||||
src/core/libraries/kernel/thread_management.h
|
||||
src/core/libraries/kernel/time_management.cpp
|
||||
src/core/libraries/kernel/time_management.h
|
||||
)
|
||||
|
||||
set(HOST_SOURCES src/Emulator/Host/controller.cpp
|
||||
src/Emulator/Host/controller.h
|
||||
set(NETWORK_LIBS src/core/libraries/network/http.cpp
|
||||
src/core/libraries/network/http.h
|
||||
src/core/libraries/network/net.cpp
|
||||
src/core/libraries/network/netctl.cpp
|
||||
src/core/libraries/network/netctl.h
|
||||
src/core/libraries/network/net.h
|
||||
src/core/libraries/network/ssl.cpp
|
||||
src/core/libraries/network/ssl.h
|
||||
)
|
||||
|
||||
set(UTIL_SOURCES src/Emulator/Util/singleton.h
|
||||
set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp
|
||||
src/core/libraries/system/commondialog.h
|
||||
src/core/libraries/system/msgdialog.cpp
|
||||
src/core/libraries/system/msgdialog.h
|
||||
src/core/libraries/system/posix.cpp
|
||||
src/core/libraries/system/posix.h
|
||||
src/core/libraries/save_data/error_codes.h
|
||||
src/core/libraries/save_data/savedata.cpp
|
||||
src/core/libraries/save_data/savedata.h
|
||||
src/core/libraries/system/savedatadialog.cpp
|
||||
src/core/libraries/system/savedatadialog.h
|
||||
src/core/libraries/system/sysmodule.cpp
|
||||
src/core/libraries/system/sysmodule.h
|
||||
src/core/libraries/system/systemservice.cpp
|
||||
src/core/libraries/system/systemservice.h
|
||||
src/core/libraries/system/userservice.cpp
|
||||
src/core/libraries/system/userservice.h
|
||||
src/core/libraries/app_content/app_content.cpp
|
||||
src/core/libraries/app_content/app_content.h
|
||||
src/core/libraries/rtc/rtc.cpp
|
||||
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.h
|
||||
src/core/libraries/disc_map/disc_map_codes.h
|
||||
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/ngs2/ngs2.cpp
|
||||
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
|
||||
)
|
||||
|
||||
add_executable(shadps4
|
||||
set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h
|
||||
src/core/libraries/videoout/driver.cpp
|
||||
src/core/libraries/videoout/driver.h
|
||||
src/core/libraries/videoout/video_out.cpp
|
||||
src/core/libraries/videoout/video_out.h
|
||||
)
|
||||
|
||||
set(LIBC_SOURCES src/core/libraries/libc_internal/libc_internal.cpp
|
||||
src/core/libraries/libc_internal/libc_internal.h
|
||||
)
|
||||
|
||||
set(DIALOGS_LIB src/core/libraries/dialogs/error_dialog.cpp
|
||||
src/core/libraries/dialogs/error_dialog.h
|
||||
src/core/libraries/dialogs/ime_dialog.cpp
|
||||
src/core/libraries/dialogs/ime_dialog.h
|
||||
src/core/libraries/dialogs/error_codes.h
|
||||
)
|
||||
|
||||
set(PAD_LIB src/core/libraries/pad/pad.cpp
|
||||
src/core/libraries/pad/pad.h
|
||||
)
|
||||
|
||||
set(PNG_LIB src/core/libraries/libpng/pngdec.cpp
|
||||
src/core/libraries/libpng/pngdec.h
|
||||
)
|
||||
|
||||
set(PLAYGO_LIB src/core/libraries/playgo/playgo.cpp
|
||||
src/core/libraries/playgo/playgo.h
|
||||
src/core/libraries/playgo/playgo_types.h
|
||||
)
|
||||
|
||||
set(RANDOM_LIB src/core/libraries/random/random.cpp
|
||||
src/core/libraries/random/random.h
|
||||
src/core/libraries/random/random_error.h
|
||||
)
|
||||
|
||||
set(USBD_LIB src/core/libraries/usbd/usbd.cpp
|
||||
src/core/libraries/usbd/usbd.h
|
||||
)
|
||||
|
||||
set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp
|
||||
src/core/libraries/np_manager/np_manager.h
|
||||
src/core/libraries/np_score/np_score.cpp
|
||||
src/core/libraries/np_score/np_score.h
|
||||
src/core/libraries/np_trophy/np_trophy.cpp
|
||||
src/core/libraries/np_trophy/np_trophy.h
|
||||
)
|
||||
|
||||
set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp
|
||||
src/core/libraries/screenshot/screenshot.h
|
||||
)
|
||||
|
||||
set(COMMON src/common/logging/backend.cpp
|
||||
src/common/logging/backend.h
|
||||
src/common/logging/filter.cpp
|
||||
src/common/logging/filter.h
|
||||
src/common/logging/formatter.h
|
||||
src/common/logging/log_entry.h
|
||||
src/common/logging/log.h
|
||||
src/common/logging/text_formatter.cpp
|
||||
src/common/logging/text_formatter.h
|
||||
src/common/logging/types.h
|
||||
src/common/alignment.h
|
||||
src/common/assert.cpp
|
||||
src/common/assert.h
|
||||
src/common/bit_field.h
|
||||
src/common/bounded_threadsafe_queue.h
|
||||
src/common/concepts.h
|
||||
src/common/config.cpp
|
||||
src/common/config.h
|
||||
src/common/debug.h
|
||||
src/common/disassembler.cpp
|
||||
src/common/disassembler.h
|
||||
src/common/endian.h
|
||||
src/common/enum.h
|
||||
src/common/io_file.cpp
|
||||
src/common/io_file.h
|
||||
src/common/error.cpp
|
||||
src/common/error.h
|
||||
src/common/scope_exit.h
|
||||
src/common/func_traits.h
|
||||
src/common/native_clock.cpp
|
||||
src/common/native_clock.h
|
||||
src/common/path_util.cpp
|
||||
src/common/path_util.h
|
||||
src/common/object_pool.h
|
||||
src/common/polyfill_thread.h
|
||||
src/common/rdtsc.cpp
|
||||
src/common/rdtsc.h
|
||||
src/common/singleton.h
|
||||
src/common/slot_vector.h
|
||||
src/common/string_util.cpp
|
||||
src/common/string_util.h
|
||||
src/common/thread.cpp
|
||||
src/common/thread.h
|
||||
src/common/types.h
|
||||
src/common/uint128.h
|
||||
src/common/unique_function.h
|
||||
src/common/version.h
|
||||
src/common/ntapi.h
|
||||
src/common/ntapi.cpp
|
||||
src/common/scm_rev.cpp
|
||||
src/common/scm_rev.h
|
||||
)
|
||||
|
||||
set(CORE src/core/aerolib/stubs.cpp
|
||||
src/core/aerolib/stubs.h
|
||||
src/core/aerolib/aerolib.cpp
|
||||
src/core/aerolib/aerolib.h
|
||||
src/core/address_space.cpp
|
||||
src/core/address_space.h
|
||||
src/core/cpu_patches.cpp
|
||||
src/core/cpu_patches.h
|
||||
src/core/crypto/crypto.cpp
|
||||
src/core/crypto/crypto.h
|
||||
src/core/crypto/keys.h
|
||||
src/core/file_format/pfs.h
|
||||
src/core/file_format/pkg.cpp
|
||||
src/core/file_format/pkg.h
|
||||
src/core/file_format/pkg_type.cpp
|
||||
src/core/file_format/pkg_type.h
|
||||
src/core/file_format/psf.cpp
|
||||
src/core/file_format/psf.h
|
||||
src/core/file_format/playgo_chunk.cpp
|
||||
src/core/file_format/playgo_chunk.h
|
||||
src/core/file_format/trp.cpp
|
||||
src/core/file_format/trp.h
|
||||
src/core/file_format/splash.h
|
||||
src/core/file_format/splash.cpp
|
||||
src/core/file_sys/fs.cpp
|
||||
src/core/file_sys/fs.h
|
||||
src/core/loader.cpp
|
||||
src/core/loader.h
|
||||
src/core/loader/dwarf.cpp
|
||||
src/core/loader/dwarf.h
|
||||
src/core/loader/elf.cpp
|
||||
src/core/loader/elf.h
|
||||
src/core/loader/symbols_resolver.h
|
||||
src/core/loader/symbols_resolver.cpp
|
||||
src/core/libraries/error_codes.h
|
||||
src/core/libraries/libs.h
|
||||
src/core/libraries/libs.cpp
|
||||
${AUDIO_LIB}
|
||||
${GNM_LIB}
|
||||
${KERNEL_LIB}
|
||||
${NETWORK_LIBS}
|
||||
${SYSTEM_LIBS}
|
||||
${LIBC_SOURCES}
|
||||
${USERSERVICE_SOURCES}
|
||||
${PAD_SOURCES}
|
||||
${SYSTEMSERVICE_SOURCES}
|
||||
${FILESYSTEM_SOURCES}
|
||||
${HOST_SOURCES}
|
||||
${UTIL_SOURCES}
|
||||
src/Lib/Timer.cpp
|
||||
src/Lib/Timer.h
|
||||
src/main.cpp
|
||||
src/types.h
|
||||
src/core/FsFile.cpp
|
||||
src/core/FsFile.h
|
||||
src/core/PS4/Loader/Elf.cpp
|
||||
src/core/PS4/Loader/Elf.h
|
||||
src/GUI/ElfViewer.cpp
|
||||
src/GUI/ElfViewer.h
|
||||
src/Util/log.h
|
||||
src/Util/log.cpp
|
||||
src/Util/config.cpp
|
||||
src/Util/config.h
|
||||
${PAD_LIB}
|
||||
${VIDEOOUT_LIB}
|
||||
${NP_LIBS}
|
||||
${PNG_LIB}
|
||||
${PLAYGO_LIB}
|
||||
${RANDOM_LIB}
|
||||
${USBD_LIB}
|
||||
${MISC_LIBS}
|
||||
${DIALOGS_LIB}
|
||||
src/core/linker.cpp
|
||||
src/core/linker.h
|
||||
src/core/memory.cpp
|
||||
src/core/memory.h
|
||||
src/core/module.cpp
|
||||
src/core/module.h
|
||||
src/core/platform.h
|
||||
src/core/tls.cpp
|
||||
src/core/tls.h
|
||||
src/core/virtual_memory.cpp
|
||||
src/core/virtual_memory.h
|
||||
src/core/PS4/Linker.cpp
|
||||
src/core/PS4/Linker.h
|
||||
src/core/PS4/Stubs.cpp
|
||||
src/core/PS4/Stubs.h
|
||||
src/core/PS4/Util/aerolib.cpp
|
||||
src/core/PS4/HLE/Kernel/Objects/physical_memory.h
|
||||
src/core/PS4/HLE/Kernel/Objects/physical_memory.cpp
|
||||
src/Util/string_util.cpp
|
||||
src/Util/string_util.cpp
|
||||
src/core/PS4/HLE/Graphics/video_out.cpp
|
||||
src/core/PS4/HLE/Graphics/video_out.h
|
||||
src/discord.h
|
||||
src/discord.cpp
|
||||
src/core/PS4/HLE/Kernel/event_queues.cpp
|
||||
src/core/PS4/HLE/Kernel/event_queues.h
|
||||
src/core/PS4/HLE/Kernel/cpu_management.cpp
|
||||
src/core/PS4/HLE/Kernel/cpu_management.h
|
||||
)
|
||||
|
||||
set(SHADER_RECOMPILER src/shader_recompiler/exception.h
|
||||
src/shader_recompiler/profile.h
|
||||
src/shader_recompiler/recompiler.cpp
|
||||
src/shader_recompiler/recompiler.h
|
||||
src/shader_recompiler/runtime_info.h
|
||||
src/shader_recompiler/backend/spirv/emit_spirv.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv.h
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_bitwise_conversion.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_composite.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_convert.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
|
||||
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_logical.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_special.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_undefined.cpp
|
||||
src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp
|
||||
src/shader_recompiler/backend/spirv/spirv_emit_context.cpp
|
||||
src/shader_recompiler/backend/spirv/spirv_emit_context.h
|
||||
src/shader_recompiler/frontend/translate/data_share.cpp
|
||||
src/shader_recompiler/frontend/translate/export.cpp
|
||||
src/shader_recompiler/frontend/translate/scalar_alu.cpp
|
||||
src/shader_recompiler/frontend/translate/scalar_memory.cpp
|
||||
src/shader_recompiler/frontend/translate/translate.cpp
|
||||
src/shader_recompiler/frontend/translate/translate.h
|
||||
src/shader_recompiler/frontend/translate/vector_alu.cpp
|
||||
src/shader_recompiler/frontend/translate/vector_interpolation.cpp
|
||||
src/shader_recompiler/frontend/translate/vector_memory.cpp
|
||||
src/shader_recompiler/frontend/control_flow_graph.cpp
|
||||
src/shader_recompiler/frontend/control_flow_graph.h
|
||||
src/shader_recompiler/frontend/decode.cpp
|
||||
src/shader_recompiler/frontend/decode.h
|
||||
src/shader_recompiler/frontend/fetch_shader.cpp
|
||||
src/shader_recompiler/frontend/fetch_shader.h
|
||||
src/shader_recompiler/frontend/format.cpp
|
||||
src/shader_recompiler/frontend/instruction.cpp
|
||||
src/shader_recompiler/frontend/instruction.h
|
||||
src/shader_recompiler/frontend/opcodes.h
|
||||
src/shader_recompiler/frontend/structured_control_flow.cpp
|
||||
src/shader_recompiler/frontend/structured_control_flow.h
|
||||
src/shader_recompiler/ir/passes/constant_propagation_pass.cpp
|
||||
src/shader_recompiler/ir/passes/dead_code_elimination_pass.cpp
|
||||
src/shader_recompiler/ir/passes/identity_removal_pass.cpp
|
||||
src/shader_recompiler/ir/passes/ir_passes.h
|
||||
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/shader_info_collection_pass.cpp
|
||||
src/shader_recompiler/ir/passes/ssa_rewrite_pass.cpp
|
||||
src/shader_recompiler/ir/abstract_syntax_list.h
|
||||
src/shader_recompiler/ir/attribute.cpp
|
||||
src/shader_recompiler/ir/attribute.h
|
||||
src/shader_recompiler/ir/basic_block.cpp
|
||||
src/shader_recompiler/ir/basic_block.h
|
||||
src/shader_recompiler/ir/condition.h
|
||||
src/shader_recompiler/ir/ir_emitter.cpp
|
||||
src/shader_recompiler/ir/ir_emitter.h
|
||||
src/shader_recompiler/ir/microinstruction.cpp
|
||||
src/shader_recompiler/ir/opcodes.cpp
|
||||
src/shader_recompiler/ir/opcodes.h
|
||||
src/shader_recompiler/ir/opcodes.inc
|
||||
src/shader_recompiler/ir/post_order.cpp
|
||||
src/shader_recompiler/ir/post_order.h
|
||||
src/shader_recompiler/ir/program.cpp
|
||||
src/shader_recompiler/ir/program.h
|
||||
src/shader_recompiler/ir/reg.h
|
||||
src/shader_recompiler/ir/type.cpp
|
||||
src/shader_recompiler/ir/type.h
|
||||
src/shader_recompiler/ir/value.cpp
|
||||
src/shader_recompiler/ir/value.h
|
||||
)
|
||||
|
||||
set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp
|
||||
src/video_core/amdgpu/liverpool.h
|
||||
src/video_core/amdgpu/pixel_format.cpp
|
||||
src/video_core/amdgpu/pixel_format.h
|
||||
src/video_core/amdgpu/pm4_cmds.h
|
||||
src/video_core/amdgpu/pm4_opcodes.h
|
||||
src/video_core/amdgpu/resource.h
|
||||
src/video_core/amdgpu/default_context.cpp
|
||||
src/video_core/buffer_cache/buffer.cpp
|
||||
src/video_core/buffer_cache/buffer.h
|
||||
src/video_core/buffer_cache/buffer_cache.cpp
|
||||
src/video_core/buffer_cache/buffer_cache.h
|
||||
src/video_core/buffer_cache/memory_tracker_base.h
|
||||
src/video_core/buffer_cache/range_set.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.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.h
|
||||
src/video_core/renderer_vulkan/vk_compute_pipeline.cpp
|
||||
src/video_core/renderer_vulkan/vk_compute_pipeline.h
|
||||
src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp
|
||||
src/video_core/renderer_vulkan/vk_descriptor_update_queue.h
|
||||
src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
|
||||
src/video_core/renderer_vulkan/vk_graphics_pipeline.h
|
||||
src/video_core/renderer_vulkan/vk_instance.cpp
|
||||
src/video_core/renderer_vulkan/vk_instance.h
|
||||
src/video_core/renderer_vulkan/vk_master_semaphore.cpp
|
||||
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.h
|
||||
src/video_core/renderer_vulkan/vk_platform.cpp
|
||||
src/video_core/renderer_vulkan/vk_platform.h
|
||||
src/video_core/renderer_vulkan/vk_rasterizer.cpp
|
||||
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.h
|
||||
src/video_core/renderer_vulkan/vk_scheduler.cpp
|
||||
src/video_core/renderer_vulkan/vk_scheduler.h
|
||||
src/video_core/renderer_vulkan/vk_shader_cache.cpp
|
||||
src/video_core/renderer_vulkan/vk_shader_cache.h
|
||||
src/video_core/renderer_vulkan/vk_shader_util.cpp
|
||||
src/video_core/renderer_vulkan/vk_shader_util.h
|
||||
src/video_core/renderer_vulkan/vk_swapchain.cpp
|
||||
src/video_core/renderer_vulkan/vk_swapchain.h
|
||||
src/video_core/texture_cache/image.cpp
|
||||
src/video_core/texture_cache/image.h
|
||||
src/video_core/texture_cache/image_info.cpp
|
||||
src/video_core/texture_cache/image_info.h
|
||||
src/video_core/texture_cache/image_view.cpp
|
||||
src/video_core/texture_cache/image_view.h
|
||||
src/video_core/texture_cache/sampler.cpp
|
||||
src/video_core/texture_cache/sampler.h
|
||||
src/video_core/texture_cache/texture_cache.cpp
|
||||
src/video_core/texture_cache/texture_cache.h
|
||||
src/video_core/texture_cache/tile_manager.cpp
|
||||
src/video_core/texture_cache/tile_manager.h
|
||||
src/video_core/texture_cache/types.h
|
||||
src/video_core/page_manager.cpp
|
||||
src/video_core/page_manager.h
|
||||
src/video_core/multi_level_page_table.h
|
||||
src/video_core/renderdoc.cpp
|
||||
src/video_core/renderdoc.h
|
||||
)
|
||||
|
||||
"src/Util/Disassembler.cpp" "src/Util/Disassembler.h" "src/core/PS4/Util/aerolib.h" "src/core/PS4/Loader/SymbolsResolver.h" "src/core/PS4/Loader/SymbolsResolver.cpp" "src/core/PS4/HLE/Libs.cpp" "src/core/PS4/HLE/Libs.h" "src/core/PS4/HLE/LibKernel.cpp" "src/core/PS4/HLE/LibKernel.h" "src/core/PS4/HLE/LibSceGnmDriver.cpp" "src/core/PS4/HLE/LibSceGnmDriver.h" "src/core/PS4/HLE/Kernel/ThreadManagement.cpp" "src/core/PS4/HLE/Kernel/ThreadManagement.h" "src/core/PS4/HLE/ErrorCodes.h" "src/debug.h" "src/core/PS4/HLE/Kernel/memory_management.cpp" "src/core/PS4/HLE/Kernel/memory_management.h" "src/core/PS4/GPU/gpu_memory.cpp" "src/core/PS4/GPU/gpu_memory.h" "src/emulator.cpp" "src/emulator.h" "src/core/PS4/HLE/Kernel/Objects/event_queue.h" "src/core/PS4/HLE/Kernel/Objects/event_queue.cpp" "src/core/PS4/HLE/Graphics/Objects/video_out_ctx.cpp" "src/core/PS4/HLE/Graphics/Objects/video_out_ctx.h" "src/core/PS4/HLE/Graphics/graphics_ctx.h" "src/vulkan_util.cpp" "src/vulkan_util.h" "src/core/PS4/GPU/video_out_buffer.cpp" "src/core/PS4/GPU/video_out_buffer.h" "src/core/PS4/HLE/Graphics/graphics_render.cpp" "src/core/PS4/HLE/Graphics/graphics_render.h" "src/core/PS4/GPU/tile_manager.cpp" "src/core/PS4/GPU/tile_manager.h" "src/version.h" "src/emuTimer.cpp" "src/emuTimer.h" "src/core/hle/libraries/libkernel/time_management.cpp" "src/core/hle/libraries/libkernel/time_management.h")
|
||||
set(INPUT src/input/controller.cpp
|
||||
src/input/controller.h
|
||||
)
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
target_link_libraries(shadps4 PUBLIC fmt mincore spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY} vulkan-1 spirv-tools-opt spirv-tools)
|
||||
set(EMULATOR src/emulator.cpp
|
||||
src/emulator.h
|
||||
src/sdl_window.h
|
||||
src/sdl_window.cpp
|
||||
)
|
||||
|
||||
add_custom_command(TARGET shadps4 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_FILE:SDL3-shared>
|
||||
$<TARGET_FILE_DIR:shadps4>)
|
||||
add_custom_command(TARGET shadps4 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${PROJECT_SOURCE_DIR}/third-party/winpthread/bin/libwinpthread-1.dll" $<TARGET_FILE_DIR:shadps4>)
|
||||
# The above is shared in SDL and Qt version (TODO share them all)
|
||||
|
||||
if(ENABLE_QT_GUI)
|
||||
qt_add_resources(RESOURCE_FILES src/shadps4.qrc)
|
||||
|
||||
set(QT_GUI src/qt_gui/about_dialog.cpp
|
||||
src/qt_gui/about_dialog.h
|
||||
src/qt_gui/about_dialog.ui
|
||||
src/qt_gui/cheats_patches.cpp
|
||||
src/qt_gui/cheats_patches.h
|
||||
src/qt_gui/memory_patcher.cpp
|
||||
src/qt_gui/memory_patcher.h
|
||||
src/qt_gui/main_window_ui.h
|
||||
src/qt_gui/main_window.cpp
|
||||
src/qt_gui/main_window.h
|
||||
src/qt_gui/gui_context_menus.h
|
||||
src/qt_gui/game_list_utils.h
|
||||
src/qt_gui/game_info.cpp
|
||||
src/qt_gui/game_info.h
|
||||
src/qt_gui/game_list_frame.cpp
|
||||
src/qt_gui/game_list_frame.h
|
||||
src/qt_gui/game_grid_frame.cpp
|
||||
src/qt_gui/game_grid_frame.h
|
||||
src/qt_gui/game_install_dialog.cpp
|
||||
src/qt_gui/game_install_dialog.h
|
||||
src/qt_gui/pkg_viewer.cpp
|
||||
src/qt_gui/pkg_viewer.h
|
||||
src/qt_gui/trophy_viewer.cpp
|
||||
src/qt_gui/trophy_viewer.h
|
||||
src/qt_gui/elf_viewer.cpp
|
||||
src/qt_gui/elf_viewer.h
|
||||
src/qt_gui/main_window_themes.cpp
|
||||
src/qt_gui/main_window_themes.h
|
||||
src/qt_gui/settings_dialog.cpp
|
||||
src/qt_gui/settings_dialog.h
|
||||
src/qt_gui/settings_dialog.ui
|
||||
src/qt_gui/main.cpp
|
||||
${EMULATOR}
|
||||
${RESOURCE_FILES}
|
||||
${TRANSLATIONS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if (ENABLE_QT_GUI)
|
||||
qt_add_executable(shadps4
|
||||
${AUDIO_CORE}
|
||||
${INPUT}
|
||||
${QT_GUI}
|
||||
${COMMON}
|
||||
${CORE}
|
||||
${SHADER_RECOMPILER}
|
||||
${VIDEO_CORE}
|
||||
${EMULATOR}
|
||||
src/images/shadPS4.icns
|
||||
)
|
||||
else()
|
||||
add_executable(shadps4
|
||||
${AUDIO_CORE}
|
||||
${INPUT}
|
||||
${COMMON}
|
||||
${CORE}
|
||||
${SHADER_RECOMPILER}
|
||||
${VIDEO_CORE}
|
||||
${EMULATOR}
|
||||
src/main.cpp
|
||||
src/emulator.cpp
|
||||
src/emulator.h
|
||||
src/sdl_window.h
|
||||
src/sdl_window.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
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 FFmpeg::ffmpeg)
|
||||
target_link_libraries(shadps4 PRIVATE Boost::headers GPUOpen::VulkanMemoryAllocator sirit Vulkan::Headers xxHash::xxhash Zydis::Zydis glslang::SPIRV glslang::glslang SDL3::SDL3)
|
||||
|
||||
if (APPLE)
|
||||
# Reserve system-managed memory space.
|
||||
target_link_options(shadps4 PRIVATE -Wl,-no_pie,-no_fixup_chains,-no_huge,-pagezero_size,0x400000,-segaddr,GUEST_SYSTEM,0x400000,-image_base,0x10000000000)
|
||||
|
||||
# Link MoltenVK for Vulkan support
|
||||
find_library(MOLTENVK MoltenVK REQUIRED)
|
||||
target_link_libraries(shadps4 PRIVATE ${MOLTENVK})
|
||||
|
||||
# Replacement for std::chrono::time_zone
|
||||
target_link_libraries(shadps4 PRIVATE date::date-tz)
|
||||
|
||||
# Half float conversions for F16C patches
|
||||
target_link_libraries(shadps4 PRIVATE half)
|
||||
endif()
|
||||
|
||||
if (NOT ENABLE_QT_GUI)
|
||||
target_link_libraries(shadps4 PRIVATE SDL3::SDL3)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
||||
target_link_libraries(shadps4 PRIVATE cryptoppwin zlib-ng::zlib)
|
||||
else()
|
||||
target_link_libraries(shadps4 PRIVATE cryptopp::cryptopp zlib-ng::zlib)
|
||||
endif()
|
||||
|
||||
if (ENABLE_QT_GUI)
|
||||
target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network)
|
||||
add_definitions(-DENABLE_QT_GUI)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
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)
|
||||
endif()
|
||||
|
||||
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
||||
|
||||
if (MSVC)
|
||||
# Needed for conflicts with time.h of windows.h
|
||||
add_definitions(-D_TIMESPEC_DEFINED)
|
||||
endif()
|
||||
|
||||
# Target Windows 10 RS5
|
||||
add_definitions(-DNTDDI_VERSION=0x0A000006 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
||||
|
||||
if (MSVC)
|
||||
target_link_libraries(shadps4 PRIVATE clang_rt.builtins-x86_64.lib)
|
||||
endif()
|
||||
|
||||
# Disable ASLR so we can reserve the user area
|
||||
if (MSVC)
|
||||
target_link_options(shadps4 PRIVATE /DYNAMICBASE:NO)
|
||||
else()
|
||||
target_link_options(shadps4 PRIVATE -Wl,--disable-dynamicbase)
|
||||
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()
|
||||
|
||||
if (WIN32)
|
||||
target_sources(shadps4 PRIVATE src/shadps4.rc)
|
||||
endif()
|
||||
|
||||
add_definitions(-DBOOST_ASIO_STANDALONE)
|
||||
|
||||
target_include_directories(shadps4 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# Shaders sources
|
||||
set(HOST_SHADERS_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src/video_core/host_shaders)
|
||||
|
||||
add_subdirectory(${HOST_SHADERS_INCLUDE})
|
||||
add_dependencies(shadps4 host_shaders)
|
||||
target_include_directories(shadps4 PRIVATE ${HOST_SHADERS_INCLUDE})
|
||||
|
||||
if (ENABLE_QT_GUI)
|
||||
set_target_properties(shadps4 PROPERTIES
|
||||
# WIN32_EXECUTABLE ON
|
||||
MACOSX_BUNDLE ON
|
||||
MACOSX_BUNDLE_ICON_FILE shadPS4.icns)
|
||||
|
||||
set_source_files_properties(src/images/shadPS4.icns PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources)
|
||||
endif()
|
||||
|
|
|
@ -1,22 +1,33 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "x64-Clang-Debug",
|
||||
"name": "x64-Clang-Release",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"configurationType": "Release",
|
||||
"buildRoot": "${projectDir}\\Build\\${name}",
|
||||
"installRoot": "${projectDir}\\Install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ]
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-Release",
|
||||
"name": "x64-Clang-Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"buildRoot": "${projectDir}\\Build\\${name}",
|
||||
"installRoot": "${projectDir}\\Install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "clang_cl_x64_x64" ]
|
||||
},
|
||||
{
|
||||
"name": "x64-Clang-RelWithDebInfo",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "RelWithDebInfo",
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"buildRoot": "${projectDir}\\Build\\${name}",
|
||||
"installRoot": "${projectDir}\\Install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
# Style guidelines
|
||||
|
||||
## General Rules
|
||||
|
||||
* Line width is typically 100 characters. Please do not use 80-characters.
|
||||
* Don't ever introduce new external dependencies into Core
|
||||
* Don't use any platform specific code in Core
|
||||
* Use namespaces often
|
||||
* Avoid the use of C-style casts and instead prefer C++-style static_cast and reinterpret_cast. Try to avoid using dynamic_cast. Never use const_cast except for when dealing with external const-incorrect APIs.
|
||||
|
||||
## Naming Rules
|
||||
|
||||
* Functions: `PascalCase`
|
||||
* Variables: `lower_case_underscored. Prefix with g_ if global.`
|
||||
* Classes: `PascalCase`
|
||||
* Files and Directories: `lower_case_underscored`
|
||||
* Namespaces: `PascalCase`, `_` may also be used for clarity (e.g. `ARM_InitCore`)
|
||||
|
||||
# Indentation/Whitespace Style
|
||||
|
||||
Follow the indentation/whitespace style shown below. Do not use tabs, use 4-spaces instead.
|
||||
|
||||
# Comments
|
||||
|
||||
* For regular comments, use C++ style (//) comments, even for multi-line ones.
|
||||
* For doc-comments (Doxygen comments), use /// if it's a single line, else use the /** */ style featured in the example. Start the text on the second line, not the first containing /**.
|
||||
* For items that are both defined and declared in two separate files, put the doc-comment only next to the associated declaration. (In a header file, usually.) Otherwise, put it next to the implementation. Never duplicate doc-comments in both places.
|
||||
|
||||
```c++
|
||||
// Includes should be sorted lexicographically
|
||||
// STD includes first
|
||||
#include <array>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
// then, library includes
|
||||
#include <nihstro/shared_binary.h>
|
||||
|
||||
// finally, shadps4 includes
|
||||
#include "common/math_util.h"
|
||||
#include "common/vector_math.h"
|
||||
|
||||
// each major module is separated
|
||||
#include "video_core/pica.h"
|
||||
#include "video_core/video_core.h"
|
||||
|
||||
namespace Example {
|
||||
|
||||
// Namespace contents are not indented
|
||||
|
||||
// Declare globals at the top (better yet, don't use globals at all!)
|
||||
int g_foo{}; // {} can be used to initialize types as 0, false, or nullptr
|
||||
char* g_some_pointer{}; // Pointer * and reference & stick to the type name, and make sure to initialize as nullptr!
|
||||
|
||||
/// A colorful enum.
|
||||
enum class SomeEnum {
|
||||
Red, ///< The color of fire.
|
||||
Green, ///< The color of grass.
|
||||
Blue, ///< Not actually the color of water.
|
||||
};
|
||||
|
||||
/**
|
||||
* Very important struct that does a lot of stuff.
|
||||
* Note that the asterisks are indented by one space to align to the first line.
|
||||
*/
|
||||
struct Position {
|
||||
// Always initialize member variables!
|
||||
int x{};
|
||||
int y{};
|
||||
};
|
||||
|
||||
// Use "typename" rather than "class" here
|
||||
template <typename T>
|
||||
void FooBar() {
|
||||
const std::string some_string{"prefer uniform initialization"};
|
||||
|
||||
const std::array<int, 4> some_array{
|
||||
5,
|
||||
25,
|
||||
7,
|
||||
42,
|
||||
};
|
||||
|
||||
if (note == the_space_after_the_if) {
|
||||
CallAFunction();
|
||||
} else {
|
||||
// Use a space after the // when commenting
|
||||
}
|
||||
|
||||
// Place a single space after the for loop semicolons, prefer pre-increment
|
||||
for (int i = 0; i != 25; ++i) {
|
||||
// This is how we write loops
|
||||
}
|
||||
|
||||
DoStuff(this, function, call, takes, up, multiple,
|
||||
lines, like, this);
|
||||
|
||||
if (this || condition_takes_up_multiple &&
|
||||
lines && like && this || everything ||
|
||||
alright || then) {
|
||||
|
||||
// Leave a blank space before the if block body if the condition was continued across
|
||||
// several lines.
|
||||
}
|
||||
|
||||
// No indentation for case labels
|
||||
switch (var) {
|
||||
case 1: {
|
||||
const int case_var{var + 3};
|
||||
DoSomething(case_var);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
DoSomething(var);
|
||||
return;
|
||||
default:
|
||||
// Yes, even break for the last case
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Example
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
Copyright (c) <year> <owner>.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,7 @@
|
|||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.
|
||||
|
||||
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,121 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
|
@ -0,0 +1,117 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
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.
|
173
README.md
173
README.md
|
@ -1,66 +1,163 @@
|
|||
# shadPS4
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
An early PS4 emulator for Windows and Linux written in C++
|
||||
by shadow , skmp , wheremyfoodat , GPUCode
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<a href="https://shadps4.net/"><img src="https://github.com/shadps4-emu/shadPS4/blob/main/.github/shadps4.png" width="220"></a>
|
||||
<br>
|
||||
<b>shadPS4</b>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
[Check us on twitter](https://twitter.com/shadps4 "Check us on twitter")
|
||||
<h1 align="center">
|
||||
<a href="https://discord.gg/MyZRaBngxA">
|
||||
<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">
|
||||
<img src="https://img.shields.io/github/downloads/shadps4-emu/shadPS4/total.svg" width="140">
|
||||
<a href="https://shadps4.net/">
|
||||
<img src="https://img.shields.io/badge/shadPS4-website-8A2BE2" width="150">
|
||||
<a href="https://x.com/shadps4">
|
||||
<img src="https://img.shields.io/badge/-Join%20us-black?logo=X&logoColor=white" width="100">
|
||||
<a href="https://github.com/shadps4-emu/shadPS4/stargazers">
|
||||
<img src="https://img.shields.io/github/stars/shadps4-emu/shadPS4" width="120">
|
||||
</h1>
|
||||
|
||||
<p align="center">
|
||||
<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/Bloodborne.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/We are DOOMED.png" width="400">
|
||||
</p>
|
||||
|
||||
# General information
|
||||
|
||||
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).
|
||||
|
||||
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/MyZRaBngxA).
|
||||
|
||||
To get the latest news, go to our [**X (Twitter)**](https://x.com/shadps4) or our [**website**](https://shadps4.net/).
|
||||
|
||||
# Status
|
||||
|
||||
Early progress , a small amount of ps4 sdk demos and homebrew games working
|
||||
> [!IMPORTANT]
|
||||
> shadPS4 is early in developement, don't expect a flawless experience.
|
||||
|
||||
![](https://geps.dev/progress/60) Elf Loader
|
||||
Currently, the emulator successfully runs small games like [**Sonic Mania**](https://www.youtube.com/watch?v=AAHoNzhHyCU), [**Undertale**](https://youtu.be/5zIvdy65Ro4) and it can even *somewhat* run [**Bloodborne**](https://www.youtube.com/watch?v=wC6s0avpQRE).
|
||||
|
||||
![](https://geps.dev/progress/80) Logging system
|
||||
# Why
|
||||
|
||||
![](https://geps.dev/progress/10) Everything else
|
||||
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.
|
||||
|
||||
# Why?
|
||||
|
||||
The project started as a fun project. Due to short free time, it will probably take a while since it will be able to run something decent, but I am trying to do regular small commits.
|
||||
|
||||
# Build
|
||||
# Building
|
||||
|
||||
## Windows
|
||||
|
||||
Check building instructions in [windows build](https://github.com/georgemoralis/shadPS4/blob/main/documents/building-windows.md)
|
||||
Check the build instructions for [**Windows**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-windows.md).
|
||||
|
||||
## Linux
|
||||
|
||||
Check building instructions in [linux build](https://github.com/georgemoralis/shadPS4/blob/main/documents/linux_building.md)
|
||||
Check the build instructions for [**Linux**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md).
|
||||
|
||||
## Build status
|
||||
## Building status
|
||||
|
||||
|Platform|Build status|
|
||||
|--------|------------|
|
||||
|Windows build|[![Windows](https://github.com/georgemoralis/shadPS4/actions/workflows/windows.yml/badge.svg)](https://github.com/georgemoralis/shadPS4/actions/workflows/windows.yml)
|
||||
<details>
|
||||
<summary><b>Windows</b></summary>
|
||||
|
||||
To discuss the development of this emulator, please join our Discord server: [![Discord](https://img.shields.io/discord/1080089157554155590)](https://discord.gg/MyZRaBngxA)
|
||||
| Windows | Build status |
|
||||
|--------|--------|
|
||||
|Windows SDL Build|[![Windows-sdl](https://github.com/shadps4-emu/shadPS4/actions/workflows/windows.yml/badge.svg)](https://github.com/shadps4-emu/shadPS4/actions/workflows/windows.yml)
|
||||
|Windows Qt Build|[![Windows-qt](https://github.com/shadps4-emu/shadPS4/actions/workflows/windows-qt.yml/badge.svg)](https://github.com/shadps4-emu/shadPS4/actions/workflows/windows-qt.yml)
|
||||
</details>
|
||||
|
||||
# Who are you?
|
||||
<details>
|
||||
<summary><b>Linux</b></summary>
|
||||
|
||||
Old emulator fans and devs can recognize me as "shadow". I was the founder and coder for a lot of emulation projects:
|
||||
* PCSX
|
||||
* PCSX2
|
||||
* PCSP
|
||||
* JPCSP
|
||||
* arcadeflex
|
||||
* rpcs3 contributor
|
||||
| Linux | Build status |
|
||||
|--------|--------|
|
||||
|Linux SDL Build|[![Linux-sdl](https://github.com/shadps4-emu/shadPS4/actions/workflows/linux.yml/badge.svg)](https://github.com/shadps4-emu/shadPS4/actions/workflows/linux.yml)
|
||||
|Linux Qt Build|[![Linux-qt](https://github.com/shadps4-emu/shadPS4/actions/workflows/linux-qt.yml/badge.svg)](https://github.com/shadps4-emu/shadPS4/actions/workflows/linux-qt.yml)
|
||||
</details>
|
||||
|
||||
# Contribution
|
||||
<details>
|
||||
<summary><b>macOS</b></summary>
|
||||
|
||||
I currently accept any contribution, here is a list of some items that may be useful:
|
||||
| macOS | Build status |
|
||||
|--------|--------|
|
||||
|macOS SDL Build|[![macOS-sdl](https://github.com/shadps4-emu/shadPS4/actions/workflows/macos.yml/badge.svg)](https://github.com/shadps4-emu/shadPS4/actions/workflows/macos.yml)
|
||||
|macOS Qt Build|[![macOS-qt](https://github.com/shadps4-emu/shadPS4/actions/workflows/macos-qt.yml/badge.svg)](https://github.com/shadps4-emu/shadPS4/actions/workflows/macos-qt.yml)
|
||||
</details>
|
||||
|
||||
* PKG extractor (there was initial work on this, search project history commits).
|
||||
* Initial GUI with imgui, SDL3 and Vulkan.
|
||||
* to be filled...
|
||||
# Debugging and reporting issues
|
||||
|
||||
# Documentation
|
||||
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).
|
||||
|
||||
Wiki has some documentation for PS4 PKG format
|
||||
# Keyboard mapping
|
||||
|
||||
[PKG PS4 File Format](https://github.com/georgemoralis/shadPS4/wiki/PKG-Information "PKG PS4 File Format")
|
||||
> [!NOTE]
|
||||
> Xbox and DualShock controllers work out of the box.
|
||||
|
||||
| Controller button | Keyboard equivelant |
|
||||
|-------------|-------------|
|
||||
LEFT AXIS UP | W |
|
||||
LEFT AXIS DOWN | S |
|
||||
LEFT AXIS LEFT | A |
|
||||
LEFT AXIS RIGHT | D |
|
||||
RIGHT AXIS UP | I |
|
||||
RIGHT AXIS DOWN | K |
|
||||
RIGHT AXIS LEFT | J |
|
||||
RIGHT AXIS RIGHT | L |
|
||||
TRIANGLE | Numpad 8 |
|
||||
CIRCLE | Numpad 6 |
|
||||
CROSS | Numpad 2 |
|
||||
SQUARE | Numpad 4 |
|
||||
PAD UP | UP |
|
||||
PAD DOWN | DOWN |
|
||||
PAD LEFT | LEFT |
|
||||
PAD RIGHT | RIGHT |
|
||||
OPTIONS | RETURN |
|
||||
TOUCH PAD | SPACE |
|
||||
L1 | Q |
|
||||
R1 | U |
|
||||
L2 | E |
|
||||
R2 | O |
|
||||
L3 | X |
|
||||
R3 | M |
|
||||
|
||||
# Main team
|
||||
|
||||
- [**georgemoralis**](https://github.com/georgemoralis)
|
||||
- [**raphaelthegreat**](https://github.com/raphaelthegreat)
|
||||
- [**psucien**](https://github.com/psucien)
|
||||
- [**skmp**](https://github.com/skmp)
|
||||
- [**wheremyfoodat**](https://github.com/wheremyfoodat)
|
||||
- [**raziel1000**](https://github.com/raziel1000)
|
||||
|
||||
Logo is done by [**Xphalnos**](https://github.com/Xphalnos)
|
||||
|
||||
# Contributing
|
||||
|
||||
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 :)
|
||||
|
||||
# Contributors
|
||||
|
||||
<a href="https://github.com/shadps4-emu/shadPS4/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=shadps4-emu/shadPS4&max=15">
|
||||
</a>
|
||||
|
||||
# Sister Projects
|
||||
- [Panda3DS](https://github.com/wheremyfoodat/Panda3DS): An multiplatform 3DS emulator from our co-author wheremyfoodat
|
||||
- [hydra](https://github.com/hydra-emu/hydra): An multisystem , multiplatform emulator (chip-8,GB,NES,N64) from Paris
|
||||
|
||||
- [**Panda3DS**](https://github.com/wheremyfoodat/Panda3DS): A multiplatform 3DS emulator from our co-author wheremyfoodat.
|
||||
- [**hydra**](https://github.com/hydra-emu/hydra): A multisystem, multiplatform emulator (chip-8, GB, NES, N64) from Paris.
|
||||
|
||||
# License
|
||||
|
||||
- [**GPL-2.0 license**](https://github.com/shadps4-emu/shadPS4/blob/main/LICENSE)
|
||||
|
|
|
@ -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()
|
|
@ -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)
|
|
@ -0,0 +1,15 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(CRYPTOPP QUIET IMPORTED_TARGET libcryptopp)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(cryptopp
|
||||
REQUIRED_VARS CRYPTOPP_LINK_LIBRARIES
|
||||
VERSION_VAR CRYPTOPP_VERSION
|
||||
)
|
||||
|
||||
if (cryptopp_FOUND AND NOT TARGET cryptopp::cryptopp)
|
||||
add_library(cryptopp::cryptopp ALIAS PkgConfig::CRYPTOPP)
|
||||
endif()
|
|
@ -0,0 +1,15 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(XXHASH QUIET IMPORTED_TARGET libxxhash)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(xxHash
|
||||
REQUIRED_VARS XXHASH_LINK_LIBRARIES
|
||||
VERSION_VAR XXHASH_VERSION
|
||||
)
|
||||
|
||||
if (xxHash_FOUND AND NOT TARGET xxHash::xxhash)
|
||||
add_library(xxHash::xxhash ALIAS PkgConfig::XXHASH)
|
||||
endif()
|
|
@ -0,0 +1,15 @@
|
|||
# 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()
|
|
@ -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.\
|
||||
![image](https://github.com/user-attachments/assets/4e2be2b1-ba5a-4451-9ab2-f4ecf246213d)
|
||||
|
||||
3. Double-click on **CMake Targets View**.\
|
||||
![image](https://github.com/user-attachments/assets/5ce7cf90-cd61-4cfa-bef5-645909827290)
|
||||
|
||||
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.\
|
||||
![image](https://github.com/user-attachments/assets/34c7c047-28a3-499f-be8f-df781134d104)
|
||||
|
||||
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.
|
||||
![image](https://github.com/user-attachments/assets/8c7c3e69-f38f-4d6b-bdfd-4f1c41c50be7)
|
||||
|
||||
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.
|
||||
![image](https://github.com/user-attachments/assets/0d975f7a-7bea-4f89-87ef-5d685bea4381)
|
||||
|
||||
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_
|
Binary file not shown.
After Width: | Height: | Size: 658 KiB |
|
@ -0,0 +1,81 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
# shadPS4 Quickstart
|
||||
|
||||
## Summary
|
||||
|
||||
- [PC Requirements](#pc-requirements)
|
||||
- [CPU](#cpu)
|
||||
- [GPU](#gpu)
|
||||
- [RAM](#ram)
|
||||
- [OS](#os)
|
||||
- [Have the latest WIP version](#have-the-latest-wip-version)
|
||||
- [Install PKG files (Games and Updates)](#install-pkg-files)
|
||||
- [Configure the emulator](#configure-the-emulator)
|
||||
|
||||
## PC Requirements
|
||||
|
||||
### CPU
|
||||
|
||||
- A processor with at least 4 cores and 6 threads
|
||||
- Above 2.5 GHz frequency
|
||||
|
||||
### GPU
|
||||
|
||||
- A graphics card with at least 1GB of VRAM
|
||||
- Keep your graphics drivers up to date
|
||||
- Vulkan 1.3 support (required)
|
||||
|
||||
### RAM
|
||||
|
||||
- 8GB of RAM or more
|
||||
|
||||
### OS
|
||||
|
||||
- Windows 10 or Ubuntu 22.04
|
||||
|
||||
## 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!)
|
||||
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). ![image](https://github.com/user-attachments/assets/43f01bbf-236c-4d6d-98ac-f5a5badd4ce8)
|
||||
|
||||
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). ![image](https://github.com/user-attachments/assets/6365f407-867c-44ae-bf00-944f8d84a349)
|
||||
|
||||
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. ![image](https://github.com/user-attachments/assets/97924500-3911-4f90-ab63-ffae7e52700b)
|
||||
|
||||
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
|
||||
|
||||
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>
|
||||
|
||||
## Configure the emulator
|
||||
|
||||
You can configure the emulator by editing the `config.toml` file found in the `user` folder created after starting the application.\
|
||||
Some settings may be related to more technical development and debugging. For more information on those, see [Debugging](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md#configuration).
|
||||
|
||||
Here's a list of configuration entries that are worth changing:
|
||||
|
||||
- `[General]`
|
||||
|
||||
- `Fullscreen`: Display the game in a full screen borderless window.
|
||||
|
||||
- `logType`: Configures logging synchronization (`sync`/`async`)
|
||||
- It can be beneficial to set this to `sync` in order for the log to accurately maintain message order, at the cost of performance.
|
||||
- Use when sending logs to developers. See more about [reporting issues](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md#reporting-and-communicating-about-issues).
|
||||
- `logFilter`: Sets the logging category for various logging classes.
|
||||
- Format: `<class>:<level> ...`, `<class.*>:<level> <*:level> ...`
|
||||
- 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: `*:Error Render.Vulkan:Info`
|
||||
|
||||
- `[GPU]`
|
||||
- `screenWidth` and `screenHeight`: Configures the game window width and height.
|
Binary file not shown.
After Width: | Height: | Size: 350 KiB |
Binary file not shown.
After Width: | Height: | Size: 850 KiB |
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
After Width: | Height: | Size: 175 KiB |
|
@ -0,0 +1,56 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
## Build shadPS4 for Linux
|
||||
|
||||
### Install the necessary tools to build shadPS4:
|
||||
|
||||
#### 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
|
||||
```
|
||||
|
||||
#### 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
|
||||
```
|
||||
|
||||
#### Arch Linux
|
||||
```
|
||||
sudo pacman -S openal cmake vulkan-validation-layers qt6-base qt6-declarative qt6-multimedia sdl2 sndio jack2 base-devel
|
||||
```
|
||||
|
||||
#### 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
|
||||
```
|
||||
### 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/
|
||||
```
|
||||
|
||||
Enter the directory:
|
||||
```
|
||||
cd build/
|
||||
```
|
||||
|
||||
Use make to build the project:
|
||||
```
|
||||
cmake --build . --parallel$(nproc)
|
||||
```
|
||||
|
||||
Now run the emulator:
|
||||
|
||||
```
|
||||
./shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
||||
```
|
|
@ -1,20 +1,100 @@
|
|||
# How to build shadps4 in windows
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
## Download VStudio Community 2022 17.7.4
|
||||
# Build shadPS4 for Windows
|
||||
|
||||
[VStudio 2022](https://visualstudio.microsoft.com/vs/)
|
||||
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 invokations.
|
||||
|
||||
## Requirements
|
||||
Note: **ARM64 is not supported!** As of writing, it will not build nor run. The instructions with respect to ARM64 are for developers only.
|
||||
|
||||
Install the following
|
||||
## Option 1: Visual Studio 2022
|
||||
|
||||
- Desktop development with c++
|
||||
### (Prerequisite) Download the Community edition from [**Visual Studio 2022**](https://visualstudio.microsoft.com/vs/)
|
||||
|
||||
### From Individual components tab install
|
||||
Once you are within the installer:
|
||||
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 (16.0.5)
|
||||
- MSBuild support for LLVM (clang-cl) toolset
|
||||
### (Prerequisite) Download [**Qt**](https://doc.qt.io/qt-6/get-and-install-qt.html)
|
||||
|
||||
- ## 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 vstudio and select the clang debug or clang release . It should compile just fine
|
||||
1. Under the current, non beta version of Qt (at the time of writing 6.7.2), select the option `MSVC 2019 64-bit` or similar.
|
||||
If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `MSVC 2019 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.2\msvc2019_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.2\msvc2019_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.2\msvc2019_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-ninja mingw-w64-x86_64-qt6-base`
|
||||
4. Run `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4`
|
||||
5. Run `cd shadPS4`
|
||||
6. Run `cmake -S . -B build -DCMAKE_CXX_COMPILER="clang++.exe" -DCMAKE_C_COMPILER="clang.exe" -DCMAKE_CXX_FLAGS="-O2 -march=native"`
|
||||
7. Run `cmake --build build`
|
||||
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-cmake mingw-w64-clang-aarch64-ninja mingw-w64-clang-aarch64-qt6-base`
|
||||
4. Run `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4`
|
||||
5. Run `cd shadPS4`
|
||||
6. Run `cmake -S . -B build -DCMAKE_CXX_COMPILER="clang++.exe" -DCMAKE_C_COMPILER="clang.exe" -DCMAKE_CXX_FLAGS="-O2 -march=native"`
|
||||
7. Run `cmake --build build`
|
||||
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.
|
|
@ -1,16 +1,44 @@
|
|||
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
|
||||
- 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)
|
||||
- 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).
|
||||
- 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
|
||||
First public release. Everything is new.
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
## Linux
|
||||
|
||||
Generate the build directory in the shadPS4 directory:
|
||||
```
|
||||
cmake -S . -B build/
|
||||
```
|
||||
|
||||
Enter the directory:
|
||||
```
|
||||
cd build/
|
||||
```
|
||||
|
||||
Use make to build the project:
|
||||
```
|
||||
make -j$(nproc)
|
||||
```
|
|
@ -1,38 +0,0 @@
|
|||
shadps4 - An ps4 emulator
|
||||
=========================
|
||||
|
||||
1. Intro
|
||||
2. Current status
|
||||
3. Contributors
|
||||
4. Greetings
|
||||
|
||||
1.Intro
|
||||
=======
|
||||
shadPS4 is a ps4 emulator for windows. Although atm it can't run a lot of stuff , it can emulate perfectly videoout_basic demo from ps4 sdk. Since developing focused on that , don't expect to run anything else atm (ok maybe if you are extreme lucky , you might find something else that works)
|
||||
|
||||
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
|
||||
==============
|
||||
Although atm project is mostly 1 man's work there are several commits from other devs (ironically there are all greeks)
|
||||
|
||||
- wheremyfoodat - (pcsx-redux dev and Panda3DS founder and dev)
|
||||
- skmp - (nulldc , reincast and some many others emus founder and dev)
|
||||
- OFFTKP - (paris... what to tell about paris , ok hydra is one of his best effords :) )
|
||||
|
||||
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
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
set(BUILD_TESTING OFF)
|
||||
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
|
||||
|
||||
if (MSVC)
|
||||
# Silence "deprecation" warnings
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# Boost
|
||||
if (NOT TARGET Boost::headers)
|
||||
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 "")
|
||||
add_library(boost INTERFACE)
|
||||
target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIR})
|
||||
add_library(Boost::headers ALIAS boost)
|
||||
endif()
|
||||
|
||||
# fmtlib
|
||||
if (NOT TARGET fmt::fmt)
|
||||
add_subdirectory(fmt)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC)
|
||||
# If it is clang and MSVC we will add a static lib
|
||||
# CryptoPP
|
||||
add_subdirectory(cryptoppwin)
|
||||
target_include_directories(cryptoppwin INTERFACE cryptoppwin/include)
|
||||
else()
|
||||
# CryptoPP
|
||||
if (NOT TARGET cryptopp::cryptopp)
|
||||
set(CRYPTOPP_INSTALL OFF)
|
||||
set(CRYPTOPP_BUILD_TESTING OFF)
|
||||
set(CRYPTOPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/)
|
||||
add_subdirectory(cryptopp-cmake)
|
||||
file(COPY cryptopp DESTINATION cryptopp FILES_MATCHING PATTERN "*.h")
|
||||
target_include_directories(cryptopp INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/cryptopp")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT TARGET FFmpeg::ffmpeg)
|
||||
set(ARCHITECTURE "x86_64")
|
||||
add_subdirectory(ffmpeg-core)
|
||||
add_library(FFmpeg::ffmpeg ALIAS ffmpeg)
|
||||
endif()
|
||||
|
||||
# Zlib-Ng
|
||||
if (NOT TARGET zlib-ng::zlib)
|
||||
set(ZLIB_ENABLE_TESTS OFF)
|
||||
set(WITH_GTEST OFF)
|
||||
set(WITH_NEW_STRATEGIES ON)
|
||||
set(WITH_NATIVE_INSTRUCTIONS ON)
|
||||
add_subdirectory(zlib-ng)
|
||||
add_library(zlib-ng::zlib ALIAS zlib)
|
||||
endif()
|
||||
|
||||
# SDL3
|
||||
if (NOT TARGET SDL3::SDL3)
|
||||
set(SDL_PIPEWIRE OFF)
|
||||
add_subdirectory(sdl3)
|
||||
endif()
|
||||
|
||||
# vulkan-headers
|
||||
if (NOT TARGET Vulkan::Headers)
|
||||
set(VULKAN_HEADERS_ENABLE_MODULE OFF)
|
||||
add_subdirectory(vulkan-headers)
|
||||
endif()
|
||||
|
||||
# VMA
|
||||
if (NOT TARGET GPUOpen::VulkanMemoryAllocator)
|
||||
add_subdirectory(vma)
|
||||
endif()
|
||||
|
||||
# RenderDoc
|
||||
if (NOT TARGET RenderDoc::API)
|
||||
add_library(renderdoc INTERFACE)
|
||||
target_include_directories(renderdoc SYSTEM INTERFACE ./renderdoc)
|
||||
add_library(RenderDoc::API ALIAS renderdoc)
|
||||
endif()
|
||||
|
||||
# glslang
|
||||
if (NOT TARGET glslang::glslang)
|
||||
set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "")
|
||||
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "")
|
||||
set(ENABLE_SPVREMAPPER OFF CACHE BOOL "")
|
||||
set(ENABLE_CTEST OFF CACHE BOOL "")
|
||||
set(ENABLE_HLSL OFF CACHE BOOL "")
|
||||
set(BUILD_EXTERNAL OFF CACHE BOOL "")
|
||||
set(ENABLE_OPT OFF CACHE BOOL "")
|
||||
add_subdirectory(glslang)
|
||||
file(COPY glslang/SPIRV DESTINATION glslang/glslang FILES_MATCHING PATTERN "*.h")
|
||||
target_include_directories(SPIRV INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/glslang")
|
||||
endif()
|
||||
|
||||
# Robin-map
|
||||
if (NOT TARGET tsl::robin_map)
|
||||
add_subdirectory(robin-map)
|
||||
endif()
|
||||
|
||||
# Xbyak
|
||||
if (NOT TARGET xbyak::xbyak)
|
||||
add_subdirectory(xbyak)
|
||||
endif()
|
||||
|
||||
# MagicEnum
|
||||
if (NOT TARGET magic_enum::magic_enum)
|
||||
add_subdirectory(magic_enum)
|
||||
endif()
|
||||
|
||||
# Toml11
|
||||
if (NOT TARGET toml11::toml11)
|
||||
add_subdirectory(toml11)
|
||||
endif()
|
||||
|
||||
# xxHash
|
||||
if (NOT TARGET xxHash::xxhash)
|
||||
add_library(xxhash xxhash/xxhash.h xxhash/xxhash.c)
|
||||
target_include_directories(xxhash PUBLIC xxhash)
|
||||
add_library(xxHash::xxhash ALIAS xxhash)
|
||||
endif()
|
||||
|
||||
# Zydis
|
||||
if (NOT TARGET Zydis::Zydis)
|
||||
option(ZYDIS_BUILD_TOOLS "" OFF)
|
||||
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
||||
add_subdirectory(zydis)
|
||||
endif()
|
||||
|
||||
# Winpthreads
|
||||
if (WIN32)
|
||||
add_subdirectory(winpthreads)
|
||||
target_include_directories(winpthreads INTERFACE winpthreads/include)
|
||||
endif()
|
||||
|
||||
# sirit
|
||||
add_subdirectory(sirit)
|
||||
if (WIN32)
|
||||
target_compile_options(sirit PUBLIC "-Wno-error=unused-command-line-argument")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
# half
|
||||
add_library(half INTERFACE)
|
||||
target_include_directories(half INTERFACE half/include)
|
||||
|
||||
# date
|
||||
if (NOT TARGET date::date-tz)
|
||||
option(BUILD_TZ_LIB "" ON)
|
||||
option(USE_SYSTEM_TZ_DB "" ON)
|
||||
add_subdirectory(date)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Tracy
|
||||
option(TRACY_ENABLE "" ON)
|
||||
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
|
||||
option(TRACY_ON_DEMAND "" ON)
|
||||
option(TRACY_NO_FRAME_IMAGE "" ON)
|
||||
option(TRACY_FIBERS "" ON) # For AmdGpu frontend profiling
|
||||
option(TRACY_NO_SYSTEM_TRACING "" ON)
|
||||
option(TRACY_NO_CALLSTACK "" ON)
|
||||
option(TRACY_NO_CODE_TRANSFER "" ON)
|
||||
option(TRACY_NO_SAMPLING "" ON)
|
||||
option(TRACY_ONLY_LOCALHOST "" ON)
|
||||
option(TRACY_NO_CONTEXT_SWITCH "" ON)
|
||||
add_subdirectory(tracy)
|
|
@ -0,0 +1,158 @@
|
|||
# - Returns a version string from Git
|
||||
#
|
||||
# These functions force a re-configure on each git commit so that you can
|
||||
# trust the values of the variables in your build system.
|
||||
#
|
||||
# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the refspec and sha hash of the current head revision
|
||||
#
|
||||
# git_describe(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the results of git describe on the source tree, and adjusting
|
||||
# the output so that it tests false if an error occurs.
|
||||
#
|
||||
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the results of git describe --exact-match on the source tree,
|
||||
# and adjusting the output so that it tests false if there was no exact
|
||||
# matching tag.
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
if(__get_git_revision_description)
|
||||
return()
|
||||
endif()
|
||||
set(__get_git_revision_description YES)
|
||||
|
||||
# We must run the following at "include" time, not at function call time,
|
||||
# to find the path to this module rather than the path to a calling list file
|
||||
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
|
||||
function(get_git_head_revision _refspecvar _hashvar)
|
||||
set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
|
||||
while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories
|
||||
set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
|
||||
get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
|
||||
if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
|
||||
# We have reached the root directory, we are not in git
|
||||
set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
|
||||
set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
set(GIT_DIR "${GIT_PARENT_DIR}/.git")
|
||||
endwhile()
|
||||
# check if this is a submodule
|
||||
if(NOT IS_DIRECTORY ${GIT_DIR})
|
||||
file(READ ${GIT_DIR} submodule)
|
||||
string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
|
||||
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
|
||||
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
|
||||
endif()
|
||||
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
|
||||
if(NOT EXISTS "${GIT_DATA}")
|
||||
file(MAKE_DIRECTORY "${GIT_DATA}")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${GIT_DIR}/HEAD")
|
||||
return()
|
||||
endif()
|
||||
set(HEAD_FILE "${GIT_DATA}/HEAD")
|
||||
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
|
||||
|
||||
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
|
||||
"${GIT_DATA}/grabRef.cmake"
|
||||
@ONLY)
|
||||
include("${GIT_DATA}/grabRef.cmake")
|
||||
|
||||
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
|
||||
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_branch_name _var)
|
||||
if(NOT GIT_FOUND)
|
||||
find_package(Git QUIET)
|
||||
endif()
|
||||
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}"
|
||||
rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE
|
||||
res
|
||||
OUTPUT_VARIABLE
|
||||
out
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
set(out "${out}-${res}-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set(${_var} "${out}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_describe _var)
|
||||
if(NOT GIT_FOUND)
|
||||
find_package(Git QUIET)
|
||||
endif()
|
||||
#get_git_head_revision(refspec hash)
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
#if(NOT hash)
|
||||
# set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
|
||||
# return()
|
||||
#endif()
|
||||
|
||||
# TODO sanitize
|
||||
#if((${ARGN}" MATCHES "&&") OR
|
||||
# (ARGN MATCHES "||") OR
|
||||
# (ARGN MATCHES "\\;"))
|
||||
# message("Please report the following error to the project!")
|
||||
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
|
||||
#endif()
|
||||
|
||||
#message(STATUS "Arguments to execute_process: ${ARGN}")
|
||||
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}"
|
||||
describe
|
||||
${hash}
|
||||
${ARGN}
|
||||
WORKING_DIRECTORY
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE
|
||||
res
|
||||
OUTPUT_VARIABLE
|
||||
out
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
set(out "${out}-${res}-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set(${_var} "${out}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_get_exact_tag _var)
|
||||
git_describe(out --exact-match ${ARGN})
|
||||
set(${_var} "${out}" PARENT_SCOPE)
|
||||
endfunction()
|
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# Internal file for GetGitRevisionDescription.cmake
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
set(HEAD_HASH)
|
||||
|
||||
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
|
||||
|
||||
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
|
||||
if(HEAD_CONTENTS MATCHES "ref")
|
||||
# named branch
|
||||
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
||||
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
|
||||
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
set(HEAD_HASH "${HEAD_REF}")
|
||||
endif()
|
||||
else()
|
||||
# detached HEAD
|
||||
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
||||
endif()
|
||||
|
||||
if(NOT HEAD_HASH)
|
||||
if(EXISTS "@GIT_DATA@/head-ref")
|
||||
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
|
||||
string(STRIP "${HEAD_HASH}" HEAD_HASH)
|
||||
else()
|
||||
set(HEAD_HASH "Unknown")
|
||||
endif()
|
||||
endif()
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 60f81a77e0c9a0e7ffc1ca1bc438ddfa2e43b78e
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2c384c28265a93358a2455e610e76393358794df
|
|
@ -0,0 +1 @@
|
|||
Subproject commit bc3441dd2d6a9728e747dc0180bc8b9065a2923c
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1ead6715dec030d340a316c927c877a3c4e5a00c
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a04136add1e469f46d8ae8d3e8307779240a5c53
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e30b7d7fe228bfb3f6e41ce1040b44a15eb7d5e0
|
|
@ -0,0 +1 @@
|
|||
Subproject commit c98518351efd5a46f5d448e947e0b7242d197d07
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 12cbda959b6df2af119a76a73ff906c2bed36884
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1ddada225144cac0de8f6b5c0dd9acffd99a2e68
|
|
@ -0,0 +1 @@
|
|||
Subproject commit dae6bbf16c363e9ead4e628a47fdb02956a634f3
|
|
@ -0,0 +1,741 @@
|
|||
/******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019-2024 Baldur Karlsson
|
||||
*
|
||||
* 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.
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Documentation for the API is available at https://renderdoc.org/docs/in_application_api.html
|
||||
//
|
||||
|
||||
#if !defined(RENDERDOC_NO_STDINT)
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER)
|
||||
#define RENDERDOC_CC __cdecl
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
#define RENDERDOC_CC
|
||||
#elif defined(__APPLE__)
|
||||
#define RENDERDOC_CC
|
||||
#else
|
||||
#error "Unknown platform"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Constants not used directly in below API
|
||||
|
||||
// This is a GUID/magic value used for when applications pass a path where shader debug
|
||||
// information can be found to match up with a stripped shader.
|
||||
// the define can be used like so: const GUID RENDERDOC_ShaderDebugMagicValue =
|
||||
// RENDERDOC_ShaderDebugMagicValue_value
|
||||
#define RENDERDOC_ShaderDebugMagicValue_struct \
|
||||
{ \
|
||||
0xeab25520, 0x6670, 0x4865, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \
|
||||
}
|
||||
|
||||
// as an alternative when you want a byte array (assuming x86 endianness):
|
||||
#define RENDERDOC_ShaderDebugMagicValue_bytearray \
|
||||
{ \
|
||||
0x20, 0x55, 0xb2, 0xea, 0x70, 0x66, 0x65, 0x48, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \
|
||||
}
|
||||
|
||||
// truncated version when only a uint64_t is available (e.g. Vulkan tags):
|
||||
#define RENDERDOC_ShaderDebugMagicValue_truncated 0x48656670eab25520ULL
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RenderDoc capture options
|
||||
//
|
||||
|
||||
typedef enum RENDERDOC_CaptureOption
|
||||
{
|
||||
// Allow the application to enable vsync
|
||||
//
|
||||
// Default - enabled
|
||||
//
|
||||
// 1 - The application can enable or disable vsync at will
|
||||
// 0 - vsync is force disabled
|
||||
eRENDERDOC_Option_AllowVSync = 0,
|
||||
|
||||
// Allow the application to enable fullscreen
|
||||
//
|
||||
// Default - enabled
|
||||
//
|
||||
// 1 - The application can enable or disable fullscreen at will
|
||||
// 0 - fullscreen is force disabled
|
||||
eRENDERDOC_Option_AllowFullscreen = 1,
|
||||
|
||||
// Record API debugging events and messages
|
||||
//
|
||||
// Default - disabled
|
||||
//
|
||||
// 1 - Enable built-in API debugging features and records the results into
|
||||
// the capture, which is matched up with events on replay
|
||||
// 0 - no API debugging is forcibly enabled
|
||||
eRENDERDOC_Option_APIValidation = 2,
|
||||
eRENDERDOC_Option_DebugDeviceMode = 2, // deprecated name of this enum
|
||||
|
||||
// Capture CPU callstacks for API events
|
||||
//
|
||||
// Default - disabled
|
||||
//
|
||||
// 1 - Enables capturing of callstacks
|
||||
// 0 - no callstacks are captured
|
||||
eRENDERDOC_Option_CaptureCallstacks = 3,
|
||||
|
||||
// When capturing CPU callstacks, only capture them from actions.
|
||||
// This option does nothing without the above option being enabled
|
||||
//
|
||||
// Default - disabled
|
||||
//
|
||||
// 1 - Only captures callstacks for actions.
|
||||
// Ignored if CaptureCallstacks is disabled
|
||||
// 0 - Callstacks, if enabled, are captured for every event.
|
||||
eRENDERDOC_Option_CaptureCallstacksOnlyDraws = 4,
|
||||
eRENDERDOC_Option_CaptureCallstacksOnlyActions = 4,
|
||||
|
||||
// Specify a delay in seconds to wait for a debugger to attach, after
|
||||
// creating or injecting into a process, before continuing to allow it to run.
|
||||
//
|
||||
// 0 indicates no delay, and the process will run immediately after injection
|
||||
//
|
||||
// Default - 0 seconds
|
||||
//
|
||||
eRENDERDOC_Option_DelayForDebugger = 5,
|
||||
|
||||
// Verify buffer access. This includes checking the memory returned by a Map() call to
|
||||
// detect any out-of-bounds modification, as well as initialising buffers with undefined contents
|
||||
// to a marker value to catch use of uninitialised memory.
|
||||
//
|
||||
// NOTE: This option is only valid for OpenGL and D3D11. Explicit APIs such as D3D12 and Vulkan do
|
||||
// not do the same kind of interception & checking and undefined contents are really undefined.
|
||||
//
|
||||
// Default - disabled
|
||||
//
|
||||
// 1 - Verify buffer access
|
||||
// 0 - No verification is performed, and overwriting bounds may cause crashes or corruption in
|
||||
// RenderDoc.
|
||||
eRENDERDOC_Option_VerifyBufferAccess = 6,
|
||||
|
||||
// The old name for eRENDERDOC_Option_VerifyBufferAccess was eRENDERDOC_Option_VerifyMapWrites.
|
||||
// This option now controls the filling of uninitialised buffers with 0xdddddddd which was
|
||||
// previously always enabled
|
||||
eRENDERDOC_Option_VerifyMapWrites = eRENDERDOC_Option_VerifyBufferAccess,
|
||||
|
||||
// Hooks any system API calls that create child processes, and injects
|
||||
// RenderDoc into them recursively with the same options.
|
||||
//
|
||||
// Default - disabled
|
||||
//
|
||||
// 1 - Hooks into spawned child processes
|
||||
// 0 - Child processes are not hooked by RenderDoc
|
||||
eRENDERDOC_Option_HookIntoChildren = 7,
|
||||
|
||||
// By default RenderDoc only includes resources in the final capture necessary
|
||||
// for that frame, this allows you to override that behaviour.
|
||||
//
|
||||
// Default - disabled
|
||||
//
|
||||
// 1 - all live resources at the time of capture are included in the capture
|
||||
// and available for inspection
|
||||
// 0 - only the resources referenced by the captured frame are included
|
||||
eRENDERDOC_Option_RefAllResources = 8,
|
||||
|
||||
// **NOTE**: As of RenderDoc v1.1 this option has been deprecated. Setting or
|
||||
// getting it will be ignored, to allow compatibility with older versions.
|
||||
// In v1.1 the option acts as if it's always enabled.
|
||||
//
|
||||
// By default RenderDoc skips saving initial states for resources where the
|
||||
// previous contents don't appear to be used, assuming that writes before
|
||||
// reads indicate previous contents aren't used.
|
||||
//
|
||||
// Default - disabled
|
||||
//
|
||||
// 1 - initial contents at the start of each captured frame are saved, even if
|
||||
// they are later overwritten or cleared before being used.
|
||||
// 0 - unless a read is detected, initial contents will not be saved and will
|
||||
// appear as black or empty data.
|
||||
eRENDERDOC_Option_SaveAllInitials = 9,
|
||||
|
||||
// In APIs that allow for the recording of command lists to be replayed later,
|
||||
// RenderDoc may choose to not capture command lists before a frame capture is
|
||||
// triggered, to reduce overheads. This means any command lists recorded once
|
||||
// and replayed many times will not be available and may cause a failure to
|
||||
// capture.
|
||||
//
|
||||
// NOTE: This is only true for APIs where multithreading is difficult or
|
||||
// discouraged. Newer APIs like Vulkan and D3D12 will ignore this option
|
||||
// and always capture all command lists since the API is heavily oriented
|
||||
// around it and the overheads have been reduced by API design.
|
||||
//
|
||||
// 1 - All command lists are captured from the start of the application
|
||||
// 0 - Command lists are only captured if their recording begins during
|
||||
// the period when a frame capture is in progress.
|
||||
eRENDERDOC_Option_CaptureAllCmdLists = 10,
|
||||
|
||||
// Mute API debugging output when the API validation mode option is enabled
|
||||
//
|
||||
// Default - enabled
|
||||
//
|
||||
// 1 - Mute any API debug messages from being displayed or passed through
|
||||
// 0 - API debugging is displayed as normal
|
||||
eRENDERDOC_Option_DebugOutputMute = 11,
|
||||
|
||||
// Option to allow vendor extensions to be used even when they may be
|
||||
// incompatible with RenderDoc and cause corrupted replays or crashes.
|
||||
//
|
||||
// Default - inactive
|
||||
//
|
||||
// No values are documented, this option should only be used when absolutely
|
||||
// necessary as directed by a RenderDoc developer.
|
||||
eRENDERDOC_Option_AllowUnsupportedVendorExtensions = 12,
|
||||
|
||||
// Define a soft memory limit which some APIs may aim to keep overhead under where
|
||||
// possible. Anything above this limit will where possible be saved directly to disk during
|
||||
// capture.
|
||||
// This will cause increased disk space use (which may cause a capture to fail if disk space is
|
||||
// exhausted) as well as slower capture times.
|
||||
//
|
||||
// Not all memory allocations may be deferred like this so it is not a guarantee of a memory
|
||||
// limit.
|
||||
//
|
||||
// Units are in MBs, suggested values would range from 200MB to 1000MB.
|
||||
//
|
||||
// Default - 0 Megabytes
|
||||
eRENDERDOC_Option_SoftMemoryLimit = 13,
|
||||
} RENDERDOC_CaptureOption;
|
||||
|
||||
// Sets an option that controls how RenderDoc behaves on capture.
|
||||
//
|
||||
// Returns 1 if the option and value are valid
|
||||
// Returns 0 if either is invalid and the option is unchanged
|
||||
typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt, uint32_t val);
|
||||
typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionF32)(RENDERDOC_CaptureOption opt, float val);
|
||||
|
||||
// Gets the current value of an option as a uint32_t
|
||||
//
|
||||
// If the option is invalid, 0xffffffff is returned
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionU32)(RENDERDOC_CaptureOption opt);
|
||||
|
||||
// Gets the current value of an option as a float
|
||||
//
|
||||
// If the option is invalid, -FLT_MAX is returned
|
||||
typedef float(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionF32)(RENDERDOC_CaptureOption opt);
|
||||
|
||||
typedef enum RENDERDOC_InputButton
|
||||
{
|
||||
// '0' - '9' matches ASCII values
|
||||
eRENDERDOC_Key_0 = 0x30,
|
||||
eRENDERDOC_Key_1 = 0x31,
|
||||
eRENDERDOC_Key_2 = 0x32,
|
||||
eRENDERDOC_Key_3 = 0x33,
|
||||
eRENDERDOC_Key_4 = 0x34,
|
||||
eRENDERDOC_Key_5 = 0x35,
|
||||
eRENDERDOC_Key_6 = 0x36,
|
||||
eRENDERDOC_Key_7 = 0x37,
|
||||
eRENDERDOC_Key_8 = 0x38,
|
||||
eRENDERDOC_Key_9 = 0x39,
|
||||
|
||||
// 'A' - 'Z' matches ASCII values
|
||||
eRENDERDOC_Key_A = 0x41,
|
||||
eRENDERDOC_Key_B = 0x42,
|
||||
eRENDERDOC_Key_C = 0x43,
|
||||
eRENDERDOC_Key_D = 0x44,
|
||||
eRENDERDOC_Key_E = 0x45,
|
||||
eRENDERDOC_Key_F = 0x46,
|
||||
eRENDERDOC_Key_G = 0x47,
|
||||
eRENDERDOC_Key_H = 0x48,
|
||||
eRENDERDOC_Key_I = 0x49,
|
||||
eRENDERDOC_Key_J = 0x4A,
|
||||
eRENDERDOC_Key_K = 0x4B,
|
||||
eRENDERDOC_Key_L = 0x4C,
|
||||
eRENDERDOC_Key_M = 0x4D,
|
||||
eRENDERDOC_Key_N = 0x4E,
|
||||
eRENDERDOC_Key_O = 0x4F,
|
||||
eRENDERDOC_Key_P = 0x50,
|
||||
eRENDERDOC_Key_Q = 0x51,
|
||||
eRENDERDOC_Key_R = 0x52,
|
||||
eRENDERDOC_Key_S = 0x53,
|
||||
eRENDERDOC_Key_T = 0x54,
|
||||
eRENDERDOC_Key_U = 0x55,
|
||||
eRENDERDOC_Key_V = 0x56,
|
||||
eRENDERDOC_Key_W = 0x57,
|
||||
eRENDERDOC_Key_X = 0x58,
|
||||
eRENDERDOC_Key_Y = 0x59,
|
||||
eRENDERDOC_Key_Z = 0x5A,
|
||||
|
||||
// leave the rest of the ASCII range free
|
||||
// in case we want to use it later
|
||||
eRENDERDOC_Key_NonPrintable = 0x100,
|
||||
|
||||
eRENDERDOC_Key_Divide,
|
||||
eRENDERDOC_Key_Multiply,
|
||||
eRENDERDOC_Key_Subtract,
|
||||
eRENDERDOC_Key_Plus,
|
||||
|
||||
eRENDERDOC_Key_F1,
|
||||
eRENDERDOC_Key_F2,
|
||||
eRENDERDOC_Key_F3,
|
||||
eRENDERDOC_Key_F4,
|
||||
eRENDERDOC_Key_F5,
|
||||
eRENDERDOC_Key_F6,
|
||||
eRENDERDOC_Key_F7,
|
||||
eRENDERDOC_Key_F8,
|
||||
eRENDERDOC_Key_F9,
|
||||
eRENDERDOC_Key_F10,
|
||||
eRENDERDOC_Key_F11,
|
||||
eRENDERDOC_Key_F12,
|
||||
|
||||
eRENDERDOC_Key_Home,
|
||||
eRENDERDOC_Key_End,
|
||||
eRENDERDOC_Key_Insert,
|
||||
eRENDERDOC_Key_Delete,
|
||||
eRENDERDOC_Key_PageUp,
|
||||
eRENDERDOC_Key_PageDn,
|
||||
|
||||
eRENDERDOC_Key_Backspace,
|
||||
eRENDERDOC_Key_Tab,
|
||||
eRENDERDOC_Key_PrtScrn,
|
||||
eRENDERDOC_Key_Pause,
|
||||
|
||||
eRENDERDOC_Key_Max,
|
||||
} RENDERDOC_InputButton;
|
||||
|
||||
// Sets which key or keys can be used to toggle focus between multiple windows
|
||||
//
|
||||
// If keys is NULL or num is 0, toggle keys will be disabled
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_SetFocusToggleKeys)(RENDERDOC_InputButton *keys, int num);
|
||||
|
||||
// Sets which key or keys can be used to capture the next frame
|
||||
//
|
||||
// If keys is NULL or num is 0, captures keys will be disabled
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureKeys)(RENDERDOC_InputButton *keys, int num);
|
||||
|
||||
typedef enum RENDERDOC_OverlayBits
|
||||
{
|
||||
// This single bit controls whether the overlay is enabled or disabled globally
|
||||
eRENDERDOC_Overlay_Enabled = 0x1,
|
||||
|
||||
// Show the average framerate over several seconds as well as min/max
|
||||
eRENDERDOC_Overlay_FrameRate = 0x2,
|
||||
|
||||
// Show the current frame number
|
||||
eRENDERDOC_Overlay_FrameNumber = 0x4,
|
||||
|
||||
// Show a list of recent captures, and how many captures have been made
|
||||
eRENDERDOC_Overlay_CaptureList = 0x8,
|
||||
|
||||
// Default values for the overlay mask
|
||||
eRENDERDOC_Overlay_Default = (eRENDERDOC_Overlay_Enabled | eRENDERDOC_Overlay_FrameRate |
|
||||
eRENDERDOC_Overlay_FrameNumber | eRENDERDOC_Overlay_CaptureList),
|
||||
|
||||
// Enable all bits
|
||||
eRENDERDOC_Overlay_All = ~0U,
|
||||
|
||||
// Disable all bits
|
||||
eRENDERDOC_Overlay_None = 0,
|
||||
} RENDERDOC_OverlayBits;
|
||||
|
||||
// returns the overlay bits that have been set
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetOverlayBits)();
|
||||
// sets the overlay bits with an and & or mask
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or);
|
||||
|
||||
// this function will attempt to remove RenderDoc's hooks in the application.
|
||||
//
|
||||
// Note: that this can only work correctly if done immediately after
|
||||
// the module is loaded, before any API work happens. RenderDoc will remove its
|
||||
// injected hooks and shut down. Behaviour is undefined if this is called
|
||||
// after any API functions have been called, and there is still no guarantee of
|
||||
// success.
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_RemoveHooks)();
|
||||
|
||||
// DEPRECATED: compatibility for code compiled against pre-1.4.1 headers.
|
||||
typedef pRENDERDOC_RemoveHooks pRENDERDOC_Shutdown;
|
||||
|
||||
// This function will unload RenderDoc's crash handler.
|
||||
//
|
||||
// If you use your own crash handler and don't want RenderDoc's handler to
|
||||
// intercede, you can call this function to unload it and any unhandled
|
||||
// exceptions will pass to the next handler.
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_UnloadCrashHandler)();
|
||||
|
||||
// Sets the capture file path template
|
||||
//
|
||||
// pathtemplate is a UTF-8 string that gives a template for how captures will be named
|
||||
// and where they will be saved.
|
||||
//
|
||||
// Any extension is stripped off the path, and captures are saved in the directory
|
||||
// specified, and named with the filename and the frame number appended. If the
|
||||
// directory does not exist it will be created, including any parent directories.
|
||||
//
|
||||
// If pathtemplate is NULL, the template will remain unchanged
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// SetCaptureFilePathTemplate("my_captures/example");
|
||||
//
|
||||
// Capture #1 -> my_captures/example_frame123.rdc
|
||||
// Capture #2 -> my_captures/example_frame456.rdc
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureFilePathTemplate)(const char *pathtemplate);
|
||||
|
||||
// returns the current capture path template, see SetCaptureFileTemplate above, as a UTF-8 string
|
||||
typedef const char *(RENDERDOC_CC *pRENDERDOC_GetCaptureFilePathTemplate)();
|
||||
|
||||
// DEPRECATED: compatibility for code compiled against pre-1.1.2 headers.
|
||||
typedef pRENDERDOC_SetCaptureFilePathTemplate pRENDERDOC_SetLogFilePathTemplate;
|
||||
typedef pRENDERDOC_GetCaptureFilePathTemplate pRENDERDOC_GetLogFilePathTemplate;
|
||||
|
||||
// returns the number of captures that have been made
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetNumCaptures)();
|
||||
|
||||
// This function returns the details of a capture, by index. New captures are added
|
||||
// to the end of the list.
|
||||
//
|
||||
// filename will be filled with the absolute path to the capture file, as a UTF-8 string
|
||||
// pathlength will be written with the length in bytes of the filename string
|
||||
// timestamp will be written with the time of the capture, in seconds since the Unix epoch
|
||||
//
|
||||
// Any of the parameters can be NULL and they'll be skipped.
|
||||
//
|
||||
// The function will return 1 if the capture index is valid, or 0 if the index is invalid
|
||||
// If the index is invalid, the values will be unchanged
|
||||
//
|
||||
// Note: when captures are deleted in the UI they will remain in this list, so the
|
||||
// capture path may not exist anymore.
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCapture)(uint32_t idx, char *filename,
|
||||
uint32_t *pathlength, uint64_t *timestamp);
|
||||
|
||||
// Sets the comments associated with a capture file. These comments are displayed in the
|
||||
// UI program when opening.
|
||||
//
|
||||
// filePath should be a path to the capture file to add comments to. If set to NULL or ""
|
||||
// the most recent capture file created made will be used instead.
|
||||
// comments should be a NULL-terminated UTF-8 string to add as comments.
|
||||
//
|
||||
// Any existing comments will be overwritten.
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureFileComments)(const char *filePath,
|
||||
const char *comments);
|
||||
|
||||
// returns 1 if the RenderDoc UI is connected to this application, 0 otherwise
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsTargetControlConnected)();
|
||||
|
||||
// DEPRECATED: compatibility for code compiled against pre-1.1.1 headers.
|
||||
// This was renamed to IsTargetControlConnected in API 1.1.1, the old typedef is kept here for
|
||||
// backwards compatibility with old code, it is castable either way since it's ABI compatible
|
||||
// as the same function pointer type.
|
||||
typedef pRENDERDOC_IsTargetControlConnected pRENDERDOC_IsRemoteAccessConnected;
|
||||
|
||||
// This function will launch the Replay UI associated with the RenderDoc library injected
|
||||
// into the running application.
|
||||
//
|
||||
// if connectTargetControl is 1, the Replay UI will be launched with a command line parameter
|
||||
// to connect to this application
|
||||
// cmdline is the rest of the command line, as a UTF-8 string. E.g. a captures to open
|
||||
// if cmdline is NULL, the command line will be empty.
|
||||
//
|
||||
// returns the PID of the replay UI if successful, 0 if not successful.
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_LaunchReplayUI)(uint32_t connectTargetControl,
|
||||
const char *cmdline);
|
||||
|
||||
// RenderDoc can return a higher version than requested if it's backwards compatible,
|
||||
// this function returns the actual version returned. If a parameter is NULL, it will be
|
||||
// ignored and the others will be filled out.
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_GetAPIVersion)(int *major, int *minor, int *patch);
|
||||
|
||||
// Requests that the replay UI show itself (if hidden or not the current top window). This can be
|
||||
// used in conjunction with IsTargetControlConnected and LaunchReplayUI to intelligently handle
|
||||
// showing the UI after making a capture.
|
||||
//
|
||||
// This will return 1 if the request was successfully passed on, though it's not guaranteed that
|
||||
// the UI will be on top in all cases depending on OS rules. It will return 0 if there is no current
|
||||
// target control connection to make such a request, or if there was another error
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_ShowReplayUI)();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Capturing functions
|
||||
//
|
||||
|
||||
// A device pointer is a pointer to the API's root handle.
|
||||
//
|
||||
// This would be an ID3D11Device, HGLRC/GLXContext, ID3D12Device, etc
|
||||
typedef void *RENDERDOC_DevicePointer;
|
||||
|
||||
// A window handle is the OS's native window handle
|
||||
//
|
||||
// This would be an HWND, GLXDrawable, etc
|
||||
typedef void *RENDERDOC_WindowHandle;
|
||||
|
||||
// A helper macro for Vulkan, where the device handle cannot be used directly.
|
||||
//
|
||||
// Passing the VkInstance to this macro will return the RENDERDOC_DevicePointer to use.
|
||||
//
|
||||
// Specifically, the value needed is the dispatch table pointer, which sits as the first
|
||||
// pointer-sized object in the memory pointed to by the VkInstance. Thus we cast to a void** and
|
||||
// indirect once.
|
||||
#define RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(inst) (*((void **)(inst)))
|
||||
|
||||
// This sets the RenderDoc in-app overlay in the API/window pair as 'active' and it will
|
||||
// respond to keypresses. Neither parameter can be NULL
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(RENDERDOC_DevicePointer device,
|
||||
RENDERDOC_WindowHandle wndHandle);
|
||||
|
||||
// capture the next frame on whichever window and API is currently considered active
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_TriggerCapture)();
|
||||
|
||||
// capture the next N frames on whichever window and API is currently considered active
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_TriggerMultiFrameCapture)(uint32_t numFrames);
|
||||
|
||||
// When choosing either a device pointer or a window handle to capture, you can pass NULL.
|
||||
// Passing NULL specifies a 'wildcard' match against anything. This allows you to specify
|
||||
// any API rendering to a specific window, or a specific API instance rendering to any window,
|
||||
// or in the simplest case of one window and one API, you can just pass NULL for both.
|
||||
//
|
||||
// In either case, if there are two or more possible matching (device,window) pairs it
|
||||
// is undefined which one will be captured.
|
||||
//
|
||||
// Note: for headless rendering you can pass NULL for the window handle and either specify
|
||||
// a device pointer or leave it NULL as above.
|
||||
|
||||
// Immediately starts capturing API calls on the specified device pointer and window handle.
|
||||
//
|
||||
// If there is no matching thing to capture (e.g. no supported API has been initialised),
|
||||
// this will do nothing.
|
||||
//
|
||||
// The results are undefined (including crashes) if two captures are started overlapping,
|
||||
// even on separate devices and/oror windows.
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(RENDERDOC_DevicePointer device,
|
||||
RENDERDOC_WindowHandle wndHandle);
|
||||
|
||||
// Returns whether or not a frame capture is currently ongoing anywhere.
|
||||
//
|
||||
// This will return 1 if a capture is ongoing, and 0 if there is no capture running
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsFrameCapturing)();
|
||||
|
||||
// Ends capturing immediately.
|
||||
//
|
||||
// This will return 1 if the capture succeeded, and 0 if there was an error capturing.
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePointer device,
|
||||
RENDERDOC_WindowHandle wndHandle);
|
||||
|
||||
// Ends capturing immediately and discard any data stored without saving to disk.
|
||||
//
|
||||
// This will return 1 if the capture was discarded, and 0 if there was an error or no capture
|
||||
// was in progress
|
||||
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_DiscardFrameCapture)(RENDERDOC_DevicePointer device,
|
||||
RENDERDOC_WindowHandle wndHandle);
|
||||
|
||||
// Only valid to be called between a call to StartFrameCapture and EndFrameCapture. Gives a custom
|
||||
// title to the capture produced which will be displayed in the UI.
|
||||
//
|
||||
// If multiple captures are ongoing, this title will be applied to the first capture to end after
|
||||
// this call. The second capture to end will have no title, unless this function is called again.
|
||||
//
|
||||
// Calling this function has no effect if no capture is currently running, and if it is called
|
||||
// multiple times only the last title will be used.
|
||||
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureTitle)(const char *title);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RenderDoc API versions
|
||||
//
|
||||
|
||||
// RenderDoc uses semantic versioning (http://semver.org/).
|
||||
//
|
||||
// MAJOR version is incremented when incompatible API changes happen.
|
||||
// MINOR version is incremented when functionality is added in a backwards-compatible manner.
|
||||
// PATCH version is incremented when backwards-compatible bug fixes happen.
|
||||
//
|
||||
// Note that this means the API returned can be higher than the one you might have requested.
|
||||
// e.g. if you are running against a newer RenderDoc that supports 1.0.1, it will be returned
|
||||
// instead of 1.0.0. You can check this with the GetAPIVersion entry point
|
||||
typedef enum RENDERDOC_Version
|
||||
{
|
||||
eRENDERDOC_API_Version_1_0_0 = 10000, // RENDERDOC_API_1_0_0 = 1 00 00
|
||||
eRENDERDOC_API_Version_1_0_1 = 10001, // RENDERDOC_API_1_0_1 = 1 00 01
|
||||
eRENDERDOC_API_Version_1_0_2 = 10002, // RENDERDOC_API_1_0_2 = 1 00 02
|
||||
eRENDERDOC_API_Version_1_1_0 = 10100, // RENDERDOC_API_1_1_0 = 1 01 00
|
||||
eRENDERDOC_API_Version_1_1_1 = 10101, // RENDERDOC_API_1_1_1 = 1 01 01
|
||||
eRENDERDOC_API_Version_1_1_2 = 10102, // RENDERDOC_API_1_1_2 = 1 01 02
|
||||
eRENDERDOC_API_Version_1_2_0 = 10200, // RENDERDOC_API_1_2_0 = 1 02 00
|
||||
eRENDERDOC_API_Version_1_3_0 = 10300, // RENDERDOC_API_1_3_0 = 1 03 00
|
||||
eRENDERDOC_API_Version_1_4_0 = 10400, // RENDERDOC_API_1_4_0 = 1 04 00
|
||||
eRENDERDOC_API_Version_1_4_1 = 10401, // RENDERDOC_API_1_4_1 = 1 04 01
|
||||
eRENDERDOC_API_Version_1_4_2 = 10402, // RENDERDOC_API_1_4_2 = 1 04 02
|
||||
eRENDERDOC_API_Version_1_5_0 = 10500, // RENDERDOC_API_1_5_0 = 1 05 00
|
||||
eRENDERDOC_API_Version_1_6_0 = 10600, // RENDERDOC_API_1_6_0 = 1 06 00
|
||||
} RENDERDOC_Version;
|
||||
|
||||
// API version changelog:
|
||||
//
|
||||
// 1.0.0 - initial release
|
||||
// 1.0.1 - Bugfix: IsFrameCapturing() was returning false for captures that were triggered
|
||||
// by keypress or TriggerCapture, instead of Start/EndFrameCapture.
|
||||
// 1.0.2 - Refactor: Renamed eRENDERDOC_Option_DebugDeviceMode to eRENDERDOC_Option_APIValidation
|
||||
// 1.1.0 - Add feature: TriggerMultiFrameCapture(). Backwards compatible with 1.0.x since the new
|
||||
// function pointer is added to the end of the struct, the original layout is identical
|
||||
// 1.1.1 - Refactor: Renamed remote access to target control (to better disambiguate from remote
|
||||
// replay/remote server concept in replay UI)
|
||||
// 1.1.2 - Refactor: Renamed "log file" in function names to just capture, to clarify that these
|
||||
// are captures and not debug logging files. This is the first API version in the v1.0
|
||||
// branch.
|
||||
// 1.2.0 - Added feature: SetCaptureFileComments() to add comments to a capture file that will be
|
||||
// displayed in the UI program on load.
|
||||
// 1.3.0 - Added feature: New capture option eRENDERDOC_Option_AllowUnsupportedVendorExtensions
|
||||
// which allows users to opt-in to allowing unsupported vendor extensions to function.
|
||||
// Should be used at the user's own risk.
|
||||
// Refactor: Renamed eRENDERDOC_Option_VerifyMapWrites to
|
||||
// eRENDERDOC_Option_VerifyBufferAccess, which now also controls initialisation to
|
||||
// 0xdddddddd of uninitialised buffer contents.
|
||||
// 1.4.0 - Added feature: DiscardFrameCapture() to discard a frame capture in progress and stop
|
||||
// capturing without saving anything to disk.
|
||||
// 1.4.1 - Refactor: Renamed Shutdown to RemoveHooks to better clarify what is happening
|
||||
// 1.4.2 - Refactor: Renamed 'draws' to 'actions' in callstack capture option.
|
||||
// 1.5.0 - Added feature: ShowReplayUI() to request that the replay UI show itself if connected
|
||||
// 1.6.0 - Added feature: SetCaptureTitle() which can be used to set a title for a
|
||||
// capture made with StartFrameCapture() or EndFrameCapture()
|
||||
|
||||
typedef struct RENDERDOC_API_1_6_0
|
||||
{
|
||||
pRENDERDOC_GetAPIVersion GetAPIVersion;
|
||||
|
||||
pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;
|
||||
pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;
|
||||
|
||||
pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;
|
||||
pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;
|
||||
|
||||
pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;
|
||||
pRENDERDOC_SetCaptureKeys SetCaptureKeys;
|
||||
|
||||
pRENDERDOC_GetOverlayBits GetOverlayBits;
|
||||
pRENDERDOC_MaskOverlayBits MaskOverlayBits;
|
||||
|
||||
// Shutdown was renamed to RemoveHooks in 1.4.1.
|
||||
// These unions allow old code to continue compiling without changes
|
||||
union
|
||||
{
|
||||
pRENDERDOC_Shutdown Shutdown;
|
||||
pRENDERDOC_RemoveHooks RemoveHooks;
|
||||
};
|
||||
pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;
|
||||
|
||||
// Get/SetLogFilePathTemplate was renamed to Get/SetCaptureFilePathTemplate in 1.1.2.
|
||||
// These unions allow old code to continue compiling without changes
|
||||
union
|
||||
{
|
||||
// deprecated name
|
||||
pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate;
|
||||
// current name
|
||||
pRENDERDOC_SetCaptureFilePathTemplate SetCaptureFilePathTemplate;
|
||||
};
|
||||
union
|
||||
{
|
||||
// deprecated name
|
||||
pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate;
|
||||
// current name
|
||||
pRENDERDOC_GetCaptureFilePathTemplate GetCaptureFilePathTemplate;
|
||||
};
|
||||
|
||||
pRENDERDOC_GetNumCaptures GetNumCaptures;
|
||||
pRENDERDOC_GetCapture GetCapture;
|
||||
|
||||
pRENDERDOC_TriggerCapture TriggerCapture;
|
||||
|
||||
// IsRemoteAccessConnected was renamed to IsTargetControlConnected in 1.1.1.
|
||||
// This union allows old code to continue compiling without changes
|
||||
union
|
||||
{
|
||||
// deprecated name
|
||||
pRENDERDOC_IsRemoteAccessConnected IsRemoteAccessConnected;
|
||||
// current name
|
||||
pRENDERDOC_IsTargetControlConnected IsTargetControlConnected;
|
||||
};
|
||||
pRENDERDOC_LaunchReplayUI LaunchReplayUI;
|
||||
|
||||
pRENDERDOC_SetActiveWindow SetActiveWindow;
|
||||
|
||||
pRENDERDOC_StartFrameCapture StartFrameCapture;
|
||||
pRENDERDOC_IsFrameCapturing IsFrameCapturing;
|
||||
pRENDERDOC_EndFrameCapture EndFrameCapture;
|
||||
|
||||
// new function in 1.1.0
|
||||
pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;
|
||||
|
||||
// new function in 1.2.0
|
||||
pRENDERDOC_SetCaptureFileComments SetCaptureFileComments;
|
||||
|
||||
// new function in 1.4.0
|
||||
pRENDERDOC_DiscardFrameCapture DiscardFrameCapture;
|
||||
|
||||
// new function in 1.5.0
|
||||
pRENDERDOC_ShowReplayUI ShowReplayUI;
|
||||
|
||||
// new function in 1.6.0
|
||||
pRENDERDOC_SetCaptureTitle SetCaptureTitle;
|
||||
} RENDERDOC_API_1_6_0;
|
||||
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_0;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_1;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_2;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_0;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_1;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_2;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_2_0;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_3_0;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_0;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_1;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_2;
|
||||
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_5_0;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RenderDoc API entry point
|
||||
//
|
||||
// This entry point can be obtained via GetProcAddress/dlsym if RenderDoc is available.
|
||||
//
|
||||
// The name is the same as the typedef - "RENDERDOC_GetAPI"
|
||||
//
|
||||
// This function is not thread safe, and should not be called on multiple threads at once.
|
||||
// Ideally, call this once as early as possible in your application's startup, before doing
|
||||
// any API work, since some configuration functionality etc has to be done also before
|
||||
// initialising any APIs.
|
||||
//
|
||||
// Parameters:
|
||||
// version is a single value from the RENDERDOC_Version above.
|
||||
//
|
||||
// outAPIPointers will be filled out with a pointer to the corresponding struct of function
|
||||
// pointers.
|
||||
//
|
||||
// Returns:
|
||||
// 1 - if the outAPIPointers has been filled with a pointer to the API struct requested
|
||||
// 0 - if the requested version is not supported or the arguments are invalid.
|
||||
//
|
||||
typedef int(RENDERDOC_CC *pRENDERDOC_GetAPI)(RENDERDOC_Version version, void **outAPIPointers);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2c48a1a50203bbaf1e3d0d64c5d726d56f8d3bb3
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4cc3410dce50cefce98d3cf3cf1bc8eca83b862a
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 37090c74cc6e680f2bc334cac8fd182f7634a1f6
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
Subproject commit 4b740127230472779c4a4d71e1a75aaa3a367a2d
|
|
@ -0,0 +1 @@
|
|||
Subproject commit b8061982cad0210b649541016c88ff5faa90733c
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e1bdbca9baf4d682fb6066b380f4aa4a7bdbb58a
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d205aff40b4e15d4c568523ee6a26f85138126d9
|
|
@ -0,0 +1 @@
|
|||
Subproject commit f00c973a6ab2a23573708568b8ef4acc20a9d36b
|
|
@ -0,0 +1 @@
|
|||
Subproject commit ccdf68421bc8eb85693f573080fc0a5faad862db
|
|
@ -0,0 +1 @@
|
|||
Subproject commit dbea33e47e7c0fe0b7c8592cd931c7430c1f130d
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d54e3769be0c522015b784eca2af258b1c026107
|
|
@ -0,0 +1 @@
|
|||
Subproject commit bd73bc03b0aacaa89c9c203b9b43cd08f1b1843b
|
File diff suppressed because it is too large
Load Diff
105455
scripts/ps4_names.txt
105455
scripts/ps4_names.txt
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,6 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Helper script that generates stub implementation of all known nids + lookup tables
|
||||
# for shadps4
|
||||
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
# SPDX-FileCopyrightText: 2016 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
IncludeCategories:
|
||||
- Regex: '^\<[^Q][^/.>]*\>'
|
||||
Priority: -2
|
||||
- Regex: '^\<'
|
||||
Priority: -1
|
||||
- Regex: '^\"'
|
||||
Priority: 0
|
||||
IndentCaseLabels: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 150
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
---
|
||||
Language: Java
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 100
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
IncludeCategories:
|
||||
- Regex: '^\<[^Q][^/.>]*\>'
|
||||
Priority: -2
|
||||
- Regex: '^\<'
|
||||
Priority: -1
|
||||
- Regex: '^\"'
|
||||
Priority: 0
|
||||
IndentCaseLabels: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 150
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
---
|
||||
Language: ObjC
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 100
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
IncludeCategories:
|
||||
- Regex: '^\<[^Q][^/.>]*\>'
|
||||
Priority: -2
|
||||
- Regex: '^\<'
|
||||
Priority: -1
|
||||
- Regex: '^\"'
|
||||
Priority: 0
|
||||
IndentCaseLabels: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 150
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
...
|
|
@ -1,53 +0,0 @@
|
|||
#include "controller.h"
|
||||
#include <core/hle/libraries/libkernel/time_management.h>
|
||||
|
||||
namespace Emulator::Host::Controller {
|
||||
GameController::GameController() { m_states_num = 0;
|
||||
m_last_state = State();
|
||||
}
|
||||
void GameController::readState(State* state, bool* isConnected, int* connectedCount) {
|
||||
std::scoped_lock lock{m_mutex};
|
||||
|
||||
*isConnected = m_connected;
|
||||
*connectedCount = m_connected_count;
|
||||
*state = getLastState();
|
||||
}
|
||||
|
||||
State GameController::getLastState() const {
|
||||
if (m_states_num == 0) {
|
||||
return m_last_state;
|
||||
}
|
||||
|
||||
auto last = (m_first_state + m_states_num - 1) % MAX_STATES;
|
||||
|
||||
return m_states[last];
|
||||
}
|
||||
|
||||
void GameController::addState(const State& state) {
|
||||
if (m_states_num >= MAX_STATES) {
|
||||
m_states_num = MAX_STATES - 1;
|
||||
m_first_state = (m_first_state + 1) % MAX_STATES;
|
||||
}
|
||||
|
||||
auto index = (m_first_state + m_states_num) % MAX_STATES;
|
||||
|
||||
m_states[index] = state;
|
||||
m_last_state = state;
|
||||
|
||||
m_states_num++;
|
||||
}
|
||||
|
||||
void GameController::checKButton(int id, u32 button, bool isPressed) {
|
||||
std::scoped_lock lock{m_mutex};
|
||||
auto state = getLastState();
|
||||
state.time = Core::Libraries::LibKernel::sceKernelGetProcessTime();
|
||||
if (isPressed) {
|
||||
state.buttonsState |= button;
|
||||
} else {
|
||||
state.buttonsState &= ~button;
|
||||
}
|
||||
|
||||
addState(state);
|
||||
}
|
||||
|
||||
} // namespace Emulator::Host::Controller
|
|
@ -1,34 +0,0 @@
|
|||
#pragma once
|
||||
#include <types.h>
|
||||
#include <mutex>
|
||||
|
||||
namespace Emulator::Host::Controller {
|
||||
struct State {
|
||||
u32 buttonsState =0;
|
||||
u64 time = 0;
|
||||
};
|
||||
|
||||
constexpr u32 MAX_STATES = 64;
|
||||
|
||||
class GameController {
|
||||
public:
|
||||
GameController();
|
||||
virtual ~GameController() = default;
|
||||
|
||||
void readState(State* state, bool* isConnected, int* connectedCount);
|
||||
State getLastState() const;
|
||||
void checKButton(int id, u32 button, bool isPressed);
|
||||
void addState(const State& state);
|
||||
|
||||
|
||||
private:
|
||||
std::mutex m_mutex;
|
||||
bool m_connected = false;
|
||||
State m_last_state;
|
||||
int m_connected_count = 0;
|
||||
u32 m_states_num = 0;
|
||||
u32 m_first_state = 0;
|
||||
State m_states[MAX_STATES];
|
||||
};
|
||||
|
||||
} // namespace Emulator::HLE::Libraries::Controller
|
|
@ -1,101 +0,0 @@
|
|||
#include "ElfViewer.h"
|
||||
#include "imgui.h"
|
||||
|
||||
ElfViewer::ElfViewer(Elf* elf)
|
||||
{
|
||||
this->elf = elf;
|
||||
}
|
||||
|
||||
//function to display Self/Elf window
|
||||
void ElfViewer::display(bool enabled)
|
||||
{
|
||||
int SELF_HEADER = 0;
|
||||
int ELF_HEADER = 1;
|
||||
int SEG_HEADER_START = 100;
|
||||
int ELF_PROGRAM_HEADER_START = 200;
|
||||
|
||||
static int selected = -1;
|
||||
ImGui::Begin("Self/Elf Viewer", &enabled);
|
||||
|
||||
ImGui::BeginChild("Left Tree pane", ImVec2(300, 0), false);//left tree
|
||||
if (elf->isSelfFile())
|
||||
{
|
||||
if (ImGui::TreeNode("Self"))
|
||||
{
|
||||
if (ImGui::TreeNodeEx("Self Header", ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "Self Header"))
|
||||
{
|
||||
if (ImGui::IsItemClicked())
|
||||
selected = SELF_HEADER;
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Self Segment Header"))
|
||||
{
|
||||
const auto self = elf->GetSElfHeader();
|
||||
for (u16 i = 0; i < self.segment_count; i++)
|
||||
{
|
||||
if (ImGui::TreeNodeEx((void*)(intptr_t)i, ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "%d", i))
|
||||
{
|
||||
if (ImGui::IsItemClicked())
|
||||
selected = SEG_HEADER_START+i;
|
||||
}
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::TreeNodeEx("Self Id Header", ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "Self Id Header");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
if (ImGui::TreeNode("Elf"))
|
||||
{
|
||||
const auto elf_header = elf->GetElfHeader();
|
||||
if (ImGui::TreeNodeEx("Elf Header", ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "Elf Header"))
|
||||
{
|
||||
if (ImGui::IsItemClicked())
|
||||
selected = ELF_HEADER;
|
||||
}
|
||||
if (ImGui::TreeNode("Elf Program Headers"))
|
||||
{
|
||||
const auto pheader = elf->GetProgramHeader();
|
||||
for (u16 i = 0; i < elf_header.e_phnum; i++)
|
||||
{
|
||||
std::string ProgramInfo = elf->ElfPheaderFlagsStr(pheader[i].p_flags) + " " + elf->ElfPheaderTypeStr(pheader[i].p_type);
|
||||
if (ImGui::TreeNodeEx((void*)(intptr_t)i,ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "%d - %s", i,ProgramInfo.c_str()))
|
||||
{
|
||||
if (ImGui::IsItemClicked())
|
||||
selected = ELF_PROGRAM_HEADER_START + i;
|
||||
}
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (elf_header.e_shnum != 0)
|
||||
{
|
||||
if (ImGui::TreeNode("Elf Section Headers"))
|
||||
{
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::EndChild();//end of left tree
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginChild("Table View", ImVec2(0, -ImGui::GetFrameHeightWithSpacing())); // Leave room for 1 line below us
|
||||
if (selected == SELF_HEADER) {
|
||||
ImGui::TextWrapped("%s", elf->SElfHeaderStr().c_str());
|
||||
}
|
||||
if (selected >= 100 && selected < 200)
|
||||
{
|
||||
ImGui::TextWrapped("%s", elf->SELFSegHeader(selected-100).c_str());
|
||||
}
|
||||
if (selected == ELF_HEADER) {
|
||||
ImGui::TextWrapped("%s", elf->ElfHeaderStr().c_str());
|
||||
}
|
||||
if (selected >= 200 && selected < 300)
|
||||
{
|
||||
ImGui::TextWrapped("%s", elf->ElfPHeaderStr(selected - 200).c_str());
|
||||
}
|
||||
ImGui::EndChild();
|
||||
ImGui::End();
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
#pragma once
|
||||
#include "../core/PS4/Loader/Elf.h"
|
||||
|
||||
class ElfViewer {
|
||||
private:
|
||||
Elf* elf;
|
||||
public:
|
||||
ElfViewer(Elf* elf);
|
||||
void display(bool enabled);//display imgui window
|
||||
|
||||
};
|
|
@ -1,109 +0,0 @@
|
|||
#include "Timer.h"
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
Lib::Timer::Timer() {
|
||||
#ifdef _WIN64
|
||||
LARGE_INTEGER f;
|
||||
QueryPerformanceFrequency(&f);
|
||||
m_Frequency = f.QuadPart;
|
||||
#else
|
||||
#error Unimplemented Timer constructor
|
||||
#endif
|
||||
}
|
||||
|
||||
void Lib::Timer::Start() {
|
||||
#ifdef _WIN64
|
||||
LARGE_INTEGER c;
|
||||
QueryPerformanceCounter(&c);
|
||||
m_StartTime = c.QuadPart;
|
||||
#else
|
||||
#error Unimplemented Timer::Start()
|
||||
#endif
|
||||
m_is_timer_paused = false;
|
||||
}
|
||||
|
||||
void Lib::Timer::Pause() {
|
||||
#ifdef _WIN64
|
||||
LARGE_INTEGER c;
|
||||
QueryPerformanceCounter(&c);
|
||||
m_PauseTime = c.QuadPart;
|
||||
#else
|
||||
#error Unimplemented Timer::Pause()
|
||||
#endif
|
||||
m_is_timer_paused = true;
|
||||
}
|
||||
|
||||
void Lib::Timer::Resume() {
|
||||
u64 current_time = 0;
|
||||
#ifdef _WIN64
|
||||
LARGE_INTEGER c;
|
||||
QueryPerformanceCounter(&c);
|
||||
current_time = c.QuadPart;
|
||||
#else
|
||||
#error Unimplemented Timer::Resume()
|
||||
#endif
|
||||
m_StartTime += current_time - m_PauseTime;
|
||||
m_is_timer_paused = false;
|
||||
}
|
||||
|
||||
bool Lib::Timer::IsPaused() const { return m_is_timer_paused; }
|
||||
|
||||
double Lib::Timer::GetTimeMsec() const {
|
||||
if (m_is_timer_paused) {
|
||||
return 1000.0 * (static_cast<double>(m_PauseTime - m_StartTime)) / static_cast<double>(m_Frequency);
|
||||
}
|
||||
|
||||
u64 current_time = 0;
|
||||
#ifdef _WIN64
|
||||
LARGE_INTEGER c;
|
||||
QueryPerformanceCounter(&c);
|
||||
current_time = c.QuadPart;
|
||||
#else
|
||||
#error Unimplemented Timer::GetTimeMsec()
|
||||
#endif
|
||||
return 1000.0 * (static_cast<double>(current_time - m_StartTime)) / static_cast<double>(m_Frequency);
|
||||
}
|
||||
|
||||
double Lib::Timer::GetTimeSec() const {
|
||||
if (m_is_timer_paused) {
|
||||
return (static_cast<double>(m_PauseTime - m_StartTime)) / static_cast<double>(m_Frequency);
|
||||
}
|
||||
|
||||
u64 current_time = 0;
|
||||
#ifdef _WIN64
|
||||
LARGE_INTEGER c;
|
||||
QueryPerformanceCounter(&c);
|
||||
current_time = c.QuadPart;
|
||||
#else
|
||||
#error Unimplemented Timer::GetTimeSec()
|
||||
#endif
|
||||
return (static_cast<double>(current_time - m_StartTime)) / static_cast<double>(m_Frequency);
|
||||
}
|
||||
|
||||
u64 Lib::Timer::GetTicks() const {
|
||||
if (m_is_timer_paused) {
|
||||
return (m_PauseTime - m_StartTime);
|
||||
}
|
||||
|
||||
u64 current_time = 0;
|
||||
#ifdef _WIN64
|
||||
LARGE_INTEGER c;
|
||||
QueryPerformanceCounter(&c);
|
||||
current_time = c.QuadPart;
|
||||
#else
|
||||
#error Unimplemented Timer::GetTicks()
|
||||
#endif
|
||||
return (current_time - m_StartTime);
|
||||
}
|
||||
|
||||
u64 Lib::Timer::GetFrequency() const { return m_Frequency; }
|
||||
|
||||
u64 Lib::Timer::getQueryPerformanceCounter() {
|
||||
LARGE_INTEGER c;
|
||||
QueryPerformanceCounter(&c);
|
||||
return c.QuadPart;
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "../types.h"
|
||||
|
||||
namespace Lib {
|
||||
class Timer final
|
||||
{
|
||||
public:
|
||||
Timer();
|
||||
~Timer() = default;
|
||||
|
||||
void Start();
|
||||
void Pause();
|
||||
void Resume();
|
||||
bool IsPaused() const;
|
||||
|
||||
double GetTimeMsec() const;// return time in milliseconds
|
||||
double GetTimeSec() const;// return time in seconds
|
||||
u64 GetTicks() const;// return time in ticks
|
||||
u64 GetFrequency() const;// return ticks frequency
|
||||
[[nodiscard]] static u64 getQueryPerformanceCounter();
|
||||
public:
|
||||
Timer(const Timer&) = delete;
|
||||
Timer& operator=(const Timer&) = delete;
|
||||
Timer(Timer&&) = delete;
|
||||
Timer& operator=(Timer&&) = delete;
|
||||
|
||||
private:
|
||||
bool m_is_timer_paused = true;
|
||||
u64 m_Frequency = 0;
|
||||
u64 m_StartTime = 0;
|
||||
u64 m_PauseTime = 0;
|
||||
};
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
#include "Disassembler.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
Disassembler::Disassembler()
|
||||
{
|
||||
ZydisDecoderInit(&m_decoder, ZYDIS_MACHINE_MODE_LONG_64, ZYDIS_STACK_WIDTH_64);
|
||||
ZydisFormatterInit(&m_formatter, ZYDIS_FORMATTER_STYLE_INTEL);
|
||||
}
|
||||
|
||||
Disassembler::~Disassembler()
|
||||
{
|
||||
}
|
||||
|
||||
void Disassembler::printInstruction(void* code,u64 address)//print a single instruction
|
||||
{
|
||||
ZydisDecodedInstruction instruction;
|
||||
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT_VISIBLE];
|
||||
ZyanStatus status = ZydisDecoderDecodeFull(&m_decoder, code, sizeof(code), &instruction, operands);
|
||||
if (!ZYAN_SUCCESS(status))
|
||||
{
|
||||
fmt::print("decode instruction failed at {}\n", fmt::ptr(code));
|
||||
}
|
||||
else
|
||||
{
|
||||
printInst(instruction, operands,address);
|
||||
}
|
||||
}
|
||||
|
||||
void Disassembler::printInst(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);
|
||||
fmt::print("instruction: {}\n", szBuffer);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "Zydis.h"
|
||||
#include "../types.h"
|
||||
|
||||
class Disassembler
|
||||
{
|
||||
public:
|
||||
Disassembler();
|
||||
~Disassembler();
|
||||
void printInst(ZydisDecodedInstruction& inst, ZydisDecodedOperand* operands,u64 address);
|
||||
void printInstruction(void* code,u64 address);
|
||||
|
||||
private:
|
||||
ZydisDecoder m_decoder;
|
||||
ZydisFormatter m_formatter;
|
||||
};
|
|
@ -1,84 +0,0 @@
|
|||
#include "config.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <fmt/core.h>
|
||||
#include <toml11/toml.hpp>
|
||||
|
||||
namespace Config {
|
||||
|
||||
bool isNeo = false;
|
||||
u32 screenWidth = 1280;
|
||||
u32 screenHeight = 720;
|
||||
u32 logLevel = 0; // TRACE = 0 , DEBUG = 1 , INFO = 2 , WARN = 3 , ERROR = 4 , CRITICAL = 5, OFF = 6
|
||||
|
||||
bool isNeoMode() { return isNeo; }
|
||||
u32 getScreenWidth() { return screenWidth; }
|
||||
u32 getScreenHeight() { return screenHeight; }
|
||||
u32 getLogLevel() { return logLevel; }
|
||||
|
||||
void load(const std::filesystem::path& path) {
|
||||
// If the configuration file does not exist, create it and return
|
||||
std::error_code error;
|
||||
if (!std::filesystem::exists(path, error)) {
|
||||
save(path);
|
||||
return;
|
||||
}
|
||||
|
||||
toml::value data;
|
||||
|
||||
try {
|
||||
data = toml::parse(path);
|
||||
} catch (std::exception& ex) {
|
||||
fmt::print("Got exception trying to load config file. Exception: {}\n", ex.what());
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.contains("General")) {
|
||||
auto generalResult = toml::expect<toml::value>(data.at("General"));
|
||||
if (generalResult.is_ok()) {
|
||||
auto general = generalResult.unwrap();
|
||||
|
||||
isNeo = toml::find_or<toml::boolean>(general, "isPS4Pro", false);
|
||||
logLevel = toml::find_or<toml::integer>(general, "logLevel", false);
|
||||
}
|
||||
}
|
||||
if (data.contains("GPU")) {
|
||||
auto generalResult = toml::expect<toml::value>(data.at("GPU"));
|
||||
if (generalResult.is_ok()) {
|
||||
auto general = generalResult.unwrap();
|
||||
|
||||
screenWidth = toml::find_or<toml::integer>(general, "screenWidth", false);
|
||||
screenHeight = toml::find_or<toml::integer>(general, "screenHeight", false);
|
||||
}
|
||||
}
|
||||
int k = 0;
|
||||
}
|
||||
void save(const std::filesystem::path& path) {
|
||||
toml::basic_value<toml::preserve_comments> data;
|
||||
|
||||
std::error_code error;
|
||||
if (std::filesystem::exists(path, error)) {
|
||||
try {
|
||||
data = toml::parse<toml::preserve_comments>(path);
|
||||
} 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 accessing {} (error: {})\n", path.string(), error.message().c_str());
|
||||
}
|
||||
fmt::print("Saving new configuration file {}\n", path.string());
|
||||
}
|
||||
|
||||
data["General"]["isPS4Pro"] = isNeo;
|
||||
data["General"]["logLevel"] = logLevel;
|
||||
data["GPU"]["screenWidth"] = screenWidth;
|
||||
data["GPU"]["screenHeight"] = screenHeight;
|
||||
|
||||
std::ofstream file(path, std::ios::out);
|
||||
file << data;
|
||||
file.close();
|
||||
}
|
||||
} // namespace Config
|
|
@ -1,15 +0,0 @@
|
|||
#pragma once
|
||||
#include <filesystem>
|
||||
#include <types.h>
|
||||
|
||||
namespace Config {
|
||||
void load(const std::filesystem::path& path);
|
||||
void save(const std::filesystem::path& path);
|
||||
|
||||
bool isNeoMode();
|
||||
u32 getLogLevel();
|
||||
|
||||
u32 getScreenWidth();
|
||||
u32 getScreenHeight();
|
||||
|
||||
}; // namespace Config
|
|
@ -1,90 +0,0 @@
|
|||
#include <spdlog/common.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <vector>
|
||||
#include <Util/config.h>
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "log.h"
|
||||
|
||||
namespace logging {
|
||||
std::vector<spdlog::sink_ptr> sinks;
|
||||
constexpr bool log_file_exceptions = true; // disable it to disable logging
|
||||
|
||||
void flush() { spdlog::details::registry::instance().flush_all(); }
|
||||
|
||||
#ifdef _WIN64
|
||||
|
||||
static LONG WINAPI exception_handler(PEXCEPTION_POINTERS pExp) noexcept {
|
||||
const u32 ec = pExp->ExceptionRecord->ExceptionCode;
|
||||
switch (ec) {
|
||||
case EXCEPTION_ACCESS_VIOLATION:
|
||||
LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_ACCESS_VIOLATION ({}). ", log_hex(ec));
|
||||
switch (pExp->ExceptionRecord->ExceptionInformation[0]) {
|
||||
case 0: LOG_CRITICAL_IF(log_file_exceptions,"Read violation at address {}.", log_hex(pExp->ExceptionRecord->ExceptionInformation[1])); break;
|
||||
case 1: LOG_CRITICAL_IF(log_file_exceptions,"Write violation at address {}.", log_hex(pExp->ExceptionRecord->ExceptionInformation[1])); break;
|
||||
case 8:LOG_CRITICAL_IF(log_file_exceptions,"DEP violation at address {}.", log_hex(pExp->ExceptionRecord->ExceptionInformation[1])); break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_ARRAY_BOUNDS_EXCEEDED ({:#x}). ", ec); break;
|
||||
case EXCEPTION_DATATYPE_MISALIGNMENT: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_DATATYPE_MISALIGNMENT ({}). ", log_hex(ec)); break;
|
||||
case EXCEPTION_FLT_DIVIDE_BY_ZERO: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_FLT_DIVIDE_BY_ZERO ({}). ", log_hex(ec)); break;
|
||||
case EXCEPTION_ILLEGAL_INSTRUCTION: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_ILLEGAL_INSTRUCTION ({}). ", log_hex(ec)); break;
|
||||
case EXCEPTION_IN_PAGE_ERROR: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_IN_PAGE_ERROR ({}). ", log_hex(ec)); break;
|
||||
case EXCEPTION_INT_DIVIDE_BY_ZERO: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_INT_DIVIDE_BY_ZERO ({}). ", log_hex(ec)); break;
|
||||
case EXCEPTION_PRIV_INSTRUCTION: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_PRIV_INSTRUCTION ({}). ", log_hex(ec)); break;
|
||||
case EXCEPTION_STACK_OVERFLOW: LOG_CRITICAL_IF(log_file_exceptions,"Exception EXCEPTION_STACK_OVERFLOW ({}). ", log_hex(ec)); break;
|
||||
default: return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
flush();
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
void register_log_exception_handler() {
|
||||
if (!AddVectoredExceptionHandler(0, exception_handler)) {
|
||||
LOG_CRITICAL_IF(log_file_exceptions,"Failed to register an exception handler");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int init(bool use_stdout) {
|
||||
sinks.clear(); // clear existing sinks
|
||||
if (use_stdout) // if we use stdout window then init it as well
|
||||
sinks.push_back(std::make_shared<spdlog::sinks::stdout_color_sink_mt>());
|
||||
sinks.push_back(std::make_shared<spdlog::sinks::basic_file_sink_mt>(L"shadps4.txt", true));
|
||||
spdlog::set_default_logger(std::make_shared<spdlog::logger>("shadps4 logger", begin(sinks), end(sinks)));
|
||||
auto f = std::make_unique<spdlog::pattern_formatter>("%^|%L|: %v%$", spdlog::pattern_time_type::local, std::string("")); // disable eol
|
||||
spdlog::set_formatter(std::move(f));
|
||||
spdlog::set_level(static_cast<spdlog::level::level_enum>(Config::getLogLevel()));
|
||||
spdlog::level::level_enum t = spdlog::get_level();
|
||||
|
||||
#ifdef _WIN64
|
||||
register_log_exception_handler();
|
||||
#endif
|
||||
static std::terminate_handler old_terminate = nullptr;
|
||||
old_terminate = std::set_terminate([]() {
|
||||
try {
|
||||
std::rethrow_exception(std::current_exception());
|
||||
} catch (const std::exception &e) {
|
||||
LOG_CRITICAL_IF(log_file_exceptions, "Unhandled C++ exception. {}", e.what());
|
||||
} catch (...) {
|
||||
LOG_CRITICAL_IF(log_file_exceptions, "Unhandled C++ exception. UNKNOWN");
|
||||
}
|
||||
flush();
|
||||
if (old_terminate) old_terminate();
|
||||
});
|
||||
|
||||
return 0; // all ok
|
||||
}
|
||||
|
||||
void set_level(spdlog::level::level_enum log_level) { spdlog::set_level(log_level); }
|
||||
|
||||
} // namespace logging
|
|
@ -1,73 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
namespace logging {
|
||||
|
||||
#define LOG_TRACE SPDLOG_TRACE
|
||||
#define LOG_DEBUG SPDLOG_DEBUG
|
||||
#define LOG_INFO SPDLOG_INFO
|
||||
#define LOG_WARN SPDLOG_WARN
|
||||
#define LOG_ERROR SPDLOG_ERROR
|
||||
#define LOG_CRITICAL SPDLOG_CRITICAL
|
||||
|
||||
#define LOG_TRACE_IF(flag, ...) \
|
||||
if (flag) LOG_TRACE(__VA_ARGS__)
|
||||
#define LOG_DEBUG_IF(flag, ...) \
|
||||
if (flag) LOG_DEBUG(__VA_ARGS__)
|
||||
#define LOG_INFO_IF(flag, ...) \
|
||||
if (flag) LOG_INFO(__VA_ARGS__)
|
||||
#define LOG_WARN_IF(flag, ...) \
|
||||
if (flag) LOG_WARN(__VA_ARGS__)
|
||||
#define LOG_ERROR_IF(flag, ...) \
|
||||
if (flag) LOG_ERROR(__VA_ARGS__)
|
||||
#define LOG_CRITICAL_IF(flag, ...) \
|
||||
if (flag) LOG_CRITICAL(__VA_ARGS__)
|
||||
|
||||
int init(bool use_stdout);
|
||||
void set_level(spdlog::level::level_enum log_level);
|
||||
} // namespace logging
|
||||
|
||||
// copyright vita3k emu https://github.com/Vita3K/Vita3K/blob/master/vita3k/util/include/util/log.h
|
||||
/*
|
||||
returns: A string with the input number formatted in hexadecimal
|
||||
Examples:
|
||||
* `12` returns: `"0xC"`
|
||||
* `1337` returns: `"0x539"`
|
||||
* `72742069` returns: `"0x455F4B5"`
|
||||
*/
|
||||
template <typename T>
|
||||
std::string log_hex(T val) {
|
||||
using unsigned_type = typename std::make_unsigned<T>::type;
|
||||
std::stringstream ss;
|
||||
ss << "0x";
|
||||
ss << std::hex << static_cast<unsigned_type>(val);
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
/*
|
||||
returns: A string with the input number formatted in hexadecimal with padding of the inputted type size
|
||||
Examples:
|
||||
* `uint8_t 5` returns: `"0x05"`
|
||||
* `uint8_t 15` returns: `"0x0F"`
|
||||
* `uint8_t 255` returns: `"0xFF"`
|
||||
|
||||
* `uint16_t 15` returns: `"0x000F"`
|
||||
* `uint16_t 1337` returns: `"0x0539"`
|
||||
* `uint16_t 65535` returns: `"0xFFFF"`
|
||||
|
||||
|
||||
* `uint32_t 15` returns: `"0x0000000F"`
|
||||
* `uint32_t 1337` returns: `"0x00000539"`
|
||||
* `uint32_t 65535` returns: `"0x0000FFFF"`
|
||||
* `uint32_t 134217728` returns: `"0x08000000"`
|
||||
*/
|
||||
template <typename T>
|
||||
std::string log_hex_full(T val) {
|
||||
std::stringstream ss;
|
||||
ss << "0x";
|
||||
ss << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << val;
|
||||
return ss.str();
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#include "string_util.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace StringUtil {
|
||||
|
||||
std::vector<std::string> split_string(const std::string &str, char delimiter) {
|
||||
std::stringstream str_stream(str);
|
||||
std::string segment;
|
||||
std::vector<std::string> seglist;
|
||||
|
||||
const size_t num_segments = std::count_if(str.begin(), str.end(), [&](char c) { return c == delimiter; }) + (str.empty() ? 1 : 0);
|
||||
|
||||
seglist.reserve(num_segments);
|
||||
|
||||
while (std::getline(str_stream, segment, delimiter)) {
|
||||
seglist.push_back(segment);
|
||||
}
|
||||
return seglist;
|
||||
}
|
||||
|
||||
} // namespace StringUtil
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace StringUtil {
|
||||
|
||||
std::vector<std::string> split_string(const std::string& str, char delimiter);
|
||||
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "sdl_audio.h"
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "core/libraries/error_codes.h"
|
||||
|
||||
#include <SDL3/SDL_audio.h>
|
||||
#include <SDL3/SDL_init.h>
|
||||
#include <SDL3/SDL_timer.h>
|
||||
|
||||
#include <mutex> // std::unique_lock
|
||||
|
||||
namespace Audio {
|
||||
|
||||
int SDLAudio::AudioOutOpen(int type, u32 samples_num, u32 freq,
|
||||
Libraries::AudioOut::OrbisAudioOutParamFormat format) {
|
||||
using Libraries::AudioOut::OrbisAudioOutParamFormat;
|
||||
std::unique_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::shared_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) > 65536) {
|
||||
SDL_Delay(0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool SDLAudio::AudioOutSetVolume(s32 handle, s32 bitflag, s32* volume) {
|
||||
using Libraries::AudioOut::OrbisAudioOutParamFormat;
|
||||
std::shared_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::shared_lock lock{m_mutex};
|
||||
auto& port = portsOut[handle - 1];
|
||||
*type = port.type;
|
||||
*channels_num = port.channels_num;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Audio
|
|
@ -0,0 +1,40 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <shared_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 {
|
||||
SDL_AudioStream* stream = nullptr;
|
||||
u32 samples_num = 0;
|
||||
u32 freq = 0;
|
||||
u32 format = -1;
|
||||
int type = 0;
|
||||
int channels_num = 0;
|
||||
int volume[8] = {};
|
||||
u8 sample_size = 0;
|
||||
bool isOpen = false;
|
||||
};
|
||||
std::shared_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
|
|
@ -0,0 +1,31 @@
|
|||
// SPDX-FileCopyrightText: 2014 Jannik Vogel <email@jannikvogel.de>
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Common {
|
||||
|
||||
template <typename T>
|
||||
[[nodiscard]] constexpr T AlignUp(T value, std::size_t size) {
|
||||
static_assert(std::is_unsigned_v<T>, "T must be an unsigned value.");
|
||||
auto mod{static_cast<T>(value % size)};
|
||||
value -= mod;
|
||||
return static_cast<T>(mod == T{0} ? value : value + size);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
[[nodiscard]] constexpr T AlignDown(T value, std::size_t size) {
|
||||
static_assert(std::is_unsigned_v<T>, "T must be an unsigned value.");
|
||||
return static_cast<T>(value - value % size);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires std::is_integral_v<T>
|
||||
[[nodiscard]] constexpr bool Is16KBAligned(T value) {
|
||||
return (value & 0x3FFF) == 0;
|
||||
}
|
||||
|
||||
} // namespace Common
|
|
@ -0,0 +1,20 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/backend.h"
|
||||
|
||||
#define Crash() __asm__ __volatile__("int $3")
|
||||
|
||||
void assert_fail_impl() {
|
||||
Common::Log::Stop();
|
||||
std::fflush(stdout);
|
||||
Crash();
|
||||
}
|
||||
|
||||
[[noreturn]] void unreachable_impl() {
|
||||
Common::Log::Stop();
|
||||
std::fflush(stdout);
|
||||
Crash();
|
||||
throw std::runtime_error("Unreachable code");
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
// SPDX-FileCopyrightText: 2013 Dolphin Emulator Project
|
||||
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/logging/log.h"
|
||||
|
||||
// Sometimes we want to try to continue even after hitting an assert.
|
||||
// However touching this file yields a global recompilation as this header is included almost
|
||||
// everywhere. So let's just move the handling of the failed assert to a single cpp file.
|
||||
|
||||
void assert_fail_impl();
|
||||
[[noreturn]] void unreachable_impl();
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define SHAD_NO_INLINE __declspec(noinline)
|
||||
#else
|
||||
#define SHAD_NO_INLINE __attribute__((noinline))
|
||||
#endif
|
||||
|
||||
#define ASSERT(_a_) \
|
||||
([&]() SHAD_NO_INLINE { \
|
||||
if (!(_a_)) [[unlikely]] { \
|
||||
LOG_CRITICAL(Debug, "Assertion Failed!"); \
|
||||
assert_fail_impl(); \
|
||||
} \
|
||||
}())
|
||||
|
||||
#define ASSERT_MSG(_a_, ...) \
|
||||
([&]() SHAD_NO_INLINE { \
|
||||
if (!(_a_)) [[unlikely]] { \
|
||||
LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); \
|
||||
assert_fail_impl(); \
|
||||
} \
|
||||
}())
|
||||
|
||||
#define UNREACHABLE() \
|
||||
do { \
|
||||
LOG_CRITICAL(Debug, "Unreachable code!"); \
|
||||
unreachable_impl(); \
|
||||
} while (0)
|
||||
|
||||
#define UNREACHABLE_MSG(...) \
|
||||
do { \
|
||||
LOG_CRITICAL(Debug, "Unreachable code!\n" __VA_ARGS__); \
|
||||
unreachable_impl(); \
|
||||
} while (0)
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define DEBUG_ASSERT(_a_) ASSERT(_a_)
|
||||
#define DEBUG_ASSERT_MSG(_a_, ...) ASSERT_MSG(_a_, __VA_ARGS__)
|
||||
#else // not debug
|
||||
#define DEBUG_ASSERT(_a_) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define DEBUG_ASSERT_MSG(_a_, _desc_, ...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define UNIMPLEMENTED() ASSERT_MSG(false, "Unimplemented code!")
|
||||
#define UNIMPLEMENTED_MSG(...) ASSERT_MSG(false, __VA_ARGS__)
|
||||
|
||||
#define UNIMPLEMENTED_IF(cond) ASSERT_MSG(!(cond), "Unimplemented code!")
|
||||
#define UNIMPLEMENTED_IF_MSG(cond, ...) ASSERT_MSG(!(cond), __VA_ARGS__)
|
||||
|
||||
// If the assert is ignored, execute _b_
|
||||
#define ASSERT_OR_EXECUTE(_a_, _b_) \
|
||||
do { \
|
||||
ASSERT(_a_); \
|
||||
if (!(_a_)) [[unlikely]] { \
|
||||
_b_ \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
// If the assert is ignored, execute _b_
|
||||
#define ASSERT_OR_EXECUTE_MSG(_a_, _b_, ...) \
|
||||
do { \
|
||||
ASSERT_MSG(_a_, __VA_ARGS__); \
|
||||
if (!(_a_)) [[unlikely]] { \
|
||||
_b_ \
|
||||
} \
|
||||
} while (0)
|
|
@ -0,0 +1,166 @@
|
|||
// SPDX-FileCopyrightText: 2014 Tony Wasserka
|
||||
// SPDX-FileCopyrightText: 2014 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: BSD-3-Clause AND GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
|
||||
/*
|
||||
* Abstract bitfield class
|
||||
*
|
||||
* Allows endianness-independent access to individual bitfields within some raw
|
||||
* integer value. The assembly generated by this class is identical to the
|
||||
* usage of raw bitfields, so it's a perfectly fine replacement.
|
||||
*
|
||||
* For BitField<X,Y,Z>, X is the distance of the bitfield to the LSB of the
|
||||
* raw value, Y is the length in bits of the bitfield. Z is an integer type
|
||||
* which determines the sign of the bitfield. Z must have the same size as the
|
||||
* raw integer.
|
||||
*
|
||||
*
|
||||
* General usage:
|
||||
*
|
||||
* Create a new union with the raw integer value as a member.
|
||||
* Then for each bitfield you want to expose, add a BitField member
|
||||
* in the union. The template parameters are the bit offset and the number
|
||||
* of desired bits.
|
||||
*
|
||||
* Changes in the bitfield members will then get reflected in the raw integer
|
||||
* value and vice-versa.
|
||||
*
|
||||
*
|
||||
* Sample usage:
|
||||
*
|
||||
* union SomeRegister
|
||||
* {
|
||||
* u32 hex;
|
||||
*
|
||||
* BitField<0,7,u32> first_seven_bits; // unsigned
|
||||
* BitField<7,8,u32> next_eight_bits; // unsigned
|
||||
* BitField<3,15,s32> some_signed_fields; // signed
|
||||
* };
|
||||
*
|
||||
* This is equivalent to the little-endian specific code:
|
||||
*
|
||||
* union SomeRegister
|
||||
* {
|
||||
* u32 hex;
|
||||
*
|
||||
* struct
|
||||
* {
|
||||
* u32 first_seven_bits : 7;
|
||||
* u32 next_eight_bits : 8;
|
||||
* };
|
||||
* struct
|
||||
* {
|
||||
* u32 : 3; // padding
|
||||
* s32 some_signed_fields : 15;
|
||||
* };
|
||||
* };
|
||||
*
|
||||
*
|
||||
* Caveats:
|
||||
*
|
||||
* 1)
|
||||
* BitField provides automatic casting from and to the storage type where
|
||||
* appropriate. However, when using non-typesafe functions like printf, an
|
||||
* explicit cast must be performed on the BitField object to make sure it gets
|
||||
* passed correctly, e.g.:
|
||||
* printf("Value: %d", (s32)some_register.some_signed_fields);
|
||||
*
|
||||
* 2)
|
||||
* Not really a caveat, but potentially irritating: This class is used in some
|
||||
* packed structures that do not guarantee proper alignment. Therefore we have
|
||||
* to use #pragma pack here not to pack the members of the class, but instead
|
||||
* to break GCC's assumption that the members of the class are aligned on
|
||||
* sizeof(StorageType).
|
||||
*/
|
||||
#pragma pack(1)
|
||||
template <std::size_t Position, std::size_t Bits, typename T>
|
||||
struct BitField {
|
||||
private:
|
||||
// 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
|
||||
// former case to workaround compile errors which arise when using
|
||||
// std::underlying_type<T>::type directly.
|
||||
using UnderlyingType = typename std::conditional_t<std::is_enum_v<T>, std::underlying_type<T>,
|
||||
std::enable_if<true, T>>::type;
|
||||
|
||||
// We store the value as the unsigned type to avoid undefined behaviour on value shifting
|
||||
using StorageType = std::make_unsigned_t<UnderlyingType>;
|
||||
|
||||
public:
|
||||
/// Constants to allow limited introspection of fields if needed
|
||||
static constexpr std::size_t position = Position;
|
||||
static constexpr std::size_t bits = Bits;
|
||||
static constexpr StorageType mask = (((StorageType)~0) >> (8 * sizeof(T) - bits)) << position;
|
||||
|
||||
/**
|
||||
* Formats a value by masking and shifting it according to the field parameters. A value
|
||||
* containing several bitfields can be assembled by formatting each of their values and ORing
|
||||
* the results together.
|
||||
*/
|
||||
[[nodiscard]] static constexpr StorageType FormatValue(const T& value) {
|
||||
return (static_cast<StorageType>(value) << position) & mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts a value from the passed storage. In most situations prefer use the member functions
|
||||
* (such as Value() or operator T), but this can be used to extract a value from a bitfield
|
||||
* union in a constexpr context.
|
||||
*/
|
||||
[[nodiscard]] static constexpr T ExtractValue(const StorageType& storage) {
|
||||
if constexpr (std::numeric_limits<UnderlyingType>::is_signed) {
|
||||
std::size_t shift = 8 * sizeof(T) - bits;
|
||||
return static_cast<T>(static_cast<UnderlyingType>(storage << (shift - position)) >>
|
||||
shift);
|
||||
} else {
|
||||
return static_cast<T>((storage & mask) >> position);
|
||||
}
|
||||
}
|
||||
|
||||
// This constructor and assignment operator might be considered ambiguous:
|
||||
// Would they initialize the storage or just the bitfield?
|
||||
// Hence, delete them. Use the Assign method to set bitfield values!
|
||||
BitField(T val) = delete;
|
||||
BitField& operator=(T val) = delete;
|
||||
|
||||
constexpr BitField() noexcept = default;
|
||||
|
||||
constexpr BitField(const BitField&) noexcept = default;
|
||||
constexpr BitField& operator=(const BitField&) noexcept = default;
|
||||
|
||||
constexpr BitField(BitField&&) noexcept = default;
|
||||
constexpr BitField& operator=(BitField&&) noexcept = default;
|
||||
|
||||
[[nodiscard]] constexpr operator T() const {
|
||||
return Value();
|
||||
}
|
||||
|
||||
constexpr void Assign(const T& value) {
|
||||
storage = (static_cast<StorageType>(storage) & ~mask) | FormatValue(value);
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr T Value() const {
|
||||
return ExtractValue(storage);
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr explicit operator bool() const {
|
||||
return Value() != 0;
|
||||
}
|
||||
|
||||
private:
|
||||
StorageType storage;
|
||||
|
||||
static_assert(bits + position <= 8 * sizeof(T), "Bitfield out of range");
|
||||
|
||||
// And, you know, just in case people specify something stupid like bits=position=0x80000000
|
||||
static_assert(position < 8 * sizeof(T), "Invalid position");
|
||||
static_assert(bits <= 8 * sizeof(T), "Invalid number of bits");
|
||||
static_assert(bits > 0, "Invalid number of bits");
|
||||
static_assert(std::is_trivially_copyable_v<T>, "T must be trivially copyable in a BitField");
|
||||
};
|
||||
#pragma pack()
|
|
@ -0,0 +1,248 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include "common/polyfill_thread.h"
|
||||
|
||||
namespace Common {
|
||||
|
||||
namespace detail {
|
||||
constexpr std::size_t DefaultCapacity = 0x1000;
|
||||
} // namespace detail
|
||||
|
||||
template <typename T, std::size_t Capacity = detail::DefaultCapacity>
|
||||
class SPSCQueue {
|
||||
static_assert((Capacity & (Capacity - 1)) == 0, "Capacity must be a power of two.");
|
||||
|
||||
public:
|
||||
template <typename... Args>
|
||||
bool TryEmplace(Args&&... args) {
|
||||
return Emplace<PushMode::Try>(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void EmplaceWait(Args&&... args) {
|
||||
Emplace<PushMode::Wait>(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
bool TryPop(T& t) {
|
||||
return Pop<PopMode::Try>(t);
|
||||
}
|
||||
|
||||
void PopWait(T& t) {
|
||||
Pop<PopMode::Wait>(t);
|
||||
}
|
||||
|
||||
void PopWait(T& t, std::stop_token stop_token) {
|
||||
Pop<PopMode::WaitWithStopToken>(t, stop_token);
|
||||
}
|
||||
|
||||
T PopWait() {
|
||||
T t;
|
||||
Pop<PopMode::Wait>(t);
|
||||
return t;
|
||||
}
|
||||
|
||||
T PopWait(std::stop_token stop_token) {
|
||||
T t;
|
||||
Pop<PopMode::WaitWithStopToken>(t, stop_token);
|
||||
return t;
|
||||
}
|
||||
|
||||
private:
|
||||
enum class PushMode {
|
||||
Try,
|
||||
Wait,
|
||||
Count,
|
||||
};
|
||||
|
||||
enum class PopMode {
|
||||
Try,
|
||||
Wait,
|
||||
WaitWithStopToken,
|
||||
Count,
|
||||
};
|
||||
|
||||
template <PushMode Mode, typename... Args>
|
||||
bool Emplace(Args&&... args) {
|
||||
const std::size_t write_index = m_write_index.load(std::memory_order::relaxed);
|
||||
|
||||
if constexpr (Mode == PushMode::Try) {
|
||||
// Check if we have free slots to write to.
|
||||
if ((write_index - m_read_index.load(std::memory_order::acquire)) == Capacity) {
|
||||
return false;
|
||||
}
|
||||
} else if constexpr (Mode == PushMode::Wait) {
|
||||
// Wait until we have free slots to write to.
|
||||
std::unique_lock lock{producer_cv_mutex};
|
||||
producer_cv.wait(lock, [this, write_index] {
|
||||
return (write_index - m_read_index.load(std::memory_order::acquire)) < Capacity;
|
||||
});
|
||||
} else {
|
||||
static_assert(Mode < PushMode::Count, "Invalid PushMode.");
|
||||
}
|
||||
|
||||
// Determine the position to write to.
|
||||
const std::size_t pos = write_index % Capacity;
|
||||
|
||||
// Emplace into the queue.
|
||||
new (std::addressof(m_data[pos])) T(std::forward<Args>(args)...);
|
||||
|
||||
// Increment the write index.
|
||||
++m_write_index;
|
||||
|
||||
// Notify the consumer that we have pushed into the queue.
|
||||
std::scoped_lock lock{consumer_cv_mutex};
|
||||
consumer_cv.notify_one();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template <PopMode Mode>
|
||||
bool Pop(T& t, [[maybe_unused]] std::stop_token stop_token = {}) {
|
||||
const std::size_t read_index = m_read_index.load(std::memory_order::relaxed);
|
||||
|
||||
if constexpr (Mode == PopMode::Try) {
|
||||
// Check if the queue is empty.
|
||||
if (read_index == m_write_index.load(std::memory_order::acquire)) {
|
||||
return false;
|
||||
}
|
||||
} else if constexpr (Mode == PopMode::Wait) {
|
||||
// Wait until the queue is not empty.
|
||||
std::unique_lock lock{consumer_cv_mutex};
|
||||
consumer_cv.wait(lock, [this, read_index] {
|
||||
return read_index != m_write_index.load(std::memory_order::acquire);
|
||||
});
|
||||
} else if constexpr (Mode == PopMode::WaitWithStopToken) {
|
||||
// Wait until the queue is not empty.
|
||||
std::unique_lock lock{consumer_cv_mutex};
|
||||
Common::CondvarWait(consumer_cv, lock, stop_token, [this, read_index] {
|
||||
return read_index != m_write_index.load(std::memory_order::acquire);
|
||||
});
|
||||
if (stop_token.stop_requested()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
static_assert(Mode < PopMode::Count, "Invalid PopMode.");
|
||||
}
|
||||
|
||||
// Determine the position to read from.
|
||||
const std::size_t pos = read_index % Capacity;
|
||||
|
||||
// Pop the data off the queue, moving it.
|
||||
t = std::move(m_data[pos]);
|
||||
|
||||
// Increment the read index.
|
||||
++m_read_index;
|
||||
|
||||
// Notify the producer that we have popped off the queue.
|
||||
std::scoped_lock lock{producer_cv_mutex};
|
||||
producer_cv.notify_one();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
alignas(128) std::atomic_size_t m_read_index{0};
|
||||
alignas(128) std::atomic_size_t m_write_index{0};
|
||||
|
||||
std::array<T, Capacity> m_data;
|
||||
|
||||
std::condition_variable_any producer_cv;
|
||||
std::mutex producer_cv_mutex;
|
||||
std::condition_variable_any consumer_cv;
|
||||
std::mutex consumer_cv_mutex;
|
||||
};
|
||||
|
||||
template <typename T, std::size_t Capacity = detail::DefaultCapacity>
|
||||
class MPSCQueue {
|
||||
public:
|
||||
template <typename... Args>
|
||||
bool TryEmplace(Args&&... args) {
|
||||
std::scoped_lock lock{write_mutex};
|
||||
return spsc_queue.TryEmplace(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void EmplaceWait(Args&&... args) {
|
||||
std::scoped_lock lock{write_mutex};
|
||||
spsc_queue.EmplaceWait(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
bool TryPop(T& t) {
|
||||
return spsc_queue.TryPop(t);
|
||||
}
|
||||
|
||||
void PopWait(T& t) {
|
||||
spsc_queue.PopWait(t);
|
||||
}
|
||||
|
||||
void PopWait(T& t, std::stop_token stop_token) {
|
||||
spsc_queue.PopWait(t, stop_token);
|
||||
}
|
||||
|
||||
T PopWait() {
|
||||
return spsc_queue.PopWait();
|
||||
}
|
||||
|
||||
T PopWait(std::stop_token stop_token) {
|
||||
return spsc_queue.PopWait(stop_token);
|
||||
}
|
||||
|
||||
private:
|
||||
SPSCQueue<T, Capacity> spsc_queue;
|
||||
std::mutex write_mutex;
|
||||
};
|
||||
|
||||
template <typename T, std::size_t Capacity = detail::DefaultCapacity>
|
||||
class MPMCQueue {
|
||||
public:
|
||||
template <typename... Args>
|
||||
bool TryEmplace(Args&&... args) {
|
||||
std::scoped_lock lock{write_mutex};
|
||||
return spsc_queue.TryEmplace(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void EmplaceWait(Args&&... args) {
|
||||
std::scoped_lock lock{write_mutex};
|
||||
spsc_queue.EmplaceWait(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
bool TryPop(T& t) {
|
||||
std::scoped_lock lock{read_mutex};
|
||||
return spsc_queue.TryPop(t);
|
||||
}
|
||||
|
||||
void PopWait(T& t) {
|
||||
std::scoped_lock lock{read_mutex};
|
||||
spsc_queue.PopWait(t);
|
||||
}
|
||||
|
||||
void PopWait(T& t, std::stop_token stop_token) {
|
||||
std::scoped_lock lock{read_mutex};
|
||||
spsc_queue.PopWait(t, stop_token);
|
||||
}
|
||||
|
||||
T PopWait() {
|
||||
std::scoped_lock lock{read_mutex};
|
||||
return spsc_queue.PopWait();
|
||||
}
|
||||
|
||||
T PopWait(std::stop_token stop_token) {
|
||||
std::scoped_lock lock{read_mutex};
|
||||
return spsc_queue.PopWait(stop_token);
|
||||
}
|
||||
|
||||
private:
|
||||
SPSCQueue<T, Capacity> spsc_queue;
|
||||
std::mutex write_mutex;
|
||||
std::mutex read_mutex;
|
||||
};
|
||||
|
||||
} // namespace Common
|
|
@ -0,0 +1,31 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <concepts>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Common {
|
||||
|
||||
// Check if type satisfies the ContiguousContainer named requirement.
|
||||
template <typename T>
|
||||
concept IsContiguousContainer = std::contiguous_iterator<typename T::iterator>;
|
||||
|
||||
template <typename Derived, typename Base>
|
||||
concept DerivedFrom = std::derived_from<Derived, Base>;
|
||||
|
||||
// TODO: Replace with std::convertible_to when libc++ implements it.
|
||||
template <typename From, typename To>
|
||||
concept ConvertibleTo = std::is_convertible_v<From, To>;
|
||||
|
||||
// No equivalents in the stdlib
|
||||
|
||||
template <typename T>
|
||||
concept IsArithmetic = std::is_arithmetic_v<T>;
|
||||
|
||||
template <typename T>
|
||||
concept IsIntegral = std::is_integral_v<T>;
|
||||
|
||||
} // namespace Common
|
|
@ -0,0 +1,513 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <fmt/core.h>
|
||||
#include <toml.hpp>
|
||||
#include "config.h"
|
||||
|
||||
namespace Config {
|
||||
|
||||
static bool isNeo = false;
|
||||
static bool isFullscreen = false;
|
||||
static u32 screenWidth = 1280;
|
||||
static u32 screenHeight = 720;
|
||||
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
|
||||
static std::string logFilter;
|
||||
static std::string logType = "async";
|
||||
static std::string userName = "shadPS4";
|
||||
static bool useSpecialPad = false;
|
||||
static int specialPadClass = 1;
|
||||
static bool isDebugDump = false;
|
||||
static bool isShowSplash = false;
|
||||
static bool isNullGpu = false;
|
||||
static bool shouldCopyGPUBuffers = false;
|
||||
static bool shouldDumpShaders = false;
|
||||
static bool shouldDumpPM4 = false;
|
||||
static u32 vblankDivider = 1;
|
||||
static bool vkValidation = false;
|
||||
static bool vkValidationSync = false;
|
||||
static bool vkValidationGpu = false;
|
||||
static bool rdocEnable = false;
|
||||
static bool rdocMarkersEnable = false;
|
||||
// Gui
|
||||
std::string settings_install_dir = "";
|
||||
u32 main_window_geometry_x = 400;
|
||||
u32 main_window_geometry_y = 400;
|
||||
u32 main_window_geometry_w = 1280;
|
||||
u32 main_window_geometry_h = 720;
|
||||
u32 mw_themes = 0;
|
||||
u32 m_icon_size = 36;
|
||||
u32 m_icon_size_grid = 69;
|
||||
u32 m_slider_pos = 0;
|
||||
u32 m_slider_pos_grid = 0;
|
||||
u32 m_table_mode = 0;
|
||||
u32 m_window_size_W = 1280;
|
||||
u32 m_window_size_H = 720;
|
||||
std::vector<std::string> m_pkg_viewer;
|
||||
std::vector<std::string> m_elf_viewer;
|
||||
std::vector<std::string> m_recent_files;
|
||||
std::string emulator_language = "en";
|
||||
// Settings
|
||||
u32 m_language = 1; // english
|
||||
|
||||
bool isNeoMode() {
|
||||
return isNeo;
|
||||
}
|
||||
|
||||
bool isFullscreenMode() {
|
||||
return isFullscreen;
|
||||
}
|
||||
|
||||
u32 getScreenWidth() {
|
||||
return screenWidth;
|
||||
}
|
||||
|
||||
u32 getScreenHeight() {
|
||||
return screenHeight;
|
||||
}
|
||||
|
||||
s32 getGpuId() {
|
||||
return gpuId;
|
||||
}
|
||||
|
||||
std::string getLogFilter() {
|
||||
return logFilter;
|
||||
}
|
||||
|
||||
std::string getLogType() {
|
||||
return logType;
|
||||
}
|
||||
|
||||
std::string getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
bool getUseSpecialPad() {
|
||||
return useSpecialPad;
|
||||
}
|
||||
|
||||
int getSpecialPadClass() {
|
||||
return specialPadClass;
|
||||
}
|
||||
|
||||
bool debugDump() {
|
||||
return isDebugDump;
|
||||
}
|
||||
|
||||
bool showSplash() {
|
||||
return isShowSplash;
|
||||
}
|
||||
|
||||
bool nullGpu() {
|
||||
return isNullGpu;
|
||||
}
|
||||
|
||||
bool copyGPUCmdBuffers() {
|
||||
return shouldCopyGPUBuffers;
|
||||
}
|
||||
|
||||
bool dumpShaders() {
|
||||
return shouldDumpShaders;
|
||||
}
|
||||
|
||||
bool dumpPM4() {
|
||||
return shouldDumpPM4;
|
||||
}
|
||||
|
||||
bool isRdocEnabled() {
|
||||
return rdocEnable;
|
||||
}
|
||||
|
||||
bool isMarkersEnabled() {
|
||||
return rdocMarkersEnable;
|
||||
}
|
||||
|
||||
u32 vblankDiv() {
|
||||
return vblankDivider;
|
||||
}
|
||||
|
||||
bool vkValidationEnabled() {
|
||||
return vkValidation;
|
||||
}
|
||||
|
||||
bool vkValidationSyncEnabled() {
|
||||
return vkValidationSync;
|
||||
}
|
||||
|
||||
bool vkValidationGpuEnabled() {
|
||||
return vkValidationGpu;
|
||||
}
|
||||
|
||||
void setGpuId(s32 selectedGpuId) {
|
||||
gpuId = selectedGpuId;
|
||||
}
|
||||
|
||||
void setScreenWidth(u32 width) {
|
||||
screenWidth = width;
|
||||
}
|
||||
|
||||
void setScreenHeight(u32 height) {
|
||||
screenHeight = height;
|
||||
}
|
||||
|
||||
void setDebugDump(bool enable) {
|
||||
isDebugDump = enable;
|
||||
}
|
||||
|
||||
void setShowSplash(bool enable) {
|
||||
isShowSplash = enable;
|
||||
}
|
||||
|
||||
void setNullGpu(bool enable) {
|
||||
isNullGpu = enable;
|
||||
}
|
||||
|
||||
void setCopyGPUCmdBuffers(bool enable) {
|
||||
shouldCopyGPUBuffers = enable;
|
||||
}
|
||||
|
||||
void setDumpShaders(bool enable) {
|
||||
shouldDumpShaders = enable;
|
||||
}
|
||||
|
||||
void setDumpPM4(bool enable) {
|
||||
shouldDumpPM4 = enable;
|
||||
}
|
||||
|
||||
void setVkValidation(bool enable) {
|
||||
vkValidation = enable;
|
||||
}
|
||||
|
||||
void setVkSyncValidation(bool enable) {
|
||||
vkValidationSync = enable;
|
||||
}
|
||||
|
||||
void setRdocEnabled(bool enable) {
|
||||
rdocEnable = enable;
|
||||
}
|
||||
|
||||
void setVblankDiv(u32 value) {
|
||||
vblankDivider = value;
|
||||
}
|
||||
|
||||
void setFullscreenMode(bool enable) {
|
||||
isFullscreen = enable;
|
||||
}
|
||||
|
||||
void setLanguage(u32 language) {
|
||||
m_language = language;
|
||||
}
|
||||
|
||||
void setNeoMode(bool enable) {
|
||||
isNeo = enable;
|
||||
}
|
||||
|
||||
void setLogType(const std::string& type) {
|
||||
logType = type;
|
||||
}
|
||||
|
||||
void setLogFilter(const std::string& type) {
|
||||
logFilter = type;
|
||||
}
|
||||
|
||||
void setUserName(const std::string& type) {
|
||||
userName = type;
|
||||
}
|
||||
|
||||
void setUseSpecialPad(bool use) {
|
||||
useSpecialPad = use;
|
||||
}
|
||||
|
||||
void setSpecialPadClass(int type) {
|
||||
specialPadClass = type;
|
||||
}
|
||||
|
||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) {
|
||||
main_window_geometry_x = x;
|
||||
main_window_geometry_y = y;
|
||||
main_window_geometry_w = w;
|
||||
main_window_geometry_h = h;
|
||||
}
|
||||
void setGameInstallDir(const std::string& dir) {
|
||||
settings_install_dir = dir;
|
||||
}
|
||||
void setMainWindowTheme(u32 theme) {
|
||||
mw_themes = theme;
|
||||
}
|
||||
void setIconSize(u32 size) {
|
||||
m_icon_size = size;
|
||||
}
|
||||
void setIconSizeGrid(u32 size) {
|
||||
m_icon_size_grid = size;
|
||||
}
|
||||
void setSliderPosition(u32 pos) {
|
||||
m_slider_pos = pos;
|
||||
}
|
||||
void setSliderPositionGrid(u32 pos) {
|
||||
m_slider_pos_grid = pos;
|
||||
}
|
||||
void setTableMode(u32 mode) {
|
||||
m_table_mode = mode;
|
||||
}
|
||||
void setMainWindowWidth(u32 width) {
|
||||
m_window_size_W = width;
|
||||
}
|
||||
void setMainWindowHeight(u32 height) {
|
||||
m_window_size_H = height;
|
||||
}
|
||||
void setPkgViewer(const std::vector<std::string>& pkgList) {
|
||||
m_pkg_viewer.resize(pkgList.size());
|
||||
m_pkg_viewer = pkgList;
|
||||
}
|
||||
void setElfViewer(const std::vector<std::string>& elfList) {
|
||||
m_elf_viewer.resize(elfList.size());
|
||||
m_elf_viewer = elfList;
|
||||
}
|
||||
void setRecentFiles(const std::vector<std::string>& recentFiles) {
|
||||
m_recent_files.resize(recentFiles.size());
|
||||
m_recent_files = recentFiles;
|
||||
}
|
||||
|
||||
void setEmulatorLanguage(std::string language) {
|
||||
emulator_language = language;
|
||||
}
|
||||
|
||||
u32 getMainWindowGeometryX() {
|
||||
return main_window_geometry_x;
|
||||
}
|
||||
u32 getMainWindowGeometryY() {
|
||||
return main_window_geometry_y;
|
||||
}
|
||||
u32 getMainWindowGeometryW() {
|
||||
return main_window_geometry_w;
|
||||
}
|
||||
u32 getMainWindowGeometryH() {
|
||||
return main_window_geometry_h;
|
||||
}
|
||||
std::string getGameInstallDir() {
|
||||
return settings_install_dir;
|
||||
}
|
||||
u32 getMainWindowTheme() {
|
||||
return mw_themes;
|
||||
}
|
||||
u32 getIconSize() {
|
||||
return m_icon_size;
|
||||
}
|
||||
u32 getIconSizeGrid() {
|
||||
return m_icon_size_grid;
|
||||
}
|
||||
u32 getSliderPosition() {
|
||||
return m_slider_pos;
|
||||
}
|
||||
u32 getSliderPositionGrid() {
|
||||
return m_slider_pos_grid;
|
||||
}
|
||||
u32 getTableMode() {
|
||||
return m_table_mode;
|
||||
}
|
||||
u32 getMainWindowWidth() {
|
||||
return m_window_size_W;
|
||||
}
|
||||
u32 getMainWindowHeight() {
|
||||
return m_window_size_H;
|
||||
}
|
||||
std::vector<std::string> getPkgViewer() {
|
||||
return m_pkg_viewer;
|
||||
}
|
||||
std::vector<std::string> getElfViewer() {
|
||||
return m_elf_viewer;
|
||||
}
|
||||
std::vector<std::string> getRecentFiles() {
|
||||
return m_recent_files;
|
||||
}
|
||||
|
||||
std::string getEmulatorLanguage() {
|
||||
return emulator_language;
|
||||
}
|
||||
|
||||
u32 GetLanguage() {
|
||||
return m_language;
|
||||
}
|
||||
void load(const std::filesystem::path& path) {
|
||||
// If the configuration file does not exist, create it and return
|
||||
std::error_code error;
|
||||
if (!std::filesystem::exists(path, error)) {
|
||||
save(path);
|
||||
return;
|
||||
}
|
||||
|
||||
toml::value data;
|
||||
|
||||
try {
|
||||
data = toml::parse(path);
|
||||
} catch (std::exception& ex) {
|
||||
fmt::print("Got exception trying to load config file. Exception: {}\n", ex.what());
|
||||
return;
|
||||
}
|
||||
if (data.contains("General")) {
|
||||
const toml::value& general = data.at("General");
|
||||
|
||||
isNeo = toml::find_or<bool>(general, "isPS4Pro", false);
|
||||
isFullscreen = toml::find_or<bool>(general, "Fullscreen", false);
|
||||
logFilter = toml::find_or<std::string>(general, "logFilter", "");
|
||||
logType = toml::find_or<std::string>(general, "logType", "sync");
|
||||
userName = toml::find_or<std::string>(general, "userName", "shadPS4");
|
||||
isShowSplash = toml::find_or<bool>(general, "showSplash", true);
|
||||
}
|
||||
|
||||
if (data.contains("Input")) {
|
||||
const toml::value& input = data.at("Input");
|
||||
|
||||
useSpecialPad = toml::find_or<bool>(input, "useSpecialPad", false);
|
||||
specialPadClass = toml::find_or<int>(input, "specialPadClass", 1);
|
||||
}
|
||||
|
||||
if (data.contains("GPU")) {
|
||||
const toml::value& gpu = data.at("GPU");
|
||||
|
||||
screenWidth = toml::find_or<int>(gpu, "screenWidth", screenWidth);
|
||||
screenHeight = toml::find_or<int>(gpu, "screenHeight", screenHeight);
|
||||
isNullGpu = toml::find_or<bool>(gpu, "nullGpu", false);
|
||||
shouldCopyGPUBuffers = toml::find_or<bool>(gpu, "copyGPUBuffers", false);
|
||||
shouldDumpShaders = toml::find_or<bool>(gpu, "dumpShaders", false);
|
||||
shouldDumpPM4 = toml::find_or<bool>(gpu, "dumpPM4", false);
|
||||
vblankDivider = toml::find_or<int>(gpu, "vblankDivider", 1);
|
||||
}
|
||||
|
||||
if (data.contains("Vulkan")) {
|
||||
const toml::value& vk = data.at("Vulkan");
|
||||
|
||||
gpuId = toml::find_or<int>(vk, "gpuId", -1);
|
||||
vkValidation = toml::find_or<bool>(vk, "validation", false);
|
||||
vkValidationSync = toml::find_or<bool>(vk, "validation_sync", false);
|
||||
vkValidationGpu = toml::find_or<bool>(vk, "validation_gpu", true);
|
||||
rdocEnable = toml::find_or<bool>(vk, "rdocEnable", false);
|
||||
rdocMarkersEnable = toml::find_or<bool>(vk, "rdocMarkersEnable", false);
|
||||
}
|
||||
|
||||
if (data.contains("Debug")) {
|
||||
const toml::value& debug = data.at("Debug");
|
||||
|
||||
isDebugDump = toml::find_or<bool>(debug, "DebugDump", false);
|
||||
}
|
||||
|
||||
if (data.contains("GUI")) {
|
||||
const toml::value& gui = data.at("GUI");
|
||||
|
||||
m_icon_size = toml::find_or<int>(gui, "iconSize", 0);
|
||||
m_icon_size_grid = toml::find_or<int>(gui, "iconSizeGrid", 0);
|
||||
m_slider_pos = toml::find_or<int>(gui, "sliderPos", 0);
|
||||
m_slider_pos_grid = toml::find_or<int>(gui, "sliderPosGrid", 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_H = toml::find_or<int>(gui, "mw_height", 0);
|
||||
settings_install_dir = toml::find_or<std::string>(gui, "installDir", "");
|
||||
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_w = toml::find_or<int>(gui, "geometry_w", 0);
|
||||
main_window_geometry_h = toml::find_or<int>(gui, "geometry_h", 0);
|
||||
m_pkg_viewer = toml::find_or<std::vector<std::string>>(gui, "pkgDirs", {});
|
||||
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_table_mode = toml::find_or<int>(gui, "gameTableMode", 0);
|
||||
emulator_language = toml::find_or<std::string>(gui, "emulatorLanguage", "en");
|
||||
}
|
||||
|
||||
if (data.contains("Settings")) {
|
||||
const toml::value& settings = data.at("Settings");
|
||||
|
||||
m_language = toml::find_or<int>(settings, "consoleLanguage", 1);
|
||||
}
|
||||
}
|
||||
void save(const std::filesystem::path& path) {
|
||||
toml::value data;
|
||||
|
||||
std::error_code error;
|
||||
if (std::filesystem::exists(path, error)) {
|
||||
try {
|
||||
data = toml::parse(path);
|
||||
} 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 accessing {} (error: {})\n", path.string(),
|
||||
error.message().c_str());
|
||||
}
|
||||
fmt::print("Saving new configuration file {}\n", path.string());
|
||||
}
|
||||
|
||||
data["General"]["isPS4Pro"] = isNeo;
|
||||
data["General"]["Fullscreen"] = isFullscreen;
|
||||
data["General"]["logFilter"] = logFilter;
|
||||
data["General"]["logType"] = logType;
|
||||
data["General"]["userName"] = userName;
|
||||
data["General"]["showSplash"] = isShowSplash;
|
||||
data["Input"]["useSpecialPad"] = useSpecialPad;
|
||||
data["Input"]["specialPadClass"] = specialPadClass;
|
||||
data["GPU"]["screenWidth"] = screenWidth;
|
||||
data["GPU"]["screenHeight"] = screenHeight;
|
||||
data["GPU"]["nullGpu"] = isNullGpu;
|
||||
data["GPU"]["copyGPUBuffers"] = shouldCopyGPUBuffers;
|
||||
data["GPU"]["dumpShaders"] = shouldDumpShaders;
|
||||
data["GPU"]["dumpPM4"] = shouldDumpPM4;
|
||||
data["GPU"]["vblankDivider"] = vblankDivider;
|
||||
data["Vulkan"]["gpuId"] = gpuId;
|
||||
data["Vulkan"]["validation"] = vkValidation;
|
||||
data["Vulkan"]["validation_sync"] = vkValidationSync;
|
||||
data["Vulkan"]["validation_gpu"] = vkValidationGpu;
|
||||
data["Vulkan"]["rdocEnable"] = rdocEnable;
|
||||
data["Vulkan"]["rdocMarkersEnable"] = rdocMarkersEnable;
|
||||
data["Debug"]["DebugDump"] = isDebugDump;
|
||||
data["GUI"]["theme"] = mw_themes;
|
||||
data["GUI"]["iconSize"] = m_icon_size;
|
||||
data["GUI"]["sliderPos"] = m_slider_pos;
|
||||
data["GUI"]["iconSizeGrid"] = m_icon_size_grid;
|
||||
data["GUI"]["sliderPosGrid"] = m_slider_pos_grid;
|
||||
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_y"] = main_window_geometry_y;
|
||||
data["GUI"]["geometry_w"] = main_window_geometry_w;
|
||||
data["GUI"]["geometry_h"] = main_window_geometry_h;
|
||||
data["GUI"]["pkgDirs"] = m_pkg_viewer;
|
||||
data["GUI"]["elfDirs"] = m_elf_viewer;
|
||||
data["GUI"]["recentFiles"] = m_recent_files;
|
||||
data["GUI"]["emulatorLanguage"] = emulator_language;
|
||||
|
||||
data["Settings"]["consoleLanguage"] = m_language;
|
||||
|
||||
std::ofstream file(path, std::ios::out);
|
||||
file << data;
|
||||
file.close();
|
||||
}
|
||||
|
||||
void setDefaultValues() {
|
||||
isNeo = false;
|
||||
isFullscreen = false;
|
||||
screenWidth = 1280;
|
||||
screenHeight = 720;
|
||||
logFilter = "";
|
||||
logType = "async";
|
||||
userName = "shadPS4";
|
||||
useSpecialPad = false;
|
||||
specialPadClass = 1;
|
||||
isDebugDump = false;
|
||||
isShowSplash = false;
|
||||
isNullGpu = false;
|
||||
shouldDumpShaders = false;
|
||||
shouldDumpPM4 = false;
|
||||
vblankDivider = 1;
|
||||
vkValidation = false;
|
||||
rdocEnable = false;
|
||||
emulator_language = "en";
|
||||
m_language = 1;
|
||||
gpuId = -1;
|
||||
}
|
||||
|
||||
} // namespace Config
|
|
@ -0,0 +1,104 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
#include "types.h"
|
||||
|
||||
namespace Config {
|
||||
void load(const std::filesystem::path& path);
|
||||
void save(const std::filesystem::path& path);
|
||||
|
||||
bool isNeoMode();
|
||||
bool isFullscreenMode();
|
||||
std::string getLogFilter();
|
||||
std::string getLogType();
|
||||
std::string getUserName();
|
||||
|
||||
bool getUseSpecialPad();
|
||||
int getSpecialPadClass();
|
||||
|
||||
u32 getScreenWidth();
|
||||
u32 getScreenHeight();
|
||||
s32 getGpuId();
|
||||
|
||||
bool debugDump();
|
||||
bool showSplash();
|
||||
bool nullGpu();
|
||||
bool copyGPUCmdBuffers();
|
||||
bool dumpShaders();
|
||||
bool dumpPM4();
|
||||
bool isRdocEnabled();
|
||||
bool isMarkersEnabled();
|
||||
u32 vblankDiv();
|
||||
|
||||
void setDebugDump(bool enable);
|
||||
void setShowSplash(bool enable);
|
||||
void setNullGpu(bool enable);
|
||||
void setCopyGPUCmdBuffers(bool enable);
|
||||
void setDumpShaders(bool enable);
|
||||
void setDumpPM4(bool enable);
|
||||
void setVblankDiv(u32 value);
|
||||
void setGpuId(s32 selectedGpuId);
|
||||
void setScreenWidth(u32 width);
|
||||
void setScreenHeight(u32 height);
|
||||
void setFullscreenMode(bool enable);
|
||||
void setLanguage(u32 language);
|
||||
void setNeoMode(bool enable);
|
||||
void setUserName(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 setVkSyncValidation(bool enable);
|
||||
void setRdocEnabled(bool enable);
|
||||
|
||||
bool vkValidationEnabled();
|
||||
bool vkValidationSyncEnabled();
|
||||
bool vkValidationGpuEnabled();
|
||||
|
||||
// Gui
|
||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h);
|
||||
void setGameInstallDir(const std::string& dir);
|
||||
void setMainWindowTheme(u32 theme);
|
||||
void setIconSize(u32 size);
|
||||
void setIconSizeGrid(u32 size);
|
||||
void setSliderPosition(u32 pos);
|
||||
void setSliderPositionGrid(u32 pos);
|
||||
void setTableMode(u32 mode);
|
||||
void setMainWindowWidth(u32 width);
|
||||
void setMainWindowHeight(u32 height);
|
||||
void setPkgViewer(const std::vector<std::string>& pkgList);
|
||||
void setElfViewer(const std::vector<std::string>& elfList);
|
||||
void setRecentFiles(const std::vector<std::string>& recentFiles);
|
||||
void setEmulatorLanguage(std::string language);
|
||||
|
||||
u32 getMainWindowGeometryX();
|
||||
u32 getMainWindowGeometryY();
|
||||
u32 getMainWindowGeometryW();
|
||||
u32 getMainWindowGeometryH();
|
||||
std::string getGameInstallDir();
|
||||
u32 getMainWindowTheme();
|
||||
u32 getIconSize();
|
||||
u32 getIconSizeGrid();
|
||||
u32 getSliderPosition();
|
||||
u32 getSliderPositionGrid();
|
||||
u32 getTableMode();
|
||||
u32 getMainWindowWidth();
|
||||
u32 getMainWindowHeight();
|
||||
std::vector<std::string> getPkgViewer();
|
||||
std::vector<std::string> getElfViewer();
|
||||
std::vector<std::string> getRecentFiles();
|
||||
std::string getEmulatorLanguage();
|
||||
|
||||
void setDefaultValues();
|
||||
|
||||
// settings
|
||||
u32 GetLanguage();
|
||||
}; // namespace Config
|
|
@ -0,0 +1,59 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define BREAKPOINT __debugbreak
|
||||
#elif defined(__GNUC__)
|
||||
#define BREAKPOINT __builtin_trap
|
||||
#else
|
||||
#error What the fuck is this compiler
|
||||
#endif
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
static inline bool IsProfilerConnected() {
|
||||
return tracy::GetProfiler().IsConnected();
|
||||
}
|
||||
|
||||
#define CUSTOM_LOCK(type, varname) \
|
||||
tracy::LockableCtx varname { \
|
||||
[]() -> const tracy::SourceLocationData* { \
|
||||
static constexpr tracy::SourceLocationData srcloc{nullptr, #type " " #varname, \
|
||||
TracyFile, TracyLine, 0}; \
|
||||
return &srcloc; \
|
||||
}() \
|
||||
}
|
||||
|
||||
#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))
|
||||
|
||||
enum MarkersPalette : int {
|
||||
EmulatorMarkerColor = 0x264653,
|
||||
RendererMarkerColor = 0x2a9d8f,
|
||||
HleMarkerColor = 0xe9c46a,
|
||||
GpuMarkerColor = 0xf4a261,
|
||||
Reserved1 = 0xe76f51,
|
||||
};
|
||||
|
||||
#define EMULATOR_TRACE ZoneScopedC(EmulatorMarkerColor)
|
||||
#define RENDERER_TRACE ZoneScopedC(RendererMarkerColor)
|
||||
#define HLE_TRACE ZoneScopedC(HleMarkerColor)
|
||||
|
||||
#define TRACE_HINT(str) ZoneText(str.c_str(), str.size())
|
||||
|
||||
#define TRACE_WARN(msg) \
|
||||
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::DarkOrange); }(msg);
|
||||
#define TRACE_ERROR(msg) \
|
||||
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::Red); }(msg)
|
||||
#define TRACE_CRIT(msg) \
|
||||
[](const auto& msg) { TracyMessageC(msg.c_str(), msg.size(), tracy::Color::HotPink); }(msg)
|
||||
|
||||
#define GPU_SCOPE_LOCATION(name, color) \
|
||||
tracy::SourceLocationData{name, TracyFunction, TracyFile, (uint32_t)TracyLine, color};
|
||||
|
||||
#define MUTEX_LOCATION(name) \
|
||||
tracy::SourceLocationData{nullptr, name, TracyFile, (uint32_t)TracyLine, 0};
|
||||
|
||||
#define FRAME_END FrameMark
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue