[FE8][ASM] EXP Woes

My goal is to double all EXP essentially, and I am working off of Paragon from circle’s skill system.
It works properly, except much consderably EXP is saved when the defender gains EXP. The bar shows the correct EXP gains after combat, but the incorrect amount is not saved. It seems that before the EXP gets stored, it gets a right shift (?) to some degree, making it considerably lower, but not necessarily 0.

By the nature of the routine, the attacker’s and defender’s EXP are calculated and stored separately, so it seems that something is wrong on the defender’s side of the routine.
Following the routine through no$, however, the output is correct, and the correct EXP is stored in the RAM. This implies that there is something wrong after the routine, but I don’t know enough about the battle calculation routines to analyze it.

Thanks to anyone willing to help, and I apologize in advance for any stupid overlooks I feel I’m making.

You commented out the branch in the first check, so it’s always going to execute mov r5,#100.

That’s an oops on my part, but the problem persists. This mistake was on the attacker’s side of the routine.

EDIT: Fixed it myself again… For some reason, putting this ASM not in the block in the 0xB30000 range does funky stuff. Not sure why. Maybe a bl out of range, but there’s only a .short 0xF800. I didn’t think those had range issues. Weird.

1 Like