PeterTh / gedosato

The Generic DownSampling Tool
GNU General Public License v3.0
462 stars 166 forks source link

[Feature Request] CreateAdditionalSwapChain support? (FFXIV Discussion) #203

Open Trucido opened 9 years ago

Trucido commented 9 years ago

currently Final Fantasy XIV doesn't work because it throws out an error saying this ins't supported. Would love to see this supported. I'd submit patches if I was a more skilled coder, and i have very little understanding how GeDaSaTo even works.

Boulotaur2024 commented 9 years ago

Last time I tried FFXIV GeDoSaTo didn't work in in windowed mode but it worked fine in fullscreen. Be sure to try that first.

Trucido commented 9 years ago

Thanks for the reply. This error occurs in fullscreen and pretty much refuses to do anything to the game. i never run window mode. perhaps it's dependent on certain graphic settings? I play on maximum. maybe certain graphic settings make extra swap chains or whatever.

Also, Boulotaur2024 I've been meaning to poke you on NeoGAF to get your old CreateAdditionalSwapChain code you made for dolphin (you said you had it laying around somewhere on your hard drive still if anyone needs it), I'm hoping maybe I can hack it into a private build to get it working with FFXIV. won't be pretty and probably break a ton of stuff but if i can get a build working on FFXIV I'll be happy, especially to get SMAA without affecting the HUD would be godly over their awful FXAA

Boulotaur2024 commented 9 years ago

Just tried fullscreen mode in FFXIV with GeDoSaTo and you're right, it crashes.

You could always try this build for pcsx2. It supports CreateAdditionalSwapChain and should also work with FFXIV : http://www.mediafire.com/download/oa8orzrvatuywu9/GeDoSaTo_pcsx2.7z

I can submit the source-code to Durante of course. That said it would be better to find out why FFXIV crashes on fullscreen mode (where it doesn't use CreateAdditionalSwapChain at all) because CreateAdditionalSwapChain support has little to no use except in a handful of games in windowed mode only. But having tried to find out myself I can say I have absolutely no clue why FFXIV crashes. The crash happens right after a regular CreateTexture call (that's the last trace in the GeDoSaTo log file). Doesn't help that I can't debug the game since it uses an external launcher :/

Also this is a game that is constantly evolving apparently since I can swear it was working in fullscreen mode like a month ago. But not anymore apparently either. Oh well

Trucido commented 9 years ago

accidentally deleted my post here.... bah

thanks for that, game crashes only if you have \Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\ffxiv.cfg set to ScreenMode 1 it must be changed to ScreenMode 2 to launch in window mode first, then once in-game change to fullscreen.

with your DLL gedosato actually seems to work instead of just outright refusing and throwing out the createadditionalswapchain error in console at top. SMAA works, downsampling works but mouse clicks don't register even with modifySetCursorPos true and interceptWindowProc true maybe i'm missing something (though not an issue for gamepad users). but my aim here was to just run same-res (1440p) with HUDless SMAA. Dump works though takes a long time.

Edit: modifyGetCursorPos true seems to fix downsampling mouse issues, so it's working! though stilll hunting for a proper PSHash to inject SMAA... I can get HUD to toggle on/off with a few but no luck so far.

as far as debugging goes, there used to be a way to launch the game without the launcher by using the command line string in a .bat file containing your session ID but they patched that so you can't anymore. (obvious security risk there)

Trucido commented 9 years ago

Hmm, upon further investigation the latest unmodified GeDoSaTo doesn't complain about CreateAdditionalSwapChain support if I start FFXIV in window mode then switch to fullscreen. downsampling and SMAA works. your GeDoSaTo.dll is now giving me a black screen. odd. maybe this game doesn't need CreateAdditionalSwapChain support, possibly just a plugin to get it to launch properly in fullscreen from the start and not have to start in window mode every time.

Edit: What I don't understand is why I can't get SMAA (or any post processing) to inject at a HUDless PSHash... I'm using 9e5dc2d9 and I can toggle HUD on/off with GeDoSaTo keybinds but no SMAA/post unless I remove the injectPSHash. tried a bunch of other PSHashes too but it's either all or nothing. I really hate the deferred rendering this engine uses, grrrr....

exodusmax commented 9 years ago

I HAVE GOT IT TO WORK :) THE UI ALSO WORKS!!!!! how about that :) :) here is some screen shots to drool over http://imgur.com/2SqvYy4,CHT789X,QXDysv6,6pRpVmD#0 I took some screen shots so u can see the UI working. If anyone would like to know how to do this let me know http://imgur.com/dPzJQn6,N1PnnVJ,qnfwaxJ

Trucido commented 9 years ago

did you find a PSHash that works? please post details.

exodusmax commented 9 years ago

PChash? lol i do not know what that is. i will be happy to tell you how i got it to work but it is still fussy. it works however. it involves switching from new build and then opening build 1704 on gedosato. create a folder call ffxiv in the config settings. if you know a free website that i can upload the .cfg file u need let me know.

Trucido commented 9 years ago

if you're just doing downsampling all it seems to need is "modifyGetCursorPos true", and last I checked the game had to be started in window mode then changed to fullscreen. I gave up on getting post processing to work without affecting the UI, can't find a PSHash that works. can you paste or upload your config? I'm curious.

Edit: okay somehow I got your config via email notification but don't see it here. I don't think modifySetCursorPos is needed, only modifyGetCursorPos. did "clearRenderResolutions true" and/or "forceRenderRes true" fix starting the game in fullscreen? used to crash for me unless started in window mode then switch to fullscreen, but I never tried those options. also without a proper injectPSHash your post processing will blur and distort the user interface unfortunately. I'd love to get a HUDless SMAA but none of the hashes i tried in the dumps worked for me.

exodusmax commented 9 years ago

how do I upload my .cfg ? I would be happy to let u see it. also I have post pros working. The ui works also I can play at 1440p and still use mouse in ffxiv. I play in full screen. sorry about late post did u make a ffxiv folder? because post pros was not working until I did

ghost commented 9 years ago

I am unsure when it changed, but I just tested it today and no longer get that error. Maybe it was a change in GeDoSaTo, or maybe it was something they changed in 2.5. Either way, I'm going to be trying to find a PSHash soon, because I would absolutely love to see some better AA. Not today or tomorrow, but sometime this week.

Trucido commented 9 years ago

Keep us posted if you find a working PSHash! I gave up. There was a few that were close but no cigar, but most just didn't work at all. There's just too many deferred rendering layers and I don't think GeDoSaTo was even dumping everything properly at the time. Also, speaking of... I noticed they tweaked the FXAA a bit in 2.5

Some hashes I tried: injectPSHash 9e5dc2d9 injectPSHash 13c2e0fb injectPSHash 3b3535e7 injectVSHash 642b73b6

They might have changed the engine some in 2.5 since they're working with NVIDIA for DirectX11, I noticed my MSAA_4X_GAMMA + 4x SGSSAA compatibility flag needed a slight tweak. I got it near perfect with no blur but it requires some really beefy high end cards.

Also, I believe modifyGetCursorPos true is needed for mouse functionality if you're downsampling.

ghost commented 9 years ago

I spent about 6 hours testing out a bunch of different hashes, and I could not get it working. 13c2e0fb seemed to be the best one, since when you used toggleHUD, it would actually disable the HUD. Unfortunately, none of the plugins had any effects. The odd thing is it's called twice. That might be related to the problem. There was also a hash that I tried that appears after drawing the HUD, and it managed to affect the game without affecting most of the HUD, but it also broke all text. I could find it again if you want to take a look at it. The annoying thing is that it's super obvious where they start working on the menu, but any changes before that don't seem to do anything.

Trucido commented 9 years ago

yeah I had exact same thing basically, it was either all or nothing. most didn't work

On Wed, Feb 4, 2015 at 9:21 PM, EmpiresBane notifications@github.com wrote:

I spent about 6 hours testing out a bunch of different hashes, and I could not get it working. 13c2e0fb seemed to be the best one, since when you used toggleHUD, it would actually disable the HUD. Unfortunately, none of the plugins had any effects. The odd thing is it's called twice. That might be related to the problem. There was also a hash that I tried that appears after drawing the HUD, and it managed to affect the game without affecting most of the HUD, but it also broke all text. I could find it again if you want to take a look at it. The annoying thing is that it's super obvious where they start working on the menu, but any changes before that don't seem to do anything.

— Reply to this email directly or view it on GitHub https://github.com/PeterTh/gedosato/issues/203#issuecomment-72982794.

Drakonas commented 9 years ago

It seems a recent update to FFXIV has broken GeDoSaTo support. Just a few days ago, it was loading fine (although I accidentally shut down XIV with the higher resolution on, and started GeDoSaTo afterwards, but it would boot fine after I started the game w/o GeDoSaTo and changed it back). And now it crashes every time GeDoSaTo is loaded (right after clicking the button on the launcher), whether I change it back to native 1080p@144Hz or not. My guess is something changed. Are any of you having issues?

Also, before this GeDoSaTo mess, I don't remember there being a big black window loading before going to fullscreen. That shows up every time now, and this is where the game crashes when GeDoSaTo is loaded. Perhaps my memory is failing me, as I used to run in Borderless Windowed mode before GeDoSaTo interested me.

My logfile

Edit: Also, Steam keeps crashing when I right click on the Steam icon in the taskbar after FFXIV has crashed previously.

I have FFXIV added to Steam as a non-Steam game by the ways.

My GeDoSaTo config file for FFXIV

Trucido commented 9 years ago

@Drakonas the only way I was able to get it working back in ARR was starting up the game in window mode or borderless window, and then changing to fullscreen after the game loads.

Drakonas commented 9 years ago

@Trucido It crashes in window mode for me too, if GeDoSaTo is enabled.

Trucido commented 9 years ago

@Drakonas if you think it might be an issue of starting up in a higher res, you could try editing the .ini file and change the res. it's in Documents\My Games\FFXIV-blahblah\something\

also, curious, are you running DX9 or DX11 mode? last I used GeDoSaTo it had very little DX11 support. (admittedly a long time ago)

Drakonas commented 9 years ago

@Trucido It's already set to my native 1080p resolution. Like I said, I had it running, but I think a recent update broke it... or something else happened.

Drakonas commented 9 years ago

@Trucido Yeah, the FFXIV boot executable (launcher, separate from the game) was updated near the end of June this year. That might be what's causing my problem. I'm seeing if anyone else has the same issues on Reddit.