Shadps4 v0.0.4 progress (continue)

by admin in

We have some interesting pr’s this week .

First we got Rewrite videoout library and bringup new vulkan backend from The Turtle

On master the video/graphics is relatively hard to understand as it’s split into multiple folders and directories without much cohesion on what every does. In addition the texture cache is extremely basic and works based on hashing: it will track changes to memory regions by computing its hash. This is fine for simple demos but when real games are put to the test, hashing large blocks of memory every draw call isn’t going to be fun. The vulkan code was also a bit fragile and broken under wayland, needing a hack to make it synchronize properly.

So this PR does 3 things, it reworks video_out to be more accurate based on my reverse engineering, fully reworks the vulkan backend side of things to have better abstractions that will make the 3d engine implementation easier and fully reworks the texture caching system to be based on fault tracking.

The first part is mostly self explanatory, the implementation has been split into a separate class for easier state management and some additional error codes have been added, but the result isn’t all the different from before. Presentation now occurs in the game thread instead of the window thread, which makes things a bit easier. In the future there should be a separate gpu thread to handle all the extra work but that isn’t needed here.

The new vulkan backend is based on the Citra one and uses vulkan-hpp instead of raw vulkan as it’s a little bit less verbose and solves the previous license problem, as the C headers are licensed under Apache which is incompatible with GPLv2. Vulkan-Hpp on the other hand is licensed with MIT as well which is ok. Like Citra, initialization is handled by the Instance class where all extensions are also loaded, the Scheduler has been ported as well as it will prove useful for parallel shader building in the future and makes validation layer performance a bit less miserable.

The main change here however is the texture cache. When a new image is stored in the cache, the region it owns is marked as protected using an mprotect call. This means that any reads or writes from the guest will go through the texture cache’s exception handler, which will allow it to decide on the appropriate action (either invalidation or flush). When the image is requested again, it is validated with an upload and reprotected. In general that’s a relatively clean way to handle readbacks or related accesses emulating a UMA system entails. In the future this can be tuned to be better suited for the PS4s memory model, but it’s a good base.

Second we got video_core: Add basic command list processing from The Turtle

Implements a few PM4 commands and gnm submit call. This means that guest application will no longer be stuck waiting for a command buffer label. Right now commands don’t do anything, actual functionality will be added in future PRs. Gnmdriver functions that write private packets have been implemented as close to real module disassembly as possible

what all the above means in general? . Shadps4 is getting ready to progress some real graphics from gpu .( currently we have only framebuffer demos working). So what’s the next steps?

Probably the next to follow will be

Shader compiler

Rendering code

Stay tuned for more updates soon!

Shadps4 v.0.0.4 progress

by admin in

We have a very interesting progress on our new W.I.P. version .

Most of retail games comes with bundled libc and libfios2 libraries . Until version 0.0.3 shadps4 was HLEd part of libc library . From now on if game provides a bundled libc and libfios2 libraries we load it natively. That means we can be more accurate on libc emulation (we saved the need of more than 3000 hle functions) which can make us progress faster!

Stay tuned for more progress report soon!

Shadps4 v0.0.3 released

by admin in

A new release for shadps4 , the date is not decided by luck is 21 years after first pcsx2 release , (23 march 2002 ) and by accident mine (shadow) birthday.

The most important features of this release is linux support and running of few OpenOrbis demos (helloword , graphics , pngdec , sound)

A more detailed list above :

-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

shadps4 v0.0.3

Third release of shadps4 . Several OpenOrbis demos working

shadps4 linux support

by admin in

Latest betas of v0.0.3 support linux as well . Stay tuned for more updates too.

Shadps4 v.0.0.3 progress

by admin in

Although i haven’t updated the site for quite a long time that doesn’t mean that we don’t have updates.

Currently we working on TLS and filesystem implementations , and some openOrbis demos have come to life.

More to come soon 😉

Stay Tuned..

Shadps4 v0.0.2 release

by admin in

A new shadps4 release

Complete changelog

-using cstdint header in variable types
-run_main_entry: Rewrite in asm for stack setup
-printf libc implementation for work with sysv_abi
-initial pad emulation (only digital pad atm)
-Implemented sceVideoOutIsFlipPending
-Added auto stubs , now unsupported hle function will resolve as empty stubs
-Rewrote libc_cxa functions
-Libc implementations ( _ZdlPv,_Znwm,rand,_Fsin,qsort,free,strncpy,memmove,atan2f,pow,_Sin)
-ET_SCE_DYNAMIC behaves as valid for execution now.
-Initial FileSystem work (not yet usable).

shadps4 v0.0.2

Second release of shadps4 . Some more homebrew works.

Shadps4 first version v0.0.1

by admin in

Although it is already available from other sources , here is a direct link for the first shadps4 release. Currently only one demo from ps4 sdk works (check the previous post) but be sure the next release will have more working stuff.

shadps4 v0.0.1

First release of shadps4 emulator . Currently only videoout basic demo works