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

Thread: Help please :(

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

    Default Help please :(

    I had a great idea for a code. A text to acre code However, I'm not quite sure how to do it efficiently. I modified the TTI code so it only gets the first 2 digits instead of the first 4
    Code:
    removed
    I plan on making it use a system like XXYY (yy is the value to store, xx adds to the acre slot to get the one you want to use)
    for example, to store acre 45 in slot 1, you'd type 0045
    add #0x00 to acre slot 1 and store #0x45 in it. To store acre 43 in acre slot 5, you'd type
    0443
    Here is a grid
    Last edited by dragonboy269; 04-28-2009 at 06:11 PM.

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

    Default

    Also, how would I get toenailed's TTI to work with all 4 characters? If I use it with one it works just fine, but if I try making it calculate the player slot address, it just freezes...
    Code:
    removed
    Last edited by dragonboy269; 04-28-2009 at 06:11 PM.

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

    Default

    lol >__> I'll look at this when I get back since I've already made it.

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


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

    Default

    Quote Originally Posted by Maniac View Post
    lol >__> I'll look at this when I get back since I've already made it.
    You've made everything O_o
    Well, I haven't really made any progress with this since last night, so I hope you can help me

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

    Default

    It always messes up when I use the multiply accumulative command (mla) in thumb
    I used it correctly, but it freezes. If I don't use it, the code works just fine

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

    Default

    What registers are you using in the mla instruction?

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


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

    Default

    Quote Originally Posted by Maniac View Post
    What registers are you using in the mla instruction?
    Here's the code:
    Code:
    removed
    Last edited by dragonboy269; 04-28-2009 at 06:11 PM.

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

    Default

    I think I found the problem >_> I looked over on kodewerx on their thumb reference sheet, and it looks like mla isn't supported in thumb O_o and sure enough when I use multiply and add instead, the code works perfectly. It works now (well, I mean text to item works for all characters now)
    Code:
    removed
    Last edited by dragonboy269; 04-28-2009 at 06:12 PM.

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

    Default

    Well, ok I got the code to work sorta. Using the grid I posted above, I type in "0753" which should add 7 in hex to the original address and store a value of 53 there. Well, it adds just fine, but it always places the wrong value. According to animalmap, 53 is a left-right river with a bridge. However, it gave me a river tee O_o Here is the source (I'll use branchlinks later, I just wanna get it to work like this first. Once it works I'll shorten it a lot)
    Code:
    removed
    Last edited by dragonboy269; 04-28-2009 at 06:12 PM.

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

    Default

    Just for my sake I shortened it(or made it more readable for me...) may work, dunno.. took out some pointless things..

    Code:
    ldr r4, slot1
    ldr r1, text
    bl textcrap
    cmp r5, #0x23
    bgt end
    add r4, r4, r5
    bl textcrap
    strb r5, [r4]
    bx lr
    
    textcrap:
    mov r5,#0x0
    mov r0,#0x4
    mov r2,#0xF
    
    loop:
    ldrb r3,[r1]
    add r1,#1
    cmp r3,#0x3A
    blt number
    add r3,#9
    number:
    and r3,r2
    lsl r3,r0
    add r5,r3
    sub r0,#0x4
    bpl loop
    bx lr
    
    .arm
    text:
    .long 0x22AF136
    slot1:
    .long 0x21E3100
    Last edited by Maniac; 02-21-2009 at 11:17 AM.

    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
  •