User:Xerxes: Difference between revisions

From Dolphin Emulator Wiki
Jump to navigation Jump to search
No edit summary
(37 intermediate revisions by the same user not shown)
Line 1: Line 1:
I test games and enjoy boring pedantic work. If I do something wrong/stupid please tell me on my discussion page or right here, I don't care where.
I test games and enjoy boring pedantic work. If I do something wrong/stupid please tell me on my discussion page or right here, I don't care where.


== GameID adding guide ==
== TMD scrape script ==
Needs:
Adapted from [[User:PowerKitten]]'s script to work on Linux.


*More meat about GameIDs, their function, how they're stored in the game, etc. so that some day when the wiki's GameID database is complete, this writeup wont be completely useless (i'll need help for this one)
Open a terminal, make a TMDs directory (<code>mkdir ~/TMDs</code>), then save the following script to your desktop in a text editor as <code>curl.sh</code>:


This will be an in-depth guide going through all the steps to quickly and consistently add good GameIDs to the wiki. It's not particularly hard to do, it's just a bit boring and sometimes can require some investigation for obscure titles. However, once you have an understanding of how IDs work and how best to use the resources available to you, it can be done without too much trouble.
<pre>
#!/bin/bash


=== How are IDs formatted? ===
cd ~/TMDs && curl -f http://ccs.cdn.shop.wii.com/ccs/download/00010001{41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}{30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}{30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}{41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}/tmd --output 00010001#1#2#3#4.tmd
Every ID is a unique six-character code made up of letters and numbers which identifies a specific version of every Wii or GameCube game. Each character holds its own meaning in the ID, as follows:
</pre>


*Character 1 tells you what console the game was released on, or in the case of the Wii, it'll tell you whether it's a WiiWare title, a Virtual Console title (and which Virtual Console specifically), or a retail game.
Then in your terminal run <code>sh ~/Desktop/curl.sh</code> and it'll begin scraping the 850,000 possible IDs.


*Characters 2 and 3 are the two unique characters which identify the actual game. Though there are some rare exceptions (usually Japanese releases), this normally stays consistent through all the different versions of a specific game. This can be used to find out when the wiki is in error, and two games with separate pages are actually the same. See [[R8XE52]] and [[R8XZ52]] as an example.
Make a copy of the ~/TMDs directory to ~/TMDcopy, and make another folder ~/renamedTMD. This is the C program I used to rename them all to Dolphin's 6-character IDs (pls no bully I wrote this, not portable, requires changing all the numbers and the username from "xerxes" to your username because I'm garbage):


*Character 4 is the region code. This is the most common changed character between different IDs for a single title and probably the most useful. By knowing the regions a game is released in, looking for missing region codes can help greatly in spotting missing IDs. Therefore, knowing correct release data for a game is crucial to knowing which IDs are valid and which IDs are missing.
<pre>
#include <stdio.h>
#include <string.h>


*Characters 5 and 6 reflect publisher, and these are the most confusing of all characters as they can be all over the place depending on the title. Sometimes titles will have different publishers for each region, the same publishers in all regions except one, all the same publisher, the same publisher but with a different last two characters that's actually valid, etc. However, they do follow patterns, even though they may be confusing patterns; see [[GameIDs]] for documentation on common trends.
char hexToChar(int n)
{
switch (n)
{
case 0x0:
return '0';
case 0x1:
return '1';
case 0x2:
return '2';
case 0x3:
return '3';
case 0x4:
return '4';
case 0x5:
return '5';
case 0x6:
return '6';
case 0x7:
return '7';
case 0x8:
return '8';
case 0x9:
return '9';
case 0xA:
return 'A';
case 0xB:
return 'B';
case 0xC:
return 'C';
case 0xD:
return 'D';
case 0xE:
return 'E';
case 0xF:
return 'F';
default:
return '0';
}
return '0';
}


**Note that for Virtual Console titles, each different console gets its own unique publisher ID that stays uniform for the console. For example, all Sega titles have publisher code 8P. This means that only the prefix is needed for confirmation of Virtual Console IDs as the final two characters can be filled in without much hassle. The chart below shows all known Virtual Console publisher IDs.
int main()
{
char fromfilename[100] = {0};
strcpy(fromfilename, "/home/xerxes/TMDcopy/000100014A414A4A.tmd\0");
char tofilename[100] = {0};
strcpy(tofilename, "/home/xerxes/renamedTMD/JAJJ01.tmd\0");
char buffer[2] = {0};
FILE *file;
int count = 1;
int i, k, m, o;
for (i = 0x41; i <= 0x5A; ++i)
{
fromfilename[29] = hexToChar(i / 16);
fromfilename[30] = hexToChar(i % 16);
for (k = 0x30; k <= 0x5A; ++k)
{
if (k == 0x3A)
{
k = 0x41;
}
fromfilename[31] = hexToChar(k / 16);
fromfilename[32] = hexToChar(k % 16);
for (m = 0x30; m <= 0x5A; ++m)
{
if (m == 0x3A)
{
m = 0x41;
}
fromfilename[33] = hexToChar(m / 16);
fromfilename[34] = hexToChar(m % 16);
for (o = 0x41; o <= 0x5A; ++o)
{
fromfilename[35] = hexToChar(o / 16);
fromfilename[36] = hexToChar(o % 16);
++count;
if ((file = fopen(fromfilename, "rb")))
{
tofilename[24] = i;
tofilename[25] = k;
tofilename[26] = m;
tofilename[27] = o;
fseek(file, 0x198, SEEK_SET);
fread(buffer, 1, 2, file);
tofilename[28] = buffer[0];
tofilename[29] = buffer[1];
printf("%d\t\t%s\n", count, tofilename);
fclose(file);
rename(fromfilename, tofilename);
}
}
}
}
}
}
</pre>


==== Virtual Console Publisher IDs ====
With that done, this should rename and then move each TMD file to an appropriate "ID".tmd file with the ID used by Dolphin within the ~/renamedTMD folder. Then you're done!
{| class="wikitable"
|-
!System
!Code
|-
|[[Commodore 64]]
|GX
|-
|[[Neo Geo]], [[MSX]]
|J8
|-
|[[Sega Master System]], [[Sega Genesis]]
|8P
|-
|[[NES]], [[Super Nintendo]], [[Nintendo 64]]
|01
|-
|[[TurboGrafx-16]], [[TurboGrafx-16|TurboGrafx-16 CD]]
|18
|}
 
=== Where do I find IDs? ===
The following is a list of publicly available sources for obtaining both GameCube and Wii IDs, in order of reliability.
 
==== Source #1: A personal dump ====
Since the wiki's IDs are used for functionality in Dolphin, the database here has to align to what Dolphin gives for different games (given that the dump is valid). Therefore, the perfect source of IDs for the wiki is by obtaining them through Dolphin itself. However, this requires owning a copy of the game and being capable of dumping it and viewing its properties within Dolphin.
 
==== Source #2: The game's cover/disc ====
On the back of all GameCube and Wii games (besides Asian releases where it's on the front), near the barcode, the Game's ID will actually be printed out. This makes searching for a scan of the game's cover a viable means of confirming IDs. The ID is also printed directly on the disc as well, in the little subscript text along the edge. This can be considered a perfectly reliable source, however the ID on the cover uses a different format from those used on the wiki; namely, it will only give you the first four characters, leaving out the publisher code. The publisher code can be pieced together using the publisher information on the cover, separate sources like GameTDB, and the [[GameIDs]] page if need be, however complete reliance on these sources is not recommended.
 
While this may theoretically be a good source of IDs, in many cases certain games just might not have high quality cover scans publicly available. If a cover scan for a game cannot be acquired using normal sources (GameFAQs, GameTDB, [https://www.mobygames.com/ MobyGames], etc.), [http://www.ebay.com/ eBay] is another possible option. A lot of listings use high resolutions pictures of both sides of the game's box or the disc, from which the ID prefix can be obtained. By knowing the regions of a game's release, region-specific eBays can be used to further narrow the search; for example, there's an [http://www.ebay.com.au Australian eBay], a [http://www.ebay.co.uk/ British eBay], a [http://www.ebay.de/ German eBay], and a [http://www.tradera.com/ Swedish eBay called Tradera], among others. Since these aren't databases, keep in mind listings will come and go and results may vary, so results may be hit or miss. Note also that for the best results it's more effective to use the title of the game in the language of the region, which can be obtained from GameTDB or Redump. Below is a chart listing online auction sites for various reasons for convenience.
 
===== List of online auction sites by region =====
{|class="wikitable"
|-
!Region
!Site
|-
|Australia
|[https://www.ebay.com.au/ eBay]
|-
|France
|[https://www.ebay.fr/ eBay]
|-
|Germany
|[https://www.ebay.de/ eBay]
|-
|Ireland
|[https://www.ebay.ie/ eBay]
|-
|Italy
|[http://www.ebay.it/ eBay]
|-
|Japan
|[https://auctions.yahoo.co.jp/ Yahoo!]
|-
|Netherlands
|[http://www.ebay.nl/ eBay]
|-
|North America
|[http://www.ebay.com/ eBay]
|-
|Spain
|[http://www.ebay.es/ eBay]
|-
|Sweden
|[http://www.tradera.com/ Tradera]
|-
|Taiwan
|[https://tw.bid.yahoo.com/ Yahoo!]
|-
|United Kingdom
|[https://www.ebay.co.uk/ eBay]
|}
 
==== Source #2.5: Nintendo's Update Server ====
The above method of looking for IDs on game covers is effective, but around half the games with pages on the wiki are digital titles that don't have a cover. So, the IDs instead need to be acquired from somewhere else. Thankfully, Nintendo's update server is publicly accessible from any web browser, and allows anyone to freely download TMD files with title information. This can be done by using the following link:
 
<pre>http://ccs.cdn.shop.wii.com/ccs/download/00010001<ID prefix>/tmd</pre>
 
The <ID prefix> bit needs to be replaced with the first four characters of the ID you're trying to confirm in hex ([http://ccs.cdn.shop.wii.com/ccs/download/000100014A414C54/tmd here] is a working link for prefix JALT as an example). If the prefix exists, a download will begin for an extensionless file named "tmd"; otherwise, a 404 will be reached. This file can then be opened with a hex editor, and the full ID can be seen (with a small gap between the prefix and publisher code) around halfway through the file in cleartext.
 
The major problem with this method is, if you don't know the prefix to start with, you can't check that the ID exists. There's been recent efforts to just scrape the entire update server for all TMDs and therefore never run into this problem, but the work is still pending.
 
==== Source #3: [http://www.redump.org/ Redump.org] ====
Redump.org is a trustworthy site dedicated to disc preservation across many different game consoles; its archives can be considered close to the game's cover in validity. When there's no good cover scans available for a title, this is the next most verifiable source for IDs available. The site itself also includes some helpful formatting, such as showing region flags next to the IDs in the database and listing game languages to pinpoint where European IDs had their release. Redump's main flaws are: a) it uses the same four character prefixes that game covers do, and b) it only includes GameCube games, no Wii data is available. On top of having only the four character prefixes, Redump doesn't document any publisher data like the cover does, so piecing together the last two characters is even more challenging. In conclusion, Redump is a great place to check outlier GameCube IDs, but it doesn't quite have enough information on its own overall to be a good main source.
 
==== Source #4: [http://www.gametdb.com/ GameTDB] ====
GameTDB is huge and contains almost all GameCube and Wii IDs and covers, along with some other miscellaneous data like game languages similar to redump. The problem though is that GameTDB is not as reliable. There are invalid entries on GameTDB, low resolution/wrong covers making it hard to check entry validity (___X__ region European IDs having ___P__ region covers as a consistent problem), questionable developer and publisher information, etc. The actual IDs though are generally correct, and this is the only source other than a personal dump or the NUS that contains full 6 character IDs like the Dolphin wiki uses. I would say the IDs from GameTDB are around 80% accurate, with the other 20% generally being flat-out missing IDs or false entries (for example wrong publisher code). Because this is pretty trustworthy but not perfectly so, I still recommend checking against one of the more reliable sources above before mindlessly posting IDs from GameTDB onto the wiki. However, in the case of a retail Wii game with no good cover scans for example, this becomes the most reliable source and there's no choice but to trust it until someone with the game comes to confirm/deny your addition.
 
Now this is a little tip to really help you get the best out of GameTDB. The way that the website is organized, every single ID has a set of links at the top that allow you to go to the next or previous ID alphabetically. At first this might seem like an oddity but it's one of the best features of the site. This will sometimes start you down trails of investigation that can lead to finding out that, for example, the wiki erroneously contains two separate pages for the same game. The thing about multi region releases is, they often don't share a name, so sometimes overseas if a publisher is not clear that it's the same title, databases can get confused and list them as separate. However the IDs don't lie (or at least they haven't so far to me anyways), and when you find two IDs with the same 3 character prefix but different region and name, with two different pages on the wiki, this generally means that it's really the same game in disguise. If you put in the time to prove that they're the same title, and can get someone else to agree with you, then feel free to merge the pages. The one flaw with the next/previous ID system is that GameTDB lists hacked IDs in along with their normal IDs, so for very popular titles like New Super Mario Bros. Wii for example, you'll have to go through a ton of page loads to get to the real IDs. In these situations, try and use their .txt inventory of all IDs instead, which you can get [http://www.gametdb.com/wiitdb.txt?LANG=ORIG here] (starts download).
 
==== Source #5: [http://www.gamefaqs.com/ GameFAQs] ====
I'm not going to lie. GameFAQs, on the whole, is a terrible place to get IDs. But as I do recommend looking into release data for games while you do this, you'll usually go to GameFAQs anyways as their release information is extremely good. The rule of thumb here is, never trust their IDs without a second source. The first three characters are all you can get from them; not only do they omit the publisher code again, they also just fill in the region code by the region of release, NOT what the ID actually is. So do NOT blindly trust the region codes from GameFAQs; instead check their uploaded covers instead.
 
=== How do I add an ID? ===
Adding a GameID to the wiki is rather simple on a technical level. You simply create a new page for the 6 character ID that redirects to the main page of the game that it's an ID for. That's it.
 
*Example: suppose you wanted to add ID "G12E34" for the game "Test 123". All you need to do is create a new page on the wiki titled exactly "G12E34" and as its contents write <code><nowiki>#REDIRECT [[Test 123]]</nowiki></code>.
 
Note that it takes a little while to catch up and reflect your IDs on the game's infobox, so don't freak out if it doesn't pop up right away. (If you're impatient, you can force the new IDs to show up with [https://www.mediawiki.org/wiki/Manual:Purge purge].)
 
Currently the wiki is undergoing an effort to try and understand some of the odd IDs that can appear. Examples of this would be games which have a different first three characters for different region releases (usually happens with Japanese versions), special Walmart/Best Buy release versions, V/H region IDs, etc. Once you get a feel for how IDs usually behave, whenever you spot an odd ID of this format, underneath your <nowiki>#REDIRECT</nowiki> line, feel free to add some details of what you know about that release. For example, often the X/Y/Z region IDs are just different language versions of the European release, so something that I'll do is I will change all the European IDs to add their languages, as that's usually the primary distinguishing factor. No need to get fancy or anything, just a one sentence little jot down like "Best Buy release" or "EN, FR language release" or something along those lines. It won't interfere with the function of the ID or with the redirect, UNLESS you add a second <nowiki>[[link]]</nowiki> to a page after the redirect. Don't do this, it breaks everything, so just write out the name of the page normally with no link.
 
=== Example workflow ===
I start out by figuring out the game's release dates, with a special focus on regions. GameFAQs is my first source for this information, using Wikipedia's writeups on different titles' development and developer/publisher histories for elusive games. Next I open another tab to GameTDB and search for the game's title. Once I find one for the console I want, I click only that one and ignore all other results for the same console. GameTDB has this wonderful feature which lets you click to the next ID or previous ID alphabetically; trusting this over the general search and the game's raw title can find you games which had releases with different names in different regions. Using this, I go as far back as I can and as far forward as I can before I reach different games, all in new tabs; this generally leaves me with 2-4 tabs of different IDs for each game. Then I do a quick sanity check, making sure that there aren't any IDs for regions the game wasn't released in, and expanding the covers on GameTDB I try and confirm as many of them against the codes on the back as possible. If they have an entry for GameCube that their covers don't substantiate, then I will check Redump for it; however, if there's a Wii ID with no back cover, then things get a bit more complicated, and I'll start scowering the internet to find it. Once I'm satisfied that the IDs are correct, I'll fix the release data on the wiki page (assuming it had any errors) and then start creating redirects for each ID, closing the tabs as I go. If there's an ID I absolutely cannot confirm, then I'll make a note of it on the talk page for the game and give a bit of details about the ID and why I can't confirm it.
 
The whole process on average, when things go smoothly, takes less than five minutes per game. If you really have to dig and use all of sources 2-5, start reading Wikipedia writeups, and search for outside second opinions (for example with elusive publishers), it can get up to around 20-30 minutes, but this is pretty rare, and in my opinion I think it's kind of fun in a way. Really the idea here is to understand the patterns of IDs and the limitations of your source. Once you fully grasp these things then you'll find it pretty easy to pick up on missing IDs or fake ones. Once again, don't be afraid to use the talk pages to ask about weird IDs, they exist for a reason.
 
=== Miscellaneous tips ===
==== [https://www.mediawiki.org/wiki/Extension:DynamicPageList_(third-party) DPL] ====
Because this is a wiki, there's a nearly Turing-complete scripting language and all its extensions available to find patterns in the wiki's IDs. The most useful of those extensions is DPL. DPL is the primary method used on the wiki for interacting with IDs both inside and outside of templates, and a familiarity with it is almost crucial. Take the following as a small example of what be done:
 
<pre>{{#dpl:titlematch=____28|ordermethod=lastedit|order=ascending|redirects=only|mode=inline|inlinetext=<nowiki>, </nowiki>|notcategory=Not GameID|notcategory=Unofficial GameID}}</pre>
 
This gives an output of:
 
{{#dpl:titlematch=____28|ordermethod=lastedit|order=ascending|redirects=only|mode=inline|inlinetext=<nowiki>, </nowiki>|notcategory=Not GameID|notcategory=Unofficial GameID}}
 
What this does, is finds all IDs on the wiki with publisher ID 28, and lists them from the last edited to the most recent. With this someone could easily go through and add an edit to each ID, and the same DPL would update during the process to keep the oldest edit on top.
 
== TODO ==
* Validate GameIDs and add missing ones using data from first party sources.
 
* Investigate digital IDs further.
 
* Finish game lists (pending on digital ID stuff).
 
* Make pages look nicer - consistency in general formatting.


== Trivia ==
== Trivia ==
As of today (August 20, 2017), I've handwritten the words "improve infobox" in an edit summary five hundred and two times since I made my account. Maybe someone will get a chuckle out of that.
On September 3-5, 2017, I got to watch [[User:Lucario]] and [[User:Kolano]] make a [https://wiki.dolphin-emu.org/index.php?title=Template%3AGlobalProblems%2Fsandbox&type=revision&diff=150359&oldid=149179 near-perfect forgery] of MediaWiki's default header because it [https://wiki.dolphin-emu.org/index.php?title=Template_talk%3AGlobalProblems%2FVirtual_Console&type=revision&diff=150376&oldid=149204 seemed like a better place to put a link].
On September 3-5, 2017, I got to watch [[User:Lucario]] and [[User:Kolano]] make a [https://wiki.dolphin-emu.org/index.php?title=Template%3AGlobalProblems%2Fsandbox&type=revision&diff=150359&oldid=149179 near-perfect forgery] of MediaWiki's default header because it [https://wiki.dolphin-emu.org/index.php?title=Template_talk%3AGlobalProblems%2FVirtual_Console&type=revision&diff=150376&oldid=149204 seemed like a better place to put a link].
{{#vardefine:u_xerxes_inputs|
{{rand|1000000|{{#time:z}}|17}} {{rand|1000000|{{#time:z}}|19}} {{rand|1000000|{{#time:z}}|23}} {{rand|1000000|{{#time:z}}|29}} {{rand|1000000|{{#time:z}}|31}} {{rand|1000000|{{#time:z}}|37}} {{rand|1000000|{{#time:z}}|41}} {{rand|1000000|{{#time:z}}|43}} {{rand|1000000|{{#time:z}}|47}} {{rand|1000000|{{#time:z}}|51}} {{rand|1000000|{{#time:z}}|53}} {{rand|1000000|{{#time:z}}|59}} {{rand|1000000|{{#time:z}}|61}} {{rand|1000000|{{#time:z}}|67}} {{rand|1000000|{{#time:z}}|71}}
}}Random numbers of the day: {{#var:u_xerxes_inputs}}
Bubble sort (expanded algorithm [https://pastebin.com/BNepxCn0 here]):
{{#while:|{{#if:{{#var:u_xerxes_inputs}}|{{#if:{{#regex:{{#var:u_xerxes_inputs}}|/^\s*\d?\d?,?\d?\d?\d?,?\d?\d?\d( {{!}}\s*$)/m}}|true}}}}|{{#vardefine:u_xerxes_membercount|{{#expr:{{#var:u_xerxes_membercount|0}}+1}}}}{{#vardefine:u_xerxes_member{{#var:u_xerxes_membercount}}|{{#regex:{{#var:u_xerxes_inputs}}|/^\s*\d?\d?,?\d?\d?\d?,?\d?\d?\d( {{!}}\s*$)/m}}}}{{#vardefine:u_xerxes_inputs|{{#regex:{{#var:u_xerxes_inputs}}|/^\s*\d?\d?,?\d?\d?\d?,?\d?\d?\d( {{!}}\s*$)/m|}}}}}}{{#vardefine:u_xerxes_sortend|{{#var:u_xerxes_membercount|0}}}}{{#vardefine:u_xerxes_tempcount|1}}{{#while:|{{#ifexpr:{{#var:u_xerxes_sortend}}>1|true}}|{{#vardefine:u_xerxes_wasswapped|false}}{{#while:|{{#ifexpr:{{#var:u_xerxes_tempcount}}<{{#var:u_xerxes_sortend}}|true}}|{{#ifexpr:{{#var:u_xerxes_member{{#var:u_xerxes_tempcount}}}}>{{#var:u_xerxes_member{{#expr:{{#var:u_xerxes_tempcount}}+1}}}}|{{#vardefine:u_xerxes_member{{#var:u_xerxes_tempcount}}|{{#var:u_xerxes_member{{#expr:{{#var:u_xerxes_tempcount}}+1}}}}{{#vardefine:u_xerxes_member{{#expr:{{#var:u_xerxes_tempcount}}+1}}|{{#var:u_xerxes_member{{#var:u_xerxes_tempcount}}}}}}}}{{#vardefine:u_xerxes_wasswapped|true}}}}{{#vardefine:u_xerxes_tempcount|{{#expr:{{#var:u_xerxes_tempcount}}+1}}}}}}{{#ifeq:{{#var:u_xerxes_wasswapped}}|false|{{#vardefine:u_xerxes_sortend|1}}|{{#vardefine:u_xerxes_sortend|{{#expr:{{#var:u_xerxes_sortend}}-1}}}}}}{{#vardefine:u_xerxes_tempcount|1}}}}{{#if:{{#var:u_xerxes_member1}}|{{#tag:ul|{{#while:|{{#var:u_xerxes_member{{#var:u_xerxes_tempcount}}}}|{{#tag:li|{{#var:u_xerxes_member{{#var:u_xerxes_tempcount}}}}}}{{#vardefine:u_xerxes_tempcount|{{#expr:{{#var:u_xerxes_tempcount}}+1}}}}}}}}}}

Revision as of 20:12, 24 October 2019

I test games and enjoy boring pedantic work. If I do something wrong/stupid please tell me on my discussion page or right here, I don't care where.

TMD scrape script

Adapted from User:PowerKitten's script to work on Linux.

Open a terminal, make a TMDs directory (mkdir ~/TMDs), then save the following script to your desktop in a text editor as curl.sh:

#!/bin/bash

cd ~/TMDs && curl -f http://ccs.cdn.shop.wii.com/ccs/download/00010001{41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}{30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}{30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}{41,42,43,44,45,46,47,48,49,4A,4B,4C,4D,4E,4F,50,51,52,53,54,55,56,57,58,59,5A}/tmd --output 00010001#1#2#3#4.tmd

Then in your terminal run sh ~/Desktop/curl.sh and it'll begin scraping the 850,000 possible IDs.

Make a copy of the ~/TMDs directory to ~/TMDcopy, and make another folder ~/renamedTMD. This is the C program I used to rename them all to Dolphin's 6-character IDs (pls no bully I wrote this, not portable, requires changing all the numbers and the username from "xerxes" to your username because I'm garbage):

#include <stdio.h>
#include <string.h>

char hexToChar(int n)
{
	switch (n)
	{
		case 0x0:
			return '0';
		case 0x1:
			return '1';
		case 0x2:
			return '2';
		case 0x3:
			return '3';
		case 0x4:
			return '4';
		case 0x5:
			return '5';
		case 0x6:
			return '6';
		case 0x7:
			return '7';
		case 0x8:
			return '8';
		case 0x9:
			return '9';
		case 0xA:
			return 'A';
		case 0xB:
			return 'B';
		case 0xC:
			return 'C';
		case 0xD:
			return 'D';
		case 0xE:
			return 'E';
		case 0xF:
			return 'F';
		default:
			return '0';
	}
	return '0';
}

int main()
{
	char fromfilename[100] = {0};
	strcpy(fromfilename, "/home/xerxes/TMDcopy/000100014A414A4A.tmd\0");
	
	char tofilename[100] = {0};
	strcpy(tofilename, "/home/xerxes/renamedTMD/JAJJ01.tmd\0");
	
	char buffer[2] = {0};
	
	FILE *file;
	
	int count = 1;
	
	int i, k, m, o;
	
	for (i = 0x41; i <= 0x5A; ++i)
	{
		fromfilename[29] = hexToChar(i / 16);
		fromfilename[30] = hexToChar(i % 16);
		for (k = 0x30; k <= 0x5A; ++k)
		{
			if (k == 0x3A)
			{
				k = 0x41;
			}
			fromfilename[31] = hexToChar(k / 16);
			fromfilename[32] = hexToChar(k % 16);
			for (m = 0x30; m <= 0x5A; ++m)
			{
				if (m == 0x3A)
				{
					m = 0x41;
				}
				fromfilename[33] = hexToChar(m / 16);
				fromfilename[34] = hexToChar(m % 16);
				for (o = 0x41; o <= 0x5A; ++o)
				{
					fromfilename[35] = hexToChar(o / 16);
					fromfilename[36] = hexToChar(o % 16);
					
					++count;
					
					if ((file = fopen(fromfilename, "rb")))
					{
						tofilename[24] = i;
						tofilename[25] = k;
						tofilename[26] = m;
						tofilename[27] = o;
						fseek(file, 0x198, SEEK_SET);
						fread(buffer, 1, 2, file);
						tofilename[28] = buffer[0];
						tofilename[29] = buffer[1];
						printf("%d\t\t%s\n", count, tofilename);
						fclose(file);
						rename(fromfilename, tofilename);
					}
				}
			}
		}
	}
}

With that done, this should rename and then move each TMD file to an appropriate "ID".tmd file with the ID used by Dolphin within the ~/renamedTMD folder. Then you're done!

Trivia

On September 3-5, 2017, I got to watch User:Lucario and User:Kolano make a near-perfect forgery of MediaWiki's default header because it seemed like a better place to put a link.