Go Back   The PokéCommunity Forums > Members List
Reload this Page GoGoJJTech's Profile

Notices
For all updates, view the main page.



GoGoJJTech's Profile Picture
Community Supporter

GoGoJJTech GoGoJJTech is offline

http://GoGoJJTech.com (WIP!)

Visitor Messages

Showing Visitor Messages 886 to 900 of 1408
  1. karatekid552
    September 1st, 2013 12:22 PM
    karatekid552
    I also see your issue, but you have it backwards. The changed palette is being loaded, but not the sprite...

    The only reason you are getting it is because the start menu has a lock command. If we could remove that.....

    Or I'll look for a separate sprite loading routine.
  2. karatekid552
    September 1st, 2013 12:19 PM
    karatekid552
    I found the main issue, and that is that I forgot the most important line in the whole routine!!!!

    Ugghh, this was an after add in so I could make sure we were only editing the hero.

    Add this line in(It's in RED):

    Spoiler:
    .align 2
    .thumb

    .org 0x08XXXXXX /*Offset you plan to place this ASM. Works
    like #Dynamic in scripting in order to create dynamic labels
    that work. Otherwise, you will get bad pointers and such.*/

    /*third and final change for the number of overworlds is
    at 0x0805f2ca. In order to mantain the original functions
    from the game, slots 0ef->0ff are not able to hold original
    OW's, but 16 slots are nothing compared with the remainder

    get_ow_change: ldr r1, get_new_ow
    bx r1

    get_new_ow: pointer

    or, compiled
    00 00 00 49 08 47 Pointer

    to be placed at 0x0805f2de to complement the code
    ef_call: mov r1, #0x0
    ldr r2, end_check_addr
    bx r2

    end_check_addr: pointer

    or,compiled
    00 21 00 4a 10 47 Pointer

    this code also reflects the possibility of change on the
    hero OW, performing a simple check on the designated addresses.*/

    get_ow_addr: push {r2-r4}
    lsl r1, r0, #0x10
    lsr r1, r1, #0x18
    mov r11, r0
    lsl r0, r0, #0x18
    lsr r0, r0, #0x18
    ldr r4, new_ow_table
    cmp r1, #0xff
    beq special_decrypter
    more_check: cmp r1, #0xff
    bgt go_old /*to allow for a multi-sized Table table*/
    cmp r1, #0x0
    bne end_check
    cmp r0, #0xef
    bgt go_old
    bl multi_check
    end_check: lsl r1, r1, #0x2
    add r3, r4, r1
    ldr r2, [r3]
    cmp r2, #0x0
    bne location_real
    ldr r2, [r4]
    location_real: ldr r1, main
    bx r1

    end_ow_change: pop {r2-r4}
    pop {r1}
    bx r1
    special_decrypter: cmp r0, #0xf /*change here for more variables usable*/
    bgt more_check
    ldr r1, var_4080
    add r0, r1, r0
    bl call_var_decrypt
    ldrb r1, [r0, #0x1]
    ldrb r0, [r0]
    b end_check

    new_ow_table: .word /*0x081a2000*/ 0xffffffff
    var_4080: .word /*0x00004080*/ 0xffffffff
    go_old: pop {r2-r4}
    ldr r1, loader_call
    bx r1

    /*this is the check that allows for trainer OW switch
    How it works: Vars 4054-59 must have a value. 0x0 for the
    default sprite, 0xyyyy for the new sprite*/
    multi_check: push {lr}
    push {r0, r1}
    cmp r0, #0xD
    bgt no_change
    cmp r0, #0x7
    blt hero_change
    sub r0, #0x7
    hero_change: ldr r1, var_Hero
    add r0, r0, r1
    bl call_var_decrypt
    b end_multi_check
    no_change: pop {r0,r1}
    pop {pc}

    end_multi_check: ldrh r1, [r0]
    cmp r1, #0x0
    beq no_change
    lsl r0, r1, #0x18
    lsr r0, r0, #0x18
    lsr r1, r1, #0x8
    pop {r2,r3}
    pop {pc}
    .hword 0x0000
    var_Hero: .word /*0x00004054*/0xffffffff
    loader_call: .word 0x0805f2d5
    /*to increase the palettes, simply repoint 0x083a5158 to a new location*/

    call_var_decrypt: ldr r2, var_decrypt
    bx r2
    var_decrypt: .word 0x0806E455

    .align 2
    /*.global runtime_player_customization_fix*/


    main:
    lsl r0, r0, #0x2
    add r3, r2, r0
    ldr r0, [r3]
    cmp r0, #0x0
    bne not_equal
    equal:
    ldr r3, [r4]
    add r3,#0x40
    ldr r0,[r3]
    ldr r1, return
    bx r1
    not_equal:
    push {r0-r3}
    mov r2, r11
    cmp r2, #0xD
    ble hero
    pop {r0-r3}
    ldr r1, return
    bx r1

    hero:
    mov r2, r0
    ldr r0, [r0,#0x1C]
    ldr r1, oamt_state_hero
    push {r0-r1}
    ldr r1, [r1,#0xC]
    cmp r0, r1
    beq end_now
    ldr r0, .0x05000000
    ldr r0, [r0]
    mov r1, #0x0
    cmp r0, r1
    beq end_now
    pop {r0-r1}
    str r0, [r1,#0xC] /*Store GFX table in OAMT state*/
    mov r0, r2
    ldr r0, [r0,#0x18]
    ldr r1, oamt_state_hero /*Store animation table in OAMT state*/
    str r0, [r1,#0x8]
    mov r0, r2
    ldrb r0, [r0,#0x2]
    ldr r1, OW_palette_table /*prepare to search for palette*/
    add r1, r1, #0x4
    b skip
    loop:
    add r1, r1, #0x8 /*continue searching for palette in palette table*/
    skip:
    ldrb r3, [r1]
    cmp r0, r3
    bne loop
    end_loop: /*Found palette*/
    sub r1, r1, #0x4
    ldr r1, [r1]
    mov r2, r1
    ldr r1, [r1]
    ldr r0, palette_buffer_slot_1
    mov r3, #0x0
    str_loop: /*store all of palette in palette buffer*/
    add r3, r3, #0x1
    str r1, [r0]
    add r1, r2, #0x4
    add r2, r2, #0x4
    ldr r1, [r1]
    add r0, r0, #0x4
    cmp r3, #0x8
    beq end_str_loop
    b str_loop
    end_str_loop:
    mov r2, #0x0
    mov r11, r2
    pop {r0-r3}
    ldr r1, return
    bx r1

    end_now:
    pop {r0-r1}
    b end_str_loop


    .align 2
    oamt_state_hero: .word 0x0202063C
    OW_palette_table: .word 0x08FFFFFF
    palette_buffer_slot_1: .word 0x020377F8
    return: .word end_ow_change
    .0x05000000: .word 0x05000000
  3. karatekid552
    September 1st, 2013 12:05 PM
    karatekid552
    Hmmmmm. Let me play with it...
  4. karatekid552
    September 1st, 2013 11:29 AM
    karatekid552
    Oh, whooops, forgot the +1 on that pointer I added.

    Here is the rom: https://www.dropbox.com/s/31iefcjpkdl925n/PLATINUM%20RED%20%28ow%20fix%29.gba

    It works now, I was able to test it.

    For DC, I just hacked the old routine and added on, I didn't do it this way, which is why this asm had issues. I hadn't tested it before. DC also required extra checks because there is one sprite in particular that I wanted warping to occur in order to change the sprite's size, so I cancelled auto-load for that sprite.
  5. Telinc1
    September 1st, 2013 02:24 AM
    Telinc1
    Oh, I didn't know it does that. I already have a Dropbox (actually, that image is uploaded there). Will edit immediately. Thanks for letting me know!
  6. karatekid552
    August 31st, 2013 07:08 PM
    karatekid552
    Okay, let's try this again.... Send the rom.
  7. karatekid552
    August 31st, 2013 06:24 PM
    karatekid552
    Whoops, my bad, that line for the OW hack should be:

    .org 0x8A5AAE4

    Then, go to 0x8A5AAE4 in the .bin file.
  8. karatekid552
    August 31st, 2013 06:22 PM
    karatekid552
    We already fixed JPAN's hack. That is for the OW hack. Just do what I said, and then go to offset 08A00000 in the .bin. Then you will know why.
  9. karatekid552
    August 31st, 2013 05:09 PM
    karatekid552
    I am SUCH an idiot. You know how when you script, you use #Dynamic? Well, I forgot the ASM version of that.

    Add this line to the top of your asm file, just below the .thumb:
    --

    .org 0x08A00000

    --
  10. karatekid552
    August 31st, 2013 04:56 PM
    karatekid552
    "The save file has been deleted". I think you are messing with the wrong rom.

    Edit: the OW hack was not implemented either.


    Nevermind, my Download manager was being stupid.XD
  11. karatekid552
    August 31st, 2013 04:43 PM
    karatekid552
    Alright, send it back.
  12. karatekid552
    August 31st, 2013 04:06 PM
    karatekid552
    I already did. I forgot a pointer, that is all.

    Here is the new ASM:

    Spoiler:
    .align 2
    .thumb

    /*third and final change for the number of overworlds is
    at 0x0805f2ca. In order to mantain the original functions
    from the game, slots 0ef->0ff are not able to hold original
    OW's, but 16 slots are nothing compared with the remainder

    get_ow_change: ldr r1, get_new_ow
    bx r1

    get_new_ow: pointer

    or, compiled
    00 00 00 49 08 47 Pointer

    to be placed at 0x0805f2de to complement the code
    ef_call: mov r1, #0x0
    ldr r2, end_check_addr
    bx r2

    end_check_addr: pointer

    or,compiled
    00 21 00 4a 10 47 Pointer

    this code also reflects the possibility of change on the
    hero OW, performing a simple check on the designated addresses.*/

    get_ow_addr: push {r2-r4}
    lsl r1, r0, #0x10
    lsr r1, r1, #0x18
    lsl r0, r0, #0x18
    lsr r0, r0, #0x18
    ldr r4, new_ow_table
    cmp r1, #0xff
    beq special_decrypter
    more_check: cmp r1, #0xff
    bgt go_old /*to allow for a multi-sized Table table*/
    cmp r1, #0x0
    bne end_check
    cmp r0, #0xef
    bgt go_old
    bl multi_check
    end_check: lsl r1, r1, #0x2
    add r3, r4, r1
    ldr r2, [r3]
    cmp r2, #0x0
    bne location_real
    ldr r2, [r4]
    location_real: ldr r1, main_stuff
    bx r1

    end_ow_change: pop {r2-r4}
    pop {r1}
    bx r1
    special_decrypter: cmp r0, #0xf /*change here for more variables usable*/
    bgt more_check
    ldr r1, var_4080
    add r0, r1, r0
    bl call_var_decrypt
    ldrb r1, [r0, #0x1]
    ldrb r0, [r0]
    b end_check

    new_ow_table: .word /*0x081a2000*/ 0xffffffff
    var_4080: .word /*0x00004080*/ 0xffffffff
    go_old: pop {r2-r4}
    ldr r1, loader_call
    bx r1

    /*this is the check that allows for trainer OW switch
    How it works: Vars 4054-59 must have a value. 0x0 for the
    default sprite, 0xyyyy for the new sprite*/
    multi_check: push {lr}
    push {r0, r1}
    cmp r0, #0xD
    bgt no_change
    cmp r0, #0x7
    blt hero_change
    sub r0, #0x7
    hero_change: ldr r1, var_Hero
    add r0, r0, r1
    bl call_var_decrypt
    b end_multi_check
    no_change: pop {r0,r1}
    pop {pc}

    end_multi_check: ldrh r1, [r0]
    cmp r1, #0x0
    beq no_change
    lsl r0, r1, #0x18
    lsr r0, r0, #0x18
    lsr r1, r1, #0x8
    pop {r2,r3}
    pop {pc}
    .hword 0x0000
    var_Hero: .word /*0x00004054*/0xffffffff
    main_stuff: .word main
    loader_call: .word 0x0805f2d5
    /*to increase the palettes, simply repoint 0x083a5158 to a new location*/

    call_var_decrypt: ldr r2, var_decrypt
    bx r2
    var_decrypt: .word 0x0806E455

    .align 2
    /*.global runtime_player_customization_fix*/


    main:
    lsl r0, r0, #0x2
    add r3, r2, r0
    ldr r0, [r3]
    cmp r0, #0x0
    bne not_equal
    equal:
    ldr r3, [r4]
    add r3,#0x40
    ldr r0,[r3]
    ldr r1, return
    bx r1
    not_equal:
    push {r0-r3}
    mov r2, r11
    cmp r2, #0xD
    ble hero
    pop {r0-r3}
    ldr r1, return
    bx r1

    hero:
    mov r2, r0
    ldr r0, [r0,#0x1C]
    ldr r1, oamt_state_hero
    push {r0-r1}
    ldr r1, [r1,#0xC]
    cmp r0, r1
    beq end_now
    ldr r0, .0x05000000
    ldr r0, [r0]
    mov r1, #0x0
    cmp r0, r1
    beq end_now
    pop {r0-r1}
    str r0, [r1,#0xC] /*Store GFX table in OAMT state*/
    mov r0, r2
    ldr r0, [r0,#0x18]
    ldr r1, oamt_state_hero /*Store animation table in OAMT state*/
    str r0, [r1,#0x8]
    mov r0, r2
    ldrb r0, [r0,#0x2]
    ldr r1, OW_palette_table /*prepare to search for palette*/
    add r1, r1, #0x4
    b skip
    loop:
    add r1, r1, #0x8 /*continue searching for palette in palette table*/
    skip:
    ldrb r3, [r1]
    cmp r0, r3
    bne loop
    end_loop: /*Found palette*/
    sub r1, r1, #0x4
    ldr r1, [r1]
    mov r2, r1
    ldr r1, [r1]
    ldr r0, palette_buffer_slot_1
    mov r3, #0x0
    str_loop: /*store all of palette in palette buffer*/
    add r3, r3, #0x1
    str r1, [r0]
    add r1, r2, #0x4
    add r2, r2, #0x4
    ldr r1, [r1]
    add r0, r0, #0x4
    cmp r3, #0x8
    beq end_str_loop
    b str_loop
    end_str_loop:
    mov r2, #0x0
    mov r11, r2
    pop {r0-r3}
    ldr r1, return
    bx r1

    end_now:
    pop {r0-r1}
    b end_str_loop


    .align 2
    oamt_state_hero: .word 0x0202063C
    OW_palette_table: .word 0x08FFFFFF
    palette_buffer_slot_1: .word 0x020377F8
    return: .word end_ow_change
    .0x05000000: .word 0x05000000


    You will need to fill in the blanks again OR just change yours to match the lines in RED.
  13. karatekid552
    August 31st, 2013 03:56 PM
    karatekid552
    Why would you plus 1? I wrote it using ARM.....





    jk, thanks, I'll look at it.XD
  14. Le pug
    August 31st, 2013 03:36 PM
    Le pug
    I know, I use FSF and don't actually use 900001
  15. Le pug
    August 31st, 2013 02:55 PM
    Le pug
    so you're saying that i should have a separate offset like 900001 for example and put it in palette offset both times?

About Me

Statistics

Total Posts
Activity by Forum
Visitor Messages
Blog
General Information
  • Last Activity: 1 Day Ago 12:39 PM
  • Join Date: November 4th, 2012
  • Referrals: 2

Friends

Showing Friends 1 to 20 of 95

Emblems

Emblem Showcase - 2 Total
  Emblem
Helping Hand
This member has done some kind of service to PC; Or maybe they help out other members whenever they get the chance.
Awarded: March 3rd, 2014 11:03 PM
Community supporter
These helpful members donate their money to help make PC a better place.
Awarded: November 23rd, 2014 07:19 PM

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