• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Tool: Simple Tools

  • 219
    Posts
    17
    Years
    -v-I'm learning C++,so I made a simple tool for enlarge ROM.
    Ya,you can use XSE,but someone may doesn't know how to(there should be a little...).
    This tool is too simple to use.
    Just drag the rom on this Enlarge.exe,and after a short time of black,it done~
    Have fun^^

    Maybe there'll be more simple tools in here~

    Tec thing:
    Code:
    #include <fstream>
    int main(int argc, char* argv[]){
        using namespace std;
        FILE *fp;
        if(fp=fopen(argv[1],"ab")){
                                     int *a= new int[4194304];
                                     fwrite(a,sizeof(a),4194304,fp);
                                     fclose(fp);
                                     delete a;
     
                                  }
     
             }
     
    Last edited:
    It's good to see C++ tools, uh You should try learning the Windows API coding to add a interface to your tools ^^ Good luck with C++
    Thanks~XD
    I can do that,with C++ builder 2009,but it always makes the tool so big.
    While adding a interface,this tool will immediately enlarge to XXX KB...

    Anyway,thanks for supporting~
     
    Very Good.

    I prefer to use the "ofstream/ifstream" class belonging to the library c++, but C's "FILE*" works very well for this. :D

    I recommend using the code:blocs instead of the builder.
    It is faster, and multiplatform.

    Search for wxWidgets, you can make multiplatform visual tools using object orientation.
     
    Uh, well, that's like the problem with environment I suppose. You should code with resource files. It'll be smaller that way. Best of Luck
    XD I'll try and thank you,my friend~
    Very Good.

    I prefer to use the "ofstream/ifstream" class belonging to the library c++, but C's "FILE*" works very well for this. :D

    I recommend using the code:blocs instead of the builder.
    It is faster, and multiplatform.

    Search for wxWidgets, you can make multiplatform visual tools using object orientation.
    I used the FILE* just because it's the function upon the function about stream in the document that I download^ ^
    I'll try the IDE now~
    Thanks for supporting~
     
    The tool is great, no complaints from me.
    Try making more complicated tools like a free flag finder.
    Would be useful for many people :P
     
    its nice to see i'm not the only one who likes c++
    ^_^ and for learning win32 development (adding a gui) google search
    "forgers win32 tutorial" it's great ;)
     
    The tool is great, no complaints from me.
    Try making more complicated tools like a free flag finder.
    Would be useful for many people :P

    XD Thanks for supporting,but it seems much more difficult...

    its nice to see i'm not the only one who likes c++
    ^_^ and for learning win32 development (adding a gui) google search
    "forgers win32 tutorial" it's great ;)

    I used to use C++ builder 2009.But from now,I'm going to start with resource code.
    Thanks for supporting XD
     
    uh..guys,I have a qustion, where can I get a text editor for pokemon leafgreen that works? or , when I try a-text, it says"component comdlg.ocx or one of its dependencies not correctly regestered:a file is missing or invalid." please help me!
    Maybe you should try downloading comdlg.ocx and put in in here (may vary from comp to comp but the basic is here): C:/WINDOWS/system32
    Also, this is completely irrelevant to the thread.

    May I suggest something like a... Like a... I have ran out of ideas :P xD
     
    It's not impossible, it'd just take a long time to run (ansd write) because the program would have to look through every piece of script and other stuff to see which flags are used.
    Firstly, how would it find every script? How would it know if the script it found is valid or not? What about scripts called from ASM? What about flags modified from ASM?
     
    No idea for any of those questions. But the game does all those things, so a program could too. The game is just another program after all. I wasn't volunteering myself to do it. =p

    The flags are modified at run time.

    The function to return the address of the flags is this:

    Code:
    ROM:0809D6EC
    ROM:0809D6EC ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
    ROM:0809D6EC
    ROM:0809D6EC ; Parameters: r0 = flag
    ROM:0809D6EC ; Return: r0 = address
    ROM:0809D6EC
    ROM:0809D6EC GetFlagAddress 
    ROM:0809D6EC
    ROM:0809D6EC                 PUSH    {LR}
    ROM:0809D6EE                 LSL     R1, R0, #0x10
    ROM:0809D6F0                 LSR     R2, R1, #0x10
    ROM:0809D6F2                 ADD     R3, R2, #0
    ROM:0809D6F4                 CMP     R2, #0
    ROM:0809D6F6                 BNE     loc_809D6FC
    ROM:0809D6F8                 MOV     R0, #0
    ROM:0809D6FA                 B       loc_809D72E
    ROM:0809D6FC ; ---------------------------------------------------------------------------
    ROM:0809D6FC
    ROM:0809D6FC loc_809D6FC                             ; CODE XREF: GetFlagAddress+Aj
    ROM:0809D6FC                 LDR     R0, =0x3FFF
    ROM:0809D6FE                 CMP     R2, R0
    ROM:0809D700                 BHI     loc_809D71C
    ROM:0809D702                 LDR     R0, =0x3005D8C
    ROM:0809D704                 LSR     R1, R1, #0x13
    ROM:0809D706                 LDR     R2, =0x1270
    ROM:0809D708                 ADD     R1, R1, R2
    ROM:0809D70A                 LDR     R0, [R0]
    ROM:0809D70C                 B       loc_809D72C
    ROM:0809D70C ; ---------------------------------------------------------------------------
    ROM:0809D70E                 DCB    0
    ROM:0809D70F                 DCB    0
    ROM:0809D710 dword_809D710   DCD 0x3FFF              ; DATA XREF: GetFlagAddress:loc_809D6FCr
    ROM:0809D714 dword_809D714   DCD 0x3005D8C           ; DATA XREF: GetFlagAddress+16r
    ROM:0809D718 dword_809D718   DCD 0x1270              ; DATA XREF: GetFlagAddress+1Ar
    ROM:0809D71C ; ---------------------------------------------------------------------------
    ROM:0809D71C
    ROM:0809D71C loc_809D71C                             ; CODE XREF: GetFlagAddress+14j
    ROM:0809D71C                 LDR     R1, =0xFFFFC000
    ROM:0809D71E                 ADD     R0, R3, R1
    ROM:0809D720                 CMP     R0, #0
    ROM:0809D722                 BGE     loc_809D728
    ROM:0809D724                 LDR     R2, =0xFFFFC007
    ROM:0809D726                 ADD     R0, R3, R2
    ROM:0809D728
    ROM:0809D728 loc_809D728                             ; CODE XREF: GetFlagAddress+36j
    ROM:0809D728                 ASR     R0, R0, #3
    ROM:0809D72A                 LDR     R1, =0x20375FC
    ROM:0809D72C
    ROM:0809D72C loc_809D72C                             ; CODE XREF: GetFlagAddress+20j
    ROM:0809D72C                 ADD     R0, R0, R1
    ROM:0809D72E
    ROM:0809D72E loc_809D72E                             ; CODE XREF: GetFlagAddress+Ej
    ROM:0809D72E                 POP     {R1}
    ROM:0809D730                 BX      R1
    ROM:0809D730 ; End of function GetFlagAddress
    ROM:0809D730
    ROM:0809D730 ; ---------------------------------------------------------------------------
    ROM:0809D732                 DCB    0
    ROM:0809D733                 DCB    0
    ROM:0809D734 dword_809D734   DCD 0xFFFFC000          ; DATA XREF: GetFlagAddress:loc_809D71Cr
    ROM:0809D738 dword_809D738   DCD 0xFFFFC007          ; DATA XREF: GetFlagAddress+38r
    ROM:0809D73C dword_809D73C   DCD 0x20375FC           ; DATA XREF: GetFlagAddress+3Er

    So, would not be viable (or even possible) to write an algorithm that checks the 'supposed' flags used in the game.

    The best that could be done, is a tool that loads the save and check the flags. But it would not be very useful. :P
     
    The flags are modified at run time.

    So, would not be viable (or even possible) to write an algorithm that checks the 'supposed' flags used in the game.

    The best that could be done, is a tool that loads the save and check the flags. But it would not be very useful. :P
    That ASM code is amazing...
    Except the ASM part,there's another way for about flags and vars.
    Read all the scripts from the map and decomplie them and find the used flags or vars...
    -v-But this is just thinking.Doing so is not really easy.

    So many sentences...
    Thank you for reminding~
     
    Last edited:
    That ASM code is amazing...
    Read all the scripts from the map and decomplie them and find the used flags or vars...

    Firstly, how would it find every script? How would it know if the script it found is valid or not? What about scripts called from ASM? What about flags modified from ASM?

    :D

    Returning to the main subject of discussion, I hope to continue with their learning c + +.

    And I also am learning C + +, and after you get used to the syntax, notice that is not as difficult as it seems.

    Although I was almost giving up to create forms with wxWidgets using wsSizers. :(
     
    is this a programm that makes the rom bigger so you can put more on it?
     
    :D

    Returning to the main subject of discussion, I hope to continue with their learning c + +.

    And I also am learning C + +, and after you get used to the syntax, notice that is not as difficult as it seems.

    Although I was almost giving up to create forms with wxWidgets using wsSizers. :(

    Due to some reasons,I just give up wxWidgets and start learning Qt...

    is this a programm that makes the rom bigger so you can put more on it?
    Yes,it is^^
     
    You weren't thinking of the same thing I was. By checking which flags are used, I thought it meant which flags are programmed to be used, whether they've been activated or not, while you thought it meant only flags that have been activated. To check the second, one'd have to check the individual save state.


    score_under quote [2]


    Please, it's "C++".


    Go to Google translator, select Portuguese in 1st option and English on the 2nd.
    Type "C++", and see what the result will come out "C + +".

    I check the spelling of important things, but we are in a Pokémon forum, no need to worry about "technically terms" nor the languages's names, because it makes no difference.



    Can we go back to the subject of the topic, which is the program made by liuyanghejerry?

    If you want to continue discussing a tool to search for flags, I think better to create a specific topic for this.
    :D
     
    Back
    Top