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

Thread: Low level library for FreePascal and GP2X

  1. #1

    Low level library for FreePascal and GP2X

    Last days i wrote an low level library for FreePascal and GP2X. I got the blitter, joystick and double buffering working. Only one function, SDL_GetTicks(), is used from SDL, all other is done with own functions.

    A simple demo is available from: http://www.seban.de/download/fpc4gp2x.zip

    Usage:

    X - Exit

    Volume- = disable "wait for sync"
    Volume+ = enable "wait for sync"

    Joystick Left - ClearScreen without blitter support
    Joystick Right - ClearScreen with blitter support
    Joystick Up - Show single image with transparent color (fuchsia)
    Joystick Up - Show 400 Image per frame (25.500 Frames) with transparent color (fuchsia)

    This is only for testing, don't expect too much. Next days i will implement a simple font library, so i can make complexer samples.

    Regards,
    Thomas

    03.02.2009 Added Screenshot (done with demo program)

    Main menu


    1000 sprites


    Button testing

  2. #2

    Low level library for FreePascal and GP2X

    I have changed the sample. Now a menu is displayed.

    So, how fast is it?

    1000 sprites with transparent color and V-Sync enabled needs 33ms per frame. The size of this sprite is 33x34x2 bytes, this means in 33ms around 2.2 MB are painted. Per second we have around 66MB/S, not so bad i think.

    Thomas

  3. #3

    Low level library for FreePascal and GP2X

    I might just have to dust off my gp2x and have a go
    The views expressed on this programme are bloody good ones. - Fred Dagg

  4. #4

    Low level library for FreePascal and GP2X

    Great work Thomas, the only problem is that it didn't work on my GP2X-F100 (B) (2.0 firmware)...

    the menu appears, but apart from that, only the toggling on and off of v-sync works...the joystick doesn't do any onscreen changes for me
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

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

  5. #5

    Low level library for FreePascal and GP2X

    Thanks for respone, i have a GP2X F100 first edition with same firmware like you.

    I have upload a new version, which have a test menu for joystick and all other buttons. Please test it and report me the your values.

    My Values are:
    Buttons: 0000
    Volume: C004
    Joystick: FE00

    Cheers,
    Thomas

  6. #6

    Low level library for FreePascal and GP2X

    I add support for making screenshots in main menue, button menue and mass blitting. It is a 24 bit window bitmap, this format was simple to write.

    Press both shoulder buttons, the battery led switched on and when file is written, it needs about 20 seconds, the battery is switched off.

    Cheers,
    Thomas

  7. #7

    Low level library for FreePascal and GP2X

    Hi Thomas,
    I tried the new version and the only things that work for me are the screenshot (makes a .bmp file containing a corrupted image), and the vsync on/off

    The menu still looks the same as before.

    I hope you don't mind, but I looked at your source code and I'm not sure where the new values are supposed to appear in the code.

    I won't use the code without your permission, but I was just trying to see what you meant with regards to the joystick values, etc.

    PS. you have put a lot of work into the uGP2X.pas file, well done

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

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

  8. #8

    Low level library for FreePascal and GP2X

    Where you got the uGP2X.pas? I looked at last zip file and there are only 2 files, fpc4gp2x (unpacked 275KB) and fpc4fp2x.gpe. This file is not ready for use, so be careful.

    You see the menu,
    did you see the new option Y) ?
    with X you can exit the program?

    Bitmap is corrupt, maybe you have downloaded the older file from 9pm clock, in this the RGB 565 to 888 conversions was wrong.


    Thomas

  9. #9

    Low level library for FreePascal and GP2X

    erm...I got the uGP2X.pas from your website (fpc4gp2x_src.zip)...perhaps I shouldn't have but I looked at your downloads folder as I was curious.

    Sorry about that

    ahh..I didn't see the new Y option, after selecting that I can see the joystick movement values and 'keys' working now

    So where do I find the newest version?

    In the fpc4gp2x.zip file, the date/time of the 'executable' is

    3-feb-2009, 10:41pm

    EDIT: oh yeah, my button values are:

    Code:
    Buttons:  0004
    Volumes:  D00C
    Joystick: FF00
    and the screenshot seems to work with both menus now

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

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

  10. #10

    Low level library for FreePascal and GP2X

    Hi Paul,

    no problem, the mistake is mine. The server is not well configured, i must disable directory listing.

    I have upload a new version, which correct the joystick bug. It is strange, that i have small different values, but ok, i change the bit mask.

    The new version has a displayed version, 20090304.1, in right lower corner.

    Thanks for your help,
    Thomas

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
  •