Search the Community
Showing results for tags 'reverse engineer'.
-
Background About a month ago I ordered a DSi off of eBay (it was only $40). When I got it I noticed there was something strange on it: "PWC2010"? I never heard about there being DSiWare for Pokemon? I consulted with other people on the internet and it turns out nobody else has heard it either. I tried to message the seller, but he said that he has no idea either (most likely he bought them in bulk as he was selling a lot of other models at the time). The mystery was just starting, a group of individuals from the DS(i) homebrew scene started to get to the bottom of this (me being invited despite my lack of knowledge due to being the one who found it), here's what we were able to figure out: The Investigation Begins... The hardware The system itself is appears to be a normal black DSi, nothing about it is different from that of a stock model The casing has some minor scratches and such, and is missing the original stylus. On the front side where the camera is, there are two faded silhouettes of what look to be rectangular stickers The system was formatted when I got it and it didn't come with an SD card (this will become a problem later on) The Software The apps included are: Flipnote Studios, DSi + Internet, PWC2010 Rule Check Tool, PWC2010 Log Viewer, and PokemonBW2 Rule Check Tool. All of which were preinstalled to the NAND as there is no way to access "Data Mangement" to move them to a SD card. At first, the only app that would boot was Log Viewer as both of the Rule Check Tools would just crash and return back to the menu. It was later revealed the apps were looking for 3 files at the root of an SD card before being able to boot. Through observations we were able to get some insights on what each of the 3 mystery apps do: PWC2010 Rule Check Tool From what the name implies, this tool must have been used for the Pokemon World Championship (PWC) in 2010 The app looks for 3 file on the SD card: regulation.bin, regulation.cfg, and rule.prd. By making 3 dummy files full of garbage data and naming them as the files listed before, we were able to get it to boot, after which we were greeted with a lovely message: The weird thing is, Black and White were used for the 2011 PWC, not 2010. This could imply that the app was a carry over from a previous tool used the year before. Luckily, I just so happen to have a copy of Black. Putting in the correct cartridge displays the message "No problems found" and ask if you want to save the results. Through testing we were able to figure out how to get past this screen as it turns out "No problems found" also acts as a default message, if something does fail one of the checks it will display what the error was. It's possible to make it check both the party Pokemon and Pokemon in the Battle Box by editing regulation.cfg file. PWC2010 Log Viewer Log viewer shows the results saved from Rule Check, it shows the player's username and gives a technical description of each Pokemon in the party (stats, friendship, exp, moveset, etc.). By pressing "X" it will do the same thing but for the Battle Box instead. PokemonBW2 Rule Check Tool Exactly the same as PWC2010, expect looks for the Black2/White2 cartridge instead More Technical Details Looking into the game's files, we were able to extract the messages displayed by Rule Check: Rule Check Messages regulation.cfg is, as the name suggests, a config file. Through dumb luck I was able to figure out this much: Offset 0x00: checks party Offset 0x01: checks battlebox Offset 0x05: turns on cart access Offset 0x0C: save to livematch.dat These values have to be "turned on" meaning the value is set to '1' If offset 0x05 isn't turned on then it will say that the cart isn't inserted. If offset 0x00 or 0x01 aren't turned on but 0x05 is, then it will say that it passed all checks (probably the default message) The files saved from Rule Check and are viewed in Log Viewer are named "logTYYMMDD.dat" and "logBYYMMDD.dat" (YYMMDD is the date, so something like Oct. 31 2019 would be 191031). LogT is for the results from the party (T=Team?) and logB is from the Battle Box. Through great efforts, users Epicpkmn11 and edo9300 were both able to reverse-engineer these files before we were able to figure out how to save it: Google Sheets regulation.bin appears to handle simple checks like invalid number of Pokemon in party, level caps, and duplicate items/Pokemon rule.prd may be used for more advance checks like invalid movesets and banned Pokemon/items Conclusion As of right now, interest has been dying as people began shifting to their own personal projects. For the past 3 weeks nobody has found anything new and I'm left to try and figure it out on my own. The problem is I know very little about NDS development and how the Pokemon games work in a technical level, which is why I'm turning here for help. We still know very little about regulation.bin and rule.prd, which are believe to be two key factors in order to get Rule Check to work properly, and without the original SD card we are left in the dark. It's possible that rule.prd is somehow linked to the hex values found in Pokemon (movesets, lvls, type, etc.), but can't really determine where and what to look for We don't know how much is relied on the files or if certain checks are programmed Any insights, suggestions, resources, or tips are greatly accepted!
-
If you want the quick way to do this, here is a link to the Sword/Shield part of the Un-Nerf Compendium containing the patch and how to apply it :) Hey all! Once again, we have made some breakthroughs into ROM research, including removing Battle Tower restrictions and giving permanence / persistence to the Crowned Zacian / Crowned Zamazenta / Eternatus Eternamax formes! Ethical Disclaimer: Research was AI-assisted, but verified by me. Two small `.pchtxt` code mods for Pokémon Sword & Shield, for personal/offline use on emulator (built and confirmed on Eden v0.2.0, game v1.3.1). Both are tiny IPSwitch text patches - no ROM redistribution, you supply your own dump. Sword and Shield offsets included. --- 1) FormePersist - Crowned Zacian / Crowned Zamazenta / Eternamax Eternatus stay set Set the forme in PKHeX and it now persists through save + reload with no held item, and shows correctly on the team menu. SwSh treats these as battle-only formes and resets them to base on load; this forces the game's `IsBattleOnlyForme()` detector to return 0 so the reset paths never fire. It's the Gen-8 analogue of the Gen-6/7 Mega/Primal persistence patches. 2) NoTowerClause - Battle Tower species + item clause removed Lets you enter the Battle Tower with **two of the same Pokémon** and/or **two of the same held item**. SwSh's Tower has no banned-species list - the species clause and item clause are the entire restriction - so this lifts it fully. All other entry checks are untouched. --- **Install (Eden/Yuzu):** drop the title-id folder into `…\eden\load\`, e.g. `…\load\0100ABF008968000\NoTowerClause\exefs\noclause.pchtxt` (Sword) / `…\load\01008DB008C2C000\…` (Shield), then Properties -> Add-Ons -> tick it. (Make sure the GDB stub is off.) Patch contents (v1.3.1): FormePersist - `IsBattleOnlyForme` -> return 0: ``` Sword @nsobid-4628A512… Shield @nsobid-DBDDD138… 013AE910 00008052 013AE940 00008052 013AE914 C0035FD6 013AE944 C0035FD6 013AEC68 1F2003D5 013AEC98 1F2003D5 ``` NoTowerClause - force the per-slot duplicate-species & duplicate-item flags to 0: ``` Sword Shield 014F9654 08008052 014F96C4 08008052 014F965C 19000014 014F96CC 19000014 014F96DC 09008052 014F974C 09008052 014F96E4 1B000014 014F9754 1B000014 ``` Two Eden gotchas if you roll your own: `@enabled` is mandatory (without it Eden applies zero bytes), and use `@flag offset_shift 0x100`. Offsets are for v1.3.1 (build IDs above); a different game update needs them re-derived. Single-player/offline use - don't take these into pvp battle without your opponent's permission. (Bonus in the same folder: `DynamaxCandyAll`, a one-liner that lets you feed Dynamax Candy to the three legendaries. Actually letting them *Dynamax* is a RomFS personal-table flag - `CanNotDynamax` - i.e. the pkNX edit, not a code patch.) Here's the article explaining the in-depth reverse-engineering behind removing Battle Tower restrictions. And here's the deep dive into permanent formes for Gen 8. -IS2L *If there's any additional discoveries for Sword and Shield, I will just addend this thread so that I don't clog up the rest of the forums. Will make the title of this post reflect that.*
-
- gen8
- battle tower
-
(and 3 more)
Tagged with: