Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: FPC 4 GBA: Issues with the gnu linker...

  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    FPC 4 GBA: Issues with the gnu linker...

    Well since I have put up the project page only one person has really gotten some kind of response to it. I'd hope that more would take an interest as it would really help in it's development.

    I think the main issue right now lies in the usage of the gnu linker used by FPC. Namely how to get the crt0.o to link with the hello.o into a GBA rom. Then how to verify that it's a valid rom.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2

    FPC 4 GBA: Issues with the gnu linker...

    Okay, I went a little further from the last time. I have been able to compile a basic rtl, by making some little fixes to the linux' one. I think it could be the right way, because the gnu-arm crosscompiler, usually used for gba, works without changes from the basic linux rtl.
    With this rtl the compiler works without errors. The next step will be to make a startup code (prt0.as), in order to put all things to the right place. The biggest problem in this step is to make to cohabit the fpc initialization code and the gba's one. I'm not comfortable with asm, so the work proceeds slowly. If someone is interested, i can make a little guide to show my steps until this point.

    PS. I forgot often to say "sorry for my english"... well, if someone can't understand my words, we can try with french or italian
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  3. #3
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    FPC 4 GBA: Issues with the gnu linker...

    Excellent job man!

    Hmm... my asm skills are a bit rusty, but I might be able to haggle through it if needed. I think a little guide might be useful in keeping track of the progress up until this point.

    As for the startup code or prt0.as as you mention it, i that the same as the crt0.as per chance? Or something totally seperate? And... what exactly does it need to do?

    Quote Originally Posted by Legolas
    PS. I forgot often to say "sorry for my english"... well, if someone can't understand my words, we can try with french or italian
    Damn! My french teacher was right, I might have actually needed to used it...
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #4

    FPC 4 GBA: Issues with the gnu linker...

    Well, I'll write this guide. Maybe you could correct my english mistakes...
    About prt0.as: it is exactly as crt0.as, it does the same things.
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    FPC 4 GBA: Issues with the gnu linker...

    Hows that 'guide'thingy coming along? Doesn't have to be anything too elaborate. Just a decent enough outline to see what has been done and what needs to be done next. If you are stuck then just make it as specific as you are able then we will break it all down later.

    As for the prt0.as and crt0.as is the one we are using now insufficient? I know that it's supposed to be a sort of hack, but will it not direct the linker to make a proper GBA ROM?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6

    FPC 4 GBA: Issues with the gnu linker...

    Oh, okay! I tried to make an exaustive guide, but it taken much more time. Hour startup code is ok, if is passed with the right options to the linker. However, after a little disassembling, I found why our executables can't run on a gba: fpc compiler adds some calls (FPC_INITIALIZEUNITS, FPC_DO_EXIT, etc.) that interfere with startup code. I tried to remove them and relinking the generated asm and - surprise! - it works! At the latest tomorrow I'll put here the step-by-step. Promised!
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  7. #7
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    FPC 4 GBA: Issues with the gnu linker...

    That is excellent news!

    Can you provide the source and indicate where it was changed? Files, etc...
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #8

    FPC 4 GBA: Issues with the gnu linker...

    Of course! I'll provide the sources of all files changed and a little text file with instructions.
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  9. #9
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    FPC 4 GBA: Issues with the gnu linker...

    Awesome. When do you think you can post it here?

    Also, was the rom tested? Does load in an emulator?

    I'll be posting it on the FPC 4 GBA site, of course, so that others can help to start working on the basic hardware libraries... sound, video, etc...

    As a great guide to these things I'd recommend going to the link with the book 'Programming The Nintendo Game Boy Advance' on the FPC 4 GBA page.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  10. #10

    FPC 4 GBA: Issues with the gnu linker...

    Done! Download the package from here and feel free to add/remove/change everything you want
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •