Interesting hack. Assuming it is not a lack of controls forcing you to double up then gun game/weapon master a like for Castlevania could be amusing.
Anyway so you found no fluff in the potion subroutine you can optimise to give space to also tickle the equipped weapon value while it is doing its thing. You also reckon you don't want to do something like hook a potion count/health value to change at the same time (or within a vblank/hblank's gap). Instead hook the potion routine to jump (branch tending to be a preferred term in GBA world), fix whatever you overwrote for the jump, do your bit, and return just after where it left off to continue on with life.
For the sake of others playing along at home branch with link is what C coding would put in place before calling a function and returning later, why also calling a function within a function is not a great look as you then rely on the hardware (good luck there) or compiler to make sure everything gets back to where it needs to be. You would also want to make sure you are in the right mode (the GBA's ARM7 has two instruction sets it flicks between to either optimise for speed, size or difficulty of operation
"080DADA4" is a location in RAM/memory bus, but as the whole cart is visible in said memory at once if you subtract 08000000 from that value you get the location in the cart (some will tell you to ignore the 08 at the start, and that works for the vast majority of games which are under 16 megabytes and thus don't use the higher location. Technically there are further locations where the cart is visible and you might have a pointer/memory location listed somewhere, these are rare though).
http://problemkaputt.de/gbatek.htm#armopcodesbranchandbranchwithlinkbblbxblxswibkpthttp://problemkaputt.de/gbatek.htm#thumbopcodesjumpsandcallshttp://www.coranac.com/tonc/text/asm.htmThough scrolling down a bit on
http://problemkaputt.de/gbatek.htm#arminstructionsummary to get to the jumps section might be clearer
Instruction Cycles Flags Expl.
B{cond} label 2S+1N ---- PC=$+8+/-32M
BL{cond} label 2S+1N ---- PC=$+8+/-32M, LR=$+4
That is to say the B(ranch) instruction takes 2S+1N cycles (
http://problemkaputt.de/gbatek.htm#armcpuinstructioncycletimes ) to execute and causes the program counter (the register R15) to change to current location (what $ stands for)plus 8 +/- the value held (it is a maths based one with a signed value rather than absolute location for this instruction, for ).
BL (branch with link) does the same but also sets the link register (the register R14) to current location plus 4, ostensibly so you can say go to the location the link register has later on and be at the next instruction when you land (as opposed to landing back on the jump in a nice potential infinite loop which is what would have happened if the +4 had not been there)
Anyway does the unmodified game execute something at 0802974E during normal operations? As you presumably picked it for what looked like a good reason then should be easy enough to set a break on execute (or maybe just read) for that location and using a potion to have it hopefully pop up and say this location saw something was executed (and in what mode in case you need to change that). No point in pondering the implications of code, possibly even chasing down really esoteric potential flaws, if it turns out by some quirk that was not an actively used instruction; the very thing you are trying to do with a jump and a return could be happening here but from the original devs.
Hopefully you are not already within a subroutine (using a potion is usually a good candidate as you are not always going to be using them enough to want to keep things active here) and possibly then nailed the return location value of the game's original return (the stack not really having anything special for return values) when the BL stuffed its own value in R14 as part of its operation. If it is within a subroutine already then you get to restore its return location or use blind jumps and take care of the locations yourself (easy enough to do if you are playing hacker and presumably not remaking the game from scratch, or have a spare register to function as an alternative to R14 for these purposes and use BX instead, or maybe are willing to trust push and pop with R14).
no$gba vs vba. Not entirely sure what goes there. no$gba is generally seen as more accurate so if you messed up some kind of timing, location or read ahead then that could have been it. Will have to drill into that one and possibly some ARM docs.
Only got
http://shell-storm.org/online/Online-Assembler-and-Disassembler/ to play with right now for a disassembler and am too lazy to play hand encoding (the no$gba specs have the option for it though). There is also the question of does the no$gba command work in vba?
0A88 E08A =>
B1F0 29
FB (F0B1
FB29 BL 080DADA4) (No$GBA)
B1F0 29
DB (F0B1
DB29) (VBA)
according to said link.
(No$GBA): B1 F0 29 FB bl #0xb1656
(VBA) : B1 F0 29 DB bl #0x8b165a