Results 1 to 10 of 56

Thread: ASM To be or not to be?

Hybrid View

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

    Default

    Quote Originally Posted by Drew9561995 View Post
    Also I was bored and so I checked some of the addresses in your recent codes and one confused me a bit. It had the address 0x021eed6c. But that only differentiates from when you are in your own home and as far as I can tell is almost useless. Unless you somehow use it to tell where the user of your codes are in relation to the world map/ inside outside ordeal.
    Personally I admire your coding. I mainly want to learn to code so I can understand your codes and because I would like to be able to make codes like you do. (I.e. Flawlessly, amazingly, with the ability to incorporate amazing features, etc..)
    Also have you gotten a TT yet? Or is this all based on address's that've been found and coding that you decided to do?

    Another interesting thing is that I can't ds to ds with the trainer TT in my ds. It gives me the purple resetti page "an error occurred"... Wifi won't connect to the nin wfc points either... However using Text to ar code works pretty good. But somehow the TT doesn't like me.


    Edit: I forgot t mention that oddly enough the 0x021eed6c thing is 0 when outside 1 in your house and C in a different friends house. It is also different for neighbors... I don't think changing the value does anything 'cept freeze the game.
    I don't have a trainer toolkit, I either use others' addresses, use an emulator to find my own, or use an ASM routine to find online addresses

    By the way, I use that to determine where you're at/which room
    For example, it checks if you're outdoors or in your house. It also makes sure the code doesn't activate if you're in the gate

    Then, if you're in your house, I subtract #1 from it, then multiply it by #0x450 (difference between each room)

    That's how my RTWE code knows exactly which slot to put the item in no matter where you're at

  2. #2

    Default

    Woah!!
    Thats cool!! : D
    I've been using your search code to find addresses recently,
    and I found the addresses for attached presents to letters, (Yes, dspet already found them. But I was bored and without a pc)
    So I've been trying to write some assembly that will store the first ten items in your dresser in your mail slots.
    However, I have been getting errors when compiling. Currently it's a OFFSET_IMM8 error...
    Can you, or anyone who is reading this, tell me what I am doing wrong??
    (I am trying copyng the items in the first 10 dresser slots, 021ec(200-214), and storing them in the ten letter slots 021d8(014-8a8)
    But each address is offset from the previous by a certain amount. The dressers by 2, and the letters by F4. I have not tested these addresses, as I have calculated them from other addresses, and this code still has many features I have not added yet...)

    ldr r4, Limit
    ldr r5, D
    ldr r8, M
    ldr r1, Dresser
    ldrh r2, r1
    ldr r3, Mail
    strh r3, [r2]
    b Fred

    Fred:
    add r1, r1, r5
    ldrh r2, r1
    add r3, r3, r8
    strh r3, [r2]
    cmp r1, r4
    ble John
    bx lr

    John:
    b Fred

    Limit:
    .long 0x021ec214
    Dresser:
    .long 0x021ec200
    Mail:
    .long 0x021d8014
    D:
    .short 0x0002
    M:
    .short 0x00f4

  3. #3
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default

    ldr r4, Limit
    ldrb r5, D @We can actually use .byte for these (: thus it becomes ldrb, not ldr. If you were using a 16-bit value it would be ldrh.
    ldrb r8, M
    ldr r1, Dresser
    ldrh r2, [r1] @forgot your brackets here.. we want to load the halfword at r1 into r2
    ldr r3, Mail
    ldrh r3, [r3] @need to load the value from Mail before we can store it!
    strh r3, [r2]

    @we dont need the branch to Fred as it will automatically go to it.

    Fred:
    add r1, r1, r5
    ldrh r2, [r1] @once again, forgot our brackets (:
    add r3, r3, r8
    strh r3, [r2]
    cmp r1, r4
    ble Fred @no need for John, we can just redirect it back to Fred from here (:
    bx lr


    Limit:
    .long 0x021ec214
    Dresser:
    .long 0x021ec200
    Mail:
    .long 0x021d8014
    D:
    .byte 0x02
    M:
    .byte 0xf4
    I'm assuming your math is right, hopefully this helped you also you dont need to remove the notes i put in there to compile. The compiler will ignore anything after @ on that line. (: Any questions? ;P I hope I didn't miss anything.. kinda rusty on ASM

    Edit: Noticed a few more things... also i believe I can optimize this more if you like.. but it will have to wait until I'm home as i cant refer to any of my notes at school. haha Glad to see that you're still trying to learn
    Last edited by Maniac; 04-26-2010 at 01:02 PM.

    Say what you mean, mean what you say, and let your actions speak for you.


  4. The Following User Says Thank You to Maniac For This Useful Post:


  5. #4

    Default

    Is this for version 1.1? I used DragonBoy's Search Code and found these for 1.0:

    Offline Mail Present Attachment Modifier Addresses [1.0]:

    Code:
    Slot 01: 121D8014 0000XXXX
    Slot 02: 121D8108 0000XXXX
    Slot 03: 121D81FC 0000XXXX
    Slot 04: 121D82F0 0000XXXX
    Slot 05: 121D83E4 0000XXXX
    Slot 06: 121D84D8 0000XXXX
    Slot 07: 121D85CC 0000XXXX
    Slot 08: 121D86C0 0000XXXX
    Slot 09: 121D87B4 0000XXXX
    Slot 10: 121D88A8 0000XXXX
    Online (Wi-Fi) Mail Present Attachment Modifier Addresses [1.0]:

    Code:
    Slot 01: 121D15C8 0000XXXX
    Slot 02: 121D16BC 0000XXXX
    Slot 03: 121D17B0 0000XXXX
    Slot 04: 121D18A4 0000XXXX
    Slot 05: 121D1998 0000XXXX
    Slot 06: 121D1A8C 0000XXXX
    Slot 07: 121D1B80 0000XXXX
    Slot 08: 121D1C74 0000XXXX
    Slot 09: 121D1D68 0000XXXX
    Slot 10: 121D1E5C 0000XXXX
    I hope this helps.
    3DS Friend Code: 4699-6293-3106

  6. #5

    Default

    Sorry I dropped out for a while. I've been busy with school.
    I guess I'll compile the code and test it out!! Thank you Maniac!!

  7. #6

    Default

    Hmmm.... I must've done something wrong... the code compiled but it doesn't work...
    Since I entered it manually I am going to check and make sure I entered it correctly... and I'll then rewrite the asm if I can.

    (Sorry for the double post...)


    Edit*

    I tried to redo the code and it still doesn't work... I tried to make it into a more readable format though.. I changed Limit, and a few other things...

    ldr r1, Mail @first mail address offline
    ldr r2, Dresser @First dresser slot address o
    ldrb r4, D @Dresser offset
    ldrb r5, M @Mail offset
    ldr r8, Limit @The last dresser slot I want to use... should be the tenth one.. used to terminate the code...

    Fred:
    strh r1, [r2] @Does this store to the Mail address or just the reg?
    @It is supposed to store the value from the address in r2,dresser, into the value at the address in r1..
    @Does it just overwrite r1? And not store the value in the address at r2? hmmm...
    add r1, r1, r5 @I am storing r1 + M in r1 to update address... Correctly?
    add r2, r2, r4
    cmp r2, r8 @Checks to current dresser address to know when to terminate the code...
    ble Fred
    bx lr


    Limit:
    .long 0x021ec212 @0-12 is ten right? (Well 20/2 in dec..)
    Dresser:
    .long 0x021ec200
    Mail:
    .long 0x021d8014
    D:
    .byte 0x02
    M:
    .byte 0xf4
    Last edited by Drew956; 07-24-2010 at 02:05 AM.

  8. #7

    Default

    What is this code supposed to do?
    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
  •