NeatDS : Tidy up your NDS ROM Collection by auto rename it using NDS Banner Text

I wont share this on a thread since this tool is EXTREMELY SIMPLE that deserve no thread. :sad:
The idea is, how to organize my NDS Collection with pretty name format? but yeah, im too lazy to do manual renaming one-by-one because my NDS Collection is too much ! :(
Then i look at my NDS tools, and i remember that ndstool is the only tool that directly read the NDS header, with its help, i can get the NDS Banner Text, then use it to rename each NDS File. :unsure:
Until i realized that dump file result from ndstool still contains garbage, so i must trim and remove those garbages, and keep the banner text information. :wtf:
Finally, after trimming and removing garbages, the banner text ready tobe used as my project part. rename NDS ROM File with its Banner Text data :grog:


  • Like
Reactions: 6 people

Comments

Hello.:)

Great Tool.Please share it.
(Am I "Blinded by the Light" or is there really no DOWNLOAD Link ? :rofl2:)

Thank you,my Friend.:yay:
 
  • Like
Reactions: 1 person
oh yes, im not test it using unicode name like japanese, so idk if its acceptable by program or not :unsure:
 
  • Like
Reactions: 1 person
yes sir, its even rename .dsv and .rts too.. i will add additional extension for more dynamic rename sir :unsure:
 
  • Like
Reactions: 1 person
This seems really convenient ^_^

oh yes, im not test it using unicode name like japanese, so idk if its acceptable by program or not :unsure:
When I tried on a Japanese rom it froze the program when it got to that one... :(
 
  • Like
Reactions: 2 people
@alexander1970 thank for your suggestion sir :lol:
@Pk11 yeah im on the way on fixing it :rofl: (thanks to notice me :blush:)
 
  • Like
Reactions: 1 person
gambar.png


hello, @Pk11 !
i have try to download random japanese regional ROM, but it seem run well on my system :unsure:
i think its unrelated and impossible, but my system regional setting is using Japanese, i thought yours too ! :mellow:
some ROM needs time, since the header info need tobe dumped by ndstool so my program could read it :cry:
 
  • Like
Reactions: 1 person
Huh, strange :unsure:
I tried again and it only freezes for me for roms that already have a Japanese filename, Japanese roms with english filenames work, but its not putting the Japanese characters in the names for me... "Nintendo - New .nds" for Newスーパーマリオブラザーズ

My computer is windows 10 with the app and system language in Japanese, but the country set to USA.

Also the banner offset is stored as a u32 at offset 0x86 in the nds file, so if you just read from 0x240 after that offset it should take you right to the titles without needing to use ndstool.
 
  • Like
Reactions: 2 people
@Pk11 you're right, its on 0x240 (on ndstool dump, it stored at 0x240 too, when i open it using HxD) i still using ndstool because i dont want my program consume much RAM usage, i still need a way to load only on header too, thats why i still using ndstool :cry:
for now, i just understand how read the file header by load the entire file, imagine how many mb if i load a Pokemon Black/White 2 on stream :cry:

so the only problem is, if the source name is already japanese :unsure:

thanks to mention me :sad:
 
  • Like
Reactions: 1 person
I'm not sure how it works in the language you're writing in, but at least with C++ you can open a file, seek to where you want, and only load in the few bytes you need from there
C++ would be like:
Code:
FILE* file = fopen(filename, "rb");
fseek(file, 0x86, SEEK_SET);
uint32_t bannerOffset;
fread(&bannerOffset, 1, 4, file);
fseek(file, bannerOffset+0x240, SEEK_SET);
char16_t title[128];
fread(title, 2, 128, file);
// title now has the title from the first language (Japanese iirc) in UTF16
 
  • Like
Reactions: 2 people
@Pk11 yeah i can understand clearly the source here c++ i perfectly dynamic like java so you can do difficult thing in an easy way :teach:
like english, i know what its written but idk how to explain it (in this case, porting to pascal :sad:)

i see there, you define the size of bytes you want to crop up, and voila, you got it !

in mine, even after get the bytes i still need to clean up the garbages, like null, esc, .... it wont be disposed automatically, and could affect to file name :cry:

i will try to find out how to read the header part only

thanks for your code sugggestion, at least i have known what should i do next :bow:
 
  • Like
Reactions: 2 people
@Pk11 , em.. can you show me what title of nds that made program stuck? some homebrew and hacks may be not work as expected tho..

because i have try the same, with full japanese name, then run neatds, it still rename the full japanese named nds well :O
 
  • Like
Reactions: 1 person
That's so weird that it works for you, but not me... :unsure:
Here's a video of what's causing problems for me:


btw if this is just some dumb problem with my computer, I'm sorry for wasting your time like this :(
I'm just trying to help if it is a general problem with the program :P
 
  • Like
Reactions: 2 people
@Pk11 no, no, nothing waste my time tho ...
i just wonder if its just problem by the nds file. :unsure:

and you know what? i have my friend ported me the script from your c++ into my pascal, and the interesting thing is, the functions are all identical, the function name, etc.. :blink::blink::blink:

and, your video is private, i even cant watch it :(
 
  • Like
Reactions: 2 people
Oh, sorry I tried to set it to unlisted and somehow it switched to private, I fixed it now

I tired with Pokémon Dash (ポケモンダッシュ), Pokémon White (ポケットモンスターホワイト), and New Super Mario Bros. (Newスーパーマリオブラザーズ) and they all acted the same... (all clean dumps)

Edit: I tried in wine on my iMac and it works there on the same rom as on my windows 10 computer...
 
  • Like
Reactions: 2 people
The banner info is sometimes not that good / inconsistent, sometimes it's all uppercase, sometimes the fields are not used the way you expect them to be. Back in the day people used ROM managers that had a database with all the scene release info, to rename the game with various info like release number, release group, region, multilanguage, etc.
Gives you more information that can be used in the filename and also ensures that all the info looks consistent.

I kind of prefer that way but of course not everyone cares about having the scene release info in the filename, I'm just a bit old fashioned that way.

Anyway, it should be possible to include region info in the filename as well right? The region is part of the game code (ex. NTR-****-USA) which I believe should be in the header somewhere? To me at least that is one of the most important things to have in the filename. And that info is usually already in the filename of scene releases, so then using this renamer would remove that info.
 
  • Like
Reactions: 2 people
@Pk11 : hello, i just watch your video, its cool has system all in japanese :lol: , i still need to find out about this problem, sorry inconvenience you, that's why i wont make a thread because i realized that its not as easy as it seems, because its about reading bytes.
i have updated it (i will upload, as soon as i have home), with some features and new reading methods (still using ndstool tho).
i will build a debug version for tracking what made it stuck, could you please help me identify it, i will send it to you later (after you confirmed) :blush:

@The Real Jdbye : hi, thanks for your suggestion, but the purpose of this tool is utilize the informative content from NDS ROM File as file name, and as i know there's no clearly written game code on the header (as clear as game banner, game header and game id). It's possible (and should be existed) to store game code not as-is, but as bytecode that only easily known by the console and the game maker. I know, there's lot's of game databases online API which provide user to fetch data based on game id, or other identifier, but i won't use that.
And for game code, i think i need to ask @Pk11 about the way to read it. he's C++ guy, and this kind of programmer has lot's advantages in ripping off NDS ROM...
 
  • Like
Reactions: 3 people
Yeah, my Japanese isn't great, but I set like all my devices to it to force me to learn things :P, I'm happy to try your debug version ^_^

The game code is 4 bytes starting at 0xC, the fourth (0xF) being the region identifier
These are the regions the TWiLight Menu updater uses for boxarts, I'm not 100% sure if its all regions, its most at least:
case 'E':
case 'T':
// USA
case 'J':
// Japan
case 'K':
// Korea
case 'O':
// USA/Europe
case 'P':
// Europe
case 'U':
// Australia
case 'D':
// Germany
case 'F':
// France
case 'H':
// Netherlands
case 'I':
// Italy
case 'R':
// Russia
case 'S':
// Spain
case '#':
// Homebrew
// Note that modern homebrew may use any letter, not necessarily a gamecode of "####", TWiLight Menu++ uses "SRLA" ("A" might mean region free / all, I'm not sure, it might've been used in some system DSiWare titles or something)
The structs in this header file show the layout of the header and banner btw. (u8 and char are 1 byte, u16 is 2 bytes, u32 is 4 bytes)
 
  • Like
Reactions: 2 people

Blog entry information

Author
cimo95
Views
351
Comments
68
Last update

More entries in Personal Blogs

More entries from cimo95

General chit-chat
Help Users
    K3N1 @ K3N1: https://i.ibb.co/gTVKLHF/bill-king-of-the-hill.gif