Results 1 to 9 of 9

Thread: ACWW v1.0 Bulletin Board Header code

  1. #1

    Default ACWW v1.0 Bulletin Board Header code

    With a lot of help in loops and general ASM stuff from Dragonboy and Demonic, I finally completed a code. This rewrites the bulletin board headers "Written by..." to "Eaten by...".

    This works for me - it should replace headers that say only "Written by" and none of the other announcement posts or whatever. I'm still learning ASM though, so if you see an error, let me know.

    Code:
    Rewrite BB Header (Press R)
    94000130 feff0000
    023ff090 012fff11
    e0000000 00000040
    e59f0028 e59f1028
    e1df22b8 e59f3028
    e7904002 e1540003
    1a000000 e7801002
    e24220c4 e3520000
    5afffff8 e12fff1e
    021e8258 1b058585
    00000ab8 2e232c17
    023ff090 e3520003
    d2000000 00000000
    ASM source:
    Code:
    ldr r0, BBHeader @Address of the first post
    ldr r1, NewHeader
    ldrh r2, =0x0ab8 @Last post header when added to first address
    ldr r3, =0x2e232c17 @Stands for "Writ"
    
    Loop:
    ldr r4, [r0, r2] @Storing last header address to compare.
    cmp r4, r3 @Check if the post starts with "Writ"
    bne SkipPost @If equal, rewrite header. If not, skip it
    str r1, [r0, r2]
    SkipPost:
    sub r2, #0xc4 @Subtracts the address to the next BB header
    cmp r2, #0x0 @Checking if loop is done
    bpl Loop
    bx lr
    
    BBHeader:
    .long 0x021e8258
    NewHeader:
    .long 0x1b058585 @Not an address- it spells "__Ea"

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

    Default

    Technically you don't need the "cmp r2, #0x0" at the bottom.
    bpl means "positive or zero" so you don't need to compare to 0, because bpl is already doing that.
    so, you just need
    Code:
    subs r2, #0xc4   @decrement and set conditional flag (hence the "s")
    bpl Loop
    if it was bgt or blt, you'd need to define "greater than what?" or "less than what?" by comparing to something, but bpl is already defined.
    Always willing to help with anything, code-related or not. :]

  3. The Following User Says Thank You to dragonboy269 For This Useful Post:


  4. #3

    Default

    Oh, I was wondering why the example I was looking at didn't have the cmp part in it. Thanks!

  5. #4
    Ban-hammered!
    Join Date
    Jul 2010
    Location
    USA
    Posts
    27

    Default

    Brilliant. o.o Good job!

  6. #5

    Default

    Guess I haven't been active lately. Didn't see a new, decent coder coming ;D.
    http://siestacat.webs.com/GetAttachment.jpg

  7. #6

    Default

    Quote Originally Posted by siestacat View Post
    Guess I haven't been active lately. Didn't see a new, decent coder coming ;D.
    Thanks, I used your website siestacat.wordpress.com to begin learning ASM, which was very helpful! I've been playing around with letter addresses, so my next code might involve that.

  8. #7

    Default

    Nice. I didn't know anyone other than Demonic ever used that. Perhaps I should add some to it.
    http://siestacat.webs.com/GetAttachment.jpg

  9. #8

    Default

    I actually recommended your tutorial to a few people Siestacat. I'm not sure if they ever got around to coding yet, though.
    3DS Friend Code: 4699-6293-3106

  10. #9

    Default

    Thanks. 1500 + hits now. Maybe I'll add more...
    http://siestacat.webs.com/GetAttachment.jpg

Posting Permissions

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