PCSXR-PGXP

Discussion in 'PCSX Discussion' started by iCatButler, Aug 8, 2016.

  1. fischkopf

    fischkopf Member

    Messages:
    193
    Likes Received:
    13
    I just tested Final Fantasy VIII. It doesn't run at all, I get a black screen. I tried leaving every setting at standard, no tweaks: still back screen.

    The same iso is running in ePSXe, but not in PCSXR.
  2. hoover1979

    hoover1979 New Member

    Messages:
    19
    Likes Received:
    1
    I did that and still access violation.

    I am now using a git build of PCSX-R with PGXP and openngl_tweaks 2.3 and installed that into my epsxe install and it works brilliantly.

    edit: I got njnjad. I am replying to @tapeq
  3. Fredator

    Fredator New Member

    Messages:
    2
    Likes Received:
    0

    First : I know that, I was talking about jjjfloyd's video, not iCatButler's one. I don't use RetroArch for psx emulation (yet)
    Second : Okay, now i figure it out, thanks!!! I have good texture filtering now
  4. tapeq

    tapeq Member

    Messages:
    538
    Likes Received:
    74
    Dunno, you need to do something wrong because it work fine for us.
  5. Reventon2010

    Reventon2010 New Member

    Messages:
    68
    Likes Received:
    7
    I'm sorry for being a pain in the arse about Downsampling, but I've made a discovery!

    So it turns out that the Tweak DOES do Downsampling. It's just missing 1 vital ingredient. "FILTERING". So I've been doing some experiments:
    I used 1.78 Plugin in Windowed mode to render out a 2560x1920 image. That is equal to 8x8 in ResHack.

    Et Voila:
    2560x1920.png
    I've turned all Smoothing and AA filters off.

    Now. I take that image, and resize it to my Monitor (1440x900) using NO filtering. And this is the result:
    1440x900.png
    This is the result I see using ResHack. As you can see, it's just as pixelated. It's like no Downsampling is happening at all.

    Now once more. I Resize the Image. But this time, I use Bilinear filtering. Just like what Dolphin and PCSX2 use. And this is the result:
    1440x900BIL.png
    Now that's more like it! Vast improvement. Hardly any aliasing. Smooth. Just like how PCSX2 does it.

    So if the Plugin had Filtering added to the Downsampling stage, whether it be Bilinear or Lancoz, picture quality would increase ten-fold. Let me know what you think of it all guys.
  6. tapeq

    tapeq Member

    Messages:
    538
    Likes Received:
    74
    Tweak is limited to only changing X/Y multipliers - two DWORD values in original plugin memory, nothing more. Changes to OpenGL state will be very hard.
  7. Reventon2010

    Reventon2010 New Member

    Messages:
    68
    Likes Received:
    7
    I can never understand why Pete decided to keep it Closed Source. Does anyone keep in touch with him who can persuade him after all these years? Or has he completely dropped off the grid?
    zackboy likes this.
  8. iCatButler

    iCatButler New Member

    Messages:
    106
    Likes Received:
    187
    @Reventon2010 I can see where you're coming from, but there are already shaders which implement all of those filtering options during the downsampling stage.

    There are variables exposed to the shader which describe the texel size and so allow programmers to implement bilinear or other forms of filtering explicitly by taking multiple samples. I haven't been able to observe them when using the Tweak though, but I assume Reshack will update these (AMD perfstudio also hooks OpenGL calls and the two don't get along).

    Adding bilinear sampling at a hardware level might be a cheaper alternative but it would probably break all those shaders.

    I agree, it would have been nice of Pete to release his source code, then someone could implement things like multi-pass shaders for post processing. His plugin has remained largely unsurpassed for 8 years because of it, but it also means progress has been slow for those 8 years.

    Libretro's Vulkan and OpenGL renderers might be a better basis for new plugins or an in built renderer for PCSX-R should someone want to improve the situation.
    curryking3 likes this.
  9. zackboy

    zackboy New Member

    Messages:
    28
    Likes Received:
    1
    Is there somebody who know the difference between PCSX-R/ePSXe and Mednafen's CPU overclock?
    I tested Tomb Raider 3 and with Mednafen the framerate looks better without any speed issue.. :O
  10. iCatButler

    iCatButler New Member

    Messages:
    106
    Likes Received:
    187
    PCSX-R and ePSXe actually simulate overclocking the CPU by increasing its clock speed and thus the number of cycles available per frame. This results in some games running faster than they should, it is possible to limit them to the correct framerate using the GPU plugin but there are often still problems with sound.

    The overclock feature added to Mednafen-PSX leaves the clock speed alone and instead removes the cost of specific operations (all GTE instructions are 1 cycle, memory access and cache latency are zero). Much of the rest of the timing is left unchanged.
    Perhaps this speeds up poorly optimised code where the CPU was left waiting on memory or the GTE when it could have been doing other operations. PCSX-R's "Wipeout memhack" does something similar although limited to memory access.
  11. zackboy

    zackboy New Member

    Messages:
    28
    Likes Received:
    1
    Thanks, so in Mednafen it's more a "power hack" than an overclock, and theoretically there is no side effect, right?
    Too many emulators have their specific features.. It's good to stand out from others, but not handy for the users..
  12. fischkopf

    fischkopf Member

    Messages:
    193
    Likes Received:
    13
    Anyone? I can't be the only one that wants to play FF VIII on PCSX-R...

    EDIT: Nevermind, apparently the game needs to be .ppf patched. Which is weird because the same image does run in a different emulator without the patch.
    Last edited: Dec 2, 2016
  13. superjupi

    superjupi New Member

    Messages:
    117
    Likes Received:
    16
    No idea what you're talking about. I have no trouble running any FFVIII image or CD I have, no need for any sort of patch. What exactly did you have to patch, anyway?
  14. fischkopf

    fischkopf Member

    Messages:
    193
    Likes Received:
    13
    Apparently the game relies on some sort of copy protection using subchannel data on the disk, which doesn't get dumped if you create an ISO the normal way. You can bypass this using a ppf patch specific to your version (I have the german version of the game). ePSXe seems to have a patch built in, that bypasses this protection by default.
  15. JOHN30011887

    JOHN30011887 New Member

    Messages:
    16
    Likes Received:
    0
    Did this tweak fix crash bandicoot 3 toad village level that has black triangles in the distance, i know they were there on the ps1 console, or is that issue not fixable?
  16. Reventon2010

    Reventon2010 New Member

    Messages:
    68
    Likes Received:
    7
    It might be fixable in the near future, but atm I still see the triangles. I think it's the way the ps1 tesselates the geometry.
  17. JOHN30011887

    JOHN30011887 New Member

    Messages:
    16
    Likes Received:
    0
    Thanks, iv bookmarked this page, will keep an eye out then :)
  18. Reventon2010

    Reventon2010 New Member

    Messages:
    68
    Likes Received:
    7
    Same as me lol. I check this thread every day for progress :) I think progress has slowed down though, but I think iCatButler is concentrating more on Libretro Mednafen PSX atm.
    JOHN30011887 likes this.
  19. iCatButler

    iCatButler New Member

    Messages:
    106
    Likes Received:
    187
    Unfortunately real life has been taking up much of my time of late :(, so I've not had much to spare for anything PGXP related. Hopefully I'll be able to get back to working on it in the new year.

    I did spend a while looking into this, it's discussed at the start of this thread, but I read more about the game since then. In short I suspect it's hard coded into the game and can't be fixed.

    The long story is it appears to be a factor of some unique techniques that Naughty Dog were using on the Crash games. I wanted to put a video together explaining it but it turned out to be a bit more time intensive than I'd intended. I'll try to get it finished at some point though.

    It's to do with how the PS1 presents data to be rendered to its GPU, it doesn't have a hardware depth buffer to test and reject pixels that are obscured by existing ones. Hence it needs to render the whole scene from back to front, so all primitives must be sorted into this order before sending them to the GPU.

    On many PS1 games, like Tomb Raider, this is done using a structure called the Ordering Table (OT). The depth of each vertex is calculated by the GTE when it's transformed into screen space and for each primitive (or larger object) these are averaged and used to lookup a rough position in the OT. Then all of the primitives within each table entry are sorted. The general algorithm is referred to as bucket sorting.

    The Crash games still use an OT, but they don't calculate positions for scenery within it at runtime. Because the camera moves back and forth along a predetermined path in each level, the developers chose to save processing by precomputing the contents of the OT at various points on the path. At runtime the contents of the OT is altered by streaming in changes based on the direction the camera is moving. Only dynamic and recurring objects are processed normally and spliced into the OT at runtime.

    Naughty Dog generated this data by simulating the PS1's GPU on an SGI work station and having it render as the camera moves along its path, each primitive or object having an ID and if any pixels were visible it would be added to the OT. For Crash 2 and 3 they further improved this by adding a depth buffer to the SGI renderer to better cull primitives that are obscured or would render in the wrong order on PS1.
    Edit: Slight correction, I think the SGI renderer used for the first game was just hardware with a depth buffer and for Crash 2 onward it attempted to simulate the PS1 GPU more closely.
    http://all-things-andy-gavin.com/2011/02/04/making-crash-bandicoot-part-3/
    https://news.ycombinator.com/item?id=9278614

    My best guess is that these gaps were created by slight inconsistencies between this SGI renderer and the PS1 GPU meaning triangles are being culled more aggressively than necessary. If that's true then there's no way to have PGXP fix the issue as the game never tries to render them in the first place (unlike runtime culling using NCLIP).

    Edit: You can see the difference between the Crash games' OTs and other games using the 1.78 plugin's visualisations (pressing F11). Depth values are usually smoothly gradiated from Red (furthest) to Blue (nearest). This is only roughly observed in the Crash games, especially in the Crash 3 HUB area.
    Last edited: Dec 9, 2016
    JOHN30011887 likes this.
  20. Reventon2010

    Reventon2010 New Member

    Messages:
    68
    Likes Received:
    7
    Im a little pissed with Mednafen PSX HW atm. I thought I would try out the PGXP implimentation. Turns out my card isn't compatible.

    The requirements was OpenGL 3.3 which is fine. But acording to this site:
    https://libretro.com/forums/showthread.php?t=6951
    A commit by Simias has bumped that requirement to 4.4. So now all DX10 cards are out of the running.

Share This Page