Go Back   The PokéCommunity Forums > Members List

For all updates, view the main page.

sonic1's Profile Picture

sonic1 sonic1 is offline

ASM is my life now...

Visitor Messages

Showing Visitor Messages 51 to 60 of 138
  1. knizz
    March 24th, 2012 02:55 AM
    I just realized something.


    lol, that was easy
  2. knizz
    March 24th, 2012 02:47 AM
    What you want to do is HARD: http://en.wikipedia.org/wiki/Integer_factorization

    But your domain is small. Only 1280 cases!
    And only the end result has to be in less than 0x49. Right?
    You can just pre-calculate all situations and put the table into your software
    uint a = table1[bignum];
    uint b = bignum/a;
    int c = bignum-a*b;
  3. Bond697
    March 18th, 2012 12:52 AM
    it doesn't have to be slower. copy that routine and put it into IWRAM(0x3000000 area) in an open spot and do it that way. IWRAM can handle 32-bit reads.
  4. Bond697
    March 17th, 2012 08:33 AM
    think about this:

    the arm cpu doesn't do division, right? so.. if someone was to throw:

    u32 doDiv(u32 x, u32 y)
    return (x/y);

    at the cpu, what would it do? short answer: it would do what you're seeing in that routine, with a lot of wasted cycles. It's also in thumb, which means it's going to be even bulkier. same thing for the modulus routine right under it. they're huge.

    that's as opposed to the divmod in dppt, hgss, and bw that is done in arm, is very fast, and returns both the result and the remainder.


    basically, gamefreak could've done a lot better in that regard. the size and speed of the division and modulus routines in emerald are both good examples of why you shouldn't just use division in arm and should actively look for another way.

    e: dunno how much you know about pokemon generation in gen3, but stuff like this is what causes methods 2 and 4 to happen.
  5. Bond697
    March 16th, 2012 09:50 PM
    division: r0/r1, return the result in r0.

    e: unsigned division, and a great example of why you shouldn't use it on an ARM cpu.
  6. Speedster
    March 15th, 2012 02:28 PM
    Yeah long time no see. I'm glad you haven't forgotten the hack. Hopefully I'll be ready for you when you come back. I'll try to make a list of ASM that needs to be done.

  7. Spherical Ice
    March 13th, 2012 01:39 PM
    Spherical Ice
    Awesome! Thanks again for all your epic work!
  8. Spherical Ice
    March 13th, 2012 12:56 PM
    Spherical Ice
    Okay, so I added one to the asm part and the script works, but all it does is start a battle with a different animation. Maybe I wasn't being clear but I was wondering how to get the animation to take place and that's it; no battle after. Sorry for all this hassle!
  9. Spherical Ice
    March 13th, 2012 12:16 PM
    Spherical Ice
    Haha yeah, thanks. Though the actual code itself doesn't work unfortunately.

    At least, as this:

    #dynamic 0x800000
    #include stditems.rbh
    #include stdpoke.rbh

    #org @start
    setwildbattle PKMN_BULBASAUR 0x5 ITEM_NONE
    writebytetooffset 0x0 0x2022B4C
    writebytetooffset 0x0 0x2022B4D
    writebytetooffset 0x0 0x2022B4E
    writebytetooffset 0x0 0x2022B4F
    callasm 0x8003a0

    I copied the contents of the .bin file at 8003a0, but when this script activates the game just freezes.
  10. Spherical Ice
    March 13th, 2012 11:23 AM
    Spherical Ice
    Hey dude, thanks a lot for the help. I am a noob when it comes to ASM, so I apologise for my stupidity. When compiling the code, cmd gives some error codes saying that:
    "warning: end of file not at end of line; newline inserted
    error: invalid immediate: 134739601 is out of range
    error: value at 134739601 too large for field of 2 bytes at 6"

    I'm sure I'm missing something out of the .asm file but I'm so inept at this that I can't figure out what. Sorry for bugging you so much but I hope you could help :D

About Me

  • About sonic1
    Hi everyone!! I'm Miguel, an Adoloescent Portuguese boy. I'm a Pokemon big fan, specially in the games part (not that i dont like the anime, that rocks indeed!!xD ). I like to play pokemon a lot (i play since 5 years old :D ), and i'm learning Japonese because of it. I like to hack and make pokemon games (i'm quite experienced in this part), as i do it almost everyday i come to my computer :D
    Rom hacking,Game creating,web page designing
    Male ♂
    Pokemon Trainer
    Favorite Pokémon
  • Signature
    This signature has been disabled.
    over 350px high
    Please review and fix the issues by reading the signature rules.

    You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

    Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.


Total Posts
Activity by Forum
Visitor Messages
General Information
  • Last Activity: April 7th, 2014 08:39 AM
  • Join Date: May 29th, 2008
  • Referrals: 0


Showing Friends 1 to 13 of 13


Emblem Showcase - 1 Total
PC Veteran
These old folks have been around for far too long but we love them anyway.
Awarded: June 15th, 2011 07:34 AM

All times are UTC -8. The time now is 05:10 AM.