ROM Hack Help: editing Phantom Hourglass textures with Tinke

HelpTheWretched

Well-Known Member
OP
Member
Joined
Feb 4, 2010
Messages
317
Trophies
1
XP
1,564
Country
Canada
I wanted to make a very minor texture hack for Zelda: Phantom Hourglass, basically just to remove the fog effect from certain areas, for the purpose of taking clearer screenshots. I did some quick searching and found a nice DS filesystem explorer called Tinke, which I'm sure some of the regulars on this board are familiar with.

So I found the fog texture easily enough (.nsbtx format), extracted it, used a hex editor to "black out" most of the image, then reloaded it into the ROM with Tinke. No issues so far, and viewing the edited texture in Tinke shows the desired effect. Then I saved a new copy of the ROM, but when I tried it in DeSmuME, it hangs at the white screen and doesn't get anywhere.

I assumed there would be some kind of signature or checksum process that Tinke would take care of, but if anybody here is more familiar with the process and knows what went wrong, could you please help me out?

Once this is working, I'd also like to black out the glowing textures when Link holds up a new item, but I haven't been able to find them in the ROM.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,405
Country
United Kingdom
The DS does have provisions for fog and lights as well but if it is a texture then so be it.

Is this white screen right at the start or when it first loads the texture? Also just for the sake of completeness as we are contemplating fog here I assume it is an actual hang and not somehow that you made the whole world fog?

If it is at the start then something went wrong with whatever repacking or insertion is going on (there should be no checksums like we are used to seeing on newer disc based consoles and stuff after the DS).
If it is when it would theoretically try to load the fog (I don't know if there is some kind of opening sequence with it in) then your edits caused it to crash.

For the former then find the texture you edited. Pull the ROM apart with whatever tools you have (I like ndstool based stuff myself) and insert just the edited texture (compressed again if needs be).

For the latter then you need to figure out what it is that caused it.
Not being recompressed would be my first test; most DS 3d related files I tend to find compressed, can't remember if these are though but easy enough to find out -- in a hex editor in the basic ROM does the file start with 10, 11, or 40 in some later ROMs? If so compression is most likely what you are seeing.
After this we get to figure out what goes.
Start by going back and making a single edit of a single pixel/texel. Bonus is if tinke managed to decode it to view it then you should be able to tell what format it is all in in case you have to get familiar with http://problemkaputt.de/gbatek.htm#ds3dtextureformats . This will hopefully eliminate some kind of wrong format save error (unexpected data tends to make for nice crashes as games are not typically coded to handle that sort of thing).
Errors in the formatting are next -- most DS files are more than just the data and contain things around it. If you just went all "fill it with FF or 00" then you might have knocked out some size data, format info or whatever else and caused some fun upon attempted decoding. For DS textures they often come in blocks separated by data it needs.

Possible second option. If there is a tiny texture instead maybe consider renaming it/overwriting the fog. It might trouble things if it uses a different format (though it might well pick up on the different format if the texture tells it what it is) but can be worth a try -- if a small shadow or something is hidden by a giant chest then who cares?

Hybrid of the two approaches. If there is a nice alpha value somewhere set it to transparent and while it may still load (not great if you are doing an optimisation hack, less of an issue for screenshots I imagine)
 
  • Like
Reactions: Mike_77712

HelpTheWretched

Well-Known Member
OP
Member
Joined
Feb 4, 2010
Messages
317
Trophies
1
XP
1,564
Country
Canada
Oooh, lots of info! Thanks for the help, I'll have to read it carefully. I'm kind of in a rush right now so it's hard to focus.

First of all, the "white screen" hang was immediately after booting, before the Nintendo logo. Also I'm aware of most data files having header data and sometimes footers, so I didn't overwrite those.

The fog texture was uncompressed according to Tinke, and 32KB for a 256x128, 8bpp image would confirm that. There are a couple uses of fog in the game, but as far as I can tell, the texture I edited only appears on the foreground of a couple dungeons.

Not sure if I'd have any more luck with playing it on an actual (3)DS but I've got an Acekard to try it out. ;)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    But my 3DS is loaded with emulators and 3DS games and DS games and GBA games probably thousands of games in total lol
  • Xdqwerty @ Xdqwerty:
    Brb going with my dad
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, are most of those games shovelware?
    +1
  • K3Nv2 @ K3Nv2:
    Nah gotta buy 3 1tb SD cards for 3ds the entire libraries need archived in my home
    +1
  • SylverReZ @ SylverReZ:
    >buys x3 1TB SD cards
    >stores the entire 3DS library on them
    >installs CFW
    >realised why I wasted loads of money and resources
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol no I clean my sets
  • K3Nv2 @ K3Nv2:
    Cause it's in my home ready to go
  • K3Nv2 @ K3Nv2:
    Like uremum
  • Psionic Roshambo @ Psionic Roshambo:
    But 100 games on SNES and Genesis and GBA then TG16 and NES and GB and GBC then all the other random systems and arcade games it all adds up lol
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Virtual Boy alone has probably 5 games!!! Lol
    +1
  • K3Nv2 @ K3Nv2:
    I won't mention any names in chat but some of us wastes $300 on preloaded hdds :tpi:
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, The PS5 had none.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol I spent more than that on a stuffed 4TB drive lol
  • K3Nv2 @ K3Nv2:
    Honestly I've yet to fill the 1tb internal drive on my ps5
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, 1) except final fantasy 16. 2) why would I have a console's whole catalogue if most of the games are either shovelware or terrible games?
  • Psionic Roshambo @ Psionic Roshambo:
    Kind of a waste, but the allure of all those games over 100,000
  • Psionic Roshambo @ Psionic Roshambo:
    Some shovel ware with low ratings you might enjoy more than the ratings would sugest
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Cruisn on the Wii is one of my personal examples of that, it's considered one of the worst games of all time, I loved it and completed it several times.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The trick for me was to go into the settings and crank up the Wiimote sensitivity to the max and it gets twitchy but you can win that way lol
  • Psionic Roshambo @ Psionic Roshambo:
    Lots of other games I enjoyed that reviews would say otherwise lol
  • btei @ btei:
    lethal company servers are down rn
  • btei @ btei:
    my pocket pikachu is going crazy rn
  • Psionic Roshambo @ Psionic Roshambo:
    Pocket Pikachu sounds dirty lol
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, Penischu, I choose you.
    SylverReZ @ SylverReZ: Lol