Skip to content
Clément Gallet edited this page Jul 15, 2014 · 11 revisions

During battle startup, the game loads each item a character has equipped to handle stats, status, etc. For a given character and equipment slot, function C2/0F9A loads the corresponding item in memory. In case of a weapon slot, if the other slot is empty or holds a weapon, it will designate the other slot as the attacking slot. That is not what we want so for a glitched weapon to work, the other slot must be non-empty and must not hold a weapon.

In function C1/9D95, weapon graphics and sound are loaded, with A being the weapon id + 1:

C1/9D95:	8D6A62  	STA $626A       (A contains the weapon id + 1)
C1/9D98:	C220    	REP #$20
C1/9D9A:	0A      	ASL A
C1/9D9B:	0A      	ASL A
C1/9D9C:	0A      	ASL A
C1/9D9D:	AA      	TAX 
C1/9D9E:	7B      	TDC 
C1/9D9F:	A8      	TAY 
C1/9DA0:	7B      	TDC 
C1/9DA1:	E220    	SEP #$20
C1/9DA3:	AD8A61  	LDA $618A
C1/9DA6:	F010    	BEQ $9DB8	(Battle takes the branch; Special doesn't)
...
C1/9DB8:	BF00E4EC	LDA $ECE400,X	(Weapon graphics and sound)
C1/9DBC:	996B62  	STA $626B,Y
C1/9DBF:	E8      	INX 
C1/9DC0:	C8      	INY 
C1/9DC1:	C00800  	CPY #$0008
C1/9DC4:	D0F2    	BNE $9DB8

Here is a dump of $ECE400 - $ECE6E8:


$626D: Graphic palette
$626F: Another palette data
$6270: Flags (launched weapons?)
$6271: Sound played by the animation
$6272: Not used...?

$626B $626C $626D $626E $626F $6270 $6271 $6272    (id) Weapon
--------------------------------------------------------------------
  24    24    23    08    36    00    33    00     (FF) Empty
  27    27    18    3E    36    00    94    00     (00) Dirk
  27    27    18    01    36    00    94    00     (01) MithrilKnife
  23    23    19    01    36    00    94    00     (02) Guardian
  26    26    19    3E    36    00    94    00     (03) Air Lancet
  27    27    18    01    36    00    94    00     (04) ThiefKnife
  27    27    21    3E    37    00    94    00     (05) Assassin
  23    23    28    3E    35    00    94    00     (06) Man Eater
  29    29    18    01    32    00    94    00     (07) SwordBreaker
  29    29    19    01    31    00    94    00     (08) Graedus
  5A    5A    18    05    33    00    94    00     (09) ValiantKnife
  29    29    18    01    36    00    A4    00     (0A) MithrilBlade
  29    29    18    01    36    00    A4    00     (0B) RegalCutlass
  2B    2B    20    01    37    00    A4    00     (0C) Rune Edge
  2C    2C    29    02    34    00    A4    00     (0D) Flame Sabre
  2C    2C    22    03    32    00    A4    00     (0E) Blizzard
  2A    2A    20    01    37    00    A4    00     (0F) ThunderBlade
  29    29    18    01    36    00    A4    00     (10) Epee
  29    29    2A    01    36    00    A4    00     (11) BreakBlade
  1E    1E    29    04    35    00    A4    00     (12) Drainer
  2B    2B    18    01    36    00    A4    00     (13) Enhancer
  29    29    19    01    32    00    A4    00     (14) Crystal
  5B    5B    18    01    36    00    A4    00     (15) Falchion
  1F    1F    2A    00    36    00    A4    00     (16) Soul Sabre
  1F    1F    1D    00    36    00    A4    00     (17) Ogre Nix
  1E    1E    20    02    37    00    A4    00     (18) Excalibur
  61    61    2A    05    32    00    A4    00     (19) Scimitar
  5C    5C    20    01    37    00    A4    00     (1A) Illumina
  1E    1E    20    00    37    00    A4    00     (1B) Ragnarok
  36    36    1F    00    78    04    A4    00     (1C) Atma Weapon
  2D    2D    2A    3E    36    00    A8    00     (1D) Mithril Pike
  2E    2E    2A    3E    36    00    A8    00     (1E) Trident
  2D    2D    18    3E    36    00    A8    00     (1F) Stout Spear
  2E    2E    29    3D    34    00    A8    00     (20) Partisan
  2E    2E    22    3D    32    00    A8    00     (21) Pearl Lance
  2D    2D    20    05    37    00    A8    00     (22) Gold Lance
  5D    5D    2B    05    33    00    A8    00     (23) Aura Lance
  60    60    1D    05    32    00    A8    00     (24) Imp Halberd
  22    21    18    3E    36    00    94    00     (25) Imperial
  22    21    18    3E    36    00    94    00     (26) Kodachi
  22    21    29    3E    35    00    94    00     (27) Blossom
  1C    1C    18    03    33    00    94    00     (28) Hardened
  1C    1C    22    03    32    00    94    00     (29) Striker
  1C    1C    20    03    37    00    94    00     (2A) Stunner
  1C    1C    19    06    36    00    2E    00     (2B) Ashura
  1C    1C    18    06    36    00    2E    00     (2C) Kotetsu
  1C    1C    18    01    36    00    2E    00     (2D) Forged
  1C    1C    22    05    32    00    2E    00     (2E) Tempest
  1D    1D    18    06    36    00    2E    00     (2F) Murasame
  1D    1D    1D    00    33    00    2E    00     (30) Aura
  1D    1D    22    04    32    00    2E    00     (31) Strato
  1D    1D    20    03    37    00    2E    00     (32) Sky Render
  28    28    19    09    30    00    8C    00     (33) Heal Rod
  28    28    2A    09    36    00    8C    00     (34) Mithril Rod
  28    28    2D    09    34    00    8C    00     (35) Fire Rod
  28    28    2C    09    32    00    8C    00     (36) Ice Rod
  28    28    25    09    37    00    8C    00     (37) Thunder Rod
  28    28    2A    09    36    00    8C    00     (38) Poison Rod
  28    28    2C    08    33    00    8C    00     (39) Pearl Rod
  28    28    2A    08    36    00    8C    00     (3A) Gravity Rod
  5F    5F    20    08    36    00    8C    00     (3B) Punisher
  28    28    29    08    35    00    8C    00     (3C) Magus Rod
  16    16    25    04    37    00    94    00     (3D) Chocobo Brsh
  18    18    19    04    32    00    94    00     (3E) DaVinci Brsh
  17    17    25    04    35    00    94    00     (3F) Magical Brsh
  17    17    19    04    30    00    94    00     (40) Rainbow Brsh
  2F    2F    18    0C    18    81    5B    00     (41) Shuriken
  30    30    18    0D    18    81    5B    00     (42) Ninja Star
  2F    2F    2E    0C    18    81    5B    00     (43) Tack Star
  19    19    19    08    19    00    DA    00     (44) Flail
  15    15    1C    34    1C    82    28    00     (45) Full Moon
  19    19    19    08    36    00    DA    00     (46) Morning Star
  0F    0F    18    35    18    82    56    00     (47) Boomerang
  15    15    24    34    24    82    28    00     (48) Rising Sun
  1A    1A    1D    06    32    00    33    00     (49) Hawk Eye
  20    20    26    08    36    00    33    00     (4A) Bone Club
  1A    1A    25    06    34    00    33    00     (4B) Sniper
  0F    0F    22    35    36    82    5B    00     (4C) Wing Edge
  10    10    18    0A    36    81    5B    00     (4D) Cards
  13    13    18    0B    36    81    5B    00     (4E) Darts
  11    11    19    0A    36    81    5B    00     (4F) Doom Darts
  14    14    19    0B    36    81    5B    00     (50) Trump
  12    12    1E    0B    36    81    5B    00     (51) Dice
  12    12    1E    0B    36    81    5B    00     (52) Fixed Dice
  5E    5E    18    3D    36    00    8B    00     (53) MetalKnuckle
  33    32    19    07    36    00    8B    00     (54) MithrilClaw
  31    31    19    07    31    00    8B    00     (55) Kaiser
  5E    5E    2A    3D    36    00    8B    00     (56) Poison Claw
  33    32    18    3D    33    00    8B    00     (57) Fire Knuckle
  33    32    28    07    34    00    8B    00     (58) DragonClaw
  31    31    20    07    37    00    8B    00     (59) Tiger Fangs

--------------------- End of weapons -------------------------------

$626B $626C $626D $626E $626F $6270 $6271 $6272    (id) Weapon
--------------------------------------------------------------------
  37    37    1F    00    78    04    A4    00     (5A) Buckler
  38    38    1F    00    78    03    A4    00     (5B) Heavy Shld
  41    41    00    08    36    00    33    00     (5C) MithrilShld
  41    41    00    00    36    00    A4    00     (5D) Gold Shld
  41    41    00    01    36    00    94    00     (5E) Aegis Shld
  41    41    00    02    34    00    A4    00     (5F) Diamond Shld
  41    41    00    03    32    00    A4    00     (60) Flame Shld
  41    41    00    04    32    00    A4    00     (61) Ice Shld
  41    41    00    05    32    00    A4    00     (62) Thunder Shld
  41    41    00    06    32    00    A4    00     (63) Crystal Shld
  41    41    00    07    34    00    A4    00     (64) Genji Shld
  41    41    00    09    30    00    8B    00     (65) TortoiseShld
  41    41    00    3D    36    00    8B    00     (66) Cursed Shld
  41    41    00    3E    36    00    8B    00     (67) Paladin Shld
  41    41    00    6C    36    00    33    00     (68) Force Shld
  41    41    00    6D    36    00    A4    00     (69) Leather Hat
  41    41    00    6E    36    00    94    00     (6A) Hair Band
  41    41    00    63    3A    02    91    00     (6B) Plumed Hat
  41    41    00    64    AB    02    1D    00     (6C) Beret
  41    41    00    65    18    02    1B    00     (6D) Magus Hat
  41    41    00    66    18    02    49    00     (6E) Bandana
  41    41    00    67    18    02    49    00     (6F) Iron Helmet
  41    41    00    68    C9    00    3D    00     (70) Coronet
  41    41    00    69    78    00    41    00     (71) Bard's Hat
  41    41    00    6A    01    02    1C    00     (72) Green Beret
  41    41    00    6B    78    02    D4    00     (73) Head Band
  41    41    00    6F    78    00    79    00     (74) Mithril Helm
  41    41    00    70    3C    02    45    00     (75) Tiara
  41    41    00    71    BB    02    45    00     (76) Gold Helmet
  41    41    00    72    18    02    49    00     (77) Tiger Mask
  41    41    00    73    39    02    A3    00     (78) Red Cap
  41    41    00    74    A2    02    1C    00     (79) Mystery Veil
  41    41    00    75    78    02    A3    00     (7A) Circlet
  41    41    00    76    01    02    82    00     (7B) Regal Crown
  41    41    00    77    E1    02    F0    00     (7C) Diamond Helm
  41    41    00    7A    E7    02    33    00     (7D) Dark Hood
  41    41    00    00    00    02    00    00     (7E) Crystal Helm
  01    01    01    01    01    01    01    01     (7F) Oath Veil
  01    01    02    01    01    02    02    01     (80) Cat Hood
  01    01    01    01    01    01    01    01     (81) Genji Helmet
  01    01    01    01    01    01    01    01     (82) Thornlet
  01    01    04    03    03    03    01    01     (83) Titanium
  04    01    04    04    01    00    04    04     (84) LeatherArmor
  01    01    01    01    01    01    01    02     (85) Cotton Robe
  01    01    03    02    01    01    01    01     (86) Kung Fu Suit
  01    01    01    04    04    01    04    01     (87) Iron Armor
  02    01    02    01    01    01    01    02     (88) Silk Robe
  02    02    01    01    01    01    01    03     (89) Mithril Vest
  01    02    01    01    01    01    01    02     (8A) Ninja Gear
  02    01    01    01    01    01    01    01     (8B) White Dress
  01    01    01    02    01    01    02    01     (8C) Mithril Mail
  01    01    01    01    01    01    01    01     (8D) Gaia Gear
  01    01    01    01    01    01    01    01     (8E) Mirage Vest
  01    04    03    03    01    01    04    01     (8F) Gold Armor
  04    04    01    00    02    04    01    01     (90) Power Sash
  01    01    01    01    01    04    01    01     (91) Light Robe
  02    01    01    01    01    01    01    01     (92) Diamond Vest
  04    01    04    01    02    01    01    01     (93) Red Jacket
  01    01    02    02    02    01    01    01     (94) Force Armor
  01    02    01    01    01    02    01    01     (95) DiamondArmor
  01    03    01    01    02    01    01    02     (96) Dark Gear
  02    01    01    01    01    01    01    01     (97) Tao Robe
  01    01    01    01    04    01    01    02     (98) Crystal Mail
  04    01    01    01    01    03    01    01     (99) Czarina Gown
  04    01    02    01    02    01    02    01     (9A) Genji Armor
  01    01    01    04    01    01    04    01     (9B) Imp's Armor
  02    01    01    01    04    00    01    01     (9C) Minerva
  01    01    01    01    01    01    04    02     (9D) Tabby Suit
  01    01    02    02    04    01    01    01     (9E) Chocobo Suit

---------------- Beginning of glitched weapons ---------------------

$626B $626C $626D $626E $626F $6270 $6271 $6272    (id) Weapon
--------------------------------------------------------------------
  FF    16    A9    FF    DE    FF    E8    37     (9F) Moogle Suit
  BF    E8    C7    7F    E8    F7    FE    EF     (A0) Nutkin Suit
  FF    FA    FD    E1    33    A0    F3    FF     (A1) BehemothSuit
  EF    3B    DF    BF    26    90    F3    FF     (A2) Snow Muffler
  9F    E8    FF    86    10    3F    FD    FF     (A3) NoiseBlaster
  FD    FE    ED    F9    3A    68    46    08     (A4) Bio Blaster
  FF    F9    FF    E2    FA    89    E8    21     (A5) Flash
  A3    EF    A9    AF    4F    47    44    18     (A6) Chain Saw
  FD    FF    F7    EF    FF    DF    FF    57     (A7) Debilitator
  09    00    97    EF    2F    E7    9F    5F     (A8) Drill
  3F    68    98    A1    30    FC    FF    E9     (A9) Air Anchor
  FF    F9    C2    E3    84    CE    91    E5     (AA) AutoCrossbow
  42    FE    42    28    FC    FF    F8    FF     (AB) Fire Skean
  E0    FF    80    FF    FF    F6    46    DE     (AC) Water Edge
  1F    4F    7F    D2    FF    3E    0E    F6     (AD) Bolt Edge
  15    EC    0A    F9    13    EB    F9    F9     (AE) Inviz Edge
  19    11    01    33    01    03    FF    07     (AF) Shadow Edge
  FE    39    01    D7    CF    8F    BF    9F     (B0) Goggles
  FF    3F    E3    7F    3F    25    20    46     (B1) Star Pendant
  09    26    80    FC    FF    FA    BF    FF     (B2) Peace Ring
  F8    FE    D0    FF    E2    57    69    FE     (B3) Amulet
  FF    F8    FB    E2    FF    45    E2    8A     (B4) White Cape
  BC    7F    2C    B0    50    70    F0    E0     (B5) Jewel Ring
  E0    63    09    FF    F9    FE    F2    FD     (B6) Fairy Ring
  CC    F3    90    EF    FF    70    8F    E0     (B7) Barrier Ring
  1F    8E    81    F8    C7    FF    34    0B     (B8) MithrilGlove
  6B    14    FF    00    FE    00    FF    12     (B9) Guard Ring
  02    1C    1D    00    FF    C0    3F    FB     (BA) RunningShoes
  00    FF    B2    19    02    FD    1C    E3     (BB) Wall Ring
  25    FF    D3    AB    27    47    AF    1F     (BC) Cherub Down
  CF    8F    FB    5F    3F    E1    00    3F     (BD) Cure Ring
  7F    0F    FF    1F    D2    CF    01    3F     (BE) True Knight
  4D    11    41    30    FD    68    09    FC     (BF) DragoonBoots
  A2    EF    F9    47    EF    03    5B    51     (C0) Zephyr Cape
  FC    F4    F8    FF    FA    87    EC    47     (C1) Czarina Ring
  CD    2B    2A    77    FF    B3    4E    F7     (C2) Cursed Ring
  6D    A3    D3    2D    8F    FF    FB    FC     (C3) Earrings
  F7    F8    CF    F0    BF    C0    FF    7F     (C4) Atlas Armlet
  80    9E    00    3D    00    73    00    FF     (C5) Blizzard Orb
  E0    E0    D2    D3    F1    FE    0A    C2     (C6) Rage Ring
  FF    BA    3E    F7    2D    F4    B4    66     (C7) Sneak Ring
  F8    FF    E0    1F    D3    2C    FF    00     (C8) Pod Bracelet
  FD    00    FF    C1    00    C2    00    CF     (C9) Hero Ring
  00    9F    00    FF    AA    D8    D3    32     (CA) Ribbon
  DC    39    A6    1D    FF    29    23    8D     (CB) Muscle Belt
  CB    D3    47    7B    F7    FF    F9    07     (CC) Crystal Orb
  F1    0F    FB    07    FB    07    FF    E7     (CD) Gold Hairpin
  1F    47    3F    CF    3F    EF    1F    FB     (CE) Economizer
  FF    7F    26    E0    F2    FF    E4    FE     (CF) Thief Glove
  A8    FF    FD    60    FC    44    F7    8D     (D0) Gauntlet
  DB    03    FB    A1    0F    42    28    F9     (D1) Genji Glove
  FE    F6    F8    EC    FF    F0    D0    E0     (D2) Hyper Wrist
  AD    27    FA    6E    7D    FF    FD    7F     (D3) Offering
  FB    FD    F4    E3    E0    DD    FF    E2     (D4) Beads
  E8    C8    C8    F0    B1    C0    42    BF     (D5) Black Belt
  80    84    00    0B    00    1F    B7    02     (D6) Coin Toss
  37    FF    00    F7    B3    FD    FD    EF     (D7) FakeMustache
  FF    28    FF    1F    1E    21    AF    46     (D8) Gem Box
  3E    CE    9E    BF    22    4F    00    0D     (D9) Dragon Horn
  02    1F    B2    11    FE    FD    01    D8     (DA) Merit Award
  0A    E9    FE    67    C7    31    73    FF     (DB) Memento Ring
  BA    2E    84    2E    95    5F    6A    36     (DC) Safety Bit
  FF    AE    59    9F    00    A6    18    F2     (DD) Relic Ring
  0C    FF    BD    40    39    C0    63    80     (DE) Moogle Charm
  4E    81    FF    8E    01    87    6F    F7     (DF) Charm Bangle
  AF    CF    1F    7F    0F    5F    3F    1F     (E0) Marvel Shoes
  1F    BF    7F    CB    01    F3    DF    3F     (E1) Back Guard
  E2    08    4E    41    FC    FE    F1    FD     (E2) Gale Hairpin
  FF    12    F3    A5    E2    83    E3    27     (E3) Sniper Sight
  ED    D7    6F    23    F6    D0    10    FE     (E4) Exp. Egg
  FA    09    C8    F0    FF    B3    C0    4F     (E5) Tintinabar
  80    8B    97    C7    FE    FF    8F    FD     (E6) Sprint Shoes
  7C    82    7F    82    7B    05    7F    EB     (E7) Rename Card
  7E    AD    1F    20    C0    80    DB    07     (E8) Tonic
  FD    01    53    03    82    00    81    00     (E9) Potion
  43    00    FF    D7    E8    BD    CA    E5     (EA) X-Potion
  1F    7B    DF    FF    BE    76    48    F8     (EB) Tincture
  F4    D4    FD    E0    EE    B8    0A    BF     (EC) Ether
  00    3F    D7    02    F8    07    F4    FF     (ED) X-Ether
  0B    E0    1F    6D    3B    53    D4    91     (EE) Elixir
  FF    93    A4    A6    C6    C4    30    30     (EF) Megalixir
  97    FF    0B    E7    19    F3    00    DF     (F0) Fenix Down
  20    93    FF    6C    A7    58    C6    39     (F1) Revivify
  30    CF    03    FF    FC    01    FE    F4     (F2) Antidote
  94    D8    12    B9    FF    F4    92    F5     (F3) Eyedrop
  93    99    61    4B    5B    FF    DF    DF     (F4) Soft
  B7    09    03    A1    07    4B    FF    07     (F5) Remedy
  73    0F    97    6F    67    9F    C7    F3     (F6) Sleeping Bag
  3F    8F    50    01    26    D8    FC    D1     (F7) Tent
  F8    E3    FF    FE    C8    F4    91    F6     (F8) Green Cherry
  30    3A    62    EF    1E    DD    62    F8     (F9) Magicite
  30    0B    F3    FC    E7    EF    F8    DF     (FA) Super Ball
  E0    BD    F7    02    87    00    95    FF     (FB) Echo Screen
  0C    4C    2D    4C    FA    02    98    BF     (FC) Smoke Bomb
  FF    13    0D    BC    A2    7B    4E    B2     (FD) Warp Stone
  FE    FE    A7    01    FD    00    F6    01     (FE) Dried Meat

A glitch can happen here, when trying to jump to a subroutine based on $6270:

C1/C269:	AD7062  	LDA $6270		(from only C1/C1E0)
C1/C26C:	297F    	AND #$7F
C1/C26E:	0A      	ASL A
C1/C26F:	AA      	TAX 
C1/C270:	7C73C2  	JMP ($C273,X)

Pointers to code

C1/C273:	86C2		(00)    	
C1/C275:	99C2		(01)
C1/C277:	7DC2    	(02)	
C1/C279:	12C3    	(03)
C1/C27B:	73C3    	(04)

Here is where you will jump depending on the value of $6270:

$6270 % 128   Jump function
05            Function C1/02A9
07            Function C1/8D7B
09            Function C1/A260
0F            Function C1/8D02
10            Function C1/7B0E
1F            Function C1/6A38
20            Function C1/02C9
21            Function C1/0990
25            Function C1/8013
26            Function C1/BD09
29            Function C1/0290
2C            Function C1/496F
31            Function C1/64EE
33            Function C1/BD64
38            Function C1/7EBD
3D            Function C1/74CE
3E            Function C1/DE9D
3F            Function C1/9D74
40            Function C1/74EE
42            Function C1/D8D0
44            Function C1/BD7A
45            Function C1/6A35
47            Function C1/459D
4B            Function C1/05A9
4E            Function C1/7B0F
4F            Function C1/2060
50            Function C1/BC89
53            Function C1/AA0A
57            Function C1/DAAA
58            Function C1/08A0
5D            Function C1/64FE
5F            Function C1/9D6A
61            Function C1/4E9D
67            Function C1/CEBD
68            Function C1/9D74
6B            Function C1/E874
6F            Function C1/FA20
70            Function C1/35BD
73            Function C1/6A45
74            Function C1/1A1A
76            Function C1/A26A
77            Function C1/0202
7A            Function C1/3C20
7B            Function C1/A9C2
7C            Function C1/8D05
7D            Function C1/7B0E
7E            Function C1/0F8D
7F            Function C1/607B

Case to case behavior

Clone this wiki locally