The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Advertise here

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old March 8th, 2010, 08:35 AM
>Dante<'s Avatar
>Dante<
Call me Steven
 
Join Date: Jun 2008
Location: Torino (ITA)
Nature: Adamant
Send a message via Windows Live Messenger to >Dante<

Advertise here
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


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 by >Dante<; March 8th, 2010 at 08:52 AM.
Reply With Quote
  #2    
Old March 8th, 2010, 11:20 AM
Derlo's Avatar
Derlo
Braziliam Hacker!! De Mossoró
 
Join Date: Aug 2007
Send a message via Windows Live Messenger to Derlo
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.

Quote:
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.
__________________



Pokémon
Essence of Light

Comming Soon...

Last edited by Derlo; March 17th, 2010 at 03:07 PM. Reason: Foud a bad Way! xP
Reply With Quote
  #3    
Old March 8th, 2010, 02:45 PM
giradialkia's Avatar
giradialkia
Community Supporter
 
Join Date: Apr 2009
Location: Ireland
Age: 21
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to giradialkia
Quote:
Originally Posted by >Dante< View Post
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


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
__________________

This one's called 'Red', and it's actually kinda Pokémon themed, so have a listen! Check out the links below for more stuff, if you like this!



This is the Doctor
This is my Soundcloud
This is my bandcamp

My Pokémon Y character is the same as my username. If you see me as a Passerby let me know! I tend to get a lot of Passerby requests and I often wonder if it's people from this site.
Reply With Quote
  #4    
Old March 8th, 2010, 05:09 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Just what I need for some cutscenes!
Too bad FireRed has DMA protection... Maybe some ASM hacking could fix the problem.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #5    
Old March 10th, 2010, 07:25 AM
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
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
__________________
Reply With Quote
  #6    
Old March 10th, 2010, 08:13 AM
Derlo's Avatar
Derlo
Braziliam Hacker!! De Mossoró
 
Join Date: Aug 2007
Send a message via Windows Live Messenger to Derlo
Quote:
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)
Reply With Quote
  #7    
Old March 10th, 2010, 11:08 AM
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
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.
__________________
Reply With Quote
  #8    
Old March 10th, 2010, 03:23 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
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.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #9    
Old March 13th, 2010, 12:03 AM
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
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 by Giga Universe; March 13th, 2010 at 12:45 AM.
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 03:24 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.