Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 69

Thread: GP2X Issues...

  1. #11

    GP2X Issues...

    I haven't tried it. I haven't tried making FPC for ARM since my last attempt almost a year ago when it was failing to build the runtime libraries due to an internal error.

  2. #12

    GP2X Issues...

    Quote Originally Posted by savage
    Hi Paul or Steve,
    Any joy in getting FPC to recognise either fpcgetenv() or the libc.getenv()?
    Hi savage, I was quite busy but I am back to testing the libc.getenv right now...I will let you know how it goes.

    cheers,
    Paul

  3. #13

    GP2X Issues...

    I didn't have any luck with the libc.getenv but I have gotten it working using fpgetenv!!!

    in SDL.pas around line 261 (I can't recall if this differs from your new version)

    [pascal]{$IFDEF UNIX}
    {$IFDEF FPC}
    {$IFDEF Ver1_0}
    linux,
    {$ELSE}
    pthreads,
    baseunix,
    {$IFNDEF gp2x}
    unix,
    {$ELSE}
    unix;
    {$ENDIF}
    {$ENDIF}
    {$IFNDEF gp2x}
    x,
    Xlib;
    {$ENDIF}
    {$ELSE}
    Types,
    Libc,
    Xlib;
    {$ENDIF}
    {$ENDIF}[/pascal]

    Now the SDL_getenv function:

    [pascal]function SDL_getenv(const name: PChar): PChar;
    begin
    {$IFDEF WIN32}

    {$IFDEF __GPC__}
    Result := getenv( string( name ) );
    {$ELSE}
    Result := getenv( name );
    {$ENDIF}

    {$ELSE}

    {$IFDEF UNIX}

    {$IFDEF FPC}
    Result := fpgetenv(name);
    {$ELSE}
    Result := libc.getenv(name);
    {$ENDIF}

    {$ENDIF}

    {$ENDIF}
    end;[/pascal]

    All I had to do was use that, and add the units\arm-linux\rtl folder to my path in my compiler batch file and it now works.
    I can get the path environment variable, write it to a file, and look at it using the gp2x E-Book program

    WooHoo!!
    cheers,
    Paul.

  4. #14

    GP2X Issues...

    That's great news Paul! It looks like adding units\arm-linux\rtl folder to your path is what did the trick.

    The difference between your IFDEF and mine is that mine removes support for v1.x of FPC. Only v2.x of FPC is supported now.

    Could you follow the following link...
    http://jedi-sdl.cvs.sourceforge.net/...?revision=1.27
    and save this file as sdl.pas and use this one just to confirm 100% that it is the added path is all that is needed for v1.0 of JEDI-SDL to work with GP2X.
    <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 =-

  5. #15

    GP2X Issues...

    Quote Originally Posted by savage
    That's great news Paul! It looks like adding units\arm-linux\rtl folder to your path is what did the trick.

    The difference between your IFDEF and mine is that mine removes support for v1.x of FPC. Only v2.x of FPC is supported now.

    Could you follow the following ]http://jedi-sdl.cvs.sourceforge.net/*checkout*/jedi-sdl/JEDI-SDLv1.0/SDL/Pas/sdl.pas?revision=1.27[/url]
    and save this file as sdl.pas and use this one just to confirm 100% that it is the added path is all that is needed for v1.0 of JEDI-SDL to work with GP2X.
    Hi,
    I got the version of sdl.pas from above and tried it under Delphi/freepascal/lazarus.

    It compiled but when running it it first complained:

    The procedure entry point SDL_GetKeyRepeat could not be located in the dynamic link library SDL.dll.


    does this mean I have the wrong version of the sdl.dll?

    EDIT: I downloaded the new dll and fixed this issue.

    Also when compiling it under freepascal arm-linux it had these errors:

    Code:
    SDL.pas&#40;2183,12&#41; Error&#58; Forward type not resolved "PPoint"
    SDL.pas&#40;2198,11&#41; Error&#58; Forward type not resolved "PRect"
    SDL.pas&#40;3949,1&#41; Fatal&#58; There were 2 errors compiling module, stopping
    SDL.pas&#40;3949,1&#41; Fatal&#58; Compilation aborted
    I think this one may have something to do with HAS_TYPES...is this defined automatically, or do I have to pass this to the compiler?

    cheers,
    Paul.

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

    GP2X Issues...

    Very nice work Paul!

    You do know that there is got to be a tutorial coming after all this right?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  7. #17

    GP2X Issues...

    Quote Originally Posted by WILL
    Very nice work Paul!

    You do know that there is got to be a tutorial coming after all this right?
    hehe :-)

    Once I have this 'final' issue resolved and the new sdl.pas is working (I am currently building the fpcbuild 2.1.x version of the source code to see if that works better), I will make a web page, tutorials, and downloads

    cheers,
    Paul.

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

    GP2X Issues...

    Shall I go ahead and add GP2X to the Free Pascal Wiki?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #19

    GP2X Issues...

    Quote Originally Posted by WILL
    Shall I go ahead and add GP2X to the Free Pascal Wiki?
    Just curious, what are you thinking of writing? :-)
    cheers,
    Paul.

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

    GP2X Issues...

    This: http://wiki.freepascal.org/GP2X

    If you make an account at freepascal.org, you can add information on the GP2X platform yourself.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 2 of 7 FirstFirst 1234 ... 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
  •