Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

TrollandToad.com
Reply
 
Thread Tools
  #26    
Old April 14th, 2016 (12:55 PM).
FBI's Avatar
FBI FBI is offline
Free supporter
  • Silver Tier
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,770
Quote:
Originally Posted by Bonnox View Post
if I look at openpoke, he does

#include
...

well, I primarily use windows :p
what do your scripts do? I used to use a simple program developed in java by me to insert a routine in the ROM :p
and once compiled, what do I have to search to branch to?

I saw your template in the other post (have to reply yet), but don't have looked at it for now. I will do, but I use ruby, does anithing change (hope/think not) ?
Oh, looks like our friend Porygon has answered most of your questions, but I'll speak about the ones directed at me.

Yeah, so you can't directly do using #include with this python setup unless you went into C:\devkitPro\devkitARM\arm-none-eabi\include and put in the files you needed in there. You could alternatively just cp the files you wanted to use into the cwd and call it a day, lol. I personally prefer to make my own .h files for generic GBA stuff, but that's just me.

The python script build essentially is recursively doing:
arm-none-eabi-gcc -mthum -mno-thumb-interwork -mcpu=arm7tdmi -fno-inlin -mlong-calls -march=armv4t -Wall -O2 -c file.c -o ./build/file
Then doing arm-none-eabi-ld with the linker files and such.

The python script insert is taking the .bin output and placing it in the ROM, as well as setting up hooks and address repointing. It's got a nice --debug command line argument which will tell you what function was compiled into what part of the ROM. :)

For using this setup for Ruby, you first put Ruby.gba in the recycling bin and empty bin, just make sure your ROM is called BPRE.gba. It doesn't actually check the ROM tag, just the file name.
__________________
...
Reply With Quote

Relevant Advertising!

  #27    
Old May 2nd, 2016 (12:45 AM).
Bonnox Bonnox is offline
Time (wasting) Lord
     
    Join Date: Sep 2015
    Location: Gallifrey, (IT)
    Age: 22
    Gender: Male
    Posts: 44
    i feel sad telling you this, but I decided (a hard decision) to rewrite the library in ASM myself, and use it in C, because seems simplier to me rather than doing strange things with linker and compilers (i'm not used to)
    Since the library is called more often than the application logic, I think that the performances will improve compared to a full C library.
    I will do only the minimum necessary for a comfortable basic usage of the console (tilemap, bios, etc), trying to avoid complex themes (transformation matrix, sound) and then will put the source on this site , if tou want.
    Reply With Quote
      #28    
    Old May 3rd, 2016 (10:41 PM).
    Wunkolo's Avatar
    Wunkolo Wunkolo is offline
       
      Join Date: Aug 2005
      Posts: 144
      Gonna provide some input and say that I use this web tool a lot to view compiler optimizations but it will make the process of C/C++ -> ASM a much more rapid iteration process for smaller cases. You can't have multiple files included beyond the standard library but you can flatly implement your data types for the sake of getting some workable ASM out. Could possibly make a fork on github specifically for the purpose of generating pokemon asm with custom include files.
      https://gcc.godbolt.org/
      Reply With Quote
        #29    
      Old August 31st, 2016 (9:06 AM). Edited August 31st, 2016 by Bonnox.
      Bonnox Bonnox is offline
      Time (wasting) Lord
         
        Join Date: Sep 2015
        Location: Gallifrey, (IT)
        Age: 22
        Gender: Male
        Posts: 44
        Hi all, after succeding in logging in after some months, I give a little update.

        I started to write a C lightweight library for the GBA, to be used in our hacks.
        Progress is slow, since I have little free time.
        At the moment I have almost finished the basic systems. Remain only the dynamic memory allocation, some stuff with strings and video.

        (there are several files, each one dealing with a confined aspect of the GBA mechanics, but at the end they are all included in a single one, for the sake of simplicity of compiling. sorry about that, if you're a pro)

        the strange thing is that if I ensble optimizations, some of the code is broken. Moreover, seems that I am unable to usesome of the advanced features of C, like structures and array initialization (including strings... hell I've even done four function with 2, 4, 8 and 16 parameters for creating a string without having to type too much with pointers...)
        Reply With Quote
          #30    
        Old September 5th, 2016 (8:56 AM).
        DizzyEgg's Avatar
        DizzyEgg DizzyEgg is offline
           
          Join Date: Feb 2014
          Location: Poland
          Age: 20
          Gender: Male
          Nature: Quiet
          Posts: 711
          Quote:
          Originally Posted by Bonnox View Post
          Hi all, after succeding in logging in after some months, I give a little update.

          I started to write a C lightweight library for the GBA, to be used in our hacks.
          Progress is slow, since I have little free time.
          At the moment I have almost finished the basic systems. Remain only the dynamic memory allocation, some stuff with strings and video.

          (there are several files, each one dealing with a confined aspect of the GBA mechanics, but at the end they are all included in a single one, for the sake of simplicity of compiling. sorry about that, if you're a pro)

          the strange thing is that if I ensble optimizations, some of the code is broken. Moreover, seems that I am unable to usesome of the advanced features of C, like structures and array initialization (including strings... hell I've even done four function with 2, 4, 8 and 16 parameters for creating a string without having to type too much with pointers...)
          I'd like to talk with you. Join this irc channel, I'm Dizzy there http://chat.linkandzelda.com:9090/?channels=rh.
          Also, you know that we code in C already? See Emerald battle engine upgrade
          Reply With Quote
            #31    
          Old September 6th, 2016 (10:42 AM). Edited September 6th, 2016 by Bonnox.
          Bonnox Bonnox is offline
          Time (wasting) Lord
             
            Join Date: Sep 2015
            Location: Gallifrey, (IT)
            Age: 22
            Gender: Male
            Posts: 44
            Quote:
            Originally Posted by DizzyEgg View Post
            I'd like to talk with you. Join this irc channel, I'm Dizzy there http://chat.linkandzelda.com:9090/?channels=rh.
            Also, you know that we code in C already? See Emerald battle engine upgrade


            well, i need a training on how to use the IRC first! haha, I'm kind of new to the internet. Moreover, I have little free time
            if you want to speak with me , you could send me a PM, or use telegram (we could even make a group)! I have the same username, no profilw picture.

            where do i find that source?
            i'd be glad to get in touch with other programmers!
            thanks
            Reply With Quote
              #32    
            Old September 6th, 2016 (3:43 PM).
            FBI's Avatar
            FBI FBI is offline
            Free supporter
            • Silver Tier
             
            Join Date: Jan 2013
            Location: Unknown Island
            Gender: Male
            Posts: 1,770
            Quote:
            Originally Posted by Bonnox View Post
            well, i need a training on how to use the IRC first! haha, I'm kind of new to the internet. Moreover, I have little free time
            if you want to speak with me , you could send me a PM, or use telegram (we could even make a group)! I have the same username, no profilw picture.

            where do i find that source?
            i'd be glad to get in touch with other programmers!
            thanks
            Open the link in your web browser. The rest is self explanatory, most people are online during the mornings for European countries.
            __________________
            ...
            Reply With Quote
            Reply

            Quick Reply

            Join the conversation!

            Create an account to post a reply in this thread, participate in other discussions, and more!

            Create a PokéCommunity Account

            Sponsored Links
            Thread Tools

            Posting Rules
            You may not post new threads
            You may not post replies
            You may not post attachments
            You may not edit your posts

            BB code is On
            Smilies are On
            [IMG] code is On
            HTML code is Off

            Forum Jump


            All times are GMT -8. The time now is 4:40 AM.