-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cheats revamp (turing completeness, more PC-like) #1923
Comments
If I'm understanding this correctly, all this is doing is switching the aspect ratio automatically to 16:9 when as WS patch is applied instead of having the user do it? It seems unecessary considering it would require an overhaul of the entire database. |
Didn't consider reading the PR code then...
enable_cheats != widescreen patches The only workable way of implementing an automated system is to only automatically apply 16:9 aspect ratio to patches from the cheats_ws.zip archive(not the cheats_ws folder), and add an option to disable this on the GSWindow tab(or a combo box that also allows applying it to all WS patches if desired).
It depends on the game. In PC games it's usually a much more obvious value to edit, it hardly ever involves modifying ASM code, and there's less of a risk of rendering issues. |
That's what I understood too.
I don't think it would, or at least it would depend on the implementation. For instance, everything at at the "built in" As for user patches at the However, there is indeed an issue of how to specify an AR at the ws patch. It's a regular pnach file, so extending its format to include directives to PCSX2 would be a bit weird. So not sure about that. Also, even if we only change it for patches in |
There's no reason to affect the user selected AR at all. |
So you're saying that if a patch was loaded from |
No. I'm saying there's no need to change the aspect ratio that has been selected in the UI. An automatic aspect ratio for WS patches should override(ignore) the UI selection, not change it. It will check if it needs to override(if WS patches enabled and if there a WS patch for this game in the archive) on every (re)boot. |
So if the UI is ignored, how can the user change it? Or do you mean the AR UI can be either explicit or automatic, and if automatic then 16:9 is selected if a ws patch is loaded? If yes, what do we do in automatic mode if we don't load a ws patch? |
An automatic WS patch aspect ratio is only applied once on boot, any subsequent user changes won't get ignored. ;)
No. It will always use the UI selection if no patch is found. |
That's a reasonable behavior IMO, so we can probably say the behavior part is covered. Not sure how its implementation will work though, because I think the AR is used more than just on boot. If so, we'll need to keep track of it somehow, such that when the time comes to use the AR, we'll need to apply either the automatic one if it was booted with a ws patch and the user hasn't changed it since, or the one stored at the config if the user did change it since boot. |
Actually, the WS patch aspect ratio will also be applied when "Enable Widescreen Patches" is enabled while playing(still only applied once so any subsequent user changes won't get ignored). There is no change on disabling it. |
In the file of patches themselves, sure.
And why anybody in their even insane mind would not want to use 16:9 aspect ratio.. With a 16:9 patch?
Mhhhh, I'm not sure you checked the link I had put there.
Uh, I hadn't thought about this. Or to even solve the aforementioned "universal problem", could the patches be written with "variables" and/or some sort of math? Making possible for pcsx2 to read them, replace X with its current height/width/AR/whatever and profit? trivia: I wanted to know what pnach means.. I just found out the loading mechanism was implemented between versions 0.4.1 and 0.5
My aim would be to drop that monstrosity eventually. |
PLEASE START READING THINGS PROPERLY. GET IT IN YOUR HEAD THERE IS NO FULL AUTOMATIC WIDESCREEN DETECTION !!
No, I'm just sure you don't know how to read. |
And there is where I'm looking forward to? Or is there any other way for "frame" to be unrepresentative of "rendering" once you take auto-zoom away? |
So.. @FlatOutPS2 is MIA, could somebody reopen this? |
I'll reopen this. Thinking logically after FlatOut's outburst, I don't think it's inconceivable to have it auto switch to 16:9 if a widescreen patch is detected. |
Forgive me for not doing my homework but after reading Dolphin's progress report, I know they have an anamorphic widescreen heuristic (https://dolphin-emu.org/blog/2017/05/02/dolphin-progress-report-april-2017/). It was @ligfx who was responsible for reworking said heuristic, so maybe we can pick his brain. To me it's straightforward: for now, add an "Auto" AR option. At the moment all it would do is alter AR to 16:9 if cheats are on, WS hacks are on and a WS hack is available for the current game's CRC. |
I'm not sure on when, ever, doing comparisons between two different consoles revealed to be smart.. Anyway, yes, I see and I know current cheat_ws.zip is actually 16:9 only (anybody that can double-confirm this?), thankfully I'd add. Now, where did pnach format even came from for the records? |
Pnach is named after nachbrenner, an old team member who made patches in the beginning, meaning "patch nachbrenner", shortened to Pnach :) |
... Seems like it's not such a difficult format to extend then (should one whatever decide). |
Ok, so.. I talked with experts™ https://github.com/TheOfficialFloW/GTA_Remastered/blob/master/main.c To retain a similar degree of "developer freedom", I guess we'd really need some scripting capability of sort. Yes, I see how this feature request difficulty escalated quickly, but still. |
I wonder if stuff like CRC hacks (latest ssakash gave me the epiphany) couldn't be [one very far day of course] moved to this system? |
^ Or we could put to use the dynacrchack thing @avih suggested.
Ok, you'd ship C source code. Really not bad at all then (almost like C was a script language, lol) And in this case [of this thread] I think we shouldn't have any of those gsdx-CRC hacks concerns. Though, put that aside, C does feel quite overpower - especially for the dumbest "patch=1,EE,00000000,word,00000000" hacks. |
@gocha @DocSkellington @pocokhc |
@mirh I don't understand the context of the topic and the exact meaning of "seamless" , however, in my opinion "yes". Good lua implementation won't make the core pcsx2 source code very messy, I guess. For the time being, I have rebased my lua code to the official master branch. My version has only the very basic part of the Lua engine, though. You can download the Windows binary from the appveyor badge, if you interested. The WS hack code is searching a PS2 code block from memory and installing a hook there? Then doing some memory read/write operation? There are some well-known emulua functions for such (memory.readbyte, writebyte, registerexecute, etc.) and if there are no suitable function, developers can add new interface functions to the lua engine. |
Also, I have noticed that @xTVaser is working on merging all changes for TASing based on the pcsx2/master. rr-dev@xTVaser/pcsx2-rr |
Cool, very very nice. Not sure if at this point I shouldn't mention lua in the thread title, or if other developers might not have other ideas to.. "reliably" expose/tinker with game internals just like one would do with native pc games. |
@mirh I also think "YES". |
While good in theory This still leaves out games that have ingame widescreen options so this implementation won't be fully working. |
[putting aside this has got a tad more bigger than just ws hacks] .. then why would you be making a ws hack, for 16:9 ar at least, if that's unneeded? (also, I don't see how a new cheat system would be trivial) |
I was thinking more of a Low Priority case. |
Closing as trivial. |
It's not trivial in any possible sense of the word |
trying not to clutter #1918
EDIT: this was originally just about Automatic Aspect Ratio, but then, you know, ideas expand
So.. @rz5 kindly pointed me out to this code, where I finally get why frame (window) becomes magically different than "rendered resolution" (video mode).
And after some other discussion on irc, I also get ws hacks are just "pre-squashing" the image, so that when subsequently stretched the final result will look cool.
Which I guess is some nice way to workaround the fixed resolution (assuming tinkering video mode itself isn't viable), and also why we cannot do away with manual AR settings.
So... can't we just like add a "Targeted Aspect Ratio" value to ws hacks?
I mean, I imagine pcsx2 has no way to know what's the meaning of specific patches, so coder should provide it.
Then, if all ws_hacks we ship are supposed to just be 16:9, we could just do as well
if (enable_WS_hacks && enable_cheats && game_has_WS_hack_available) then aspect_ratio = 16/9;
(®rz5)But.. Then this would a little screw up life for some people.
....
In other news, little OT even for this issue, once you pinpoint the UI/aspect "addresses", is writing a ws hack for ps2 all that much different from pc?
Because it starts to feel pretty lame in 2017 to just hardcode 16:9, and screw everybody else.
The text was updated successfully, but these errors were encountered: