Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Questions about FPC4NDS

  1. #1

    Questions about FPC4NDS

    I downloaded the new snapshot of FPC4NDS and tried to run the examples...
    I can run some examples,but the examples with a data folder, I can't run

    1-How can I transform the files on data folders of the examples?
    I think I have to use grit to convert the images and another program to convert to .o
    but i don't know how to use ^^'
    whithout that always shows the error: Error While Linking

    Exemples With data folder:
    devkitPro\Graphics\2D\16bit_color_bmp
    devkitPro\Graphics\2D\256_color_bmp
    devkitPro\Graphics\2D\Complex_2D
    devkitPro\Graphics\2D\custom_font
    devkitPro\Graphics\2D\rotscale_text

    devkitPro\Graphics\3D\Misc\Display_List_2
    devkitPro\Graphics\3D\Misc\Env_Mapping
    devkitPro\Graphics\3D\Misc\Ortho
    devkitPro\Graphics\3D\Misc\Paletted_Cube
    devkitPro\Graphics\3D\Misc\Picking
    devkitPro\Graphics\3D\Misc\Textured_Cube
    devkitPro\Graphics\3D\Misc\Textured_Quad
    devkitPro\Graphics\3D\Misc\Toon_Shading


    ------------------------------------
    2-How to listen the sounds of the example devkitPro\sound\SimpleSound?
    I tryed run that, it compiled, and I runned on No$GBA, but I can't listen the songs
    Do I have to test it on DS or it is only a demonstration about how to run songs?

    ------------------------------------
    3-libmikmod isn't working on the snapshot...
    Log:

    PPU Loading C:\FPC4NDS\units\arm-nds\libndsfpc\mikmod7.ppu
    PPU Source: mikmod7.pp not found
    PPU Source: mikmod.inc not found
    PPU Source: mikmod.inc not found
    Recompiling mikmod7, checksum changed for System
    mikmod7.pp(9,25) Fatal: Can't find unit mikmod7 used by main7
    Fatal: Compilation aborted
    PPU Loading C:\FPC4NDS\units\arm-nds\libndsfpc\mikmod9.ppu
    PPU Source: mikmod9.pp not found
    PPU Source: mikmod.inc not found
    PPU Source: mikmod.inc not found
    Recompiling mikmod9, checksum changed for System
    mikmod9.pp(15,25) Fatal: Can't find unit mikmod9 used by main9
    Fatal: Compilation aborted
    The libmikmod are installed on the folder C:\devkitpro\libmikmod
    I downloaded it from this topic http://www.pascalgamedevelopment.com...pic.php?t=5134
    fpc.cfg:
    -FiC:\Joao\Programar\devkitpro\libmikmod\include\li bmikmod
    -FlC:\Joao\Programar\devkitpro\libmikmod\lib\libmik mod
    4-Where Can I download libfat?
    ------------------------------------
    I didn't test the dswifi because at this moment, I don't want to make wifi homebrews


    Thanks
    Sorry for my english

  2. #2

    Re: Questions about FPC4NDS

    Quote Originally Posted by unneon
    1-How can I transform the files on data folders of the examples?
    I think I have to use grit to convert the images and another program to convert to .o
    but i don't know how to use ^^'
    In data folders you will find a .git file, that is used by grit, e.g.:
    Code:
    grit.exe drunkenlogo.png -ff drunkenlogo.git -fts
    2-How to listen the sounds of the example devkitPro\sound\SimpleSound?
    I tryed run that, it compiled, and I runned on No$GBA, but I can't listen the songs
    Do I have to test it on DS or it is only a demonstration about how to run songs?
    No songs indeed, sound samples only, but for some strange reason it does not work anymore... :roll:
    I'll check it

    3-libmikmod isn't working on the snapshot...
    See above
    I used two different versions of libmikmod libs and this is the result
    I'll fix it ASAP

    4-Where Can I download libfat?
    libfat is already included in the snapshot and it is installed by default by dkP's installer.

    Thanks for the bug report
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  3. #3

    Re: Questions about FPC4NDS

    1-
    Quote Originally Posted by Legolas
    In data folders you will find a .git file, that is used by grit, e.g.:
    Code:
    grit.exe drunkenlogo.png -ff drunkenlogo.git -fts
    didn't work
    Quote Originally Posted by Error Log
    ---grit v0.7b2 ---
    ** src[ 0] : drunkenlogo.png
    Conversion finished.
    C:\FPC4NDS\bin\arm-nds\arm-nds-ld.exe: cannot find drunkenlogo.o
    main.pp(85) Error: Error while ]

    My batch:
    Code:
    @echo off
    C:\FPC4NDS\bin\arm-nds\grit.exe drunkenlogo.png -ff drunkenlogo.git -fts 
    C:\FPC4NDS\bin\arm-nds\ppcarmnds --gc-sections -Tnds main.pp 
    C:\FPC4NDS\bin\arm-nds\ndstool -c 16bitcolor.nds -9 main.nef.bin 
    pause
    C:\FPC4NDS\NO$GBA\TNO$GBA.EXE 16bitcolor.nds
    ---------------------------------------

    4-
    Quote Originally Posted by Legolas
    libfat is already included in the snapshot and it is installed by default by dkP's installer.
    It isn't working :cry:

    Quote Originally Posted by Error Log
    PPU Loading C:\FPC4NDS\units\arm-nds\libndsfpc\fat.ppu
    PPU Source: fat.pp not found
    PPU Source: fat.inc not found
    PPU Source: fat.inc not found
    Recompiling fat, checksum changed for System
    fat.pp(8,13) Fatal: Can't find unit fat used by main
    Fatal: Compilation aborted
    It can be an error on my fpc.cfg,can't it?

    ---------------------------------------


    Quote Originally Posted by Legolas
    Thanks for the bug report
    Thanks for the answers

  4. #4

    Re: Questions about FPC4NDS

    grit returns a .s file, that you should pass to arm-nds-as.exe in order to get a .o. Your batch should be:

    Code:
    @echo off
    C:\FPC4NDS\bin\arm-nds\grit.exe drunkenlogo.png -ff drunkenlogo.git -fts
    C:\FPC4NDS\bin\arm-nds\arm-nds-as -o drunkenlogo.o drunkenlogo.s
    C:\FPC4NDS\bin\arm-nds\ppcarmnds --gc-sections -Tnds main.pp 
    C:\FPC4NDS\bin\arm-nds\ndstool -c 16bitcolor.nds -9 main.nef.bin 
    pause
    C:\FPC4NDS\NO$GBA\TNO$GBA.EXE 16bitcolor.nds
    The problem about libfat is that I haven't recompiled the related code, so the compiler version does not match the library version. ops:

    In the meanwhile I have fixed libmikmod and it works now, but something still goes wrong playing raw sound :scratch:

    Expect a new snapshot with all fixes this weekend


    Quote Originally Posted by unneon
    Thanks for the answers
    You are welcome
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  5. #5

    Questions about FPC4NDS

    this batch worked
    Thanks again :shock:

    Now I have 3 new questions

    5- How to convert .pcx to .o?
    (ball.pcx of the devkitpro\graphics\complex2d example)

    6- Delay procedure is possible? I tryed it in a game, but didn't work, then I made it with a for,but don't has the real Miliseconds

    7- Where can I see what the files of bin folder do ops:
    arm-nds-as.exe
    arm-nds-ld.exe
    arm-nds-nm.exe

    ----
    Edited
    New Question^^
    8- Where is the file arm-eabi on the snapshot?
    See the devkitPro\debugging\exceptionTest example:
    // The default exception handler displays the exception type - data abort or undefined instruction
    // you can relate the exception to your code using arm-eabi-addr2line -e <elf> <address>
    // assuming you built with debug info this will display a source file and a line number
    // The address of the instruction is shown as pc, beside the address which faulted
    // the rest of the screen is a dump of the registers.

  6. #6

    Questions about FPC4NDS

    5 - All you need to do is to convert the pcx file in .s by bin2s utility, then convert it to .o:
    Code:
    c&#58;/fpc4nds/bin/arm-nds/bin2s data/ball.pcx > ball.pcx.s
    c&#58;/fpc4nds/bin/arm-nds/arm-nds-as -o ball.pcx.o ball.pcx.s
    6 - About delay, you could use timer interrupts, but the easy way is to count the vertical blanks (nds has 60 vblanks every second). Look at Vblank() function in hello_world example

    7 - Look at binutils. However,
    Code:
    arm-nds-&#91;*&#93; --help
    returns a list of command line parameters

    8 - I'll add arm-nds-addr2line in the next snapshot
    For now, you can use arm-eabi-addr2line shipped with devkitPro in c:\devkitPro\devkitARM\bin[/code]
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  7. #7

    Questions about FPC4NDS

    Quote Originally Posted by Legolas
    5 - All you need to do is to convert the pcx file in .s by bin2s utility, then convert it to .o:
    Code:
    c&#58;/fpc4nds/bin/arm-nds/bin2s data/ball.pcx > ball.pcx.s
    c&#58;/fpc4nds/bin/arm-nds/arm-nds-as -o ball.pcx.o ball.pcx.s
    I tryied it with an 3d example before do the question,but didn't show the image:
    devkitPro\Graphics\3D\Misc\Ortho
    Batch:
    Code:
    C&#58;\FPC4NDS\bin\arm-nds\bin2s drunkenlogo.pcx>drunkenlogo.pcx.s  
    C&#58;\FPC4NDS\bin\arm-nds\arm-nds-as -o drunkenlogo.pcx.o drunkenlogo.pcx.s 
    C&#58;\FPC4NDS\bin\arm-nds\ppcarmnds --gc-sections -Tnds main.pp
    C&#58;\FPC4NDS\bin\arm-nds\ndstool -c Ortho.nds -9 main.nef.bin
    Now I Tryied with this example:devkitPro\Graphics\2D\Complex_2D
    and it's working fine ops:

    Thanks for the answers... Again

  8. #8

    Questions about FPC4NDS

    Sorry for the delay, but the sound related bug was hard to kill :rambo:
    I have uploaded a new fpc4nds snapshot here (16 megs)
    In this package I have updated the binutils and added Insight debugger too, that can be used for remote debugging with desmume emulator.

    [Off Topic]
    Maybe someone remember this post where 21o6 found a way to check if the code runs on arm9 or on arm7 cpu. It worked very well, but gave some errors on no$gba, because the try to write where it can't. I have finally found another way that works on no$gba without errors: the irq_vector region, defined by the linker script, has two different addresses ($0B003FFC on ARM9, $0380fff8 on ARM7), so it's very simple to check the cpu that is running the code. :mrgreen:
    This function is cleaner than the older one, because does not raise any memory writing error.
    [/Off Topic]
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  9. #9

    Questions about FPC4NDS

    Has this been checked into the FPC SVN?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  10. #10

    Questions about FPC4NDS

    Yes, of course
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

Page 1 of 2 12 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
  •