• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: Instant change of camera with WBTO

>Dante<

Call me Steven
201
Posts
15
Years
Istant change of camera with WBTO

As the title says, this is a command that allows to change in instant way the camera.
Before beginning to speak you about this command, I want to specify that, the creator of this "makeup" or "magic" (as you prefer) is R!cci (Skoria).
To understand well what I try to say, I show you a wonderful video with this special command.



for the one who had not understood yet, for WBTO I intend the command WriteByteToOffset that, as the same word says, it entrusts himself to write a byte in the RAM of the game (an only byte for WBTO).

Fortunately, for our command, only are necessary 2 WBTOs that point out the 2 positions of X and Y
74780435.png


Then, our command will be this way:
Code:
writebytetooffset 0xposiciónX 0x2025734
writebytetooffset 0xpocisiónY 0x2025736
special 0x8E

IMPORTANT: This command is only for pokèmon Ruby

Now...
will you ask you, why I had opened this topic in the section "research and development"??
because I need your help to know how to do the same thing on Fire red..

Does someone have some idea??
 
Last edited:

Derlo

Tired....
135
Posts
16
Years
I looked at it and saw that the place (in FR) where the informations of the screen are saved in the range of 0202550C - 020255BC (approximately).

Must be something with DMA or not.
Maybe if check the routine that is part of the Special 0x113 and 0x114, maybe find something.
or check the routine of Special 0x8e in R/S/E.

EDIT:

Try this script...
PS.: just work when the data of screen are in this offset.

special 0x113
writebytetooffset 0xXX 0x202555C
writebytetooffset 0xYY 0x202555E
special 0x8e

But the map gets an error:
Events and Permissions Movement, are in position where you changed the screen.
 
Last edited:
1,762
Posts
14
Years
Istant change of camera with WBTO

As the title says, this is a command that allows to change in instant way the camera.
Before beginning to speak you about this command, I want to specify that, the creator of this "makeup" or "magic" (as you prefer) is R!cci (Skoria).
To understand well what I try to say, I show you a wonderful video with this special command.



for the one who had not understood yet, for WBTO I intend the command WriteByteToOffset that, as the same word says, it entrusts himself to write a byte in the RAM of the game (an only byte for WBTO).

Fortunately, for our command, only are necessary 2 WBTOs that point out the 2 positions of X and Y
74780435.png


Then, our command will be this way:
Code:
writebytetooffset 0xposiciónX 0x2025734
writebytetooffset 0xpocisiónY 0x2025736
special 0x8E

IMPORTANT: This command is only for pokèmon Ruby

Now...
will you ask you, why I had opened this topic in the section "research and development"??
because I need your help to know how to do the same thing on Fire red AND EMERALD..

Does someone have some idea??

Fixed...
...
...
...
...okay, not "fixed", but... It's not as if Emerald is bad or anything, am I right?:) This is pretty awesome, though, and I was thinking about it a few days ago. Thanks for posting, Dante:)
 

Giga Universe

Working on a tool.
121
Posts
16
Years
Here is something useful. I have found two addresses that are not DMA protected, that hold pointers to the location in the RAM where the X and Y positions of the camera are stored.

03005008 - Pointer to X position of the camera
0300500E - Pointer to Y position of the camera
 

Derlo

Tired....
135
Posts
16
Years
Here is something useful. I have found two addresses that are not DMA protected, that hold pointers to the location in the RAM where the X and Y positions of the camera are stored.

03005008 - Pointer to X position of the camera
0300500E - Pointer to Y position of the camera

I had already checked these offsets.
They are a jump to the place where the coordinates of the player on the map are saved.

I think these offsets is changing the place where the player's position on the map is saved.
Because it changes to the exact location where the bytes are saved.
Perhaps, is only possible by making a routine that leave these values in one place (like R / S)
 

Giga Universe

Working on a tool.
121
Posts
16
Years
They don't. They are just telling the game where the data is stored. A much simpler solution than removing DMA protection is to follow those pointers in an ASM routine and changing the values stored there. I'm trying to write to code to do so now.
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
A good idea (if you're not already doing so) is to make an ASM routine to copy the bytes there into four variables, not just to edit the bytes into something specific, and another one to repack the bytes and place them back in.
 

Giga Universe

Working on a tool.
121
Posts
16
Years
Well, I've done a half-job. I'm just posting the progress I have made so far. I'm in a bit of a rush, so they aren't very good or optimised.

Code:
.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r3, lr}
	ldr r0, .CAM
	ldr r0, [r0]
	ldrh r1, [r0, #0x2]
	ldr r0, .CAM
	ldr r0, [r0]
	ldrh r0, [r0, #0x0]
	ldr r2, .VAR
	ldr r3, .VARS
	strh r0, [r2]
	strh r1, [r3]
	pop {r0-r3, pc}

.align 2
.CAM:
	.word 0x03005008
.VAR:
	.word 0x020370B8
.VARS:
	.word 0x020370BA

Compile it, Insert it at a propper offset, then in a script call a 'callasm YOUR-OFFSET-1' command. This above code exports the X position of the camera to the variable 0x8000 and the Y position to 0x8001.


Below is the setting routine. It doesn't work properly, because if you use special 0x8E after it, the game freezes. But, if you open a menu (Pokedex, Pokemon menu, etc), the camera updates without freezing the game. I'll try find a way to make it not freeze after use of special 0x8E. Insert the routine and insert this script:
setvar 0x8000 XPOS
setvar 0x8001 YPOS
callasm YOUROFFSET-1
end

Run the script, and then open a menu, and you'll notice the camera adjusts to those positions. If you want to jump the camera up 2 places, and don't know the coordinates of the camera, use it in conjunction with the first routine.

Code:
.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r1, lr}
	ldr r0, .CAM
	ldr r0, [r0]
	ldr r1, .VAR
	str r1, [r0]
	pop {r0-r1, pc}

.align 2
.CAM:
	.word 0x03005008
.VAR:
	.word 0x020370B8
.VARS:
	.word 0x020370BA

I'll try and fix them up later.
 
Last edited:
Back
Top