Hello, I decided to take a look in a debugger and see what I could find. I've never hacked a GB game before, but I was able to find what you were looking for.
First, load up the game in BGB
. Go to the fishing minigame and talk to the guy.
The first thing you need to do is set a breakpoint for when the keypad is read. How do you do this? Press ESC to pull up BGB's debugger, then from the Debug menu, go to Access Breakpoints. Type in FF00 for the address, click the read checkbox, and click add. How did I know FF00 was the keypad? When my usual method (from GBA hacking) of setting a breakpoint on graphics didn't work, I decided to google around and found this tutorial: http://blog.pkh.me/p/1-scavenger-hunt.html
. That page explains things in a lot more detail, and has some nice screenshots, but it's for a different game.
Using the method in the tutorial I just linked, I figured out that the keys that are held are stored in ffcb and the keys that were just pressed are stored in ffcc. I set read breakpoints on both, but only A and B were checked from ffcb, so to follow along, just set a read breakpoint on ffcc.
Set a breakpoint on ffcc, it breaks at ROM0:278A. Here's the code:
ld a,(ff00+cc) ;read the value from ffcc.
bit 4,a ;Checks if bit 4 is set (A button)
jp nz 27ae ;goto 27ae if A was pressed
and a,03 ;check if left or right was pressed
jr z,27a1 ;go to 27a1 if neither was pressed
After this is what happens if left or right was pressed (note both left and right do the same thing: toggle the dot location). So set a breakpoint here (ROM0:2795) by double clicking the line in the debugger and remove or disable the access breakpoints. Note that the game will run normally until you press left or right, then it will break - this means we are in the right spot. The code at 2795:
ld a,(hl) ;loads the value from c177
inc a ;add one to it
and a,01 ;trick to keep a to either 0 or 1
ld (hl),a ;store new value in c177
Hopefully it's fairly obvious that this toggles the value at c177, so c177 is probably the dot position. Now we need to find how this connects to the X-position of the dot sprite. So, set a read breakpoint on c177. The game breaks at RO17:7D6F:
ld a,(c177) ;get the value at c177
and a,01 ;trick to check if a=1
jr z,7d77 ;goto 7d77 if a=0 (left dot position)
inc e ;e=1 if this is trigged, 0 if not
ld hl,7d50 ;jumps here if was zero
add hl,de ;this will be 7d50 if dot is on left, 7d51 if on right
ld a,(hl) ;gets X value!
Nice, exactly what we were looking for. 7d50 and 7d51 are the positions you need to change! Note, that these are in bank 17. I'm not really familiar with GB architecture, but if you search the ROM for 30 58 1E 00 (the sequence you see in the debugger), you'll find it at 0x5FD50.
Note: In retrospect you probably would have had luck just search the ROM for 30 58, the two X positions which can be found easily in the OAM viewer. However, there was no way to know that the game stored them this way - debugging will always lead to the right answer.
You should be able to use this same method (or just search for the pair of X coordinates in the ROM and try changing them) to find the values for other menus. Hope this helps.