Giter VIP home page Giter VIP logo

gpcs4's Introduction

logo

GPCS4

A PlayStation 4 emulator which was just started.
A project done for fun, and for technical research.

The only reason I have started this project is for learning 3D graphics.
It's not intended to become a serious application.

Latest progress

Basic Compute

  • Support simple compute shader, compute ring, cube maps.
  • Use Direct Input to emulate pad.

WAD Demo
First commercial game support, We are Doomed. Thanks to our developers.
It's not playable now, since the FPS is very low, because there are currently no optimizations.
GPCS4 will recompile all the shaders, untiling all the textures and upload all the buffers every frame, making it less efficient.
Besides, there are still some problems in the game pad emulation.
We will try to resolve these issues incrementally.

Roadmap

  • Graphics

    • Gnm reverse engineering

      Parsing PM4 command buffers and some other formats to recover the original Gnm calls.
      Still a lot of work.

    • Vulkan backend

      Translate Gnm calls into vulkan calls. Far from complete.

    • Shader recompiler

      Translate GCN bytecode into Spir-V bytecode. Far from complete.

  • Hardware

    • Audio

      Basic implementation.

    • Gamepad

      Basic implementation.

  • System

    • Dynamic linker

      TLS support is not complete yet, and possibly neither are some other initialization functions.

    • System resource management, ie. Thread, virtual memory, synchronize object, file, clock.

      For functions which do not require system resource (e.g: math functions),
      we'll use the system libraries directly.
      For others, we will try to implement them, one by one.

Join

Read our Developer's Guide

For more details you could join our discord server to contact me, or if you are used to Tencent QQ/TIM, just join our group. There you can get more resources which are useful for contributing.

Gitter: GPCS4EMU
Discord: GPCS4 (Currently not maintained)
Tencent QQ/TIM Group Number: 470865218

Build

To run or develop GPCS4, a CPU supporting AVX instruction set as well as a graphics card supporting Vulkan 1.3 are required.
Currently, only Windows build is supported.

For more details, see the Developer's Guide

Credits

DXVK
uplift

License

GPL-3.0

gpcs4's People

Contributors

boredperson avatar dummycatz avatar fox2code avatar inori avatar jvipond avatar mailwl avatar nmzik avatar roboticy3 avatar sgqy avatar shlomif avatar smitdylan2001 avatar totalcaesar659 avatar velocityra avatar web-flow avatar ykisl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gpcs4's Issues

GPL license contradiction

Hi! Nice to see yet another PS4 emulator in the works. Just noticed a problem with license though. You've opted for GPLv3 license but have also mentioned

But commercial usage is NOT permitted.

The GPLv3 specifically prohibits adding further restrictions over and above what the license originally states.

See section 10:

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.

Also section 7 further stipulates 6 conditions that you may add over and above the license, non-commercial usage not being one of them. So in which case this applies:

If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.

So people can simply ignore the condition preventing commercial usage and they will still not be in violation of the license. I'd suggest you avoid using a GPL license if you wish to restrict people from using your program commercially.

Closes on startup with code 4294967295 (0xffffffff)

GPCS4 closes right after startup.

Looking at the debug output of Visual Studio, it loads some DLL files, and after loading C:\Windows\System32\vcruntime140_1.dll, thread 0x5234 ends with code 0.
After loading more DLLs, all other threads end with code 4294967295.
Here's the full output of Visual Studio:

"GPCS4.exe" (Win32): "C:\Users\[CENSORED]\source\repos\GPCS4\x64\Debug\GPCS4.exe" geladen. Symbole wurden geladen.
"GPCS4.exe" (Win32): "C:\Windows\System32\ntdll.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\kernel32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\KernelBase.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\user32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\win32u.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\gdi32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\gdi32full.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\msvcp_win.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\ucrtbase.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\shell32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\ole32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\rpcrt4.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\vulkan-1.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\combase.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\cfgmgr32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\mfplat.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\advapi32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\msvcrt.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\sechost.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\sechost.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\sechost.dll" wurde entladen.
"GPCS4.exe" (Win32): "C:\Windows\System32\SHCore.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\imm32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\dxgi.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\kernel.appcore.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\bcryptprimitives.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\RTWorkQ.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\ResourcePolicyClient.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\ResourcePolicyClient.dll" wurde entladen.
"GPCS4.exe" (Win32): "C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_4d7400884d0d52e3\nvoglv64.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\setupapi.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\bcrypt.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\oleaut32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\version.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\wtsapi32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\cryptbase.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\msasn1.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\cryptnet.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\crypt32.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\drvstore.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\devobj.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\wldp.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\wintrust.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\ntmarta.dll" geladen. 
"GPCS4.exe" (Win32): "C:\VulkanSDK\1.3.204.1\Bin\VkLayer_khronos_validation.dll" geladen. Symbole wurden geladen.
"GPCS4.exe" (Win32): "C:\Windows\System32\vcruntime140.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\msvcp140.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\vcruntime140_1.dll" geladen. 
Der Thread 0x5234 hat mit Code 0 (0x0) geendet.
"GPCS4.exe" (Win32): "C:\Windows\System32\windows.storage.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\shlwapi.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\DXCore.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\nvspcap64.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\profapi.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\uxtheme.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\dwmapi.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\imagehlp.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\cryptsp.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\rsaenh.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\gpapi.dll" geladen. 
"GPCS4.exe" (Win32): "C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_4d7400884d0d52e3\NvCamera\NvCameraAllowlisting64.dll" geladen. 
Der Thread 0x3104 hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0x5704 hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0xd54 hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0x834 hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0x50e4 hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0x2f9c hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0x818 hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0x5700 hat mit Code 4294967295 (0xffffffff) geendet.
Der Thread 0x10e4 hat mit Code 4294967295 (0xffffffff) geendet.
Das Programm "[22048] GPCS4.exe" wurde mit Code 4294967295 (0xffffffff) beendet.

Bugs from PVS-Studio check

Hello,
we checked GPCS4 with static analyzer PVS-Studio and found some bugs. Here is an article about it. May be you will fix some problems.

emulate PS4 filesystem

I suggest do not use path to eboot.bin as cmd line parameters, and use this structure:

GPCS4.exe
app0/
-eboot.bin
-sce_module/
-- libc.prx libSceFios2.prx, and other from game
dev/
-- dce, gc, and other which wants system modules
system/
-- common/
--- lib/
---- *.sprx - from PS4 dump

with this name system, it's easier to just replace app0 folder from game dumps for tests

Github Actions CI?

How about write config for auto compile ?

I think i can try to help
I'm not too many pro in gh actions but i already writed some configs.

P.S. Sorry plz for bad English 😃

[REQUEST] Add number of fps in qt

This could be useful for testing so I think they should have at least 2/3 significant number for example
40 or 45.6
Is it possible to be done?

Problem compiling project from Visual Studio 2022

Just installed VS22 to try and build this project and was scratching my head at the following errors all day:

Error: linking multiple files is not supported yet. Use -c to compile files individually. GPCS4 glslc 1 (x3)
Error: MSB8066 Custom build for 'Graphics\Sce\Shaders\sce_present_frag.frag;Graphics\Sce\Shaders\sce_present_frag_blit.frag;Graphics\Sce\Shaders\sce_present_vert.vert' exited with code 1. GPCS4 C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 245

The second error is from Visual Studio, not the GitHub project. What I assume is happening is the "Custom Build" for these files, which happen to be all the files in the "Shaders" folder on the GitHub project, is trying to link them somehow. It's failing to link them because that feature is not in whatever version of glslc is being used.

I tried:

  • compiling the files manually through the Visual Studio Powershell
  • getting rid of the files and then rebuilding
  • building the project on VS19

Is there a version of Vulkan that supports linking? Has anybody else had this problem?

Compilation issues

  1. I do have some compilation issues, some projects(glfw and rtaudio) has outdated Windows SDK - instead of 10.0 (latest installed version) they could have 10.0.17763.0.
  2. Should it be like this
    <AdditionalDependencies>Zycored.lib;%(AdditionalDependencies)</AdditionalDependencies>
    at line 71 in 3rdParty/zydis/msvc/zydis/Zydis.vcxproj?

Not Zycore.lib?

Unresolved externals?

Hi, i tried to compile this emulator with clang12, visual studio 2019 and at the end stage have errors

Creating library C:\Users\thx4ever\Desktop\GPCS4\x64\Release\GPCS4.lib and object C:\Users\thx4ever\Desktop\GPCS4\x64\Release\GPCS4.exp
2>SceGnmDriver.obj : : error LNK2019: unresolved external symbol "public: __cdecl sce::vlt::VltInstance::VltInstance(void)" (??0VltInstance@vlt@sce@@qeaa@XZ) referenced in function "private: bool __cdecl sce::SceGnmDriver::createVltDevice(void)" (?createVltDevice@SceGnmDriver@sce@@AEAA_NXZ)
2>SceGnmDriver.obj : : error LNK2019: unresolved external symbol "public: class sce::vlt::Rc __cdecl sce::vlt::VltInstance::enumAdapters(unsigned int)const " (?enumAdapters@VltInstance@vlt@sce@@qeba?AV?$Rc@VVltAdapter@vlt@sce@@@23@I@Z) referenced in function "private: bool __cdecl sce::SceGnmDriver::createVltDevice(void)" (?createVltDevice@SceGnmDriver@sce@@AEAA_NXZ)
2>SceGnmDriver.obj : : error LNK2019: unresolved external symbol "public: class sce::vlt::Rc __cdecl sce::vlt::VltAdapter::createDevice(class sce::vlt::Rc const &)" (?createDevice@VltAdapter@vlt@sce@@qeaa?AV?$Rc@VVltDevice@vlt@sce@@@23@AEBV?$Rc@VVltInstance@vlt@sce@@@23@@z) referenced in function "private: bool __cdecl sce::SceGnmDriver::createVltDevice(void)" (?createVltDevice@SceGnmDriver@sce@@AEAA_NXZ)
2>VltDevice.obj : : error LNK2019: unresolved external symbol "public: struct sce::vlt::VltAdapterQueueIndices __cdecl sce::vlt::VltAdapter::findQueueFamilies(void)const " (?findQueueFamilies@VltAdapter@vlt@sce@@qeba?AUVltAdapterQueueIndices@23@XZ) referenced in function "public: __cdecl sce::vlt::VltDevice::VltDevice(class sce::vlt::Rc const &,class sce::vlt::Rc const &,struct VkDevice_T *,struct sce::vlt::VltDeviceExtensions const &,struct sce::vlt::VltDeviceFeatures const &)" (??0VltDevice@vlt@sce@@qeaa@AEBV?$Rc@VVltInstance@vlt@sce@@@12@AEBV?$Rc@VVltAdapter@vlt@sce@@@12@PEAUVkDevice_T@@AEBUVltDeviceExtensions@12@AEBUVltDeviceFeatures@12@@z)
2>VltDevice.obj : : error LNK2019: unresolved external symbol "public: bool __cdecl sce::vlt::VltAdapter::isUnifiedMemoryArchitecture(void)const " (?isUnifiedMemoryArchitecture@VltAdapter@vlt@sce@@QEBA_NXZ) referenced in function "public: bool __cdecl sce::vlt::VltDevice::isUnifiedMemoryArchitecture(void)const " (?isUnifiedMemoryArchitecture@VltDevice@vlt@sce@@QEBA_NXZ)
2>VltMemory.obj : : error LNK2019: unresolved external symbol "public: void __cdecl sce::vlt::VltAdapter::notifyHeapMemoryFree(unsigned int,unsigned __int64)" (?notifyHeapMemoryFree@VltAdapter@vlt@sce@@QEAAXI_K@Z) referenced in function "private: void __cdecl sce::vlt::VltMemoryAllocator::free(class sce::vlt::VltMemory const &)" (?free@VltMemoryAllocator@vlt@sce@@AEAAXAEBVVltMemory@23@@z)
2>VltMemory.obj : : error LNK2019: unresolved external symbol "public: struct VkPhysicalDeviceMemoryProperties __cdecl sce::vlt::VltAdapter::memoryProperties(void)const " (?memoryProperties@VltAdapter@vlt@sce@@qeba?AUVkPhysicalDeviceMemoryProperties@@xz) referenced in function "public: __cdecl sce::vlt::VltMemoryAllocator::VltMemoryAllocator(class sce::vlt::VltDevice const *)" (??0VltMemoryAllocator@vlt@sce@@qeaa@PEBVVltDevice@12@@z)
2>VltMemory.obj : : error LNK2019: unresolved external symbol "public: struct sce::vlt::VltAdapterMemoryInfo __cdecl sce::vlt::VltAdapter::getMemoryHeapInfo(void)const " (?getMemoryHeapInfo@VltAdapter@vlt@sce@@qeba?AUVltAdapterMemoryInfo@23@XZ) referenced in function "public: class sce::vlt::VltMemory __cdecl sce::vlt::VltMemoryAllocator::alloc(struct VkMemoryRequirements const *,struct VkMemoryDedicatedRequirements const &,struct VkMemoryDedicatedAllocateInfo const &,unsigned int,class util::Flags)" (?alloc@VltMemoryAllocator@vlt@sce@@qeaa?AVVltMemory@23@PEBUVkMemoryRequirements@@AEBUVkMemoryDedicatedRequirements@@AEBUVkMemoryDedicatedAllocateInfo@@Iv?$Flags@W4VltMemoryFlag@vlt@sce@@@Util@@@z)
2>VltMemory.obj : : error LNK2019: unresolved external symbol "public: void __cdecl sce::vlt::VltAdapter::notifyHeapMemoryAlloc(unsigned int,unsigned __int64)" (?notifyHeapMemoryAlloc@VltAdapter@vlt@sce@@QEAAXI_K@Z) referenced in function "private: struct sce::vlt::VltDeviceMemory __cdecl sce::vlt::VltMemoryAllocator::tryAllocDeviceMemory(struct sce::vlt::VltMemoryType *,unsigned int,unsigned __int64,class util::Flags,struct VkMemoryDedicatedAllocateInfo const *)" (?tryAllocDeviceMemory@VltMemoryAllocator@vlt@sce@@Aeaa?AUVltDeviceMemory@23@PEAUVltMemoryType@23@I_KV?$Flags@W4VltMemoryFlag@vlt@sce@@@Util@@PEBUVkMemoryDedicatedAllocateInfo@@@z)
2>C:\Users\thx4ever\Desktop\GPCS4\x64\Release\GPCS4.exe : : error LNK1120: 9 unresolved externals
2>Done building project "GPCS4.vcxproj" -- FAILED.
Any idea whats going on?

Regards

Is this project still being developed?

I noticed its been about a year since their last commit and was wondering if it's still in development, or just being handled privately, does anyone know?

Add some-sort of GUI?

I just wanna to have a GUI w/o building the source code.
Probably isn't so simple to implement it.

nothing

I'm making gpcs4 great again go to my profile and click on the making gpcs4 running other games for updates!

Pkg/PFS support

.pkg files are special, they contain an encrypted (but decryptable, see documentation) PFS file-system.

The PFS filesystem should contain eboot.bin at the root of it.

Unofficial documentation:
https://psdevwiki.com/ps4/Package_Files
https://psdevwiki.com/ps4/PFS

For full PSF implementation some additional steps are needed like getting the title id from an xml file. (Not inside PFS)

<titlepatch titleid="CUSAXXXXX"> <- this is header, but CUSA00001 seems to be a good fallback if unable to read xml.

/mnt/sandbox/pfsmnt/CUSAXXXXX-app0/ <- PFS should be "mounted" there.

For raw eboot.bin usage, just linking it to /mnt/sandbox/pfsmnt/CUSA00001-app0/eboot.bin should be good enough.

Note: The issue is only about running basic homebrews that don't encrypt their assets, not about running full games.

"mov rax, fs:0x0" - how to work with it on windows?

I am try to work with "The Last of Us", and stuck at

CODE:0000000000AAEBB0 sub_AAEBB0      proc near               ; CODE XREF: sub_AA1D40+24↑p
CODE:0000000000AAEBB0                                         ; sub_AA1D40+37↑p ...
CODE:0000000000AAEBB0                 push    rax
CODE:0000000000AAEBB1                 mov     rax, fs:0x0
CODE:0000000000AAEBBA                 add     rax, cs:15D27D8h
CODE:0000000000AAEBC1                 mov     rdi, [rax]
CODE:0000000000AAEBC4                 pop     rax
CODE:0000000000AAEBC5                 jmp     sub_AA6BF0
CODE:0000000000AAEBC5 sub_AAEBB0      endp

crash at 0xAAEBB1 - there is any way to fix it?
(i trying not exactly your code, but i think, the problem is common)

Does Not Open

When I Open The Exe It Crashes With A Blue Screen It Luckily Has Not Crashed My Pc Yet

Linux support?

Is it possible to add Linux support since it's just vulkan

Emulator crashes randomly

image
The emulator will crash randomly on somewhere near malloc, about 1 or 2 times over 10 times launch.

Failure to build

1>------ Build started: Project: Zycore, Configuration: Debug x64 ------
2>------ Build started: Project: glfw, Configuration: Debug x64 ------
3>------ Build started: Project: rtaudio, Configuration: Debug x64 ------
4>------ Build started: Project: TinyDBR, Configuration: Debug x64 ------
5>------ Build started: Project: winpthreads, Configuration: Debug x64 ------
6>------ Build started: Project: fmt, Configuration: Debug x64 ------
1>D:\visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
1>Done building project "Zycore.vcxproj" -- FAILED.
7>------ Build started: Project: Zydis, Configuration: Debug x64 ------
7>D:\visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
7>Done building project "Zydis.vcxproj" -- FAILED.
2>D:\visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
2>Done building project "glfw.vcxproj" -- FAILED.
3>D:\visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
3>Done building project "rtaudio.vcxproj" -- FAILED.
4>D:\visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
4>Done building project "TinyDBR.vcxproj" -- FAILED.
5>D:\visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
5>Done building project "winpthreads.vcxproj" -- FAILED.
6>D:\visual studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
6>Done building project "fmt.vcxproj" -- FAILED.
========== Build: 0 succeeded, 7 failed, 0 up-to-date, 0 skipped ==========

Help?

Technical estimation of difficulty to emulate PS4 vs newer consoles

I am not an expert but like many i would have expected the PS4 to be easier to emulate than the PS3 since its hardware is much closer to PC.
As for the CPU you can just use the host x86 cpu through a hypervisor e.g haxm which is what orbital is doing. Or by using e.g. Box64

The remaining complexities would be:
Low level differences vs a regular pc architecture
And notably, a GPU API mismatch (the PS4 expect raw GCN assembly??)
However I think it would be a mistake to not seriously ask yourself whether the PS5 would be actually easier to emulate.
It's still x86 and an updated GCN but it might have less lower level differences vs a regular pc architecture and might have less of a GPU api mismatch.

But my neophyte opinion would be that the Xbox series X/S would be the easiest platform to emulate.
Since it's still a x86, updated GCN BUT If I recall correctly, xbox serie X games are coded in direct X 12, which is much easier to map to vulkan and crucially is natively supported on windows. The OSes would also match.

Unrelated, if the GCN to spirv mapping is a ley difficulty, couldn't you offload GCN assembly directly to the host GPU if the host GPU is an AMD gpu?
The switch emulator Yuzu supports this for Nvidia gpus.

BTW I really think you should do a patreon, even if it's just currently a part time project, it could become big!

Unable to build

Rebuild started...
1>------ Rebuild All started: Project: Zycore, Configuration: Debug x64 ------
2>------ Rebuild All started: Project: TinyDBR, Configuration: Debug x64 ------
3>------ Rebuild All started: Project: rtaudio, Configuration: Debug x64 ------
4>------ Rebuild All started: Project: glfw, Configuration: Debug x64 ------
5>------ Rebuild All started: Project: pthreads4w, Configuration: Debug x64 ------
6>------ Rebuild All started: Project: GPCS4, Configuration: Debug x64 ------
5>The system cannot find the path specified.
6>Compiling GLSL Graphics\Sce\Shaders\sce_present_frag.frag
5>
5>Microsoft (R) Program Maintenance Utility Version 14.31.31107.0
5>Copyright (C) Microsoft Corporation.  All rights reserved.
5>
5>	if exist *.obj del *.obj
5>	if exist *.def del *.def
6>glslc : error : linking multiple files is not supported yet. Use -c to compile files individually.
6>Compiling GLSL Graphics\Sce\Shaders\sce_present_frag_blit.frag
6>glslc : error : linking multiple files is not supported yet. Use -c to compile files individually.
6>Compiling GLSL Graphics\Sce\Shaders\sce_present_vert.vert
6>glslc : error : linking multiple files is not supported yet. Use -c to compile files individually.
6>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(245,5): error MSB8066: Custom build for 'Graphics\Sce\Shaders\sce_present_frag.frag;Graphics\Sce\Shaders\sce_present_frag_blit.frag;Graphics\Sce\Shaders\sce_present_vert.vert' exited with code 1.
6>Done building project "GPCS4.vcxproj" -- FAILED.
5>	if exist *.ilk del *.ilk
5>	if exist *.pdb del *.pdb
5>	if exist *.exp del *.exp
5>	if exist *.map del *.map
5>	if exist *.o del *.o
5>	if exist *.i del *.i
5>	if exist *.res del *.res
5>	if exist *_stamp del *_stamp
5>	cd tests && "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\nmake.exe" clean
5>
5>Microsoft (R) Program Maintenance Utility Version 14.31.31107.0
5>Copyright (C) Microsoft Corporation.  All rights reserved.
5>
5>	if exist *.dll erase *.dll
5>	if exist *.lib erase *.lib
5>	if exist _ptw32.h erase _ptw32.h
5>	if exist pthread.h erase pthread.h
5>	if exist semaphore.h erase semaphore.h
5>	if exist sched.h erase sched.h
5>	if exist *.e erase *.e
5>	if exist *.i erase *.i
5>	if exist *.obj erase *.obj
5>	if exist *.pdb erase *.pdb
5>	if exist *.o erase *.o
5>	if exist *.asm erase *.asm
5>	if exist *.exe erase *.exe
5>	if exist *.manifest erase *.manifest
5>	if exist *.pass erase *.pass
5>	if exist *.bench erase *.bench
5>	if exist *.dll del *.dll
5>	if exist *.lib del *.lib
5>	if exist *.a del *.a
5>	if exist *.manifest del *.manifest
5>	if exist make.log.txt del make.log.txt
5>	cd tests && "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\nmake.exe" realclean
5>
5>Microsoft (R) Program Maintenance Utility Version 14.31.31107.0
5>Copyright (C) Microsoft Corporation.  All rights reserved.
5>
5>	if exist *.dll erase *.dll
5>	if exist *.lib erase *.lib
5>	if exist _ptw32.h erase _ptw32.h
5>	if exist pthread.h erase pthread.h
5>	if exist semaphore.h erase semaphore.h
5>	if exist sched.h erase sched.h
5>	if exist *.e erase *.e
5>	if exist *.i erase *.i
5>	if exist *.obj erase *.obj
5>	if exist *.pdb erase *.pdb
5>	if exist *.o erase *.o
5>	if exist *.asm erase *.asm
5>	if exist *.exe erase *.exe
5>	if exist *.manifest erase *.manifest
5>	if exist *.pass erase *.pass
5>	if exist *.bench erase *.bench
5>	if exist *.log erase *.log
5>	clang-cl /errorReport:none /nologo /MTd /I. /DHAVE_CONFIG_H /W3 /Z7  /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED /D__PTW32_CLEANUP_C /Fopthread.o -c pthread.c
5>In file included from pthread.c:41:
5>In file included from ./pthread.h:74:
5>./_ptw32.h(157,12): fatal error : 'errno.h' file not found
5>#  include <errno.h>
5>           ^~~~~~~~~
5>1 error generated.
5>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin\clang-cl.EXE"' : return code '0x1'
5>Stop.
5>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\nmake.exe"' : return code '0x2'
5>Stop.
5>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(53,5): error MSB3073: The command "build realclean VC-static-debug" exited with code 2.
5>Done building project "pthreads4w.vcxproj" -- FAILED.
3>rtaudio.vcxproj -> D:\Documents\Visual Studio 2022\Projects\GPCS4\3rdParty\rtaudio\rtaudiod.lib
1>Zycore.vcxproj -> D:\Documents\Visual Studio 2022\Projects\GPCS4\3rdParty\zydis\Zycored.lib
7>------ Rebuild All started: Project: Zydis, Configuration: Debug x64 ------
4>glfw.vcxproj -> D:\Documents\Visual Studio 2022\Projects\GPCS4\3rdParty\glfw\glfw3d.lib
7>Zydis.vcxproj -> D:\Documents\Visual Studio 2022\Projects\GPCS4\3rdParty\zydis\Zydisd.lib
2>windows\winunwind.cpp(224,10): warning : unused variable 'prolog_size' [-Wunused-variable]
2>TinyDBR.vcxproj -> D:\Documents\Visual Studio 2022\Projects\GPCS4\3rdParty\tinydbr\TinyDBRd.lib
2>Done building project "TinyDBR.vcxproj".
========== Rebuild All: 5 succeeded, 2 failed, 0 skipped ==========

Shader debug printf doesn't work as expected

As state by the comments:

There may be some bugs for current implementation
(or bugs for validation layer, I'm not sure),
It can not print more than one debug string,
and even worse, the validation layer always complains 
buffer size not enough even I provide 65536 bytes.
And crashes randomly.
I've compared the spir-v code generated by
this function and glslc compiler, and I see
no difference, so I don't know why by now.

God of War 4 crashes

An ideal state would be the game runs in an infinite loop processing input messages, just without graphics output.
This crash possibly due to unimplemented import functions.
Especially sceKernelVirtualQuery, I don't know what it will return on a real PS4 machine.
Maybe a better way is to hook this function on a real PS4 machine and log its' output.

[17628][warning]<FIXME>prepareTables(557):     30 UNKNOWN DTAG: 0x0000000e
[17628][warning]<FIXME>prepareTables(557):     28 UNKNOWN DTAG: 0x0000000e
[17628][warning]<FIXME>prepareTables(557):     40 UNKNOWN DTAG: 0x0000000e
[3352][warning]<FIXME>sceCommonDialogInitialize(16): Not implemented
[3352][warning]<FIXME>sceMsgDialogInitialize(30): Not implemented
[3352][warning]<FIXME>scePthreadMutexInit(150): set name is not supported yet.
[3352][warning]<FIXME>sceKernelReserveVirtualRange(111): SCE Dummy implemented
[3352][warning]<FIXME>sceKernelSetVirtualRangeName(119): Not implemented
[3352][warning]<FIXME>sceKernelVirtualQuery(126): Not implemented
[3352][warning]<FIXME>sceKernelGetDirectMemoryType(42): SCE Dummy implemented
[3352][warning]<FIXME>sceKernelAllocateDirectMemory(9): SCE Dummy implemented
[3352][warning]<FIXME>sceKernelMapNamedDirectMemory(68): SCE Dummy implemented
[3352][warning]<FIXME>sceKernelGetPageTableStats(51): Not implemented
[3352][warning]<FIXME>sceKernelSetPrtAperture(132): Not implemented
[3352][warning]<FIXME>sceKernelMapNamedDirectMemory(68): SCE Dummy implemented

Emulator crashing with TLSManagerWin exception

Tried with we_are_doomed branch (testers already boots that game so I tried too, some commits before - because of logging to text file) - gpcs4 just closing, only thing i have got - white screen for second.
Latest logged thing is:
image
Could it be due old (if it possible at all) TLSManagerWin - I'm using Windows 10 17633.979?
I attached log file but its shrinked for some reason, have to get by DebugView
Hardware - Intel i3-6100, RTX 2060.

GPCS4.zip

basic-sample demo crashes

Currently basic-sample demo will crash on some functions.
If we can run it in an infinite loop without crash, just lacking of graphics output, that would be good for future module development.

Probably a stupid question about how active this is + Discord

Is this still actively being worked on? From what I've seen there hasn't been a pull since April and it says it was last updated in 2019 so I guess I'm curious, Also if there's a Discord where fans or random people can just join and look in to view progress from time to time I'd love to have a link (I don't know if there's a way to flair this a certain way so apologies in advance)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.