ResHex: Resolution to Hex Calculator

User created game mods, skins, texture packs and camera tools
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

ResHex: Resolution to Hex Calculator

Post by chris686 »

Hey there, folks! Worked on this little application over the weekend. I'll be working on creating a website for all my applications in the future, but for now it's posted here.

This application is very simple. It allows you to convert resolutions to their corresponding hexadecimal values. Essentially, it's a desktop version of this thread: http://www.wsgf.org/forums/viewtopic.php?f=63&t=16237

Here's a quick overview of the app.

Main Screen

From here, it's pretty simple. You can set the desired horizontal and vertical resolution, and select endianness. The default is little endian, as that's what x86 is.

ResHex1.PNG
ResHex1.PNG (8.31 KiB) Viewed 27806 times


Fill in single value

You can fill in a single value to get its hex value immediately. The program updates as you type.

ResHex2.PNG
ResHex2.PNG (10.13 KiB) Viewed 27812 times


Fill in multiple values

When you fill in multiple values, the combined hex value is shown in the Combined Hex window. This is calculated based on the IEEE 754 floating point standard.

ResHex3.PNG
ResHex3.PNG (10.9 KiB) Viewed 27799 times


Fill in resolutions over 9000

If you have a resolution greater than 9000, it's covered.

ResHex4.PNG
ResHex4.PNG (11.49 KiB) Viewed 27836 times


Use Big Endian

And if you have need for big endian, just hit the drop down box.

ResHex5.PNG
ResHex5.PNG (11.51 KiB) Viewed 27808 times


=================================================================================================================

Version 0.61 released

Version 0.61
-Added ability to space out hex values
-Added auto update feature.
-In order to support auto-updating, there will no longer be a zip download option
-Updates are checked for periodically, or can be checked manually via 'Help > Check for Updates'.
-Switched to MSVC++ and InstallShield for distribution. Using MinGW was too restrictive. The MSVC++ redistributable will be downloaded and installed automatically if not already installed.
-Fixed a potential crash when writing the settings file

Known issues
If there are no updates available and 'Help > Check for Updates' is clicked, no prompt is given informing the user there are no updates.

=================================================================================================================

Downloads

Now available on my website, PlexerCode.

=================================================================================================================

Sorry for the delay on the 0.61 version. I had it finished last weekend but had issues creating an installer that would automatically resolve dependencies. This guy is good to go now, though!

I'm also looking into why Chrome is giving warnings when downloading. The file is flagged as "Not commonly downloaded and could be dangerous." I believe I have that fixed, but not sure how long it takes Google to do their thing.



=================================================================================================================
If you find any bugs or have a feature request, post it here! Any feedback is appreciated.



=================================================================================================================
Last edited by chris686 on 20 Dec 2015, 02:02, edited 2 times in total.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

I am currently brainstorming a bigger application which would make patching games without widescreen support easier.

For those on this forum that do such things, if you have any specific ideas let me know. I'd like to build a tool specifically for the task of making widescreen mods easier.
User avatar
scavvenjahh
Editors
Editors
Posts: 3424
Joined: 06 Mar 2008, 17:20

Re: ResHex: Resolution to Hex Calculator

Post by scavvenjahh »

Sounds good... Care for some goofproofing ? I can't run the app on Win7 x64: "The application failed to start because it could not find or load the Qt platform plugin "windows"." (Can confirm, no cutie in sight.) Halp.
User avatar
czarman
Insiders
Insiders
Posts: 685
Joined: 11 Dec 2008, 23:51
Location: Germany

Re: ResHex: Resolution to Hex Calculator

Post by czarman »

I tried it on Win7 x64 and Win10 x64: .......because MSVCP140.dll is missing......
after installing Visual C++ Redistributable for Visual Studio 2015 x86 i got the same message "The application failed to start because it could not find or load the Qt platform plugin "windows".
CZARMAN aka 彼得爸爸
User avatar
jackfuste
Insiders
Insiders
Posts: 521
Joined: 19 Dec 2011, 16:03

Re: ResHex: Resolution to Hex Calculator

Post by jackfuste »

chris686 wrote:I am currently brainstorming a bigger application which would make patching games without widescreen support easier.

For those on this forum that do such things, if you have any specific ideas let me know. I'd like to build a tool specifically for the task of making widescreen mods easier.

GUI Concept:
concept.png
concept.png (22.69 KiB) Viewed 28099 times


INI-file parsing:

Code: Select all

Action = Offset_Patch; Search_and_Replace; Loader

VA = 0x00000000
Type = hex; __int8; __int16; __int32; __int64; float; double
OldValue =
NewValue =
UserInput = on; off
Slider = on; off
Slider_Min =
Slider_Max =
Slider_Step =


INI-file example:
[ResolutionX]
VA = 0x007D4319
Type = __int32
OldValue = 640
NewValue = 1920
UserInput = off

[ResolutionY]
VA = 0x007D431E
Type = __int32
OldValue = 480
NewValue = 1080
UserInput = off

[FOV]
VA = 0x009B81B0
Type = float
OldValue = 90.0
NewValue = 120.0
Slider = on
Slider_Min = 30.0
Slider_Max = 179.0
Slider_Step = 0.1

[Fix_1]
VA = 0x005FCE4D
Type = Hex
OldValue = 74 1C
NewValue = EB 1C

[Fix_2]
VA = 0x005FCE63
Type = Hex
OldValue = E8 F8 90 F6 FF
NewValue = E9 CA 80 25 00
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

Yikes! Sorry for the problems. I ran it on my machine and it was fine. It's the first time I've distributed software this way.

I'll set up a W7 VM and try to re-release today. I'm out from work sick today with what feels like the flu, but I'm fine as long as I keep the fever down.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

Updated!

I apologize for putting out something that didn't work. I used QT so I wouldn't be reliant on MS libraries, but I screwed it up anyway! The file size is slightly increased, but I think it's worth the trade off.

Anyway, the updated files are standalone and don't have any dependencies on MSVC. You should uninstall the old version first if you used the installer. Versions past v0.51 beta shouldn't require this.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

jackfuste wrote:
chris686 wrote:I am currently brainstorming a bigger application which would make patching games without widescreen support easier.

For those on this forum that do such things, if you have any specific ideas let me know. I'd like to build a tool specifically for the task of making widescreen mods easier.

GUI Concept:

INI-file parsing:

Code: Select all

Action = Offset_Patch; Search_and_Replace; Loader
<snip>
[/quote]


Did you make that yourself? Excellent! I'm currently sick, so it's unlikely I'll do any work this weekend. Just updating this today took me forever. I'll examine your concept more closely and may have some questions for you next week.
User avatar
scavvenjahh
Editors
Editors
Posts: 3424
Joined: 06 Mar 2008, 17:20

Re: ResHex: Resolution to Hex Calculator

Post by scavvenjahh »

v0.51 is working great, at least the part I can make sense of. Now I don't have to remember that 3440x1440 is 8EE31840 and 2560x1080 is 26B41740. Cheers !
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

scavvenjahh wrote:v0.51 is working great, at least the part I can make sense of. Now I don't have to remember that 3440x1440 is 8EE31840 and 2560x1080 is 26B41740. Cheers !


Glad to hear! I saw a need for some software like this, and I'm happy to hear you're finding it useful. If something is confusing, I want to know so I can fix it.

I'm guessing it's confusion in relation to the sign, exponent, and mantissa parts. I added them for fun/completeness. I won't bore you with the details, and I doubt the fields will be useful for most people, but it was fun implementing them. I was planning on putting some help bubbles to explain how it all works. It's pretty dry stuff and likely only computer science people like myself would be interested, but I like to spread knowledge when I can. I think it's definitely good to know how the hex values are deduced, so I'll add some info on that when I get the chance.

I'm going to add customizable spacing sometime over the next few days so the hex values are easier to read. I wanted to have that feature implemented sooner, but I've been pretty lethargic recently as I've been getting over this bug. I'm almost back to my normal self, and I have lots of free time over the Thanksgiving weekend so I think it'll be implemented before Monday.

It's a pretty simple program, but if there's a feature you want or feel is missing (Including, perhaps, a basic view without having to look at bits), post it here and I may just have time to implement it over the next few days. :cheers:

By the way... If anyone's a graphics artist and would like to make a dark/grey theme for this and possibly my future applications, I'd much appreciate the help. It takes me a long time to make something look nice, so unless someone volunteers, it's going to be a plain, grey Windows view. I can't pay you obviously (This is free software), but you can have your name featured prominently in the application and on my website.
Last edited by chris686 on 25 Nov 2015, 06:43, edited 2 times in total.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

For completeness:

The horizontal/vertical values are simple the raw hex values of the numbers input in the horizontal/vertical boxes. So if you put 1920 in the vertical box, you'll see the hex value 8007.

Going backwards...

80 07 == 07 80 (Converted to big endian... Normal left to right view that us humans are used to :-))

0-----7----8--0
4096 256 16 1 (Notice these values... They're base 16. (1*16 = 16), (16*16 = 256), (256*16 = 4096), etc.)

(7 * 256) + (8 * 16) = 1792 + 128 = 1920

And that's all there is to it.

The combined hex field is a bit more complicated. Unfortunately, I can't explain it so briefly. There is an industry standard that some genius figured out called IEEE 754. It uses something called two's complement. The important thing you need to know is if you take 1920/1080, you get 1.77777...8. The hex value of 1.7777...8, according to the IEEE 754 standard, is 39 8E E3 3F. That's where the sign, exponent, and mantissa come into play. If I'm being honest, I learned IEEE 754 at some point in college, but I don't remember how it's calculated and I don't particularly care. It's one of those things that I can always look up in a book or online.

To show how irrelevant it actually is to know, I wrote this program, which perfectly represents IEEE 754, without referencing the specification.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

jackfuste wrote:
chris686 wrote:I am currently brainstorming a bigger application which would make patching games without widescreen support easier.

For those on this forum that do such things, if you have any specific ideas let me know. I'd like to build a tool specifically for the task of making widescreen mods easier.

GUI Concept:
concept.png


INI-file parsing:

Code: Select all

Action = Offset_Patch; Search_and_Replace; Loader

VA = 0x00000000
Type = hex; __int8; __int16; __int32; __int64; float; double
OldValue =
NewValue =
UserInput = on; off
Slider = on; off
Slider_Min =
Slider_Max =
Slider_Step =



Just want to say I've started some preliminary work on this. When I say preliminary, I mean I'm reading a book on the Win32 API and haven't written any code. The literature on the low level Windows API is slim, and what is widely considered the "best" book is from 1998.

The work involved is pretty significant and very low-level. It's a big enough project that I'll have to design everything up front to make it manageable, so I'll likely write a mock GUI for feedback in the coming weeks.

As for ResHex, if you have any feature requests for usability, let me know. I meant to start this a couple weeks ago, but I'll be adding customizable spacing tonight so hex values are easier to read. This is just a calculator, so it's likely it'll be merged into the bigger project at some point.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

Version 0.61 is finally out!

Sorry for the delay. I had it finished last weekend but had issues creating an installer that would automatically resolve dependencies. This guy is good to go now, though!

I'm also looking into why Chrome is giving warnings when downloading. The file is flagged as "Not commonly downloaded and could be dangerous." I believe I have that fixed, but not sure how long it takes Google to do their thing.

Also make me wonder if Google is tracking everything I download. Hrm...
User avatar
scavvenjahh
Editors
Editors
Posts: 3424
Joined: 06 Mar 2008, 17:20

Re: ResHex: Resolution to Hex Calculator

Post by scavvenjahh »

FYI I just got the same warning in IE. No warning in FF.
chris686
Posts: 38
Joined: 31 Oct 2015, 21:34

Re: ResHex: Resolution to Hex Calculator

Post by chris686 »

scavvenjahh wrote:FYI I just got the same warning in IE. No warning in FF.


Thanks for the response! I've tested it in all three major browsers now, and I haven't had the problem anymore.

Little while since I've been around, but I've been pretty busy over the past month at work, logging a lot of hours at the end of a project. Using a PC when I get home has been pretty low on my list :-) Things are starting to settle down now, so I'm about ready to throw myself back into my personal projects.
Nezarn
Posts: 4
Joined: 03 Jul 2018, 19:40

Re: ResHex: Resolution to Hex Calculator

Post by Nezarn »

Can someone reupload this somewhere? website is down.
User avatar
susahamat
Posts: 530
Joined: 20 Sep 2015, 00:58

Re: ResHex: Resolution to Hex Calculator

Post by susahamat »

ResHex0.61.part1.rar
(5 MiB) Downloaded 1970 times

ResHex0.61.part2.rar
(2.88 MiB) Downloaded 1831 times
if you supporting what I do, buy me a coffee here https://ko-fi.com/kevinsesario or instead direct to paypal.me/kevinsesario . EMAIL:mailto:?subject=&body=, Steam: https://steamcommunity.com/id/sesariok
Nezarn
Posts: 4
Joined: 03 Jul 2018, 19:40

Re: ResHex: Resolution to Hex Calculator

Post by Nezarn »

Thanks!
FrankDillinger
Posts: 1
Joined: 14 Jun 2019, 03:13

Re: ResHex: Resolution to Hex Calculator

Post by FrankDillinger »

I cant seem to get the program to install. Was wondering if anyone knew the Hex value for 1520X1440
Brandondorf9999
Insiders
Insiders
Posts: 28
Joined: 25 Aug 2014, 22:46

Re: ResHex: Resolution to Hex Calculator

Post by Brandondorf9999 »

FrankDillinger wrote:I cant seem to get the program to install. Was wondering if anyone knew the Hex value for 1520X1440


The hex values are 5F0 (width) and 5A0 (height).
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest