In FF7 I have basically rewritten the function that loads .tex files so that it stores the filename in a place where I can retrieve it once the game tries to upload it to a texture.
Since field files are not in .tex format I have rewritten another function that gets called when the game loads field files so that I can construct a meaningful filename and place it where the texture loader will find it. So far no problem.
However, in FF8 there are many many different texture formats each with their own loaders scattered all over the place usually with several levels of indirection (several textures inside multi-part files sometimes inside other multi-part files
) and so very hard to replace with something that can construct a meaningful filename. Now even if we could tackle this issue these routines are just loading data into the emulated GPU VRAM, there's not even necessarily a 1:1 mapping from file to texture at this point. When drawing a scene, the emulated GPU uses a set of predefined textures which each represent a certain area of the VRAM and a certain palette (using some kind of cache system with 16? or so different textures so they're not each fixed to a certain area but get swapped around) so even if we had useful filenames at this point it would be extremely difficult to map them to these textures. For a while I was experimenting with keeping a map of VRAM areas to filenames and figuring out on the fly which area the game was trying to draw from but this turned out to be completely unfeasible and never really worked for anything but the credits screens.