I did find RAM addresses that control the camera's X and Y positions in DKL, but unfortunately, they're in the FFxx range in RAM, so there's no GameShark code that I know of, since GameShark codes, as far as I know, can only access A000-DFFF in RAM. However, it's still possible to edit
any RAM address with the
bgb emulator, so I suggest you use that. Hopefully, you have Windows so that you can use it.
In DKL, FFA8-FFA9 controls the camera's X position (left is 0), and FFAB-FFAC controls the camera's Y position (top is 0). These values are
16-bit values and are
little endian.
So for example, if you want the camera to be 256 pixels from the left, this is 0100 in hexadecimal. You have to reverse the 01 and the 00 to get 00 01. So, FFA8 would be 00, and FFA9 would be 01 in this case.
To control the RAM addresses, do the following:
- Open bgb.
- Open a ROM by right-clicking the window, and clicking Load rom...
- Once the ROM is loaded, right-click the window again, go to Other, then debugger.
- A new window will open up.
- In the bottom-left area of the debugger, you can see the entire RAM. You will want to scroll down all the way to the bottom so that the HRAM:FFA0 row shows up.
- Find the RAM address you want to change (either FFA8, FFA9, FFAB, or FFAC as described above). Right-click the byte. Then, click "Freeze ram address".
- Change it to the value that you want. Just be aware of a few things:
- Do not cause the change the value too much from whatever it is currently, or else the camera will shift faster than the tiles can properly load. In general, try to keep Donkey/Diddy on the screen.
- Locking the X position will cause Donkey/Diddy unable to move past the screen, so you will have to unfreeze the value and re-freeze it to something else. Also, they can get stuck on the left side of the screen unless you roll/cartwheel to the right.
- Locking the Y position will cause Donkey/Diddy to die if he falls below the screen! Getting Donkey/Diddy above the screen doesn't seem to have serious consequences.
- The camera will shake a bit whenever you move, because it is trying to get Donkey/Diddy in the center of the screen, but freezing the value overrides this.
I hope this makes sense. Also, in DKL2, DE80-DE81 controls the camera's X position, and DE82-DE83 controls the camera's Y position. Again, try not to shift the camera too much, although Diddy/Dixie can walk past the screen this time. I haven't tried DKL3 yet, but I wouldn't be surprised if it had the same RAM addresses. (Also, since they happen to be in the proper address range in this game, you can use GameShark codes 01xx80DE, 01xx81DE, 01xx82DE, and 01xx83DE.)