Well, many thanks, but i don't really like taking other's work. I prefer to find things my way, because i *need* to know/learn how to do things on my own. If someone gives me a full made thing, good, but that way i can't learn the techniques needed to do a similar thing.
I see! Well, if im not mistaken, all ARM instructions (even bx) can be conditional, right? Can i use that routine and make a version of it, in ARM, for emerald? (i know that its going to be slower because of the 16bit bus, but would it be worth a shot, or not?
About gen3, i hack it since 2007 xD Asm, though, only 2 years from now, and still have a lot to learn.
the arm cpu doesn't do division, right? so.. if someone was to throw:
u32 doDiv(u32 x, u32 y)
at the cpu, what would it do? short answer: it would do what you're seeing in that routine, with a lot of wasted cycles. It's also in thumb, which means it's going to be even bulkier. same thing for the modulus routine right under it. they're huge.
that's as opposed to the divmod in dppt, hgss, and bw that is done in arm, is very fast, and returns both the result and the remainder.
basically, gamefreak could've done a lot better in that regard. the size and speed of the division and modulus routines in emerald are both good examples of why you shouldn't just use division in arm and should actively look for another way.
e: dunno how much you know about pokemon generation in gen3, but stuff like this is what causes methods 2 and 4 to happen.
Hey Bond! Hi! I saw in the notable breakpoints of project pokemon that you are the one who added most of the offsets.
I came here to ask something to you, related to Pokemon Emerald (U).
I know that the routine at 082E7B68 is a mathematical operation, but i can't guess what it is. Could you please enlighten me?