Page 1 of 9 123 ... LastLast
Results 1 to 10 of 81

Thread: FPC4GP2X status?

  1. #1

    FPC4GP2X status?

    I'm expecting to recieve my GP2X F200 in the folllowing days and is ofcourse excited to start coding for it.
    However I'm wondering what the status of Pascal GP2X development is?
    How much of SDL can I use with Pascal?
    Are there any games (or demos) made with Pascal for the GP2X at this time?
    Can I use HW-SDL instead of the normal SDL you get withthe console?
    Would I be better of using the forbidden language (C++)?
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  2. #2

    FPC4GP2X status?

    Hi pstudio,
    congratulations on purchasing a GP2X F200 - I would like to buy one of those versions one day (read: not anytime soon due to lack of money <G>)

    When you get yours, let us know if the "d-pad" works ok, and how the touchscreen goes :-)

    I have used the standard SDL functions ok (including loading BMP files, etc), but things I have had trouble with is the SDL_Mixer and loading PNG files using SDL_Image

    I can load and play WAV files ok not using the SDL_Mixer routines.

    I am working on the PNG files and SDL_Mixer problems to see if I can get around these issues.

    I am going to try making my own separate library using a C compiler to make a library I can use from freepascal to try loading PNG files and try to use the mixer routines.

    The only game I know of made with pascal for the GP2X is the one called blocks by Eugene Proshkin (http://www.gp32x.com/board/lofiversi...hp/t34048.html) but I am sure there are other pascal games elsewhere already made.

    There is a hardware-accelerated version of SDL - I downloaded one to try with the devkitGP2X...I haven't done much testing yet. One issue with this version is that because it has libmad included for mp3 playing, I think it can't be used for commercial projects, and the projects bust be open source?

    cheers,
    Paul.
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  3. #3

    FPC4GP2X status?

    Talk about shooting themselves in the foot then... including GPL (I'm assuming here) code in a library so anything statically linked with it becomes GPL..

    Unless you can dynamically link to it, in which case, there's no problem.

    But they should be making it easier for commercial projects to move to the GP2X, not harder.

    How much support have you had from the GP2X forums?

    it would be a real shame if this cool device went down in the annuls of history as a cute device for playing emulators... and that's all...

    It needs real, commercial games now. That would quash one of the biggest criticisms it has from users outside of the circle.

  4. #4

    FPC4GP2X status?

    When you get yours, let us know if the "d-pad" works ok, and how the touchscreen goes
    My oppinion probably wouldn't help. I'm one of the few guys who thought that the PSP D-pad was ok. One of my friends nearly hit me in the head for saying that

    Ok so it's possible to make a 'real' game, but your kind of limited regarding what image and sound file type to use.

    Do the problems with SDL, Mixer and Image only occur when using Pascal or do they also happen when coding C?

    Unfortunately I couldn't download Blocks (Got a SQL error :?). I would have liked to see it run on my GP2X as one of the first games.

    I guess there are still some issues to be dealt with before Pascal GP2X development will be truly easy and smooth, but that just makes it more interesting
    Can't wait to get my fingers on it
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  5. #5

    FPC4GP2X status?

    Quote Originally Posted by pstudio
    When you get yours, let us know if the "d-pad" works ok, and how the touchscreen goes
    My oppinion probably wouldn't help. I'm one of the few guys who thought that the PSP D-pad was ok. One of my friends nearly hit me in the head for saying that
    haha!! fair enough

    Quote Originally Posted by pstudio
    Ok so it's possible to make a 'real' game, but your kind of limited regarding what image and sound file type to use.

    Do the problems with SDL, Mixer and Image only occur when using Pascal or do they also happen when coding C?
    People seem to have less issues when using C/C++ to do GP2X programs, but I am not sure if there are pascal ]Unfortunately I couldn't download Blocks (Got a SQL error :?). I would have liked to see it run on my GP2X as one of the first games.[/quote]

    have you tried from this site?
    http://www.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,25,2030

    This site has loads of games, useful libraries, tools, etc.

    Quote Originally Posted by pstudio
    I guess there are still some issues to be dealt with before Pascal GP2X development will be truly easy and smooth, but that just makes it more interesting
    Can't wait to get my fingers on it
    It is fun regardless of the current hiccups :-)

    cheers,
    Paul.
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  6. #6

    FPC4GP2X status?

    Hi Paul,

    I was wondering wether you'd had any luck with the mixer and png issues. Sounded like you had a plan earlier..

    I'd really like to get something up and running (as you know )

  7. #7

    FPC4GP2X status?

    Quote Originally Posted by jasonf
    Hi Paul,

    I was wondering wether you'd had any luck with the mixer and png issues. Sounded like you had a plan earlier..

    I'd really like to get something up and running (as you know )
    Sorry Jason, I hadn't gotten around to trying my separate library idea yet
    I will try and see if I can get it going in the next couple of days if that is ok.

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

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

    FPC4GP2X status?

    Hey Paul. I've sort of been following the GP2X/JEDI-SDL development from the side-lines. For clarification, are the programs crashing/popping up errors because of the sdl_mixer code in the sdl_mixer.so file it's self?

    For PNG what exactly is the Linux solution for this anyhow? I know that for Windows I use PNG with a series of DLL files such as; libpng13.dll, jpeg.dll and of course SDL_image.dll.

    Now I'm assuming the PNG issue is directly with SDL_image or is it less obvious than this?


    I too am interested in GP2X dev as a portable platform for anything I might release, but like Jason I use PNG for all my graphics and sdl_mixer to play music.

    So one more guy routing for ya!
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #9

    FPC4GP2X status?

    Quote Originally Posted by WILL
    Hey Paul. I've sort of been following the GP2X/JEDI-SDL development from the side-lines. For clarification, are the programs crashing/popping up errors because of the sdl_mixer code in the sdl_mixer.so file it's self?

    For PNG what exactly is the Linux solution for this anyhow? I know that for Windows I use PNG with a series of DLL files such as; libpng13.dll, jpeg.dll and of course SDL_image.dll.

    Now I'm assuming the PNG issue is directly with SDL_image or is it less obvious than this?


    I too am interested in GP2X dev as a portable platform for anything I might release, but like Jason I use PNG for all my graphics and sdl_mixer to play music.

    So one more guy routing for ya!
    thanks for the encouragement Will

    I am experimenting with a simple c library that I am compiling to .o format so I can ]Linking sdlibltest
    sdlibltest.o&#58; In function `P$SDLTEST_SHUTDOWN'&#58;
    sdlibltest.dpr&#58;&#40;.text.n_p$sdltest_shutdown +0x24&#41;&#58; undefined reference to `gp2x_Mix_FreeMusic'
    sdlibltest.dpr&#58;&#40;.text.n_p$sdltest_shutdown +0x28&#41;&#58; undefined reference to `gp2x_Mix_CloseAudio'
    sdlibltest.o&#58; In function `P$SDLTEST_OPENAUDIO$$BOOLEAN'&#58;
    sdlibltest.dpr&#58;&#40;.text.n_p$sdltest_openaudi o$$boolean+0x50&#41;&#58; undefined reference to `gp2x_Mix_OpenAudio'
    sdlibltest.o&#58; In function `P$SDLTEST_LOADMUSIC$ANSISTRING$$POINTER'&#58;
    sdlibltest.dpr&#58;&#40;.text.n_p$sdltest_loadmusi c$ansistring$$pointer+0x28&#41;&#58; undefined reference to `gp2x_Mix_LoadMUS'
    sdlibltest.o&#58; In function `P$SDLTEST_PLAYMUSIC$POINTER$LONGINT$$LONGINT'&#58 ;
    sdlibltest.dpr&#58;&#40;.text.n_p$sdltest_playmusi c$pointer$longint$$longint+0x20&#41;&#58; undefined reference to `gp2x_Mix_PlayMusic'
    sdlibltest.o&#58; In function `P$SDLTEST_PLAYINGMUSIC$$BOOLEAN'&#58;
    sdlibltest.dpr&#58;&#40;.text.n_p$sdltest_playingm usic$$boolean+0x10&#41;&#58; undefined reference to `gp2x_Mix_PlayingMusic'[/code]

    my c library header file (gp2x_sdl_mixer.h)
    Code:
    #ifndef GP2X_SDL_MIXER
    #define GP2X_SDL_MIXER
    
    #include "SDL_mixer.h"
    
    int gp2x_Mix_OpenAudio&#40;int frequency, Uint16 format, int channels, int chunksize&#41;;
    void gp2x_Mix_CloseAudio&#40;void&#41;;
    Mix_Music *gp2x_Mix_LoadMUS&#40;const char *file&#41;;
    int gp2x_Mix_PlayMusic&#40;Mix_Music *music, int loops&#41;;
    int gp2x_Mix_PlayingMusic&#40;void&#41;;
    void gp2x_Mix_FreeMusic &#40;Mix_Music *music&#41;;
    
    #endif

    my c library definitions (gp2x_sdl_mixer.c)
    Code:
    #include "gp2x_sdl_mixer.h"
    
    int gp2x_Mix_OpenAudio&#40;int frequency, Uint16 format, int channels, int chunksize&#41;
    &#123;
        return Mix_OpenAudio&#40;frequency,format,channels,chunksize&#41;;
    &#125;;
    void gp2x_Mix_CloseAudio&#40;void&#41;                 
    &#123;
        Mix_CloseAudio&#40;&#41;;
    &#125;;
    Mix_Music *gp2x_Mix_LoadMUS&#40;const char *file&#41;
    &#123;
        return Mix_LoadMUS&#40;file&#41;;
    &#125;;
    int gp2x_Mix_PlayMusic&#40;Mix_Music *music, int loops&#41;
    &#123;
        return Mix_PlayMusic&#40;music,loops&#41;;
    &#125;;
    int gp2x_Mix_PlayingMusic&#40;void&#41;
    &#123;
        return Mix_PlayingMusic&#40;&#41;;
    &#125;;
    void gp2x_Mix_FreeMusic &#40;Mix_Music *music&#41;
    &#123;
        Mix_FreeMusic&#40;music&#41;;
    &#125;;
    My pascal unit that includes the c library (gp2x_sdl_mixer.pas)

    Code:
    Unit gp2x_sdl_mixer;
    &#123;$IFDEF fpc
    &#123;$MODE Delphi&#125;
    &#123;$ENDIF&#125;
    
    &#123;$link gp2x_sdl_mixer.o&#125;
    &#123;$linklib c&#125;
    
    Interface
    
    Uses
        CTypes;
    
    Type
        PMix_Music = Pointer;
    
    Function  gp2x_Mix_OpenAudio&#40;frequency &#58; ctypes.cint32; format &#58; ctypes.cuint16; channels,chunksize &#58; ctypes.cint32&#41; &#58; ctypes.cint32; cdecl; external;
    Procedure gp2x_Mix_CloseAudio; CDecl; external;
    Function  gp2x_Mix_LoadMUS&#40;Const filename &#58; PChar&#41; &#58; PMix_Music; CDecl; external;
    Function  gp2x_Mix_PlayMusic&#40;music &#58; PMix_Music; loops &#58; ctypes.cint32&#41; &#58; ctypes.cint32; CDecl; external;
    Function  gp2x_Mix_PlayingMusic &#58; ctypes.cint32; CDecl; external;
    Procedure gp2x_Mix_FreeMusic&#40;music &#58; PMix_Music&#41;; CDecl; external;
    
    Implementation
    
    End.
    I compile the c library to .o by doing this:

    Code:
    arm-linux-gcc.exe -c gp2x_sdl_mixer.c -Ic&#58;\devkitGP2X\include\SDL
    When I try and use the unit in a program like so and link in the library I get the errors I posted

    Code:
    Uses
        SysUtils,
        SDL,
    &#123;$IFNDEF gp2x&#125;
        SDL_Mixer
    &#123;$ELSE&#125;
        gp2x_sdl_mixer
    &#123;$ENDIF&#125;
        ;
    Code:
    Function  OpenAudio &#58; Boolean;
    Begin
    &#123;$IFDEF gp2x&#125;
        Result &#58;= gp2x_Mix_OpenAudio&#40;22050, AUDIO_S16, 2, 4096&#41; = 0; // Initialize SDL_mixer
    &#123;$ELSE&#125;
        Result &#58;= Mix_OpenAudio&#40;22050, AUDIO_S16, 2, 4096&#41; = 0;      // Initialize SDL_mixer
    &#123;$ENDIF&#125;
        If Not Result Then
        Begin
            Log&#40;'Mix_OpenAudio failed&#58; ' + SDL_GetError&#41;;
            Exit;
        End;
        Log&#40;'Mix_OpenAudio...'&#41;;
    End;
    &#123;..............................................................................&#125;
    
    &#123;..............................................................................&#125;
    Procedure CloseAudio;
    Begin
    &#123;$IFDEF gp2x&#125;
        gp2x_Mix_CloseAudio;
    &#123;$ELSE&#125;
        Mix_CloseAudio;
    &#123;$ENDIF&#125;
    End;
    &#123;..............................................................................&#125;
    
    &#123;..............................................................................&#125;
    Function  LoadMusic&#40;Const filename &#58; AnsiString&#41; &#58; PMix_Music;
    Begin
    &#123;$IFDEF gp2x&#125;
        Result &#58;= gp2x_Mix_LoadMUS&#40;PChar&#40;filename&#41;&#41;;
    &#123;$ELSE&#125;
        Result &#58;= Mix_LoadMUS&#40;PChar&#40;filename&#41;&#41;;
    &#123;$ENDIF&#125;
    End;
    &#123;..............................................................................&#125;
    
    &#123;..............................................................................&#125;
    Function  PlayMusic&#40;music &#58; PMix_Music; loops &#58; Integer&#41; &#58; Integer;
    Begin
    &#123;$IFDEF gp2x&#125;
        Result &#58;= gp2x_Mix_PlayMusic&#40;music,loops&#41;;
    &#123;$ELSE&#125;
        Result &#58;= Mix_PlayMusic&#40;music,loops&#41;;
    &#123;$ENDIF&#125;
    End;
    &#123;..............................................................................&#125;
    
    &#123;..............................................................................&#125;
    Function  PlayingMusic &#58; Boolean;
    Begin
    &#123;$IFDEF gp2x&#125;
        Result &#58;= gp2x_Mix_PlayingMusic = 1;
    &#123;$ELSE&#125;
        Result &#58;= Mix_PlayingMusic = 1;
    &#123;$ENDIF&#125;
    End;
    &#123;..............................................................................&#125;
    
    &#123;..............................................................................&#125;

    any ideas?
    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  10. #10

    FPC4GP2X status?

    Do a "nm gp2x_sdl_mixer.o" and compare the symbols displayed with the ones the compiler is looking for. Can you see differences?

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