libretro / beetle-psx-libretro

Standalone port/fork of Mednafen PSX to the Libretro API.
GNU General Public License v2.0
311 stars 131 forks source link

[OpenGL] Internal resolution - partial screen #136

Closed alondero closed 7 years ago

alondero commented 7 years ago

When changing the internal resolution settings in the most recent build the portion of the screen that doesn't fall into the bottom left most (assuming) 320x240 is cropped away. This is happening on the Vulkan and OpenGL backends. colin mcrae rally 2 0 usa -161211-111017 My core settings are: beetle_psx_hw_renderer = "opengl" beetle_psx_hw_renderer_software_fb = "enabled" beetle_psx_hw_adaptive_smoothing = "enabled" beetle_psx_hw_internal_resolution = "8x" beetle_psx_hw_filter = "bilinear" beetle_psx_hw_internal_color_depth = "32bpp" beetle_psx_hw_scale_dither = "enabled" beetle_psx_hw_wireframe = "disabled" beetle_psx_hw_display_vram = "disabled" beetle_psx_hw_pgxp_mode = "memory + CPU" beetle_psx_hw_pgxp_caching = "enabled" beetle_psx_hw_pgxp_texture = "enabled" beetle_psx_hw_initial_scanline = "0" beetle_psx_hw_last_scanline = "239" beetle_psx_hw_initial_scanline_pal = "0" beetle_psx_hw_last_scanline_pal = "287" beetle_psx_hw_frame_duping_enable = "enabled" beetle_psx_hw_widescreen_hack = "enabled" beetle_psx_hw_crop_overscan = "enabled" beetle_psx_hw_image_crop = "disabled" beetle_psx_hw_image_offset = "disabled" beetle_psx_hw_display_internal_framerate = "disabled" beetle_psx_hw_analog_calibration = "disabled" beetle_psx_hw_analog_toggle = "disabled" beetle_psx_hw_enable_multitap_port1 = "disabled" beetle_psx_hw_enable_multitap_port2 = "disabled" beetle_psx_hw_cpu_overclock = "enabled" beetle_psx_hw_cdimagecache = "enabled" beetle_psx_hw_skipbios = "enabled" beetle_psx_hw_use_mednafen_memcard0_method = "libretro" beetle_psx_hw_enable_memcard1 = "enabled" beetle_psx_hw_shared_memory_cards = "disabled" beetle_psx_hw_dither_mode = "internal resolution"

rz5 commented 7 years ago

@alondero: I can confirm this bug for the GL renderer. But the vulkan renderer does not have this bug on my end.

If you wanted to try the vk renderer, you most likely forgot to set your video driver to 'vulkan'.

alondero commented 7 years ago

You're right! Looks like I was facing the issue described here https://github.com/libretro/RetroArch/issues/3297, where the config override for video_driver wasn't being honoured. I'll change the title of this ticket.

simias commented 7 years ago

That's odd. I can't reproduce that on my end.

I've pushed a few modifications to the GL renderer since you've opened this bug, can you confirm if it's still happening with the new version?

saftle commented 7 years ago

I'm getting the same issue as well.

@simias @alondero the new commits haven't landed on the windows buildbot build yet, so compiling manually is necessary for now.

rz5 commented 7 years ago

I can confirm that this is still happening on Windows 10 + Nvidia + MSYS2

https://cloud.githubusercontent.com/assets/8117159/21120240/436de390-c0be-11e6-9676-c835a23e7600.png

simias commented 7 years ago

@saftle Uh, any idea why it's failing? Does the buildbot log that somewhere?

@rz5 Looks like this odd bug @twinaphex had and I can't reproduce. Does it happen with every game?

saftle commented 7 years ago

I asked in IRC. I was told the buildbot has been down the last few days. Not sure why exactly.

rz5 commented 7 years ago

@simias I've tested with Crash Bandicoot: Warped, and now I'm only testing with Mega Man X4 at the moment and the results are this: 1x IR - No problem 2x - No problem 4x - About a third of the screen is black 8x - Less than the 4th quadrant is drawn

I just built what's in the repo with HAVE_HW=1 DEBUG=1, if I try to change IR, I get a failed assertion:

buffer.h, Line 195 m != NULL

volo-thomas commented 7 years ago

Just updated the core, and I'm having this problem as well.

This is 2x, I have a Radeon R9 285. Running Windows 10.

retroarch-1213-204107

Also note the Sony Computer Entertainment text is not visible. It quickly blinks visible for a moment and goes away.

JacobAL commented 7 years ago

Just updated my core. I'd prefer to use OGL because vulkan doesn't allow me to unthrottle speed while vsync is on. http://i.imgur.com/Wp9aaeM.png

simias commented 7 years ago

I'm going to try to reproduce this again I guess. Just to be clear: is this issue game specific or does it happen all the time when you increase the internal res?

JacobAL commented 7 years ago

Here's all the games where it's happening for me. 4x res for all of them, all NTSC-U: Alundra - http://i.imgur.com/iiXTe8u.png Chrono trigger - http://i.imgur.com/4GrJrGU.png cutscene problems but the game seems normal Crash Bandicoot - http://i.imgur.com/e0mN5YO.png Crash 2 - http://i.imgur.com/e0mN5YO.png Crash 3 - http://i.imgur.com/0dHfO9d.png Crash Bash - http://i.imgur.com/aKeL9ZK.png Seems to have other issues going on as well, vectors appear to be going crazy Crash Team Racing - http://i.imgur.com/nxZxzag.png Croc - http://i.imgur.com/cIJ1KeX.jpg Digimon World - http://i.imgur.com/cHH7p8r.png King's Field - http://i.imgur.com/bl8WXg1.png vectors going crazy here too Medievil - http://i.imgur.com/udCWDTP.png Medievil 2 - http://i.imgur.com/pxAvzGi.png Ogre Battle - http://i.imgur.com/OOsypKb.png Parappa - http://i.imgur.com/EtbZUEJ.png Rayman - http://i.imgur.com/DFlWhDX.png SaGa - http://i.imgur.com/MGu5lI3.png Silent Bomber - http://i.imgur.com/JaP73ch.png Silent Hill - http://i.imgur.com/wV4DDUq.png http://i.imgur.com/PeujqNF.png Soul Blade - http://i.imgur.com/0J5yWJU.png vector issues here again, also it isn't picking up inputs which is odd Spyro the Dragon - http://i.imgur.com/WFB7Zrs.png Spyro 2 - http://i.imgur.com/wkRYUsf.png Spyro 3 - http://i.imgur.com/K31cTKF.png Strider 2 - http://i.imgur.com/hGSLPip.png Suikoden - http://i.imgur.com/Qz2WURw.png Suikoden 2 - http://i.imgur.com/D8yP2Dw.png Tenchu - http://i.imgur.com/vkLz9Hs.png Tenchu 2 - http://i.imgur.com/76Kb5Sm.png Twisted metal - http://i.imgur.com/FSdSGy6.png Vagrant Story - http://i.imgur.com/zYt2Vby.png Valkyrie Profile - http://i.imgur.com/anXyDe1.png http://i.imgur.com/gF5EKGU.png

Every game I have seems to have problems. Chrono trigger seemed the best as it only had problems in cutscenes.

Also, I appear to be getting a lot of slowdown where there didn't used to be any whatsoever. Normally I'd be able to go at at least double speed, which was helpful for loading screens. Now I can't increase speed at all and at 1x speed I'm getting sub 60fps in most places.

Specs: http://i.imgur.com/jsYgbbS.png

JacobAL commented 7 years ago

Going back to a slightly older version, I notice that I still can't increase speed with OGL. Weird, definitely used to be possible in older builds. Maybe something to do with vsync. That's not really an issue for this thread though.

EDIT: Turns out it was due to rewind being on.

saftle commented 7 years ago

The newest buildbot build for windows x64 has been built, and can confirm the issue still exists. I tested Brave Fencer Musashi with 8x.

senolfeldmann commented 7 years ago

The bug still isnt fixed, Running win10 + amd r9 280x! When will there be a fix?

andres-asm commented 7 years ago

when it's ready

HellishINC commented 7 years ago

This is still an issue for me. Using Arch 4.9.7 + mesa-git. GCN1.0 (280x) does not have Vulkan support at this point in time, so that's not an option.

It should also be noted that I see the screen clipping on 2x on the bios screen but not in game. It also sees artifacts (polygon deformation).

Tenolius commented 7 years ago

I am having issues with both Vulkan and GL ( I am corrrectly setting both the driver and render to match each one.) The issue only occurs when setting the internal resolution to either x4 or x8.

When setting to x4 GL http://imgur.com/9EKmyxi Vulkan http://imgur.com/1iOQkRf

When setting to x8 GL http://imgur.com/ZB95tTO Vulkan http://imgur.com/lSwubwJ

saftle commented 7 years ago

@Tenolius Be sure that your driver is set to Vulkan as well (a retroarch restart is required), when testing Vulkan, since the GL renderer always defaults to your driver version, regardless of what you have set there. It looks like you just switched the GL Renderer from GL to Vulkan, but were still on GL the entire time.

HellishINC commented 7 years ago

Just an update, still an issue with Arch 4.9.11 + mesa 17 stable on FOSS driver.

senolfeldmann commented 7 years ago

this issue still persists in the newest build

razorache commented 7 years ago

Same here. The right 25% of the screen is all black when 2x resolution is enabled with both Vulkan and GL

inactive123 commented 7 years ago

Yes, I've pointed this out many times. Nothing has been done. Absolutely nothing.

Guess I should just take the plunge and start reverting the commit that led to this.

senolfeldmann commented 7 years ago

That would be so awesome. It is such a shame that this bug exists, as the vulkan renderer is not a real alternative yet because it has so many graphical bugs. The opengl renderer is the definitive hw renderer for now. I wish I would have enough programming skills to help fix.

inactive123 commented 7 years ago

Hopefully these issues should be gone now as of this commit -

https://github.com/libretro/beetle-psx-libretro/commit/38215d46630d82d354d5ce72e2163b82a206a275

I simply reverted @simias' last few commits and that seems to also fix the interlacing issues that happened in Dead or Alive.

Sorry that I left this issue stagnant for months, I was meaning to leave it to simias so as to not step on any toes but since nothing ever happened, I guess there is no harm done in taking the lead on this project to begin with.

razorache commented 7 years ago

@twinaphex The newest build gives me a black screen with GL. Even the menu is all black.

Vulkan seems to work

rkapl commented 7 years ago

That did not unfortunately help me. Even with 38215d4 i still see the left half of the screen only, sometimes only quarter (in BIOS etc).

I've tried git bisect and came to commit 2b2070b8 (option rework), which curiously should not have anything to do with the issue. Before this commit the 4x scaling with opengl works (the textures are filtered, so it seems it indeed is using the gl renderer).

inactive123 commented 7 years ago

Hmm @fr500, that seems to be your commit. Can you try guessing what the problem might be?

inactive123 commented 7 years ago

@razorache Weird, it works fine for me here.

razorache commented 7 years ago

@twinaphex I will try updating my drivers. Do you want my specs?

razorache commented 7 years ago

untitled

Ok, this is about to get weird. When my gui and driver are set to a different renderers I get different results.

Gui: Vulkan + Core: Vulkan = Works fine Gui: GL + Core: GL= Half black screen Gui: Vulkan + Core: GL =Half black screen Gui: GL + Core: GL = All black screen

volo-thomas commented 7 years ago

I've updated to the latest nightly and I just get a black screen with opengl now. Vulkan and software work fine.

andres-asm commented 7 years ago

Load a GLSL shader before in any other core.

volo-thomas commented 7 years ago

I tried loading fxaa.glsl in PPSSPP and then starting a game in PSX, still get black screen

rz5 commented 7 years ago

@alondero - this bug shouldn't be happening anymore, could you try it again and close the issue if it's fixed?

axfelix commented 7 years ago

I can no longer duplicate!

alondero commented 7 years ago

@rz5 Yes looks like this is fixed now 👍 Closing.