Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
Move table hack ported to Emerald!
Browse files Browse the repository at this point in the history
Attack adder now installs the move table hack for Emerald.
  • Loading branch information
Gamer2020 committed Apr 21, 2016
1 parent fcf12f1 commit 3716bb3
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 25 deletions.
Binary file modified .vs/GBAPokemonGameEditor/v14/.suo
Binary file not shown.
5 changes: 4 additions & 1 deletion GBAPokemonGameEditor/AttackAdder.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 56 additions & 14 deletions GBAPokemonGameEditor/AttackAdder.vb
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ Public Class AttackAdder

'Only limiter in ROM patch

WriteHEX(LoadedROM, &HD75FC, "000000000000")
WriteHEX(LoadedROM, &HD75FC, "00000000000013E0")

'Move Table hack stuff
If CheckBox1.Checked And GetString(GetINIFileLocation(), header, "MoveTableHack", "False") = "False" Then
Expand Down Expand Up @@ -991,12 +991,17 @@ Public Class AttackAdder

'Only limiter in ROM patch

WriteHEX(LoadedROM, &H14E504, "000000000000")
WriteHEX(LoadedROM, &H14E504, "00000000000013E0")

'contest limiters

WriteHEX(LoadedROM, &HD8F0C, "0000000000000000")
WriteHEX(LoadedROM, &HDE83A, "00000000000000E0")

'Move Table hack stuff
If CheckBox4.Checked And GetString(GetINIFileLocation(), header, "MoveTableHack", "False") = "False" Then

'Converts the table to the New format
'Converts the table to the new format

Dim pokeloopcounter As Integer = 1
Dim AttackTable As Integer = Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber)
Expand Down Expand Up @@ -1051,9 +1056,13 @@ Public Class AttackAdder
CurAttacksLooper = CurAttacksLooper + 1
End While

If CurAttacksLooper = 0 Then
CurPokeAttacksBuff = CurPokeAttacksBuff & "0100" & "01"
End If

'deletes the old moves

If CheckBox2.Checked Then
If CheckBox3.Checked Then
WriteHEX(LoadedROM, Int32.Parse(CurLvlUpAttPointer, System.Globalization.NumberStyles.HexNumber), MakeFreeSpaceString((CurAttacksLooper * 2)))
End If

Expand All @@ -1070,24 +1079,57 @@ Public Class AttackAdder

'Write the routines

Dim routine1 As String = "294A4D46AB009D1828688078261C94465446A04221D0321C2B1C107801301070107841004018196840188178FF2901D100202AE0A142F0D11B4B49468C00E118164A1078096846008019401880785146161C9C46231C884216D1114A60461918307809684700C0194018417809020078084310803078013030701188404600F011F80004000C0090009801B038BC9846A146AA46F0BC02BC0847C046E8440202E24402022C910608" & ReverseHEX(Hex(AttackTable + &H8000000))
Dim routine2 As String = "1948A600801900688178FF2920D00023154837183868C018827851468A4217DC41780902007801430C1C4046009300F017F80E49009B884204D14046211C00F011F8009B03333868C0188078FF28DFD101B038BC9846A146AA46F0BC02BC084740910608D0940608" & ReverseHEX(Hex(AttackTable + &H8000000)) & "FFFFC046"
Dim routine3 As String = "00253C4EB9008A19136898780591FF2866D0914604936A0052190499501883780399171C0135AC468B424EDC00246946098843781B0200781843814211D005982C4946186B463D1C02330134032C08DC3068401941780902007808431A888242F2D1042C31D1002454451CDA49460868C019417809020078084302990A88824211D005991B4A8E18029B3D1C02330134544508DA3068401941780902007808431A888242F2D154450FD1504601300006000E82466200029952184C462068C019417809020078084310806546132D07DC494608686900491909188878FF289AD1504606B038BC9846A146AA46F0BC02BC0847C046" & ReverseHEX(Hex(AttackTable + &H8000000))
Dim routine1 As String = "494689001148401800680F4E063637787900C9194318997854468C4203D0FF290BD00137F4E7084A01373770597809021878084310800249084702480047C046F593060803940608E2440202" & ReverseHEX(Hex(AttackTable + &H8000000))
Dim routine2 As String = "8178FF22914225D01202FF32914600235800C0181949891909684718B8785446A04217DC7978387809020143404600930C1C00F017F8FF25009B484504D14046211C00F013F8009B0133032178188078A842DDD101B038BC9846A146AA46F0BC01BC0047F0B581B0024F3847F0B5024F3847C04645910608D3940608" & ReverseHEX(Hex(AttackTable + &H8000000))
Dim routine3 As String = "00253D4EB9008A19136898780591FF2868D09146049303226A4304995018171C017843781B020B43807803990135AC4688424BDC002468460188181C814211D005982D4946186B463D1C02330134032C08DC3068281801784078000208431A888242F2D1042C31D1002454451CDA4946086838180178407800020843029A1288824211D005991C4A8E18029B3D1C02330134544508DA3068281801784078000208431A888242F2D154450FD1504601300006000E82466200029952184C4620683818017840780002084310806546132D08DC4946086803216943091808888878FF2898D1504606B038BC9846A146AA46F0BC02BC0847C046" & ReverseHEX(Hex(AttackTable + &H8000000))
Dim routine4 As String = "F0B557464E464546E0B48FB0061C00208246301C41210022524B00F0A1F80004040C301C382100224E4B00F099F80006000E0C90CE204000844201D1002087E00025A4000E946C46291C0D31301C0022444B00F085F8208002340135032DF3DD0025414B0E9AD11808688078FF286ED089466C4608340D944946086803226A43101880780C9C211C171C0135AC46884252DC002448460068017840780002084369460988814211D00E982F4946186B463D1C02330134032C08DC3068281801784078000208431A888242F2D1042C33D1002454451EDA49460868381801784078000201430D980288081C02A9824211D00E9A1D4816180B1C3D1C02330134544508DA3068281801784078000208431A888242F2D154450FD1504601300006000E824662000D9CA218494608683818017840780002084310806546132D07DC4A4610680321694309188878FF2894D150460FB038BC9846A146AA46F0BC02BC08471847C04619A50608" & ReverseHEX(Hex(AttackTable + &H8000000))
Dim routine5 As String = "0321484319684018817801480047C04695930608"
Dim routine6 As String = "F0B50E1C0004002500241049800B401802689078FF2812D0131C291C481C0006050E490089191A78587800021043088003330134132C02DC9878FF28EDD1281CF0BC02BC0847C046" & ReverseHEX(Hex(AttackTable + &H8000000))

Dim routine1offset As String = ""
Dim routine2offset As String = ""
Dim routine3offset As String = ""
Dim routine4offset As String = ""
Dim routine5offset As String = ""
Dim routine6offset As String = ""

routine1offset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(routine1) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))

WriteHEX(LoadedROM, routine1offset, routine1)

WriteHEX(LoadedROM, &H693B0, "18490847")
WriteHEX(LoadedROM, &H69414, ReverseHEX(Hex((routine1offset) + &H8000001)))

routine2offset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(routine2) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))

WriteHEX(LoadedROM, routine2offset, routine2)

WriteHEX(LoadedROM, &H692A0, "00490847" & ReverseHEX(Hex((routine2offset) + &H8000001)))

routine3offset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(routine3) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))

WriteHEX(LoadedROM, &H69350, "1FD0294C")
WriteHEX(LoadedROM, &H69400, "000000000000000000000000000000000000000000000000000000000000000000000000")
WriteHEX(LoadedROM, routine3offset, routine3)

WriteHEX(LoadedROM, &H6E100, "00490847" & ReverseHEX(Hex((routine3offset) + &H8000001)))

WriteHEX(LoadedROM, &H6935A, routine1)
routine4offset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(routine4) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))

WriteHEX(LoadedROM, routine4offset, routine4)

WriteHEX(LoadedROM, &H69300, "000000000000000000000000000000000000000000000000")
WriteHEX(LoadedROM, &H6E25C, "004B1847" & ReverseHEX(Hex((routine4offset) + &H8000001)))

WriteHEX(LoadedROM, &H69298, routine2)

WriteHEX(LoadedROM, &H6E1F8, "000000000000000000000000")
routine5offset = SearchFreeSpaceFourAligned(LoadedROM, &HFF, ((Len(routine5) / 2)), "&H" & GetString(GetINIFileLocation(), header, "StartSearchingForSpaceOffset", "800000"))

WriteHEX(LoadedROM, routine5offset, routine5)

WriteHEX(LoadedROM, &H69364, "8078C046C046C046C046")
WriteHEX(LoadedROM, &H69394, "FF29")
WriteHEX(LoadedROM, &H69372, "5446C046")
WriteHEX(LoadedROM, &H693A8, "081CC046")
WriteHEX(LoadedROM, &H6938C, "00490847" & ReverseHEX(Hex((routine5offset) + &H8000001)))

WriteHEX(LoadedROM, &H6E100, routine3)
WriteHEX(LoadedROM, &H6E204, routine6)


' 'Enable the hack in the ini file.
Expand Down
2 changes: 1 addition & 1 deletion GBAPokemonGameEditor/PokemonAdder.vb
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Public Class PokemonAdder

Dim FillerAttackTable As String

FillerAttackTable = ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber) + (252 * 4), 4)
FillerAttackTable = ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber) + (1 * 4), 4)

PokemonAttackDataBuffer = ReadHEX(LoadedROM, Int32.Parse((GetString(GetINIFileLocation(), header, "PokemonAttackTable", "")), System.Globalization.NumberStyles.HexNumber), ((GetString(GetINIFileLocation(), header, "NumberOfPokemon", "")) + 0) * 4)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>DoipQvPtgYOLBQm06fRIqg82FVc=</dsig:DigestValue>
<dsig:DigestValue>ggxRa+loqA5EdosTau0E4l/JSq8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1957376">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1958912">
<assemblyIdentity name="PokemonGameEditor" version="3.6.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>mtyJm3jpJf3EzR7RQN5RHFhkzsY=</dsig:DigestValue>
<dsig:DigestValue>W/ej/Hz0tYpVPZM977eJc+xXtFc=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/bin/Debug/PokemonGameEditor.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>DoipQvPtgYOLBQm06fRIqg82FVc=</dsig:DigestValue>
<dsig:DigestValue>ggxRa+loqA5EdosTau0E4l/JSq8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1957376">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1958912">
<assemblyIdentity name="PokemonGameEditor" version="3.6.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>mtyJm3jpJf3EzR7RQN5RHFhkzsY=</dsig:DigestValue>
<dsig:DigestValue>W/ej/Hz0tYpVPZM977eJc+xXtFc=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>DoipQvPtgYOLBQm06fRIqg82FVc=</dsig:DigestValue>
<dsig:DigestValue>ggxRa+loqA5EdosTau0E4l/JSq8=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.exe
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1957376">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PokemonGameEditor.exe" size="1958912">
<assemblyIdentity name="PokemonGameEditor" version="3.6.0.0" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>mtyJm3jpJf3EzR7RQN5RHFhkzsY=</dsig:DigestValue>
<dsig:DigestValue>W/ej/Hz0tYpVPZM977eJc+xXtFc=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified GBAPokemonGameEditor/obj/x86/Debug/PokemonGameEditor.pdb
Binary file not shown.

0 comments on commit 3716bb3

Please sign in to comment.