ROM Hack Prince of Tennis Crystal Drive Sprite/Portrait Recoloring Help

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
I'd like to recolor a few characters hair in game to their anime appropriate counterparts. I haven't had any luck being able to open what I believe to be the files containing their sprites/portraits. Any help would be appreciated. I've tried using Crystaltile2, Tinke, nsmb-editor, etc.
 

Attachments

  • Screenshot (427).png
    Screenshot (427).png
    3.8 MB · Views: 63
  • Screenshot (428).png
    Screenshot (428).png
    3.8 MB · Views: 25

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
_LZ in a name is a fairly telltale sign of compression. You will want to decompress the files first. Compression on the DS is a fairly solved problem and I doubt this would be crazy custom compression.

Tinke likely has something built in (the fact it has a little zip icon means it likely has detected it) but I am not so familiar with it and was never a great fan of its workflow to know whether it will do what you want here (right clicking on the file might yield something interesting).

If not grab the file out by whatever means you like and
https://www.romhacking.net/utilities/826/
https://github.com/magical/nlzss
https://github.com/barubary/dsdecmp
Probably get something done with those.
 

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
_LZ in a name is a fairly telltale sign of compression. You will want to decompress the files first. Compression on the DS is a fairly solved problem and I doubt this would be crazy custom compression.

Tinke likely has something built in (the fact it has a little zip icon means it likely has detected it) but I am not so familiar with it and was never a great fan of its workflow to know whether it will do what you want here (right clicking on the file might yield something interesting).

If not grab the file out by whatever means you like and
https://www.romhacking.net/utilities/826/
https://github.com/magical/nlzss
https://github.com/barubary/dsdecmp
Probably get something done with those.

There's no button to decompress though? I dont even know what to click after pressing decompress anyway. This game seems very difficult to work with
 

Attachments

  • Screenshot (429).png
    Screenshot (429).png
    3.2 MB · Views: 23

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
I have seen nicer things to work with those images make it seem reasonable.

The DS is a file system using console (first of the Nintendo handhelds in commercial games, things that work on a floppy disc or optical media had been using it for years). Consequently you can explode it apart into files which usually have nice file names, directory names, extensions and file sizes to make narrowing down what things do easier for the would be hacker.

From where I sit there are then three classes of tool that handle things

1) The all in one GUI programs (though they can have some subtle but far reaching distinctions).
Tinke is one, crystaltile2 another (open the ROM, click the little DS icon, right click on files for various options, or double click to set the current window to its location*) , mkds course modifier (despite the name is actually general use) another of the usual three but there are a few more legacy ones.

*one of the subtle distinctions and reason I like it over tinke as tinke is very wed to its files where this allows you to do what you like.

2) Standard unpack and rebuild efforts, though those above might also do this.
ndstool is the original thing most meet and has frontends in the form or dsbuff and dslazy. nitro explorer tends to be the other.

3) File level import and export.
I always liked ndsts, though it is one of the simpler ones and only imports files of matching size (not so bad for smaller as you can pad it out but annoying for larger). Tinke has some options here, and can recalculate pointers (thus can have file size changes).

So anyway now you have a bunch of files (probably in the names and directories noted in your pictures). World is your oyster -- can load them up in hex editors, disassemblers, relative search tools, music programs if you like... though I would grab one of the decompression tools noted above and fire it though those to get the decompressed version which most of the tile editors and whatever else will probably appreciate. Will want to compress it again before inserting or rebuilding the game to test out your mods.
 

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
I have seen nicer things to work with those images make it seem reasonable.

The DS is a file system using console (first of the Nintendo handhelds in commercial games, things that work on a floppy disc or optical media had been using it for years). Consequently you can explode it apart into files which usually have nice file names, directory names, extensions and file sizes to make narrowing down what things do easier for the would be hacker.

From where I sit there are then three classes of tool that handle things

1) The all in one GUI programs (though they can have some subtle but far reaching distinctions).
Tinke is one, crystaltile2 another (open the ROM, click the little DS icon, right click on files for various options, or double click to set the current window to its location*) , mkds course modifier (despite the name is actually general use) another of the usual three but there are a few more legacy ones.

*one of the subtle distinctions and reason I like it over tinke as tinke is very wed to its files where this allows you to do what you like.

2) Standard unpack and rebuild efforts, though those above might also do this.
ndstool is the original thing most meet and has frontends in the form or dsbuff and dslazy. nitro explorer tends to be the other.

3) File level import and export.
I always liked ndsts, though it is one of the simpler ones and only imports files of matching size (not so bad for smaller as you can pad it out but annoying for larger). Tinke has some options here, and can recalculate pointers (thus can have file size changes).

So anyway now you have a bunch of files (probably in the names and directories noted in your pictures). World is your oyster -- can load them up in hex editors, disassemblers, relative search tools, music programs if you like... though I would grab one of the decompression tools noted above and fire it though those to get the decompressed version which most of the tile editors and whatever else will probably appreciate. Will want to compress it again before inserting or rebuilding the game to test out your mods.

This contains all of said characters sprites and portraits. Im very confident. But I still don't know how you open them from the programs you mentioned. I got ndsts. Open it in there and when I get to the files in the database zipped for you here and right click my only options are always just import file or export. Or compress
 

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
I stumbled upon this new discovery. Switching between tile and palette and map a few times had the portraits appear properly as seen in game with the proper metrics displayed down below.

Now as opposed to the sprites used on the court and during gameplay... I still don't know how to display them correctly. But do the metrics down below showing all those numbers help at all?
Post automatically merged:

Also has 16 palettes. (The portrait one)

And this is as far as I was able to get opening the image on CT2 with the imported palette. Still won't show properly...
 

Attachments

  • 1.jpg
    1.jpg
    645.7 KB · Views: 30
  • Screenshot (437).png
    Screenshot (437).png
    2.9 MB · Views: 23
  • Screenshot (438).png
    Screenshot (438).png
    2.8 MB · Views: 23
  • Screenshot (440).png
    Screenshot (440).png
    3.1 MB · Views: 24
Last edited by Slade_Wind,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
You might need to adjust your tile width -- the staggered almost aliased effects of the lines and the lack of height on what I presume to be hexagons means you might have split the image in two by taking individual lines and putting them in their own section as it were.
 

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
You might need to adjust your tile width -- the staggered almost aliased effects of the lines and the lack of height on what I presume to be hexagons means you might have split the image in two by taking individual lines and putting them in their own section as it were.

Just gave it another try in my free time. This attempt, at least for the file I showed, I was able to open, decompress, and export as an ".ntft". I used paint.net to do a recoloring edit and repacked it and it appeared albeit after a few attempts cause of the whole irritating "don't use more than 16 colors" fiasco. However, all the other files won't open correctly. The one's used during gameplay such as sprites and stuff.

So my two new questions are;

  • I just want to recolor a few characters to their appropriate anime hair hues without going over the original 16 color limitation... but at the same time need to keep the portrait's palette the same so when finished coloring I can just reimport without the REPLACE PALLETTE OPTION as to avoid the new variant being transparent in game, showing up in different shades, etc.

  • And two, how to properly open the other files? Only that first one opened correctly. No matter how I fiddle, the others won't open normally. I'll submit a few so you can view them as well as an example shot of what the sprites will look like. Just your standard animated poses like Megaman.
 

Attachments

  • 1_13sqnKzzppg2r736bRz9qQ.png
    1_13sqnKzzppg2r736bRz9qQ.png
    37.5 KB · Views: 10
  • Screenshot (123).png
    Screenshot (123).png
    4.5 MB · Views: 9
  • Screenshot (122).png
    Screenshot (122).png
    4.5 MB · Views: 8
  • gam_jiro_pack_LZ.ntft.png
    gam_jiro_pack_LZ.ntft.png
    13 KB · Views: 9
  • LzBu_jiro.ntft.png
    LzBu_jiro.ntft.png
    21.4 KB · Views: 9
  • ser_jiro_pack_LZ.ntft.png
    ser_jiro_pack_LZ.ntft.png
    15.1 KB · Views: 13

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
seems there's many infos in other files. First one had a color palette.
another one has also a map data... here you can set these parameters
tiles.jpg

92 is the offset when the tiles starts, image is scrambled so we predict there's must be a map for that puzzle...
you can predict the short vertical lines at the end.
So how to find offset... just count that place 327 tiles * 64bytes +92 (begining) = 21020 -> 521C, that's not exactly what we
are looking, map structure is a 2 bytes first is tile id and second is tile propeties... we can see that it starts at 541C,
you can copy map data temproraily into antoher file and open as a map, I've got something like this...

map.jpg

something goes wrong with palette this time, but you can identy the image you want to edit... still you can just edit hair color on the previous file, just set the proper smalest window knowing that you operate only on tiles data during import and export and you should be fine, I don't recommend to import on the map data, for me Tinke just doesn't like it. Another taks is also localize the palette for this image, i didn't found, maybe there's global palette for the rest images and sits in LzBu_jiro.
 
Last edited by plasturion,

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
seems there's many infos in other files. First one had a color palette.
another one has also a map data... here you can set these parameters
View attachment 417780
92 is the offset when the tiles starts, image is scrambled so we predict there's must be a map for that puzzle...
you can predict the short vertical lines at the end.
So how to find offset... just count that place 327 tiles * 64bytes +92 (begining) = 21020 -> 521C, that's not exactly what we
are looking, map structure is a 2 bytes first is tile id and second is tile propeties... we can see that it starts at 541C,
you can copy map data temproraily into antoher file and open as a map, I've got something like this...

View attachment 417784
something goes wrong with palette this time, but you can identy the image you want to edit... still you can just edit hair color on the previous file, just set the proper smalest window knowing that you operate only on tiles data during import and export and you should be fine, I don't recommend to import on the map data, for me Tinke just doesn't like it. Another taks is also localize the palette for this image, i didn't found, maybe there's global palette for the rest images and sits in LzBu_jiro.


So you couldn't even open it properly, right? Cause during gameplay character portraits pan across the screen when you do a special or get a service ace and stuff. Also there is a set of sprites of the characters on the court too id have to recolor the hair on those frames too (the Megaman like ones)
Post automatically merged:

seems there's many infos in other files. First one had a color palette.
another one has also a map data... here you can set these parameters
View attachment 417780
92 is the offset when the tiles starts, image is scrambled so we predict there's must be a map for that puzzle...
you can predict the short vertical lines at the end.
So how to find offset... just count that place 327 tiles * 64bytes +92 (begining) = 21020 -> 521C, that's not exactly what we
are looking, map structure is a 2 bytes first is tile id and second is tile propeties... we can see that it starts at 541C,
you can copy map data temproraily into antoher file and open as a map, I've got something like this...

View attachment 417784
something goes wrong with palette this time, but you can identy the image you want to edit... still you can just edit hair color on the previous file, just set the proper smalest window knowing that you operate only on tiles data during import and export and you should be fine, I don't recommend to import on the map data, for me Tinke just doesn't like it. Another taks is also localize the palette for this image, i didn't found, maybe there's global palette for the rest images and sits in LzBu_jiro.

I think the characters palette used is in each of the actual bin folders you open, no? When you click the palette option that first image that comes up is the palette used in shot or am I wrong? Feel like when last I attempted, I got the palette used for the file. Must have been through crystaltile2?
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
It seem i just didn't looking for the palette but it seems that i found anyway... correct palette data for this file is at 521C right after tile data, so you can set the "start byte:" at 521C
its good to know how the file is build, header and stuff... and some programming skill would be useful just to split and join togheter. If you plan edit your images more easly maybe something like another tool for tiled maps will be handy like grit https://www.coranac.com/man/grit/html/grit.htm
palette.jpg


tiles.jpg

and header seems to be 28bytes long, first tile should be transparent, so offset 92-64 = 28
we know much stuff about it know.

If you plan to open map data it maybe tricky here, cause in 2 byte sequences it indicates to second palette (1) not first one (0) and there's only one 256 colors palette. We know that palette is 0x200 bytes long so for only this example we can use this kind of trick. Let's set start palette position to 501C, open tiles like before, and this time open again the same file as a map with starting offset right where map data begins 541C, that's only for preview purpose.
1706962087728.png
 
Last edited by plasturion,

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
It seem i just didn't looking for the palette but it seems that i found anyway... correct palette data for this file is at 521C right after tile data, so you can set the "start byte:" at 521C
its good to know how the file is build, header and stuff... and some programming skill would be useful just to split and join togheter. If you plan edit your images more easly maybe something like another tool for tiled maps will be handy like grit https://www.coranac.com/man/grit/html/grit.htm
View attachment 417928

View attachment 417927
and header seems to be 28bytes long, first tile should be transparent, so offset 92-64 = 28
we know much stuff about it know.

If you plan to open map data it maybe tricky here, cause in 2 byte sequences it indicates to second palette (1) not first one (0) and there's only one 256 colors palette. We know that palette is 0x200 bytes long so for only this example we can use this kind of trick. Let's set start palette position to 501C, open tiles like before, and this time open again the same file as a map with starting offset right where map data begins 541C, that's only for preview purpose.
View attachment 417934

AW SICK DUDE YOU OPENED IT PROPERLY. Im sure the portraits used IN GAME are all the same settings. See, I dont know how the hell you figure any of that out. Like the 541C stuff. And the width and height. Im sure that takes care of all the portrait bin files ill need to open for him and 1 other character. Now can you try to open up one of Jiro's other files until you find the megaman type one where hes a small pokemon size with all his tennis striking frames and stuff. Cause that'll honestly be it for his files.

Its the one I first posted, which opens easily. On tile setting., Second, the character portraits in gameplay like you just solved... and lastly, the sprites down in the gameplay screen on the court. Thats it for this game to be honest. Its not overly complex.
Post automatically merged:

It seem i just didn't looking for the palette but it seems that i found anyway... correct palette data for this file is at 521C right after tile data, so you can set the "start byte:" at 521C
its good to know how the file is build, header and stuff... and some programming skill would be useful just to split and join togheter. If you plan edit your images more easly maybe something like another tool for tiled maps will be handy like grit https://www.coranac.com/man/grit/html/grit.htm
View attachment 417928

View attachment 417927
and header seems to be 28bytes long, first tile should be transparent, so offset 92-64 = 28
we know much stuff about it know.

If you plan to open map data it maybe tricky here, cause in 2 byte sequences it indicates to second palette (1) not first one (0) and there's only one 256 colors palette. We know that palette is 0x200 bytes long so for only this example we can use this kind of trick. Let's set start palette position to 501C, open tiles like before, and this time open again the same file as a map with starting offset right where map data begins 541C, that's only for preview purpose.
View attachment 417934

Oh its only for preview purpose? Crap then so when I try to export it as an ntft to edit colors it'll still look all disgruntled like ur first shot? Dammit...
 

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,216
Trophies
2
Location
Tree
XP
3,505
Country
Poland
how? probably that info you could also find in a header, I didn't look there, but I got it from the scrambled image just to present you can do in other way, just count cols and rows of regular tileset (till the vertical lines appears) (using in example a grid 8x8 pixels in any graphical program) do some multiplication and that's all. Data is a puzzle of regular pattern to figure out in the way of trail and error, grab some definitions put togheter and you are good to go. But I can't help it anymore, good luck with your task!
 

Slade_Wind

Member
OP
Newcomer
Joined
Feb 17, 2023
Messages
24
Trophies
0
Age
30
XP
124
Country
United States
how? probably that info you could also find in a header, I didn't look there, but I got it from the scrambled image just to present you can do in other way, just count cols and rows of regular tileset (till the vertical lines appears) (using in example a grid 8x8 pixels in any graphical program) do some multiplication and that's all. Data is a puzzle of regular pattern to figure out in the way of trail and error, grab some definitions put togheter and you are good to go. But I can't help it anymore, good luck with your task!

Alright, ill try to make sense of everything you said.
 
Last edited by Slade_Wind,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Weird I have been playing MSU enhanced Genesis games for a while now lol