Next Generation Emulation banner

PeteOpenGL2Tweak - Tweaker for PeteOpenGL2 plugin w/ GTE Accuracy Hack!

367K views 2K replies 166 participants last post by  Polar-kun 
#1 · (Edited)
WARNING: OBSOLETE
I RECOMMENDING USING DUCKSTATION!


PeteOpenGL2Tweak - Tweaker for PeteOpenGL2 plugin

WARNING: This plugin REQUIRES -ORIGINAL- Pete OpenGL2 v2.9 plugin to work ! You will get "Error 0x7e" if you do not have it !

Sources and new releases will be posted on github: Nucleoprotein/PeteOpenGL2Tweak
If emulator is crashing with TextureCache and high scale setting ie. 5 or 6xBRZ download this patch and apply to -emulator- executable (ie. ePSXe.exe or PCSXR.exe):
4GB Patch – NTCore

xBRZ is compatible only with "Hi-Res Textures" option set to "0 - None"
Also make sure that "Framebuffer Effects" is set to "2 - Standard".


Requirements:
gpuPeteOpenGL2 plug-in v2.9 (425984 bytes, need to be in <emu_dir>\plugins)
- download it here: Pete's PSX GPU plugins
GTE Accuracy hack requires latest PCSX-R or ePSXe 2.0+

Files here: OneDrive

About:

PeteOpenGL2Tweak is a PSEMU Pro compatible plug-in that patches PeteOpenGL2 plugin on runtime.
Current tweaks include:

  • Fixed automatic VRAM detection
  • Possible to force VSYNC
  • Hide mouse cursor
  • Adds GTE Accuracy hack by edgbla (Blade_Arma)
  • Adds xBRZ texture scaler with deposterize filter and texture cache
  • Adds ResHack ie. custom internal resolution, can be much higher than build-in options
GTE Accuracy hack is ported from PCSX-R version of PEOPS OpenGL 1.78.
What do this hack ? It cause less polygon shaking in most games !!!

Comparison:

Tomb Raider 3:
PCSXR w/ GTE Widescreen hack + PeteOpenGL2, non-tweaked:


PCSXR w/ GTE Widescreen hack + PeteOpenGL2Tweak w/ GTE Accuracy hack:


xBRZ filter with deposterize:


Usage:
Copy gpuPeteOpenGL2Tweak.dll to plugins directory, then run emulator and select "PeteOpenGL2 Tweaks" as GPU plugin.

Configuration:
Configuration file is: inis\gpuPeteOpenGL2Tweak.ini, all options can be only turn on or off so there is not much to configure, by default FixMemoryDetection and EnableVsync are off.


You are welcome to like it or hate it :)
Thanks:
Pete Bernert
edgbla
Calb
and whole PCSXR team
 
See less See more
2 1
#765 · (Edited)
I think not, this fixes only subpixel precision which was little off because of PSX GTE Divide inaccuracy (PSX is using quick divide using Newton-Raphson method).
By default - without GTE Acc. Hack, plugin uses float values for vertex coords but with integer precision, GTE Acc. Hack is fixing this by getting some values from GTE and dividing it with higher precision.

EDIT: Fix does not work (breaks GTE Acc Hack), I need to get PhD in Math then maybe I fix this xD
 
#766 · (Edited)
Thanks for implementing xBRZ, wanted to mention that HQ2xS (3xS/4xS) never got implemented, an enhanced version of hqx made by nitsuja in late 2005, it was the closest in quality to xBRZ back then, is moot now.

Nearest / xBRZ Comparison (Harukanaru Toki no Naka de): 4 PICS

Animated PNG / PS1 xBRZ + PS2 Remake: PIC1, PIC2

The game has a very rough font, I didn't include OGL comparisons because they filter textures alone and there is no blending between background/foreground elements and the result is not good (very bad on this game), PPSSPP suffers the same issue on old games.
 
#767 · (Edited)
WIP 2.4 release: http://dev.tapek.shst.pl/ePSXe/wip.zip
For change log please read github commit log: https://github.com/tapcio/PeteOpenGL2Tweak/commits/master

Please test GTEAccuracy UseSmallCache feature, games should look same as with full cache - if not, please report game name & id.

NOTE: small cache is about 2.34MB, full one is 128MB. With new option to aggressive clear vertex cache (to fix broken 2D) it's much faster to clear 2,34MB than 128MB :p
Tested myself on:
Parasite Eve 2 CD1 SLUS-01042 - broken inventory and map - fixed by GTECacheClear
Resident Evil 2 DS CD2 SLUS-00756 - broken SELECT menu top/bottom scrolling tape - fixed by GTECacheClear
Tomb Raider II SLUS-00437 - used for small and normal vertex cache comparison.

EDIT: Idea was not correct, now corrected and uploaded new file. Removed UseSmallCache. But only 2MB of memory is cleared when using GTECacheClear so is quite fast.
 
#768 ·
I can confirm the inventory in Parasite Eve II is fixed on my end.

Is it normal to lose image stability with the GTE Hack ?, Digimon World 1 has jittering on scenery tiles, it doesn't happen without hack, it looks like a quake when the camera zooms in.

Animated PNG: PIC (left of the green monster)

I have a very old screenshot where the UI was all warped (PIC1), just for reference it is supposed to look like this (PIC2), there is a 1-pixel slope along both planes giving the appareance some elements are being tilted, I can't reproduce the bug with the GTE Hack disabled.
 
#770 ·
Yes, ePSXe 2.00 and set to true, same config that fixed PEII. In regards to the warping, it looks fine at first and then is like the coordinate data for the UI corrupts on the fly as soon as there is any scrolling on the screen.

Using a SaveState of the corrupted UI and disabling the GTE Hack and then loading said broken state will correct the UI, so is likely to be this what's creating the issue.

BTW, would it be possible to expose the game current (base) Internal Resolution ?, Frame, OSD, console, or any other place would be fine, I have to use the Soft plugin to figure this out on each game.
 
#771 ·
Please redownload wip.zip and test again, should be better, but I think this cannot be fixed completely. Menus are fixed now.

Printing real game resolution is tricky because it changes on runtime. Games like Silent Hill displays main menu and in game inventory at different resolution than main game. Also starting screens/MDECs are on different resolution in most cases.

NOTE: That WIP prints clears to log.
 
#772 ·
Wanted to mention that the misalignement I mentioned #767 is present on fmvs as well, since forever likely.
Please redownload wip.zip and test again, should be better, but I think this cannot be fixed completely. Menus are fixed now.
Tested PEII and DW1, I don't notice any immediate difference to the previous WIP. I attached a file with a memcard of DW1 (SLUS-01032).
Printing real game resolution is tricky because it changes on runtime. Games like Silent Hill displays main menu and in game inventory at different resolution than main game. Also starting screens/MDECs are on different resolution in most cases.
I was meaning to say that by "current (base) res", it would be helpful to figure scaling with games that don't use 4:3 resolution ratios, or that run at vga-like res, Mr.Driller G runs at 512x480 for the game, and looks properly unstretched in its native resolution ratio.
 

Attachments

#773 ·
Strange DW1 should look better. I do not think this issue can be fixed better.

Yes, I was mean it too. PSX switches resolutions on run-time so cannot guess 'base' resolution because that does not exist until is set. Default PSX hardware resolution is 320x240.
Plugin uses always 1024x512 surface for rendering - because is large enough to hold maximum PSX resolution of 640x480 also approximately rescaled by resolution options in plugin or ResHack. Plugin sets also PSX emulated resolution to 320x240 as default on startup. So if I can print res and this is possible it will be printed on -every- resolution change.
 
#774 ·
Here's another that exhibits the same issue, Ace Combat 2 (PIC), the radar grid actually rotates before stopping at front view while the screen scrolls right, it's a perfect square thus it shouldn't have any aliasing, the steppings come off in random patterns.

Parts of the UI, the depth meter, is also slightly distorted but is almost unnoticeable.

It would be useful to know if it's a issue on my end, I tested on two computers, also with older GTE Hack plugins, both ePSXe and PCSXR, same result always.
 
#775 ·
ePSXe 2.0.0 is crashing when attempting to change discs with any video plugin other than the ones included with ePSXe 2.0.0. This plugin is one of them. I hope this is fixed, but i think it is ePSXe's fault and not the plugin. Has anyone else tested disc changing in ePSXe 2.0.0 with this plugin? The original Petes Opengl 2.9, gpubladesoft 1.45 and this plugin crash the emulator when disc changing ie. load an ff vii disc 3 save while using disc 1.
 
#776 · (Edited)
I am using Epsxe v2.0 and PCSXR_r91446 with GTE HACK and PeteOpenGL2Tweak 2.3, when running Final Fantasy VII I have the same problem, altered models, as you can see in the two images or this video (2:30)
the shape of the guards is changing constantly there is a solution or it is a issue that is yet to be solved?
 

Attachments

#777 ·
I think currently even higher precision cannot be done. PSX uses integer vertex coords so you not have a vertex at position 425.25 x 222.45 only 425x222.
GTE Acc Hack uses divide instead of bit shift to add floating point precision. This is not ideal solution.
I think it possible to -hack- this little better by using integer math and rescale vertex projection matrix instead, so plugin can use raw values without divide, but this require a new OpenGL3+/DX11 GPU plugin

@TechOCD
This is not happening for me, maybe you use some plugin that cause this crash on reopen.
 
#778 · (Edited)
The issues I found with the TWEAK 2.4 wip are minor in my opinion (at least in the games I play), but here they are:

Gran Turismo 2 (Simulation Disc - SCUS-94488). Only the pause menu is a little broken:

Mode of transport Motor vehicle Vehicle Lane Car


On Tomba! 2: The Evil Swine Return (SCUS-94454), the pop up text to read signs or talk to someone has its edges a bit "off", and the menu and pause screen has those black lines, but I think that's related to xBRz:

Nature Green Pc game Tree Games
Games Pc game Grass Technology Screenshot
Text Font Technology Screenshot Audio equipment


Now on Final Fantasy IX (SLUS-01251), although the visual issues are negligible (only the shadows of the balloons are weird), I get huge slowdowns on the battle transitions, so maybe FastFBE isn't working propperlly. On TWEAK 2.3, it would become nearest neighbour during the transition effect, but in battle, some letters on the windows would not "be" xBRz. If GTE was enabled, the ATB bars (green loading bars) would be "wobbly", at least they aren't in 2.4 wip. But the biggest issue, is that the camera is "shaky" during battle, it's not always, it happens during atack animations, but it's annoying sometimes. I don't have ways of capturing video right now, and my upload speed is dreadful XD. But here's some pics with the balloons shadows issue:

Nature Natural environment Wildlife Tree Biome
Blue Mode of transport Water Sky


The configs are the same for all games.

EDIT: Here're some pics with the letters that aren't xBRz after a FBE with Tweak 2.3 (and earlier):
Text Tree Biome Grass Pc game

If I press insert on the keyboard, some textures will become xBRz again, for some reason:
Audio equipment Electronics Technology Electronic device

Now look at the numbers when I press insert:
Audio equipment Electronics Technology Electronic device


GTE Hack is enabled on those pics, but with it disabled that "effect" is worse, affecting more letters. Changing "Framebuffer effects" with the hotkey to 3 and then back to 2 also "fix" some textures that were nearest.
 

Attachments

#779 ·
I've read over the GTE hack code, I don't think the problem is the precision of the vertex positions so much as the way they're stored.

The way the hack works is that the GTE transformation code calculates the position in the default way and as a high precision value. It then uses the default value an index into a lookup table and stores the high precision version. The low precision vertex is then passed back to the emulated program.
At some point later in the execution these vertices are passed to the graphics plugin to be rendered, the plugin uses them to look up into the table and find the high precision value that was stored earlier.

The problems occur because the lookup values are still very low precision and have only 2 dimensions, so when multiple vertices are close together on screen only one high precision value is retrieved for all of them. This causes models or text/background images to become distorted, I've seen quite a few instances of menu text animating with the character behind it.

I've tried removing the lookup table altogether, having the GTE return 16-bit floating point values instead of integers, this gives good precision but in most cases this causes the game to stop working properly. Probably because some of the positions passed into the GTE are not vertices but values read back by the game itself, which expects low precision integer values (maybe bounding volume positions).

 
#780 · (Edited)
Can you redownload wip.zip and re-check battle transitions?

@iCatButler
You change RTPS/RTPT code ? Con you share your code ?

EDIT: I looked in gpuPeopsOpenGL sources - you can't cast vertex coords values to float type, this will blow :p
First of:
Code:
short  ly0, lx0, ly1, lx1, ly2, lx2, ly3, lx3;  // global psx vertex coords
and:
Code:
lx0=(short)(((int)lx0<<SIGNSHIFT)>>SIGNSHIFT);
So as I written before, to more proper hack of such we require new emu and/or GPU plugin.
 
#784 ·
It's fixed, and texture cache seems a little improved, not having as many letters/windows in nearest neighbour after a FBE. Do you plan on adding more stuff to this TWEAK, besides improved GTE hack? If so, could you give us hints? Also, any news from the ePSXe devs on a fix for the 2.0.0 bugs? I found some myself recently, like the controller not working after pressing ESC then going to Run > Continue. And the thing mentioned by @TechOCD , if I boot CD 2 of Chrono Cross, and try to load a save from CD 1 (memory card, not save state), the emulator crashes after I change discs. It didn't happen when I did the reverse though (loading a save from CD 2 on CD 1).
 
#785 ·
^they have a fix for the controller not connecting but a new bug was found out, when using pokopom, that rumble doesn't work if you turn the controller on when the game is already playing until you turn your controller off and back on again. The controller option for this tweak doesn't work for 2.0 anymore because it's already available for 2.0 (still works for other version though and the bug isn't present in other versions).
 
#786 ·
I have noticed that when running ePSXe 2.0 using Ridge Racer Type 4 with GTE accuracy that there is a lot of gaps in the roadway. They appear as shimmering thick clear gaps in the slight distance.
 
#787 ·
That's what I mentioned way back in this thread, GTE+widescreen makes tons of "holes" in the middle of the "street" (happens more often in racing games, or maybe fast paced). While in the 16:9 area, where black bars would usually be, those games actually "generates" more textures, or at least shows more accurately what was previously hidden. Some other games like Gran Turismo 2 (although its racing), actually has the streets practically "clean", while the sides flicker madly, or textures pop in and out constantly. Games that I consider almost perfect with the widescreen hack are Bushido Blade 2, Silent Hill and Tomba! 2 (although there's that problem in some text windows). The Spyro games are pretty good as well, but I don't like the black bars on the NTSC versions, the PAL versions doesn't have black bars, but I don't like the slower FPS XD.
 
#789 ·
This was without widescreen. I wanted to make sure i wasn't seeing this because of the widescreen hack because I figured if anything was going to cause this it would be the widescreen hack.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top