Jump to content

Locate some ASM for me plz?


zahlman
 Share

Recommended Posts

As many of you know, I'm a programmer, but I don't really have meaningful experience with reversing ASM.

Anyone happen to know offhand where the routines are for damage calculations? I have no doubt about my ability to determine what they do currently or how to alter them (I have an idea for a hack) but I also have no real idea of how to go about locating them in order to make the changes. Ideally I'd like to replicate this for 6, 7 and 8.

TIA

Link to comment
Share on other sites

I have some notes on battle calculations in my doc (I'm not going to tell you read it). Here's a copy-paste from it:

08028fb0-9022

-sub 08028f84 prepares the place for battle data

-sub 08029028 stores battle unit to r0 and r1

-sub 080290b8 (makes attack data)

-sub 0802903c (r0=ptr to attacker,r1=ptr to defender) returns 1 if weapon effect is 3

--08017424: loads weapon effect

--080290b8(r0 = attacker, r1 = defender)

---08029114(returns 2 if hero, else 1)

----08029128 flags battle data and returns 1 if hero, else returns 0

---080294d8(r0 = attacker, r1 = defender)

----080294e4-ee flags attack data if defender counter attacks

08029234 r0 = PtA, r1 = PtD

stores attack related data to 0203a3d8

08029324 r0 = PtA, r1 = PtD

checks for triangle attack

08029264 r0 = PtA

determines chances?

080285a8 r0 = hit, r1 = 1

return 1 if hit, else 0

08000e84

08000e04

08000be0

0802857c r0 = crit, r1 = 0

08000e60

08000e04

0802939c r0 = PtA -> r5, r1 = PtD -> r7

does weapon effects

08017424 loads weapon effect to r0

0802857c

08016730 lessens weapon uses

returns 0 or 1 in r0

0203a50c read before, in and after normal battle by

-08028fc4<- 08029024

-08028fdc<- 08029024

-08029012<- 08029024

-080290d2<- 08029110

-080290e6<- 08029110

-080292d6<- 0802931c

-080293ae<- 080293d0

-08029490<- 080294d4

-08029498<- 080294d4

-080294e6<- 08029554

-0802952a<- 08029554

-0802953c<- 08029554

-08029546<- 08029554

-0802955a<- 08029568

-0802955e<- 08029568

And writes:

-08028fa0 <- 08028fac

-0802955e <- 08029568

-0802954a only if enemy dies <- 08029554

found with searching:

-0800ea98

--used in sub 0800e948

-08029144

--used in sub 08029128

---used before(when battle stats appear) and during battle, for each attack

-08029290

--used in sub 08029264

---used before(when battle stats appear) and during battle, for each attack

-080292D0

--used in sub 08029264

---used before(when battle stats appear) and during battle, for each attack

-08029398

--used in sub 08029324

---used before(when battle stats appear) and during battle, for each attack

-08029434

--used in sub 0802939c

---used before(when battle stats appear) and during battle, for each attack

-0802a660

--used in sub 0802a5ec

---used before healing, both items and staves

-0802a8a4

--used in sub 0802a83c

-0802a8fc

--used in sub 0802a8a8

-0802a970

--used in sub 0802a8a8

-0802ab9c

--used in sub 0802ab90

-0802abb0

--used in sub 0802aba0

---used in the begging of the phase if unit heals on fortress

-0802c3a4

--used in sub 0802c324

---used when healing with physic

-0802c7c8

--used in sub 0802c76c

---used when unit get's hit by stat staff

-0802c9f0

--used in sub 0802c994

-0802ca5c

--used in sub 0802c9f8

---used when healing with elixir

-0803289c

--used in sub 08032858

-08032900

--used in sub 080328a0

---used in the beginning of the turn, if unit is poisoned

-0803296c

--used in sub 08032904

0800e948

-08053428

-08017d34

-0801725c

-0802a4b4

-0802a560

-080283dc

-08028410

-08016764

-08028f84

--loads 0203a50c

-0802ab90

-0802aba0

-08029a70

-08053434

-08015328

-080180ec

-08026574

-0806baf0

-0806bfe0

-0802a3b0

-08004760

0802a83c

0802a8a8

0802ab90

0802c994

08032858

08032904

0203a4f0 found in:

-08028FA8

--used in sub 08028f84

-08029E70

--used in sub 08029e30

-0802A01C

--used in sub 08029ff8

-0802A4B0

--used in sub 0802a494

-0802A810

--used in sub 0802a810

-0802A8F8

--used in sub 0802a8a8

-0802CC60

--used in sub 0802cbac

-0802CD20

--used in sub 0802cc88

-08052CF4

--used in sub 08052c9c

-08053224

--used in sub 08053216

-08067DD4

--used in sub 08053216

-0806EDA0

--used in sub 0806ed28

-0806EDF4

--used in sub 0806edac

-0806F044

--used in sub 0806efc4

-0806F0D0

--used in sub 0806f050

-0806F180

--used in sub 0806f0dc

-0806F230

--used in sub 0806f190

-0806F2B0

--used in sub 0806f23c

-0806F3A0

--used in sub 0806f30c

-080711A0

--used in sub 08071174

-083FC170-370

It doesn't directly tell the offset you are looking for, but since it's in a file labeled "makes battle data.txt", I'd assume it's there somewhere.

Link to comment
Share on other sites

Those are for FE7? (I'm guessing that a lot of the code will be shared, at least between 7 and 6, so I can search for it once I've found some reasonably unique patterns of opcodes)

Edited by zahlman
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...