Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Quick Research & Development Thread

Notices
For all updates, view the main page.

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.



Reply
 
Thread Tools
  #451    
Old March 7th, 2014 (02:36 AM).
kearnseyboy6's Avatar
kearnseyboy6 kearnseyboy6 is offline
Aussie's Toughest Mudder
 
Join Date: Dec 2008
Posts: 288
in applymovement #raw 0x69 will play all the rocksmash, tree frames, its in their respective scripts so don't be fooled by the 'mov69' description.
__________________
HOLIDAYING CURRENTLY!!
Reply With Quote
  #452    
Old March 7th, 2014 (05:36 PM).
CMooney91 CMooney91 is offline
 
Join Date: May 2013
Gender: Male
Posts: 2
Hey everybody,

Is it possible to implement a choice in the intro to pick a character? Like, instead of "Are you a boy or girl?" and you pick a gender, could it be "Are you a boy or a girl?" And then it asks you to pick one of three archetypes per say?
Reply With Quote
  #453    
Old March 7th, 2014 (05:49 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 19
Gender: Male
Posts: 251
Quote originally posted by CMooney91:
Hey everybody,

Is it possible to implement a choice in the intro to pick a character? Like, instead of "Are you a boy or girl?" and you pick a gender, could it be "Are you a boy or a girl?" And then it asks you to pick one of three archetypes per say?
Definitely, it would require some modification to the intro ASM routine though.
Reply With Quote
  #454    
Old March 7th, 2014 (05:55 PM).
CMooney91 CMooney91 is offline
 
Join Date: May 2013
Gender: Male
Posts: 2
Thanks for the reply!

Sounds like it's above my head. I'm relatively new to rom hacking. thanks though!
Reply With Quote
  #455    
Old March 8th, 2014 (04:58 PM).
GOLDstandard's Avatar
GOLDstandard GOLDstandard is offline
GoldStandard
 
Join Date: Jul 2013
Location: California
Gender: Male
Nature: Bold
Posts: 36
Can anyone point me in the direction of research about breeding or the game's pokemon generation routine? I searched the forum and couldnt find anything
__________________
Pokemon is fun
Reply With Quote
  #456    
Old March 9th, 2014 (03:55 PM).
Merak's Avatar
Merak Merak is offline
(abuser of the parentheses)
 
Join Date: Jul 2013
Location: Far too deep in my thoughts.
Age: 19
Nature: Timid
Posts: 248
Update on my small bit of research into the "cry" command.


What is already known:
cry 0xXX 0xYY
XX = pokemon index number.
YY = effect on the cry.


The first parameter didn't need researching(obviously) so I researched the second(the cry effect).
Here's what I've found:
Cry
Code:
0x0: normal.
0x1: normal but cut short.
0x2: Higher pitch, like the pokemon is loud.
0x3: higher pitch than normal, with a bit of echo, like pokemon on the overworld is roaring.
0x4: reversed cry.
0x5: low cry like pokemon faints.
0x6: harsh normal cry, like the pokemon is roaring loudly.
0x7: short lower cry.
0x8: slightly higher than normal.
0x9: short reversed cry.
0xA: pretty much normal I think.
0xB: lower cry.
0xC: short lower cry cut slightly short.
0xD: Normal.
0xE:normal.
0xF: normal.
0x10-0xFF: assumed to all play the cry as a normal cry.
I haven't noticed anything relevant in terms of bits here, so it looks like that's all there is to it.


After doing that bit of research, I decided to take a look at the playsong command's second parameter. So far as I've found there, it does absolutely nothing. I only looked at 0x0-0xF though, so there's a lot of room for me to be proved wrong there.


That's about it for now. Hope this helps somebody. :)
Reply With Quote
  #457    
Old March 19th, 2014 (09:03 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is offline
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,196
Quote originally posted by Merak:
After doing that bit of research, I decided to take a look at the playsong command's second parameter. So far as I've found there, it does absolutely nothing. I only looked at 0x0-0xF though, so there's a lot of room for me to be proved wrong there.
The playsong's second parameter does have a difference though, as far as I've noticed.
if we use 0x0, the song will no longer play after a battle.
if we use 0x1, the song will still be played after a battle.
__________________


3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

Reply With Quote
  #458    
Old March 20th, 2014 (05:38 PM).
Merak's Avatar
Merak Merak is offline
(abuser of the parentheses)
 
Join Date: Jul 2013
Location: Far too deep in my thoughts.
Age: 19
Nature: Timid
Posts: 248
Ah I see. Thanks for pointing that out, it could be pretty helpful. ^^
Reply With Quote
  #459    
Old March 26th, 2014 (10:58 PM). Edited March 26th, 2014 by Chaos Rush.
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,283
So lately I've been studying ASM a bit and gonna try and finally get it down. I've managed to locate parts of the START menu's code simply by finding their text pointer, and then the pointer to that table of pointers, and then looking at the surrounding code in VBA's disassembler. Whenever I saw something such "mov r2, #0x8", I wondered what would happen if I had a different value load into that register. As a result, I've figured this out so far:

0x0806EF94 = X positioning of [name] in the START menu.
Change it and you can reposition [name]:


0x0806EFD0 = the font used in the START menu.
00 gives you the smaller font. Any other value doesn't seem to do anything.


0x0806EFD4 = X positioning of the text in the START menu (except [name])
The default value is 08. This is what it looks like if you change it to 00:

(Changing it to FF/giving longer text strings will NOT magically make the menu box's width longer unlike the multichoice boxes that the script engine uses)

0x0806F0DE = relative X positioning of cursor in START menu
0x0806F0E0 = relative Y positioning of cursor in START menu
By positioning, I don't mean the actual selection within the start menu, I mean the actual pixel coordinates of the cursor within the start menu.

None of this info is useful yet, but eventually I would like to port Emerald's START menu look onto FireRed because I find it more aesthetically pleasing.

But that's not all I found!

At 0x083A7344 is a table that basically controls the START menu itself. The format of the table goes like this:
[XX XX XX 08][YY YY YY 08]
XX XX XX 08 = pointer to text string within START menu (such as POKéDEX, POKéMON, BAG, etc.)
YY YY YY 08 = pointer to the routine of aforementioned function. Yes, I'm serious. You can literally switch around your START menu like this:

Notice how POKéMON is in the first slot like in B/W/B2/W2/X/Y, not POKéDEX like in Gens I-IV. And no, I did not just switch the text string pointer, I switched around the function pointers too. Don't believe me? Try it yourself! It's fun!

Here's the table at 0x083A7344 in detail:
41627D = POKéDEX text string
06F411 = POKéDEX routine (+1)

415A66 = POKéMON text string
06F44D = POKéMON routine (+1)

416285 = BAG text string
06F481 = BAG routine (+1)

41628E = [name] text string
06F4B5 = Trainer Card routine (+1)

416291 = SAVE text string
06F4E9 = SAVE routine (+1)

416296 = OPTION text string
06F4FD = OPTION routine (+1)

41629D = EXIT text string
06F541 = EXIT routine (+1)

4162A2 = RETIRE text string (Safari Zone)
06F555 = RETIRE routine(+1)

41628E = [name] text string
06F56D = ??? (+1) (fadescreen then freezes the game, I'm assuming its for the alternate Trainer Card shown during Link Battles/Trades)

Unfortunately I haven't been able to find what dictates how many entries the START menu gets, but hopefully with this knowledge, it will be a lot easier to implement something like the a PokéGear onto FireRed. Not to mention that these offsets are the actual routines used for the Pokédex, party screen, bag, Trainer Card, Save menu, and Options. I'm not joking lol, if you literally put this in a script:
Code:
//---------------
#dynamic 0x800000
#org @main
callasm 0x806F411 //this is the Pokédex routine offset from the START menu table
end
It will open up the Pokédex. You can literally use callasm and use any of the offsets from the table and it will load up that function!

So say, you wrote a custom PokéGear code. You can edit one of the function pointers in the table to your new code and voila, you'll have a PokéGear within your START menu. Of course, what would be more ideal is if we could figure out how to expand the number of entries the START menu gets. I'm sure it wouldn't be that hard, the thing is that I have no idea how to find the routine that the game uses when you actually press the START button.
__________________
Reply With Quote
  #460    
Old March 27th, 2014 (12:15 AM).
Whatshouldyoucallme Whatshouldyoucallme is offline
 
Join Date: Mar 2014
Location: Wherever
Posts: 3
Nice find Chaos Rush!
Really fun to switch it, but note that the flag to active the Menu will be different.
~Original~
setflag 0x828 - Activates Pokemon Menu
setflag 0x829 - Activates Pokedex Menu

~Switched(Pokedex and Pokemon Menu)~
setflag 0x829 - Activates Pokemon Menu
setflag 0x828 - Activates Pokedex Menu
(If we doesn't change that will cause Oak give you pokedex when you choose a pokemon :D)
Reply With Quote
  #461    
Old April 4th, 2014 (06:48 AM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
http://GoGoJJTech.com (WIP!)
Gold Tier
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Female
Nature: Jolly
Posts: 2,077
nop the 8 bytes at 080484 to make trainerbattle 0x9 not have oak's text
found by knizz
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Pokemonhackersonline Profile - Youtube Channel

Join us in the romhacking chat
Pokémon Platinum Red and Blue
Reply With Quote
  #462    
Old April 6th, 2014 (10:44 PM).
Whatshouldyoucallme Whatshouldyoucallme is offline
 
Join Date: Mar 2014
Location: Wherever
Posts: 3
I personally thought that block editing with A-map one-by-one was not a clever way.
Esspecially when we trying to redo the whole tileset.

When using block editor in A-map, the [offset:]slot will show the block offset when your mouse move on any block.
Go to hex editor and go to that offset(I use grass as example)and you will see something like this:

6E 02 6F 02 4C 02 4D 02 00 00 00 00 00 00 00 00

Copy and paste this code to the next offset and save.
Go back to A-map, now you will see the next block after the grass will become grass.

The code is actually how tile arranged on the block,

6E02 6F02
4C02 4D02

6E 02-> 02 6E which will be the tile no. 26E
6F 02-> 02 6F which will be the tile no. 26F
4C 02-> 02 4C which will be the tile no. 24C
4D 02-> 02 4D which will be the tile no. 24D

And changing the 0 to something else not higher than 12(C IN HEX) will change the pallete of that tile.
Reply With Quote
  #463    
Old April 12th, 2014 (02:39 AM).
ThomasWinwood's Avatar
ThomasWinwood ThomasWinwood is offline
 
Join Date: Nov 2013
Gender: Male
Nature: Relaxed
Posts: 40
Quote originally posted by JPAN:
I found something that bugs a lot of people, the fact HM moves cannot be deleted, can be easily erased on Fire Red.
I found the Emerald equivalents of the routines detailed in this post from earlier in the thread at 0x6E7CC and 0x1B6D14 respectively. It's not too difficult to extrapolate from there to the changes to disable HMs being undeletable.
Reply With Quote
  #464    
Old April 12th, 2014 (12:28 PM). Edited April 12th, 2014 by Shiny Quagsire.
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
STOP HIM SAM, HE'S GONNA TELL US A STORY!!!
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Posts: 690
You can change the color filter used by flashbacks by changing the byte at 080572B0 to something else. So if sepia flashbacks are your thing then you can change it to 02, or alternatively you can have color flashbacks with 00.

EDIT: Apparently there's another address, 08057274, that needs tweaking as well. Same procedure, just different address.
__________________



Reply With Quote
  #465    
Old April 13th, 2014 (06:05 AM).
sp13's Avatar
sp13 sp13 is offline
 
Join Date: Mar 2014
Posts: 9
Just a quick little thing I just discovered about music editing with Sappy. Not sure if this has been covered before (probably), but felt like posting it in case anyone else ran into the same problem.

If you have a .s file where one or more of the tracks sounds all "wavy" (not quite sure how to describe it, but where the notes bend all the time instead of just playing normally), here's how to fix it:

- look at the track details of each track of your song in Sappy
- if the last number (should be an indigo color in sappy 2006) is anything other than 0, that is what is causing the bending
- open the .s file in notepad and navigate to the data for that track
- at the beginning of the track's data, you should see things like VOICE, VOL, PAN, etc.
- the one that controls the bending is MOD
- simply remove the line with the MOD byte and save the .s file

That removes the weird bending.

Not sure if this is even news but hope this helps someone.
Reply With Quote
  #466    
Old April 13th, 2014 (06:14 AM).
Wobbu's Avatar
Wobbu Wobbu is offline
ffet
ModeratorEO
 
Join Date: Mar 2012
Location: Stonefalls
Gender: Male
Nature: Relaxed
Posts: 2,399
Quote originally posted by sp13:
Just a quick little thing I just discovered about music editing with Sappy. Not sure if this has been covered before (probably), but felt like posting it in case anyone else ran into the same problem.

If you have a .s file where one or more of the tracks sounds all "wavy" (not quite sure how to describe it, but where the notes bend all the time instead of just playing normally), here's how to fix it:

- look at the track details of each track of your song in Sappy
- if the last number (should be an indigo color in sappy 2006) is anything other than 0, that is what is causing the bending
- open the .s file in notepad and navigate to the data for that track
- at the beginning of the track's data, you should see things like VOICE, VOL, PAN, etc.
- the one that controls the bending is MOD
- simply remove the line with the MOD byte and save the .s file

That removes the weird bending.

Not sure if this is even news but hope this helps someone. :P
You can also remove modulations from the actual midi with Anvil Studio's event editor. If you do it that way, the modulations won't appear again in case you have to remake your S file. But S files are useful for finding how many modulations are in each track if you use notepad and the search feature :D
__________________
Reply With Quote
  #467    
Old April 13th, 2014 (06:32 AM).
sp13's Avatar
sp13 sp13 is offline
 
Join Date: Mar 2014
Posts: 9
Quote originally posted by Wobbu:
You can also remove modulations from the actual midi with Anvil Studio's event editor. If you do it that way, the modulations won't appear again in case you have to remake your S file. But S files are useful for finding how many modulations are in each track if you use notepad and the search feature :D
Doing it straight from Anvil sounds really handy! I didn't think to do that because I could never actually hear the modulations when listening through Anvil, only when opening in Sappy.
Reply With Quote
  #468    
Old April 13th, 2014 (06:59 AM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
http://GoGoJJTech.com (WIP!)
Gold Tier
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Female
Nature: Jolly
Posts: 2,077
Quote originally posted by sp13:
Doing it straight from Anvil sounds really handy! I didn't think to do that because I could never actually hear the modulations when listening through Anvil, only when opening in Sappy.
The mod command is quite necessary for most DS songs. Know why? It controls the way the instrument goes from one speaker to the next. To correct it type modt, 12 right under the mod command. Or you can use ipatix' tool MIDFIXforAGB.exe, which does this for you. My mega huge sappy tutorial covers this :D
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Pokemonhackersonline Profile - Youtube Channel

Join us in the romhacking chat
Pokémon Platinum Red and Blue
Reply With Quote
  #469    
Old April 17th, 2014 (09:20 AM). Edited April 19th, 2014 by ThomasWinwood.
ThomasWinwood's Avatar
ThomasWinwood ThomasWinwood is offline
 
Join Date: Nov 2013
Gender: Male
Nature: Relaxed
Posts: 40
The Pickup table in Emerald is at 0x31C440. It consists of two lists of values, the first for common items, the second for rare items starting at 0x31C464.

e: The Pickup routine is at 0x55C00, and the move command table is at 0x31BD10. There seem to be quite a few blocks in that region of pointer tables followed by data used by the routines they point to.
__________________
The rival in Red and Blue is called Green. Gary is some character from a lame cartoon.
Reply With Quote
  #470    
Old May 4th, 2014 (03:42 AM).
dagid44 dagid44 is offline
 
Join Date: Apr 2012
Gender: Male
Posts: 1
Hi I'm beginner,

I'm trying to understand how is all data about mapping stored. I found this article, which explain some structure of data.

Code:
datacrystal.romhacking.net/wiki/Pok%C3%A9mon_3rd_Generation
But it is uncompleted, it is missing information about block structure, animation structure, etc... Is there any better research/document ? I can't found any.

Thank you for your help.
Reply With Quote
  #471    
Old May 4th, 2014 (07:50 AM).
vizor vizor is offline
 
Join Date: Dec 2011
Gender: Female
Posts: 24
Hey there, i need the offset of the generateOAM function + its parameter.
Reply With Quote
  #472    
Old May 4th, 2014 (02:02 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
STOP HIM SAM, HE'S GONNA TELL US A STORY!!!
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Posts: 690
Quote originally posted by vizor:
Hey there, i need the offset of the generateOAM function + its parameter.
The function is located at 08006F8C in Fire Red. I have it formatted as such in my personal .h I've used:
Code:
u32 createSprite(int *template, int *XPos, int *YPos, int *i)
Arguments are pretty self explanatory, except template and i. Template is basically the unit as described here under object_template, and all you need is the proper formatting to get it going. i is usually left at 0 and I haven't actually checked to see what it is. I believe it might have to do with it's priority over other sprites.
__________________



Reply With Quote
  #473    
Old May 4th, 2014 (08:56 PM).
vizor vizor is offline
 
Join Date: Dec 2011
Gender: Female
Posts: 24
Thank you for your help.

I'm a German, and i don't know for sure wether i understood the template. Is this simply a pointer to the oam's animation data? And what if the object has'nt any animation. Will the obj disappear after displaying all frames listed in the template?

And in what registers i have to transfer ( i don't know how to say this, sorry) each param?

- Viz0r
Reply With Quote
  #474    
Old May 4th, 2014 (09:25 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
STOP HIM SAM, HE'S GONNA TELL US A STORY!!!
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Posts: 690
Quote originally posted by vizor:
Thank you for your help.

I'm a German, and i don't know for sure wether i understood the template. Is this simply a pointer to the oam's animation data? And what if the object has'nt any animation. Will the obj disappear after displaying all frames listed in the template?

And in what registers i have to transfer ( i don't know how to say this, sorry) each param?

- Viz0r
It's a tad bit complicated, and I haven't actually done this in ASM before so I could be wrong. Basically though, the first four arguments of the function correspond to r0-r3 respectively. As for the template, if you can understand C I'd suggest taking a look at some example coding here where I created a obj_template as a struct along with all the data needed for it. The first two word values (each are two bytes) are usually 2 and 1 based on existing templates in the ROM. Then you have a pointer to the basic OAM data you'd find in the GBA's OAM memory. The rest of it I usually keep to the values 0, 0x08231CFC, 0x080EE4DD, and 0xFF simply because that's what has always worked for me. The animation table is fairly straightforward. You have two bytes for the tile number and two for the duration. 0xFFFF ends the animation and usually removes the sprite, and 0xFFFE will loop it forever.

Let me know if you have any questions, and feel free to browse around some of my C code where I use these functions quite a bit. If you're good with C it might make a bit more sense for you, but otherwise I'd suggest reading up in knizz's research thread.
__________________



Reply With Quote
  #475    
Old May 5th, 2014 (03:34 AM).
vizor vizor is offline
 
Join Date: Dec 2011
Gender: Female
Posts: 24
Isnt there any way creating OAM without using a entry in the template table? i mean the Overworlds are sureley not genereted due to this table, arent they?
Reply With Quote
Reply
Quick Reply

Sponsored Links
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

Forum Jump


All times are UTC -8. The time now is 11:34 AM.