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!

Draconius GO
Reply
 
Thread Tools
  #101    
Old January 27th, 2014 (10:37 PM).
Tlachtli's Avatar
Tlachtli Tlachtli is offline
Crit happens.
     
    Join Date: Jan 2012
    Location: Faraway place
    Age: 27
    Gender: Male
    Nature: Lax
    Posts: 267
    Quote:
    Originally Posted by bcrobert View Post
    Does this help? My additions are in bold. I haven't tested these myself but I believe they're correct. Thought I'd chime in since you saved me the trouble of tracking down the limiter.
    Check my post from earlier if you aren't sure. It has the table locations and lengths for BPEE, and they all work.
    __________________
    Pokemon Sigma Σmerald:
    (now under management by DraconianWing)

    A Gen 3 remake de-make, featuring many new encounters and Gen VI mechanics

    Reply With Quote

    Relevant Advertising!

      #102    
    Old July 2nd, 2014 (7:55 PM). Edited July 3rd, 2014 by Phenom2122.
    Phenom2122's Avatar
    Phenom2122 Phenom2122 is offline
       
      Join Date: Jun 2014
      Gender: Male
      Nature: Quiet
      Posts: 45
      Quote:
      Originally Posted by BugMania View Post
      The second routine is almost the same of the routine of the Jambo 51, ​​so this does not do the calculations, only handle the movements directly in 0x02FF7d24.
      Sorry to quote you from so long ago, I am busy porting all this ASM to Emerald and your ASM is the last one I need to do.
      May I ask why that offset in particular? Does that just point to unused space in Fire Red?

      Well in any case, here are the ASM scripts with the correct Emerald offsets. My hack progress is nowhere near the point I can actually test this but maybe someone can make use of it in the mean time, the offsets are sound.
      @Jambo51's first ASM:
      Spoiler:
      Code:
      .text
      .align 2
      .thumb
      .thumb_func
      .global newmovesetstyle
      main:
       mov r1, r9
       lsl r1, r1, #0x2
       ldr r0, table
       add r0, r0, r1
       ldr r0, [r0, #0x0]
       ldr r6, there
       add r6, #0x6
       ldrb r7, [r6, #0x0]
      loop: lsl r1, r7, #0x1
       add r1, r1, r7
       add r3, r0, r1
       ldrb r1, [r3, #0x2]
       mov r4, r10
       cmp r4, r1
       beq learn
       cmp r1, #0xFF
       beq exit
       add r7, #0x1
       b loop
      learn: ldr r2, there
       add r7, #0x1
       strb r7, [r6, #0x0]
       ldrb r1, [r3, #0x1]
       lsl r1, r1, #0x8
       ldrb r0, [r3, #0x0]
       orr r0, r1
       strh r0, [r2, #0x0]
       ldr r1, return
       bx r1
      exit: ldr r0, return2
       bx r0
      .align
      return:  .word 0x080693F5
      return2: .word 0x08069403
      table:  .word 0x8FFFFFF
      there:  .word 0x020244E2
      Change 0x693B0 to 18 49 08 47
      Then navigate to 0x69414 and change it to XX XX XX 08, where the XX XX XX stands for the pointer to your new routine plus 1.

      Then, from what I've read, instead of Jambo's second ASM routine we first need this one by @BugMania (there are ram offsets in this script that I assume point to free space in Fire Red, for now I am assuming the same for Emerald):
      Spoiler:
      Code:
      .text
      .align 2
      .thumb
      
      Matriz:
      mov r3, #0x0
      ldr r1, Contador2
      str r3, [r1]
      ldr r1, moves
      str r3, [r1]
      add r1, #0x4
      str r3, [r1]
      add r1, #0x4
      str r3, [r1]
      add r1, #0x4
      str r3, [r1]
      LDR R1, movesettable
      ADD R1, R6, R1
      LDR r2, [R1]
      LDR r3, var
      STR r2, [r3]
      Start:
      mov r2, r10
      LDR r3, var
      LDR r3, [r3]
      LDRB r3, [r3, #0x2]
      CMP r3, r2
      BLS Frente
      ldr r1, var
      ldr r2, [r1]
      sub r2, #0x3
      str r2, [r1]
      B Compare
      Frente:
      LDR r2, var
      LDR r2, [r2]
      ADD r2, #0x3
      LDR r3, var
      STR r2, [r3]
      B Start
      Compare:
      LDR r2, Contador
      LDRB r2, [r2]
      CMP r2, #0x4
      BEQ end
      LDR r2, var
      LDR r2, [r2]
      LDRH r2, [r2]
      LDR r3, moves
      LDRH r3, [r3]
      LDR R7, Contador2
      LDRB R7, [R7]
      ADD r3, R7, r3
      CMP r2, r3
      BEQ Traz
      LDR R7, Contador2
      LDRB R7, [R7]
      ADD R7, #0x3
      LDR r2, Contador2
      STRH R7, [r2]
      LDR R7, Contador2
      LDRB R7, [R7]
      CMP R7, #0xC
      Blo Compare
      LDR R7, Contador2
      MOV r2, #0x0
      STRB r2, [R7]
      B Insert
      end:
      MOV r3, #0x0
      LDR r2, Contador
      STR r3, [r2]
      ldr r1, var
      ldr r2, [r1]
      add r2, #0x3
      str r2, [r1]
      LDR R1, movesettable
      ADD R1, R6, R1
      LDR r2, [R1]
      ldr r1, var
      ldr r3, [r1]
      cmp r3, r2
      bhs end1
      str r2, [r1]
      end1:
      mov r2, #0x0
      mov r3, #0x0
      mov r4, #0x0
      mov r7, #0x0
      LDR R1, Go
      bx r1
      Traz:
      LDR r1, var
      LDR r2, [r1]
      sub r2, #0x3
      str r2, [r1]
      B Compare
      
      
      Insert:
      LDR R7, Contador
      LDRB R7, [R7]
      MOV r2, #0x3
      MUL R7, r2, R7
      LDR r3, moves
      ADD r3, R7, r3
      LDR r2, var
      LDR r2, [r2]
      LDRB r2, [r2]
      STRB r2, [r3]
      LDR r2, var
      LDR r2, [r2]
      LDRB r2, [r2, #0x1]
      STRB r2, [r3, #0x1]
      LDR r2, var
      LDR r2, [r2]
      LDRB R2, [R2, #0x2]
      STRB R2, [R3, #0x2]
      LDR R7, Contador
      LDRH R7, [R7]
      ADD R7, #0x1
      LDR r2, Contador
      STRB R7, [r2]
      b Traz
      
      .align 2
      var: .word 0x02FF7d24
      Contador2: .word 0x02FF7D2C
      moves: .word 0x02FF7D50
      movesettable: .word 0x08FFFFFF
      Contador: .word 0x02FF7D28
      Go: .word 0xJAMBO51ROUTINEOFFSET
      Change 0x692A0 to 00 49 08 47 XX XX XX 08 where the XX XX XX stands for the pointer to your new routine plus 1.

      Then Jambo's second routine slightly modified by BugMania:
      Spoiler:
      Code:
      .text
      .align 2
      .thumb
      .thumb_func
      .global newmovesetstyle2
      main:
      ldrb r1, [r0, #0x2]
      mov r2, #0xFF
      cmp r1, r2
      beq exit2
      mov r9, r2
      mov r3, #0x0
      loop: lsl r0, r3, #0x1
      add r0, r0, r3
      ldr r1, =0x02FF7D24
      ldr r1, [r1, #0x0]
      add r7, r0, r1
      ldrb r0, [r7, #0x2]
      mov r4, r10
      cmp r0, r4
      bgt exit2
      ldrb r1, [r7, #0x1]
      ldrb r0, [r7, #0x0]
      lsl r1, r1, #0x8
      orr r1, r0
      mov r0, r8
      str r3, [sp, #0x0]
      bl branchone
      mov r5, r9
      ldr r3, [sp, #0x0]
      cmp r0, r9
      bne exit
      mov r0, r8
      add r1, r4, #0x0
      bl branchtwo
      ldr r3, [sp, #0x0]
      exit: add r3, #0x1
      lsl r1, r3, #0x1
      add r1, r1, r3
      add r0, r7, r1
      ldrb r0, [r0, #0x2]
      cmp r0, r5
      bne loop
      exit2: add sp, #0x4
      pop {r3-r5}
      mov r8, r3
      mov r9, r4
      mov r10, r5
      pop {r4-r7}
      pop {r0}
      bx r0
      branchone: push {r4-r7,lr}
      add sp, #-0x4
      ldr r7, gothere
      bx r7
      branchtwo: push {r4-r7}
      ldr r7, gothere2
      bx r7
      .align
      gothere: .word 0x08069145
      gothere2: .word 0x080694D3
      movesettable: .word 0x08FFFFFF
      This will fix the moveset loading to it can now support up to 0xFFFF moves (instead of 0x1FF).

      Then Jambo's final routine:
      Spoiler:
      Code:
       .text
      .align 2
      .thumb
      .thumb_func
      .global newmovesetstyle
      main:
       lsl r2, r5, #0x1
       add r2, r2, r5
       ldr r1, [sp, #0x10]
       add r0, r2, r1
       ldrb r0, [r0, #0x2]
       ldr r1, [sp, #0xC]
       add r7, r2, #0x0
       add r5, #0x1
       mov r12, r5
       cmp r0, r1
       bgt later
       mov r4, #0x0
       cmp r1, r0
       beq later2
       mov r4, #0x1
       neg r4, r4
       ldr r0, [sp, #0x14]
       ldr r1, table
       add r6, r0, r1
       mov r3, sp
       sub r3, #0x2
       add r5, r7, #0x0
      there: add r3, #0x2
       add r4, #0x1
       cmp r4, #0x3
       bgt later2
       ldr r0, [r6, #0x0]
       add r0, r5, r0
       ldrb r2, [r0, #0x0]
       ldrb r0, [r0, #0x1]
       lsl r0, r0, #0x8
       orr r0, r2
       ldrh r2, [r3, #0x0]
       cmp r0, r2
       bne there
      later2: cmp r4, #0x4
       bne later
       mov r4, #0x0
       cmp r4, r10
       bge later3
       mov r1, r9
       ldr r0, [r1, #0x0]
       add r0, r7, r0
       ldrb r2, [r0, #0x0]
       ldrb r1, [r0, #0x1]
       lsl r1, r1, #0x8
       orr r1, r2
       ldr r0, [sp, #0x8]
       ldrh r2, [r0, #0x0]
       cmp r1, r2
       beq later3
       ldr r1, [sp, #0x14]
       ldr r2, table
       add r6, r1, r2
       ldr r3, [sp, #0x8]
       add r5, r7, #0x0
      there2: add r3, #0x2
       add r4, #0x1
       cmp r4, r10
       bge later3
       ldr r0, [r6, #0x0]
       add r0, r5, r0
       ldrb r2, [r0, #0x0]
       ldrb r0, [r0, #0x1]
       lsl r0, r0, #0x8
       orr r0, r2
       ldrh r2, [r3, #0x0]
       cmp r0, r2
       bne there2
      later3: cmp r4, r10
       bne later
       mov r0, r10
       add r0, #0x1
       mov r10, r0
       lsl r2, r4, #0x1
       ldr r1, [sp, #0x8]
       add r2, r2, r1
       mov r4, r9
       ldr r0, [r4, #0x0]
       add r0, r7, r0
       ldrb r1, [r0, #0x0]
       ldrb r0, [r0, #0x1]
       lsl r0, r0, #0x8
       orr r0, r1
       strh r0, [r2, #0x0]
      later: mov r5, r12
       mov r1, r9
       ldr r0, [r1, #0x0]
       lsl r1, r5, #0x1
       add r1, r1, r5
       add r1, r1, r0
       ldrb r0, [r1, #0x2]
       cmp r0, #0xFF
       bne main
       mov r0, r10
       add sp, #0x18
       pop {r3-r5}
       mov r8, r3
       mov r9, r4
       mov r10, r5
       pop {r4-r7}
       pop {r1}
       bx r1
      .align
      table: .word 0x08FFFFFF
      Change 0x06E118 to 00 4A 10 47 XX XX XX 08 where the XX XX XX stands for the pointer to your new routine plus 1.

      Hopefully this can be useful to someone. I will test it myself soon.
      Reply With Quote
        #103    
      Old September 15th, 2014 (8:44 PM).
      Artemis64 Artemis64 is offline
         
        Join Date: Mar 2014
        Location: Singapore
        Gender: Male
        Nature: Hasty
        Posts: 86
        For some reason, my Pokemon don't learn any new moves after inserting Phenom2122's ASM routines. The same thing occurs when I use Jambo51's routine with Emerald's offsets. Exactly what is wrong?
        Reply With Quote
          #104    
        Old October 11th, 2014 (10:11 AM).
        Chaos Rush's Avatar
        Chaos Rush Chaos Rush is offline
           
          Join Date: May 2007
          Gender: Male
          Posts: 1,303
          So for those of you having the problem where Pokémon don't learn moves upon level-up if you expanded to more than 512 moves, I think I've found a fix.

          (for FireRed)
          1. Insert Jambo's routines from the first post, but for the 2nd routine use Doesnt's routine seen here: http://www.pokecommunity.com/showpost.php?p=7982882&postcount=90
          2. Put 2E D1 at 0803EAE8

          Things I tested:
          *givepokemon command
          *opponent Trainer's Pokémon with non-custom moveset
          *wild Pokémon

          Everything seems to be working correctly, Pokémon learn their correct moves even if it's a move past #512 regardless of what level they were generated at.

          I'm not fully sure why this works, so use at your own risk. Also make sure that you give PP to your moves past #512 (or even the ones past #355, which is Psycho Boost, the last move of Gen III) because you might mistake the opponent's use of Struggle as a "glitch".
          __________________
          Reply With Quote
            #105    
          Old October 11th, 2014 (6:39 PM). Edited October 13th, 2014 by Christos.
          Artemis64 Artemis64 is offline
             
            Join Date: Mar 2014
            Location: Singapore
            Gender: Male
            Nature: Hasty
            Posts: 86
            The corresponding offset seems to be 0x69378 for Emerald

            Phenom2122's routines cause my Pokemon not to learn any moves at all. Then, after using Chaos Rush's method and using the offset 69378 for Emerald, my Pokemon learn Growl every time they level up. Chaos Rush, can you please tell me how you found the above bytes so I can apply the same method to Emerald?

            Edit: Scratch that, it seems that Pokemon learn their first move in the learnset as per the regular learnset style instead every time they level up. There is something we're missing for Emerald.
            Reply With Quote
              #106    
            Old October 13th, 2014 (5:48 AM).
            Chaos Rush's Avatar
            Chaos Rush Chaos Rush is offline
               
              Join Date: May 2007
              Gender: Male
              Posts: 1,303
              Quote:
              Originally Posted by Artemis64 View Post
              Phenom2122's routines cause my Pokemon not to learn any moves at all. Then, after using Chaos Rush's method and using the offset 69378 for Emerald, my Pokemon learn Growl every time they level up. Chaos Rush, can you please tell me how you found the above bytes so I can apply the same method to Emerald?

              Edit: Scratch that, it seems that Pokemon learn their first move in the learnset as per the regular learnset style instead every time they level up. There is something we're missing for Emerald.
              The problem is that Phenom's routines are BugMania's routines. My fix is for DoesntKnowHowToPlay's routine, which is different.
              __________________
              Reply With Quote
                #107    
              Old October 13th, 2014 (6:19 AM). Edited October 13th, 2014 by DoesntKnowHowToPlay.
              DoesntKnowHowToPlay's Avatar
              DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
              Tiny Umbrella with Lots and Lots of Good
                 
                Join Date: Jan 2012
                Posts: 258
                Use Phenom's, my fixes were meant for the 649 match, which has tweaks that Jambo didn't document. I'd repost my stuff but I haven't tested it sufficiently to feel comfortable with it.

                edit: give me a sec actually and I'll post what I have since it looks like nothing's working.

                Spoiler:
                Code:
                .org 0x3ea88
                push {r4-r7, lr}
                mov r7, r10
                mov r6, r9
                mov r5, r8
                push {r5-r7}
                add sp, #-0x4
                mov r8, r0
                lsl r4, r1, #0x18
                lsr r4, r4, #0x18
                
                #r8 == pointer to mon
                #r4 == restarting or not
                
                mov r0, #0x0
                str r0, [sp, #0x0]
                mov r0, r8
                mov r1, #0xb
                mov r2, #0x0
                bl 0x3fbe8
                
                lsl r0, r0, #0x10
                lsr r0, r0, #0x10
                mov r9, r0
                mov r0, r8
                mov r1, #0x38
                mov r2, #0x0
                bl 0x3fbe8
                
                lsl r0, r0, #0x18
                lsr r0, r0, #0x18
                mov r10, r0
                
                #r4 = restarting or not
                #r8 = pointer to mon
                #r9 = species
                #r10 = exp level of mon
                
                cmp r4, #0x0
                beq Continue
                
                Restart:
                ldr r4, .PositionPointer
                mov r1, sp
                ldrb r1, [r1, #0x0]
                strb r1, [r4, #0x0]
                b Merge
                
                Continue:
                ldr r4, .PositionPointer
                ldrb r1, [r4, #0x0]
                add r1, r1, #0x1
                strb r1, [r4, #0x0]
                
                Merge:
                
                
                Loop:
                ldr r1, .MovepoolTable
                mov r2, r9
                lsl r2, r2, #0x2
                add r0, r1, r2
                ldr r0, [r0, #0x0]
                
                ldrb r5, [r4, #0x0]
                mov r3, #0x3
                mul r3, r5
                add r0, r3
                ldrb r1, [r0, #0x2]
                
                mov r6, #0xFF
                cmp r1, r6
                beq Abort
                cmp r1, r10
                beq Learn
                
                add r5, r5, #0x1
                strb r5, [r4, #0x0]
                b Loop
                
                Learn:
                ldrb r1, [r0, #0x0]
                ldrb r0, [r0, #0x1]
                lsl r0, r0, #0x8
                orr r1, r0, r1
                ldr r0, .MoveStorage
                strh r1, [r0, #0x0]
                
                mov r0, r8
                bl 0x3e89c
                lsl r0, #0x10
                lsr r0, #0x10
                str r0, [sp, #0x0]
                
                Abort:
                
                
                End:
                ldr r0, [sp, #0x0]
                add sp, #0x4
                pop {r3-r5}
                mov r8, r3
                mov r9, r4
                mov r10, r5
                pop {r4-r7}
                pop {r1}
                bx r1
                
                .align 2
                .PositionPointer: .word 0x02024028
                .MoveStorage: .word 0x02024022
                .MovepoolTable: .word 0x0825d7b4
                This rewrite of FR's level-up moves (Jambo's first routine) is shorter than the vanilla implementation, and as such fits right on top of it. Change .MovepoolTable to point to your movepool table ofc. Be aware that if you use G3S to expand your dex, you will need to reinsert this routine, as it blindly overwrites part of the routine that clips into an offset in the old stuff. Note that you might be better off with my old routine + Chaos Rush's byte tweak in the preceding post, but if that doesn't work for whatever reason I'm dumping this here.
                __________________

                Yet Another Fire Red Hack

                Physical/Special Split
                Reply With Quote
                  #108    
                Old October 14th, 2014 (6:14 PM).
                Artemis64 Artemis64 is offline
                   
                  Join Date: Mar 2014
                  Location: Singapore
                  Gender: Male
                  Nature: Hasty
                  Posts: 86
                  I know that your fix is for Doesnt's routines, I was saying that when I both attempted Phenom's and your methods on Emerald with byte to byte corresponding offsets, the learnset either entirely failed (Phenom's method) or Pokemon learnt the first move in their learnset according to the old learnset style every time they leveled up (Chaos Rush's method).
                  Edit: My Emerald ROM is also manually patched for extra Pokemon & Pokedex Entries (i.e. 649 patch)
                  Reply With Quote
                    #109    
                  Old October 14th, 2014 (9:11 PM).
                  Chaos Rush's Avatar
                  Chaos Rush Chaos Rush is offline
                     
                    Join Date: May 2007
                    Gender: Male
                    Posts: 1,303
                    Quote:
                    Originally Posted by Artemis64 View Post
                    I know that your fix is for Doesnt's routines, I was saying that when I both attempted Phenom's and your methods on Emerald with byte to byte corresponding offsets, the learnset either entirely failed (Phenom's method) or Pokemon learnt the first move in their learnset according to the old learnset style every time they leveled up (Chaos Rush's method).
                    Edit: My Emerald ROM is also manually patched for extra Pokemon & Pokedex Entries (i.e. 649 patch)
                    Did you make sure you redid the movesets after checking "Use Jambo51 move hack" in PGE or opening up G3HS's ini and setting "Jambo51movehack" (or whatever it says) to "true"? I haven't tested your offset for Emerald but on FireRed they learn all moves just fine, not just the first one.

                    I came up with the fix by using VBA's disassembler to look at the original code that is modified to branch to the 2nd(Doesnt's) routine and a 'be' (branch if equal) command that somehow wasn't performing right most likely due to the other byte changes required for the 512+ move expansion, my byte fix simply changes it to a 'bne' (branch if not equal) command. I might have gotten those two commands mixed up in my explanation because I honestly don't remember which one was in the original code and which one was the one I changed it to, and I can't check right now because I'm typing this on my phone.

                    Anyhow I'll look into it soon if it's still not working for Emerald.
                    __________________
                    Reply With Quote
                      #110    
                    Old October 15th, 2014 (3:24 PM).
                    Artemis64 Artemis64 is offline
                       
                      Join Date: Mar 2014
                      Location: Singapore
                      Gender: Male
                      Nature: Hasty
                      Posts: 86
                      I just wrote a learnset from scratch in the new style then pointed a Pokemon (Swampert) learnset to it.
                      Here's the learnset:
                      Spoiler:
                      2D 00 01 BD 00 01 21 00 01 37 00 01 BD 00 06 37 00 0A 75 00 0F 55 01 10 C1 00 14 AA 01 19 24 00 1F 4A 01 27 B6 00 2E 59 00 34 1B 01 3D 67 01 45 00 00 FF

                      The problem is that both G3HS and PGE crash if I enable the new learnset style in the ini file and open an Emerald ROM. I think it's because they aren't adapted to use the Emerald offsets or something?
                      Reply With Quote
                        #111    
                      Old October 27th, 2014 (4:37 PM). Edited February 4th, 2015 by MrDollSteak.
                      MrDollSteak's Avatar
                      MrDollSteak MrDollSteak is offline
                      Formerly known as 11bayerf1
                         
                        Join Date: Dec 2008
                        Location: Hong Kong
                        Age: 22
                        Gender: Male
                        Posts: 817
                        Quote:
                        Originally Posted by Chaos Rush View Post
                        Did you make sure you redid the movesets after checking "Use Jambo51 move hack" in PGE or opening up G3HS's ini and setting "Jambo51movehack" (or whatever it says) to "true"? I haven't tested your offset for Emerald but on FireRed they learn all moves just fine, not just the first one.

                        I came up with the fix by using VBA's disassembler to look at the original code that is modified to branch to the 2nd(Doesnt's) routine and a 'be' (branch if equal) command that somehow wasn't performing right most likely due to the other byte changes required for the 512+ move expansion, my byte fix simply changes it to a 'bne' (branch if not equal) command. I might have gotten those two commands mixed up in my explanation because I honestly don't remember which one was in the original code and which one was the one I changed it to, and I can't check right now because I'm typing this on my phone.

                        Anyhow I'll look into it soon if it's still not working for Emerald.
                        What I've found is that no matter what level the Pokemon appears at, it has the first four moves of its moveset. Which means that Doesn'ts routine doesn't really port to Emerald all that well, even with the byte fix. In fact the byte fix doesn't do anything if its D0 or D1.

                        The port seems to be correct though as everything else works fine otherwise, including level-up moves.

                        EDIT: Doesn't has updated his post now, so it works fine.
                        __________________
                        Reply With Quote
                          #112    
                        Old November 4th, 2014 (3:02 AM).
                        Artemis64 Artemis64 is offline
                           
                          Join Date: Mar 2014
                          Location: Singapore
                          Gender: Male
                          Nature: Hasty
                          Posts: 86
                          Are you sure you used the right offset? And what you say seems to be correct, except that I'm talking about the move(s) that Pokemon learn when they level up. I don't know about wild Pokemon or received Pokemon.
                          Reply With Quote
                            #113    
                          Old November 9th, 2014 (11:42 PM).
                          Lance32497's Avatar
                          Lance32497 Lance32497 is offline
                          LanceKoijer of Pokemon_Addicts
                             
                            Join Date: Aug 2014
                            Location: Criscanto town-Ginoa Region xD
                            Gender: Male
                            Nature: Adamant
                            Posts: 793
                            Quote:
                            Originally Posted by Gamer2020 View Post
                            Well guys I have made some progress on BSE!

                            It now compiles! I tested it a little while ago with this very simple script.

                            Code:
                            #org 0x800000
                            capture
                            end
                            It's still very basic in nature though and not every command is implemented. It is still a step in helping everyone be able to create their own move effects. These are the commands I have implemented to far. They're kind of blah so please give me some feedback on their names.
                            (Credit to JPAN and Jambo51 for their research!)

                            Code:
                            "&H0" = "unknownCommand0x00NoArgs"
                            "&H1" = "SomeCompare"
                            "&H2" = "usedattackmsg"
                            "&H3" = "hitmisscalc"
                            "&H4" = "critcalc" 
                            "&H5" = "basedmgcalc"
                            "&H6" = "typedmgcalc"
                            "&H7" = "effectcheck1"
                            "&H8" = "effectcheck2"
                            "&H9" = "baexe"
                            "&HA" = "turncheck" 
                            "&HB" = "healthbardec"
                            "&HC" = "healthvaldec"
                            "&HD" = "critcheck"
                            "&HE" = "unkloopcheck"
                            "&H10" = "msgdisplay" 
                            "&H12" = "seffectmsgdisplay" 
                            "&H1A" = "faintdisplay" 
                            "&H23" = "battleendfunc" 
                            "&H24" = "ifwildend" 
                            "&H26" = "storebyteforjump"
                            "&H27" = "jumpifbyte"
                            "&H28" = "goto" 
                            "&H2E" = "storebyte" 
                            "&H2F" = "addbyte"
                            "&H30" = "subtractbyte"
                            "&H31" = "copyarray"
                            "&H32" = "addarray" 
                            "&H39" = "pause" 
                            "&H3A" = "wait" 
                            "&H3C" = "return1" 
                            "&H3D" = "return2" 
                            "H3F" = "end"
                            "&H41" = "call" 
                            "&H45" = "animationprint"
                            "&H4C" = "pokemondataswitch"
                            "&H4D" = "pokemonbattledataswitch"
                            "&H4E" = "pokemonandhealthbardisplay"
                            "&H53" = "trainerdisplay"
                            "&H55" = "lvlupsnd"
                            "&H56" = "pkmfntsnd"
                            "&H57" = "flee"
                            "&H5C" = "hitflash"
                            "&H61" = "pkmswianimation"
                            "&H91" = "givemoney"
                            "&HEF" = "capture"
                            WOW! Looks amazing.... but......
                            Sorry for being noobish in my question, the codes are for reqular scripts?can i use XSE with these? if it is, what would be the meaning of the codes you listed above like "baexe" what is that? and if I use these code, what would be the entire script? Can you give a script of existing move in FR so that I can compare and create my own move effects
                            Reply With Quote
                              #114    
                            Old February 3rd, 2015 (2:55 AM).
                            You Watanabe's Avatar
                            You Watanabe You Watanabe is offline
                            Now Leaving...
                               
                              Join Date: Feb 2014
                              Location: Shiganshina District, Wall Maria
                              Gender: Female
                              Nature: Adamant
                              Posts: 430
                              Quote:
                              Originally Posted by MrDollSteak View Post
                              What I've found is that no matter what level the Pokemon appears at, it has the first four moves of its moveset. Which means that Doesn'ts routine doesn't really port to Emerald all that well, even with the byte fix. In fact the byte fix doesn't do anything if its D0 or D1.

                              The port seems to be correct though as everything else works fine otherwise, including level-up moves.
                              Little help... I have inserted this to Emerald and really works (I swear)... I have tried what Chaos did... but then when I level up any Pokemon, it learns the level 1 move even if the pokemon levels up (level 3 or up). Noted that I have ported Jambo's 1st and 3rd routine, Doesnt's modified 2nd routine, and Chaos' byte change (and I personally found the correct offsets for Emerald). I reverted the byte back to D0 and still having Doesnt's routine... the Pokemon don't learn anything only while leveling up. And I haven't tried the original second routine to see if it works. What went wrong anyway? :/

                              Here's my personal offsets:
                              Code:
                              return:  .word 0x0803EB65	693F5
                              return2: .word 0x0803EB73	69403
                              table:  .word 0x08FFFFFF	1808600
                              there:  .word 0x02024022	244E2
                              
                              0x3EB20				693B0
                              0x3EB84				69414
                              
                              gothere: .word 0x0803E8B5	69145
                              gothere2: .word 0x0803EC43	69427
                              movesettable: .word 0x0825D7B4	1808600
                              
                              0x3EA10				692A0
                              0x3EAE8				69378
                              
                              table: .word 0x08FFFFFF		1808600
                              
                              0x43CE8				6E118
                              __________________

                              Userpage


                              Pokémon Dark Jade Version (Coming Soon!)


                              The Omsoc Empire (Coming Soon!)
                              Reply With Quote
                                #115    
                              Old February 3rd, 2015 (7:38 AM).
                              GoGoJJTech's Avatar
                              GoGoJJTech GoGoJJTech is offline
                              (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                              • Gold Tier
                               
                              Join Date: Nov 2012
                              Location: Earth
                              Age: 19
                              Gender: Female
                              Nature: Jolly
                              Posts: 2,477
                              Quote:
                              Originally Posted by Lance32497 View Post
                              WOW! Looks amazing.... but......
                              Sorry for being noobish in my question, the codes are for reqular scripts?can i use XSE with these? if it is, what would be the meaning of the codes you listed above like "baexe" what is that? and if I use these code, what would be the entire script? Can you give a script of existing move in FR so that I can compare and create my own move effects
                              This is for creating moves. You use Battle Script Pro by Jambo51. Not XSE.

                              Do not ask Jambo for anything; he's quit hacking and he'll only get aggravated with you. Go to his thread instead if you really want to learn about making battle scripts.
                              __________________
                              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
                                #116    
                              Old February 9th, 2015 (6:33 PM).
                              CloverCamerupt's Avatar
                              CloverCamerupt CloverCamerupt is offline
                                 
                                Join Date: Jan 2015
                                Gender: Male
                                Posts: 32
                                This looks a bit daunting but i think i can pull it off since my hack is planned to have a few new attacks, is there any way to implement more move graphics into free space somehow?
                                Reply With Quote
                                  #117    
                                Old February 10th, 2015 (2:39 PM).
                                GoGoJJTech's Avatar
                                GoGoJJTech GoGoJJTech is offline
                                (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                                • Gold Tier
                                 
                                Join Date: Nov 2012
                                Location: Earth
                                Age: 19
                                Gender: Female
                                Nature: Jolly
                                Posts: 2,477
                                Quote:
                                Originally Posted by CloverCamerupt View Post
                                This looks a bit daunting but i think i can pull it off since my hack is planned to have a few new attacks, is there any way to implement more move graphics into free space somehow?
                                If you're referring to attack sprites and graphics like the shadow ball spike thingydoodler etc, MrDollSteak has a tutorial on adding new ones.
                                __________________
                                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
                                  #118    
                                Old May 7th, 2015 (8:42 PM).
                                Edan's Avatar
                                Edan Edan is offline
                                   
                                  Join Date: Aug 2013
                                  Gender: Male
                                  Posts: 12
                                  I cannot for the life of me understand any of the hex manipulation involved in this. Is there really no tool out there that can do this? I have a .DS_Store file and a bunch of .BS files for Gen IV moves and I want to use those to add said moves to Emerald, but this is just too confusing for me. Could anybody with expertise about this perhaps make a tool, or at the very least, a video guide for the layman?
                                  Reply With Quote
                                    #119    
                                  Old May 15th, 2015 (3:50 PM).
                                  Artemis64 Artemis64 is offline
                                     
                                    Join Date: Mar 2014
                                    Location: Singapore
                                    Gender: Male
                                    Nature: Hasty
                                    Posts: 86
                                    You can't simply import the moves from Gen IV games using their files because all the move data is stored in certain tables which are limited in size. In order to add more moves we have to change the locations of aforementioned tables into areas in the ROMs where there is more space so we can add more data. After which, we need to change the pointers in the ROM to where the new expanded table is (think of moving your browser, then changing the shortcut on the Desktop, assuming you use Windows, to where the browser's program files now are) in a process called repointing. Then, we have to change the number of moves the programs in the ROM can read from the tables by removing the limiters- think of having a 600 GB hard disk, but your programs can only read from the first 200 GB. We have to alter the routines so they read the rest of the tables. This can be quite a lengthy and complicated process, and thus is not for people who want to simply add the Gen IV moves in so they can use their Dark Pulse in the Gen III games. Not to mention the differences in the four move tables (move names, move data, move animations, move descriptions).
                                    Reply With Quote
                                      #120    
                                    Old August 28th, 2015 (6:00 PM).
                                    Againsts's Avatar
                                    Againsts Againsts is offline
                                       
                                      Join Date: Aug 2015
                                      Gender: Female
                                      Posts: 27
                                      Hello everyone, I am a Chinese, not how to speak English, this is my first time here posting, so I hope you can take care of!


                                      Code:
                                      .align 2
                                      .thumb
                                      
                                      @ 0x0806935A--Code insertion
                                      @ 0x08069350: 1F D0 29 4C
                                      @ 0x0869400-0x0869423 zero clear
                                      
                                      main:
                                      ldr r2, aaa
                                      mov r5, r9
                                      lsl r3, r5, #0x2
                                      add r5, r3, r2
                                      ldr r0, [r5, #0x0]
                                      ldrb r0, [r0, #0x2]
                                      mov r6, r4
                                      mov r12, r2
                                      mov r4, r10
                                      cmp r0, r4
                                      beq c
                                      mov r2, r6
                                      mov r3, r5
                                      b:
                                      ldrb r0, [r2, #0x0]
                                      add r0, #0x1
                                      strb r0, [r2, #0x0]
                                      ldrb r0, [r2, #0x0]
                                      lsl r1, r0, #0x1
                                      add r0, r1
                                      ldr r1, [r3, #0x0]
                                      add r0, r1
                                      ldrb r1, [r0, #0x2]
                                      cmp r1, #0xff
                                      bne a
                                      mov r0, #0x0
                                      b d
                                      a:
                                      cmp r1, r4
                                      bne b
                                      ldr r3, aaa
                                      mov r1, r9
                                      lsl r4, r1, #0x2
                                      add r1, r4, r3
                                      ldr r2, bbb
                                      ldrb r0, [r2, #0x0]
                                      ldr r1, [r1, #0x0]
                                      lsl r6, r0, #0x1
                                      add r0, r6
                                      add r0, r1
                                      ldrb r0, [r0, #0x2]
                                      mov r1, r10
                                      mov r6, r2
                                      mov r12, r3
                                      mov r3, r4
                                      cmp r0, r1
                                      bne end
                                      c:
                                      ldr r2, ddd
                                      mov r0, r12
                                      add r1, r3, r0
                                      ldrb r0, [r6, #0x0]
                                      ldr r1, [r1, #0x0]
                                      lsl r7, r0, #0x1
                                      add r0, r7
                                      add r0, r1
                                      ldrb r1, [r0, #0x1]
                                      lsl r1, r1, #0x8
                                      ldrb r0, [r0, #0x0]
                                      orr r0, r1
                                      strh r0, [r2, #0x0]
                                      ldrb r0, [r6, #0x0]
                                      add r0, #0x1
                                      strb r0, [r6, #0x0]
                                      ldrh r1, [r2, #0x0]
                                      mov r0, r8
                                      bl                        @ 0x0806912C
                                      lsl r0, r0, #0x10
                                      lsr r0, r0, #0x10
                                      str r0, [sp, #0x0]
                                      end:
                                      ldr r0, [sp, #0x0]
                                      d:
                                      add sp, #0x4
                                      pop {r3-r5}
                                      mov r8, r3
                                      mov r9, r4
                                      mov r10, r5
                                      pop {r4-r7}
                                      pop {r1}
                                      bx r1
                                      
                                      
                                      
                                      .align 2
                                      aaa: .word 0xFFFFFFFF     @moveset table Offset
                                      bbb: .word 0x020244E8
                                      ddd: .word 0x020244E2

                                      Code:
                                      .align 2
                                      .thumb
                                      
                                      @ 0x08069298--Code insertion
                                      @ 0x08069300-0x08069317 zero clear
                                      
                                      main:
                                      ldr r0, aaa
                                      lsl r6, r4, #0x2
                                      add r0, r6
                                      ldr r0, [r0, #0x0]
                                      ldrb r1, [r0, #0x2]
                                      cmp r1, #0xFF
                                      beq end
                                      mov r3, #0x0
                                      a:
                                      ldr r0, aaa
                                      add r7, r6, r0
                                      ldr r0, [r7, #0x0]
                                      add r0, r3
                                      ldrb r2, [r0, #0x2]
                                      mov r1, r10
                                      cmp r2, r1
                                      bgt end
                                      ldrb r1, [r0, #0x1]
                                      lsl r1, r1, #0x8
                                      ldrb r0, [r0, #0x0]
                                      orr r1, r0
                                      mov r4, r1
                                      mov r0, r8
                                      str r3, [sp, #0x0]
                                      bl                             @ 0x08069140
                                      ldr r1, bbb
                                      ldr r3, [sp, #0x0]
                                      cmp r0, r1
                                      bne b
                                      mov r0, r8
                                      mov r1, r4
                                      bl                             @ 0x080694D0
                                      ldr r3, [sp, #0x0]
                                      b:
                                      add r3, #0x3
                                      ldr r0, [r7, #0x0]
                                      add r0, r3
                                      ldrb r0, [r0, #0x2]
                                      cmp r0, #0xFF
                                      bne a
                                      end:
                                      add sp, #0x4
                                      pop {r3-r5}
                                      mov r8, r3
                                      mov r9, r4
                                      mov r10, r5
                                      pop {r4-r7}
                                      pop {r1}
                                      bx r1
                                      
                                      
                                      
                                      .align 2
                                      aaa: .word 0xFFFFFFFF   @moveset table Offset
                                      bbb: .hword 0xFFFF

                                      Code:
                                      .align 2
                                      .thumb
                                      
                                      @ 0x0806E100--Code insertion
                                      @ 0x0806E1F8-0x0806E203 zero clear
                                      
                                      main:
                                      mov r5, #0x0
                                      ldr r6, aaa
                                      lsl r1, r7, #0x2
                                      add r2, r1, r6
                                      ldr r3, [r2, #0x0]
                                      ldrb r0, [r3, #0x2]
                                      str r1, [sp, #0x14]
                                      cmp r0, #0xFF
                                      beq end
                                      mov r9, r2
                                      str r3, [sp, #0x10]
                                      f:
                                      lsl r2, r5, #0x1
                                      add r2, r5
                                      ldr r1, [sp, #0x10]
                                      add r0, r2, r1
                                      ldrb r3, [r0, #0x2]
                                      ldr r1, [sp, #0xC]
                                      mov r7, r2
                                      add r5, #0x1
                                      mov r12, r5 
                                      cmp r3, r1
                                      bgt d
                                      mov r4, #0x0
                                      mov r1, sp
                                      ldrh r1, [r1, #0x0]
                                      ldrb r3, [r0, #0x1]
                                      lsl r3, r3, #0x8
                                      ldrb r0, [r0, #0x0]
                                      orr r0, r3
                                      cmp r1, r0
                                      beq b
                                      ldr r0, [sp, #0x14]
                                      ldr r1, aaa
                                      add r6, r0, r1
                                      mov r3, sp
                                      mov r5, r7
                                      a:
                                      add r3, #0x2
                                      add r4, #0x1
                                      cmp r4, #0x3
                                      bgt b
                                      ldr r0, [r6, #0x0]
                                      add r0, r5
                                      ldrb r1, [r0, #0x1]
                                      lsl r1, r1, #0x8
                                      ldrb r0, [r0, #0x0]
                                      orr r0, r1
                                      ldrh r2, [r3, #0x0]
                                      cmp r2, r0
                                      bne a
                                      b:
                                      cmp r4, #0x4
                                      bne d
                                      mov r4, #0x0
                                      cmp r4, r10
                                      bge e
                                      mov r1, r9
                                      ldr r0, [r1, #0x0]
                                      add r0, r7
                                      ldrb r1, [r0, #0x1]
                                      lsl r1, r1, #0x8
                                      ldrb r0, [r0, #0x0]
                                      orr r0, r1
                                      ldr r1, [sp, #0x8]
                                      ldrh r2, [r1, #0x0]
                                      cmp r2, r0
                                      beq e
                                      ldr r1, [sp, #0x14]
                                      ldr r2, aaa
                                      add r6, r1, r2
                                      ldr r3, [sp, #0x8]
                                      mov r5, r7
                                      c:
                                      add r3, #0x2
                                      add r4, #0x1
                                      cmp r4, r10
                                      bge e
                                      ldr r0, [r6, #0x0]
                                      add r0, r5
                                      ldrb r1, [r0, #0x1]
                                      lsl r1, r1, #0x8
                                      ldrb r0, [r0, #0x0]
                                      orr r0, r1
                                      ldrh r2, [r3, #0x0]
                                      cmp r2, r0
                                      bne c
                                      e:
                                      cmp r4, r10
                                      bne d
                                      mov r0, r10
                                      add r0, #0x1
                                      lsl r0, r0, #0x18
                                      lsr r0, r0, #0x18
                                      mov r10, r0
                                      lsl r2, r4, #0x1
                                      ldr r1, [sp, #0x8]
                                      add r2, r1
                                      mov r4, r9
                                      ldr r0, [r4, #0x0]
                                      add r0, r7
                                      ldrb r1, [r0, #0x1]
                                      lsl r1, r1, #0x8
                                      ldrb r0, [r0, #0x0]
                                      orr r0, r1
                                      strh r0, [r2, #0x0]
                                      d:
                                      mov r5, r12
                                      cmp r5, #0x13
                                      bgt end
                                      mov r1, r9
                                      ldr r0, [r1, #0x0]
                                      lsl r1, r5, #0x1
                                      add r1, r5
                                      add r1, r0
                                      ldrb r0, [r1, #0x2]
                                      cmp r0, #0xFF
                                      bne f
                                      end:
                                      mov r0, r10
                                      add sp, #0x18
                                      pop {r3-r5}
                                      mov r8, r3
                                      mov r9, r4
                                      mov r10, r5
                                      pop {r4-r7}
                                      pop {r1}
                                      bx r1
                                      
                                      
                                      .align 2
                                      aaa: .word 0xFFFFFFFF   @moveset table Offset
                                      Jambo51 original words:
                                      The new movesets are collections of 3 bytes each which are set up thus:
                                      [MOVE - Half-Word - Reverse Hex] [Level - Byte]
                                      So if I wanted my Pokémon's moveset to contain Pound at level 52, it would be:
                                      01 00 34
                                      To end the moveset, you put:
                                      00 00 FF
                                      Reply With Quote
                                        #121    
                                      Old August 29th, 2015 (4:43 AM).
                                      kleenexfeu kleenexfeu is offline
                                         
                                        Join Date: Aug 2013
                                        Gender: Male
                                        Posts: 219
                                        Hi, thanks for sharing this. Though I have a question : what is the difference with Jambo51 method ?
                                        __________________
                                        Links for my work:
                                        Dynamic Emerald Attack ROMbase
                                        Arceus and Giratina Forms

                                        Touched's Emerald IDB + Battle stuff (probably outdated)
                                        Touched's Emerald IDB 6.8 + Battle stuff (probably outdated)
                                        Reply With Quote
                                          #122    
                                        Old August 29th, 2015 (4:59 AM).
                                        Againsts's Avatar
                                        Againsts Againsts is offline
                                           
                                          Join Date: Aug 2015
                                          Gender: Female
                                          Posts: 27
                                          No difference,However Jambo51 is Fire Red,This is Emerald。
                                          Reply With Quote
                                            #123    
                                          Old August 29th, 2015 (5:31 AM).
                                          kleenexfeu kleenexfeu is offline
                                             
                                            Join Date: Aug 2013
                                            Gender: Male
                                            Posts: 219
                                            Quote:
                                            Originally Posted by Againsts View Post
                                            No difference,However Jambo51 is Fire Red,This is Emerald。
                                            In the thread the emerald offset are posted too, though it's true that it's not really clear since it's spread on the thread.

                                            I think a mod should update Jambo51's thread with your post or those on the thread rather than create a new thread
                                            Reply With Quote
                                              #124    
                                            Old August 29th, 2015 (5:56 AM).
                                            Againsts's Avatar
                                            Againsts Againsts is offline
                                               
                                              Join Date: Aug 2015
                                              Gender: Female
                                              Posts: 27
                                              Well, understanding
                                              Reply With Quote
                                                #125    
                                              Old August 29th, 2015 (7:43 AM). Edited November 22nd, 2015 by kleenexfeu.
                                              kleenexfeu kleenexfeu is offline
                                                 
                                                Join Date: Aug 2013
                                                Gender: Male
                                                Posts: 219
                                                Quote:
                                                Originally Posted by Againsts View Post
                                                Hello everyone, I am a Chinese, not how to speak English, this is my first time here posting, so I hope you can take care of!

                                                Spoiler:

                                                Code:
                                                .thumb
                                                
                                                @ 0x0869400-0x0869423 zero clear
                                                
                                                .org 0x69350
                                                
                                                .byte: 0x1F, 0xD0, 0x29, 0x4C
                                                
                                                .org 0x6935A
                                                
                                                main:
                                                ldr r2, aaa
                                                mov r5, r9
                                                lsl r3, r5, #0x2
                                                add r5, r3, r2
                                                ldr r0, [r5, #0x0]
                                                ldrb r0, [r0, #0x2]
                                                mov r6, r4
                                                mov r12, r2
                                                mov r4, r10
                                                cmp r0, r4
                                                beq c
                                                mov r2, r6
                                                mov r3, r5
                                                b:
                                                ldrb r0, [r2, #0x0]
                                                add r0, #0x1
                                                strb r0, [r2, #0x0]
                                                ldrb r0, [r2, #0x0]
                                                lsl r1, r0, #0x1
                                                add r0, r1
                                                ldr r1, [r3, #0x0]
                                                add r0, r1
                                                ldrb r1, [r0, #0x2]
                                                cmp r1, #0xff
                                                bne a
                                                mov r0, #0x0
                                                b d
                                                a:
                                                cmp r1, r4
                                                bne b
                                                ldr r3, aaa
                                                mov r1, r9
                                                lsl r4, r1, #0x2
                                                add r1, r4, r3
                                                ldr r2, bbb
                                                ldrb r0, [r2, #0x0]
                                                ldr r1, [r1, #0x0]
                                                lsl r6, r0, #0x1
                                                add r0, r6
                                                add r0, r1
                                                ldrb r0, [r0, #0x2]
                                                mov r1, r10
                                                mov r6, r2
                                                mov r12, r3
                                                mov r3, r4
                                                cmp r0, r1
                                                bne end
                                                c:
                                                ldr r2, ddd
                                                mov r0, r12
                                                add r1, r3, r0
                                                ldrb r0, [r6, #0x0]
                                                ldr r1, [r1, #0x0]
                                                lsl r7, r0, #0x1
                                                add r0, r7
                                                add r0, r1
                                                ldrb r1, [r0, #0x1]
                                                lsl r1, r1, #0x8
                                                ldrb r0, [r0, #0x0]
                                                orr r0, r1
                                                strh r0, [r2, #0x0]
                                                ldrb r0, [r6, #0x0]
                                                add r0, #0x1
                                                strb r0, [r6, #0x0]
                                                ldrh r1, [r2, #0x0]
                                                mov r0, r8
                                                bl 0x6912C
                                                lsl r0, r0, #0x10
                                                lsr r0, r0, #0x10
                                                str r0, [sp, #0x0]
                                                end:
                                                ldr r0, [sp, #0x0]
                                                d:
                                                add sp, #0x4
                                                pop {r3-r5}
                                                mov r8, r3
                                                mov r9, r4
                                                mov r10, r5
                                                pop {r4-r7}
                                                pop {r1}
                                                bx r1
                                                
                                                
                                                
                                                .align 2
                                                aaa: .word 0xFFFFFFFF     @moveset table Offset
                                                bbb: .word 0x020244E8
                                                ddd: .word 0x020244E2

                                                Code:
                                                .thumb
                                                
                                                @ 0x08069300-0x08069317 zero clear
                                                
                                                .org 0x69298
                                                
                                                main:
                                                ldr r0, aaa
                                                lsl r6, r4, #0x2
                                                add r0, r6
                                                ldr r0, [r0, #0x0]
                                                ldrb r1, [r0, #0x2]
                                                cmp r1, #0xFF
                                                beq end
                                                mov r3, #0x0
                                                a:
                                                ldr r0, aaa
                                                add r7, r6, r0
                                                ldr r0, [r7, #0x0]
                                                add r0, r3
                                                ldrb r2, [r0, #0x2]
                                                mov r1, r10
                                                cmp r2, r1
                                                bgt end
                                                ldrb r1, [r0, #0x1]
                                                lsl r1, r1, #0x8
                                                ldrb r0, [r0, #0x0]
                                                orr r1, r0
                                                mov r4, r1
                                                mov r0, r8
                                                str r3, [sp, #0x0]
                                                bl 0x69140
                                                ldr r1, bbb
                                                ldr r3, [sp, #0x0]
                                                cmp r0, r1
                                                bne b
                                                mov r0, r8
                                                mov r1, r4
                                                bl 0x694D0
                                                ldr r3, [sp, #0x0]
                                                b:
                                                add r3, #0x3
                                                ldr r0, [r7, #0x0]
                                                add r0, r3
                                                ldrb r0, [r0, #0x2]
                                                cmp r0, #0xFF
                                                bne a
                                                end:
                                                add sp, #0x4
                                                pop {r3-r5}
                                                mov r8, r3
                                                mov r9, r4
                                                mov r10, r5
                                                pop {r4-r7}
                                                pop {r1}
                                                bx r1
                                                
                                                
                                                .align 2
                                                aaa: .word 0xFFFFFFFF   @moveset table Offset
                                                bbb: .hword 0xFFFF

                                                Code:
                                                .thumb
                                                
                                                @ 0x0806E1F8-0x0806E203 zero clear
                                                
                                                .org 0x6E100
                                                
                                                main:
                                                mov r5, #0x0
                                                ldr r6, aaa
                                                lsl r1, r7, #0x2
                                                add r2, r1, r6
                                                ldr r3, [r2, #0x0]
                                                ldrb r0, [r3, #0x2]
                                                str r1, [sp, #0x14]
                                                cmp r0, #0xFF
                                                beq end
                                                mov r9, r2
                                                str r3, [sp, #0x10]
                                                f:
                                                lsl r2, r5, #0x1
                                                add r2, r5
                                                ldr r1, [sp, #0x10]
                                                add r0, r2, r1
                                                ldrb r3, [r0, #0x2]
                                                ldr r1, [sp, #0xC]
                                                mov r7, r2
                                                add r5, #0x1
                                                mov r12, r5 
                                                cmp r3, r1
                                                bgt d
                                                mov r4, #0x0
                                                mov r1, sp
                                                ldrh r1, [r1, #0x0]
                                                ldrb r3, [r0, #0x1]
                                                lsl r3, r3, #0x8
                                                ldrb r0, [r0, #0x0]
                                                orr r0, r3
                                                cmp r1, r0
                                                beq b
                                                ldr r0, [sp, #0x14]
                                                ldr r1, aaa
                                                add r6, r0, r1
                                                mov r3, sp
                                                mov r5, r7
                                                a:
                                                add r3, #0x2
                                                add r4, #0x1
                                                cmp r4, #0x3
                                                bgt b
                                                ldr r0, [r6, #0x0]
                                                add r0, r5
                                                ldrb r1, [r0, #0x1]
                                                lsl r1, r1, #0x8
                                                ldrb r0, [r0, #0x0]
                                                orr r0, r1
                                                ldrh r2, [r3, #0x0]
                                                cmp r2, r0
                                                bne a
                                                b:
                                                cmp r4, #0x4
                                                bne d
                                                mov r4, #0x0
                                                cmp r4, r10
                                                bge e
                                                mov r1, r9
                                                ldr r0, [r1, #0x0]
                                                add r0, r7
                                                ldrb r1, [r0, #0x1]
                                                lsl r1, r1, #0x8
                                                ldrb r0, [r0, #0x0]
                                                orr r0, r1
                                                ldr r1, [sp, #0x8]
                                                ldrh r2, [r1, #0x0]
                                                cmp r2, r0
                                                beq e
                                                ldr r1, [sp, #0x14]
                                                ldr r2, aaa
                                                add r6, r1, r2
                                                ldr r3, [sp, #0x8]
                                                mov r5, r7
                                                c:
                                                add r3, #0x2
                                                add r4, #0x1
                                                cmp r4, r10
                                                bge e
                                                ldr r0, [r6, #0x0]
                                                add r0, r5
                                                ldrb r1, [r0, #0x1]
                                                lsl r1, r1, #0x8
                                                ldrb r0, [r0, #0x0]
                                                orr r0, r1
                                                ldrh r2, [r3, #0x0]
                                                cmp r2, r0
                                                bne c
                                                e:
                                                cmp r4, r10
                                                bne d
                                                mov r0, r10
                                                add r0, #0x1
                                                lsl r0, r0, #0x18
                                                lsr r0, r0, #0x18
                                                mov r10, r0
                                                lsl r2, r4, #0x1
                                                ldr r1, [sp, #0x8]
                                                add r2, r1
                                                mov r4, r9
                                                ldr r0, [r4, #0x0]
                                                add r0, r7
                                                ldrb r1, [r0, #0x1]
                                                lsl r1, r1, #0x8
                                                ldrb r0, [r0, #0x0]
                                                orr r0, r1
                                                strh r0, [r2, #0x0]
                                                d:
                                                mov r5, r12
                                                cmp r5, #0x13
                                                bgt end
                                                mov r1, r9
                                                ldr r0, [r1, #0x0]
                                                lsl r1, r5, #0x1
                                                add r1, r5
                                                add r1, r0
                                                ldrb r0, [r1, #0x2]
                                                cmp r0, #0xFF
                                                bne f
                                                end:
                                                mov r0, r10
                                                add sp, #0x18
                                                pop {r3-r5}
                                                mov r8, r3
                                                mov r9, r4
                                                mov r10, r5
                                                pop {r4-r7}
                                                pop {r1}
                                                bx r1
                                                
                                                
                                                .align 2
                                                aaa: .word 0xFFFFFFFF   @moveset table Offset
                                                Jambo51 original words:
                                                The new movesets are collections of 3 bytes each which are set up thus:
                                                [MOVE - Half-Word - Reverse Hex] [Level - Byte]
                                                So if I wanted my Pokémon's moveset to contain Pound at level 52, it would be:
                                                01 00 34
                                                To end the moveset, you put:
                                                00 00 FF
                                                EDIT : Ok I added the -hopefully- corrected instruction, in bold, in the spoiler

                                                UPDATE : There were still some errors, I hope it now works.
                                                __________________
                                                Links for my work:
                                                Dynamic Emerald Attack ROMbase
                                                Arceus and Giratina Forms

                                                Touched's Emerald IDB + Battle stuff (probably outdated)
                                                Touched's Emerald IDB 6.8 + Battle stuff (probably outdated)
                                                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 10:36 AM.