DS Auto Trainer Maker (DSATM) v4.3.4

Changelog
------------------------------------------------------------------------------------
Fixed a typo that caused pointer (type B codes) to load to the wrong register



Old versions
v4.3.3
------------------------------------------------------------------------------------
Fixed *the other* bug with E codes that contained a bx opcode

v4.3.2
------------------------------------------------------------------------------------
Fixed a bug with E codes that contained a bx opcode

v4.3.1
------------------------------------------------------------------------------------
Fixed a bug with D7 codes

v4.3
------------------------------------------------------------------------------------
Added an option for the DSTT -- It seems the DSTT can/will overwrite the memory around the default RAM address that is used for other carts (0x23fe000) and it causes it to crash hard. If you are going to be using a DSTT then check this option!

v4.2.1
------------------------------------------------------------------------------------
Small bugfix in type E codes

v4.2
------------------------------------------------------------------------------------
Changed the way the game gets rebuilt -- now reads/writes in 10M chunks to avoid problems on systems with low RAM

Built in support for ARM7 fixing -- place donor.nds or donor.bin (arm7.bin renamed) into the same directory as DSATM

Removed some code that was no longer needed

v4.1
------------------------------------------------------------------------------------
Fixed another bug in the C loop

Added more code to detect if the binaries aren't getting written properly

Added a search for the real end of the game to prevent breaking download play

v4.0.1
------------------------------------------------------------------------------------
Fixed a bug in C/D1 loops

v4.0
------------------------------------------------------------------------------------
AR codes are converted directly into ARM instructions so no external assembler is needed anymore. Also it eliminates the need for keeping track of labels that was needed for ASM generation which will make it less prone to bugs.

ASM source embedding is removed now

ARM 9 hooking is removed as it wasn't ever really useful anyway -- ARM 7 hooking works 100% of the time

v3.9
------------------------------------------------------------------------------------
Patching/rebuilding of games is now done internally for an immense improvement in speed and compatibility with all games - ndstool is no longer needed

DEADBEEF padding only pads the arm7.bin now

ARM9 embedding is removed - it won't be missed

v3.8
------------------------------------------------------------------------------------
Added checks for ndstool.exe and arm-eabi-as.exe

Fixed a bug with Type F codes

v3.7.1
------------------------------------------------------------------------------------
Fixed a bug with Type C codes

v3.7
------------------------------------------------------------------------------------
(M)astercode support added (autopatching only)

Fixed type D0 bug when it wasn't the last line in a code or immediately followed by a D2 line

Added support for an E code asm hack when the address to hack != 0x23FE074

v3.6
------------------------------------------------------------------------------------
Autopatching now ignores any of the Advanced settings (hook into, embed into, address, execution cycles) while in Simple Mode

Fixed a problem with type E codes that resulted in ASM errors

v3.5
------------------------------------------------------------------------------------
Changed the Autopatching method so it will work with carts that blindly execute the ARM7 at 0x2380000 (EZV and possibly others)

Internal changes to prevent bugs in the future with the binary placement/execution

Suppression of ini saving message when patching in Simple mode

v3.4
------------------------------------------------------------------------------------
Simple/Advanced modes added

Better keyhandling in the slowmo function

Execute every x cycles added

v3.3
------------------------------------------------------------------------------------
Multiple codes on a line (XML formatting) support added

v3.2
------------------------------------------------------------------------------------
Added support for double nested pointer codes (multiple type B codes in a row)

Fixed a bug that resulted in the pointer address being reset to 0x0 before the end of a code

v3.1
------------------------------------------------------------------------------------
Fixed bugs that occured when the last opened file wasn't located in the same directory

v3.0
------------------------------------------------------------------------------------
Added support to comment out codes when first character in the line is '/'

Fixed a bug with the trainer.asm generation when the code was too big

ASM buffers made even larger

v2.9
------------------------------------------------------------------------------------
Fixed type D4 codes

ASM buffers made larger

v2.8
------------------------------------------------------------------------------------
Added more support for the type C codes when used without type B

Added more support for type DC codes

Order of functions is changed -- only the arm bins are extracted before the trainer is assembled which makes it less time consuming if there are assembly errors

v2.7
------------------------------------------------------------------------------------
Fixed a minor source code bug that only affected the enable/disable function

Fixed a bug resulting from not having a blank line at the end of the cheat file

v2.6
------------------------------------------------------------------------------------
Added multi-hooking so the cheat function gets executed by multiple IRQ calls

Fixed a bug with type D3~DC codes - now uses r6 exclusively

Added full support for nested ifs (types 3~A)

Internal improvement: cleaned up code

v2.5
------------------------------------------------------------------------------------
Added type E codes (including AR hack codes that use 023FE074 012FFF11)

v2.4
------------------------------------------------------------------------------------
Fixed an oversight in code that forced 0x23FE000 for the trainer address

Fixed type DC and 5 codes

v2.3
------------------------------------------------------------------------------------
Asm code added to copy the appropriate number of bytes in autopatch mode

Code buffer made larger to prevent crashing when using many cheat codes

DX pointer codes fixed (hopefully for good)

v2.2
------------------------------------------------------------------------------------
Autopatching defaults to RAM address 0x23FE000 which will work fine for most games

Bug fixed that caused an overflow on long cheat code labels

Bug fixed that prevented text from being entered for the name when saving to the .ini

v2.1
------------------------------------------------------------------------------------
Autopatching added! Should work with nearly every game

v2.0.1
------------------------------------------------------------------------------------
Save ini function fixed so it actually uses the new values..

Bug fixed in key parsing routine that falsely removed Up

Status list is now open by default

v2.0
------------------------------------------------------------------------------------
Now a GUI app!

Slowmo and Enable/Disable keys config added

Minor bug fixes

v1.4
------------------------------------------------------------------------------------
Added slowmo option

v1.3
------------------------------------------------------------------------------------
Added recommended RAM placement to make it even easier to decide where to place the trainer function

Fixed some bugs in the RAM dump scanning

Changed some text for better readability

v1.2
------------------------------------------------------------------------------------
Added a feature to create DEADBEEF padding to the game
*The arm7 and arm9 bins are padded with redundant DEADBEEF values so it is easy to tell what parts of the game will never be cleared!

Added the feature to append asm source code instead of cheats. 
*Drop the source file with extension .asm onto the program instead of .txt

v1.2
------------------------------------------------------------------------------------
Fixed a minor mistake that lead to a huge bug when using the arm9 to embed

v1.0
------------------------------------------------------------------------------------
Added ini support (load and save)

Minor bug fixes

v0.9
------------------------------------------------------------------------------------
Fixed type F code

Optimized type 6-9 codes

Half word values had to be forced to be stored in long words because of a (very annoying) bug (bad immediate value for half-word offset) in the assembler so now trainers of any size should assemble right

v0.8
------------------------------------------------------------------------------------
Fixed types C0, D6-D8

Fixed type D codes following a pointer code (type B)

optimized types 0-8, B

v0.7
------------------------------------------------------------------------------------
Fixed a few bugs including direct loading of byte values that were put into the source as decimals and caused assembler errors

Added an optimization to eliminate reloading of a pointer address that was just tested with the code line above it (ex: 62123456 00000000 / B2123456 00000000)

D3-DC code types are being worked on so there might be bugs in them still

v0.6
------------------------------------------------------------------------------------
More internal improvements to eliminate redundant code

Code types C, D4, D5, D6, D7, D8 added
Supported code types: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D0, D1, D2, D3, D4, D5, D6, D7, D8, DC, F

v0.5
------------------------------------------------------------------------------------
Many internal improvements to eliminate redundant code

optimization for data storage (ex: direct loading of a byte to a register despite the code being for a long/half word)

v0.4
------------------------------------------------------------------------------------
Minor bug fixes

Code types D3, DC, F added
Supported code types: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, D0, D1, D2, D3, DC, F

v0.3
------------------------------------------------------------------------------------
Added support for multiple dump files to narrow down the search for free space to place the trainer function.

Minor bug fixes

Code type B added for pointer support
Supported code types: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, D0, D1, D2

v0.2
------------------------------------------------------------------------------------
New code types added
Supported code types: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, D0, D2

v0.1
------------------------------------------------------------------------------------
DSATM is useful now! It can handle code types 0,1,2 and can optionally have the code added to enable/disable all cheats (L+R+A to enable, L+R+B to disable).

I will be working on the conditional codes (types 6, 9, etc) and pointer codes (type B) next and hope to have them completed soon.

Please send your compatibility or bug reports to me!
