Results 1 to 9 of 9

Thread: Re-Making Teleport code for Acww 1.0

  1. #1

    Default Re-Making Teleport code for Acww 1.0

    Since Dragonboy and Maniac helped me create a coordinates modifier awhile ago, I've decided to remake the teleport code now. I understand what the code does 100%. Special thanks to Dragonboy269 & Maniac for helping with coordinates code, and Drew9561995 for helping me with some dec<->hex converting when I couldn't use the computer XD.

    Code:
    Removed
    Teleport Code
    Code:
    023FF090 012FFF11
    E0000000 00000058
    E59F0044 E5900000
    E3500000 12400D15
    012FFF1E E59F1038
    E59F2030 E1D220B0
    E3120D0D 0A000003
    E3120D0E 01A01000
    059F001C 112FFF1E
    E5914000 E5115008
    E5804000 E5005008
    E12FFF1E 021C6DEC
    04000130 02000500
    023FF090 E3520003
    Press L+R+Down to save your position then press L+R+Up to teleport/return to that position.
    Last edited by Demonic722; 08-02-2012 at 05:21 AM.
    3DS Friend Code: 4699-6293-3106

  2. #2
    Member
    Join Date
    Aug 2008
    Location
    Arizona
    Posts
    1,073
    Blog Entries
    2

    Default

    I know this is a week old but...

    Here's some more advice :P

    You can store the coordinates in the actual code instead of with free memory. (free memory isn't actually, free, it gets overwritten when you connect to wifi..)
    Like...
    Code:
    adr r0, XandYCoords
    
    ldr r1, [r0]
    ldr r2, [r0,#4]
    
    str r1, [r0]
    str r2, [r0, #4]
    
    ....
    
    XandYCoords:
    .long 0x00000, 0x00000
    Always willing to help with anything, code-related or not. :]

  3. #3

    Default

    Whoa XD, I never knew you could do:
    Code:
    XandYCoords:
    .long 0x00000, 0x00000
    I thought you needed to add #8 to the X-coordinate to get to the y-coordinate.
    Last edited by Demonic722; 08-02-2012 at 05:24 AM.
    3DS Friend Code: 4699-6293-3106

  4. #4
    Member
    Join Date
    Aug 2008
    Location
    Arizona
    Posts
    1,073
    Blog Entries
    2

    Default

    If you're using THUMB mode, sometimes it's actually better to put addresses that way.
    For example, THUMB is picky, and things don't compile the way you want them to sometimes.
    Like, trying to load two hwords
    Code:
    ldrh r0, Activator
    ldrh r1, Done
    @@@@@
    Activator:
    .ascii "zr"
    Done:
    .ascii "$$"
    that probably won't work, but...

    Code:
    adr r0, Activator_Done
    ldrh r1, [r0,#2]
    ldrh r0, [r0]
    @@@@@
    Activator_Done:
    .ascii "zr", "$$"
    this will work

    And now Maniac won't have a reason to bug you about doing what I used to do
    Code:
    ldrh r0, =0x727A
    ldrh r1, =0x2424
    Always willing to help with anything, code-related or not. :]

  5. #5

    Default

    Code:
    adr r0, Activator_Done
    ldrh r1, [r0,#2]
    ldrh r0, [r0]
    @@@@@
    Activator_Done:
    .ascii "zr", "$$"
    Soo, by adding #2 allows you to use:
    Code:
    .ascii "zr", "$$"
    Er in other words, two literals could be defined on one literal rather than doing (two seperate literals):

    Code:
    Activator:
    .ascii "zr"
    Done:
    .ascii "$$"
    ?
    3DS Friend Code: 4699-6293-3106

  6. #6
    Member
    Join Date
    Aug 2008
    Location
    Arizona
    Posts
    1,073
    Blog Entries
    2

    Default

    Well, if you have two hwords, the difference between each of them is #2
    if you have two bytes, the difference is only #1, and if you have two words, the difference is #4

    You can even have the compiler calculate it for you, like....
    Code:
    .long 0x0, Hword2 - Hword1
    .long 0x0, Byte2 - Byte1
    .long 0x0, Word2 - Word1
    
    Word1:
    .long 0x21D88FE
    Word2:
    .long 0x22AF136
    Hword1:
    .short 0x14FD
    Hword2:
    .short 0xFFF1
    Byte1:
    .byte 0x0
    Byte2:
    .byte 0x1
    Which should compile into
    Code:
    023FF090 012FFF11
    E0000000 00000026
    00000000 00000002
    00000000 00000001
    00000000 00000004
    021D88FE 022AF136
    FFF114FD 00000100
    023FF090 E3520003
    the first line says "2" the next says "1" and the next says "4" :P
    Always willing to help with anything, code-related or not. :]

  7. #7

    Default

    I never knew you could do that XD...so this basically tells you the difference between byte sizes..interesting I guess that:

    Code:
    adr r0, XandYCoords
     
    ldr r1, [r0]
    ldr r2, [r0,#4]
     
    str r1, [r0]
    str r2, [r0, #4]
    Adding #4 makes sense now since the difference between words are #4, but what about this line:

    Code:
    XandYCoords:
    .long 0x00000, 0x00000
    Why only write .long 0x00000 (with five zeroes) and not 8?
    Last edited by Demonic722; 08-02-2012 at 05:28 AM.
    3DS Friend Code: 4699-6293-3106

  8. #8
    Member
    Join Date
    Aug 2008
    Location
    Arizona
    Posts
    1,073
    Blog Entries
    2

    Default

    Well, technically it still writes 8, but it won't be using the 8 because ACWW coordinates only use 5 digits, like 0x20FD7
    It's just a way of organizing it and showing the expected data length.
    Always willing to help with anything, code-related or not. :]

  9. #9

    Default

    Okay, I understand. I would ask another question refering to free memory but it's a bit off topic...I'll PM you instead.
    Last edited by Demonic722; 08-02-2012 at 05:29 AM.
    3DS Friend Code: 4699-6293-3106

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •