Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: My First Nooby Code Please Read!

  1. #1

    Default My First Nooby Code Please Read!

    I'm still learning ASM, but since I'm waiting for my teacher to get ready, I looked into the tools and decided to make a really basic code for Animal Crossing Wild World v1.0 that puts a rainbow feather in slot 1 of inventory:

    Code:
    ldr r1, Inventory
    ldrh r2, Item
    strh r2, [r1]
    bx lr
    
    Inventory:
    .long 0x21d88fe
    Item:
    .short 0x1404

    Code:
    023FF090 012FFF11
    E0000000 00000016
    E59F1008 E1DF20B8
    E1C120B0 E12FFF1E
    021D88FE 00001404
    023FF090 E3520003
    I am still learning the basic commands and stuff so this is all I can do right now.
    Last edited by Demonic722; 01-09-2012 at 09:13 PM. Reason: Formatting.
    3DS Friend Code: 4699-6293-3106

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

    Default

    Looks fine, good to see other people learning. Good luck with everything!

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


  3. #3

    Default

    Thanks for looking at it. Could you give me a link with all the ASM commands so I could study them?
    3DS Friend Code: 4699-6293-3106

  4. #4

    Default

    Maniac gave me a list a while ago, but its really confusing. I got most of the commands for ARM9 ASM on my site (siestablog.tk) in the ASM section (not sure which one). Glad to see my teaching has paid off. Seeing as your inspired, I'll post some more stuff on my site (you've advanced through everything on there, so I'll add the finding addresses part, as you know most of the actual command stuff). I see if I can get you to understand loops better on my site too.
    http://siestacat.webs.com/GetAttachment.jpg

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

    Default

    Quote Originally Posted by Demonic View Post
    Thanks for looking at it. Could you give me a link with all the ASM commands so I could study them?
    http://maniac.game-hackers.com/DS/Co...ly/qrc_arm.pdf
    There you go.

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


  6. #6

    Default

    Quote Originally Posted by Demonic View Post
    I'm still learning ASM but since I'm waiting for my teacher to get ready I look into the tools
    and decided to make a really basic code for Animal Crossing Wild World v1.0 which puts
    a rainbow feather in slot 1 of inventory:

    Code:
     
    ldr r1, Inventory
    ldrh r2, Item
    strh r2, [r1]
    bx lr
    Inventory:
    .long 0x21d88fe
    Item:
    .short 0x1404
    023FF090 012FFF11
    E0000000 00000016
    E59F1008 E1DF20B8
    E1C120B0 E12FFF1E
    021D88FE 00001404
    023FF090 E3520003


    I am still learning the basic commands and stuff but this is all I can do right now.
    Ok I have a small question on this. I may be wrong and I think I am but could someone clarify for me please. Sorry two small questions.

    Code:
    ldr r1, Inventory
    ldrh r2, Item
    strh r2, [r1]
    bx lr
    Inventory:
    .long 0x21d88fe
    Item:
    .short 0x1404
    1)Isn't this doing the same as in AR code format:

    Code:
    121D88FE 00001404
    2)Also isn't there a way to shorten this a little say like this:

    Code:
    ldr r1,=21D88FEh
     ldrh r2, Item
     strh r2, [r1]
     bx lr
     Item:
     .short 0x1404
    Like I said I think I am wrong, but can someone clarify me on this please.

  7. #7

    Default

    Yes that is a way of making things a lot easier. His making your 1 line code in ASM is just proof of concept.
    [/code]
    http://siestacat.webs.com/GetAttachment.jpg

  8. #8

    Default

    Demonic: I just updated my site. Has all about finding addresses now, so you can atleast advance yourself a little more as I put more content on it.


    siestacat.wordpress.com

    siestablog.tk
    http://siestacat.webs.com/GetAttachment.jpg

  9. #9

    Default

    Quote Originally Posted by Baka_Kyuubi84 View Post
    Ok I have a small question on this. I may be wrong and I think I am but could someone clarify for me please. Sorry two small questions.

    Code:
    ldr r1, Inventory
    ldrh r2, Item
    strh r2, [r1]
    bx lr
    Inventory:
    .long 0x21d88fe
    Item:
    .short 0x1404
    1)Isn't this doing the same as in AR code format:

    Code:
    121D88FE 00001404
    2)Also isn't there a way to shorten this a little say like this:

    Code:
    ldr r1,=21D88FEh
     ldrh r2, Item
     strh r2, [r1]
     bx lr
     Item:
     .short 0x1404
    Like I said I think I am wrong, but can someone clarify me on this please.
    Baka:

    in the line

    ldr r1,=21D88FEh

    it really should be

    ldr r1,=0x21D88FE

    I think that would compile the same, so its not really shorter.


    For codes like that, always use simple standard ARDS memory writes.
    http://siestacat.webs.com/GetAttachment.jpg

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

    Default

    Quote Originally Posted by siestacat View Post
    I think that would compile the same, so its not really shorter.
    You would be correct.. and at times it will actually make the code longer if you do that. Just depends on the situation

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


Posting Permissions

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