Jump to content

z64-tex-ext INJECTOR (C++)


Jason777
 Share

Recommended Posts

So this is what I've been working on for the past few days (like the whole week): an automatic injector for spinout's animated texture hack written in C++. This program is for intermediate users and I don't expect newbies to understand how to use it. Continue reading for small little notes and some disappointing news.

 

For some reason it doesn't work with maps generated by SharpOcarina (I've only tested v0.6.5) and I've had complete success with Obj2Area (I've only tested v2) I guess due to the way display lists are generated in the programs. The only other bug I can find is that it's tricky figuring out the exact number of display lists in 0x00 mesh types. Besides that little bit of disappointing information, there's no downside to the program besides having a little knowledge on display lists to be able to input correct information. The only thing that the program doesn't do for you is fix the CRC of the ROM. You have to do that yourself if you plan on playing the ROM in PJ64 (nemu ignores CRC miscalculations).

 

Features:

[*]Support for all 3 mesh types.

[*]Allows you to dig deep into a display list to extract and choose texture commands

[*]Includes and uses the scrolling texture hack by default

[*]Frees memory in the ROM where the map file used to be.

[*]It is completely cross-platform but I have yet to release the source code. I need to clean it up a bit.

Things to take note of:

[*]This is a Windows executable program.

[*]Only usable with custom maps generated by Obj2Area. SharpOcarina is not supported (yet).

[*]Due to the way that the original z64-tex-ext hack was coded, you can only have one animation type in a map. The animation can only be paired with a single texture.

[*]Besides custom maps, any original map in the game is modifiable with the program (not thoroughly tested, of course).

[*]You have to specify your own injection offset for the modified map.

[*]JFIF background images cannot be animated.

[*]Do not mess with or delete the files "hacks/scroll.bin", "patches/hook.bin", and "patches/run_code.bin"!

[*]There is no GUI. Just a command-line program.

Planned features (program-wise):

[*]Support for SharpOcarina will be implemented as soon as I figure out why it messes up. You won't get a crash, you just have a screwed up texture.

[*]Automatic fixing of the ROM's CRC.

[*]Automatic injection of map file into first occurence of free space in case you can't decide on an injection offset.

[*]More efficiency in using the most minimal amount of space possible.

[*]Outputting text files which contain specific information on the map.

[*]A menu which allows you to choose between multiple animated texture hacks (in case anybody codes a new one) by reading from a text file which you modify yourself to include new hacks.

[*]Texture dumping from the map file so you know which texture command in the display list is for which texture

[*]Allow to choose whether you want the program to be verbose with its output or not.

[*]All other future changes would be support any future changes in the actual z64-tex-ext hack

Planned features (hack-wise):

[*]I plan to rewrite a lot of the hack to allow the same animation to be used for multiple textures

[*]I also plan to have you be able to insert multiple animation types into the same map file.

Download link: http://www.mediafire...grd9qveibdothpo

Source (developed with Code::Blocks): http://www.mediafire.com/?e9vc96vyplc0mg5

 

Credits:

[*]spinout for writing the z64-tex-ext hack

[*]DeathBasket for giving me some insight on the 0x01 mesh type.

[*]Lemmy for writing LemASM which I used to look at the disassembly of hack.bin to find where I could replace the hardcoded texture offsets

I had said earlier in this post that the program is cross-platform capable. This means that there is no system-dependent code anywhere within its source. I will release the source code at later time for anybody who is interested in running this program on anything other than Windows. I'll probably make a video of this at a later time.

 

Demo Video:

Link to comment
Share on other sites

It's a shame Python doesn't work for me anymore. I'll be waiting for the SharpOcarina compatible release! -sealofapproval- (Totally stolen from Naxy)

Thanks for the positive feedback, Sanguinetti. I realize at the moment that this program won't be of much of use until I can get it supporting SharpOcarina as that is undoubtedly the importer people use now.I made a quick fix with an error that was present when choosing between "far" and "close" display lists in mesh type 0x02. I also fixed a few bugs that could lead to memory leaks. Updated the link.Also, demo video:I've got to get this working for all display lists...
Link to comment
Share on other sites

  • 1 month later...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.