The PokéCommunity Forums Fan Games ROM Hacking Research & Development
Quick Research & Development Thread

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!


Reply
 
Thread Tools
  #801    
Old February 8th, 2016 (11:17 AM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
 
Join Date: Nov 2012
Location: Earth
Age: 19
Gender: Female
Nature: Jolly
Posts: 2,475
The fanfare and waitfanfare commands in Pokémon Emerald (not sure about other games) work based on a table. The table is at 0x085248BC and works like this:


If you don't understand what's going on here, the table looks like this:

First halfword is the song, second halfword is the length that waitfanfare waits (in ticks or frames, I don't know the term).

The limiter for this table is at 0x080A310C. Change 0x11 to the new amount of fanfares if you're expanding this table.

Fanfare playing works like this if you're interested:

Basically it loops through the table and gets the first halfword each time, then checks if the song you're trying to play is in the table. If not, it just plays the first fanfare in the table (which by default, is the level-up theme)
__________________
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 - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue
Reply With Quote

Relevant Advertising!

  #802    
Old February 9th, 2016 (6:13 PM).
leyn09's Avatar
leyn09 leyn09 is offline
Truant Trainer
     
    Join Date: May 2011
    Location: Philippines
    Gender: Male
    Nature: Careful
    Posts: 84
    Quote:
    Originally Posted by GoGoJJTech View Post
    nop the 8 bytes at 080484 to make trainerbattle 0x9 not have oak's text
    found by knizz
    I'm quite confused on how should I nop those bytes? Please enlighten me. Thanks :D
    Reply With Quote
      #803    
    Old February 9th, 2016 (6:15 PM).
    GoGoJJTech's Avatar
    GoGoJJTech GoGoJJTech is offline
    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
     
    Join Date: Nov 2012
    Location: Earth
    Age: 19
    Gender: Female
    Nature: Jolly
    Posts: 2,475
    Quote:
    Originally Posted by leyn09 View Post
    I'm quite confused on how should I nop those bytes? Please enlighten me. Thanks :D
    Nop, like 00 00
    __________________
    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 - Youtube Channel

    Support me at my site!
    Pokémon Platinum Red and Blue
    Reply With Quote
      #804    
    Old February 10th, 2016 (9:36 AM).
    Telinc1's Avatar
    Telinc1 Telinc1 is offline
    Weirdo Extraordinaire
       
      Join Date: Jun 2013
      Location: Sofia, Bulgaria
      Gender: Male
      Nature: Bold
      Posts: 167
      Quote:
      Originally Posted by leyn09 View Post
      I'm quite confused on how should I nop those bytes? Please enlighten me. Thanks :D
      To clarify what GoGo said, basically type 8 00s (meaning, 16 0s) at that location. 00 actually corresponds to a THUMB instruction (pretty sure it's lsl r0,#0x0 or something like that) which shifts r0 zero bits to the left - practically nothing. You have to use this, as ARMv4 THUMB doesn't have a NOP instruction like 65816 ASM does (that's the ASM variant which the SNES uses).
      __________________

      Check out my hacks by clicking on the userbar!
      Check out my new website (this link now works!)!
      Reply With Quote
        #805    
      Old February 10th, 2016 (1:50 PM).
      FBI's Avatar
      FBI FBI is offline
      Free supporter
       
      Join Date: Jan 2013
      Location: Unknown Island
      Gender: Male
      Posts: 1,863
      Actually the defined nop instruction in Thumb is mov r8, r8. Many other instructions raise something called flags.

      The instruction lsl, for example, raises the Zero flag, Carry flag and Sign flag. In the case of lsl r0, r0, #0x0, you won't set the carry flag but the other two can be set. This kind of practice could create unexpected results, so it's much better to use mov r8, r8 instead. That's the bytes "C0 46 C0 46".
      __________________
      ...
      Reply With Quote
        #806    
      Old February 10th, 2016 (2:58 PM).
      Joexv's Avatar
      Joexv Joexv is offline
      joexv.github.io
       
      Join Date: Oct 2012
      Location: Oregon
      Age: 20
      Gender: Male
      Nature: Sassy
      Posts: 1,029
      I dont know if anyone would really need this, but if you want to skip part of the oak intro(where he sends out the Pokemon AND the text that goes with it)

      put 79 FD 12 08 at 0x812f9E8
      __________________
      I'm bored
      Jesus Christ is my Savior
      Bros with Percy

      My Rom hacks
      A New Dawn---Gentlemon
      Not in Production:
      Blackened Night---Holiday Hacks
      Reply With Quote
        #807    
      Old February 10th, 2016 (11:05 PM). Edited February 11th, 2016 by Zaazaa0.
      Zaazaa0's Avatar
      Zaazaa0 Zaazaa0 is offline
         
        Join Date: Jan 2011
        Gender: Male
        Posts: 6
        I've been digging into Forecast to try and figure out how to change the types of Castform's weather forms. More specifically, I want to make it possible to have a base form and weather forms that have one shared type with separate dual types. I have an okay amount of hex knowledge and exactly zero scripting knowledge, and I think I've gotten as far as that can take me. Here's what I've figured out so far:

        Relevant offsets are, in FireRed (with their normal values in parentheses):
        0x8019E70 (00)
        0x8019E78 (00)
        0x8019E9A (0A)
        0x8019EA2 (0A)
        0x8019EA6 (0A)
        0x8019EC6 (0B)
        0x8019ECE (0B)
        0x8019ED2 (0B)
        0x8019EF2 (0F)
        0x8019EFA (0F)
        0x8019EFE (0F)
        There may be more.

        To make sure we're on the same page, those values correspond to types. 00=Normal, 0A=Fire, 0B=Water, and 0F=Ice.

        The first two are the primary and secondary types of Castform's base form. If Castform's primary type doesn't match the value at 0x8019E70 AND its secondary type doesn't match 0x8019E78, it will "change" from its Base form into its Base form as soon as it's sent in (in clear weather). If even one of the types matches, it won't do that.

        The other sets of three values are of course related to the Sun, Rain, and Hail forms. Only thing is, I can't quite figure out what makes them work. I do know this much:
        -If 0x8019E9A and 0x8019E70 are the same value, OR if 0x8019EA2 and 0x8019E78 are the same value, Castform is unable to change from its Base form to its Sun form at all. This leads me to believe that 0x8019E9A and 0x8019EA2 determine Sun's primary and secondary types, respectively. The same is true for changing between ANY two forms.
        -Setting the first two values to XX and the third to YY (where XX and YY correspond to types) will cause Castform to transform into that weather form repeatedly forever, soft-locking the game:

        -No matter what I've tried, I've been unable to get Castform's weather forms to be dual-typed. Which is a shame, since that's what I've been trying to do all this time.

        http://www.pokecommunity.com/showpost.php?p=5716298&postcount=11
        I basically figured this much out using only this post from years ago, where someone found the script for Forecast's form change. Figured it might help to include it here. Someone who knows enough about battle scripts might be able to find something in there that I didn't.

        EDIT: I think I've figured out how the three values work. I say I think because I haven't figured out a way to prove it. But I have a good feeling about this because it makes everything else make sense.
        My theory is that the first two values for each weather form are to check the type, and THAT'S IT. The third value is then the ONLY one that says what Castform's type changes to.
        If this is the case, it seems very possible to, say, remove one of the type checks so that it only checks one of them, which in the process makes room to allow the weather form to set a dual type.
        Time to figure out how to get that to work, then.

        EDIT2: Okay yeah that's absolutely the case. Now I just need to figure out how to script this.
        Reply With Quote
          #808    
        Old February 11th, 2016 (1:31 AM).
        leyn09's Avatar
        leyn09 leyn09 is offline
        Truant Trainer
           
          Join Date: May 2011
          Location: Philippines
          Gender: Male
          Nature: Careful
          Posts: 84
          Quote:
          Originally Posted by GoGoJJTech View Post


          Nop, like 00 00
          Quote:
          Originally Posted by Telinc1 View Post
          To clarify what GoGo said, basically type 8 00s (meaning, 16 0s) at that location. 00 actually corresponds to a THUMB instruction (pretty sure it's lsl r0,#0x0 or something like that) which shifts r0 zero bits to the left - practically nothing. You have to use this, as ARMv4 THUMB doesn't have a NOP instruction like 65816 ASM does (that's the ASM variant which the SNES uses).
          Quote:
          Originally Posted by FBI View Post
          Actually the defined nop instruction in Thumb is mov r8, r8. Many other instructions raise something called flags.

          The instruction lsl, for example, raises the Zero flag, Carry flag and Sign flag. In the case of lsl r0, r0, #0x0, you won't set the carry flag but the other two can be set. This kind of practice could create unexpected results, so it's much better to use mov r8, r8 instead. That's the bytes "C0 46 C0 46".
          Thanks for the clarifications!
          Reply With Quote
            #809    
          Old February 11th, 2016 (2:34 AM).
          DizzyEgg's Avatar
          DizzyEgg DizzyEgg is offline
             
            Join Date: Feb 2014
            Location: Poland
            Age: 20
            Gender: Male
            Nature: Quiet
            Posts: 733
            Quote:
            Originally Posted by Zaazaa0 View Post
            Castform Stuff
            Castform switching is a bit complicated, but type changing shouldn't be that much of a problem.
            The routine that's responsible for changing its type is located at: 080426BC in Emerald and at 08019DAC in Fire Red.
            I think they're both the same, but I'll use emerald one as example.
            Full routine:
            Spoiler:

            ROM:080426BC castform_switch: @ CODE XREF: ability_something+416p
            ROM:080426BC @ ability_something+48Ap ...
            ROM:080426BC
            ROM:080426BC var_14 = -0x14
            ROM:080426BC
            ROM:080426BC PUSH {R4-R6,LR}
            ROM:080426BE SUB SP, SP, #4
            ROM:080426C0 LSLS R0, R0, #0x18
            ROM:080426C2 LSRS R6, R0, #0x18
            ROM:080426C4 MOVS R5, #0
            ROM:080426C6 LDR R1, =battle_data
            ROM:080426C8 MOVS R0, #sizeof(battle_participant)
            ROM:080426CA MULS R0, R6
            ROM:080426CC ADDS R4, R0, R1
            ROM:080426CE LDRH R1, [R4]
            ROM:080426D0 LDR R0, =poke_castform
            ROM:080426D2 CMP R1, R0
            ROM:080426D4 BNE return_0
            ROM:080426D6 MOVS R0, R4
            ROM:080426D8 ADDS R0, #battle_participant.ability_id
            ROM:080426DA LDRB R0, [R0]
            ROM:080426DC CMP R0, #ability_forecast
            ROM:080426DE BNE return_0
            ROM:080426E0 LDRH R0, [R4,#battle_participant.current_hp]
            ROM:080426E2 CMP R0, #0
            ROM:080426E4 BEQ return_0
            ROM:080426E6 STR R5, [SP]
            ROM:080426E8 MOVS R0, #0x13
            ROM:080426EA MOVS R1, #0
            ROM:080426EC MOVS R2, #ability_cloudnine
            ROM:080426EE MOVS R3, #0
            ROM:080426F0 BL ability_something
            ROM:080426F4 LSLS R0, R0, #0x18
            ROM:080426F6 CMP R0, #0
            ROM:080426F8 BNE change_type_to_normal
            ROM:080426FA STR R5, [SP]
            ROM:080426FC MOVS R0, #0x13
            ROM:080426FE MOVS R1, #0
            ROM:08042700 MOVS R2, #ability_airlock
            ROM:08042702 MOVS R3, #0
            ROM:08042704 BL ability_something
            ROM:08042708 LSLS R0, R0, #0x18
            ROM:0804270A CMP R0, #0
            ROM:0804270C BEQ loc_8042734
            ROM:0804270E
            ROM:0804270E change_type_to_normal: @ CODE XREF: castform_switch+3Cj
            ROM:0804270E MOVS R2, R4
            ROM:08042710 ADDS R2, #battle_participant.type1
            ROM:08042712 LDRB R0, [R2]
            ROM:08042714 CMP R0, #types_normal
            ROM:08042716 BEQ loc_8042734
            ROM:08042718 MOVS R1, R4
            ROM:0804271A ADDS R1, #battle_participant.type2
            ROM:0804271C LDRB R0, [R1]
            ROM:0804271E CMP R0, #types_normal
            ROM:08042720 BEQ loc_8042734
            ROM:08042722 STRB R5, [R2]
            ROM:08042724 STRB R5, [R1]
            ROM:08042726 MOVS R0, #1
            ROM:08042728 B end
            ROM:08042728 @ ---------------------------------------------------------------------------
            ROM:0804272A .align 4
            ROM:0804272C off_804272C: .long battle_data @ DATA XREF: castform_switch+Ar
            ROM:08042730 dword_8042730: .long poke_castform @ DATA XREF: castform_switch+14r
            ROM:08042734 @ ---------------------------------------------------------------------------
            ROM:08042734
            ROM:08042734 loc_8042734: @ CODE XREF: castform_switch+50j
            ROM:08042734 @ castform_switch+5Aj ...
            ROM:08042734 MOVS R0, #0
            ROM:08042736 STR R0, [SP]
            ROM:08042738 MOVS R0, #0x13
            ROM:0804273A MOVS R1, #0
            ROM:0804273C MOVS R2, #ability_cloudnine
            ROM:0804273E MOVS R3, #0
            ROM:08042740 BL ability_something
            ROM:08042744 LSLS R0, R0, #0x18
            ROM:08042746 LSRS R0, R0, #0x18
            ROM:08042748 CMP R0, #0
            ROM:0804274A BNE return_0
            ROM:0804274C STR R0, [SP]
            ROM:0804274E MOVS R0, #0x13
            ROM:08042750 MOVS R1, #0
            ROM:08042752 MOVS R2, #ability_airlock
            ROM:08042754 MOVS R3, #0
            ROM:08042756 BL ability_something
            ROM:0804275A LSLS R0, R0, #0x18
            ROM:0804275C CMP R0, #0
            ROM:0804275E BEQ loc_8042764
            ROM:08042760
            ROM:08042760 return_0: @ CODE XREF: castform_switch+18j
            ROM:08042760 @ castform_switch+22j ...
            ROM:08042760 MOVS R0, #0
            ROM:08042762 B end
            ROM:08042764 @ ---------------------------------------------------------------------------
            ROM:08042764
            ROM:08042764 loc_8042764: @ CODE XREF: castform_switch+A2j
            ROM:08042764 LDR R1, =weather
            ROM:08042766 LDRH R0, [R1]
            ROM:08042768 MOVS R2, #weather_flags_rain|weather_flags_downpour|weather_flags_permament_rain|weather_flags_sun|weather_flags_permament_sun|weather_flags_hail
            ROM:0804276A ANDS R2, R0
            ROM:0804276C MOVS R4, R1
            ROM:0804276E CMP R2, #0
            ROM:08042770 BNE check_sun
            ROM:08042772 LDR R1, =battle_data
            ROM:08042774 MOVS R0, #sizeof(battle_participant)
            ROM:08042776 MULS R0, R6
            ROM:08042778 ADDS R1, R0, R1
            ROM:0804277A MOVS R3, R1
            ROM:0804277C ADDS R3, #battle_participant.type1
            ROM:0804277E LDRB R0, [R3]
            ROM:08042780 CMP R0, #types_normal
            ROM:08042782 BEQ check_sun
            ROM:08042784 ADDS R1, #battle_participant.type2
            ROM:08042786 LDRB R0, [R1]
            ROM:08042788 CMP R0, #types_normal
            ROM:0804278A BEQ check_sun
            ROM:0804278C STRB R2, [R3]
            ROM:0804278E STRB R2, [R1]
            ROM:08042790 MOVS R5, #1
            ROM:08042792
            ROM:08042792 check_sun: @ CODE XREF: castform_switch+B4j
            ROM:08042792 @ castform_switch+C6j ...
            ROM:08042792 LDRH R1, [R4]
            ROM:08042794 MOVS R0, #weather_flags_sun|weather_flags_permament_sun
            ROM:08042796 ANDS R0, R1
            ROM:08042798 CMP R0, #0
            ROM:0804279A BEQ check_rain
            ROM:0804279C LDR R1, =battle_data
            ROM:0804279E MOVS R0, #sizeof(battle_participant)
            ROM:080427A0 MULS R0, R6
            ROM:080427A2 ADDS R1, R0, R1
            ROM:080427A4 MOVS R2, R1
            ROM:080427A6 ADDS R2, #battle_participant.type1
            ROM:080427A8 LDRB R0, [R2]
            ROM:080427AA CMP R0, #types_fire
            ROM:080427AC BEQ check_rain
            ROM:080427AE ADDS R1, #battle_participant.type2
            ROM:080427B0 LDRB R0, [R1]
            ROM:080427B2 CMP R0, #types_fire
            ROM:080427B4 BEQ check_rain
            ROM:080427B6 MOVS R0, #types_fire
            ROM:080427B8 STRB R0, [R2]
            ROM:080427BA STRB R0, [R1]
            ROM:080427BC MOVS R5, #2
            ROM:080427BE
            ROM:080427BE check_rain: @ CODE XREF: castform_switch+DEj
            ROM:080427BE @ castform_switch+F0j ...
            ROM:080427BE LDRH R1, [R4]
            ROM:080427C0 MOVS R0, #weather_flags_rain|weather_flags_downpour|weather_flags_permament_rain
            ROM:080427C2 ANDS R0, R1
            ROM:080427C4 CMP R0, #0
            ROM:080427C6 BEQ check_hail
            ROM:080427C8 LDR R1, =battle_data
            ROM:080427CA MOVS R0, #sizeof(battle_participant)
            ROM:080427CC MULS R0, R6
            ROM:080427CE ADDS R1, R0, R1
            ROM:080427D0 MOVS R2, R1
            ROM:080427D2 ADDS R2, #battle_participant.type1
            ROM:080427D4 LDRB R0, [R2]
            ROM:080427D6 CMP R0, #types_water
            ROM:080427D8 BEQ check_hail
            ROM:080427DA ADDS R1, #battle_participant.type2
            ROM:080427DC LDRB R0, [R1]
            ROM:080427DE CMP R0, #types_water
            ROM:080427E0 BEQ check_hail
            ROM:080427E2 MOVS R0, #types_water
            ROM:080427E4 STRB R0, [R2]
            ROM:080427E6 STRB R0, [R1]
            ROM:080427E8 MOVS R5, #3
            ROM:080427EA
            ROM:080427EA check_hail: @ CODE XREF: castform_switch+10Aj
            ROM:080427EA @ castform_switch+11Cj ...
            ROM:080427EA LDRH R1, [R4]
            ROM:080427EC MOVS R0, #weather_flags_hail
            ROM:080427EE ANDS R0, R1
            ROM:080427F0 CMP R0, #0
            ROM:080427F2 BEQ return
            ROM:080427F4 LDR R1, =battle_data
            ROM:080427F6 MOVS R0, #sizeof(battle_participant)
            ROM:080427F8 MULS R0, R6
            ROM:080427FA ADDS R1, R0, R1
            ROM:080427FC MOVS R2, R1
            ROM:080427FE ADDS R2, #battle_participant.type1
            ROM:08042800 LDRB R0, [R2]
            ROM:08042802 CMP R0, #types_ice
            ROM:08042804 BEQ return
            ROM:08042806 ADDS R1, #battle_participant.type2
            ROM:08042808 LDRB R0, [R1]
            ROM:0804280A CMP R0, #types_ice
            ROM:0804280C BEQ return
            ROM:0804280E MOVS R0, #types_ice
            ROM:08042810 STRB R0, [R2]
            ROM:08042812 STRB R0, [R1]
            ROM:08042814 MOVS R5, #4
            ROM:08042816
            ROM:08042816 return: @ CODE XREF: castform_switch+136j
            ROM:08042816 @ castform_switch+148j ...
            ROM:08042816 ADDS R0, R5, #0
            ROM:08042818
            ROM:08042818 end: @ CODE XREF: castform_switch+6Cj
            ROM:08042818 @ castform_switch+A6j
            ROM:08042818 ADD SP, SP, #4 @ returns
            ROM:08042818 @ 0 if no change
            ROM:08042818 @ 1 if normal and no weather
            ROM:08042818 @ 2 if fire change
            ROM:08042818 @ 3 if water change
            ROM:08042818 @ 4 if hail change
            ROM:0804281A POP {R4-R6}
            ROM:0804281C POP {R1}
            ROM:0804281E BX R1


            If you're wondering how I got that, it's from emerald IDA, a very useful tool. Anyway, there are three important labels there, chack hail, check sun and check rain. First, they check if Castform already has type related to the weather and if it does, they don't do anything. If it has a different type, it'll change them.
            Take a look at that part from check_hail:
            ROM:0804280E MOVS R0, #types_ice
            ROM:08042810 STRB R0, [R2]
            ROM:08042812 STRB R0, [R1]
            #types_ice in reality is a value of 0x0F, it's just there to make code reading easier. STRB means that it stores this value at addresses in r2 and r1 which are responsible for pokemon types in battle. All you'd have to do is hook somewhere there and change the value of second type. If you know ASM, this shouldn't be that hard, if you don't however, I suggest you take a look at ASM tutorials.
            Reply With Quote
              #810    
            Old February 12th, 2016 (12:28 PM).
            Substitute Doll's Avatar
            Substitute Doll Substitute Doll is offline
            An Alolan Exeggutor
               
              Join Date: May 2015
              Location: Under an alolan exeggutor
              Gender: Male
              Nature: Bashful
              Posts: 119
              Quote:
              Originally Posted by Zaazaa0 http://www.pokecommunity.com/showthread.php?p=9114016#post9114016
              Castform Stuff
              Here is more Castform stuff, the routines FOR FIRERED

              This is Castform_Transform as named in IDA
              Spoiler:
              ROM:0802CF30
              ROM:0802CF30
              ROM:0802CF30 atkE6_castform_transform: @ DATA XREF: ROM:move_cmdso
              ROM:0802CF30 PUSH {R4,LR}
              ROM:0802CF32 LDR R4, =b_active_side
              ROM:0802CF34 LDR R0, =byte_2023FC4
              ROM:0802CF36 LDRB R0, [R0,#23]
              ROM:0802CF38 STRB R0, [R4]
              ROM:0802CF3A LDR R1, =battle_data
              ROM:0802CF3C LDRB R2, [R4]
              ROM:0802CF3E MOVS R0, #sizeof(battle_data_t)
              ROM:0802CF40 MULS R0, R2
              ROM:0802CF42 ADDS R1, #battle_data_t.status2
              ROM:0802CF44 ADDS R0, R0, R1
              ROM:0802CF46 LDR R0, [R0]
              ROM:0802CF48 MOVS R1, #substitute
              ROM:0802CF4C ANDS R0, R1
              ROM:0802CF4E LDR R3, =dp08_ptr
              ROM:0802CF50 CMP R0, #0
              ROM:0802CF52 BEQ loc_802CF60
              ROM:0802CF54 LDR R0, [R3]
              ROM:0802CF56 ADDS R0, #0x7F @ ''
              ROM:0802CF58 LDRB R1, [R0]
              ROM:0802CF5A MOVS R2, #0x80 @ 'Ç'
              ROM:0802CF5C ORRS R1, R2
              ROM:0802CF5E STRB R1, [R0]
              ROM:0802CF60
              ROM:0802CF60 loc_802CF60: @ CODE XREF: atkE6_castform_transform+22j
              ROM:0802CF60 LDR R0, [R3]
              ROM:0802CF62 ADDS R0, #0x7F @ ''
              ROM:0802CF64 LDRB R2, [R0]
              ROM:0802CF66 MOVS R0, #0
              ROM:0802CF68 MOVS R1, #0
              ROM:0802CF6A BL dp01_build_cmdbuf_x34_a_bb_aka_battle_anim
              ROM:0802CF6E LDRB R0, [R4]
              ROM:0802CF70 BL dp01_battle_side_mark_buffer_for_execution
              ROM:0802CF74 LDR R1, =b_movescr_cursor
              ROM:0802CF76 LDR R0, [R1]
              ROM:0802CF78 ADDS R0, #1
              ROM:0802CF7A STR R0, [R1]
              ROM:0802CF7C POP {R4}
              ROM:0802CF7E POP {R0}
              ROM:0802CF80 BX R0
              ROM:0802CF80 @ End of function atkE6_castform_transform
              ROM:0802CF80
              ROM:0802CF80 @ ---------------------------------------------------------------------------
              ROM:0802CF82 .align 4
              ROM:0802CF84 off_802CF84: .long b_active_side @ DATA XREF: atkE6_castform_transform+2r
              ROM:0802CF88 off_802CF88: .long byte_2023FC4 @ DATA XREF: atkE6_castform_transform+4r
              ROM:0802CF8C off_802CF8C: .long battle_data @ DATA XREF: atkE6_castform_transform+Ar
              ROM:0802CF90 off_802CF90: .long dp08_ptr @ DATA XREF: atkE6_castform_transform+1Er
              ROM:0802CF94 off_802CF94: .long b_movescr_cursor @ DATA XREF: atkE6_castform_transform+44r


              This is Castform_Switch as named in IDA
              Spoiler:
              ROM:0802CF98
              ROM:0802CF98 @ =============== S U B R O U T I N E =======================================
              ROM:0802CF98
              ROM:0802CF98
              ROM:0802CF98 atkE7_castform_switch: @ DATA XREF: ROM:move_cmdso
              ROM:0802CF98 PUSH {R4,LR}
              ROM:0802CF9A LDR R1, =b_movescr_cursor
              ROM:0802CF9C LDR R0, [R1]
              ROM:0802CF9E ADDS R0, #1
              ROM:0802CFA0 STR R0, [R1]
              ROM:0802CFA2 LDR R0, =byte_2023FC4
              ROM:0802CFA4 LDRB R0, [R0,#(battle_side_unknown - byte_2023FC4)]
              ROM:0802CFA6 BL castform_switch
              ROM:0802CFAA LSLS R0, R0, #0x18
              ROM:0802CFAC LSRS R4, R0, #0x18
              ROM:0802CFAE CMP R4, #0
              ROM:0802CFB0 BEQ dont_load_script
              ROM:0802CFB2 LDR R0, =castform_script
              ROM:0802CFB4 BL b_push_move_exec
              ROM:0802CFB8 LDR R0, =dp08_ptr
              ROM:0802CFBA LDR R0, [R0]
              ROM:0802CFBC ADDS R0, #0x7F @ ''
              ROM:0802CFBE SUBS R1, R4, #1
              ROM:0802CFC0 STRB R1, [R0]
              ROM:0802CFC2
              ROM:0802CFC2 dont_load_script: @ CODE XREF: atkE7_castform_switch+18j
              ROM:0802CFC2 POP {R4}
              ROM:0802CFC4 POP {R0}
              ROM:0802CFC6 BX R0
              ROM:0802CFC6 @ End of function atkE7_castform_switch
              ROM:0802CFC6
              ROM:0802CFC6 @ ---------------------------------------------------------------------------
              ROM:0802CFC8 off_802CFC8: .long b_movescr_cursor @ DATA XREF: atkE7_castform_switch+2r
              ROM:0802CFCC off_802CFCC: .long byte_2023FC4 @ DATA XREF: atkE7_castform_switch+Ar
              ROM:0802CFD0 off_802CFD0: .long castform_script @ DATA XREF: atkE7_castform_switch+1Ar
              ROM:0802CFD4 off_802CFD4: .long dp08_ptr @ DATA XREF: atkE7_castform_switch+20r


              Like Dizzy, I got these routines using IDA, and if anyone would like to add on, they can.
              __________________
              The Chat
              Reply With Quote
                #811    
              Old February 15th, 2016 (2:41 PM).
              GoGoJJTech's Avatar
              GoGoJJTech GoGoJJTech is offline
              (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
               
              Join Date: Nov 2012
              Location: Earth
              Age: 19
              Gender: Female
              Nature: Jolly
              Posts: 2,475
              In Emerald, there are three map names that are hidden on the hoenn map.
              The three values at 0x085A1C34 are map names. 0xC8, 0xC9, and 0xD3.
              0xC8 is "NAVEL ROCK"
              0xC9 is "MT. EMBER"
              0xD3 is "TANOBY CHAMBERS"
              IDK if you can get to these locations in Emerald (or if you can even open the map in them via fly) but there you have that. I can be completely wrong here
              __________________
              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 - Youtube Channel

              Support me at my site!
              Pokémon Platinum Red and Blue
              Reply With Quote
                #812    
              Old February 15th, 2016 (2:55 PM).
              GoGoJJTech's Avatar
              GoGoJJTech GoGoJJTech is offline
              (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
               
              Join Date: Nov 2012
              Location: Earth
              Age: 19
              Gender: Female
              Nature: Jolly
              Posts: 2,475
              Quote:
              Originally Posted by Team Fail View Post
              Navel Rock is where you can get Ho-oh and Lugia, Tanoby Chambers and Mt. Ember are only in Fire Red and I think are inaccessible.
              Would there be a reason for these to be hidden on the Hoenn map? I don't see why it's necessary to have this list, even if it's a tiny one like this.
              __________________
              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 - Youtube Channel

              Support me at my site!
              Pokémon Platinum Red and Blue
              Reply With Quote
                #813    
              Old February 15th, 2016 (7:12 PM).
              Joexv's Avatar
              Joexv Joexv is offline
              joexv.github.io
               
              Join Date: Oct 2012
              Location: Oregon
              Age: 20
              Gender: Male
              Nature: Sassy
              Posts: 1,029
              Not sure why im doing all this again, but oh well. May come in handy to someone.
              Plus these are gonna be more of notes for me:
              To remove the platform that Professor Oak/The hero sprites stand on in the intro place 0x00 at 0x812F832
              To stop Oaks palette from loading NOP out 6 bytes at 0x813126C
              (To restore it 24 48 60 21 40 22)
              To remove Oak I cannot find a decent place to NOP out his call, so just blank him out with unlz

              For anyone whos reading this and is wanting to mess with the intro. Doing these things is not the best way to do it. Write a custom one with C or ASM DO NOT mess with this one to a great extent unless you know what you are doing!


              The bytes around 0x130203 seem to have an effect on what sprite is displayed.
              For example I changed the 48 to 42 and it swapped the player to the VS.Seeker animation(I think I havent actually played FR to know this or not)

              So I may get more documentation on it eventually but I dont have much as of now.
              __________________
              I'm bored
              Jesus Christ is my Savior
              Bros with Percy

              My Rom hacks
              A New Dawn---Gentlemon
              Not in Production:
              Blackened Night---Holiday Hacks
              Reply With Quote
                #814    
              Old February 25th, 2016 (6:18 AM).
              NewDenverCity's Avatar
              NewDenverCity NewDenverCity is offline
                 
                Join Date: Apr 2014
                Location: Antarctica
                Gender: Male
                Nature: Calm
                Posts: 329
                So I watched all the battle animations that I could find.
                Spoiler:
                Code:
                0x1C68F4-0x1C6E7F is the move animation table
                0x1C6E80 is a continuation of the move animation table.
                 0x1D53D9 - cartoonish hit mark on the enemy
                 0x1D5A44 - poison animation on yourself
                 0x1D5A6F - confusion birds
                 0x1D5A78 - burn status
                 0x1D5AA8 - three hearts rising from self, probably infatuation
                 0x1D5ADD - sleep 'Z's rising
                 0x1D5B09 - paralyze static stuff
                 0x1D5B23 - large blocks of ice over opponent, probably freeze animation
                 0x1D5B3E - ghost rises, curse effect
                 0x1D5B63 - another ghost rises? different ghost, same sound effect
                playanimation stuff:
                 0x1D5B88 - transform animation, makes your palette black
                 0x1D5BBE - nothing
                 0x1D5BC7 - slowly vanishes, then reappears by sliding in from the side
                 0x1D5C04 - turns self into pokedoll
                 0x1D5C0C - turns into a black hexagon, enemy bounces twice. maybe pokeblock throwing?
                 0x1D5C54 - bag falls out of enemy, bounces to the right
                 0x1D5C5F - wrap effect
                 0x1D5DF2 - bides twice, stars, then circle around user
                 0x1D5E66 - puffs of smoke appear all over your sprite, then you disappear
                 0x1D5F42 - slowly turns red and backs to the left(right if it's the enemy) and then goes to normal position
                 0x1D5F8F - rain
                 0x1D5FD8 - sunlight
                 0x1D5FDD - sandstorm
                 0x1D5FE2 - hail
                 0x1D5FE7 - hits self with absorb?
                 0x1D5FF5 - same as 0x1D52D9
                 0x1D6026 - bag pops out of your pokemon, it lands on you, wiggles, then vanishes.
                 0x1D604B - opponent flies around the screen in a circle
                 0x1D60A9 - psychic background, enemy shakes
                 0x1D6108 - background fades to white, gray streaks appear, enemy explodes
                 0x1D61CD - storing energy
                 0x1D620D - absorbing particles from enemy
                 0x1D6250 - glittering particles around you, healing sound
                 0x1D628A - turns blue, shakes, water comes out of you
                 0x1D6301 - scary face appears above enemy, enemy does extrasensory effect, you then perform 0x1D628A
                 0x1D637B - transform animation, turns into enemy. it keeps the direction the enemy was facing and doesn't change palette.
                 0x1D6394 - turns into a rock, throwing sound, hitting sound, then the game freezes.
                 0x1D63DC - tilts sideways twice, then goes back to normal.
                Some other table, can be used by playanimation as well
                 0x1D64B6 - level up sound and whatnot, only effects the bar on the sides.
                 0x1D64D7 - animation looks like you're going back into your pokeball
                 0x1D64E8 - goes back into pokeball, comes back after the enemy is defeated, but lower and pink.
                 0x1D64F9 - throws pokeball, other pokemon goes inside of the ball, then immediately comes out.
                 0x1D657B - turns into a pokeball, the game freezes.
                 0x1D6594 - slides out, then back in.
                 0x1D659E - slides out, then a substitute slides back in.
                Reply With Quote
                  #815    
                Old February 28th, 2016 (5:41 AM). Edited February 28th, 2016 by DizzyEgg.
                DizzyEgg's Avatar
                DizzyEgg DizzyEgg is offline
                   
                  Join Date: Feb 2014
                  Location: Poland
                  Age: 20
                  Gender: Male
                  Nature: Quiet
                  Posts: 733
                  Pokemon Emerald
                  cmd8a
                  Spoiler:
                  In XSE this command is said to do nothing which is false. It takes three arguments and creates a planted Berry.
                  1.byte - plant ID
                  2.byte - berry ID
                  3.byte - berry state:
                  no berry: 0
                  planted: 1
                  sprouted: 2
                  grew taller: 3
                  bloomed: 4
                  pickable: 5
                  Berry creation can happen both off and on-screen.


                  Berry data
                  Spoiler:

                  Berry data is located sy 0x0858A654. It has 44 entries while the first one isn't technically an entry but just text: "have the power of stars", so the actual table starts at 0x0858A670. Entries are enumerated like this:
                  Spoiler:

                  00000000 name: .byte 7 dup(?)
                  00000007 firmness: .byte ?
                  00000008 size: .short ?
                  0000000A max_yield: .byte ? @ XREF: get_planted_berry_yield+C/r
                  0000000B min_yield: .byte ? @ XREF: get_planted_berry_yield+A/r
                  0000000C description1: .long ? @ offset (00000000)
                  00000010 description2: .long ? @ offset (00000000)
                  00000014 hours_stage: .byte ? @ XREF: get_berry_minutes_stage+A/r
                  00000015 spicy_level: .byte ?
                  00000016 dry_level: .byte ?
                  00000017 sweet_level: .byte ?
                  00000018 bitter_level: .byte ?
                  00000019 sour_level: .byte ?
                  0000001A field_1A: .short ?
                  0000001C berries_data ends



                  copyvarifnotzero
                  Spoiler:
                  There's a scripting command 0x1A called copyvarifnotzero but it's a wrong name as it doesn't copy vars. It takes two arguments:
                  1. word = var
                  2. word = var or number
                  It simply sets the var specified in the first arguments to value in the second. The more appropiate name would be 'setvar2'. It's different from 'setvar' as it's able to read the second arguments from a var.
                  Reply With Quote
                    #816    
                  Old March 2nd, 2016 (10:46 AM).
                  Telinc1's Avatar
                  Telinc1 Telinc1 is offline
                  Weirdo Extraordinaire
                     
                    Join Date: Jun 2013
                    Location: Sofia, Bulgaria
                    Gender: Male
                    Nature: Bold
                    Posts: 167
                    About time I finally decide to actually find something on my own! Put 00 00 00 00 at 080F8121, 080F8168, 08056C96 and 080F82BE to completely skip looking for location previews. Useful for people who don't want them and don't want to wipe out the table. I've tested it pretty well and I haven't yet noticed any side effects from doing it. And just a warning, I haven't confirmed whether the table (it's at 0x0843E9E8 by the way) actually gets read or not, so I'd advise against using it as free space.
                    __________________

                    Check out my hacks by clicking on the userbar!
                    Check out my new website (this link now works!)!
                    Reply With Quote
                      #817    
                    Old March 4th, 2016 (9:41 PM). Edited July 8th, 2016 by AkameTheBulbasaur.
                    AkameTheBulbasaur's Avatar
                    AkameTheBulbasaur AkameTheBulbasaur is offline
                    Akame Marukawa of Iyotono
                       
                      Join Date: May 2013
                      Location: A place :D
                      Age: 21
                      Gender: Male
                      Nature: Gentle
                      Posts: 347
                      Quote:
                      Originally Posted by Telinc1 View Post
                      About time I finally decide to actually find something on my own! Put 00 00 00 00 at 080F8121, 080F8168, 08056C96 and 080F82BE to completely skip looking for location previews. Useful for people who don't want them and don't want to wipe out the table. I've tested it pretty well and I haven't yet noticed any side effects from doing it. And just a warning, I haven't confirmed whether the table (it's at 0x0843E9E8 by the way) actually gets read or not, so I'd advise against using it as free space.
                      Branching off of this post, the Location Preview table is structured with three pointers for each entry. (EDIT: The first four bytes are explained in the post below this.) The second pointer is to the image of the preview, the third is to a Tilemap for the image, and the last is to the image's palette.

                      Spoiler:

                      1. Viridian Forest
                      2. Mt. Moon
                      3. Diglett's Cave
                      4. Rock Tunnel
                      5. Pokemon Tower
                      6. Safari Zone
                      7. Seafoam Islands
                      8. Pokemon Mansion
                      9. Rocket Hideout (Kanto)
                      10. Silph Co.
                      11. Victory Road
                      13. Cerulean Cave
                      14. Power Plant
                      15. Mt. Ember
                      16. Rocket Hideout (Sevii Isles)
                      17. Tanoby Ruins
                      18. Dotted Hole
                      19. Berry Forest
                      20. Icefall Cave
                      21. Lost Cave
                      22. Altering Cave
                      23. Another location using the Viridian Forest Preview
                      24. One of the Tanoby Chambers
                      25. One of the Tanoby Chambers
                      26. One of the Tanoby Chambers
                      27. One of the Tanoby Chambers
                      28. One of the Tanoby Chambers
                      29. One of the Tanoby Chambers


                      I haven't been able to successfully insert a new Location Preview, or change the maps that they appear on (if anybody has any info on that I'd love to know), but I'm sure it's probably possible.

                      Changing the pre-existing images on the pre-existing maps with Location Previews is as easy as copying the image, tilemap and palette pointers and replacing another entry on the list with them.
                      __________________
                      "The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
                      Reply With Quote
                        #818    
                      Old March 5th, 2016 (12:58 AM).
                      azurile13 azurile13 is offline
                         
                        Join Date: Mar 2015
                        Posts: 420
                        Quote:
                        Originally Posted by AkameTheBulbasaur View Post
                        Branching off of this post, the Location Preview table is structured with four pointers for each entry. I don't know what the first pointer is exactly (but I believe it has something to do with which map name the Location Preview appears in upon entering). The second pointer is to the image of the preview, the third is to a Tilemap for the image, and the last is to the image's palette.

                        Spoiler:

                        1. Viridian Forest
                        2. Mt. Moon
                        3. Diglett's Cave
                        4. Rock Tunnel
                        5. Pokemon Tower
                        6. Safari Zone
                        7. Seafoam Islands
                        8. Pokemon Mansion
                        9. Rocket Hideout (Kanto)
                        10. Silph Co.
                        11. Victory Road
                        13. Cerulean Cave
                        14. Power Plant
                        15. Mt. Ember
                        16. Rocket Hideout (Sevii Isles)
                        17. Tanoby Ruins
                        18. Dotted Hole
                        19. Berry Forest
                        20. Icefall Cave
                        21. Lost Cave
                        22. Altering Cave
                        23. Another location using the Viridian Forest Preview
                        24. One of the Tanoby Chambers
                        25. One of the Tanoby Chambers
                        26. One of the Tanoby Chambers
                        27. One of the Tanoby Chambers
                        28. One of the Tanoby Chambers
                        29. One of the Tanoby Chambers


                        I haven't been able to successfully insert a new Location Preview, or change the maps that they appear on (if anybody has any info on that I'd love to know), but I'm sure it's probably possible.

                        Changing the pre-existing images on the pre-existing maps with Location Previews is as easy as copying the image, tilemap and palette pointers and replacing another entry on the list with them.
                        That’s because the first four bytes are not a pointer.
                        Code:
                        0x0: map_name (byte)
                        0x1: map_transition (byte)
                        0x2: worldmap_flag (short)
                        0x4: img_ptr (long)
                        0x8: tile_ptr (long)
                        0xC: palettes_ptr (long)
                        Examples:
                        worldmap flag 0x8A5 = Viridian Forest
                        worldmap flag 0x8A9 = Mt. Moon
                        worldmap flag 0x8B0 = Rock Tunnel
                        Reply With Quote
                          #819    
                        Old March 5th, 2016 (7:53 AM).
                        Telinc1's Avatar
                        Telinc1 Telinc1 is offline
                        Weirdo Extraordinaire
                           
                          Join Date: Jun 2013
                          Location: Sofia, Bulgaria
                          Gender: Male
                          Nature: Bold
                          Posts: 167
                          Quote:
                          Originally Posted by azurile13 View Post
                          That’s because the first four bytes are not a pointer.
                          Code:
                          0x0: map_name (byte)
                          0x1: map_transition (byte)
                          0x2: worldmap_flag (short)
                          0x4: img_ptr (long)
                          0x8: tile_ptr (long)
                          0xC: palettes_ptr (long)
                          Examples:
                          worldmap flag 0x8A5 = Viridian Forest
                          worldmap flag 0x8A9 = Mt. Moon
                          worldmap flag 0x8B0 = Rock Tunnel
                          Some of this is documented here (that's where I got the table offset from). This is nice though, as that post doesn't really mention the purpose of the first couple of bytes that much (what does the game need the world map flag for, though?). Just so people don't have to go there to see, the map_transition is 0 for caves (screen fades to white and then transitions to black before fading out) and 1 for everything else (screen just fades to the map). Other values make the game ignore the picture (according to the post; I'll research that a bit, because I'm not sure how much the author of that post knew about the table's structure, so maybe other values do mean something else or can be hooked into).
                          __________________

                          Check out my hacks by clicking on the userbar!
                          Check out my new website (this link now works!)!
                          Reply With Quote
                            #820    
                          Old March 5th, 2016 (10:07 AM).
                          DizzyEgg's Avatar
                          DizzyEgg DizzyEgg is offline
                             
                            Join Date: Feb 2014
                            Location: Poland
                            Age: 20
                            Gender: Male
                            Nature: Quiet
                            Posts: 733
                            Pokemon Emerald
                            cmdc3 increments a counter specified in the argument(0 for the first counter ,1 for the second counter, etc.) by 1. There are 64 in-game encrypted counters, though only the first 51 can be accessed.

                            cmdb2 it's a nop

                            cmdb1 a buggy command that gets the value of first argument three times and doesn't return it in any way

                            cmd24 probably gotoasm
                            __________________
                            Support Pokeruby!

                            My works:
                            Battle Engine Upgrade
                            Pokemon Expansion
                            Items/TMs/Tutors Expansion
                            Various Features(Evo Methods, BW Repel, Levels Above 100, Trainers with EV, Nature Colored Stats)

                            Emerald Features:
                            Form Changes (KDS)
                            Reply With Quote
                              #821    
                            Old March 5th, 2016 (1:34 PM).
                            azurile13 azurile13 is offline
                               
                              Join Date: Mar 2015
                              Posts: 420
                              Quote:
                              Originally Posted by Telinc1 View Post
                              Some of this is documented here (that's where I got the table offset from). This is nice though, as that post doesn't really mention the purpose of the first couple of bytes that much (what does the game need the world map flag for, though?). Just so people don't have to go there to see, the map_transition is 0 for caves (screen fades to white and then transitions to black before fading out) and 1 for everything else (screen just fades to the map). Other values make the game ignore the picture (according to the post; I'll research that a bit, because I'm not sure how much the author of that post knew about the table's structure, so maybe other values do mean something else or can be hooked into).
                              I don't know what specifically it needs the worldmap flag for. I only know because I saw it load the halfword then use it as an argument for the flag check routine. See 0x080F8582. I didn't really read beyond that, as it seems sufficient for any table extension you'd want to do.

                              The transition byte, I don't really know. It seems to always be fed as an argument 0 or 1. Although you could theoretically add new ways of loading the map, I'm not sure why you would need to.

                              Quick scan:
                              0x080F8104: 0x1B, number of entries (zero indexed)
                              0x080F8108: 0x1C, 1 more than number of pics, indicates no pic
                              0x080F8126: 0x1C, check for no matching pic
                              0x080F81AC: 0x1C, check for no matching pic
                              0x080F8552: 0x1C, check for no matching pic
                              0x080F857A: 0x1C, check for no matching pic

                              Note that I literally looked for these while typing up the post, so I may have missed something.
                              Reply With Quote
                                #822    
                              Old March 24th, 2016 (6:16 AM). Edited March 24th, 2016 by Xencleamas.
                              Xencleamas's Avatar
                              Xencleamas Xencleamas is offline
                              Suddenly lurking in the shadows...
                                 
                                Join Date: Feb 2014
                                Location: Asgard
                                Gender: Male
                                Nature: Adamant
                                Posts: 457
                                Field Move Selection Table

                                One more thing about expanding the move name list: Do you remember selecting field moves from Pokemon menu, right? You can clear the original and old move name table to have more free space. However, after that, the selection becomes blank, right? Want to know why? It is because there is a table in the ROM to load the selection of field moves. Here's the table:

                                Code:
                                3F 98 31 08 71 54 1B 08 00 9F 31 08 71 54 1B 08
                                21 A4 31 08 71 54 1B 08 0A 9B 31 08 71 54 1B 08
                                61 9A 31 08 71 54 1B 08 73 98 31 08 71 54 1B 08
                                43 A6 31 08 71 54 1B 08 EF 9D 31 08 71 54 1B 08
                                90 9C 31 08 71 54 1B 08 1B 9C 31 08 71 54 1B 08
                                36 A6 31 08 71 54 1B 08 0C A2 31 08 71 54 1B 08
                                57 9E 31 08 71 54 1B 08 2A A3 31 08 71 54 1B 08
                                *Emerald's Field Move Selection Table

                                The table contains two pointers for each slot: the first pointer leads to a string of a move's name, actually inside the move name table; and, the second pointer... I dunno what it actually does but further investigation (it leads to an ASM routine I suppose), and every slot has the same pointer. For real, that table is part of the Pokemon Menu selection table (Shift, Summary, Exit, etc.). Here's the location of the field move selection table:

                                Code:
                                Emerald: 0x08615CA0 (14 field moves available)
                                FireRed: 0x0845A6A8 (12 field moves available)
                                LeafGreen: 0x0845A138 (12 field moves available)
                                Ruby: 0x0839F4FC (14 field moves available)
                                Sapphire: 0x0839F344 (14 field moves available)
                                Here's then the list of the second pointer for those who care:

                                Code:
                                Emerald: 0x081B5471
                                FireRed: 0x081245A5
                                LeafGreen: 0x081245F5
                                Ruby: 0x0808A9A5
                                Sapphire: 0x0808A9A5
                                Only thing you need to do is to find the new string of the move, and replace the first pointer with the pointer of the location of the new string. In the easy way, you just need to multiply the slot number of a field move by 0xD. It is because that is the limit of the string. Add it by the location of a move table. Then, convert it into pointer and place it in the table. This maybe sound confusing since the table is arranged in how the HMs are unlock according to badges, plus non-HM field moves. In the list, the HMs go first then the other field moves (Secret Power, Teleport, Milk Drink) comes last. Here is the list of how the slots were ordered:

                                Code:
                                R/S/E:		FR/LG:
                                Cut		Flash
                                Flash		Cut
                                Rock Smash	Fly
                                Strength	Strength
                                Surf		Surf
                                Fly		Rock Smash
                                Dive		Waterfall
                                Waterfall	Teleport
                                Teleport	Dig
                                Dig		Milk Drink
                                Secret Power	Softboiled
                                Milk Drink	Sweet Scent
                                Softboiled
                                Sweet Scent
                                To be helpful, I made an ASM routine that will generate the table according to your customized location of your move name table. To note that this is NOT actually an ASM routine that programs stuff but generating a table:

                                Routines:
                                Spoiler:
                                Emerald:
                                Spoiler:
                                Code:
                                .text
                                .align 2
                                .thumb
                                .thumb_func
                                .global fieldmovetable
                                
                                @ Insert entire data at 0x08615CA0
                                
                                .equ NewMoveTable, 0x0831977C @ Insert the offset of your new Move Name table location.
                                .equ SuchPointer, 0x081B5471 @ I dunno what it does but will investigate it later. No need to change.
                                .equ StringLimit, 0xD @ Character limit of each slot from the Move Name table. No need to change.
                                .equ CutID, 0xF
                                .equ FlashID, 0x94
                                .equ RockSmashID, 0xF9
                                .equ StrengthID, 0x46
                                .equ SurfID, 0x39
                                .equ FlyID, 0x13
                                .equ DiveID, 0x123
                                .equ WaterfallID, 0x7F
                                .equ TeleportID, 0x64
                                .equ DigID, 0x5B
                                .equ SecretPowerID, 0x122
                                .equ MilkDrinkID, 0xD0
                                .equ SoftboiledID, 0x87
                                .equ SweetScentID, 0xE6
                                
                                Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
                                Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
                                RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
                                Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
                                Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
                                Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
                                Dive: .word NewMoveTable + (StringLimit * DiveID), SuchPointer
                                Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
                                Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
                                Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
                                SecretPower: .word NewMoveTable + (StringLimit * SecretPowerID), SuchPointer
                                MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
                                Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
                                SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer


                                FireRed:
                                Spoiler:
                                Code:
                                .text
                                .align 2
                                .thumb
                                .thumb_func
                                .global fieldmovetable
                                
                                @ Insert entire data at 0x0845A6A8
                                
                                .equ NewMoveTable, 0x08247094 @ Insert the offset of your new Move Name table location.
                                .equ SuchPointer, 0x081245A5 @ I dunno what it does but will investigate it later.
                                .equ StringLimit, 0xD
                                .equ FlashID, 0x94
                                .equ CutID, 0xF
                                .equ FlyID, 0x13
                                .equ StrengthID, 0x46
                                .equ SurfID, 0x39
                                .equ RockSmashID, 0xF9
                                .equ WaterfallID, 0x7F
                                .equ TeleportID, 0x64
                                .equ DigID, 0x5B
                                .equ MilkDrinkID, 0xD0
                                .equ SoftboiledID, 0x87
                                .equ SweetScentID, 0xE6
                                
                                Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
                                Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
                                Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
                                Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
                                Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
                                RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
                                Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
                                Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
                                Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
                                MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
                                Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
                                SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer


                                LeafGreen:
                                Spoiler:
                                Code:
                                .text
                                .align 2
                                .thumb
                                .thumb_func
                                .global fieldmovetable
                                
                                @ Insert entire data at 0x0845A138
                                
                                .equ NewMoveTable, 0x082470E0 @ Insert the offset of your new Move Name table location.
                                .equ SuchPointer, 0x081245F5 @ I dunno what it does but will investigate it later.
                                .equ StringLimit, 0xD
                                .equ FlashID, 0x94
                                .equ CutID, 0xF
                                .equ FlyID, 0x13
                                .equ StrengthID, 0x46
                                .equ SurfID, 0x39
                                .equ RockSmashID, 0xF9
                                .equ WaterfallID, 0x7F
                                .equ TeleportID, 0x64
                                .equ DigID, 0x5B
                                .equ MilkDrinkID, 0xD0
                                .equ SoftboiledID, 0x87
                                .equ SweetScentID, 0xE6
                                
                                Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
                                Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
                                Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
                                Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
                                Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
                                RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
                                Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
                                Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
                                Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
                                MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
                                Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
                                SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer


                                Ruby:
                                Spoiler:
                                Code:
                                .text
                                .align 2
                                .thumb
                                .thumb_func
                                .global fieldmovetable
                                
                                @ Insert entire data at 0x0839F4FC
                                
                                .equ NewMoveTable, 0x081F8338 @ Insert the offset of your new Move Name table location.
                                .equ SuchPointer, 0x0808A9A5 @ I dunno what it does but will investigate it later. No need to change.
                                .equ StringLimit, 0xD @ Character limit of each slot from the Move Name table. No need to change.
                                .equ CutID, 0xF
                                .equ FlashID, 0x94
                                .equ RockSmashID, 0xF9
                                .equ StrengthID, 0x46
                                .equ SurfID, 0x39
                                .equ FlyID, 0x13
                                .equ DiveID, 0x123
                                .equ WaterfallID, 0x7F
                                .equ TeleportID, 0x64
                                .equ DigID, 0x5B
                                .equ SecretPowerID, 0x122
                                .equ MilkDrinkID, 0xD0
                                .equ SoftboiledID, 0x87
                                .equ SweetScentID, 0xE6
                                
                                Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
                                Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
                                RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
                                Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
                                Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
                                Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
                                Dive: .word NewMoveTable + (StringLimit * DiveID), SuchPointer
                                Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
                                Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
                                Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
                                SecretPower: .word NewMoveTable + (StringLimit * SecretPowerID), SuchPointer
                                MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
                                Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
                                SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer


                                Sapphire:
                                Spoiler:
                                Code:
                                .text
                                .align 2
                                .thumb
                                .thumb_func
                                .global fieldmovetable
                                
                                @ Insert entire data at 0x0839F344
                                
                                .equ NewMoveTable, 0x081F82C8 @ Insert the offset of your new Move Name table location.
                                .equ SuchPointer, 0x0808A9A5 @ I dunno what it does but will investigate it later. No need to change.
                                .equ StringLimit, 0xD @ Character limit of each slot from the Move Name table. No need to change.
                                .equ CutID, 0xF
                                .equ FlashID, 0x94
                                .equ RockSmashID, 0xF9
                                .equ StrengthID, 0x46
                                .equ SurfID, 0x39
                                .equ FlyID, 0x13
                                .equ DiveID, 0x123
                                .equ WaterfallID, 0x7F
                                .equ TeleportID, 0x64
                                .equ DigID, 0x5B
                                .equ SecretPowerID, 0x122
                                .equ MilkDrinkID, 0xD0
                                .equ SoftboiledID, 0x87
                                .equ SweetScentID, 0xE6
                                
                                Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
                                Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
                                RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
                                Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
                                Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
                                Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
                                Dive: .word NewMoveTable + (StringLimit * DiveID), SuchPointer
                                Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
                                Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
                                Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
                                SecretPower: .word NewMoveTable + (StringLimit * SecretPowerID), SuchPointer
                                MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
                                Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
                                SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer


                                I wonder if it can be expanded though to add more field moves like Rock Climb, Defog, etc. Alright! That's it! Hope you've understand what it just wrote.
                                __________________

                                Xencleamas Untitled Pokémon Fan Game (Coming Soon!) Untitled Region (Coming Soon!)
                                Reply With Quote
                                  #823    
                                Old March 24th, 2016 (6:45 AM).
                                DizzyEgg's Avatar
                                DizzyEgg DizzyEgg is offline
                                   
                                  Join Date: Feb 2014
                                  Location: Poland
                                  Age: 20
                                  Gender: Male
                                  Nature: Quiet
                                  Posts: 733
                                  Quote:
                                  Originally Posted by Sky High View Post
                                  stuff
                                  So, I'll be addressing Emerald. The actual table starts at 0x08615C08 and contains all pokemon menu options. It goes like this:
                                  ptr to text
                                  ptr to function to execute
                                  Field moves are also in that table. It seems the order of those options displayed is determined somewhere else.
                                  0x081B5470 is a function that's executed upon selecting a field move. This function checks obtained badges, whether you can use the move here, executes appropriate script, etc. I may try to look around to find the limiter.
                                  Reply With Quote
                                    #824    
                                  Old March 24th, 2016 (9:34 AM).
                                  FBI's Avatar
                                  FBI FBI is offline
                                  Free supporter
                                   
                                  Join Date: Jan 2013
                                  Location: Unknown Island
                                  Gender: Male
                                  Posts: 1,863
                                  Quote:
                                  Originally Posted by DizzyEgg View Post
                                  So, I'll be addressing Emerald. The actual table starts at 0x08615C08 and contains all pokemon menu options. It goes like this:
                                  ptr to text
                                  ptr to function to execute
                                  Field moves are also in that table. It seems the order of those options displayed is determined somewhere else.
                                  0x081B5470 is a function that's executed upon selecting a field move. This function checks obtained badges, whether you can use the move here, executes appropriate script, etc. I may try to look around to find the limiter.
                                  I found this stuff for FR and expanded it successfully. Check the ASM resource thread, I have a post there titled field moves, it may be useful as it's probably 1:1 with EM. Also we need a better organisation of things discovered. That's like the 5th person who's trying to expand field moves now :D
                                  __________________
                                  ...
                                  Reply With Quote
                                    #825    
                                  Old March 24th, 2016 (10:39 AM).
                                  Spherical Ice's Avatar
                                  Spherical Ice Spherical Ice is offline
                                   
                                  Join Date: Nov 2007
                                  Location: Bristol, UK
                                  Age: 20
                                  Posts: 5,220
                                  When a new save is generated, the default wallpapers for the storage system will loop through the first four wallpapers for every box. This always annoyed me way back when I first played FRLG; it felt like they were just wasting the assets.

                                  To make the boxes use wallpapers 1 through 14, change the byte at 0x8C836 to 0xD (you can make it higher but as there are only fourteen boxes, it won't really affect anything). As the wallpapers are assigned at the time of generating the save, this will only affect new saves.
                                  __________________

                                  A Pokemon that is discriminated!
                                  Support squirtle and make it everyone's favourite.
                                  Reply With Quote
                                  Reply

                                  Quick Reply

                                  Join the conversation!

                                  Create an account to post a reply in this thread, participate in other discussions, and more!

                                  Create a PokéCommunity Account

                                  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 GMT -8. The time now is 9:24 PM.