summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2016-08-18 12:07:30 -0400
committerProjectRevoTPP <projectrevotpp@hotmail.com>2016-08-18 12:07:30 -0400
commit4926608100eb07801876c0a53bfc1ee41d010ec0 (patch)
treefa697c34ed50a134050916e22d40577fa0b9afa0
parent5fef0da5ab7e001aab3f082380898144b5e90122 (diff)
begin dissassembling contest AI bins and adding macros
-rwxr-xr-xasm/macros/contest_ai_script.s228
-rw-r--r--data/contest_ai_scripts.s37
2 files changed, 261 insertions, 4 deletions
diff --git a/asm/macros/contest_ai_script.s b/asm/macros/contest_ai_script.s
new file mode 100755
index 000000000..7df40ef4b
--- /dev/null
+++ b/asm/macros/contest_ai_script.s
@@ -0,0 +1,228 @@
+@ contest AI macro research
+
+
+ .macro score score
+ .byte 0x00
+ .byte \score
+ .endm
+
+@ 01
+@ 02
+@ 03
+
+ .macro contest_04 addr
+ .byte 0x04
+ .byte \param
+ .4byte \addr
+ .endm
+
+@ 05
+@ 06
+@ 07
+@ 08
+@ 09
+@ 0A
+@ 0B
+@ 0C
+@ 0D
+
+ .macro contest_0E addr
+ .byte 0x0E
+ .byte \param
+ .4byte \addr
+ .endm
+
+@ 0F
+@ 10
+@ 11
+@ 12
+@ 13
+@ 14
+@ 15
+@ 16
+@ 17
+@ 18
+@ 19
+@ 1A
+@ 1B
+@ 1C
+@ 1D
+@ 1E
+@ 1F
+
+ .macro contest_20 param addr
+ .byte 0x20
+ .byte \param
+ .4byte \addr
+ .endm
+
+@ 21
+@ 22
+@ 23
+@ 24
+@ 25
+@ 26
+@ 27
+
+ .macro contest_28 param addr
+ .byte 0x28
+ .byte \param
+ .4byte \addr
+ .endm
+
+@ 29
+@ 2A
+@ 2B
+@ 2C
+@ 2D
+@ 2E
+@ 2F
+@ 30
+@ 31
+@ 32
+@ 33
+@ 34
+@ 35
+@ 36
+@ 37
+@ 38
+@ 39
+@ 3A
+@ 3B
+@ 3C
+@ 3D
+
+ .macro contest_3E param addr
+ .byte 0x3E
+ .byte \param
+ .4byte \addr
+ .endm
+
+@ 3F
+@ 40
+@ 41
+
+ .macro contest_42 addr
+ .byte 0x42
+ .4byte \addr
+ .endm
+
+@ 43
+@ 44
+
+ .macro contest_45 addr
+ .byte 0x45
+ .4byte \addr
+ .endm
+
+@ 46
+
+ .macro contest_47 addr
+ .byte 0x47
+ .4byte \addr
+ .endm
+
+@ 48
+@ 49
+@ 4A
+@ 4B
+@ 4C
+@ 4D
+@ 4E
+@ 4F
+@ 50
+@ 51
+@ 52
+@ 53
+@ 54
+@ 55
+@ 56
+@ 57
+@ 58
+@ 59
+@ 5A
+@ 5B
+@ 5C
+@ 5D
+@ 5E
+@ 5F
+@ 60
+@ 61
+@ 62
+@ 63
+@ 64
+@ 65
+@ 66
+@ 67
+@ 68
+@ 69
+@ 6A
+@ 6B
+@ 6C
+@ 6D
+@ 6E
+@ 6F
+@ 70
+@ 71
+@ 72
+@ 73
+@ 74
+@ 75
+@ 76
+@ 77
+@ 78
+@ 79
+@ 7A
+@ 7B
+@ 7C
+
+ .macro contest_7D param addr
+ .byte 0x7D
+ .byte \param
+ .4byte \addr
+ .endm
+
+@ 7E
+@ 7F
+
+ .macro contest_80 addr
+ .byte 0x80
+ .4byte \addr
+ .endm
+
+ .macro end
+ .byte 0x81
+ .endm
+
+@ 82
+@ 83
+@ 84
+@ 85
+@ 86
+@ 87
+@ 88
+@ 89
+@ 8A
+@ 8B
+@ 8C
+@ 8D
+@ 8E
+@ 8F
+@ 90
+@ 91
+@ 92
+@ 93
+@ 94
+@ 95
+@ 96
+@ 97
+@ 98
+@ 99
+@ 9A
+@ 9B
+@ 9C
+@ 9D
+@ 9E
+@ 9F
+
+@ adding more if I find more macros greater than 9F.
diff --git a/data/contest_ai_scripts.s b/data/contest_ai_scripts.s
index 0dadd457e..6ef4b3377 100644
--- a/data/contest_ai_scripts.s
+++ b/data/contest_ai_scripts.s
@@ -1,4 +1,5 @@
.include "asm/macros.s"
+ .include "asm/macros/contest_ai_script.s"
.include "constants/constants.s"
.section script_data, "aw", %progbits
@@ -39,18 +40,46 @@ gUnknown_081DC118:: @ 81DC118
.4byte Unknown_081DCAF3
.incbin "baserom.gba", 0x001dc198, 0xE7 @ unreferenced?
Unknown_081DC27F:
- .incbin "baserom.gba", 0x001dc27f, 0x2C @ figured out
+ contest_28 0x03 AI_end_081DC27F
+ contest_3E 0x01 AI_score1_081DC27F
+ contest_3E 0x02 AI_score2_081DC27F
+ contest_3E 0x03 AI_score3_081DC27F
+ contest_3E 0x04 AI_score4_081DC27F
+ end
+AI_score1_081DC27F:
+ score 0xFB
+ end
+AI_score2_081DC27F:
+ score 0xF1
+ end
+AI_score3_081DC27F:
+ score 0xEC
+ end
+AI_score4_081DC27F:
+ score 0xE7
+ end
+AI_end_081DC27F:
+ end
Unknown_081DC2AB:
.incbin "baserom.gba", 0x001dc2ab, 0x9D
Unknown_081DC348:
- .incbin "baserom.gba", 0x001dc348, 0x7F @ figured out
+ .incbin "baserom.gba", 0x001dc348, 0x7F
Unknown_081DC3C7:
.incbin "baserom.gba", 0x001dc3c7, 0x417
Unknown_081DC7DE:
- .incbin "baserom.gba", 0x001dc7de, 0x1D @ figured out
+ contest_20 0x02 AI_contest7D_081DC7DE
+ contest_20 0x03 AI_contest7D_081DC7DE
+ contest_20 0x04 AI_contest7D_081DC7DE
+ end
+AI_contest7D_081DC7DE:
+ contest_7D 0x7D AI_end_081DC7DE
+ score 0x0A
+ end
+AI_end_081DC7DE:
+ end
Unknown_081DC7FB:
.incbin "baserom.gba", 0x001dc7fb, 0x251
Unknown_081DCA4C:
.incbin "baserom.gba", 0x001dca4c, 0xA7
Unknown_081DCAF3:
- .incbin "baserom.gba", 0x001dcaf3, 0x1 @ figured out
+ end