Author Topic: [PC+R+Switch] Unofficial bad UV texture patch [powered by DLPB tools]  (Read 131128 times)

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile

Description:
This does just what you can see on image above. Fixes bad PC version UV mapping.

Compatibility: Works with all FF8 versions (2000+Steam) multilanguage + any currently available mods
                                 If you're having problems, please proceed with manual patching tutorial.
Requirements: .NET Framework 4 (for ready patcher) or DLPB's Tools 2.0 for manual patching

ASM hack source: http://pastebin.com/WnRA19mM

*Old patcher deleted due to the fact it corrupted the EXEs and overwrote backup. I'm so sorry for destroying your backups. Please, use manual patching for Steam or above for 2000 version.

STEAM 2013 Version:
MANUAL PATCHING TUTORIAL: (STEAM)
(Big thanks to Cities.Burn.Quick for writing this tutorial) :)
(Use this if above fails. This applies for English version only, however you can find FF8 2000 HEXT instructions at the bottom of this post)

 1. Backup the FF8_EN.exe file from your Final Fantasy VIII Steam directory (steamapps/common/FINAL FANTASY VIII/) just in case.

2. Download DLPB's Tools 2.0.

3. Unzip the file anywhere on your PC.

4. Open the "HextEdit" folder and move your FF8_EN.exe file from your Steam directory to the HexEdit root folder. The root folder contains another folder named HE_in, the HexEdit.exe, a Readme.rtf, and a test.file (which you should delete).

5. Open the HE_in folder and delete the example Hext instructions.

6. Create a new Notepad text document in the HE_in folder, name it "FF8_EN" or "FF8" and paste:

Code: [Select]
FF8_EN.exe
153CC0 = 00
153CCA = 00
153CD8 = 00
153CE2 = 00
153CF2 = 00
153CFC = 00
153D0C = 00
153D16 = 00
153D26 = 00
153D30 = 00
153D38 = 00
153D42 = 00


7. Save your FF8_EN.txt.

8. Go back to the HextEdit root and run the HextEdit.exe application, press enter when prompted.

9. Once HextEdit finishes it will create a HextEdit.txt. Open this file and insure it reads...
Code: [Select]
---------------------------
FF8_EN.txt (FF8_EN.exe)

Changed: 12
Replaced: 0

No errors.

___________________________


10. If newly created HextEdit.txt has the same output, it was patched successfully.

11. Move your FF8_EN.exe from the HextEdit root back to your Steam directory. Overwrite if need be.

12. Run game and enjoy your newly patched FF8 world map!


PC 2000 release version:
Download and run with launcher:
Downloadhttps://www.dropbox.com/s/zaq4gqquaop00kn/FF8_UVPatchLauncher.7z?dl=0

-=Alternative files (HEXT instructions for DLPB's tools)=-
FF8 2000 English: https://www.dropbox.com/s/zaq4gqquaop00kn/FF8_UVPatchLauncher.7z?dl=0
FF8 Steam English: http://pastebin.com/W72H6yep

Remastered:
UV patch is now built-in in demaster patch! No need to work with the code manually. Find more details here: http://forums.qhimm.com/index.php?topic=19432.0
If you are experienced user you can try manually patching the DLL:
Dotemu by compiling their new DLL they got the ASLR working by default- that renders above method with DLPB not working- the address in memory is changing every time you open the application. You can either disable ASLR with my script: https://github.com/MaKiPL/ASLR_disabler and then patch as in Steam 2013 with IMAGE_BASE of the dll or patch the DLL directly:
Code: [Select]
FFVIII_EFIGS.dll+8A2CB2 - add byte ptr [esi+08],00
FFVIII_EFIGS.dll+8A2CB8 - add byte ptr [esi+08],00
FFVIII_EFIGS.dll+8A2D17 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2D1D - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2D6D - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2D73 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2DC5 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2DCB - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2E1B - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2E21 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2E6F - add byte ptr [esi+04],00
FFVIII_EFIGS.dll+8A2E75 - add byte ptr [esi+04],00
above are dynamic addresses to memory- so if you have a patcher that is capable of understanding above instructions (example is Cheat Engine) then you can jump right into the memory view and assemble as above. However if you want to update the EXE manually, then here are the codes (basically FFVIII_EFIGS.dll in above example is ~0x10000000):
Example in EXE at address 0x8A20B5 there should be 02, change that to 00
Code: [Select]
0x8A20B5 - 00
0x8A20BB - 00
0x8A211A - 00
0x8A2120 - 00
0x8A2170 - 00
0x8A2176 - 00
0x8A21C8 - 00
0x8A21CE - 00
0x8A221E - 00
0x8A2224 - 00
0x8A2272 - 00
0x8A2278 - 00

Nintendo Switch
Unfortunately you have to own jailbreaked(?) switch. You have to get the file GuardianEFIGS.nro and edit with your favourite HEX editor those addresses:
Example:: 0xE04E38 which is now E2 1B 1F 32 should be 1F 20 03 D5
Below are all the addresses which you should update:
Code: [Select]
0xE04E38 = 1F2003D5
0xE04E58 = 1F2003D5

0xE04E98 = 1F2003D5
0xE04EB8 = 1F2003D5

0xE04EFC = 1F2003D5
0xE04F1C = 1F2003D5

0xE04F5C = 1F2003D5
0xE04F7C = 1F2003D5

0xE04FC0 = 1F2003D5
0xE04FE0 = 1F2003D5

0xE05008 = 1F2003D5
0xE05028 = 1F2003D5
« Last Edit: 2020-05-13 12:10:08 by Maki »

Zervox

  • *
  • Posts: 55
    • View Profile
Re: [FF8 Patch] Unofficial bad UV texture patch
« Reply #1 on: 2015-08-27 20:30:14 »
Simply amazing. :)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #2 on: 2015-08-27 21:30:13 »
You can also use HextLaunch to add these fixes at game start to memory, I take it?  That would be cooler for me.  Do you have a list of all mem changes and values?

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #3 on: 2015-08-27 22:10:32 »
These are changes for steam english (FF8_en.exe):
http://pastebin.com/WnRA19mM
For all other versions (2000 PC and all languages handling I'm doing byte search and some routine to edit bytes whatever version it is)

And here's the main source code:
https://github.com/MaKiPL/FF8-Bad-Texture-PATCHER/blob/master/FF8_TexturePatcher/Form1.cs

I'm going to get some sleep now. I'll prepare the instructions for launcher soon.
« Last Edit: 2015-08-27 22:19:16 by MaKiPL »

Aavock

  • *
  • Posts: 303
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #4 on: 2015-08-28 01:48:53 »
HUGE improvement, amazing job thank you MaKiPL! :o

The linking between some specific identical textures produce some artifacts like the road to Balamb, is it normal?



DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #5 on: 2015-08-28 02:39:29 »
Excellent. Nice to see this has been fixed.

There does seem to still be a small amount of mismatching left, though.  Is this unavoidable and part of the original game?
« Last Edit: 2015-08-28 02:41:16 by DLPB »

EQ2Alyza

  • 7th Heaven Crew
  • Global moderator
  • *
  • Posts: 3200
  • Dilly-Dally Shilly-Shally
    • View Profile
    • EQ2Alyza - YouTube Channel
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #6 on: 2015-08-28 05:22:03 »
Good job :)

FF7 should benefit from this kind of work. There are some horrible battle scenes that need it.

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #7 on: 2015-08-28 08:20:25 »
The black lines (They're invisible in fact, as there's no texture there) in some places is the bug Square tried to fix by doing this crappy texture mess up routine.
I added HextLaunch support for PC 2000 english version.

Yagami Light

  • *
  • Posts: 173
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #8 on: 2015-08-28 09:54:54 »
Thank you Maki, this is amazing, never thought UVs would ever be fixed to be honest.


@5way turn off linear filtering to fix the black markings on the footpath

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #9 on: 2015-08-28 18:16:39 »
WTF!?!?  You're amazing, MaKiPL :)
Now I can finally upscale the rest of the world! :)

iliasm

  • *
  • Posts: 6
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #10 on: 2015-08-28 21:54:21 »
Thanks, this is awesome.

By the way, disabling Linear Filtering does indeed fix black lines but then some other textures look worse, for example this railroad here:

linear on:


linear off:


Is this expected?

Excellent work overall!

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #11 on: 2015-08-28 23:57:51 »
I think the railroad suits pixellation rather than smooth. Kinda gives it the appearance of (admittedly crap) detail :P

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #12 on: 2015-08-29 01:11:45 »
Thanks, this is awesome.

By the way, disabling Linear Filtering does indeed fix black lines but then some other textures look worse, for example this railroad here:

Is this expected?

Excellent work overall!

The pixellation is just part of the original game.  Linear filter merely 'blurs' the pixel edges enough so that it's hard to notice, but it's always been like that.  My world map upscale fixes this problem by removing the need to use Linear Filtering at all.  That combined with my other texture mods, and I can't think of a reason to have linear filter enabled ever again.

JeMaCheHi

  • *
  • Posts: 194
  • You can just call me J!
    • View Profile
    • My YouTube Channel :D
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #13 on: 2015-08-29 21:20:23 »
As I always say.... you're a god of hacking bro. Thank you very much for this. However, and I hate to say it, this is not working for Spanish version (as usual, our version is messing up stuff). If you patch it, the game will crash with an unhandled exception as soon as you go to worldmap. BTW, the spanish exe is FF8_ES.exe, I just say it in case it's useful info for future reference.

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Re: [FF8PC 2000/Steam] Unofficial bad UV texture patch
« Reply #14 on: 2015-08-30 02:51:10 »
What does this patch apply to?  Would there be a way to apply it to GFs?

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Thank you for your report JeMaCheHi, this glitch appeared to affect all FR/IT/ES/DE versions. I updated the software, should now work normally. Just bring the FF8_ES.exe.bak and repatch again. :)
Also, if you tried to patch the EXE twice, you probably rewritten your .bak with faulty version. I already fixed it to NOT overwrite backups.

What does this patch apply to?  Would there be a way to apply it to GFs?

This patch applies only to world map [as far as I was testing, this operations are fired only on world map segment postload]. Are G.Fs also bad UV'ed?
« Last Edit: 2015-08-30 10:17:28 by MaKiPL »

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Also, if you tried to patch the EXE twice, you probably rewritten your .bak with faulty version. I already fixed it to NOT overwrite backups.

This patch applies only to world map [as far as I was testing, this operations are fired only on world map segment postload]. Are G.Fs also bad UV'ed?

Ouch. No wonder my backup wasn't working properly lol...

As far as GF's - you can see in my Ifrit model that I posted on Rebirth Flame's thread that the earrings don't line up at all.  In Max, I altered the UV's by a tiny fraction and it looked -much- better.  The PSX Ifrit's earrings line up perfectly.  This UV ratio also worked with the other 3 GF's I tested (Shiva, Brothers, Diablos) and seemed to fix some small texture glitches.

On a side note - I just found out that if you use "Linear Filtering" Diablos' bats disappear anyway - so I wonder what other details Linear Filtering breaks.

JeMaCheHi

  • *
  • Posts: 194
  • You can just call me J!
    • View Profile
    • My YouTube Channel :D
Thank you for your report JeMaCheHi, this glitch appeared to affect all FR/IT/ES/DE versions. I updated the software, should now work normally. Just bring the FF8_ES.exe.bak and repatch again. :)
Also, if you tried to patch the EXE twice, you probably rewritten your .bak with faulty version. I already fixed it to NOT overwrite backups.

This patch applies only to world map [as far as I was testing, this operations are fired only on world map segment postload]. Are G.Fs also bad UV'ed?

Sorry for the late reply, my windows 7 install went crazy and I had to reformat and reinstall everything u.u
I just tried your new version and... still crashing on world map. Please if someone else tried this on a non english version, post it if you're running it without trouble.
Maki, if you need me to send you any file, or even my help with something, just PM me or whatever you want.

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Fixed, thank you JeMaCheHi for reporting and testing. :)

Nunsrgr8

  • *
  • Posts: 52
    • View Profile
Don't hate, I figured this thread is still active enough to post here! I recently tried this patch out to supplement Mcindus' Horizon Pack but unfortunately I cannot get it to work... It's disappointing as the UV mapping is a real eye soar! :\

I'm using the English Steam version and the latest version of Tonberry (2.04). The game has all available mods for Tonberry and all are working great except for the odd graphical hiccup. I patched the FF8_EN.exe before starting my game and as soon as I leave Balamb Garden for the Fire Cavern the game freezes instead of loading the world map. I had considered that it may have been an issue with Tonberry initially (I've read about some scene transition bugs using Project Eden), but the game ran smoothly throughout the many areas of Balamb Garden when I was collecting cards. Eventually, I disabled all the Tonberry mods and tried it "vanilla" and it still froze. I deleted the patched .exe and ran the backup (with mods on and off) with no issues at all.

Is there something I'm missing? It seems like the patcher is foolproof (just click patch, haha). Is anyone else having this problem, it looked like it was versions other than English that were initially being trouble. Trying HextLaunch version next.
« Last Edit: 2015-10-17 22:43:48 by Cities.Burn.Quick »

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Send me on PM your patched EXE (FF8_EN.exe AFTER running patcher). I'll take a look if there's something wrong there.

Here's FF8_EN.exe HEXT instructions:
http://pastebin.com/W72H6yep
« Last Edit: 2015-10-16 16:24:20 by MaKiPL »

Nunsrgr8

  • *
  • Posts: 52
    • View Profile
Thanks for the reply! I'll do that later for sure, I'm just checking this thread from my phone. PM sent with a link to my .zip of the patched FF8_EN.exe and some more stuff that might help figure out whats happening. I couldn't figure out how to send it through PM so I uploaded it to Google Drive.

I was looking at the tutorial Mcindus posted for addon .ddls. I have some idea as to how to setup the HextLaunch version in conjunction with RaW (which is essentially HextLaunch with a preinstalled .dll). I assume that you save MaKiPL's Hext instructions from the Pastebin link as FF8_EN.txt and place that inside RaW's prexisting Hext_in folder. Next you'd obviously change the LoadHext value from 0 to 1 in the settings.txt. I'll update my post once I figure it out later.

EDIT:

I'm trying to get HextLaunch (RaW) to load the UV fix from the Hext_in folder. According to the output from HextLaunch.txt it "sees" the file but doesn't actually edit the memory in game (ie. it loads 9/12 FF8_EN.txt Hext instructions... it doesn't fix the UV mapping issues but it doesn't crash either)! I used the Hext instructions from the MaKiPL's Pastebin link. Is it not possible to load Hext instructions for FF8 Steam? I'd love to get this working with just HextLaunch.

EDIT EDIT:

After messing around with trying to inject the changes to virtual memory with HextLaunch, I finally got my FF8_EN.exe patched manually using DLPB's HexEdit program! Everything is looking pretty!  8) I'll post a quick tutorial for anyone having similar issues. This worked 100% for me but I'm not responsible if something goes wrong on your end...

MANUAL PATCHING TUTORIAL:

 1. Backup the FF8_EN.exe file from your Final Fantasy VIII Steam directory (steamapps/common/FINAL FANTASY VIII/) just in case. I just copy mine to the desktop for the time being.

 2. Go here and click the 'Here' link to download DLPB's Tools 2.0.

 3. Unzip the file anywhere on your PC.

 4. Open the "HextEdit" folder and move your FF8_EN.exe file from your Steam directory to the HexEdit root folder. The root folder contains another folder named HE_in, the HexEdit.exe, a Readme.rtf, and a test.file (which you should delete).

 5. Open the HE_in folder and delete the example Hext instructions.

 6. Create a new Notepad text document in the HE_in folder, name it "FF8_EN" and paste:
Code: [Select]
FF8_EN.exe
153CC0 = 00
153CCA = 00
153CD8 = 00
153CE2 = 00
153CF2 = 00
153CFC = 00
153D0C = 00
153D16 = 00
153D26 = 00
153D30 = 00
153D38 = 00
153D42 = 00

 7. Save your FF8_EN.txt.

 8. Go back to the HextEdit root and run the HextEdit.exe application, press enter when prompted.

 9. Once HextEdit finishes it will create a HextEdit.txt. Open this file and insure it reads...
Code: [Select]
---------------------------
FF8_EN.txt (FF8_EN.exe)

Changed: 12
Replaced: 0

No errors.

___________________________

10. If newly created HextEdit.txt has the same output, it was patched successfully.

11. Move your FF8_EN.exe from the HextEdit root back to your Steam directory. Overwrite if need be.

12. Run game and enjoy your newly patched FF8 world map!

Feel more than free to update the first post with my tutorial.
« Last Edit: 2015-10-18 00:04:21 by Cities.Burn.Quick »

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
+1 Cities.Burn.Quick
I copied your tutorial over first post. Thank you! :3

Hello, been a while since this has been discussed.. I installed the patch and in game doesn't work anymore. Have black screen after starting from save. World map texture replacements/upscales have not worked which lead me to this post. Using steam, disabled overlay, and using newest files of everything..

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
So, any other graphic mods are not working as well?
Did you try applying only this patch or you did it after installing some mod?
Also, you're using steam edition, but which language version?