There's a lot of resources available that use a 4x wide sprite to render the pokemon normal and shiny, front and back, all as a single image. People want to be able to import this all at once. Now they can.
As a side effect, pokemon will always show their normal palette as their first palette now, with the shiny palette always being second.
This only really works with single-frame sprites for now, so Ruby/FireRed, not Emerald.
The behavior of the += version of `add` is undefined if both registers are low registers. In this case, we need to patch the instruction to replace it with the more traditional 3 register version: a = a + b.
* Don't clear an anchor to the start of the code we're writing, it may be important. We may later care about keeping pointers that point one byte into the thumb code as well, since the low bit is set to 1 for branch-exchange.
* Have ldr instructions write word aligned values even when starting from a 4N+2 offset.
base-16 values can be entered by prefixing with 0x or $.
base-16 values will be output by the script parser if the argument is suffixed with |h
All other values will now naturally decompile to base-10.
UseShellExecute defaults to false in .Net Core. Give it an explicit value of 'true' to allow windows to run non-executable files. In this case, we want to look for whatever program is registered to run the *.gba file, which will very much not be an executable.
commit f6c725ba8a696552f4821955ea4d822d7e152b98
cleanup
commit 35b85c2d4849671aef541013b355ca963b348fd9
Get the application running
Everything seems to work now. But the dll/pdb/xml files can't be placed in another directory, making the directory 11 files wider than it was before. I don't know how to fix this.
commit 6804101c94e537954fb7d81c630dfb4eda8157ed
Remove old config files
.net core doesn't need these
commit 6450c023b6fce109cda1c8167c87d7e20c0a9813
Fix warnings
commit 51f6580e51b8cc40da9e3cab6c6fbe998dac4a2d
Add WPF csproj
* Debug.Listeners doesn't exist. Internet recommends Trace.Listeners.
* Requires explicit main method. Adding a main method that launches the App.
* Generating documentation files
commit 61d234d50f2d8bcb560096ad512cf160b566bc98
Fix upgrade test path
commit d4ee80a7ef2a459c3c1bb6108fb3dfdeefbc327a
Add missing files from test resources directory
commit 7ac8022346d24b6f4af4cd34e0a6e957cc6a8d39
Adding custom AutoImplement for net6
AutoImplement works in .net 4, but needs to work in .net standard. Updating the project files to use net6 assemblies, and updating AutoImplement to be a net6 project.
Date: Mon Nov 15 21:52:35 2021 -0600
Adding old versions of HM.Core and HM.Test for comparisons during the upgrade
commit 7c4c79c9b6f3a8e09962269a68b3515b8b39bbb6
Initial attempt at adding test project
This doesn't work yet: autoimplement cannot generate source from HexManiac.Core, since HexManiac.Core is now net6 and AutoImplement is net4.
Date: Mon Nov 15 21:19:20 2021 -0600
HexManiac.Core in net6
The constants are more picky than when we first wrote this test: constants will fail to load unless all the values in the rom are correlated in the way the constants expect. Update the test to match this requirement.
Removing the leftmost node from a fully black subtree, the tree needs to balance itself using reds in the right subtree. The four cases are outer-red child and inner-red child for a red parent and a black parent. Each of the 4 cases results in a different balanced tree in the end, and none require further up-propagation.
Critical Hit Special Attack moves were doing more damage than they were supposed to after move expansion. After looking into it, this was because one instruction `mov r0, #29` followed by `ldrsb r0, [r1, r0]`, was getting seen as an instruction pair that needed to be updated. But this is wrong for two reasons:
(1) A previous `mov r1` instruction should have stopped the algorithm before it reached this pair. The code has been fixed so that changes to the register from the original `add` instruction will now stop looking for this mov/ldrsb pair.
(2) The instruction we were trying to match was for moving #2 into a register, but we matched #29. Updated the code to expect the mov instruction to end with the constant, rather than just contain it.
I also updated the method documentation to explain how it handles a register source that starts with a !: in that case, it doesn't care if the target instruction contains the register, but it _does_ stop searching if the value in that register changes.
Tested in FireRed. This changes exactly one byte, which we verified through experimentation is the instruction that should not have been changed in the first place. So all is well now.
This allows us to have parameters from toml metadata passed in to the process of how we create formatted runs. In this change, we add the ability for trainer teams to _not_ scale the IV value from a number 0-255 to a number 0-31. This is important since some patches depend on using the entire byte, rather than just the top 5 bits.
Since the model is now in charge of the FormatRunFactory. the model can decide to use different types of factories for different roms. This lets us turn different features on/off between the pokemon games and other games. We may use this capability later.
When running the Copy Command, don't modify the metadata by adding automatic names to the things being copied. We should still do that for cut, and the names should be added to the clipboard. But don't put the names in the actual rom. This should help reduce noise in the 'misc' anchor folder.