You are not logged in.
This is probably a very stupid question.
So pointers aren't my strongest point in hacking right now. I kinda understand how to take an offset and calculate a pointer for that offset. But I can not go the other way, at all.
Is there a tutorial or formula that can be used to take a two byte pointer and calculate the offset it is pointing too?
For instance the pointer for Bulbasaurs's Evolution and moveset is B3 69. How do I convert that to an offset? I know the offset is 0x429B3 because someone stated that, but I want to know how to calculate it.
16‐bit values are stored little‐endian in the ROM. So the bytes $B3 $69 represent the 16‐bit pointer $69B3.
Given a bank and 16‐bit pointer, you calculate the offset like so:
offset = bank × $4000 + pointer − $4000
Given an offset, you can calculate the pointer like so:
bank = offset ÷ $4000
pointer = offset % $4000 + $4000