The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Members List
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices


Advertise here

knizz knizz is offline

Visitor Messages

Showing Visitor Messages 21 to 30 of 70
  1. sonic1
    March 21st, 2012 03:28 PM
    sonic1
    Hey knizz! Today i'm here to ask for help (again, you must be like this -.-').

    But its rather more maths than ASM this time.

    My problem is the following: I have a system where a byte max value can only be 0x49.
    I want to get values in a range of 0-0x500 (HEX). To do it, i must use 3 bytes: Multiply first two and add the third. (lets say 0x196. 1st byte 0x28, 2nd byte 0xA, 3rd byte 0x6. 0x196 = 0x28 * 0xA + 0x6.)

    Now what i want is a routine that given a value of that range, automatically finds the 1, 2 and 3 bytes needed for the final result using the formula above.
    I'm not asking you to make the routine, but help me with the conditions/logic (like, i know that if the value i want is 0, then i just need one of the 2 bytes be 0 and the 3rd be 0 too, becaus X*0 = 0 + 0 = 0)
    My problem is that there are thousands of ways to do it, and thats what is confusing me.

    Many thanks!

  2. sonic1
    March 10th, 2012 05:08 AM
    sonic1
    Hey knizz! Hope you're doing good! Today i'm here just to tell you that i found a function that might interest you (or not). Its a debug function, probably leftovers.
    Try putting 08009640 + 1 in one of the callbacks 1,2 or 3 while in the FireRed intro (the nidorino fight, the titlescreen or something). Its a function thats probably for the AGB print or something.


  3. sonic1
    February 22nd, 2012 04:56 AM
    sonic1
    First, thanks for the explanation! What i didn't know was the part of growing from higher to lower! Must be because of LIFO system, or something like that!

    But you know, IDA makes a stack analysis, right? But in the larger functions, there are things like arg_X and var_XX. Whats really the difference between those? Because as you said, they are all arguments right? E.g:
    Spoiler:
    0803DA54 @ =============== S U B R O U T I N E =======================================
    0803DA54
    0803DA54
    0803DA54 make_pokemon: @ CODE XREF: sub_080112E0+16Ap
    0803DA54 @ sub_080112E0+1F4p ...
    0803DA54
    0803DA54 var_34 = -0x34
    0803DA54 var_30 = -0x30
    0803DA54 var_2C = -0x2C
    0803DA54 var_28 = -0x28
    0803DA54 var_24 = -0x24
    0803DA54 var_20 = -0x20
    0803DA54 var_1C = -0x1C
    0803DA54 arg_0 = 0
    0803DA54 arg_4 = 4
    0803DA54 arg_8 = 8
    0803DA54 arg_C = 0xC
    0803DA54
    0803DA54 PUSH {R4-R7,LR}
    0803DA56 MOV R7, R8
    0803DA58 PUSH {R7}
    0803DA5A SUB SP, SP, #0x1C
    0803DA5C MOV R8, R0
    0803DA5E MOVS R6, R1
    0803DA60 LDR R4, [SP,#0x34+arg_0]
    0803DA62 LDR R7, [SP,#0x34+arg_4]
    0803DA64 LDR R5, [SP,#0x34+arg_8]
    0803DA66 LSLS R6, R6, #0x10
    0803DA68 LSRS R6, R6, #0x10
    0803DA6A ADD R0, SP, #0x34+var_24
    0803DA6C STRB R2, [R0].......


    Also, what emulator do you use to keep track of the stack? I use no$gba debug, because of this thing right on the down-right side of the window:


    Thanks!

  4. sonic1
    February 21st, 2012 02:14 PM
    sonic1
    Hi there knizz!
    I'm sorry, but i just saw your doubt with 02024029... That offset is the number of pokemon you have in party at the moment (special 0x83 uses it, it is actually named count_pokemon in your IDA database).
    Hope it helped.

    Hey, do you know a tutorial that helps in learning how to use the stack properly? I'd like to learn more about the stack, as some routines use it...

    Thanks! :D

  5. DavidJCobb
    February 5th, 2012 05:17 PM
    DavidJCobb
    I haven't been doing anything with ROMs in a very long time, actually. But based on your name, the description I noted for the offset in my list, and the information about type-9 trainer battles, I suspect it may be related to Oak's tutorial narration somehow. Perhaps it's the number of Pokemon you must defeat, or the number of foes the tutorial system expects you to face?

  6. Black Charizard.
    January 22nd, 2012 10:55 AM
    Black Charizard.
    Hi Knizz, You got some time to help me with the over large doors in dp maps xD.

  7. sonic1
    January 5th, 2012 01:49 PM
    sonic1
    Hey, no worries, its all right! I'll do it myself, i'm fairly certain that you're busy with your own things in real life.
    Just explain me something: What are the Dp01, dp00, dp02, etc in your database? I know that dp01s are the battle scripts. I'm just interested in knowing what they mean, and i'm not taking your time anymore!

    Also, i understand the callbacks system. The more important callbacks are 1,2 and 3, right? I was fascinated with the callback3 function arguments. How would i put a function in the callback and put it in use? I know that there's a function "add_to_callback3_list", and i'm fairly certain that i must use this one, but to put it in use, how would i do it? You can explain this very lightely, as i like to experiment new things and i will not take your time anymore!

    Thanks! And thanks for your database and your time! :D

  8. sonic1
    December 24th, 2011 05:07 AM
    sonic1
    Wow, many thanks for the database (uses 6.1 version of IDA, isn't it? Glad i got it) and for taking your time to help me!

    ~Sonic1

  9. sonic1
    December 15th, 2011 08:57 AM
    sonic1
    What? But look at this:
    Spoiler:



    its "Mist from top right corner [09]" in map header. I get that it has priority under some BG's and other's not, if that is what you said.

    Also, how can i change the transparency of the things put in BG 0?

    Thanks

  10. sonic1
    December 12th, 2011 12:53 PM
    sonic1
    I got most of it, and i already made some progress. I managed to change the flags associated with the player, by changing the oam_thingy structure. Question is, now that i managed to change the flags, i want to research some other things. The effect i'm looking for is the semi-transparency of the FOG/MIST. But thats not an NPC. So how can i lookup the OAM properties of the fog so i can get a similar effect on NPC's?

About Me

Statistics

Total Posts
Activity by Forum
Visitor Messages
Blog
General Information
  • Last Activity: 2 Days Ago 12:16 PM
  • Join Date: August 19th, 2007
  • Referrals: 0

Friends

Showing Friends 1 to 14 of 14

Emblems

Emblem Showcase - 1 Total
  Emblem
PC Veteran
These old folks have been around for far too long but we love them anyway.
Awarded: July 27th, 2011 01:59 PM

All times are UTC -8. The time now is 07:25 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.