Hey jbmaster21!
Thanks for reaching out. I'd be happy to help you out.
Yeah, you can think of 0xB as 11. You know how hex works right? (If not, feel free to ask, I can give you a more in-depth explanation.) For example, let's say my offset for @flagcheck is 7603D7 (that's where it ends up if you just use the patch on a clean ROM). I have to add 0xB to 7603D7. You can simply use a hex calculator like this one: https://www.calculator.net/hex-calculator.html (or XSE actually has a hex calculator built-in, in the upper right-hand corner), or you can convert to decimal and do the math:
Personally, I'm not actually very good at math, so what I do is count it out:
In any case, we end up with 7603E2. Then, that pointer is going to be reverse hex, which literally means we just split up each pair of numbers and put the pairs in reverse order:
and that's what I'd put in XX XX XX.
So, first you need the offset where you put the Fly routine. In my unaltered patch it's 7606A0. So to get the pointer, first add 1 to that offset:
Then, we reverse the hex like before:
and the final step is that whenever we write a pointer to a ROM location, we end with 08. So the final pointer is:
and that's what we put at 0x3A7360 in the ROM. Just make sure you keep track of where you put the Fly routine and use that procedure to figure out the pointer to put here.
Good question. The +1 thing is for pointers to ASM routines. Since these are just text, there's no need to +1 them.
Yeah, that's exactly right, the offset must end in 4, 8, B, or 0. To be entirely honest, I never fully understood why this must be (it has to do with the data being "aligned" in order to be read properly). I don't know why this one in particular needs this but others don't. This was something that FBI built in his original work, and I just followed what he did.
Thanks for taking a shot at applying it first and coming back with good questions! It's really frustrating when people just say things like "it doesn't work!!" without really trying to figure it out themselves. Let me know if you have more questions!
Thanks for reaching out. I'd be happy to help you out.
Yeah, you can think of 0xB as 11. You know how hex works right? (If not, feel free to ask, I can give you a more in-depth explanation.) For example, let's say my offset for @flagcheck is 7603D7 (that's where it ends up if you just use the patch on a clean ROM). I have to add 0xB to 7603D7. You can simply use a hex calculator like this one: https://www.calculator.net/hex-calculator.html (or XSE actually has a hex calculator built-in, in the upper right-hand corner), or you can convert to decimal and do the math:
Spoiler:
Personally, I'm not actually very good at math, so what I do is count it out:
Spoiler:
In any case, we end up with 7603E2. Then, that pointer is going to be reverse hex, which literally means we just split up each pair of numbers and put the pairs in reverse order:
Spoiler:
and that's what I'd put in XX XX XX.
So, first you need the offset where you put the Fly routine. In my unaltered patch it's 7606A0. So to get the pointer, first add 1 to that offset:
Spoiler:
Then, we reverse the hex like before:
Spoiler:
and the final step is that whenever we write a pointer to a ROM location, we end with 08. So the final pointer is:
Spoiler:
and that's what we put at 0x3A7360 in the ROM. Just make sure you keep track of where you put the Fly routine and use that procedure to figure out the pointer to put here.
Good question. The +1 thing is for pointers to ASM routines. Since these are just text, there's no need to +1 them.
Yeah, that's exactly right, the offset must end in 4, 8, B, or 0. To be entirely honest, I never fully understood why this must be (it has to do with the data being "aligned" in order to be read properly). I don't know why this one in particular needs this but others don't. This was something that FBI built in his original work, and I just followed what he did.
Thanks for taking a shot at applying it first and coming back with good questions! It's really frustrating when people just say things like "it doesn't work!!" without really trying to figure it out themselves. Let me know if you have more questions!