XXX4Fans
Rose from patreon
Rose

patreon


MX vs. ATV Reflex ultrawide and wider solution

Sometimes it feels like everything is against you and there is just no luck at all. The path to this solution was one of those cases.

About three days ago there was a request and, as usual, I checked whether I owned the game. It turned out that I did, and so I got on it.

After a day of work, I was still struggling with the hardcoded resolutions. The game had 1280x720, the aspect ratio of ~1.78 as a float, and other values like 320x180 in its code, used for various calculations. Its age definitely showed, because modern games tend to do everything in real time or at least not have hardcoded resolutions or multiple approaches to doing one thing, but with this one I had to intercept before runtime and trace from there. To test a fix I would have to restart the game and do it again, many times.
At the end of the day I had some findings, but the render resolution was still lower than the display resolution.

Next day I felt like giving it another try and so began the series of unlucky events.

After I addressed the issue of the render resolution and was about to publish the solution, I decided to look into the issue of the mouse cursor constraint preventing from accessing the lower buttons. The issue was not a big deal, because playing with a controller, those would be inaccessible anyway, and none of the main elements were there. I'm not sure if I had any ideas at the time or just felt like trying, but I persisted and found code that allowed to address that as well.

As I was making screenshots and testing for the public release, I noticed that the cutscenes were vert-, compared to hor+ in my original iteration. And so I was back to reading the code for countless hours with little rest or distraction.

At the end of that second day of about 16 hours invested, I felt devastated because although I had some findings, there was no clear way to implement them. You see, it would be easy to do memory allocation and inject any amount of code, but the solution for this particular game had to involve accessing the game before runtime or very early into it. It meant that a trainer or something like Flawless Widescreen would have to check for the process and then be quick enough to modify it, plus the users would need to be instructed accordingly, which was problematic. I also tried PhantomGamers' SUWSF, which was too late in trying to modify the code, missing the opportunity. The latter also meant that coding my own DLL could have the same consequences, and then I'd have to think of ways to properly suspend the process before it got to execute on top of having had to code.

Around the third day, I kept looking for other ways to modify one of the more specific functions (one for the cursor constraints and another for the cutscenes FOV). I even stumbled upon the code responsible for the game's overall FOV and tried to toy with that. It was frustrating that I had the solution and path to it in my mind but not as a working implementation.
The big issue was that there was not enough space in the code for my override. jackfuste would normally address it by doing a jump to random but unused space, which was fair, but would involve a hardcoded offset, meaning that a game update would most likely break the solution. I had to think long and hard on fitting my code in without breaking any operations. Eventually I had an idea, which involved replacing a seemingly unused operation, but the common patcher generator acted up, confusing an actual byte for its wildcard and breaking the relevant part of the code. After a lot of thinking, I worked around that and had the solution ready.

It was probably my most complicated task in a while, bringing me close to a breakdown once again. I knew it was essentially just for one person and possibly a handful of others, so it was counterproductive to invest so much time and strength in it. On the bright side, as it often happens with complex solutions, I definitely learned a thing or two, and it's also good to struggle a lot every now and then to not get rusty. What will happen to my state of mind if I find another bug or an update breaks this one though? :D

Update: I took screenshots at every aspect ratio and for every scene type supported by WSGF and overhauled the Detailed Report on the game.

MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution MX vs. ATV Reflex ultrawide and wider solution

Comments

Thanks again for your words of support :) Whenever I'm struggling so much with a game, it can feel like the end of the world and it gets me thinking of stopping for good but then a breakthrough and the subsequent release to the public is always a huge relief and I'm back to normal functioning again, as opposed to staring at assembly code for hours upon hours. Limiting myself to some hours per game worked for the most part but some games do show signs of progress and are thus hard to drop. All in all, I don't feel damaged now, so I think we are good to go :D I'm definitely trying to take a super short break from looking into games though, meaning I probably won't be on one today or tomorrow! Maybe I will if something familiar appears though. As for racing, those games do have a great track record (pun intended!), so in light of that it is surprising that this one had no support for anything other than 16:9. I'm glad to have addressed it so many years after its release though, and now after so much invested I feel like I just have to play through it at some point in the near future.

Rose

Uh... Rose... a bit of unsolicited advice: DON'T BURN OUT! :D It's great that you're pushing through personal knowledge and personal comfort barriers, but please don't burn out. You've been doing really great work! Personally I was surprised that you didn't "risk it" and go with a hardcoded solution to an old game (November 2010 according to Steam)! I'm glad that the investment was so worth it in the end. Personally I think that racing games are definitely well suited to ultrawide screens. But then again, I think that ALL kinds of games are well suited to ultrawide screens, so I might be biased! :D Well, with the exception of Pinball games *I guess*. :p Thank you for all the fixes, and keep going! P.S. for the audience: for those like me who don't know what "PhantomGamers' SUWSF" means, it stands for "Somewhat Universal Widescreen Fix". Saved you a Google search! ;)

Eleriam


Related Creators